Commit d70de711 authored by yangyang's avatar yangyang

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

parents f9c45e58 ca99922a
......@@ -3,6 +3,11 @@ package com.yeejoin.amos.boot.module.jg.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 使用登记状态西悉尼
*/
......@@ -13,7 +18,7 @@ public enum WorkFlowStatusEnum {
/**
* 使用登记流程
*/
USE_SUBMIT("使用单位提交", "useSubmit", "使用单位待提交", "一级受理已驳回", "使用单位提交已撤回"),
USE_SUBMIT("使用单位提交", "useSubmit", "使用单位待提交", "一级受理已驳回", "使用单位已撤回"),
USE_RECEIVE("一级受理", "useReceive", "一级待受理", "二级受理已驳回", "一级受理已撤回"),
USE_PRELIMINARY("二级受理", "usePreliminary", "二级待受理", "三级受理已驳回", "二级受理已撤回"),
USE_REEXAMINE("三级受理", "useReexamine", "三级待受理","",""),
......@@ -22,15 +27,15 @@ public enum WorkFlowStatusEnum {
/**
* 维保流程
*/
MAIN_SUBMIT("使用单位提交", "mainSubmit", "使用单位待提交", "维保单位已驳回", "使用单位撤回"),
MAIN_RECEIVE("维保单位审核确认", "mainReceive", "维保单位待受理", "监管单位已驳回", "维保单位撤回"),
MAIN_SUBMIT("使用单位提交", "mainSubmit", "使用单位待提交", "维保单位已驳回", "使用单位撤回"),
MAIN_RECEIVE("维保单位审核确认", "mainReceive", "维保单位待受理", "监管单位已驳回", "维保单位撤回"),
MAIN_PRELIMINARY("监管单位审核", "mainPreliminary", "监管单位待受理", "", ""),
/**
* 电梯注销
*/
CANCEL_SUBMIT("使用单位提交", "cancelSubmit", "使用单位待提交", "一级受理已驳回", "使用单位提交已撤回"),
CANCEL_SUBMIT("使用单位提交", "cancelSubmit", "使用单位待提交", "一级受理已驳回", "使用单位已撤回"),
CANCEL_RECEIVE("一级受理", "cancelReceive", "一级待受理", "二级受理已驳回", "一级受理已撤回"),
CANCEL_PRELIMINARY("二级受理", "cancelPreliminary", "二级待受理", "三级受理已驳回", "二级受理已撤回"),
CANCEL_REEXAMINE("三级受理", "cancelReexamine", "三级待受理", "", ""),
......@@ -38,7 +43,7 @@ public enum WorkFlowStatusEnum {
/**
* 改造登记流程
*/
CHANGE_SUBMIT("使用单位提交", "changeSubmit", "使用单位待提交", "一级受理已驳回", "使用单位提交已撤回"),
CHANGE_SUBMIT("使用单位提交", "changeSubmit", "使用单位待提交", "一级受理已驳回", "使用单位已撤回"),
CHANGE_RECEIVE("一级受理", "changeReceive", "一级待受理", "二级受理已驳回", "一级受理已撤回"),
CHANGE_PRELIMINARY("二级受理", "changePreliminary", "二级待受理", "三级受理已驳回", "二级受理已撤回"),
CHANGE_REEXAMINE("三级受理", "changeReexamine", "三级待受理", "", ""),
......@@ -46,7 +51,7 @@ public enum WorkFlowStatusEnum {
/**
* 移装变更登记流程
*/
TRANSFER_SUBMIT("使用单位提交", "transferSubmit", "使用单位待提交", "一级受理已驳回", "使用单位提交已撤回"),
TRANSFER_SUBMIT("使用单位提交", "transferSubmit", "使用单位待提交", "一级受理已驳回", "使用单位已撤回"),
TRANSFER_RECEIVE("一级受理", "transferReceive", "一级待受理", "二级受理已驳回", "一级受理已撤回"),
TRANSFER_PRELIMINARY("二级受理", "transferPreliminary", "二级待受理", "三级受理已驳回", "二级受理已撤回"),
TRANSFER_REEXAMINE("三级受理", "transferReexamine", "三级待受理","","");
......@@ -72,4 +77,29 @@ public enum WorkFlowStatusEnum {
}
return null;
}
public static List<Map<String, String>> getInfoList(String code) {
List<Map<String, String>> resultList = new ArrayList<>();
for (WorkFlowStatusEnum constants : values()) {
if (constants.getCode().startsWith(code)) {
HashMap<String, String> hashMap = new HashMap<>();
hashMap.put("name", constants.getPass());
hashMap.put("value", constants.getPass());
resultList.add(hashMap);
HashMap<String, String> hashMap1 = new HashMap<>();
hashMap1.put("name", constants.getReject());
hashMap1.put("value", constants.getReject());
resultList.add(hashMap1);
HashMap<String, String> hashMap2 = new HashMap<>();
hashMap2.put("name", constants.getRollBack());
hashMap2.put("value", constants.getRollBack());
resultList.add(hashMap2);
}
}
HashMap<String, String> hashMap = new HashMap<>();
hashMap.put("name", "已完成");
hashMap.put("value", "已完成");
resultList.add(hashMap);
return resultList;
}
}
......@@ -10,10 +10,12 @@
<select id="getListPage" resultType="java.util.Map">
select ur.sequence_nbr as sequenceNbr,
ur.audit_status as auditStatus,
ur.reg_date as regDate,
ur.use_unit_name as useUnitName,
ur.use_registration_code as useRegistrationCode,
ur.status,
ur.receive_org_name as receiveOrgName,
DATE_FORMAT(ur.reg_date,'%Y-%m-%d') as regDate,
DATE_FORMAT(ur.rec_date,'%Y-%m-%d') as recDate,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
......@@ -49,7 +51,7 @@
</foreach>
</if>
<if test="dto.dataType == 'jg' ">
and ur.receive_company_code = #{dto.unitCode}
and ur.receive_org_code = #{dto.unitCode}
</if>
<if test="dto.dataType == 'company' ">
and ur.use_unit_credit_code = #{dto.unitCode}
......
......@@ -49,13 +49,13 @@
<if test="dto.auditStatus != null and dto.auditStatus != ''">
and ur.audit_status = #{dto.auditStatus}
</if>
<!-- <if test="dto.equCode != null and dto.equCode != ''">-->
<!-- and jri.EQU_CODE like concat('%',#{dto.equCode},'%')-->
<!-- </if>-->
<!-- <if test="dto.useUnitName != null and dto.useUnitName != ''">-->
<!-- and use.USE_UNIT_NAME like concat('%',#{dto.useUnitName},'%')-->
<!-- </if>-->
<!-- -->
<if test="dto.applyNo != null and dto.applyNo != ''">
and ur.apply_no like concat('%',#{dto.applyNo},'%')
</if>
<if test="dto.cancelType != null and dto.cancelType != ''">
and ur.cancel_type = #{dto.cancelType}
</if>
<if test="roleIds != null and dto.type == 'supervision'">
<foreach collection='roleIds' item='role' open='and (' close=')' separator='or'>
ur.instance_status like concat('%',#{role},'%')
......
......@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto;
import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgScrapCancelServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -96,7 +97,7 @@ public class JgScrapCancelController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "列表全部数据查询", notes = "列表全部数据查询")
@PostMapping(value = "/getList")
public ResponseModel<Page<Map<String, Object>>> getList(JgScrapCancelDto dto,
public ResponseModel<Page<Map<String, Object>>> getList(@RequestBody JgScrapCancelDto dto,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<Map<String, Object>> page = new Page<>(current, size);
......@@ -131,4 +132,12 @@ public class JgScrapCancelController extends BaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "列表筛选办理状态下拉", notes = "列表筛选办理状态下拉")
@GetMapping(value = "/getAuditStatusList")
public ResponseModel<List<Map<String, String>>> getAuditStatusList(@RequestParam(value = "code") String code) {
return ResponseHelper.buildResponse(WorkFlowStatusEnum.getInfoList(code));
}
}
......@@ -40,10 +40,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 改造变更登记服务实现类
......@@ -145,22 +142,30 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform.setInspectUnitName(reginParams.getCompany().getCompanyName());
}
if (map.containsKey("receiveCompanyCode")) {
jgChangeRegistrationReform.setReceiveCompanyCode(String.valueOf(map.getString("receiveCompanyCode")));
String receiveCompanyCode = String.valueOf(map.getString("receiveCompanyCode"));
jgChangeRegistrationReform.setReceiveCompanyCode(receiveCompanyCode);
jgChangeRegistrationReform.setReceiveOrgCode(receiveCompanyCode.split("_")[0]);
jgChangeRegistrationReform.setReceiveOrgName(receiveCompanyCode.split("_")[1]);
} else {
jgChangeRegistrationReform.setReceiveCompanyCode("610000");
}
JgRegistrationHistory jgRegistrationHistory = new JgRegistrationHistory();
//使用登记编号
jgRegistrationHistory.setUseRegistrationCode(idxBizJgRegisterInfoMapper.getUseOrgCodeByEquip(map.get("record").toString()));
jgRegistrationHistory.setUseRegistrationCode(idxBizJgRegisterInfoMapper.getUseOrgCodeByEquip(equipId));
//登记类别
jgRegistrationHistory.setRegistrationClass("改造登记");
//设备id
jgRegistrationHistory.setEquId(equipId);
//修改数据
jgRegistrationHistory.setChangeData(JSONObject.toJSONString(map));
//保存历史数据
IdxBizJgTechParamsElevator idxBizJgTechParamsElevator = idxBizJgTechParamsElevatorMapper.selectOne(new QueryWrapper<IdxBizJgTechParamsElevator>().eq("RECORD", equipId));
jgRegistrationHistory.setOldData(JSONObject.toJSONString(idxBizJgTechParamsElevator));
//设备监管码
jgRegistrationHistory.setSupervisoryCode(supervisoryCode);
//数据状态
jgChangeRegistrationReform.setUseRegistrationCode(jgRegistrationHistory.getUseRegistrationCode());
jgRegistrationHistory.setStatus("new");
if (map.containsKey("type") && "edit".equals(String.valueOf(map.get("type")))) {
jgChangeRegistrationReform.setUseUnitCreditCode(null);
......@@ -177,6 +182,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform.setApplyNo(applicationFormCode.get(0));
jgChangeRegistrationReform.setAuditStatus(WorkFlowStatusEnum.CHANGE_SUBMIT.getPass());
jgChangeRegistrationReform.setStatus(WorkFlowStatusEnum.CHANGE_SUBMIT.getPass());
jgChangeRegistrationReform.setRegDate(new Date());
this.save(jgChangeRegistrationReform);
jgChangeRegistrationReformEq.setEquipTransferId(jgChangeRegistrationReform.getSequenceNbr().toString());
jgChangeRegistrationReformEqMapper.insert(jgChangeRegistrationReformEq);
......@@ -271,7 +277,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform.setAuditStatus(FlowStatusEnum.TO_BE_FINISHED.getName());
jgChangeRegistrationReform.setStatus(FlowStatusEnum.TO_BE_FINISHED.getName());
JgChangeRegistrationReformEq jgChangeRegistrationReformEq = jgChangeRegistrationReformEqMapper.selectOne(new QueryWrapper<JgChangeRegistrationReformEq>().eq("equip_transfer_id", jgChangeRegistrationReform.getSequenceNbr()));
updateTechparamsByEquIdAndCurrentDoucumentId(jgChangeRegistrationReformEq.getEquId(), jgChangeRegistrationReform.getSequenceNbr().toString(), jgChangeRegistrationReform.getSupervisoryCode());
String newUseRegistrationCertificateNumber = getCode(jgChangeRegistrationReform.getSupervisoryCode());
jgChangeRegistrationReform.setUseRegistrationCode(newUseRegistrationCertificateNumber);
updateTechparamsByEquIdAndCurrentDoucumentId(jgChangeRegistrationReformEq.getEquId(), jgChangeRegistrationReform.getSequenceNbr().toString(),newUseRegistrationCertificateNumber );
}
this.getBaseMapper().updateById(jgChangeRegistrationReform);
}
......@@ -472,8 +480,8 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
* @param equipId
* @param currentDocumentId
*/
public void updateTechparamsByEquIdAndCurrentDoucumentId(String equipId, String currentDocumentId, String supervisoryCode) {
String newUseRegistrationCertificateNumber = getCode(supervisoryCode);
public void updateTechparamsByEquIdAndCurrentDoucumentId(String equipId, String currentDocumentId, String newUseRegistrationCertificateNumber) {
IdxBizJgTechParamsElevator idxBizJgTechParamsElevator = idxBizJgTechParamsElevatorMapper.selectOne(new QueryWrapper<IdxBizJgTechParamsElevator>().eq("RECORD", equipId));
JgRegistrationHistory jgRegistrationHistory = jgRegistrationHistoryMapper.selectOne(new QueryWrapper<JgRegistrationHistory>()
.eq("equ_id", equipId)
......
......@@ -432,7 +432,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
TaskResultDTO dto = new TaskResultDTO();
dto.setResultCode("approvalStatus");
dto.setTaskId(taskId);
dto.setComment("提交流程");
// dto.setComment("提交流程");
HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", "0");
dto.setVariable(map);
......@@ -605,7 +605,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
TaskResultDTO dto = new TaskResultDTO();
dto.setResultCode("approvalStatus");
dto.setTaskId(taskId);
dto.setComment("提交流程");
// dto.setComment("提交流程");
HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", op);
dto.setVariable(map);
......
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