Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
bb4566a2
Commit
bb4566a2
authored
Sep 25, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):修改使用登记作废-气瓶导入作废,修改气瓶导入
parent
b828b72b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
5 deletions
+47
-5
JgUseRegistrationManageMapper.java
...t/module/jg/api/mapper/JgUseRegistrationManageMapper.java
+5
-1
JgUseRegistrationManageMapper.xml
...c/main/resources/mapper/JgUseRegistrationManageMapper.xml
+14
-0
JgUseRegistrationManageController.java
.../jg/biz/controller/JgUseRegistrationManageController.java
+15
-0
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+3
-2
JgUseRegistrationManageServiceImpl.java
.../biz/service/impl/JgUseRegistrationManageServiceImpl.java
+10
-2
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationManageMapper.java
View file @
bb4566a2
...
...
@@ -6,9 +6,10 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.CertificateVo
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -32,4 +33,7 @@ public interface JgUseRegistrationManageMapper extends BaseMapper<JgUseRegistrat
@Param
(
"orgCode"
)
String
orgCode
);
List
<
CertificateVo
>
queryCertificateInIds
(
@Param
(
"ids"
)
List
<
String
>
ids
);
@MapKey
(
"year"
)
List
<
Map
<
String
,
String
>>
initUseRegistrationCodeIntoRedis
(
@Param
(
"year"
)
String
year
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationManageMapper.xml
View file @
bb4566a2
...
...
@@ -214,4 +214,18 @@
ORDER BY
tjurm.rec_date DESC
</select>
<select
id=
"initUseRegistrationCodeIntoRedis"
resultType=
"java.util.Map"
>
SELECT SUBSTR(t.use_registration_code, 1, 5) AS prefix,
SUBSTR(MAX(t.use_registration_code), 6, 5) AS code
FROM tzs_jg_use_registration_manage t
LEFT JOIN tzs_jg_use_registration tjur on tjur.use_registration_code = t.use_registration_code
WHERE LENGTH(t.use_registration_code) = 14
AND SUBSTR(t.use_registration_code, 1, 1) IN ('容', '锅', '管', '瓶', '梯', '起', '索', '游', '车')
AND TRIM(t.use_registration_code) LIKE concat('%(',#{year},')')
and tjur.reg_type is null
GROUP BY SUBSTR(t.use_registration_code, 1, 5)
HAVING code
<![CDATA[ <> ]]>
'00000'
ORDER BY prefix
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationManageController.java
View file @
bb4566a2
...
...
@@ -308,4 +308,19 @@ public class JgUseRegistrationManageController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationManageServiceImpl
.
getDetail
(
sequenceNbr
));
}
/**
*
* 初始化使用登记证序列号到Redis
* @author LiuLin
* @return Object
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/initRegCodeIntoRedis"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"初始化使用登记证序列号到Redis"
,
notes
=
"初始化使用登记证序列号到Redis"
)
public
ResponseModel
<
Object
>
initUseRegistrationCodeIntoRedis
()
{
jgUseRegistrationManageServiceImpl
.
initUseRegistrationCodeIntoRedis
();
return
ResponseHelper
.
buildResponse
(
"Redis初始化完成!"
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
bb4566a2
...
...
@@ -1546,7 +1546,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 查询 使用登记【可选设备列表】【(EQU_STATUS=== null || "" ) && (USE_ORG_CODE(使用登记证编号) ==="" || null)】
BoolQueryBuilder
syBuilder
=
QueryBuilders
.
boolQuery
();
syBuilder
.
mustNot
(
QueryBuilders
.
existsQuery
(
"EQU_STATE"
));
syBuilder
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"USE_ORG_CODE"
,
"*"
));
//
syBuilder.mustNot(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"));
boolMust
.
must
(
syBuilder
);
this
.
setRepeatUsedCheckFilterParam
(
boolMust
,
companyCode
,
"useRegistration"
);
}
else
if
(
ValidationUtil
.
equals
(
queryType
,
"FINISH_SY"
))
{
...
...
@@ -3231,7 +3231,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
jgUseRegistrationManage
.
setManageType
(
"unit"
);
jgUseRegistrationManage
.
setUseUnitAddress
(
company
.
getAddress
());
jgUseRegistrationManage
.
setUseRegistrationCode
(
equipInfoDto
.
getUseOrgCode
());
jgUseRegistrationManage
.
setUseUnitCreditCode
(
company
.
getCompanyCode
());
jgUseRegistrationManage
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
jgUseRegistrationManage
.
setUseUnitName
(
company
.
getCompanyName
());
jgUseRegistrationManage
.
setReceiveCompanyCode
(
equipInfoDto
.
getReceiveOrgCode
());
jgUseRegistrationManage
.
setCertificateNo
(
generateCertificateNo
(
equipInfoDto
,
new
Date
(),
equipInfoDto
.
getReceiveOrgCode
()));
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationManageServiceImpl.java
View file @
bb4566a2
...
...
@@ -34,6 +34,7 @@ import org.elasticsearch.search.builder.SearchSourceBuilder;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -42,15 +43,14 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getAuditPassedDate
;
...
...
@@ -109,6 +109,8 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
private
static
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
@Autowired
CommonMapper
commonMapper
;
@Autowired
private
RedisTemplate
<
String
,
String
>
redisTemplate
;
/**
...
...
@@ -673,4 +675,9 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
}
return
parseArray
(
json
,
FormValue
.
class
);
}
public
void
initUseRegistrationCodeIntoRedis
()
{
jgUseRegistrationManageMapper
.
initUseRegistrationCodeIntoRedis
(
String
.
valueOf
(
LocalDate
.
now
().
getYear
()
%
100
))
.
forEach
(
resultMap
->
redisTemplate
.
opsForValue
().
set
(
resultMap
.
get
(
"prefix"
),
resultMap
.
get
(
"code"
)));
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment