|
@@ -1561,6 +1561,18 @@ public class ReportController {
|
|
|
}
|
|
|
//针对泓浒(苏州),需要按照工单号的部门来设置工时所属部门,同时设置是否是协作工时
|
|
|
if (Constant.HONG_HU_COMPANY_ID == company.getId()) {
|
|
|
+ for (Report report : reportList) {
|
|
|
+ //校验分组为车间的分组时,工单号是否必填
|
|
|
+ if (report.getGroupId() != null) {
|
|
|
+ String groupName = taskGroupService.getById(report.getGroupId()).getName();
|
|
|
+ if (groupName.contains("车间") && StringUtils.isEmpty(report.getExtraField4())) {
|
|
|
+ HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
+ httpRespMsg.setError("当前选择了带车间的工时分组,对应的工单号必填");
|
|
|
+ return httpRespMsg;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
List<String> collect = reportList.stream().filter(r -> !StringUtils.isEmpty(r.getExtraField4())).map(Report::getExtraField4).collect(Collectors.toList());
|
|
|
if (collect.size() > 0) {
|
|
|
List<ErpOrderInfo> orderList = erpOrderInfoMapper.selectList(new QueryWrapper<ErpOrderInfo>().in("order_id", collect));
|