|
@@ -1140,7 +1140,7 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
//根据INSPECTIONCOMPLATETIM 取最新的一条数据
|
|
|
LambdaQueryWrapper<ZhcxInsideInspectionDo> queryWrapper = Wrappers.lambdaQuery();
|
|
|
queryWrapper.eq(ZhcxInsideInspectionDo::getProjectcode, projectCode)
|
|
|
- .eq(ZhcxInsideInspectionDo::getInspectioncontent, inspectionPoint)
|
|
|
+ .apply("FIND_IN_SET({0}, inspectioncontent) > 0", inspectionPoint) // 关键修改
|
|
|
.eq(ZhcxInsideInspectionDo::getInspectionstatus, "30")
|
|
|
.orderByDesc(ZhcxInsideInspectionDo::getInspectioncomplatetime)
|
|
|
.last("limit 1");
|
|
@@ -1153,21 +1153,28 @@ public class ZhcxInsideInspectionServiceImpl extends ServiceImpl<ZhcxInsideInspe
|
|
|
LambdaQueryWrapper<ZhcxInsideInspectionDispatchDo> disQueryWrapper = Wrappers.lambdaQuery();
|
|
|
disQueryWrapper.eq(ZhcxInsideInspectionDispatchDo::getInsideid, inside.getId());
|
|
|
ZhcxInsideInspectionDispatchDo dispatchDo = dispatchService.getOne(disQueryWrapper);
|
|
|
-
|
|
|
+ // 提取匹配的具体点值
|
|
|
+ String matchedPoint = Arrays.stream(inside.getInspectioncontent().split(","))
|
|
|
+ .map(String::trim)
|
|
|
+ .filter(item -> item.equals(inspectionPoint))
|
|
|
+ .findFirst()
|
|
|
+ .orElse(inspectionPoint);
|
|
|
if (ObjectUtil.isNotEmpty(dispatchDo)) {
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
data.put("projectcode", inside.getProjectcode());
|
|
|
- data.put("inspectionpoint", inside.getInspectioncontent());
|
|
|
+ data.put("inspectionpoint", matchedPoint);
|
|
|
data.put("inspectioncode", inside.getInspectioncode());
|
|
|
data.put("result", dispatchDo.getInspectionconclusion());
|
|
|
+ data.put("checkername",inside.getCheckername());
|
|
|
+ data.put("checkendtime",dispatchDo.getCheckendtime());
|
|
|
return R.ok(data);
|
|
|
}else {
|
|
|
//如果没有查到完工报验结果 返回-2
|
|
|
- return R.ok("-2","未查到完工报验结果");
|
|
|
+ return R.ok("-2","报验单还未检验");
|
|
|
}
|
|
|
}else {
|
|
|
//如果没有查到inside 返回 -1
|
|
|
- return R.ok("-1","未查到报验内容");
|
|
|
+ return R.ok("-1","未查到报验单");
|
|
|
}
|
|
|
}
|
|
|
|