Commit 595a5890 authored by 王果's avatar 王果

维修告知接口调整

parent 372a120b
......@@ -174,4 +174,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty(value = "街道名字")
private String streetName;
@ApiModelProperty(value = "告知单PDF URL")
private String noticeReportUrl;
}
......@@ -280,4 +280,17 @@ public class JgMaintainNotice extends BaseEntity {
*/
@TableField(value = "factory_use_site_street")
private String factoryUseSiteStreet;
/**
* 告知单PDF URL
*/
@TableField("notice_report_url")
private String noticeReportUrl;
/**
* 告知单PDF URL
*/
@TableField(value = "promoter")
private String promoter;
}
......@@ -33,4 +33,6 @@ public interface JgMaintainNoticeMapper extends CustomBaseMapper<JgMaintainNotic
*/
@MapKey("sequenceNbr")
List<Map<String, Object>> queryEquipInformation(@Param("sequenceNbr") long sequenceNbr);
void updatePromoter(@Param("id")Long id);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper">
<update id="updatePromoter">
UPDATE tzs_jg_maintain_notice set promoter = null
where sequence_nbr = #{id}
</update>
<select id="queryForPage" resultType="com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice">
select
......@@ -20,9 +24,11 @@
tjmn.street,
tjmn.maintain_type,
tjmn.plan_date,
tjmn.notice_report_url,
tjmn.province_name AS provinceName,
tjmn.city_name AS cityName,
tjmn.county_name AS countyName,
tjmn.promoter,
tjmn.instance_id AS instanceId
FROM
tzs_jg_maintain_notice tjmn
......@@ -44,14 +50,17 @@
<if test="param.noticeStatus != null and param.noticeStatus != ''">
AND tjmn.notice_status = #{param.noticeStatus}
</if>
<if test="param.maintainType != null and param.maintainType != ''">
AND tjmn.maintain_type = #{param.maintainType}
</if>
</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>
<!-- <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
......@@ -70,15 +79,17 @@
tjmn.province,
tjmn.city,
tjmn.county,
tjmn.factory_use_site_street,
tjmn.street_name,
tjmn.factory_use_site_street AS factoryUseSiteStreet,
tjmn.street_name AS streetName,
tjmn.street,
tjmn.maintain_type,
tjmn.plan_date,
tjmn.maintain_type AS maintainType,
tjmn.plan_date AS planDate,
tjmn.notice_report_url AS noticeReportUrl,
tjmn.province_name AS provinceName,
tjmn.city_name AS cityName,
tjmn.county_name AS countyName,
tjmn.instance_id AS instanceId,
tjmn.promoter,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
......
......@@ -34,6 +34,7 @@ public class JgMaintainByWorkFlowController {
@Autowired
JgMaintainNoticeServiceImpl jgMaintainNoticeServiceImpl;
private static final String TABLE_PAGE_ID = "1734141426742095873";
// /**
// * 提交
// *
......@@ -57,7 +58,7 @@ public class JgMaintainByWorkFlowController {
@PostMapping(value = "/cancel")
@ApiOperation(httpMethod = "POST", value = "维修告知撤销", notes = "维修告知撤销")
public ResponseModel<JgMaintainNoticeDto> cancel(@RequestBody Map<String, Object> model) {
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不能为空");
}
......@@ -76,7 +77,7 @@ public class JgMaintainByWorkFlowController {
public ResponseModel<JgMaintainNoticeDto> accept(@RequestBody Map<String, Object> model, String op) {
// TODO 受理维修告知流程
LinkedHashMap model1 = (LinkedHashMap) model.get("model");
LinkedHashMap maintainInfo = (LinkedHashMap) model1.get("maintainInfo");
LinkedHashMap maintainInfo = (LinkedHashMap) model1.get(TABLE_PAGE_ID);
JgMaintainNoticeDto jgMaintainNoticeDto = JSON.parseObject(JSON.toJSONString(maintainInfo), JgMaintainNoticeDto.class);
jgMaintainNoticeServiceImpl.accept(jgMaintainNoticeDto, op);
return ResponseHelper.buildResponse(null);
......
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