Commit 90494db1 authored by 王果's avatar 王果

维修告知接口调整

parent e838bf6f
...@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.api.dto; ...@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -31,6 +33,7 @@ public class JgMaintainNoticeDto extends BaseDto { ...@@ -31,6 +33,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty(value = "告知日期") @ApiModelProperty(value = "告知日期")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@JsonSerialize(using = BizCustomDateSerializer.class)
private Date noticeDate; private Date noticeDate;
@ApiModelProperty(value = "告知状态") @ApiModelProperty(value = "告知状态")
...@@ -58,6 +61,8 @@ public class JgMaintainNoticeDto extends BaseDto { ...@@ -58,6 +61,8 @@ public class JgMaintainNoticeDto extends BaseDto {
private String executeSequence; private String executeSequence;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonSerialize(using = BizCustomDateSerializer.class)
private Date createDate; private Date createDate;
@ApiModelProperty(value = "创建人id ") @ApiModelProperty(value = "创建人id ")
...@@ -74,6 +79,7 @@ public class JgMaintainNoticeDto extends BaseDto { ...@@ -74,6 +79,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty(value = "受理完成日期") @ApiModelProperty(value = "受理完成日期")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@JsonSerialize(using = BizCustomDateSerializer.class)
private Date acceptDate; private Date acceptDate;
@ApiModelProperty(value = "施工区域-省") @ApiModelProperty(value = "施工区域-省")
...@@ -93,6 +99,7 @@ public class JgMaintainNoticeDto extends BaseDto { ...@@ -93,6 +99,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty(value = "计划施工日期") @ApiModelProperty(value = "计划施工日期")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@JsonSerialize(using = BizCustomDateSerializer.class)
private Date planDate; private Date planDate;
@ApiModelProperty(value = "接收机构单位代码") @ApiModelProperty(value = "接收机构单位代码")
...@@ -183,4 +190,10 @@ public class JgMaintainNoticeDto extends BaseDto { ...@@ -183,4 +190,10 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty(value = "节点执行人") @ApiModelProperty(value = "节点执行人")
private String promoter; private String promoter;
@ApiModelProperty(value = "设备类别")
private String equListCode;
@ApiModelProperty(value = "设备类别名称")
private String equCategory;
} }
...@@ -293,4 +293,15 @@ public class JgMaintainNotice extends BaseEntity { ...@@ -293,4 +293,15 @@ public class JgMaintainNotice extends BaseEntity {
@TableField(value = "promoter") @TableField(value = "promoter")
private String promoter; private String promoter;
/**
* 设备类别
*/
@TableField(value = "equ_list_code")
private String equListCode;
/**
* 设备类别名称
*/
@TableField(value = "equ_category")
private String equCategory;
} }
package com.yeejoin.amos.boot.module.jg.api.enums;
/**
* 办理状态枚举
*/
public enum MaintainTypeEnum {
GENERAL(1, "一般维修"),
PRIORITY(2, "重点维修");
private final int code;
private final String name;
MaintainTypeEnum(int code, String name) {
this.code = code;
this.name = name;
}
public static String getNameByType(Long code) {
String name = null;
for (MaintainTypeEnum enumOne : MaintainTypeEnum.values()) {
if (enumOne.getCode() == code) {
name = enumOne.getName();
break;
}
}
return name;
}
public int getCode() {
return code;
}
public String getName() {
return name;
}
}
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
tjmn.city_name AS cityName, tjmn.city_name AS cityName,
tjmn.county_name AS countyName, tjmn.county_name AS countyName,
tjmn.promoter, tjmn.promoter,
tjmn.equ_category AS equCategory,
tjmn.equ_list_code AS equListCode,
tjmn.instance_id AS instanceId tjmn.instance_id AS instanceId
FROM FROM
tzs_jg_maintain_notice tjmn tzs_jg_maintain_notice tjmn
...@@ -55,7 +57,7 @@ ...@@ -55,7 +57,7 @@
</if> </if>
</if> </if>
<if test="type == 'supervision'"> <if test="type == 'supervision'">
AND (tjmn.notice_status in ('6612', '6613', '6614') ) AND (tjmn.notice_status in ('6612', '6614', '6616') )
AND tjmn.receive_org_code = #{orgCode} AND tjmn.receive_org_code = #{orgCode}
</if> </if>
<if test="type == 'enterprise'"> <if test="type == 'enterprise'">
...@@ -63,7 +65,7 @@ ...@@ -63,7 +65,7 @@
</if> </if>
</where> </where>
ORDER BY ORDER BY
tjmn.notice_date DESC tjmn.create_date DESC
</select> </select>
<select id="queryEquipInformation" resultType="java.util.Map"> <select id="queryEquipInformation" resultType="java.util.Map">
...@@ -90,12 +92,15 @@ ...@@ -90,12 +92,15 @@
tjmn.county_name AS countyName, tjmn.county_name AS countyName,
tjmn.instance_id AS instanceId, tjmn.instance_id AS instanceId,
tjmn.promoter, tjmn.promoter,
tjmn.equ_category AS equCategory,
tjmn.equ_list_code AS equListCode,
ri.equ_list AS equList, ri.equ_list AS equList,
ri.equ_category AS equCategory, ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine, ri.EQU_DEFINE AS equDefine,
ri.product_name AS productName, ri.product_name AS productName,
ri.brand_name AS brandName, ri.brand_name AS brandName,
ri.equ_type AS equType, ri.equ_type AS equType,
ri.equ_code AS equRegisterCode,
ri.equ_price AS equPrice, ri.equ_price AS equPrice,
ri.product_photo AS productPhoto, ri.product_photo AS productPhoto,
di.design_unit_credit_code AS designUnitCreditCode, di.design_unit_credit_code AS designUnitCreditCode,
......
package com.yeejoin.amos.boot.module.jg.biz.controller; package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService; import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory; import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
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 io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -23,7 +21,6 @@ import java.util.Arrays; ...@@ -23,7 +21,6 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -103,7 +100,15 @@ public class CommonController extends BaseController { ...@@ -103,7 +100,15 @@ public class CommonController extends BaseController {
public ResponseModel<Map<String,Object>> getUserInfo(@RequestParam(value = "sequenceNbr") String sequenceNbr) { public ResponseModel<Map<String,Object>> getUserInfo(@RequestParam(value = "sequenceNbr") String sequenceNbr) {
return ResponseHelper.buildResponse(commonService.getUserInfo(sequenceNbr)); return ResponseHelper.buildResponse(commonService.getUserInfo(sequenceNbr));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUserInfoSplit")
@ApiOperation(httpMethod = "GET", value = "查询安全管理员的基本信息", notes = "查询安全管理员的基本信息")
public ResponseModel<Map<String, Object>> getUserInfoSplit(@RequestParam(value = "sequenceNbr") String sequenceNbr) {
if (sequenceNbr.contains("_")) {
sequenceNbr = sequenceNbr.split("_")[0];
}
return ResponseHelper.buildResponse(commonService.getUserInfo(sequenceNbr));
}
/** /**
* 查询企业的基本信息 * 查询企业的基本信息
* *
......
...@@ -94,6 +94,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -94,6 +94,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
SupervisoryCodeInfoMapper supervisoryCodeInfoMapper; SupervisoryCodeInfoMapper supervisoryCodeInfoMapper;
@Autowired @Autowired
IDataDictionaryService dataDictionaryService;
@Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
public static byte[] file2byte(File file) { public static byte[] file2byte(File file) {
...@@ -127,6 +130,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -127,6 +130,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
maintainInfo.put("constructionContractList", JSON.parseArray(notice.getConstructionContract())); maintainInfo.put("constructionContractList", JSON.parseArray(notice.getConstructionContract()));
maintainInfo.put("province", notice.getProvince() + "_" + notice.getProvinceName()); maintainInfo.put("province", notice.getProvince() + "_" + notice.getProvinceName());
maintainInfo.put("city", notice.getCity() + "_" + notice.getCityName()); maintainInfo.put("city", notice.getCity() + "_" + notice.getCityName());
maintainInfo.put("constructionManagerId", notice.getConstructionManagerId() + "_" + notice.getConstructionManager());
maintainInfo.put("county", notice.getCounty() + "_" + notice.getCountyName()); maintainInfo.put("county", notice.getCounty() + "_" + notice.getCountyName());
maintainInfo.put("fullAddress", notice.getProvinceName() + notice.getCityName() + notice.getCityName() + notice.getStreetName() + notice.getAddress()); maintainInfo.put("fullAddress", notice.getProvinceName() + notice.getCityName() + notice.getCityName() + notice.getStreetName() + notice.getAddress());
maintainInfo.put("useUnitCreditCode", notice.getUseUnitCreditCode() + "_" + notice.getUseUnitName()); maintainInfo.put("useUnitCreditCode", notice.getUseUnitCreditCode() + "_" + notice.getUseUnitName());
...@@ -218,8 +222,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -218,8 +222,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
} }
@Autowired
IDataDictionaryService dataDictionaryService;
/** /**
* 分页查询 * 分页查询
* *
...@@ -424,6 +426,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -424,6 +426,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
int i = deviceList.indexOf(obj); int i = deviceList.indexOf(obj);
String applyNo = applyNoList.get(i); String applyNo = applyNoList.get(i);
dto.setApplyNo(applyNo); dto.setApplyNo(applyNo);
dto.setEquCategory(String.valueOf(obj.get("EQU_CATEGORY")));
dto.setEquListCode(String.valueOf(obj.get("EQU_LIST_CODE")));
dto.setNoticeDate(new Date()); dto.setNoticeDate(new Date());
dto.setInstallUnitName(reginParams.getCompany().getCompanyName()); dto.setInstallUnitName(reginParams.getCompany().getCompanyName());
dto.setInstallUnitCreditCode(reginParams.getCompany().getCompanyCode()); dto.setInstallUnitCreditCode(reginParams.getCompany().getCompanyCode());
...@@ -475,6 +479,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -475,6 +479,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
model.setCityName(cityList[1]); model.setCityName(cityList[1]);
} }
} }
String county = model.getCounty(); String county = model.getCounty();
if (!ObjectUtils.isEmpty(county)) { if (!ObjectUtils.isEmpty(county)) {
String[] countyList = county.split("_"); String[] countyList = county.split("_");
...@@ -509,6 +514,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -509,6 +514,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
model.setReceiveOrgName(receiveOrgIdList[1]); model.setReceiveOrgName(receiveOrgIdList[1]);
} }
} }
String constructionManager = model.getConstructionManagerId();
if (!ObjectUtils.isEmpty(constructionManager)) {
String[] constructionManagerList = constructionManager.split("_");
if (constructionManagerList.length > 1) {
model.setConstructionManagerId(constructionManagerList[0]);
model.setConstructionManager(constructionManagerList[1]);
}
}
String inspectUnitId = model.getInspectionUnitCreditCode(); String inspectUnitId = model.getInspectionUnitCreditCode();
if (!ObjectUtils.isEmpty(inspectUnitId)) { if (!ObjectUtils.isEmpty(inspectUnitId)) {
String[] inspectUnitIdList = inspectUnitId.split("_"); String[] inspectUnitIdList = inspectUnitId.split("_");
...@@ -558,7 +573,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -558,7 +573,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
FeignClientResult ajaxResult = Workflow.taskV2Client.rollBack(noticeDto.getInstanceId()); FeignClientResult ajaxResult = Workflow.taskV2Client.rollBack(noticeDto.getInstanceId());
JgMaintainNotice jgMaintainNotice = this.baseMapper.selectById(noticeDto.getSequenceNbr()); JgMaintainNotice jgMaintainNotice = this.baseMapper.selectById(noticeDto.getSequenceNbr());
if (ajaxResult.getStatus() == 200) { if (ajaxResult.getStatus() == 200) {
jgMaintainNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode())); jgMaintainNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.ROLLBACK.getCode()));
jgMaintainNoticeMapper.updateById(jgMaintainNotice); jgMaintainNoticeMapper.updateById(jgMaintainNotice);
} }
} }
...@@ -607,6 +622,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -607,6 +622,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if ("0".equals(op)) { if ("0".equals(op)) {
jgMaintainNotice.setPromoter(reginParams.getUserModel().getUserId()); jgMaintainNotice.setPromoter(reginParams.getUserModel().getUserId());
jgMaintainNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode())); jgMaintainNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()));
jgMaintainNotice.setAcceptDate(new Date());
this.generateMaintainNoticeReport(jgMaintainNotice.getSequenceNbr()); this.generateMaintainNoticeReport(jgMaintainNotice.getSequenceNbr());
// // 更新其他业务表 // // 更新其他业务表
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString()); // tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
...@@ -617,7 +633,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -617,7 +633,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo); // tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo); // tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
} else { } else {
jgMaintainNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode())); //驳回
jgMaintainNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
jgMaintainNotice.setInstanceStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode())); jgMaintainNotice.setInstanceStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
jgMaintainNoticeMapper.updatePromoter(jgMaintainNotice.getSequenceNbr()); jgMaintainNoticeMapper.updatePromoter(jgMaintainNotice.getSequenceNbr());
} }
......
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