Commit d1d5a5be authored by litengwei's avatar litengwei

安装告知代码优化

parent b7d96c0b
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.aspose.words.SaveFormat;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import cn.hutool.core.bean.BeanUtil;
......@@ -21,6 +22,7 @@ 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.jg.biz.utils.ImageUtils;
import com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.SupervisoryCodeInfo;
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;
......@@ -93,6 +95,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
OtherInfoMapper tzsJgOtherInfoMapper;
@Autowired
TzsServiceFeignClient tzsServiceFeignClient;
@Autowired
SupervisoryCodeInfoMapper supervisoryCodeInfoMapper;
......@@ -574,7 +578,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
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);
}
}
......@@ -603,6 +606,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
queryWrapper2.eq(RegistrationInfo::getRecord,jgRelationEquip.getEquId());
RegistrationInfo tzsJgRegistrationInfo = tzsJgRegistrationInfoMapper.selectOne(queryWrapper2);
stringBuffer.append(tzsJgRegistrationInfo.getEquCategory()).append(jgInstallationNotice.getCity()).append(ym);
String equCode = stringBuffer.toString();
String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
......@@ -615,6 +620,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
mapCode = code.getResult();
LambdaQueryWrapper<SupervisoryCodeInfo> queryWrapper3 = new LambdaQueryWrapper<>();
queryWrapper3.eq(SupervisoryCodeInfo::getSupervisoryCode,mapCode.get("superviseCode").toString());
SupervisoryCodeInfo supervisoryCodeInfo = supervisoryCodeInfoMapper.selectOne(queryWrapper3);
supervisoryCodeInfo.setStatus("1");
supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
boolean submit = submit(jgInstallationNotice, op);
if(submit) {
......
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