Commit f8e42573 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 44c4a072 d1273014
...@@ -23,7 +23,7 @@ public class BaseEnterpriseCert extends BaseEntity { ...@@ -23,7 +23,7 @@ public class BaseEnterpriseCert extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 单位编码 * 单位编码-不带证件类型的,来源tz_base_enterprise_info的use_unit_code
*/ */
@TableField("unit_code") @TableField("unit_code")
private String unitCode; private String unitCode;
......
...@@ -6,10 +6,9 @@ ...@@ -6,10 +6,9 @@
<select id="selectJyjcOpeningApplicationList" <select id="selectJyjcOpeningApplicationList"
resultType="com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel"> resultType="com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel">
select select
a.*,cdd2.NAME as status_name a.*
from from
tz_jyjc_opening_application a tz_jyjc_opening_application a
LEFT JOIN cb_data_dictionary cdd2 ON cdd2.code = a.status and cdd2.type = 'JYLCSQ'
<where> <where>
<if test="jyjcOpeningApplicationRequstDto.applicationSeq != '' and jyjcOpeningApplicationRequstDto.applicationSeq != null"> <if test="jyjcOpeningApplicationRequstDto.applicationSeq != '' and jyjcOpeningApplicationRequstDto.applicationSeq != null">
and a.application_seq like concat('%',#{jyjcOpeningApplicationRequstDto.applicationSeq},'%') and a.application_seq like concat('%',#{jyjcOpeningApplicationRequstDto.applicationSeq},'%')
...@@ -27,7 +26,7 @@ ...@@ -27,7 +26,7 @@
and a.apply_time &gt;=#{applyStartTime} and a.apply_time &gt;=#{applyStartTime}
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.type == 'supervision'"> <if test="jyjcOpeningApplicationRequstDto.type == 'supervision'">
and (a.status not in ('6610') OR a.transfer_to_user_ids LIKE concat ('%', #{currentUserId}, '%' )) and (workflow_prostance_id <![CDATA[<>]]> OR a.transfer_to_user_ids LIKE concat ('%', #{currentUserId}, '%' ))
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.unitCode != '' and jyjcOpeningApplicationRequstDto.unitCode != null"> <if test="jyjcOpeningApplicationRequstDto.unitCode != '' and jyjcOpeningApplicationRequstDto.unitCode != null">
and (a.unit_code = #{jyjcOpeningApplicationRequstDto.unitCode} OR a.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) ) and (a.unit_code = #{jyjcOpeningApplicationRequstDto.unitCode} OR a.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) )
......
...@@ -61,8 +61,9 @@ public class InspectionExpireRemindJob { ...@@ -61,8 +61,9 @@ public class InspectionExpireRemindJob {
this.jyjcBaseMapper = jyjcBaseMapper; this.jyjcBaseMapper = jyjcBaseMapper;
} }
@Scheduled(cron = "${inspection.expire.remind.job.cron:0 0 8 * * ?}") // @Scheduled(cron = "${inspection.expire.remind.job.cron:0 0 8 * * ?}")
@SchedulerLock(name = "sendReminderMessage", lockAtMostFor = "PT1H") // @SchedulerLock(name = "sendReminderMessage", lockAtMostFor = "PT1H")
// 页面意见没用暂时注释掉
public void sendReminderMessage() { public void sendReminderMessage() {
// 1.查询临期和超期的设备 // 1.查询临期和超期的设备
List<NeedTipEquipInfo> needTipEquipList = getNeedTipEquipList(); List<NeedTipEquipInfo> needTipEquipList = getNeedTipEquipList();
......
...@@ -151,7 +151,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -151,7 +151,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private SnowflakeIdUtil sequence; private SnowflakeIdUtil sequence;
@Value("${open.app.msg.detail.path:/mixuap?appId=1742358052905971713&id=1947557820039720961&lfrom=studio}") @Value("${open.app.msg.detail.path:/hyspm.html?appId=1742358052905971713&id=1947557820039720961&lfrom=studio}")
private String msgDetailPath; private String msgDetailPath;
@Autowired @Autowired
...@@ -371,11 +371,11 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -371,11 +371,11 @@ 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 = commonService.getReginParamsOfCurrentUser(); ReginParams reginParams = commonService.getReginParamsOfCurrentUser();
String currentUserId = reginParams.getUserModel().getUserId(); String currentUserId = RequestContext.getExeUserId();
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");
dto.setUnitCode(reginParams.getCompany().getCompanyCode()); dto.setUnitCode(getUnitCode(reginParams.getCompany()));
} else { } else {
dto.setType("supervision"); dto.setType("supervision");
} }
...@@ -396,8 +396,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -396,8 +396,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private String getOpenBizTypeName(String openBizType) { private String getOpenBizTypeName(String openBizType) {
return Optional.ofNullable(OpenBizTypeEnum.getOneByCode(openBizType)) return Optional.ofNullable(OpenBizTypeEnumV2.getOneByCode(openBizType))
.map(OpenBizTypeEnum::getName) .map(OpenBizTypeEnumV2::getDescription)
.orElse(""); .orElse("");
} }
...@@ -412,6 +412,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -412,6 +412,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
public JyjcOpeningApplicationModel queryDetail(Long sequenceNbr, CompanyBo company) { public JyjcOpeningApplicationModel queryDetail(Long sequenceNbr, CompanyBo company) {
// 公司类型前端区分监管还是企业端 // 公司类型前端区分监管还是企业端
String companyLevel = CommonServiceImpl.getCompanyLevel(company); String companyLevel = CommonServiceImpl.getCompanyLevel(company);
// todo 不带证件类型的单位编码
String unitCode; String unitCode;
JyjcOpeningApplicationModel jyjcOpeningApplicationModel; JyjcOpeningApplicationModel jyjcOpeningApplicationModel;
if (null != sequenceNbr) { if (null != sequenceNbr) {
...@@ -449,6 +450,12 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -449,6 +450,12 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
return jyjcOpeningApplicationModel; return jyjcOpeningApplicationModel;
} }
/**
* 兼容个人类型6600_
*
* @param company 身份
* @return 不带证件类型的公司code
*/
private static String getUnitCode(CompanyBo company) { private static String getUnitCode(CompanyBo company) {
String unitCode; String unitCode;
unitCode = company.getCompanyCode(); unitCode = company.getCompanyCode();
...@@ -466,7 +473,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -466,7 +473,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private void setBaseEnterpriseInfo(String unitCode, JyjcOpeningApplicationModel jyjcOpeningApplicationModel) { private void setBaseEnterpriseInfo(String unitCode, JyjcOpeningApplicationModel jyjcOpeningApplicationModel) {
LambdaQueryWrapper<TzBaseEnterpriseInfo> enterpriseInfoQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TzBaseEnterpriseInfo> enterpriseInfoQueryWrapper = new LambdaQueryWrapper<>();
enterpriseInfoQueryWrapper.eq(TzBaseEnterpriseInfo::getUseCode, unitCode); // todo 注意useUnitCode不带证件类型, useCode带证件类型
enterpriseInfoQueryWrapper.eq(TzBaseEnterpriseInfo::getUseUnitCode, unitCode);
TzBaseEnterpriseInfo baseEnterpriseInfo = enterpriseInfoMapper.selectOne(enterpriseInfoQueryWrapper); TzBaseEnterpriseInfo baseEnterpriseInfo = enterpriseInfoMapper.selectOne(enterpriseInfoQueryWrapper);
// 获取企业资质 // 获取企业资质
if (baseEnterpriseInfo != null) { if (baseEnterpriseInfo != null) {
...@@ -765,7 +773,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -765,7 +773,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
private void sendMsg2User(JyjcOpeningApplication jyjcOpeningApplication) { private void sendMsg2User(JyjcOpeningApplication jyjcOpeningApplication) {
// 系统对接中时发送对接消息 // 系统对接中时发送对接消息
if(jyjcOpeningApplication.getStatus().equals(WorkFlowStatusEnum.OPENING_APPLICATION_PRELIMINARY.getPass())){ if (jyjcOpeningApplication.getStatus().equals(WorkFlowStatusEnum.OPENING_APPLICATION_PRELIMINARY.getPass())) {
String createUserId = jyjcOpeningApplication.getCreateUserId(); String createUserId = jyjcOpeningApplication.getCreateUserId();
String relationId = jyjcOpeningApplication.getSequenceNbr() + ""; String relationId = jyjcOpeningApplication.getSequenceNbr() + "";
String companyType = this.OpenBizType2CompanyType(jyjcOpeningApplication.getOpenBizType()); String companyType = this.OpenBizType2CompanyType(jyjcOpeningApplication.getOpenBizType());
...@@ -935,7 +943,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -935,7 +943,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
jsonObject.put("taskType", BusinessTypeEnum.JY_OPENING_APPLICATION.getCode()); jsonObject.put("taskType", BusinessTypeEnum.JY_OPENING_APPLICATION.getCode());
jsonObject.put("flowStatus", commonService.getDictionaryCodeByName(jyjcOpeningApplication.getStatus())); jsonObject.put("flowStatus", commonService.getDictionaryCodeByName(jyjcOpeningApplication.getStatus()));
jsonObject.put("flowStatusLabel", jyjcOpeningApplication.getStatus()); jsonObject.put("flowStatusLabel", jyjcOpeningApplication.getStatus());
this.deleteMsg(taskCode, jyjcOpeningApplication.getSequenceNbr()); this.deleteMsg(jyjcOpeningApplication.getStatus(), jyjcOpeningApplication.getSequenceNbr());
// 撤回删除代办 // 撤回删除代办
taskModelService.rollbackTask(jyjcOpeningApplication.getWorkflowProstanceId(), jsonObject); taskModelService.rollbackTask(jyjcOpeningApplication.getWorkflowProstanceId(), jsonObject);
// 更新数据 // 更新数据
...@@ -953,14 +961,14 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -953,14 +961,14 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
return null; return null;
} }
private void deleteMsg(String taskCode, Long sequenceNbr) { private void deleteMsg(String status, Long sequenceNbr) {
// 流程到发起单位时删除之前的消息 // 流程到<系统对接受理已退回, 资料校对受理已撤回>时删除之前的消息
if(WorkFlowStatusEnum.OPENING_APPLICATION_SUBMIT.getCode().equals(taskCode)){ if (WorkFlowStatusEnum.OPENING_APPLICATION_RECEIVE.getReject().equals(status) || WorkFlowStatusEnum.OPENING_APPLICATION_RECEIVE.getRollBack().equals(status)) {
// 按照relationId查询 // 按照relationId查询
List<MessageModel> messageModels = messageFeignClient.listByRelationId(sequenceNbr + "").getResult(); List<MessageModel> messageModels = messageFeignClient.listByRelationId(sequenceNbr + "").getResult();
// 查询结果删除接口 // 查询结果删除接口
if(!messageModels.isEmpty()){ if (!messageModels.isEmpty()) {
messageFeignClient.delete(messageModels.stream().map(e-> String.valueOf(e.getSequenceNbr())).collect(Collectors.joining(","))); messageFeignClient.delete(messageModels.stream().map(e -> String.valueOf(e.getSequenceNbr())).collect(Collectors.joining(",")));
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment