|
@@ -4,6 +4,7 @@ import java.io.ByteArrayInputStream;
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
import java.io.ObjectInputStream;
|
|
|
import java.io.ObjectOutputStream;
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.function.Function;
|
|
@@ -63,6 +64,7 @@ import com.factory.web.entity.pm.res.PmCheckRecordListRes;
|
|
|
import com.factory.web.entity.pm.res.PmCheckRecordRes;
|
|
|
import com.factory.web.entity.pm.res.PmItemNoGoListRes;
|
|
|
import com.factory.web.entity.pm.res.PmNoGoTaskAapprovalRes;
|
|
|
+import com.factory.web.entity.pm.res.PmPlanCheckListRes;
|
|
|
import com.factory.web.entity.pm.res.PmPlanListForPadRes;
|
|
|
import com.factory.web.entity.pm.res.PmPlanListRes;
|
|
|
import com.factory.web.entity.pm.res.PmPlanRes;
|
|
@@ -83,6 +85,8 @@ import com.factory.web.service.pm.OnsiteTitleBlobService;
|
|
|
import com.factory.web.service.pm.OnsiteWorkshopService;
|
|
|
import com.factory.web.service.pm.PreventMistakeService;
|
|
|
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 防错计划
|
|
@@ -264,9 +268,9 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
* @return 防错计划点检列表
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseBean<PageBean<PmPlanListRes>> getPmPlanCheckList(SearchPmPlanCheckListReq req) {
|
|
|
- Page<PmPlanListRes> page = new Page<>(req.getPage(), req.getSize());
|
|
|
- Page<PmPlanListRes> listResPage = preventMistakeMapper.getPmPlanCheckList(page, req);
|
|
|
+ public ResponseBean<PageBean<PmPlanCheckListRes>> getPmPlanCheckList(SearchPmPlanCheckListReq req) {
|
|
|
+ Page<PmPlanCheckListRes> page = new Page<>(req.getPage(), req.getSize());
|
|
|
+ Page<PmPlanCheckListRes> listResPage = preventMistakeMapper.getPmPlanCheckList(page, req);
|
|
|
return ResponseBeanBuilder.ok(listResPage, Function.identity());
|
|
|
}
|
|
|
|
|
@@ -280,6 +284,19 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
public ResponseBean<PageBean<PmPlanListRes>> getPmPlanList(SearchPmPlanListReq req) {
|
|
|
Page<PmPlanListRes> page = new Page<>(req.getPage(), req.getSize());
|
|
|
Page<PmPlanListRes> listResPage = preventMistakeMapper.getPmPlanList(page, req);
|
|
|
+
|
|
|
+ SearchPmPlanReq searchPmPlanReq = null;
|
|
|
+ for (PmPlanListRes pmPlan : listResPage.getRecords()) {
|
|
|
+ searchPmPlanReq = new SearchPmPlanReq();
|
|
|
+ searchPmPlanReq.setBentelerPlanId(pmPlan.getBentelerPlanId());
|
|
|
+ OnsiteApprovalPlan latestApprovalInfo = this.getLatestApprovalInfo(searchPmPlanReq);
|
|
|
+
|
|
|
+ pmPlan.setApprovalLevel(latestApprovalInfo.getApprovalLevel());
|
|
|
+ pmPlan.setApprovalUserId(latestApprovalInfo.getApprovalUserId());
|
|
|
+ pmPlan.setStatus(latestApprovalInfo.getStatus());
|
|
|
+ pmPlan.setReason(latestApprovalInfo.getReason());
|
|
|
+ pmPlan.setUpdatedTime(latestApprovalInfo.getUpdatedTime());
|
|
|
+ }
|
|
|
|
|
|
// // TODO 测一下status值是都设置成功
|
|
|
// SearchPmPlanReq searchPmPlanReq = null;
|
|
@@ -915,6 +932,16 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
}
|
|
|
return ResponseBeanBuilder.ok(pmAllWorkshopList, Function.identity());
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 取得计划的最新审批信息
|
|
|
+ * @param req
|
|
|
+ * @return 计划的最新审批信息
|
|
|
+ */
|
|
|
+ public OnsiteApprovalPlan getLatestApprovalInfo(SearchPmPlanReq req) {
|
|
|
+ OnsiteApprovalPlan onsiteApprovalPlan = preventMistakeMapper.getLatestApprovalInfo(req);
|
|
|
+ return onsiteApprovalPlan;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/**
|