Commit 58db1d9f authored by KeYong's avatar KeYong

修复移装相关问题

parent 0ee40935
......@@ -36,6 +36,9 @@ public class JgTransferNoticeDto extends BaseDto {
@ApiModelProperty(value = "告知状态")
private String noticeStatus;
@ApiModelProperty(value = "告知状态")
private String noticeStatusDesc;
@ApiModelProperty(value = "施工单位统一信用代码")
private String installUnitCreditCode;
......@@ -173,6 +176,9 @@ public class JgTransferNoticeDto extends BaseDto {
@ApiModelProperty(value = "完整地址")
private String fullAddress;
@ApiModelProperty(value = "userId")
private String promoter;
public String getFullAddress() {
return (StringUtils.isEmpty(this.provinceName) ? "" : this.provinceName)
+ (StringUtils.isEmpty(this.cityName) ? "" : this.cityName)
......
......@@ -279,4 +279,7 @@ public class JgTransferNotice extends BaseEntity {
@TableField("province_name")
private String provinceName;
@TableField("promoter")
private String promoter;
}
......@@ -12,12 +12,13 @@
tjtn.address AS address,
tjtn.notice_status AS noticeStatus,
tjtn.install_unit_name AS installUnitName,
tjtn.province AS provinceName,
tjtn.city AS cityName,
tjtn.county AS countyName,
tjtn.province_name AS provinceName,
tjtn.city_name AS cityName,
tjtn.county_name AS countyName,
tjtn.instance_id AS instanceId,
tjtn.transfer_type AS transferType,
tjtn.plan_date AS planDate
tjtn.plan_date AS planDate,
tjtn.promoter AS promoter
FROM
tzs_jg_transfer_notice tjtn
<where>
......@@ -38,11 +39,18 @@
<if test="param.noticeStatus != null and param.noticeStatus != ''">
AND tjtn.notice_status = #{param.noticeStatus}
</if>
<if test="param.transferType != null and param.transferType != '' and param.transferType == '10002'">
AND tjtn.transfer_type = '区内移装'
</if>
<if test="param.transferType != null and param.transferType != '' and param.transferType == '10003'">
AND tjtn.transfer_type = '跨区移装'
</if>
</if>
<if test="type == 'supervision'">
AND (tjtn.notice_status in ('6612', '6613', '6614') or tjtn.status in('6614') )
AND tjtn.notice_status in ('6612', '6613', '6614')
AND tjtn.receive_org_code = #{orgCode}
</if>
<if test="orgCode != null and orgCode != ''">
<if test="type == 'enterprise'">
AND tjtn.install_unit_credit_code = #{orgCode}
</if>
</where>
......@@ -71,9 +79,10 @@
tjtn.construction_contract AS constructionContract,
tjtn.transfer_type AS transferType,
tjtn.factory_use_site_street AS factoryUseSiteStreet,
tjtn.province AS provinceName,
tjtn.city AS cityName,
tjtn.county AS countyName,
tjtn.province_name AS provinceName,
tjtn.city_name AS cityName,
tjtn.county_name AS countyName,
tjtn.promoter AS promoter,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
......@@ -110,7 +119,7 @@
ui.ADDRESS AS useUnitAddress
FROM
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN tzs_jg_transfer_notice_eq re ON re.equip_transfer_id = tjtn.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
......
package com.yeejoin.amos.boot.module.jg.biz.controller;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgTransferNoticeServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
/**
* 移装告知
*
* @author system_generator
* @date 2023-12-12
*/
@RestController
@Api(tags = "移装告知工作流相关Api")
@RequestMapping(value = "/jg-transfer-workflow")
public class JgTransferNoticeByWorkFlowController {
@Autowired
JgTransferNoticeServiceImpl jgTransferNoticeService;
/**
* 提交
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/submit")
@ApiOperation(httpMethod = "POST", value = "移装告知提交", notes = "移装告知提交")
public ResponseModel<JgTransferNoticeDto> submit(@RequestBody JgTransferNoticeDto model, String op) {
// TODO 发起移装告知流程
// jgInstallationNoticeServiceImpl.submit(model, op);
return ResponseHelper.buildResponse(model);
}
/**
* 撤销
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/cancel")
@ApiOperation(httpMethod = "POST", value = "移装告知撤销", notes = "移装告知撤销")
public ResponseModel<JgTransferNoticeDto> cancel(@RequestBody Map<String, Object> model) {
JgTransferNoticeDto installationInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("transferNoticeInfo")), JgTransferNoticeDto.class, true);
if (Objects.isNull(installationInfo)) {
throw new IllegalArgumentException("参数transferNoticeInfo不能为空");
}
jgTransferNoticeService.cancel(installationInfo);
return ResponseHelper.buildResponse(installationInfo);
}
/**
* 受理
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/accept")
@ApiOperation(httpMethod = "POST", value = "移装告知受理", notes = "移装告知受理")
public ResponseModel<JgTransferNoticeDto> accept(@RequestBody Map<String, Object> model, String op) {
// TODO 受理移装告知流程
LinkedHashMap model1 = (LinkedHashMap)model.get("model");
LinkedHashMap installationInfo = (LinkedHashMap)model1.get("transferNoticeInfo");
JgTransferNoticeDto JgTransferNoticeDto = JSON.parseObject(JSON.toJSONString(installationInfo), JgTransferNoticeDto.class);
jgTransferNoticeService.accept(JgTransferNoticeDto,op);
return ResponseHelper.buildResponse(null);
}
}
......@@ -65,12 +65,12 @@ public class JgTransferNoticeController extends BaseController {
@RequestParam String submitType,
@RequestBody Map<String, Object> model,
@RequestParam(value = "op", required = false) String op) {
JgTransferNoticeDto transferNoticeInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("transferInfo")), JgTransferNoticeDto.class, true);
JgTransferNoticeDto transferNoticeInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("transferNoticeInfo")), JgTransferNoticeDto.class, true);
if (Objects.isNull(transferNoticeInfo)) {
throw new IllegalArgumentException("参数transferInfo不能为空");
}
Object o = ((LinkedHashMap<?, ?>) model.get("transferInfo")).get("proxyStatementAttachment");
Object o1 = ((LinkedHashMap<?, ?>) model.get("transferInfo")).get("installContractAttachment");
Object o = ((LinkedHashMap<?, ?>) model.get("transferNoticeInfo")).get("proxyStatementAttachmentList");
Object o1 = ((LinkedHashMap<?, ?>) model.get("transferNoticeInfo")).get("installContractAttachmentList");
transferNoticeInfo.setConstructionContractList((List<Map<String, Object>>) o);
transferNoticeInfo.setPowerOfAttorneyList((List<Map<String, Object>>) o1);
return ResponseHelper.buildResponse(jgTransferNoticeService.updateTransferNotice(submitType, transferNoticeInfo, op));
......
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