|
@@ -46,8 +46,9 @@ import com.factory.web.entity.pm.req.OnsiteWorkshopReq;
|
|
|
import com.factory.web.entity.pm.req.PmPlanPauseFlagReq;
|
|
|
import com.factory.web.entity.pm.req.SearchAllWorkshopReq;
|
|
|
import com.factory.web.entity.pm.req.SearchApprovalUserReq;
|
|
|
+import com.factory.web.entity.pm.req.SearchCheckRecordReq;
|
|
|
+import com.factory.web.entity.pm.req.SearchPmCheckRecordListReq;
|
|
|
import com.factory.web.entity.pm.req.SearchPmItemNoGoListReq;
|
|
|
-import com.factory.web.entity.pm.req.SearchPmItemResultListReq;
|
|
|
import com.factory.web.entity.pm.req.SearchPmPlanCheckListReq;
|
|
|
import com.factory.web.entity.pm.req.SearchPmPlanListForPadReq;
|
|
|
import com.factory.web.entity.pm.req.SearchPmPlanListReq;
|
|
@@ -58,8 +59,10 @@ import com.factory.web.entity.pm.req.SearchWorkshopReq;
|
|
|
import com.factory.web.entity.pm.res.ApprovalUserRes;
|
|
|
import com.factory.web.entity.pm.res.PmAllWorkshopListRes;
|
|
|
import com.factory.web.entity.pm.res.PmCheckListRes;
|
|
|
+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.PmItemResultListRes;
|
|
|
+import com.factory.web.entity.pm.res.PmNoGoTaskAapprovalRes;
|
|
|
import com.factory.web.entity.pm.res.PmPlanListForPadRes;
|
|
|
import com.factory.web.entity.pm.res.PmPlanListRes;
|
|
|
import com.factory.web.entity.pm.res.PmPlanRes;
|
|
@@ -140,17 +143,16 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
return ResponseBeanBuilder.fail("计划名称已存在");
|
|
|
}
|
|
|
|
|
|
- /* 添加放错计划 */
|
|
|
- // TODO 计划生效日期
|
|
|
+ /* 添加防错计划 */
|
|
|
BentelerPlan plan = BentelerPlan.builder()
|
|
|
.planType(PlanType.防错.value)
|
|
|
.name(req.getBentelerPlanName())
|
|
|
.pauseFlag(false)
|
|
|
+ .effectiveDate(req.getEffectiveDate())
|
|
|
.build();
|
|
|
planService.save(plan);
|
|
|
|
|
|
/* 添加日周月点检规则 */
|
|
|
- // TODO 确认个别字段没传或是空串的情况
|
|
|
List<OnsiteCalendarReq> onsiteCalendarList = req.getOnsiteCalendarList();
|
|
|
for (OnsiteCalendarReq onsiteCalendarReq : onsiteCalendarList) {
|
|
|
OnsiteCalendar onsiteCalendar = OnsiteCalendar.builder()
|
|
@@ -337,6 +339,7 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
pmPlanRes.setBentelerPlanId(plan.getId());
|
|
|
pmPlanRes.setBentelerPlanName(plan.getName());
|
|
|
pmPlanRes.setPlanType(plan.getPlanType());
|
|
|
+ pmPlanRes.setEffectiveDate(plan.getEffectiveDate());;
|
|
|
|
|
|
List<OnsiteCalendar> onsiteCalendarList = onsiteCalendarService.list(Wrappers.<OnsiteCalendar>lambdaQuery()
|
|
|
.eq(OnsiteCalendar::getBentelerPlanId, plan.getId()));
|
|
@@ -432,10 +435,10 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
// }
|
|
|
|
|
|
/* 修改防错计划 */
|
|
|
- // TODO 计划生效日期
|
|
|
BentelerPlan plan = BentelerPlan.builder()
|
|
|
.id(req.getBentelerPlanId())
|
|
|
.name(req.getBentelerPlanName())
|
|
|
+ .effectiveDate(req.getEffectiveDate())
|
|
|
.build();
|
|
|
planService.updateById(plan);
|
|
|
|
|
@@ -560,9 +563,22 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
* @return 检查记录列表
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseBean<List<PmItemResultListRes>> getPmItemResultList(SearchPmItemResultListReq req) {
|
|
|
- List<PmItemResultListRes> listRes = preventMistakeMapper.getPmItemResultList(req);
|
|
|
- return ResponseBeanBuilder.ok(listRes, Function.identity());
|
|
|
+ public ResponseBean<List<PmCheckRecordListRes>> getPmCheckRecordList(SearchPmCheckRecordListReq req) {
|
|
|
+ SearchPmPlanReq workshopItemReq = new SearchPmPlanReq();
|
|
|
+ workshopItemReq.setBentelerPlanId(req.getBentelerPlanId());
|
|
|
+ List<PmCheckRecordListRes> workshopItemList = preventMistakeMapper.getPmWorkshopItemList(workshopItemReq);
|
|
|
+
|
|
|
+ for (PmCheckRecordListRes workshopItem : workshopItemList) {
|
|
|
+ SearchCheckRecordReq itemResultReq = new SearchCheckRecordReq();
|
|
|
+ itemResultReq.setOnsiteItemId(workshopItem.getOnsiteItemId());
|
|
|
+ itemResultReq.setYearMonth(req.getYearMonth());
|
|
|
+ itemResultReq.setTypeFlag(req.getTypeFlag());
|
|
|
+ List<PmCheckRecordRes> itemResultList = preventMistakeMapper.getPmItemResultList(itemResultReq);
|
|
|
+
|
|
|
+ workshopItem.setCheckRecordList(itemResultList);
|
|
|
+ }
|
|
|
+
|
|
|
+ return ResponseBeanBuilder.ok(workshopItemList, Function.identity());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -753,6 +769,18 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
List<PmItemNoGoListRes> pmItemNoGoList = preventMistakeMapper.getPmItemNoGoList(req);
|
|
|
return ResponseBeanBuilder.ok(pmItemNoGoList, Function.identity());
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 取得不放行任务对应的质量经理审批信息
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @return 不放行任务对应的质量经理审批信息
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public ResponseBean<PmNoGoTaskAapprovalRes> getPmNoGoTaskAapproval(SearchTaskReq req) {
|
|
|
+ PmNoGoTaskAapprovalRes pmNoGoTaskAapprovalRes = preventMistakeMapper.getPmNoGoTaskAapproval(req);
|
|
|
+ return ResponseBeanBuilder.ok(pmNoGoTaskAapprovalRes);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 修改巡检项目检查结果(这里只有重检走这里)
|
|
@@ -760,6 +788,7 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
* @param req
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Override
|
|
|
public ResponseBean editItemResult(EditItemResultListReq req) {
|
|
|
// /* 任务和巡检结果记录历史 */
|
|
|
// PmTaskRes pmTaskRes = new PmTaskRes();
|
|
@@ -832,6 +861,7 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
* @param onsiteTaskId
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void setOnsiteTaskHis(Long onsiteTaskId) {
|
|
|
/* 任务和巡检结果记录历史 */
|
|
|
PmTaskRes pmTaskRes = new PmTaskRes();
|
|
@@ -864,6 +894,7 @@ public class PreventMistakeServiceImpl extends ServiceImpl<PreventMistakeMapper,
|
|
|
* @param req
|
|
|
* @return 所有工作站
|
|
|
*/
|
|
|
+ @Override
|
|
|
public ResponseBean<List<PmAllWorkshopListRes>> getAllWorkshopList(SearchAllWorkshopReq req) {
|
|
|
QueryWrapper<OnsiteWorkshop> queryWrapper = new QueryWrapper<>();
|
|
|
if (req.getWsName() != null && !"".equals(req.getWsName())) {
|