Commit e0f36b11 authored by yangyang's avatar yangyang

fix(改造告知):接口测试问题修复

parent ea4c8999
...@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jg.api.dto; ...@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...@@ -91,6 +93,7 @@ public class JgReformNoticeDto extends BaseDto { ...@@ -91,6 +93,7 @@ public class JgReformNoticeDto extends BaseDto {
private String address; private String address;
@ApiModelProperty (value = "计划施工日期") @ApiModelProperty (value = "计划施工日期")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date planDate; private Date planDate;
@ApiModelProperty (value = "接收机构单位代码") @ApiModelProperty (value = "接收机构单位代码")
...@@ -121,10 +124,12 @@ public class JgReformNoticeDto extends BaseDto { ...@@ -121,10 +124,12 @@ public class JgReformNoticeDto extends BaseDto {
private String entrustingUnitName; private String entrustingUnitName;
@ApiModelProperty (value = "委托书附件") @ApiModelProperty (value = "委托书附件")
private JSONObject powerOfAttorney; @TableField(typeHandler = FastjsonTypeHandler.class)
private List<JSONObject> powerOfAttorney;
@ApiModelProperty (value = "施工合同附件") @ApiModelProperty (value = "施工合同附件")
private JSONObject constructionContract; @TableField(typeHandler = FastjsonTypeHandler.class)
private List<JSONObject> constructionContract;
@ApiModelProperty (value = "施工合同是否本单位与甲方直接签署") @ApiModelProperty (value = "施工合同是否本单位与甲方直接签署")
private String isSignedWithA; private String isSignedWithA;
...@@ -167,7 +172,11 @@ public class JgReformNoticeDto extends BaseDto { ...@@ -167,7 +172,11 @@ public class JgReformNoticeDto extends BaseDto {
+ (StringUtils.isEmpty(this.countyName) ? "" : this.countyName) + (StringUtils.isEmpty(this.countyName) ? "" : this.countyName)
+ (StringUtils.isEmpty(this.address) ? "" : this.address); + (StringUtils.isEmpty(this.address) ? "" : this.address);
} }
//
// @ApiModelProperty (value = "设备注册代码") @ApiModelProperty(value = "设备使用地点-街道(镇)")
// private String equRegisterCode; private String factoryUseSiteStreet;
@ApiModelProperty(value = "设备使用地点-街道(镇)")
private String streetName;
} }
...@@ -10,6 +10,7 @@ import lombok.Data; ...@@ -10,6 +10,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 改造告知 * 改造告知
...@@ -209,13 +210,13 @@ public class JgReformNotice extends BaseEntity { ...@@ -209,13 +210,13 @@ public class JgReformNotice extends BaseEntity {
* 委托书附件 * 委托书附件
*/ */
@TableField(value = "power_of_attorney", typeHandler = FastjsonTypeHandler.class) @TableField(value = "power_of_attorney", typeHandler = FastjsonTypeHandler.class)
private JSONObject powerOfAttorney; private List<JSONObject> powerOfAttorney;
/** /**
* 施工合同附件 * 施工合同附件
*/ */
@TableField(value = "construction_contract", typeHandler = FastjsonTypeHandler.class) @TableField(value = "construction_contract", typeHandler = FastjsonTypeHandler.class)
private JSONObject constructionContract; private List<JSONObject> constructionContract;
/** /**
* 施工合同是否本单位与甲方直接签署 * 施工合同是否本单位与甲方直接签署
...@@ -262,4 +263,17 @@ public class JgReformNotice extends BaseEntity { ...@@ -262,4 +263,17 @@ public class JgReformNotice extends BaseEntity {
@TableField("is_xixian") @TableField("is_xixian")
private String isXixian; private String isXixian;
/**
* * 设备使用地点-街道(镇)
* */
@TableField(value ="\"factory_use_site_street\"")
private String factoryUseSiteStreet;
/**
* * 设备使用地点-街道(镇)-名称
* */
@TableField(value ="\"street_name\"")
private String streetName;
} }
...@@ -57,7 +57,7 @@ public class JgReformByWorkFlowController { ...@@ -57,7 +57,7 @@ public class JgReformByWorkFlowController {
@PostMapping(value = "/cancel") @PostMapping(value = "/cancel")
@ApiOperation(httpMethod = "POST", value = "改造告知撤销", notes = "改造告知撤销") @ApiOperation(httpMethod = "POST", value = "改造告知撤销", notes = "改造告知撤销")
public ResponseModel<JgReformNoticeDto> cancel(@RequestBody Map<String, Object> model) { public ResponseModel<JgReformNoticeDto> cancel(@RequestBody Map<String, Object> model) {
JgReformNoticeDto installationInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("installationInfo")), JgReformNoticeDto.class, true); JgReformNoticeDto installationInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("reformInfo")), JgReformNoticeDto.class, true);
if (Objects.isNull(installationInfo)) { if (Objects.isNull(installationInfo)) {
throw new IllegalArgumentException("参数installationInfo不能为空"); throw new IllegalArgumentException("参数installationInfo不能为空");
} }
...@@ -76,7 +76,7 @@ public class JgReformByWorkFlowController { ...@@ -76,7 +76,7 @@ public class JgReformByWorkFlowController {
public ResponseModel<JgReformNoticeDto> accept(@RequestBody Map<String, Object> model, String op) { public ResponseModel<JgReformNoticeDto> accept(@RequestBody Map<String, Object> model, String op) {
// TODO 受理改造告知流程 // TODO 受理改造告知流程
LinkedHashMap model1 = (LinkedHashMap)model.get("model"); LinkedHashMap model1 = (LinkedHashMap)model.get("model");
LinkedHashMap installationInfo = (LinkedHashMap)model1.get("installationInfo"); LinkedHashMap installationInfo = (LinkedHashMap)model1.get("reformInfo");
JgReformNoticeDto JgReformNoticeDto = JSON.parseObject(JSON.toJSONString(installationInfo), JgReformNoticeDto.class); JgReformNoticeDto JgReformNoticeDto = JSON.parseObject(JSON.toJSONString(installationInfo), JgReformNoticeDto.class);
jgReformNoticeService.accept(JgReformNoticeDto,op); jgReformNoticeService.accept(JgReformNoticeDto,op);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
......
...@@ -67,7 +67,7 @@ public class JgReformNoticeController extends BaseController { ...@@ -67,7 +67,7 @@ public class JgReformNoticeController extends BaseController {
@PutMapping (value = "/update") @PutMapping (value = "/update")
@ApiOperation (httpMethod = "PUT", value = "根据sequenceNbr更新改造告知", notes = "根据sequenceNbr更新改造告知") @ApiOperation (httpMethod = "PUT", value = "根据sequenceNbr更新改造告知", notes = "根据sequenceNbr更新改造告知")
public ResponseModel<JgReformNoticeDto> updateBySequenceNbrJgReformNotice(@RequestParam String submitType, @RequestBody Map<String, Object> model, @RequestParam (value = "op", required = false) String op) { public ResponseModel<JgReformNoticeDto> updateBySequenceNbrJgReformNotice(@RequestParam String submitType, @RequestBody Map<String, Object> model, @RequestParam (value = "op", required = false) String op) {
JgReformNoticeDto installationInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("installationInfo")), JgReformNoticeDto.class, true); JgReformNoticeDto installationInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("reformInfo")), JgReformNoticeDto.class, true);
if (Objects.isNull(installationInfo)) { if (Objects.isNull(installationInfo)) {
throw new IllegalArgumentException("参数installationInfo不能为空"); throw new IllegalArgumentException("参数installationInfo不能为空");
} }
......
...@@ -77,7 +77,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -77,7 +77,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private static final String SUBMIT_TYPE_FLOW = "1"; private static final String SUBMIT_TYPE_FLOW = "1";
private static final String PROCESS_DEFINITION_KEY = "renovationNotice"; private static final String PROCESS_DEFINITION_KEY = "renovationNotice";
private static final String TABLE_PAGE_ID = "1736649208330481666"; private static final String TABLE_PAGE_ID = "reformNoticeAdd";
// 西安行政区划code // 西安行政区划code
...@@ -163,7 +163,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -163,7 +163,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
} }
return new HashMap<String, Map<String, Object>>() {{ return new HashMap<String, Map<String, Object>>() {{
this.put("installationInfo", installationInfo); this.put(TABLE_PAGE_ID, installationInfo);
this.put("equipmentInfo", equipmentInfos.get(0)); this.put("equipmentInfo", equipmentInfos.get(0));
}}; }};
} }
...@@ -497,7 +497,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -497,7 +497,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// if (!ValidationUtil.isEmpty(model.getInstallContractAttachmentList())) { // if (!ValidationUtil.isEmpty(model.getInstallContractAttachmentList())) {
// model.setInstallContractAttachment(JSON.toJSONString(model.getInstallContractAttachmentList())); // model.setInstallContractAttachment(JSON.toJSONString(model.getInstallContractAttachmentList()));
// } // }
if (model == null) {
return;
}
// 分割省市区字段 // 分割省市区字段
String province = model.getProvince(); String province = model.getProvince();
if (!ObjectUtils.isEmpty(province)) { if (!ObjectUtils.isEmpty(province)) {
......
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