自报异常增加用户组

philip 4 years ago
parent 9bd199395d
commit 5c3b17f25f

@ -81,6 +81,9 @@ public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper,
if(StringUtil.isEmpty(taskHandle)){
throw new BaseException("保存失败,请先进行检索数据!");
}
if(StringUtil.notBlank(task.getResult())){
throw new BaseException("检验任务已经保存完成!");
}
task.setComments((String) paramMap.get("COMMENTS"));
task.setStatus(Constants.INSPECTION_TASK_STATUS_COMPLETE);
task.setModifyUser(user);

@ -376,7 +376,7 @@
SELECT nc.NC_CODE,nct.DESCRIPTION FROM NC_CODE nc
LEFT JOIN NC_CODE_T NCT ON nc.HANDLE=NCT.NC_CODE_BO AND NCT.LOCALE=#{locale}
JOIN NC_GROUP_MEMBER NGM ON nc.HANDLE=NGM.NC_CODE_OR_GROUP_GBO
WHERE NGM.NC_GROUP_BO = #{ncGroupBO}
WHERE NGM.NC_GROUP_BO = #{ncGroupBO} and nc.NC_CATEGORY='FAILURE'
<if test="globalQuery!=null and globalQuery!=''">
AND (nc.NC_CODE LIKE '%${globalQuery}%' or nct.DESCRIPTION LIKE '%${globalQuery}%')
</if>

@ -87,6 +87,7 @@ public class SelfReportServiceImpl extends ServiceImpl<SelfReportMapper, SelfRep
String ncQty = (String)map.get("ncQty");
String comments = (String)map.get("comments");
String location=(String)map.get("location");
String userGroup=(String)map.get("userGroup");
List<SelfReportRequest> list = (List<SelfReportRequest>)map.get("ncList");
ObjectMapper mapper = new ObjectMapper();
list = mapper.convertValue(list, new TypeReference<List<SelfReportRequest>>() {});
@ -109,11 +110,11 @@ public class SelfReportServiceImpl extends ServiceImpl<SelfReportMapper, SelfRep
stringBuilder.append(",");
}
}
anomalyService.createAnomalyTask(Constants.ABNORMAL_RESRCE,resrce,shopOrder,sfc,stringBuilder.toString(),location,ncQty,comments);
anomalyService.createAnomalyTask(Constants.ABNORMAL_RESRCE,resrce,shopOrder,sfc,stringBuilder.toString(),location,ncQty,comments,userGroup);
}
List<SelfReportRequest> otherAbnormalList = list.stream().filter(selfReportRequest -> selfReportRequest.getType().equals(Constants.ABNORMAL_OTHER)).collect(Collectors.toList());
if (otherAbnormalList.size()>0){
anomalyService.createAnomalyTask(Constants.ABNORMAL_RESRCE,resrce,shopOrder,sfc,"",location,ncQty,comments);
anomalyService.createAnomalyTask(Constants.ABNORMAL_RESRCE,resrce,shopOrder,sfc,"",location,ncQty,comments,userGroup);
}
QueryWrapper<SelfReport> queryWrapper=new QueryWrapper<>();
queryWrapper.eq(SelfReport.SFC,sfc);

Loading…
Cancel
Save