Commit cfca91a1 authored by 王果's avatar 王果

维修告知接口调整

parent bb8b7d89
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -29,11 +30,15 @@ public class JgMaintainNoticeDto extends BaseDto {
private String applyNo;
@ApiModelProperty(value = "告知日期")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date noticeDate;
@ApiModelProperty(value = "告知状态")
private String noticeStatus;
@ApiModelProperty(value = "告知状态名称")
private String noticeStatusDesc;
@ApiModelProperty(value = "施工单位统一信用代码")
private String installUnitCreditCode;
......@@ -68,6 +73,7 @@ public class JgMaintainNoticeDto extends BaseDto {
private String instanceStatus;
@ApiModelProperty(value = "受理完成日期")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date acceptDate;
@ApiModelProperty(value = "施工区域-省")
......@@ -86,6 +92,7 @@ public class JgMaintainNoticeDto extends BaseDto {
private String address;
@ApiModelProperty(value = "计划施工日期")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date planDate;
@ApiModelProperty(value = "接收机构单位代码")
......@@ -148,4 +155,23 @@ public class JgMaintainNoticeDto extends BaseDto {
@TableField(exist = false)
@ApiModelProperty(value = "告知设备列表")
private List<Map<String, Object>> deviceList;
@ApiModelProperty(value = "设备使用地点-街道(镇)")
private String factoryUseSiteStreet;
@ApiModelProperty(value = "完整地址")
private String fullAddress;
;
@ApiModelProperty(value = "区名字")
private String countyName;
@ApiModelProperty(value = "市名字")
private String cityName;
@ApiModelProperty(value = "省名字")
private String provinceName;
@ApiModelProperty(value = "街道名字")
private String streetName;
}
......@@ -120,24 +120,47 @@ public class JgMaintainNotice extends BaseEntity {
private String province;
/**
* 施工区域-省
*/
@TableField("province_name")
private String provinceName;
/**
* 施工区域-市
*/
@TableField("city")
private String city;
/**
* 施工区域-市
*/
@TableField("city_name")
private String cityName;
/**
* 施工区域-区/县
*/
@TableField("county")
private String county;
/**
* 施工区域-区/县
*/
@TableField("county_name")
private String countyName;
/**
* 施工区域-街道(镇)
*/
@TableField("street")
private String street;
/**
* 施工区域-街道(镇)
*/
@TableField(value = "street_name")
private String streetName;
/**
* 施工设备详细地址
*/
@TableField("address")
......@@ -251,4 +274,10 @@ public class JgMaintainNotice extends BaseEntity {
@TableField("receive_org_code")
private String receiveOrgCode;
/**
* 施工区域-街道(镇)
*/
@TableField(value = "factory_use_site_street")
private String factoryUseSiteStreet;
}
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;
}
}
......@@ -6,23 +6,28 @@
select
tjmn.sequence_nbr AS sequenceNbr,
tjmn.apply_no AS applyNo,
tjmn.supervisory_code AS supervisoryCode,
tjmn.notice_date AS noticeDate,
tjmn.use_unit_name AS useUnitName,
tjmn.receive_org_name AS receiveOrgName,
tjmn.region_no AS regionNo,
tjmn.address AS address,
tjmn.notice_status AS noticeStatus,
tjmn.install_unit_name AS installUnitName,
tjmn.province,
tjmn.city,
tjmn.county,
tjmn.factory_use_site_street,
tjmn.street_name,
tjmn.street,
tjmn.maintain_type,
tjmn.plan_date,
tjmn.province_name AS provinceName,
tjmn.city_name AS cityName,
tjmn.county_name AS countyName,
tjmn.instance_id AS instanceId,
tjmn.notice_report_url AS noticeReportUrl
tjmn.instance_id AS instanceId
FROM
tzs_jg_maintain_notice tjmn
<where>
tjmn.is_delete = false
tjmn.is_delete = 0
<if test="param != null ">
<if test="param.applyNo != null and param.applyNo != ''">
AND tjmn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
......@@ -40,12 +45,13 @@
AND tjmn.notice_status = #{param.noticeStatus}
</if>
</if>
<if test="type == 'supervision'">
AND (tjmn.notice_status in ('6612', '6613', '6614') or tjmn.status in('6614') )
</if>
<if test="orgCode != null and orgCode != ''">
AND tjmn.install_unit_credit_code = #{orgCode}
</if>
<!-- <if test="type == 'supervision'">-->
<!-- AND (tjmn.notice_status in ('6612', '6613', '6614') or tjmn.status in('6614') )-->
<!-- AND tjmn.receive_org_credit_code = #{orgCode}-->
<!-- </if>-->
<!-- <if test="type == 'enterprise'">-->
<!-- AND tjmn.install_unit_credit_code = #{orgCode}-->
<!-- </if>-->
</where>
ORDER BY
tjmn.notice_date DESC
......@@ -54,13 +60,25 @@
<select id="queryEquipInformation" resultType="java.util.Map">
select
tjmn.sequence_nbr AS sequenceNbr,
tjmn.install_unit_name AS installUnitName,
tjmn.apply_no AS applyNo,
tjmn.province,
tjmn.city AS cityName,
tjmn.county AS countyName,
tjmn.address AS address,
tjmn.notice_date AS noticeDate,
tjmn.use_unit_name AS useUnitName,
tjmn.receive_org_name AS receiveOrgName,
tjmn.address AS address,
tjmn.notice_status AS noticeStatus,
tjmn.install_unit_name AS installUnitName,
tjmn.province,
tjmn.city,
tjmn.county,
tjmn.factory_use_site_street,
tjmn.street_name,
tjmn.street,
tjmn.maintain_type,
tjmn.plan_date,
tjmn.province_name AS provinceName,
tjmn.city_name AS cityName,
tjmn.county_name AS countyName,
tjmn.instance_id AS instanceId,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
......@@ -97,7 +115,7 @@
ui.ADDRESS AS useUnitAddress
FROM
tzs_jg_maintain_notice tjmn
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = tjmn.sequence_nbr
LEFT JOIN tzs_jg_maintain_notice_eq re ON re.equip_transfer_id = tjmn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
......
......@@ -34,19 +34,19 @@ public class JgMaintainByWorkFlowController {
@Autowired
JgMaintainNoticeServiceImpl jgMaintainNoticeServiceImpl;
/**
* 提交
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/submit")
@ApiOperation(httpMethod = "POST", value = "维修告知提交", notes = "维修告知提交")
public ResponseModel<JgMaintainNoticeDto> submit(@RequestBody JgMaintainNoticeDto model, String op) {
// TODO 发起维修告知流程
// jgMaintainNoticeServiceImpl.submit(model, op);
return ResponseHelper.buildResponse(model);
}
// /**
// * 提交
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PostMapping(value = "/submit")
// @ApiOperation(httpMethod = "POST", value = "维修告知提交", notes = "维修告知提交")
// public ResponseModel<JgMaintainNoticeDto> submit(@RequestBody JgMaintainNoticeDto model, String op) {
// // TODO 发起维修告知流程
// // jgMaintainNoticeServiceImpl.submit(model, op);
// return ResponseHelper.buildResponse(model);
// }
/**
* 撤销
......
......@@ -37,6 +37,7 @@ public class JgMaintainNoticeController extends BaseController {
@Autowired
private IJgMaintainNoticeService iJgMaintainNoticeService;
private static final String TABLE_PAGE_ID = "1734141426742095873";
/**
* 新增
*
......@@ -61,12 +62,12 @@ public class JgMaintainNoticeController extends BaseController {
@PutMapping(value = "/update")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新维修告知", notes = "根据sequenceNbr更新维修告知")
public ResponseModel<JgMaintainNoticeDto> updateBySequenceNbrJgMaintainNotice(@RequestParam String submitType, @RequestBody Map<String, Object> model, @RequestParam(value = "op", required = false) String op) {
JgMaintainNoticeDto maintainInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("maintainInfo")), JgMaintainNoticeDto.class, true);
JgMaintainNoticeDto maintainInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get(TABLE_PAGE_ID)), JgMaintainNoticeDto.class, true);
if (Objects.isNull(maintainInfo)) {
throw new IllegalArgumentException("参数maintainInfo不能为空");
}
Object o = ((LinkedHashMap<?, ?>) model.get("maintainInfo")).get("proxyStatementAttachment");
Object o1 = ((LinkedHashMap<?, ?>) model.get("maintainInfo")).get("installContractAttachment");
Object o = ((LinkedHashMap<?, ?>) model.get(TABLE_PAGE_ID)).get("constructionContractList");
Object o1 = ((LinkedHashMap<?, ?>) model.get(TABLE_PAGE_ID)).get("powerOfAttorneyList");
maintainInfo.setConstructionContractList((List<Map<String, Object>>) o);
maintainInfo.setPowerOfAttorneyList((List<Map<String, Object>>) o1);
return ResponseHelper.buildResponse(iJgMaintainNoticeService.updateMaintainNotice(submitType, maintainInfo, op));
......@@ -113,7 +114,6 @@ public class JgMaintainNoticeController extends BaseController {
return ResponseHelper.buildResponse(iJgMaintainNoticeService.queryBySequenceNbr(sequenceNbr));
}
/**
* 列表分页查询
*
......@@ -123,7 +123,7 @@ public class JgMaintainNoticeController extends BaseController {
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "维修告知分页查询", notes = "维修告知分页查询")
@ApiOperation(httpMethod = "POST", value = "维修告知分页查询", notes = "维修告知分页查询")
public ResponseModel<Page<JgMaintainNoticeDto>> queryForPage(
@ApiParam(value = "当前页码", required = true) @RequestParam(value = "current", defaultValue = "1") int current,
@ApiParam(value = "每页大小", required = true) @RequestParam(value = "size", defaultValue = "20") int size,
......
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