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
0a1ed137
Commit
0a1ed137
authored
Feb 02, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' into develop_tzs_register_jyjc
parents
526e32fc
be739e04
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
438 additions
and
129 deletions
+438
-129
IJgInstallationNoticeService.java
...t/module/jg/api/service/IJgInstallationNoticeService.java
+1
-1
IJgTransferNoticeService.java
.../boot/module/jg/api/service/IJgTransferNoticeService.java
+1
-1
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+2
-2
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+4
-3
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+2
-1
JgTransferNoticeController.java
.../module/jg/biz/controller/JgTransferNoticeController.java
+2
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+3
-3
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+35
-16
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+33
-0
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+32
-1
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+18
-1
JyjcInspectionApplication.java
...oot/module/jyjc/api/entity/JyjcInspectionApplication.java
+4
-1
JyjcOpeningApplication.java
...s/boot/module/jyjc/api/entity/JyjcOpeningApplication.java
+3
-0
JyjcBaseMapper.java
...join/amos/boot/module/jyjc/api/mapper/JyjcBaseMapper.java
+4
-0
JyjcInspectionApplicationMapper.java
...dule/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
+1
-1
JyjcOpeningApplicationMapper.java
.../module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
+3
-1
JyjcInspectionApplicationModel.java
...module/jyjc/api/model/JyjcInspectionApplicationModel.java
+4
-4
JyjcOpeningApplicationModel.java
...ot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
+3
-0
TaskMessageDto.java
...ejoin/amos/boot/module/jyjc/api/model/TaskMessageDto.java
+1
-0
JyjcBaseMapper.xml
...ule-jyjc-api/src/main/resources/mapper/JyjcBaseMapper.xml
+14
-0
JyjcInspectionApplicationMapper.xml
...main/resources/mapper/JyjcInspectionApplicationMapper.xml
+2
-0
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+2
-0
CommonController.java
...mos/boot/module/jyjc/biz/controller/CommonController.java
+36
-0
ICmWorkflowService.java
...amos/boot/module/jyjc/biz/service/ICmWorkflowService.java
+6
-0
TaskModelServiceImpl.java
...os/boot/module/jyjc/biz/service/TaskModelServiceImpl.java
+65
-0
CmWorkflowServiceImpl.java
...t/module/jyjc/biz/service/impl/CmWorkflowServiceImpl.java
+38
-0
CommonserviceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
+17
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+7
-2
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+10
-2
PersonIdentifyTzsAspect.java
...m/yeejoin/amos/patrol/config/PersonIdentifyTzsAspect.java
+84
-87
GenerateCodeServiceImpl.java
.../module/ymt/biz/service/impl/GenerateCodeServiceImpl.java
+1
-1
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/service/IJgInstallationNoticeService.java
View file @
0a1ed137
...
@@ -26,7 +26,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
...
@@ -26,7 +26,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return 安装告知
* @return 安装告知
*/
*/
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
);
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
,
String
companyLevel
);
/**
/**
* 更新安装告知
* 更新安装告知
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgTransferNoticeService.java
View file @
0a1ed137
...
@@ -19,7 +19,7 @@ import java.util.Map;
...
@@ -19,7 +19,7 @@ import java.util.Map;
*/
*/
public
interface
IJgTransferNoticeService
extends
IService
<
JgTransferNotice
>
{
public
interface
IJgTransferNoticeService
extends
IService
<
JgTransferNotice
>
{
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
);
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
,
String
companyLevel
);
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
);
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
0a1ed137
...
@@ -122,8 +122,8 @@
...
@@ -122,8 +122,8 @@
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ei.
legal_person
AS safetyManager,
ei.
use_contact
AS safetyManager,
ei.
legal
_phone AS safetyManagerPhone,
ei.
contact
_phone AS safetyManagerPhone,
ei.address AS address,
ei.address AS address,
ei.use_code AS useCode,
ei.use_code AS useCode,
isn.install_unit_credit_code AS installUnitCreditCode,
isn.install_unit_credit_code AS installUnitCreditCode,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
0a1ed137
...
@@ -154,15 +154,16 @@
...
@@ -154,15 +154,16 @@
fi.factory_standard AS factoryStandard,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ei.
legal_person
AS safetyManager,
ei.
use_contact
AS safetyManager,
ei.
legal
_phone AS safetyManagerPhone,
ei.
contact
_phone AS safetyManagerPhone,
ui.PROVINCE_NAME AS useUnitProvinceName,
ui.PROVINCE_NAME AS useUnitProvinceName,
ui.CITY_NAME AS useUnitCityName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.ADDRESS AS useUnitAddress,
ui.ADDRESS AS useUnitAddress,
eio.use_code AS useCode,
eio.use_code AS useCode,
idi.INSPECT_REPORT as inspectReport,
idi.INSPECT_REPORT as inspectReport,
re.equ_id as equId
re.equ_id as equId,
ei.address as useUnitLeaderAddress
FROM
FROM
tzs_jg_transfer_notice tjtn
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationNoticeController.java
View file @
0a1ed137
...
@@ -120,7 +120,8 @@ public class JgInstallationNoticeController extends BaseController {
...
@@ -120,7 +120,8 @@ public class JgInstallationNoticeController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个安装告知"
,
notes
=
"根据sequenceNbr查询单个安装告知"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个安装告知"
,
notes
=
"根据sequenceNbr查询单个安装告知"
)
public
ResponseModel
<
Map
<
String
,
public
ResponseModel
<
Map
<
String
,
Map
<
String
,
Object
>>>
selectOne
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
Map
<
String
,
Object
>>>
selectOne
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
queryBySequenceNbr
(
sequenceNbr
));
String
companyLevel
=
(
String
)
iJgInstallationNoticeService
.
getCompanyType
().
get
(
"companyLevel"
);
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
queryBySequenceNbr
(
sequenceNbr
,
companyLevel
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgTransferNoticeController.java
View file @
0a1ed137
...
@@ -134,7 +134,8 @@ public class JgTransferNoticeController extends BaseController {
...
@@ -134,7 +134,8 @@ public class JgTransferNoticeController extends BaseController {
@GetMapping
(
value
=
"/details"
)
@GetMapping
(
value
=
"/details"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个移装造告知"
,
notes
=
"根据sequenceNbr查询单个移装造告知"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个移装造告知"
,
notes
=
"根据sequenceNbr查询单个移装造告知"
)
public
ResponseModel
<
Map
<
String
,
Map
<
String
,
Object
>>>
selectOne
(
@RequestParam
Long
sequenceNbr
)
{
public
ResponseModel
<
Map
<
String
,
Map
<
String
,
Object
>>>
selectOne
(
@RequestParam
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
queryBySequenceNbr
(
sequenceNbr
));
String
companyLevel
=
(
String
)
iJgInstallationNoticeService
.
getCompanyType
().
get
(
"companyLevel"
);
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
queryBySequenceNbr
(
sequenceNbr
,
companyLevel
));
}
}
...
...
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 @
0a1ed137
...
@@ -234,9 +234,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
...
@@ -234,9 +234,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if
(!
ValidationUtil
.
isEmpty
(
equipParamsMap
))
{
if
(!
ValidationUtil
.
isEmpty
(
equipParamsMap
))
{
// 给技术参数中添加设备种类,标记技术参数属于那个设备
// 给技术参数中添加设备种类,标记技术参数属于那个设备
equipParamsMap
.
put
(
"EQU_LIST"
,
equIpClassMap
.
get
(
"EQU_LIST"
).
toString
(
));
equipParamsMap
.
put
(
"EQU_LIST"
,
String
.
valueOf
(
equIpClassMap
.
get
(
"EQU_LIST"
)
));
equipParamsMap
.
put
(
"EQU_CATEGORY"
,
equIpClassMap
.
get
(
"EQU_CATEGORY"
).
toString
(
));
equipParamsMap
.
put
(
"EQU_CATEGORY"
,
String
.
valueOf
(
equIpClassMap
.
get
(
"EQU_CATEGORY"
)
));
equipParamsMap
.
put
(
"EQU_DEFINE"
,
equIpClassMap
.
get
(
"EQU_DEFINE"
).
toString
(
));
equipParamsMap
.
put
(
"EQU_DEFINE"
,
String
.
valueOf
(
equIpClassMap
.
get
(
"EQU_DEFINE"
)
));
resultMap
.
put
(
EQUIP_PARAMS_FORM_ID
,
equipParamsMap
);
resultMap
.
put
(
EQUIP_PARAMS_FORM_ID
,
equipParamsMap
);
}
}
}
}
...
...
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/JgInstallationNoticeServiceImpl.java
View file @
0a1ed137
...
@@ -134,6 +134,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -134,6 +134,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
IIdxBizJgUseInfoService
useInfoService
;
IIdxBizJgUseInfoService
useInfoService
;
@Autowired
@Autowired
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
@Autowired
private
DataDictionaryMapper
dataDictionaryMapper
;
private
DataDictionaryMapper
dataDictionaryMapper
;
@Autowired
@Autowired
...
@@ -168,7 +171,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -168,7 +171,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @return 安装告知
* @return 安装告知
*/
*/
@Override
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
,
String
companyLevel
)
{
// 安装告知信息
// 安装告知信息
JgInstallationNotice
notice
=
jgInstallationNoticeMapper
.
selectById
(
sequenceNbr
);
JgInstallationNotice
notice
=
jgInstallationNoticeMapper
.
selectById
(
sequenceNbr
);
if
(
Objects
.
isNull
(
notice
))
{
if
(
Objects
.
isNull
(
notice
))
{
...
@@ -217,9 +220,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -217,9 +220,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
equInfo
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
equInfo
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
equInfo
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
equInfo
.
put
(
"designStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designStandard"
))));
equInfo
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
equInfo
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
BeanUtil
.
copyProperties
(
equInfo
,
detail
);
BeanUtil
.
copyProperties
(
equInfo
,
detail
);
BeanUtil
.
copyProperties
(
installationInfo
,
detail
,
"equList"
,
"supervisoryCode"
,
"factoryNum"
,
"equRegisterCode"
);
BeanUtil
.
copyProperties
(
installationInfo
,
detail
,
"equList"
,
"supervisoryCode"
,
"factoryNum"
,
"equRegisterCode"
);
detail
.
put
(
"companyLevel"
,
companyLevel
);
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"installationInfo"
,
detail
);
this
.
put
(
"installationInfo"
,
detail
);
}};
}};
...
@@ -861,7 +864,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -861,7 +864,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
map1
.
put
(
"USE_UNIT_NAME"
,
jgInstallationNotice
.
getUseUnitName
());
map1
.
put
(
"USE_UNIT_NAME"
,
jgInstallationNotice
.
getUseUnitName
());
map1
.
put
(
"USC_UNIT_CREDIT_CODE"
,
jgInstallationNotice
.
getInstallUnitCreditCode
());
map1
.
put
(
"USC_UNIT_CREDIT_CODE"
,
jgInstallationNotice
.
getInstallUnitCreditCode
());
map1
.
put
(
"USC_UNIT_NAME"
,
jgInstallationNotice
.
getInstallUnitName
());
map1
.
put
(
"USC_UNIT_NAME"
,
jgInstallationNotice
.
getInstallUnitName
());
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
// 安装告知去除该字段,使用登记时添加
// map1.put("ORG_BRANCH_CODE",jgInstallationNotice.getOrgBranchCode());
// map1.put("ORG_BRANCH_NAME",jgInstallationNotice.getOrgBranchCode());
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s"
,
jgInstallationNotice
.
getProvinceName
(),
jgInstallationNotice
.
getCityName
(),
jgInstallationNotice
.
getCounty
()));
map1
.
put
(
"ADDRESS"
,
String
.
format
(
"%s/%s"
,
jgInstallationNotice
.
getStreetName
(),
jgInstallationNotice
.
getAddress
()));
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
jgInstallationNotice
.
setPromoter
(
""
);
jgInstallationNotice
.
setPromoter
(
""
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
...
@@ -890,19 +898,30 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -890,19 +898,30 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
useInfo
.
setIsNotXiXian
(
jgInstallationNotice
.
getIsXixian
()
==
null
?
"0"
:
jgInstallationNotice
.
getIsXixian
());
useInfo
.
setIsNotXiXian
(
jgInstallationNotice
.
getIsXixian
()
==
null
?
"0"
:
jgInstallationNotice
.
getIsXixian
());
useInfoService
.
saveOrUpdateData
(
useInfo
);
useInfoService
.
saveOrUpdateData
(
useInfo
);
}
}
// 修改属地
// 修改属地 - 字段去除
LambdaUpdateWrapper
<
SuperviseInfo
>
lambdaUpdateWrapper
=
new
LambdaUpdateWrapper
<>();
// LambdaUpdateWrapper<SuperviseInfo> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
lambdaUpdateWrapper
.
eq
(
SuperviseInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
// lambdaUpdateWrapper.eq(SuperviseInfo::getRecord, jgRelationEquip.getEquId());
SuperviseInfo
superviseInfo
=
new
SuperviseInfo
();
// SuperviseInfo superviseInfo = new SuperviseInfo();
superviseInfo
.
setOrgBranchName
(
jgInstallationNotice
.
getOrgBranchName
());
// superviseInfo.setOrgBranchName(jgInstallationNotice.getOrgBranchName());
superviseInfo
.
setOrgBranchCode
(
jgInstallationNotice
.
getOrgBranchCode
());
// superviseInfo.setOrgBranchCode(jgInstallationNotice.getOrgBranchCode());
superviseInfoMapper
.
update
(
superviseInfo
,
lambdaUpdateWrapper
);
// superviseInfoMapper.update(superviseInfo, lambdaUpdateWrapper);
HashMap
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
// 修改使用信息
Map
<
String
,
Map
<
String
,
Object
>>
superMap
=
new
HashMap
<>();
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
LambdaUpdateWrapper
<>();
hashMap
.
put
(
"ORG_BRANCH_CODE"
,
jgInstallationNotice
.
getOrgBranchCode
());
lambda
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
hashMap
.
put
(
"ORG_BRANCH_NAME"
,
jgInstallationNotice
.
getOrgBranchCode
());
IdxBizJgUseInfo
idxBizJgUseInfo
=
new
IdxBizJgUseInfo
();
superMap
.
put
(
jgRelationEquip
.
getEquId
(),
hashMap
);
idxBizJgUseInfo
.
setProvince
(
jgInstallationNotice
.
getProvince
());
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
superMap
);
idxBizJgUseInfo
.
setProvinceName
(
jgInstallationNotice
.
getProvinceName
());
idxBizJgUseInfo
.
setCity
(
jgInstallationNotice
.
getCity
());
idxBizJgUseInfo
.
setCityName
(
jgInstallationNotice
.
getCityName
());
idxBizJgUseInfo
.
setCounty
(
jgInstallationNotice
.
getCounty
());
idxBizJgUseInfo
.
setCountyName
(
jgInstallationNotice
.
getCountyName
());
idxBizJgUseInfo
.
setFactoryUseSiteStreet
(
jgInstallationNotice
.
getFactoryUseSiteStreet
());
idxBizJgUseInfo
.
setStreetName
(
jgInstallationNotice
.
getStreetName
());
idxBizJgUseInfo
.
setAddress
(
jgInstallationNotice
.
getAddress
());
idxBizJgUseInfo
.
setIsNotXiXian
(
jgInstallationNotice
.
getIsXixian
());
idxBizJgUseInfoMapper
.
update
(
idxBizJgUseInfo
,
lambda
);
// 上个代办改为已办
// 上个代办改为已办
HashMap
<
String
,
Object
>
taskMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
taskMap
=
new
HashMap
<>();
taskMap
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
taskMap
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
0a1ed137
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgMaintenanceContractService
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgMaintenanceContractService
import
com.yeejoin.amos.boot.module.jg.api.vo.JgMaintenanceContractVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.JgMaintenanceContractVo
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
...
@@ -81,6 +82,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -81,6 +82,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
@Autowired
@Autowired
IJgInstallationNoticeService
jrmInstallationNoticeService
;
IJgInstallationNoticeService
jrmInstallationNoticeService
;
@Autowired
private
IdxBizJgMaintenanceRecordInfoServiceImpl
idxBizJgMaintenanceRecordInfoService
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -507,10 +511,39 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -507,10 +511,39 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setApplyDate
(
new
Date
());
contract
.
setApplyDate
(
new
Date
());
contract
.
setStatus
(
taskCode
);
contract
.
setStatus
(
taskCode
);
updateTaskModel
(
contract
,
"0"
);
updateTaskModel
(
contract
,
"0"
);
// 添加设备维保信息
updateEquipMessage
(
contract
.
getSequenceNbr
());
}
}
this
.
getBaseMapper
().
updateById
(
contract
);
this
.
getBaseMapper
().
updateById
(
contract
);
}
}
/**
* 流程结束后添加设备维保信息
*
* @param id
*/
private
void
updateEquipMessage
(
Long
id
)
{
JgMaintenanceContract
jgMaintenanceContract
=
this
.
getBaseMapper
().
selectById
(
id
);
LambdaQueryWrapper
<
JgMaintenanceContractEq
>
lambda
=
new
QueryWrapper
<
JgMaintenanceContractEq
>().
lambda
();
lambda
.
eq
(
JgMaintenanceContractEq:
:
getEquipTransferId
,
id
);
List
<
JgMaintenanceContractEq
>
list
=
jgMaintenanceContractEqService
.
getBaseMapper
().
selectList
(
lambda
);
ArrayList
<
IdxBizJgMaintenanceRecordInfo
>
data
=
new
ArrayList
<>();
list
.
forEach
(
item
->
{
IdxBizJgMaintenanceRecordInfo
info
=
new
IdxBizJgMaintenanceRecordInfo
();
info
.
setRecord
(
item
.
getEquId
());
info
.
setMeUnitName
(
ObjectUtils
.
isEmpty
(
jgMaintenanceContract
.
getMaintenanceUnitName
())
?
null
:
jgMaintenanceContract
.
getMaintenanceUnitName
());
info
.
setMeUnitCreditCode
(
ObjectUtils
.
isEmpty
(
jgMaintenanceContract
.
getMaintenanceUnitCode
())
?
null
:
jgMaintenanceContract
.
getMaintenanceUnitCode
());
info
.
setMeMaster
(
ObjectUtils
.
isEmpty
(
jgMaintenanceContract
.
getMaintenanceManagerOneName
())
?
null
:
jgMaintenanceContract
.
getMaintenanceManagerOneName
());
info
.
setEmergencycall
(
ObjectUtils
.
isEmpty
(
jgMaintenanceContract
.
getMaintenanceManagerOnePhone
())
?
null
:
jgMaintenanceContract
.
getMaintenanceManagerOnePhone
());
info
.
setInformStart
(
ObjectUtils
.
isEmpty
(
jgMaintenanceContract
.
getInformStart
())
?
null
:
jgMaintenanceContract
.
getInformStart
());
info
.
setInformEnd
(
ObjectUtils
.
isEmpty
(
jgMaintenanceContract
.
getInformEnd
())
?
null
:
jgMaintenanceContract
.
getInformEnd
());
info
.
setRepairInform
(
ObjectUtils
.
isEmpty
(
jgMaintenanceContract
.
getMaintenanceContract
())
?
null
:
jgMaintenanceContract
.
getMaintenanceContract
());
data
.
add
(
info
);
});
idxBizJgMaintenanceRecordInfoService
.
saveBatch
(
data
);
}
private
TaskV2Model
updateTaskModel
(
JgMaintenanceContract
contract
,
String
operate
)
{
private
TaskV2Model
updateTaskModel
(
JgMaintenanceContract
contract
,
String
operate
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
FlowStatusEnum
flowStatusEnum
=
this
.
getTaskStatus
(
operate
);
FlowStatusEnum
flowStatusEnum
=
this
.
getTaskStatus
(
operate
);
...
...
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/JgTransferNoticeServiceImpl.java
View file @
0a1ed137
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
...
@@ -25,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
...
@@ -25,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseUnitLicence
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseUnitLicence
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
...
@@ -98,6 +100,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -98,6 +100,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Autowired
@Autowired
ICmWorkflowService
iCmWorkflowService
;
ICmWorkflowService
iCmWorkflowService
;
@Autowired
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
...
@@ -105,7 +111,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -105,7 +111,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
* @return 移装告知
* @return 移装告知
*/
*/
@Override
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
,
String
companyLevel
)
{
// 移装告知信息
// 移装告知信息
JgTransferNotice
notice
=
jgTransferNoticeMapper
.
selectById
(
sequenceNbr
);
JgTransferNotice
notice
=
jgTransferNoticeMapper
.
selectById
(
sequenceNbr
);
if
(
Objects
.
isNull
(
notice
))
{
if
(
Objects
.
isNull
(
notice
))
{
...
@@ -153,6 +159,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -153,6 +159,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
equInfo
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
equInfo
.
put
(
"designDoc"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"designDoc"
))));
BeanUtil
.
copyProperties
(
equInfo
,
detail
);
BeanUtil
.
copyProperties
(
equInfo
,
detail
);
BeanUtil
.
copyProperties
(
transferNotice
,
detail
,
"equList"
,
"supervisoryCode"
);
BeanUtil
.
copyProperties
(
transferNotice
,
detail
,
"equList"
,
"supervisoryCode"
);
detail
.
put
(
"companyLevel"
,
companyLevel
);
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"transferNoticeInfo"
,
detail
);
this
.
put
(
"transferNoticeInfo"
,
detail
);
}};
}};
...
@@ -708,6 +715,30 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -708,6 +715,30 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
jgTransferNotice
.
setHandleDate
(
new
Date
());
jgTransferNotice
.
setHandleDate
(
new
Date
());
jgTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
jgTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
this
.
generateTransferNoticeReport
(
jgTransferNotice
.
getSequenceNbr
());
this
.
generateTransferNoticeReport
(
jgTransferNotice
.
getSequenceNbr
());
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s"
,
jgTransferNotice
.
getProvinceName
(),
jgTransferNotice
.
getCityName
(),
jgTransferNotice
.
getCounty
()));
map1
.
put
(
"ADDRESS"
,
String
.
format
(
"%s/%s"
,
jgTransferNotice
.
getStreetName
(),
jgTransferNotice
.
getAddress
()));
objMap
.
put
(
jgTransferNoticeEq
.
getEquId
(),
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
// 修改使用信息
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
LambdaUpdateWrapper
<>();
lambda
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgTransferNoticeEq
.
getEquId
());
IdxBizJgUseInfo
idxBizJgUseInfo
=
new
IdxBizJgUseInfo
();
idxBizJgUseInfo
.
setProvince
(
jgTransferNotice
.
getProvince
());
idxBizJgUseInfo
.
setProvinceName
(
jgTransferNotice
.
getProvinceName
());
idxBizJgUseInfo
.
setCity
(
jgTransferNotice
.
getCity
());
idxBizJgUseInfo
.
setCityName
(
jgTransferNotice
.
getCityName
());
idxBizJgUseInfo
.
setCounty
(
jgTransferNotice
.
getCounty
());
idxBizJgUseInfo
.
setCountyName
(
jgTransferNotice
.
getCountyName
());
idxBizJgUseInfo
.
setFactoryUseSiteStreet
(
jgTransferNotice
.
getFactoryUseSiteStreet
());
idxBizJgUseInfo
.
setStreetName
(
jgTransferNotice
.
getStreetName
());
idxBizJgUseInfo
.
setAddress
(
jgTransferNotice
.
getAddress
());
idxBizJgUseInfo
.
setIsNotXiXian
(
jgTransferNotice
.
getIsXixian
());
idxBizJgUseInfoMapper
.
update
(
idxBizJgUseInfo
,
lambda
);
// 上个代办改为已办
// 上个代办改为已办
HashMap
<
String
,
Object
>
taskMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
taskMap
=
new
HashMap
<>();
taskMap
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
taskMap
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
...
...
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/JgUseRegistrationServiceImpl.java
View file @
0a1ed137
...
@@ -92,6 +92,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -92,6 +92,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
CommonServiceImpl
commonServiceImpl
;
CommonServiceImpl
commonServiceImpl
;
@Autowired
@Autowired
CmWorkflowServiceImpl
cmWorkflowService
;
CmWorkflowServiceImpl
cmWorkflowService
;
@Autowired
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
private
static
final
String
DEFINITION_KEY
=
"useRegistration"
;
...
@@ -166,8 +168,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -166,8 +168,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper
<
InspectionDetectionInfo
>
inspectionLambda
=
new
QueryWrapper
<
InspectionDetectionInfo
>().
lambda
();
LambdaQueryWrapper
<
InspectionDetectionInfo
>
inspectionLambda
=
new
QueryWrapper
<
InspectionDetectionInfo
>().
lambda
();
inspectionLambda
.
eq
(
InspectionDetectionInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
inspectionLambda
.
eq
(
InspectionDetectionInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
// 更新检验检测信息
// 更新检验检测信息
inspectionDetectionInfo
.
setInspectReport
(
null
);
//
inspectionDetectionInfo.setInspectReport(null);
inspectionDetectionInfoMapper
.
update
(
inspectionDetectionInfo
,
inspectionLambda
);
inspectionDetectionInfoMapper
.
update
(
inspectionDetectionInfo
,
inspectionLambda
);
// 更新设备监管部门
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
=
new
IdxBizJgSupervisionInfo
();
if
(
map
.
containsKey
(
"orgBranchCode"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"orgBranchCode"
)))
{
String
[]
data
=
String
.
valueOf
(
map
.
getString
(
"orgBranchCode"
)).
split
(
"_"
);
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
data
[
0
]);
idxBizJgSupervisionInfo
.
setOrgBranchName
(
data
[
1
]);
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>
eq
=
new
QueryWrapper
<
IdxBizJgSupervisionInfo
>().
lambda
().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
idxBizJgSupervisionInfoMapper
.
update
(
idxBizJgSupervisionInfo
,
eq
);
}
// 更新设备使用登记证
// 更新设备使用登记证
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"equipId"
)),
useOrgCode
);
// 更新es
// 更新es
...
@@ -274,6 +285,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -274,6 +285,12 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
// 更新设备关联表
LambdaQueryWrapper
<
JgUseRegistrationEq
>
lambda
=
new
QueryWrapper
<
JgUseRegistrationEq
>().
lambda
();
lambda
.
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
jgUseRegistration
.
getSequenceNbr
());
JgUseRegistrationEq
jgUseRegistrationEq
=
new
JgUseRegistrationEq
();
jgUseRegistrationEq
.
setEquId
(
map
.
get
(
"equipId"
).
toString
());
jgRelationEquipMapper
.
update
(
jgUseRegistrationEq
,
lambda
);
}
else
{
}
else
{
// 业务管理设备信息保存
// 业务管理设备信息保存
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcInspectionApplication.java
View file @
0a1ed137
...
@@ -143,7 +143,7 @@ public class JyjcInspectionApplication extends BaseEntity {
...
@@ -143,7 +143,7 @@ public class JyjcInspectionApplication extends BaseEntity {
/**
/**
* 工作流实例ID
* 工作流实例ID
*/
*/
@TableField
(
"
process_
instance_id"
)
@TableField
(
"instance_id"
)
private
String
processInstanceId
;
private
String
processInstanceId
;
/**
/**
...
@@ -197,4 +197,7 @@ public class JyjcInspectionApplication extends BaseEntity {
...
@@ -197,4 +197,7 @@ public class JyjcInspectionApplication extends BaseEntity {
@TableField
(
value
=
"next_execute_user_ids"
)
@TableField
(
value
=
"next_execute_user_ids"
)
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
@TableField
(
value
=
"transfer_to_user_ids"
)
private
String
transferToUserIds
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcOpeningApplication.java
View file @
0a1ed137
...
@@ -132,4 +132,7 @@ public class JyjcOpeningApplication extends BaseEntity {
...
@@ -132,4 +132,7 @@ public class JyjcOpeningApplication extends BaseEntity {
@TableField
(
value
=
"next_execute_user_ids"
)
@TableField
(
value
=
"next_execute_user_ids"
)
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
@TableField
(
value
=
"transfer_to_user_ids"
)
private
String
transferToUserIds
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcBaseMapper.java
View file @
0a1ed137
...
@@ -17,4 +17,8 @@ public interface JyjcBaseMapper {
...
@@ -17,4 +17,8 @@ public interface JyjcBaseMapper {
@MapKey
(
value
=
"code"
)
@MapKey
(
value
=
"code"
)
List
<
Map
<
String
,
String
>>
selectDataDictionaryList
(
List
<
String
>
codes
);
List
<
Map
<
String
,
String
>>
selectDataDictionaryList
(
List
<
String
>
codes
);
String
selectBusinessData
(
String
tableName
,
String
instanceId
,
String
key
);
void
updateBusinessData
(
String
tableName
,
String
assignee
,
String
transferToUserIds
,
String
instanceId
,
String
nextTaskId
,
String
key
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcInspectionApplicationMapper.java
View file @
0a1ed137
...
@@ -26,5 +26,5 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
...
@@ -26,5 +26,5 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
void
updatePromoter
(
@org
.
apache
.
ibatis
.
annotations
.
Param
(
"id"
)
Long
id
);
void
updatePromoter
(
@org
.
apache
.
ibatis
.
annotations
.
Param
(
"id"
)
Long
id
);
Page
<
JyjcInspectionApplicationModel
>
selectForPage
(
@Param
(
"page"
)
Page
<
JyjcInspectionApplication
>
page
,
@Param
(
"jyjcInspectionApplicationModel"
)
JyjcInspectionApplicationModel
jyjcInspectionApplicationModel
,
@Param
(
"identity"
)
String
identity
,
@Param
(
"currentApplicationUnitCode"
)
String
currentApplicationUnitCode
,
@Param
(
"currentInspectionUnitCode"
)
String
currentInspectionUnitCode
);
Page
<
JyjcInspectionApplicationModel
>
selectForPage
(
@Param
(
"page"
)
Page
<
JyjcInspectionApplication
>
page
,
@Param
(
"jyjcInspectionApplicationModel"
)
JyjcInspectionApplicationModel
jyjcInspectionApplicationModel
,
@Param
(
"identity"
)
String
identity
,
@Param
(
"currentApplicationUnitCode"
)
String
currentApplicationUnitCode
,
@Param
(
"currentInspectionUnitCode"
)
String
currentInspectionUnitCode
,
@Param
(
"currentUserId"
)
String
currentUserId
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
View file @
0a1ed137
...
@@ -18,7 +18,9 @@ import java.util.List;
...
@@ -18,7 +18,9 @@ import java.util.List;
public
interface
JyjcOpeningApplicationMapper
extends
BaseMapper
<
JyjcOpeningApplication
>
{
public
interface
JyjcOpeningApplicationMapper
extends
BaseMapper
<
JyjcOpeningApplication
>
{
Page
<
JyjcOpeningApplicationModel
>
selectJyjcOpeningApplicationList
(
@Param
(
"page"
)
Page
<
JyjcOpeningApplication
>
page
,
Page
<
JyjcOpeningApplicationModel
>
selectJyjcOpeningApplicationList
(
@Param
(
"page"
)
Page
<
JyjcOpeningApplication
>
page
,
@Param
(
"jyjcOpeningApplicationRequstDto"
)
JyjcOpeningApplicationRequstDto
jyjcOpeningApplicationRequstDto
,
@Param
(
"applyStartTime"
)
String
applyStartTime
,
@Param
(
"applyendTime"
)
String
applyendTime
);
@Param
(
"jyjcOpeningApplicationRequstDto"
)
JyjcOpeningApplicationRequstDto
jyjcOpeningApplicationRequstDto
,
@Param
(
"applyStartTime"
)
String
applyStartTime
,
@Param
(
"currentUserId"
)
String
currentUserId
,
@Param
(
"applyendTime"
)
String
applyendTime
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionApplicationModel.java
View file @
0a1ed137
...
@@ -157,11 +157,11 @@ public class JyjcInspectionApplicationModel extends BaseModel {
...
@@ -157,11 +157,11 @@ public class JyjcInspectionApplicationModel extends BaseModel {
private
String
instanceId
;
private
String
instanceId
;
public
String
getInstanceId
()
{
public
String
get
Process
InstanceId
()
{
return
this
.
processInstanceId
;
return
this
.
instanceId
!=
null
?
this
.
instanceId
:
this
.
processInstanceId
;
}
}
public
void
set
InstanceId
(
String
i
nstanceId
)
{
public
void
set
ProcessInstanceId
(
String
processI
nstanceId
)
{
this
.
instanceId
=
this
.
processInstanceId
;
this
.
processInstanceId
=
processInstanceId
;
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcOpeningApplicationModel.java
View file @
0a1ed137
...
@@ -125,4 +125,7 @@ public class JyjcOpeningApplicationModel extends BaseModel {
...
@@ -125,4 +125,7 @@ public class JyjcOpeningApplicationModel extends BaseModel {
@ApiModelProperty
(
"是否监管"
)
@ApiModelProperty
(
"是否监管"
)
private
String
identityType
;
private
String
identityType
;
@ApiModelProperty
(
"转办人"
)
private
String
transferToUserIds
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/TaskMessageDto.java
View file @
0a1ed137
...
@@ -65,4 +65,5 @@ public class TaskMessageDto {
...
@@ -65,4 +65,5 @@ public class TaskMessageDto {
String
inspectionUnitCode
;
String
inspectionUnitCode
;
String
bizType
;
String
bizType
;
String
nextTaskId
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcBaseMapper.xml
View file @
0a1ed137
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper"
>
<update
id=
"updateBusinessData"
>
update ${tableName}
set transfer_to_user_ids = #{transferToUserIds},
next_execute_user_ids = #{assignee},
next_task_id = #{nextTaskId}
where ${key} = #{instanceId}
</update>
<select
id=
"selectBaseUnitLicenceList"
parameterType=
"map"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto"
>
<select
id=
"selectBaseUnitLicenceList"
parameterType=
"map"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto"
>
select * from tz_base_unit_licence
select * from tz_base_unit_licence
...
@@ -24,4 +31,11 @@
...
@@ -24,4 +31,11 @@
</select>
</select>
<select
id=
"selectBusinessData"
resultType=
"java.lang.String"
>
select transfer_to_user_ids
from ${tableName}
where ${key} = #{instanceId}
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionApplicationMapper.xml
View file @
0a1ed137
...
@@ -136,6 +136,8 @@
...
@@ -136,6 +136,8 @@
1=2
1=2
</otherwise>
</otherwise>
</choose>
</choose>
OR (tzjia.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) )
</where>
</where>
order by tzjia.application_no desc
order by tzjia.application_no desc
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
0a1ed137
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
<if
test=
"jyjcOpeningApplicationRequstDto.unitCode != '' and jyjcOpeningApplicationRequstDto.unitCode != null"
>
<if
test=
"jyjcOpeningApplicationRequstDto.unitCode != '' and jyjcOpeningApplicationRequstDto.unitCode != null"
>
and a.unit_code = #{jyjcOpeningApplicationRequstDto.unitCode}
and a.unit_code = #{jyjcOpeningApplicationRequstDto.unitCode}
</if>
</if>
OR (a.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) )
</where>
</where>
order by sequence_nbr desc
order by sequence_nbr desc
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/CommonController.java
View file @
0a1ed137
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.TaskModelServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.EquipRegularlyRemindServicelmpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.EquipRegularlyRemindServicelmpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
...
@@ -35,6 +36,8 @@ public class CommonController extends BaseController {
...
@@ -35,6 +36,8 @@ public class CommonController extends BaseController {
@Autowired
@Autowired
CommonserviceImpl
commonserviceImpl
;
CommonserviceImpl
commonserviceImpl
;
@Autowired
@Autowired
TaskModelServiceImpl
taskModelService
;
@Autowired
EquipRegularlyRemindServicelmpl
equipRegularlyRemindServicelmpl
;
EquipRegularlyRemindServicelmpl
equipRegularlyRemindServicelmpl
;
/**
/**
...
@@ -49,6 +52,13 @@ public class CommonController extends BaseController {
...
@@ -49,6 +52,13 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
commonserviceImpl
.
getUserInfosByUnitCode
(
unitCode
));
return
ResponseHelper
.
buildResponse
(
commonserviceImpl
.
getUserInfosByUnitCode
(
unitCode
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getBizUserInfosByUnitCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验业务办理人员列表"
,
notes
=
"根据公司的unitCode获取检测检验人员列表"
)
public
ResponseModel
<
List
<
TzsUserInfo
>>
getBizUserInfosByUnitCode
(
@RequestParam
String
unitCode
)
{
return
ResponseHelper
.
buildResponse
(
commonserviceImpl
.
getBizUserInfosByUnitCode
(
unitCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getUserPhonesByPersonCode"
)
@PostMapping
(
value
=
"/getUserPhonesByPersonCode"
)
...
@@ -120,4 +130,30 @@ public class CommonController extends BaseController {
...
@@ -120,4 +130,30 @@ public class CommonController extends BaseController {
}
}
/**
* 公共转办接口
* /common/transfer
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/bj/transfer"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"公共转办接口"
,
notes
=
"公共转办接口"
)
public
ResponseModel
<
Object
>
transferBJ
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
map
.
put
(
"key"
,
"instance_id"
);
Object
result
=
taskModelService
.
transfer
(
map
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 公共转办接口
* /common/transfer
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/kt/transfer"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"公共转办接口"
,
notes
=
"公共转办接口"
)
public
ResponseModel
<
Object
>
transferKT
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
map
.
put
(
"key"
,
"workflow_prostance_id"
);
Object
result
=
taskModelService
.
transfer
(
map
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/ICmWorkflowService.java
View file @
0a1ed137
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.FlowTaskVo
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
...
@@ -14,5 +15,10 @@ public interface ICmWorkflowService {
...
@@ -14,5 +15,10 @@ public interface ICmWorkflowService {
ProcessTaskDTO
complete
(
String
taskId
,
TaskResultDTO
data
);
ProcessTaskDTO
complete
(
String
taskId
,
TaskResultDTO
data
);
ProcessTaskDTO
reject
(
String
taskId
,
TaskResultDTO
data
);
ProcessTaskDTO
rollBack
(
String
processInstanceId
);
ProcessTaskDTO
rollBack
(
String
processInstanceId
);
ProcessTaskDTO
assign
(
FlowTaskVo
taskVo
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/TaskModelServiceImpl.java
View file @
0a1ed137
...
@@ -10,14 +10,17 @@ import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
...
@@ -10,14 +10,17 @@ import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CmWorkflowServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.FlowTaskVo
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -27,6 +30,7 @@ import org.springframework.stereotype.Service;
...
@@ -27,6 +30,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
...
@@ -47,6 +51,12 @@ public class TaskModelServiceImpl {
...
@@ -47,6 +51,12 @@ public class TaskModelServiceImpl {
@Value
(
"classpath:/json/bizTypeInfo.json"
)
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
Resource
urlInfo
;
private
Resource
urlInfo
;
@Autowired
CmWorkflowServiceImpl
cmWorkflowService
;
@Autowired
JyjcBaseMapper
jyjcBaseMapper
;
public
void
deleteTaskModel
(
String
id
)
{
public
void
deleteTaskModel
(
String
id
)
{
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
id
).
getResult
();
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
id
).
getResult
();
...
@@ -448,4 +458,59 @@ public class TaskModelServiceImpl {
...
@@ -448,4 +458,59 @@ public class TaskModelServiceImpl {
});
});
return
workflowResultDtoList
;
return
workflowResultDtoList
;
}
}
public
Object
transfer
(
Map
<
String
,
Object
>
map
)
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"nextTaskId"
))
||
map
.
get
(
"nextTaskId"
)
==
null
)
{
throw
new
BadRequest
(
"nextTaskId不能为空"
);
}
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
))
||
map
.
get
(
"instanceId"
)
==
null
)
{
throw
new
BadRequest
(
"instanceId不能为空"
);
}
String
taskId
=
map
.
get
(
"nextTaskId"
).
toString
();
String
instanceId
=
map
.
get
(
"instanceId"
).
toString
();
String
tableName
=
map
.
get
(
"tableName"
).
toString
();
String
assignee
=
map
.
get
(
"assignee"
).
toString
();
FlowTaskVo
flowTaskVo
=
new
FlowTaskVo
();
flowTaskVo
.
setTaskId
(
taskId
);
flowTaskVo
.
setAssignee
(
assignee
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
assign
(
flowTaskVo
);
//修改待办
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
instanceId
).
getResult
();
List
<
TaskV2Model
>
collect
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
if
(
collect
==
null
||
collect
.
size
()
==
0
)
{
return
null
;
}
TaskV2Model
taskV2Model
=
collect
.
get
(
0
);
taskV2Model
.
setExecuteUserIds
(
RequestContext
.
getExeUserId
());
taskV2Model
.
setTaskStatus
(
FlowStatusEnum
.
TO_BE_TRANSFER
.
getCode
());
taskV2Model
.
setTaskStatusLabel
(
FlowStatusEnum
.
TO_BE_TRANSFER
.
getName
());
taskV2Model
.
setEndUserId
(
RequestContext
.
getExeUserId
());
taskV2Model
.
setEndDate
(
new
Date
());
String
routhPath
=
taskV2Model
.
getRoutePath
().
replace
(
"nextExecuteUserIds"
,
"executeUserId"
)
+
"&nextExecuteUserIds="
+
assignee
;
taskV2Model
.
setRoutePath
(
routhPath
);
Systemctl
.
taskV2Client
.
update
(
taskV2Model
,
taskV2Model
.
getSequenceNbr
());
//创建新待办
taskV2Model
.
setExecuteUserIds
(
assignee
);
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
taskV2Model
.
setFlowCode
(
nextTaskId
);
String
routhPath1
=
routhPath
.
replace
(
"nextTaskId"
,
"nextTask"
)
+
"&nextTaskId="
+
nextTaskId
;
taskV2Model
.
setCreateDate
(
new
Date
());
taskV2Model
.
setRoutePath
(
routhPath1
);
taskV2Model
.
setTaskStatus
(
0
);
taskV2Model
.
setTaskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskV2Model
.
setEndUserId
(
null
);
taskV2Model
.
setEndDate
(
null
);
taskV2Model
.
setSequenceNbr
(
null
);
Systemctl
.
taskV2Client
.
create
(
taskV2Model
);
String
key
=
map
.
get
(
"key"
).
toString
();
String
id
=
jyjcBaseMapper
.
selectBusinessData
(
tableName
,
instanceId
,
key
);
id
=
ObjectUtils
.
isEmpty
(
id
)
?
assignee
:
id
+
","
+
assignee
;
//修改业务数据
jyjcBaseMapper
.
updateBusinessData
(
tableName
,
assignee
,
id
,
instanceId
,
nextTaskId
,
key
);
return
Boolean
.
TRUE
;
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CmWorkflowServiceImpl.java
View file @
0a1ed137
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException;
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.FlowTaskVo
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -62,8 +63,45 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
...
@@ -62,8 +63,45 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
}
}
@Override
@Override
public
ProcessTaskDTO
reject
(
String
taskId
,
TaskResultDTO
data
)
{
ProcessTaskDTO
processTaskDTO
;
try
{
log
.
info
(
"开始请求工作流完成任务接口:/complete/standard/{taskId},请求参数:{},{}"
,
taskId
,
JSONObject
.
toJSONString
(
data
));
processTaskDTO
=
Workflow
.
taskV2Client
.
reject
(
taskId
,
data
).
getResult
();
}
catch
(
InnerInvokException
e
)
{
//拦截无审核人异常信息
String
devMessage
=
e
.
getDevMessage
();
devMessage
=
devMessage
.
contains
(
";"
)
?
devMessage
.
split
(
";"
)[
0
]
:
devMessage
;
log
.
error
(
devMessage
);
throw
new
LocalBadRequest
(
devMessage
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流完成任务接口失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流完成任务接口失败"
);
}
return
processTaskDTO
;
}
@Override
public
ProcessTaskDTO
rollBack
(
String
processInstanceId
)
{
public
ProcessTaskDTO
rollBack
(
String
processInstanceId
)
{
log
.
info
(
"开始请求工作流撤回接口:/rollBack/standard/{processInstanceId},请求参数:{}"
,
processInstanceId
);
log
.
info
(
"开始请求工作流撤回接口:/rollBack/standard/{processInstanceId},请求参数:{}"
,
processInstanceId
);
return
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
rollBackTask
(
processInstanceId
));
return
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
rollBackTask
(
processInstanceId
));
}
}
@Override
public
ProcessTaskDTO
assign
(
FlowTaskVo
taskVo
)
{
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
try
{
log
.
info
(
"开始请求工作流转办任务接口:/assign/{taskVo},请求参数:{},{}"
,
taskVo
);
processTaskDTO
=
Workflow
.
taskV2Client
.
assign
(
taskVo
).
getResult
();
}
catch
(
InnerInvokException
e
)
{
//拦截无审核人异常信息
String
devMessage
=
e
.
getDevMessage
();
devMessage
=
devMessage
.
contains
(
";"
)
?
devMessage
.
split
(
";"
)[
0
]
:
devMessage
;
log
.
error
(
devMessage
);
throw
new
LocalBadRequest
(
devMessage
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流转办任务接口失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流转办任务接口失败"
);
}
return
processTaskDTO
;
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
View file @
0a1ed137
...
@@ -16,11 +16,15 @@ import com.yeejoin.amos.feign.privilege.Privilege;
...
@@ -16,11 +16,15 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.FlowTaskVo
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Modifier
;
import
java.lang.reflect.Modifier
;
...
@@ -35,6 +39,9 @@ public class CommonserviceImpl {
...
@@ -35,6 +39,9 @@ public class CommonserviceImpl {
@Value
(
"${jyjc.user-post:6615}"
)
@Value
(
"${jyjc.user-post:6615}"
)
private
String
jyjcUserPost
;
private
String
jyjcUserPost
;
@Value
(
"${jyjc.user-post:6616}"
)
private
String
jyjcBizUserPost
;
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Autowired
@Autowired
...
@@ -65,6 +72,16 @@ public class CommonserviceImpl {
...
@@ -65,6 +72,16 @@ public class CommonserviceImpl {
return
userInfos
;
return
userInfos
;
}
}
public
List
<
TzsUserInfo
>
getBizUserInfosByUnitCode
(
String
unitCode
)
{
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"unit_code"
,
unitCode
);
userInfoQueryWrapper
.
like
(
"post"
,
jyjcBizUserPost
);
userInfoQueryWrapper
.
isNotNull
(
"amos_user_id"
);
userInfoQueryWrapper
.
eq
(
"is_delete"
,
false
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
return
userInfos
;
}
public
List
<
TzsUserInfo
>
getUserPhonesByPersonCode
(
String
personCode
)
{
public
List
<
TzsUserInfo
>
getUserPhonesByPersonCode
(
String
personCode
)
{
List
<
String
>
ids
=
StrUtil
.
split
(
personCode
,
","
);
List
<
String
>
ids
=
StrUtil
.
split
(
personCode
,
","
);
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
0a1ed137
...
@@ -153,6 +153,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -153,6 +153,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
String
nextExcuteIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorRoleIds
();
String
nextExcuteIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorRoleIds
();
model
.
setProcessInstanceId
(
instanceId
);
model
.
setProcessInstanceId
(
instanceId
);
model
.
setInstanceId
(
instanceId
);
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
model
.
getWorkflowRole
()))
{
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
model
.
getWorkflowRole
()))
{
model
.
setWorkflowRole
(
model
.
getWorkflowRole
()
+
","
+
nextExcuteIds
);
model
.
setWorkflowRole
(
model
.
getWorkflowRole
()
+
","
+
nextExcuteIds
);
}
else
{
}
else
{
...
@@ -218,6 +219,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -218,6 +219,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
ta
.
setProcessInstanceId
(
model
.
getProcessInstanceId
());
ta
.
setProcessInstanceId
(
model
.
getProcessInstanceId
());
ta
.
setProcessKey
(
model
.
getProcessKey
());
ta
.
setProcessKey
(
model
.
getProcessKey
());
ta
.
setCreateUserId
(
RequestContext
.
getExeUserId
());
ta
.
setCreateUserId
(
RequestContext
.
getExeUserId
());
ta
.
setNextTaskId
(
model
.
getNextTaskId
());
dto
.
setModel
(
ta
);
dto
.
setModel
(
ta
);
//摘要 按原有规则组装
//摘要 按原有规则组装
dto
.
setTaskContent
(
"来自"
+
model
.
getEquList
()+
"【"
+
model
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
model
.
getApplicationNo
()+
"】"
);
dto
.
setTaskContent
(
"来自"
+
model
.
getEquList
()+
"【"
+
model
.
getSupervisoryCode
()+
"】的业务办理,【申请单号:"
+
model
.
getApplicationNo
()+
"】"
);
...
@@ -421,6 +423,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -421,6 +423,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
companyType
=
reginParams
.
getCompany
().
getCompanyType
();
String
companyType
=
reginParams
.
getCompany
().
getCompanyType
();
String
companyCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
companyCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
String
currentApplicationUnitCode
=
null
;
String
currentApplicationUnitCode
=
null
;
String
currentInspectionUnitCode
=
null
;
String
currentInspectionUnitCode
=
null
;
if
(
ValidationUtil
.
isEmpty
(
companyType
)){
if
(
ValidationUtil
.
isEmpty
(
companyType
)){
...
@@ -438,7 +441,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -438,7 +441,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
currentApplicationUnitCode
=
companyCode
;
currentApplicationUnitCode
=
companyCode
;
currentInspectionUnitCode
=
companyCode
;
currentInspectionUnitCode
=
companyCode
;
}
}
Page
<
JyjcInspectionApplicationModel
>
resultPage
=
this
.
getBaseMapper
().
selectForPage
(
page
,
model
,
identity
,
currentApplicationUnitCode
,
currentInspectionUnitCode
);
Page
<
JyjcInspectionApplicationModel
>
resultPage
=
this
.
getBaseMapper
().
selectForPage
(
page
,
model
,
identity
,
currentApplicationUnitCode
,
currentInspectionUnitCode
,
currentUserId
);
return
resultPage
;
return
resultPage
;
}
}
...
@@ -657,7 +660,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -657,7 +660,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
task
.
setVariable
(
map
);
task
.
setVariable
(
map
);
//执行流程
//执行流程
task
.
setNextExecuteUserCompanyCode
(
entity
.
getInspectionUnitCode
());
task
.
setNextExecuteUserCompanyCode
(
entity
.
getInspectionUnitCode
());
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
task
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
reject
(
taskId
,
task
);
String
taskCode
=
FlowStatusEnum
.
TO_SUBMITTED
.
getName
();
String
taskCode
=
FlowStatusEnum
.
TO_SUBMITTED
.
getName
();
String
taskName1
=
""
;
String
taskName1
=
""
;
String
nextTaskId
=
""
;
String
nextTaskId
=
""
;
...
@@ -854,6 +857,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -854,6 +857,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
ta
.
setProcessInstanceId
(
model
.
getProcessInstanceId
());
ta
.
setProcessInstanceId
(
model
.
getProcessInstanceId
());
ta
.
setProcessKey
(
model
.
getProcessKey
());
ta
.
setProcessKey
(
model
.
getProcessKey
());
ta
.
setInspectionUnitCode
(
model
.
getInspectionUnitCode
());
ta
.
setInspectionUnitCode
(
model
.
getInspectionUnitCode
());
ta
.
setNextTaskId
(
model
.
getNextTaskId
());
ta
.
setBizType
(
model
.
getBizType
());
ta
.
setBizType
(
model
.
getBizType
());
dto
.
setModel
(
ta
);
dto
.
setModel
(
ta
);
dto
.
setFlowCreateDate
(
new
Date
());
dto
.
setFlowCreateDate
(
new
Date
());
...
@@ -905,6 +909,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -905,6 +909,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
TaskMessageDto
obj
=
new
TaskMessageDto
();
TaskMessageDto
obj
=
new
TaskMessageDto
();
obj
.
setInstanceId
(
model
.
getProcessInstanceId
());
obj
.
setInstanceId
(
model
.
getProcessInstanceId
());
obj
.
setStatus
(
model
.
getStatus
());
obj
.
setStatus
(
model
.
getStatus
());
obj
.
setNextTaskId
(
model
.
getNextTaskId
());
obj
.
setPromoter
(
model
.
getPromoter
());
obj
.
setPromoter
(
model
.
getPromoter
());
obj
.
setNextExecuteUserIds
(
model
.
getNextExecuteUserIds
());
obj
.
setNextExecuteUserIds
(
model
.
getNextExecuteUserIds
());
obj
.
setSequenceNbr
(
model
.
getSequenceNbr
());
obj
.
setSequenceNbr
(
model
.
getSequenceNbr
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
0a1ed137
...
@@ -339,6 +339,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -339,6 +339,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
public
Page
<
JyjcOpeningApplicationModel
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationRequstDto
dto
)
{
public
Page
<
JyjcOpeningApplicationModel
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationRequstDto
dto
)
{
ReginParams
reginParams
=
commonserviceImpl
.
getReginParamsOfCurrentUser
();
ReginParams
reginParams
=
commonserviceImpl
.
getReginParamsOfCurrentUser
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
String
level
=
reginParams
.
getCompany
().
getLevel
();
String
level
=
reginParams
.
getCompany
().
getLevel
();
if
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
level
))
{
if
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
level
))
{
dto
.
setType
(
"enterprise"
);
dto
.
setType
(
"enterprise"
);
...
@@ -353,7 +354,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -353,7 +354,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime
=
date
+
" 00:00:00"
;
applyStartTime
=
date
+
" 00:00:00"
;
applyEndTime
=
date
+
" 23:59:59"
;
applyEndTime
=
date
+
" 23:59:59"
;
}
}
Page
<
JyjcOpeningApplicationModel
>
result
=
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
dto
,
applyStartTime
,
applyEndTime
);
Page
<
JyjcOpeningApplicationModel
>
result
=
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
dto
,
applyStartTime
,
currentUserId
,
applyEndTime
);
for
(
JyjcOpeningApplicationModel
record
:
result
.
getRecords
())
{
for
(
JyjcOpeningApplicationModel
record
:
result
.
getRecords
())
{
record
.
setIdentityType
(
dto
.
getType
());
record
.
setIdentityType
(
dto
.
getType
());
}
}
...
@@ -539,7 +540,14 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -539,7 +540,14 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
map
.
put
(
"approvalStatus"
,
"提交"
);
map
.
put
(
"approvalStatus"
,
"提交"
);
}
}
dto
.
setVariable
(
map
);
dto
.
setVariable
(
map
);
ProcessTaskDTO
complete
=
cmWorkflowService
.
complete
(
data
.
getNextTaskId
(),
dto
);
ProcessTaskDTO
complete
=
new
ProcessTaskDTO
();
if
(
"0"
.
equals
(
op
)){
complete
=
cmWorkflowService
.
complete
(
data
.
getNextTaskId
(),
dto
);
}
else
{
complete
=
cmWorkflowService
.
reject
(
data
.
getNextTaskId
(),
dto
);
}
ArrayList
<
ProcessTaskDTO
>
processTaskDTOS
=
new
ArrayList
<>();
ArrayList
<
ProcessTaskDTO
>
processTaskDTOS
=
new
ArrayList
<>();
processTaskDTOS
.
add
(
complete
);
processTaskDTOS
.
add
(
complete
);
List
<
WorkflowResultDto
>
resultDto
=
commonServiceImpl
.
buildWorkFlowInfo
(
processTaskDTOS
);
List
<
WorkflowResultDto
>
resultDto
=
commonServiceImpl
.
buildWorkFlowInfo
(
processTaskDTOS
);
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/config/PersonIdentifyTzsAspect.java
View file @
0a1ed137
//package com.yeejoin.amos.patrol.config;
package
com
.
yeejoin
.
amos
.
patrol
.
config
;
//
//
//import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSON
;
//import com.alibaba.fastjson.JSONObject;
import
com.alibaba.fastjson.JSONObject
;
//import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
//import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
//import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
//import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
//import com.yeejoin.amos.patrol.business.feign.JcsFeignClient;
import
com.yeejoin.amos.patrol.exception.PermissionException
;
//import com.yeejoin.amos.patrol.exception.PermissionException;
import
org.apache.commons.lang3.StringUtils
;
//import org.apache.commons.lang3.StringUtils;
import
org.aspectj.lang.JoinPoint
;
//import org.aspectj.lang.JoinPoint;
import
org.aspectj.lang.annotation.Aspect
;
//import org.aspectj.lang.annotation.Aspect;
import
org.aspectj.lang.annotation.Before
;
//import org.aspectj.lang.annotation.Before;
import
org.aspectj.lang.annotation.Pointcut
;
//import org.aspectj.lang.annotation.Pointcut;
import
org.springframework.beans.factory.annotation.Autowired
;
//import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
//import org.springframework.beans.factory.annotation.Value;
import
org.springframework.core.annotation.Order
;
//import org.springframework.core.annotation.Order;
import
org.springframework.stereotype.Component
;
//import org.springframework.http.HttpStatus;
import
org.springframework.web.bind.annotation.ResponseBody
;
//import org.springframework.stereotype.Component;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
//import org.springframework.util.ObjectUtils;
//import org.springframework.web.bind.annotation.ResponseBody;
/**
//import org.typroject.tyboot.core.foundation.context.RequestContext;
* @author DELL
//
*/
///**
@Aspect
// * @author DELL
@Component
// */
@ResponseBody
//@Aspect
@Order
(
value
=
1
)
//@Component
public
class
PersonIdentifyTzsAspect
{
//@ResponseBody
//@Order(value = 1)
@Autowired
//public class PersonIdentifyTzsAspect {
RedisUtils
redisUtils
;
//
@Autowired
// @Autowired
private
JcsFeignClient
jcsFeignClient
;
// RedisUtils redisUtils;
// @Autowired
@Value
(
"${logic}"
)
// private JcsFeignClient jcsFeignClient;
Boolean
logic
;
//
// @Value("${logic}")
@Pointcut
(
"execution(public * com.yeejoin.amos.*.business.controller..*(..))"
)
// Boolean logic;
public
void
userDate
()
{
//
// @Pointcut("execution(public * com.yeejoin.amos.*.business.controller..*(..))")
}
// public void userDate() {
//
@Before
(
"userDate()"
)
public
void
personIdentity
(
JoinPoint
joinPoint
)
throws
PermissionException
{
//定时任务没有token
if
(
RequestContext
.
getExeUserId
()==
null
||
RequestContext
.
getToken
()==
null
){
}
else
{
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
reginParam
!=
null
)
{
if
(
reginParam
.
getPersonIdentity
()
==
null
||
StringUtils
.
isEmpty
(
reginParam
.
getPersonIdentity
().
getBizOrgCode
())
)
{
String
userId
=
reginParam
.
getUserModel
().
getUserId
();
if
(
userId
!=
null
)
{
// FeignClientResult responseModel = jcsFeignClient.selectById(userId);
//
//
// if (ObjectUtils.isEmpty(responseModel.getResult()) || responseModel.getStatus() != HttpStatus.OK.value()) {
// throw new RuntimeException(responseModel.getDevMessage());
// }
// }
//
// String s = JSONObject.toJSONString(responseModel.getResult());
//
// ReginParams.PersonIdentity personIdentity = JSONObject.parseObject(s, ReginParams.PersonIdentity.class);
// @Before("userDate()")
ReginParams
.
PersonIdentity
personIdentity
=
new
ReginParams
.
PersonIdentity
();
// public void personIdentity(JoinPoint joinPoint) throws PermissionException {
// ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class);
//
//电力默认走公司权限
//
// if (!logic) {
// //定时任务没有token
personIdentity
.
setBizOrgCode
(
StringUtils
.
isEmpty
(
reginParam
.
getCompany
().
getOrgCode
())
?
"-1"
:
reginParam
.
getCompany
().
getOrgCode
());
// if(RequestContext.getExeUserId()==null|| RequestContext.getToken()==null){
// }
//
// }else {
reginParam
.
setPersonIdentity
(
personIdentity
);
// ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
redisUtils
.
set
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()),
JSONObject
.
toJSONString
(
reginParam
));
// if (reginParam != null ) {
// if (reginParam.getPersonIdentity() == null || StringUtils.isEmpty(reginParam.getPersonIdentity().getBizOrgCode()) ) {
}
// String userId = reginParam.getUserModel().getUserId();
}
//
}
// if (userId != null) {
}
//// FeignClientResult responseModel = jcsFeignClient.selectById(userId);
}
////
////
}
//// if (ObjectUtils.isEmpty(responseModel.getResult()) || responseModel.getStatus() != HttpStatus.OK.value()) {
//// throw new RuntimeException(responseModel.getDevMessage());
//// }
//// String s = JSONObject.toJSONString(responseModel.getResult());
//// ReginParams.PersonIdentity personIdentity = JSONObject.parseObject(s, ReginParams.PersonIdentity.class);
// ReginParams.PersonIdentity personIdentity = new ReginParams.PersonIdentity();
// // ReginParams.PersonIdentity personIdentity = (ReginParams.PersonIdentity) Bean.mapToBean((Map<String, Object>) responseModel.getResult(), ReginParams.PersonIdentity.class);
// //电力默认走公司权限
// if (!logic) {
// personIdentity.setBizOrgCode(StringUtils.isEmpty(reginParam.getCompany().getOrgCode()) ? "-1" : reginParam.getCompany().getOrgCode());
// }
//
// reginParam.setPersonIdentity(personIdentity);
// redisUtils.set(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()), JSONObject.toJSONString(reginParam));
//
// }
// }
// }
// }
// }
//
//}
//
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/GenerateCodeServiceImpl.java
View file @
0a1ed137
...
@@ -165,7 +165,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
...
@@ -165,7 +165,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
* @param batchSize 批量生成个数
* @param batchSize 批量生成个数
* @return List
* @return List
*/
*/
public
List
<
String
>
generateBatchSequence
(
String
sequenceKey
,
int
batchSize
)
{
public
synchronized
List
<
String
>
generateBatchSequence
(
String
sequenceKey
,
int
batchSize
)
{
// 使用分布式锁,确保在并发情况下只有一个线程能够生成顺序码
// 使用分布式锁,确保在并发情况下只有一个线程能够生成顺序码
Boolean
lockAcquired
=
obtainLock
(
LOCK_KEY_AF
);
Boolean
lockAcquired
=
obtainLock
(
LOCK_KEY_AF
);
if
(
Boolean
.
TRUE
.
equals
(
lockAcquired
))
{
if
(
Boolean
.
TRUE
.
equals
(
lockAcquired
))
{
...
...
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