Commit cb0b02d9 authored by tianyiming's avatar tianyiming

维修告知、启用停用修改暂存不选设备保存失败

parent 3bc97e7d
......@@ -131,8 +131,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
} else {
jgEnableDisable.setExecuteSequence(workflowResultDto.getNextExecutorRoleIds());
}
jgEnableDisable.setEquList(map.get("equListDesc").toString());
jgEnableDisable.setSupervisoryCode(map.get("supervisoryCode").toString());
jgEnableDisable.setEquList("null".equals(record) ? "null" : map.get("equListDesc").toString());
jgEnableDisable.setSupervisoryCode("null".equals(record) ? "null" : map.get("supervisoryCode").toString());
jgEnableDisable.setPromoter(RequestContext.getExeUserId());
jgEnableDisable.setNextExecutorIds(String.join(",", workflowResultDto.getNextExecutorRoleIds()));
jgEnableDisable.setAuditStatus(String.valueOf(FlowStatusEnum.TO_BE_PROCESSED.getName()));
......@@ -192,11 +192,13 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
lambda.eq(JgEnableDisableEq::getEnableDisableApplyId, String.valueOf(map.get("sequenceNbr")));
jgEnableDisableEqService.getBaseMapper().delete(lambda);
}
// 关联设备表
JgEnableDisableEq jgEnableDisableEq = new JgEnableDisableEq();
jgEnableDisableEq.setEquId(record);
jgEnableDisableEq.setEnableDisableApplyId(jgEnableDisable.getSequenceNbr().toString());
jgEnableDisableEqService.save(jgEnableDisableEq);
if(!"null".equals(record)){
// 关联设备表
JgEnableDisableEq jgEnableDisableEq = new JgEnableDisableEq();
jgEnableDisableEq.setEquId(record);
jgEnableDisableEq.setEnableDisableApplyId(jgEnableDisable.getSequenceNbr().toString());
jgEnableDisableEqService.save(jgEnableDisableEq);
}
}
......
......@@ -43,6 +43,7 @@ import org.springframework.util.StringUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.text.ParseException;
......@@ -402,8 +403,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
// 获取告知设备列表
List<Map<String, Object>> deviceList = model.getDeviceList();
if (CollectionUtils.isEmpty(deviceList)) {
log.error(" 获取告知设备列表");
throw new RuntimeException();
throw new BadRequest("请选择设备");
}
// 获取告知单号
ResponseModel<List<String>> applyNoResult = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.WXGZ.getCode(), deviceList.size());
......
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