Commit 5291848c authored by litengwei's avatar litengwei

告知流程代码

parent b2ffb083
......@@ -25,6 +25,7 @@ public class DateUtils {
public static final String MINUTE_ONLY_PATTERN = "mm";
public static final String HOUR_ONLY_PATTERN = "HH";
public static final String DATE_PATTERN_NUM = "yyyyMMdd";
public static final String DATE_PATTERN_MM = "yyyyMM";
public static final String CHN_DATE_PATTERN_YEAR = "yyyy年";
public static final String CHN_DATE_PATTERN_MONTH = "MM月";
public static final String CHN_DATE_PATTERN = "yyyy年MM月dd日";
......
package com.yeejoin.amos.boot.module.jg.api.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@Data
@ApiModel(value = "JgInstallationAccDto", description = "")
public class JgInstallationAccDto {
String opinion;
JgInstallationNoticeDto model;
}
......@@ -3,6 +3,7 @@ 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 com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -95,13 +96,13 @@ public class JgInstallationNoticeDto extends BaseDto {
private String propertyUnitName;
@ApiModelProperty(value = "使用单位id")
private String useUnitId;
private String useUnitCreditCode;
@ApiModelProperty(value = "使用单位")
private String useUnitName;
@ApiModelProperty(value = "接收机构ID")
private String receiveOrgId;
private String receiveOrgCreditCode;
@ApiModelProperty(value = "接收机构")
private String receiveOrgName;
......@@ -206,4 +207,7 @@ public class JgInstallationNoticeDto extends BaseDto {
+ (StringUtils.isEmpty(this.countyName) ? "" : this.countyName)
+ (StringUtils.isEmpty(this.address) ? "" : this.address);
}
@ApiModelProperty(value = "设备注册代码")
private String equRegisterCode;
}
......@@ -224,115 +224,122 @@ public class JgInstallationNotice extends BaseEntity {
/**
* 撤销说明
*/
@TableField("cancel_remark")
@TableField("cancel_remark")
private String cancelRemark;
/**
* 撤销处理截止日期
*/
@TableField("cancel_handle_deadline")
@TableField("cancel_handle_deadline")
private Date cancelHandleDeadline;
/**
* 撤销流水号
*/
@TableField("cancel_process_no")
@TableField("cancel_process_no")
private String cancelProcessNo;
/**
* 施工合同是否本单位与甲方直接签署
*/
@TableField("is_signed_with_a")
@TableField("is_signed_with_a")
private String isSignedWithA;
/**
* 检验单位代码
*/
@TableField("inspect_unit_id")
@TableField("inspect_unit_id")
private String inspectUnitId;
/**
* 检验单位
*/
@TableField("inspect_unit_name")
@TableField("inspect_unit_name")
private String inspectUnitName;
/**
* 是否已报检
*/
@TableField("is_inspected")
@TableField("is_inspected")
private String isInspected;
/**
* 设备安装质量证明书编号
*/
@TableField("install_cert_no")
@TableField("install_cert_no")
private String installCertNo;
/**
* 审核通过时间
*/
@TableField("receive_time")
@TableField("receive_time")
private Date receiveTime;
/**
* 状态
*/
@TableField("status")
@TableField("status")
private String status;
/**
* 备注
*/
@TableField("remark")
@TableField("remark")
private String remark;
/**
* 创建人ID
*/
@TableField("create_user_id")
@TableField("create_user_id")
private String createUserId;
/**
* 创建时间
*/
@TableField("create_date")
@TableField("create_date")
private Date createDate;
/**
* 录入单位ID
*/
@TableField("input_unit_no")
@TableField("input_unit_no")
private String inputUnitNo;
/**
* 安装委托书图片
*/
@TableField("proxy_statement_attachment")
@TableField("proxy_statement_attachment")
private String proxyStatementAttachment;
/**
* 安装合同照片
*/
@TableField("install_contract_attachment")
@TableField("install_contract_attachment")
private String installContractAttachment;
/**
* 是否西咸
*/
@TableField("is_xixian")
@TableField("is_xixian")
private String isXixian;
/**
* 告知日期
*/
@TableField("notice_date")
@TableField("notice_date")
private Date noticeDate;
/**
* 流程实例id
*/
@TableField("instance_id")
@TableField("instance_id")
private String instanceId;
/**
* 设备注册编码
*/
@TableField("equ_register_code")
private String equRegisterCode;
}
......@@ -25,7 +25,12 @@ public enum FlowStatusEnum {
/**
* 已驳回
*/
REJECTED(6614, "已驳回");
REJECTED(6614, "已驳回"),
/**
* 已撤回
*/
ROBACK(6615, "已撤回");
private final int code;
......
......@@ -39,7 +39,7 @@
</if>
</if>
<if test="type == 'supervision'">
AND isn.notice_status in ('6612', '6613', '6614')
AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )
</if>
</where>
ORDER BY
......
package com.yeejoin.amos.boot.module.jg.biz.controller;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationAccDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl;
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-installation-workflow")
public class JgInstallationByWorkFlowController {
@Autowired
JgInstallationNoticeServiceImpl jgInstallationNoticeServiceImpl;
/**
* 提交
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/submit")
@ApiOperation(httpMethod = "POST", value = "安装告知提交", notes = "安装告知提交")
public ResponseModel<JgInstallationNoticeDto> submit(@RequestBody JgInstallationNoticeDto 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<JgInstallationNoticeDto> cancel(@RequestBody Map<String, Object> model) {
JgInstallationNoticeDto installationInfo = BeanUtil.mapToBean(((LinkedHashMap) model.get("installationInfo")), JgInstallationNoticeDto.class, true);
if (Objects.isNull(installationInfo)) {
throw new IllegalArgumentException("参数installationInfo不能为空");
}
jgInstallationNoticeServiceImpl.cancel(installationInfo);
return ResponseHelper.buildResponse(installationInfo);
}
/**
* 受理
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/accept")
@ApiOperation(httpMethod = "POST", value = "安装告知受理", notes = "安装告知受理")
public ResponseModel<JgInstallationNoticeDto> accept(@RequestBody Map<String, Object> model, String op) {
// TODO 受理安装告知流程
LinkedHashMap model1 = (LinkedHashMap)model.get("model");
LinkedHashMap form = (LinkedHashMap)model1.get("form");
LinkedHashMap installationInfo = (LinkedHashMap)form.get("installationInfo");
JgInstallationNoticeDto jgInstallationNoticeDto = JSON.parseObject(JSON.toJSONString(installationInfo), JgInstallationNoticeDto.class);
jgInstallationNoticeServiceImpl.accept(jgInstallationNoticeDto,op);
return ResponseHelper.buildResponse(null);
}
}
package com.yeejoin.amos.boot.module.jg.biz.feign;
import com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.Map;
@FeignClient(name = "TZS-YMT-LL", url = "172.16.3.155:11000", path = "/ymt", configuration =
{FeignConfiguration.class})
public interface TzsServiceFeignClient {
/**
* 创建监管码及96333
*
* @param map 请求体
* @return
*/
@RequestMapping(value = "/equipment-category/createSupervisorCode", method = RequestMethod.POST)
ResponseModel<Map<String, Object>> createCode(@RequestBody Map<String, Object> map);
}
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice;
......@@ -12,23 +14,35 @@ import com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgRelationEquipMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.workflow.Workflow;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsJgOtherInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsJgRegistrationInfo;
import com.yeejoin.amos.feign.workflow.model.TaskResultDTO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.*;
import java.util.stream.Collectors;
import java.text.ParseException;
/**
* 服务实现类
......@@ -37,18 +51,40 @@ import java.util.stream.Collectors;
* @date 2023-12-12
*/
@Service
public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationNoticeDto, JgInstallationNotice, JgInstallationNoticeMapper> implements IJgInstallationNoticeService {
public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationNoticeDto,JgInstallationNotice,JgInstallationNoticeMapper> implements IJgInstallationNoticeService {
public static final String SUBMIT_TYPE_FLOW = "1";
public static final String PROCESS_DEFINITION_KEY = "installationNotification";
public static final String TABLE_PAGE_ID = "1734141426742095873";
//西安行政区划code
private static final String XIAN = "610100";
//咸阳行政区划code
private static final String XIAN_YANG = "610400";
@Autowired
EquipmentCategoryMapper equipmentCategoryMapper;
@Autowired
private JgRelationEquipMapper jgRelationEquipMapper;
JgRelationEquipMapper jgRelationEquipMapper;
@Autowired
private JgInstallationNoticeMapper jgInstallationNoticeMapper;
@Autowired
private ICreateCodeService iCreateCodeService;
// @Autowired
// private EquipmentCategoryServiceImpl equipmentCategoryService;
@Autowired
RegistrationInfoMapper tzsJgRegistrationInfoMapper;
@Autowired
OtherInfoMapper tzsJgOtherInfoMapper;
@Autowired
TzsServiceFeignClient tzsServiceFeignClient;
/**
* 根据sequenceNbr查询
......@@ -65,10 +101,26 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo.put("province", notice.getProvince() + "_" + notice.getProvinceName());
installationInfo.put("city", notice.getCity() + "_" + notice.getCityName());
installationInfo.put("county", notice.getCounty() + "_" + notice.getCountyName());
installationInfo.put("useUnitCreditCode", notice.getUseUnitCreditCode() + "_" + notice.getUseUnitName());
installationInfo.put("receiveOrgCreditCode", notice.getReceiveOrgCreditCode() + "_" + notice.getReceiveOrgName());
installationInfo.put("inspectUnitId", notice.getInspectUnitId() + "_" + notice.getInspectUnitName());
String[] fields = {"productPhoto", "designDoc", "designStandard", "factoryStandard",
"productQualityYieldProve", "insUseMaintainExplain", "inspectReport",
"proxyStatementAttachment", "installContractAttachment"};
// 设备信息
List<Map<String, Object>> equipmentInfos = jgInstallationNoticeMapper.queryEquipInformation(sequenceNbr);
for (String s:fields) {
if(installationInfo.containsKey(s)) {
installationInfo.put(s, JSON.parseArray(installationInfo.get(s).toString()));
}
if(equipmentInfos.get(0).containsKey(s)) {
equipmentInfos.get(0).put(s, JSON.parseArray(equipmentInfos.get(0).get(s).toString()));
}
}
return new HashMap<String, Map<String, Object>>() {{
this.put("installationInfo", installationInfo);
this.put("equipmentInfo", equipmentInfos.get(0));
......@@ -97,13 +149,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
dto.setBusinessKey("1");
try {
ajaxResult = Workflow.taskClient.startByVariable(dto);
String instanceId = ((Map) ajaxResult.get("data")).get("id").toString();
noticeDto.setInstanceId(instanceId);
noticeDto.setStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
noticeDto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
JgInstallationNotice bean = new JgInstallationNotice();
BeanUtils.copyProperties(noticeDto, bean);
jgInstallationNoticeMapper.updateById(bean);
} catch (Exception e) {
log.error("提交失败:{}", e);
}
......@@ -124,8 +169,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
AjaxResult ajaxResult1;
try {
ajaxResult1 = Workflow.taskClient.completeByTask(taskId, taskResultDTO);
if (ObjectUtils.isEmpty(ajaxResult1)) {
noticeDto.setStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
if (ajaxResult1.get("code").equals(200)) {
noticeDto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
JgInstallationNotice bean = new JgInstallationNotice();
BeanUtils.copyProperties(noticeDto, bean);
jgInstallationNoticeMapper.updateById(bean);
......@@ -136,6 +181,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return noticeDto;
}
/**
* 分页查询
*
......@@ -219,6 +266,24 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if (SUBMIT_TYPE_FLOW.equals(submitType)) {
// 发起流程
ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
// String[] strIds = new String[deviceList.size()];
// String[] strKeys = new String[deviceList.size()];
//
// for (int i = 0; i<deviceList.size() ; i++
// ) {
// strIds[i] = PROCESS_DEFINITION_KEY;
// strKeys[i] = String.valueOf(i);
// }
// dto.setProcessDefinitionIds(String.join(",", strIds));
// dto.setProcessDefinitionKeys(String.join(",", strKeys));
// dto.setCompleteFirstTask(true);
//
// try {
// FeignClientResult result = Workflow.taskV2Client.startByVariable(dto);
// } catch (Exception e) {
// e.printStackTrace();
// }
for (int i = 0; i < deviceList.size(); i++) {
dto.setProcessDefinitionKey(PROCESS_DEFINITION_KEY);
dto.setBusinessKey("1");
......@@ -262,9 +327,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
jgRelationEquip.setBusinessType(ApplicationFormTypeEnum.GZ.getCode());
if (!CollectionUtils.isEmpty(instanceIdList)) {
dto.setInstanceId(instanceIdList.get(i));
dto.setStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getCode()));
} else {
dto.setStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
}
list.add(dto);
equipList.add(jgRelationEquip);
......@@ -316,20 +381,20 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
// 分割单位
String useUnitId = model.getUseUnitId();
String useUnitId = model.getUseUnitCreditCode();
if (!ObjectUtils.isEmpty(useUnitId)) {
String[] useUnitList = useUnitId.split("_");
if (useUnitList.length > 1) {
model.setUseUnitId(useUnitList[0]);
model.setUseUnitCreditCode(useUnitList[0]);
model.setUseUnitName(useUnitList[1]);
}
}
String receiveOrgId = model.getReceiveOrgId();
String receiveOrgId = model.getReceiveOrgCreditCode();
if (!ObjectUtils.isEmpty(receiveOrgId)) {
String[] receiveOrgIdList = receiveOrgId.split("_");
if (receiveOrgIdList.length > 1) {
model.setReceiveOrgId(receiveOrgIdList[0]);
model.setReceiveOrgCreditCode(receiveOrgIdList[0]);
model.setReceiveOrgName(receiveOrgIdList[1]);
}
}
......@@ -351,4 +416,126 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
return urls;
}
public boolean submit(JgInstallationNoticeDto noticeDto,String op) {
AjaxResult ajaxResult = Workflow.taskClient.getTask(noticeDto.getInstanceId());
JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
String taskId = dataObject.getString("id");
//组装信息
TaskResultDTO dto = new TaskResultDTO();
dto.setResultCode("approvalStatus");
dto.setTaskId(taskId);
dto.setComment("提交流程");
HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", op);
dto.setVariable(map);
//执行流程
AjaxResult ajaxResult1 = null;
try {
ajaxResult1 = Workflow.taskClient.completeByTask(taskId, dto);
if (ajaxResult1.get("code").equals(200)) {
return true;
} else {
return false;
}
} catch (Exception e) {
log.error("提交失败:{}", e);
return false;
}
}
public void cancel(JgInstallationNoticeDto noticeDto) {
FeignClientResult ajaxResult = Workflow.taskV2Client.rollBack(noticeDto.getInstanceId());
JgInstallationNotice jgInstallationNotice = this.baseMapper.selectById(noticeDto.getSequenceNbr());
if(ajaxResult.getStatus() == 200) {
jgInstallationNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
jgInstallationNotice.setStatus(String.valueOf(FlowStatusEnum.ROBACK.getCode()));
jgInstallationNoticeMapper.updateById(jgInstallationNotice);
}
}
public void accept(JgInstallationNoticeDto dto,String op) {
convertField(dto);
// 组装设备注册代码
StringBuffer stringBuffer = new StringBuffer();
String ym = null;
try {
ym = DateUtils.dateFormat(new Date(), DateUtils.DATE_PATTERN_MM);
} catch (ParseException e) {
log.error("日期转换失败:{}", e);
}
LambdaQueryWrapper<JgRelationEquip> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgRelationEquip::getBusinessId,dto.getSequenceNbr());
JgRelationEquip jgRelationEquip = jgRelationEquipMapper.selectOne(queryWrapper);
LambdaQueryWrapper<OtherInfo> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(OtherInfo::getRecord,jgRelationEquip.getEquipId());
OtherInfo tzsJgOtherInfo = tzsJgOtherInfoMapper.selectOne(queryWrapper1);
LambdaQueryWrapper<RegistrationInfo> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.eq(RegistrationInfo::getRecord,jgRelationEquip.getEquipId());
RegistrationInfo tzsJgRegistrationInfo = tzsJgRegistrationInfoMapper.selectOne(queryWrapper2);
stringBuffer.append(tzsJgRegistrationInfo.getEquCategory()).append(dto.getCity()).append(ym);
String equCode = stringBuffer.toString();
String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map<String, Object> map = new HashMap<>();
map.put("cityCode",dto.getCity());
map.put("countyCode",dto.getCounty());
map.put("equCategory",tzsJgRegistrationInfo.getEquCategory());
map.put("isXiXian",dto.getIsXixian());
Map<String, Object> mapCode;
ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
mapCode = code.getResult();
boolean submit = submit(dto, op);
if(submit) {
if("0".equals(op)) {
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.HAVE_PROCESSED.getCode()));
} else {
dto.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
dto.setStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
}
JgInstallationNotice bean = new JgInstallationNotice();
BeanUtils.copyProperties(dto,bean);
bean.setEquRegisterCode(deviceRegistrationCode);
jgInstallationNoticeMapper.updateById(bean);
// 更新其他业务表
tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
}
// // 组装监管码
// String division = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// division = "X";
// } else {
// //生成监管码前缀
// Map<String, Object> divisionMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCounty());
// division = ObjectUtils.isEmpty(divisionMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCity()).get("code").toString() : divisionMap.get("code").toString();
// }
//
// // 组装96333码
// String prefix = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// prefix = EquipmentCategoryEnum.XXCSM.getValue();
// } else {
// Map<String, Object> elevatorMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCounty());
// prefix = ObjectUtils.isEmpty(elevatorMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCity()).get("code").toString() : elevatorMap.get("code").toString();
// }
}
}
\ No newline at end of file
......@@ -50,7 +50,7 @@
<logger name="com.yeejoin" level="INFO"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<root level="INFO">
<!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />-->
......
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