|
|
|
@ -260,5 +260,48 @@ public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper,
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void createCompleteTask(Map<String, Object> paramMap) {
|
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
|
String category = (String) paramMap.get("CATEGORY");
|
|
|
|
|
String sfc = (String) paramMap.get("SFC");
|
|
|
|
|
String shopOrder = (String) paramMap.get("SHOP_ORDER");
|
|
|
|
|
String operation = (String) paramMap.get("OPERATION");
|
|
|
|
|
String stepId = (String) paramMap.get("STEP_ID");
|
|
|
|
|
String itemNumber = (String) paramMap.get("ITEM_NUMBER");
|
|
|
|
|
|
|
|
|
|
String handle = "InspectionTaskBO:" + site + "," + UUID.randomUUID().toString();
|
|
|
|
|
Date date = new Date(System.currentTimeMillis());
|
|
|
|
|
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
|
|
String taskNo = "";
|
|
|
|
|
if (StringUtil.isBlank(itemNumber)) {
|
|
|
|
|
taskNo = "P_" + dateFormat1.format(date);
|
|
|
|
|
} else {
|
|
|
|
|
taskNo = "P_" + itemNumber + "_" + dateFormat1.format(date);
|
|
|
|
|
}
|
|
|
|
|
InspectionTask task = new InspectionTask();
|
|
|
|
|
task.setHandle(handle);
|
|
|
|
|
task.setSite(site);
|
|
|
|
|
task.setCategory(category);
|
|
|
|
|
task.setTaskNo(taskNo);
|
|
|
|
|
task.setStatus(Constants.INSPECTION_TASK_STATUS_COMPLETE);
|
|
|
|
|
task.setResrce(Constants.RSESULT_OK);
|
|
|
|
|
task.setDescription("专检检验任务");
|
|
|
|
|
task.setInspectionItemBo( null);
|
|
|
|
|
task.setShopOrder(shopOrder);
|
|
|
|
|
task.setWorkCenter((String) paramMap.get("WORK_CENTER"));
|
|
|
|
|
task.setSfc(sfc);
|
|
|
|
|
task.setOperation(operation);
|
|
|
|
|
task.setStepId(stepId);
|
|
|
|
|
task.setResrce((String) paramMap.get("RESRCE"));
|
|
|
|
|
task.setCreateUser(CommonMethods.getUser());
|
|
|
|
|
task.setCreatedDateTime(LocalDateTime.now());
|
|
|
|
|
task.setModifyUser(CommonMethods.getUser());
|
|
|
|
|
task.setModifiedDateTime(LocalDateTime.now());
|
|
|
|
|
task.setSfcDispatchBo((String) paramMap.get("SFC_DISPATCH_DETAIL_BO"));
|
|
|
|
|
task.setSfc(sfc);
|
|
|
|
|
save(task);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|