Commit 6f987740 authored by yangyang's avatar yangyang

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

# Conflicts: # 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
parents 1f0fd664 c04ef07c
......@@ -22,7 +22,7 @@ public class JgScrapCancelDto extends BaseDto {
@ApiModelProperty(value = "注销类型(1报废注销,2移装注销)")
private String type;
private String cancelType;
@ApiModelProperty(value = "申请编号")
private String applyNo;
......
......@@ -33,5 +33,10 @@ public class JgChangeRegistrationReformEq extends BaseEntity {
*/
@TableField("equ_id")
private String equId;
/**
* 使用登记证编号是否作废(1作废,0在用)
*/
@TableField("is_invalid")
private Boolean isInvalid =false;
}
......@@ -34,4 +34,11 @@ public class JgChangeRegistrationTransferEq extends BaseEntity {
@TableField("equ_id")
private String equId;
/**
* 使用登记证编号是否作废(1作废,0在用)
*/
@TableField("is_invalid")
private Boolean isInvalid =false;
}
......@@ -25,8 +25,8 @@ public class JgScrapCancel extends BaseEntity {
/**
* 注销类型(1报废注销,2移装注销)
*/
@TableField("type")
private String type;
@TableField("cancel_type")
private String cancelType;
/**
* 申请编号
......
......@@ -34,4 +34,10 @@ public class JgUseRegistrationEq extends BaseEntity {
@TableField("equ_id")
private String equId;
/**
* 使用登记证编号是否作废(1作废,0在用)
*/
@TableField("is_invalid")
private Boolean isInvalid =false;
}
package com.yeejoin.amos.boot.module.jg.api.enums;
/**
* 办理状态枚举
*/
public enum CancelTypeEnum {
/**
* 报废注销
*/
SCRAPPED("1", "报废注销"),
/**
* 移装注销
*/
TRANSFER("2", "移装注销");
private final String code;
private final String name;
CancelTypeEnum(String code, String name) {
this.code = code;
this.name = name;
}
public static String getNameByType(String code) {
String name = null;
for (CancelTypeEnum enumOne : CancelTypeEnum.values()) {
if (enumOne.getCode() == code) {
name = enumOne.getName();
break;
}
}
return name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}
......@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationReformEq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
/**
* 改造变更登记设备关系表 Mapper 接口
......@@ -10,5 +12,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2023-12-20
*/
public interface JgChangeRegistrationReformEqMapper extends BaseMapper<JgChangeRegistrationReformEq> {
@Update("update jg_change_registration_reform set is_invalid = 1 where equ_id = #{equipId} and equip_transfer_id = #{currentDocumentId} ")
void updateEquipIsVaildByEquipIdAndCurrentDocumentId(@Param("equipId") String equipId, @Param("currentDocumentId") String currentDocumentId);
}
......@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationReform;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.util.List;
import java.util.Map;
......
......@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
/**
* 移装变更登记设备关系表 Mapper 接口
......@@ -10,5 +12,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2023-12-20
*/
public interface JgChangeRegistrationTransferEqMapper extends BaseMapper<JgChangeRegistrationTransferEq> {
@Update("update tzs_jg_change_registration_transfer_eq set is_invalid = 1 where equ_id = #{equipId} and equip_transfer_id = #{currentDocumentId} ")
void updateEquipIsVaildByEquipIdAndCurrentDocumentId(@Param("equipId") String equipId,@Param("currentDocumentId") String currentDocumentId);
}
......@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
/**
* 使用登记设备关系表 Mapper 接口
......@@ -10,5 +12,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2023-12-18
*/
public interface JgUseRegistrationEqMapper extends BaseMapper<JgUseRegistrationEq> {
@Update("update tzs_jg_use_registration_eq set is_invalid = 1 where equ_id = #{equipId} and equip_transfer_id = #{currentDocumentId} ")
void updateEquipIsVaildByEquipIdAndCurrentDocumentId(@Param("equipId") String equipId, @Param("currentDocumentId") String currentDocumentId);
}
......@@ -10,11 +10,11 @@ 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.RedisUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationReform;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq;
import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationReformEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationReformMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationReformService;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto;
......@@ -60,6 +60,17 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
private OtherInfoMapper otherInfoMapper;
@Autowired
private JgChangeRegistrationReformMapper jgChangeRegistrationReformMapper;
//改造登记关系表mapper
@Autowired
private JgChangeRegistrationReformEqMapper jgChangeRegistrationReformEqMapper;
//移装登记关系表
@Autowired
private JgChangeRegistrationTransferEqMapper jgChangeRegistrationTransferEqMapper;
//使用登记关系表mapper
@Autowired
private JgUseRegistrationEqMapper jgUseRegistrationEqMapper;
@Autowired
WorkFlowFeignService workFlowFeginService;
@Autowired
......@@ -112,16 +123,16 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
} else {
// 业务管理设备信息保存
JgUseRegistrationEq jgRelationEquip = new JgUseRegistrationEq();
jgRelationEquip.setEquId(map.get("equipId").toString());
JgChangeRegistrationReformEq jgChangeRegistrationReformEq = new JgChangeRegistrationReformEq();
jgChangeRegistrationReformEq.setEquId(map.get("equipId").toString());
// jgRelationEquip.setBusinessType(String.valueOf(BusinessTypeEnum.USAGE_REGISTRATION.getCode()));
List<String> applicationFormCode = iCreateCodeService.createApplicationFormCode(ApplicationFormTypeEnum.SYDJ.getCode(), 1);
jgChangeRegistrationReform.setApplyNo(applicationFormCode.get(0));
jgChangeRegistrationReform.setAuditStatus("待提交");
jgChangeRegistrationReform.setStatus(UseStatusEnum.SUBMIT.getPass());
this.save(jgChangeRegistrationReform);
jgRelationEquip.setEquipTransferId(jgChangeRegistrationReform.getSequenceNbr().toString());
jgChangeRegistrationReformMapper.insert(jgChangeRegistrationReform);
jgChangeRegistrationReformEq.setEquipTransferId(jgChangeRegistrationReform.getSequenceNbr().toString());
jgChangeRegistrationReformEqMapper.insert(jgChangeRegistrationReformEq);
}
if (!ObjectUtils.isEmpty(map.get("submit"))) {
......@@ -212,8 +223,10 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
lambda.eq(JgChangeRegistrationReform::getSequenceNbr, id);
JgChangeRegistrationReform jgChangeRegistrationReform = this.getBaseMapper().selectOne(lambda);
if ("流程结束".equals(taskName)) {
JgChangeRegistrationReformEq jgChangeRegistrationReformEq = jgChangeRegistrationReformEqMapper.selectOne(new QueryWrapper<JgChangeRegistrationReformEq>().eq("equip_transfer_id",jgChangeRegistrationReform.getSequenceNbr()));
jgChangeRegistrationReform.setStatus(taskName);
jgChangeRegistrationReform.setAuditStatus("已完成");
makeEquipmentsInvalid(jgChangeRegistrationReformEq.getEquId(),jgChangeRegistrationReform.getSequenceNbr().toString());
} else {
jgChangeRegistrationReform.setNextExecuteIds(role);
jgChangeRegistrationReform.setPromoter(reginParams.getUserModel().getUserId());
......@@ -288,4 +301,16 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
detail.put("inspectReport", JSON.parse(String.valueOf(detail.get("inspectReport"))));
return detail;
}
/**
* 批量设置设备无效(使用登记、移装登记、改造登记)
* @param equipmentId 装备id
* @param currentDocumentId 当前文档id
*/
public void makeEquipmentsInvalid(String equipmentId,String currentDocumentId){
jgChangeRegistrationReformEqMapper.updateEquipIsVaildByEquipIdAndCurrentDocumentId(equipmentId,currentDocumentId);
jgChangeRegistrationTransferEqMapper.updateEquipIsVaildByEquipIdAndCurrentDocumentId(equipmentId,currentDocumentId);
jgUseRegistrationEqMapper.updateEquipIsVaildByEquipIdAndCurrentDocumentId(equipmentId,currentDocumentId);
}
}
\ No newline at end of file
......@@ -38,7 +38,7 @@
LEFT JOIN cb_data_dictionary cdd3 ON cdd3.code = tzjia.inspection_type
<where>
<if test=" applicationNo != null and applicationNo != ''">
and application_no like concat('%',#{applicationNo}.'%')
and application_no like concat('%',#{applicationNo},'%')
</if>
<if test="inspectionClassify != null and inspectionClassify != ''">
and inspection_classify = #{inspectionClassify}
......@@ -65,7 +65,7 @@
and accept_date = #{acceptDate}
</if>
<if test="inspectionChargePerson != null and inspectionChargePerson != ''">
and inspection_charge_person like concat('%',#{inspectionChargePerson}.'%')
and inspection_charge_person like concat('%',#{inspectionChargePerson},'%')
</if>
<if test="status != null and status != ''">
and status = #{status}
......
......@@ -114,6 +114,8 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
String id = ((Map) ajaxResult.getResult()).get("id").toString();
model.setProcessInstanceId(id);
execueFlow(MapBuilder.<String, Object>create().put("op", "0").put("instanceId", id).put("comments", "").build());
// region 获取下一个流程节点的数据
Map<String, Object> nextNodeInfo = workflowHelper.getNextWorkflowNode(model.getProcessInstanceId());
String role = (String) nextNodeInfo.get("role");
......@@ -123,6 +125,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
} else {
model.setWorkflowRole(role);
}
} catch (Exception e) {
e.printStackTrace();
}
......@@ -162,7 +165,15 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
model.setCreateUserId(reginParams.getUserModel().getUserId());
model.setNumberOfEquip(equipInfos.size());
// endregion
model = this.createWithModel(model);
if (null == model.getSequenceNbr()){
model = this.createWithModel(model);
}else {
model = this.updateWithModel(model);
}
//保存报检装备监管码
for (JyjcInspectionApplicationEquip equipInfo : equipInfos) {
equipInfo.setApplicationSeq(model.getSequenceNbr());
......
......@@ -26,6 +26,7 @@ public enum ApplicationFormTypeEnum {
DWBG("DWBG"),//单位变更登记
JY("JY"),
JG("JG"),// 检验结果
SBZX("SBZX"),//电梯(设备)注销
;
/**
......
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