Browse Source

增加判空

ai_dev
gjh 3 months ago
parent
commit
2eaf991df8
  1. 3
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouContractinfoServiceImpl.java
  2. 2
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouFieldchangehistoryServiceImpl.java

3
huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouContractinfoServiceImpl.java

@ -372,6 +372,9 @@ public class HuzhouContractinfoServiceImpl extends ServiceImpl<HuzhouContractinf
@Override @Override
public ContractInfoVo getContractinfoByTaskName(String projectId, String taskName) { public ContractInfoVo getContractinfoByTaskName(String projectId, String taskName) {
if (StrUtil.isBlank(taskName)){
return null;
}
if (taskName.equals("合同签订")){ if (taskName.equals("合同签订")){
ContractInfoVo contractInfoVo = new ContractInfoVo(); ContractInfoVo contractInfoVo = new ContractInfoVo();
List<HuzhouContractinfo> planList = this.getContractinfoByprojectId(projectId); List<HuzhouContractinfo> planList = this.getContractinfoByprojectId(projectId);

2
huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouFieldchangehistoryServiceImpl.java

@ -325,12 +325,12 @@ public class HuzhouFieldchangehistoryServiceImpl extends ServiceImpl<HuzhouField
String fieldValue = oldchange.getFieldValue(); String fieldValue = oldchange.getFieldValue();
List<String> strings = HuzhouCommonUtils.extractObjectAttributes(newProjectinfo); List<String> strings = HuzhouCommonUtils.extractObjectAttributes(newProjectinfo);
for (String s : strings) { for (String s : strings) {
//ep: "Manager=GJH" manager -> Manager newValue=GJH
if (s.split("=")[0].equals(fieldValue.substring(0, 1).toUpperCase() + fieldValue.substring(1))) { if (s.split("=")[0].equals(fieldValue.substring(0, 1).toUpperCase() + fieldValue.substring(1))) {
String newValue = s.split("=")[1]; String newValue = s.split("=")[1];
oldchange.setNewvalue(newValue); oldchange.setNewvalue(newValue);
updateById(oldchange); updateById(oldchange);
} }
} }
} }
} }

Loading…
Cancel
Save