|
|
|
|
@ -1115,11 +1115,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
// 检测依据
|
|
|
|
|
ExamineBasis examineBasis = examineBasisService.getById(examine.getExamineBasisId()); |
|
|
|
|
String[] split = examine.getExperieNum().split(","); |
|
|
|
|
// 如果检测编号截取后长度
|
|
|
|
|
String s = "/"; |
|
|
|
|
if (split[0].split("-").length > 1) { |
|
|
|
|
s = split[0].split("-")[0]; |
|
|
|
|
} |
|
|
|
|
// 获取检测编号前缀
|
|
|
|
|
String s = getExperieNumPrefix(split[0]); |
|
|
|
|
result.put("1", s); |
|
|
|
|
result.put("2", examineResult.getDisposal()); |
|
|
|
|
result.put("3", examine.getSimpleName()); |
|
|
|
|
@ -2916,6 +2913,22 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 计算检测编号前缀 |
|
|
|
|
*/ |
|
|
|
|
private String getExperieNumPrefix(String experieNum) { |
|
|
|
|
String result = ""; |
|
|
|
|
if (experieNum != null && !"".equals(experieNum) && experieNum.split("-").length > 1) { |
|
|
|
|
String[] split = experieNum.split("-"); |
|
|
|
|
// 如:J-20221012-1,length = 3,split.length - 1 = 2,split[0]=J,split[1]=20221012,
|
|
|
|
|
for (int i = 0; i < split.length - 1; i++) { |
|
|
|
|
result += split[i] + "-"; |
|
|
|
|
} |
|
|
|
|
result = result.substring(0, result.length()-1); |
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过空格替换null |
|
|
|
|
* |
|
|
|
|
|