From 512778b744aa7c4e1a521d2b9f92f459677df8a3 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 20 Jul 2021 16:54:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/common/enums/HandleEnum.java | 4 +- .../ResourceInspectPlanController.java | 3 + .../ResourceInspectTaskController.java | 39 ++- .../equip/dto/ResourceInspectTaskDto.java | 20 +- .../mapper/ResourceInspectTaskMapper.java | 26 +- .../equip/model/ResourceInspectTask.java | 175 +++++++++----- .../service/ResourceInspectTaskService.java | 7 +- .../impl/ResourceInspectPlanServiceImpl.java | 109 ++++----- .../impl/ResourceInspectTaskServiceImpl.java | 17 +- .../mapper/ResourceInspectTaskMapper.xml | 223 ++++++++++++------ 10 files changed, 380 insertions(+), 243 deletions(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java b/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java index fe15c86e..509e2ee1 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java @@ -81,8 +81,8 @@ public enum HandleEnum { /**设备检验计划**/ RESOURCE_INSPECT_PLAN("ResourceInspectPlanBo","ResourceInspectPlanBo:{0},{1},{2}"), - /**设备检验计划的设备清单**/ - RESOURCE_INSPECT_RESOURCE("ResourceInspectResourceBo","ResourceInspectResourceBo:{0},{1}"), + /**设备检验计划的设备清单:站点,点检计划HANDLE,设备HANDLE**/ + RESOURCE_INSPECT_RESOURCE("ResourceInspectResourceBo","ResourceInspectResourceBo:{0},{1},{2}"), /**设备检验任务**/ RESOURCE_INSPECT_TASK("ResourceInspectTaskBo","ResourceInspectTaskBo:{0},{1}"), diff --git a/equip/src/main/java/com/foreverwin/mesnac/equip/controller/ResourceInspectPlanController.java b/equip/src/main/java/com/foreverwin/mesnac/equip/controller/ResourceInspectPlanController.java index e280561b..13383658 100644 --- a/equip/src/main/java/com/foreverwin/mesnac/equip/controller/ResourceInspectPlanController.java +++ b/equip/src/main/java/com/foreverwin/mesnac/equip/controller/ResourceInspectPlanController.java @@ -2,6 +2,7 @@ package com.foreverwin.mesnac.equip.controller; import com.foreverwin.mesnac.common.service.InspectionItemDetailService; import com.foreverwin.mesnac.common.service.InspectionItemService; +import com.foreverwin.modular.core.util.CommonMethods; import com.foreverwin.modular.core.util.R; import com.foreverwin.modular.core.util.FrontPage; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -52,6 +53,8 @@ public class ResourceInspectPlanController { @ResponseBody @GetMapping("") public R getResourceInspectPlanList(ResourceInspectPlan resourceInspectPlan){ + String site = CommonMethods.getSite(); + resourceInspectPlan.setSite(site); List result; QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.setEntity(resourceInspectPlan); diff --git a/equip/src/main/java/com/foreverwin/mesnac/equip/controller/ResourceInspectTaskController.java b/equip/src/main/java/com/foreverwin/mesnac/equip/controller/ResourceInspectTaskController.java index 468ad33a..980d9955 100644 --- a/equip/src/main/java/com/foreverwin/mesnac/equip/controller/ResourceInspectTaskController.java +++ b/equip/src/main/java/com/foreverwin/mesnac/equip/controller/ResourceInspectTaskController.java @@ -13,14 +13,12 @@ import org.springframework.web.bind.annotation.*; import com.foreverwin.mesnac.equip.service.ResourceInspectTaskService; import com.foreverwin.mesnac.equip.model.ResourceInspectTask; - -import java.time.LocalDateTime; import java.util.List; /** * - * @author pavel.Liu - * @since 2021-07-01 + * @author pavel_liu + * @since 2021-07-20 */ @RestController @RequestMapping("/Z-RESOURCE-INSPECT-TASK") @@ -74,16 +72,18 @@ public class ResourceInspectTaskController { .like(ResourceInspectTask::getHandle, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getSite, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getTaskNo, frontPage.getGlobalQuery()) - .or().like(ResourceInspectTask::getCategory, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getDescription, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getStatus, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getResourceInspectPlanBo, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getInspectionItemBo, frontPage.getGlobalQuery()) - .or().like(ResourceInspectTask::getResourceBo, frontPage.getGlobalQuery()) - .or().like(ResourceInspectTask::getExecutor, frontPage.getGlobalQuery()) + .or().like(ResourceInspectTask::getResrce, frontPage.getGlobalQuery()) + .or().like(ResourceInspectTask::getCategory, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getResult, frontPage.getGlobalQuery()) - .or().like(ResourceInspectTask::getRemark, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getReason, frontPage.getGlobalQuery()) + .or().like(ResourceInspectTask::getExecutor, frontPage.getGlobalQuery()) + .or().like(ResourceInspectTask::getRemark, frontPage.getGlobalQuery()) + .or().like(ResourceInspectTask::getScheduleType, frontPage.getGlobalQuery()) + .or().like(ResourceInspectTask::getFrequencyUnit, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getCreateUser, frontPage.getGlobalQuery()) .or().like(ResourceInspectTask::getModifyUser, frontPage.getGlobalQuery()) ); @@ -134,6 +134,7 @@ public class ResourceInspectTaskController { return R.ok(resourceInspectTaskService.removeByIds(ids)); } + /** * 模糊查询检验任务 * @param resourceInspectTaskDto @@ -144,7 +145,7 @@ public class ResourceInspectTaskController { public R findResourceInspectTaskList(ResourceInspectTaskDto resourceInspectTaskDto){ String site = CommonMethods.getSite(); String planNo = resourceInspectTaskDto.getPlanNo(); - String resourceNo = resourceInspectTaskDto.getResourceNo(); + String resourceNo = resourceInspectTaskDto.getResrce(); String resourceTypeNo = resourceInspectTaskDto.getResourceTypeNo(); String workCenter = resourceInspectTaskDto.getWorkCenter(); if (planNo != null){ @@ -177,13 +178,11 @@ public class ResourceInspectTaskController { @ResponseBody @GetMapping("/getAndCreateTaskParamList") public R getOrCreateTaskParamList(ResourceInspectTask resourceInspectTask){ - ResourceInspectTask inspectTask; try { - inspectTask = resourceInspectTaskService.getResourceInspectTaskAll(resourceInspectTask); + return R.ok(resourceInspectTaskService.getResourceInspectTaskAll(resourceInspectTask)); }catch (Exception e){ return R.failed("获取数据失败" + e.getMessage()); } - return R.ok(inspectTask); } /** @@ -212,17 +211,13 @@ public class ResourceInspectTaskController { */ @PostMapping ("/saveOrUpdateTaskInfo") public R saveOrUpdateTaskInfo(@RequestBody ResourceInspectTaskDto resourceInspectTaskDto){ - String user = CommonMethods.getUser(); - String executor = resourceInspectTaskDto.getExecutor(); - if (user.equals(executor)){ - try { - resourceInspectTaskService.saveOrUpdateTaskInfo(resourceInspectTaskDto); - }catch (Exception e){ - return R.failed("数据保存失败" + e.getMessage()); - } - return R.ok(); + try { + resourceInspectTaskService.saveOrUpdateTaskInfo(resourceInspectTaskDto); + }catch (Exception e){ + return R.failed("数据保存失败" + e.getMessage()); } - return R.failed("当前操作用户与执行人不一致,无法保存!!!"); + return R.ok(); } + } \ No newline at end of file diff --git a/equip/src/main/java/com/foreverwin/mesnac/equip/dto/ResourceInspectTaskDto.java b/equip/src/main/java/com/foreverwin/mesnac/equip/dto/ResourceInspectTaskDto.java index 34790600..5adea033 100644 --- a/equip/src/main/java/com/foreverwin/mesnac/equip/dto/ResourceInspectTaskDto.java +++ b/equip/src/main/java/com/foreverwin/mesnac/equip/dto/ResourceInspectTaskDto.java @@ -59,7 +59,7 @@ public class ResourceInspectTaskDto implements Serializable { /**检索时间段的结束时间**/ private String compareEndDate; /**设备编号NO**/ - private String resourceNo; + private String resrce; /**设备描述**/ private String resourceDescription; /**设备类型编号NO**/ @@ -87,7 +87,7 @@ public class ResourceInspectTaskDto implements Serializable { /**任务检验项明细**/ private List taskItemDetailList; /**消耗备品**/ - private List taskSpareList; + private List spareList; public Integer getItemSeq() { return itemSeq; @@ -121,23 +121,23 @@ public class ResourceInspectTaskDto implements Serializable { this.taskItemDetailList = taskItemDetailList; } - public List getTaskSpareList() { - return taskSpareList; + public List getSpareList() { + return spareList; } - public void setTaskSpareList(List taskSpareList) { - this.taskSpareList = taskSpareList; + public void setSpareList(List spareList) { + this.spareList = spareList; } public ResourceInspectTaskDto() { } - public String getResourceNo() { - return resourceNo; + public String getResrce() { + return resrce; } - public void setResourceNo(String resourceNo) { - this.resourceNo = resourceNo; + public void setResrce(String resrce) { + this.resrce = resrce; } public String getResourceDescription() { diff --git a/equip/src/main/java/com/foreverwin/mesnac/equip/mapper/ResourceInspectTaskMapper.java b/equip/src/main/java/com/foreverwin/mesnac/equip/mapper/ResourceInspectTaskMapper.java index 7bc37b0d..c20fc4e9 100644 --- a/equip/src/main/java/com/foreverwin/mesnac/equip/mapper/ResourceInspectTaskMapper.java +++ b/equip/src/main/java/com/foreverwin/mesnac/equip/mapper/ResourceInspectTaskMapper.java @@ -10,14 +10,15 @@ import java.util.List; /** *

- * 设备检验任务表 Mapper 接口 + * 设备点检任务表 Mapper 接口 *

* - * @author pavel.Liu - * @since 2021-07-01 + * @author pavel_liu + * @since 2021-07-20 */ @Repository public interface ResourceInspectTaskMapper extends BaseMapper { + /** * 自定义方法:查询检验任务---检验任务总览 * @param resourceInspectTaskDto @@ -25,7 +26,24 @@ public interface ResourceInspectTaskMapper extends BaseMapper findResourceInspectTaskList(ResourceInspectTaskDto resourceInspectTaskDto); - LocalDateTime selectMaxCreateTimeByPlanBoAnd(ResourceInspectTask resourceInspectTask); + /** + * 根据点检计划handle、设备handle,查询处理中DOING、新建NEW的点检任务 + * @param resourceInspectTask + * @return + */ + List getInspectTaskList(ResourceInspectTask resourceInspectTask); + /** + * 查找最新的任务创建时间 + * @param resourceInspectTask + * @return + */ + LocalDateTime selectMaxCreateTimeByPlanBoAnd(ResourceInspectTask resourceInspectTask); + /** + * 查询处理中的点检任务的最新创建时间 + * @param resourceInspectTask + * @return + */ + LocalDateTime getMaxCreateTimeByStatus(ResourceInspectTask resourceInspectTask); } \ No newline at end of file diff --git a/equip/src/main/java/com/foreverwin/mesnac/equip/model/ResourceInspectTask.java b/equip/src/main/java/com/foreverwin/mesnac/equip/model/ResourceInspectTask.java index fa369638..ad7becff 100644 --- a/equip/src/main/java/com/foreverwin/mesnac/equip/model/ResourceInspectTask.java +++ b/equip/src/main/java/com/foreverwin/mesnac/equip/model/ResourceInspectTask.java @@ -14,11 +14,11 @@ import com.baomidou.mybatisplus.annotation.IdType; /** *

- * 设备检验任务表 + * 设备点检任务表 *

* - * @author pavel.Liu - * @since 2021-07-01 + * @author pavel_liu + * @since 2021-07-20 */ @TableName("Z_RESOURCE_INSPECT_TASK") @@ -42,11 +42,6 @@ public class ResourceInspectTask extends Model { */ @TableField("TASK_NO") private String taskNo; - /** - * 类型(自动AUTO/手动) - */ - @TableField("CATEGORY") - private String category; /** * 任务描述 */ @@ -68,10 +63,15 @@ public class ResourceInspectTask extends Model { @TableField("INSPECTION_ITEM_BO") private String inspectionItemBo; /** - * 设备HANDLE + * 设备编号 */ - @TableField("RESOURCE_BO") - private String resourceBo; + @TableField("RESRCE") + private String resrce; + /** + * 点检类型 + */ + @TableField("CATEGORY") + private String category; /** * 任务创建时间 */ @@ -97,26 +97,41 @@ public class ResourceInspectTask extends Model { */ @TableField("ACTUAL_COMPLETE_DATE") private LocalDateTime actualCompleteDate; - /** - * 执行人 - */ - @TableField("EXECUTOR") - private String executor; /** * 检验结果 */ @TableField("RESULT") private String result; + /** + * 取消原因 + */ + @TableField("REASON") + private String reason; + /** + * 执行人 + */ + @TableField("EXECUTOR") + private String executor; /** * 备注 */ @TableField("REMARK") private String remark; /** - * 取消原因 + * 排程方式(周期/执行间隔时间) */ - @TableField("REASON") - private String reason; + @TableField("SCHEDULE_TYPE") + private String scheduleType; + /** + * 频率 + */ + @TableField("FREQUENCY") + private Double frequency; + /** + * 频率单位(M月W周D日H时F分S秒) + */ + @TableField("FREQUENCY_UNIT") + private String frequencyUnit; /** * 创建人 */ @@ -142,7 +157,18 @@ public class ResourceInspectTask extends Model { private List taskItemDetailList; @TableField(exist = false) - private List taskSpareList; + private List spareList; + + @TableField(exist = false) + private String ResourceBo; + + public String getResourceBo() { + return ResourceBo; + } + + public void setResourceBo(String resourceBo) { + ResourceBo = resourceBo; + } public List getTaskItemDetailList() { return taskItemDetailList; @@ -152,12 +178,12 @@ public class ResourceInspectTask extends Model { this.taskItemDetailList = taskItemDetailList; } - public List getTaskSpareList() { - return taskSpareList; + public List getSpareList() { + return spareList; } - public void setTaskSpareList(List taskSpareList) { - this.taskSpareList = taskSpareList; + public void setSpareList(List spareList) { + this.spareList = spareList; } public String getHandle() { @@ -184,14 +210,6 @@ public class ResourceInspectTask extends Model { this.taskNo = taskNo; } - public String getCategory() { - return category; - } - - public void setCategory(String category) { - this.category = category; - } - public String getDescription() { return description; } @@ -224,12 +242,20 @@ public class ResourceInspectTask extends Model { this.inspectionItemBo = inspectionItemBo; } - public String getResourceBo() { - return resourceBo; + public String getResrce() { + return resrce; } - public void setResourceBo(String resourceBo) { - this.resourceBo = resourceBo; + public void setResrce(String resrce) { + this.resrce = resrce; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; } public LocalDateTime getTaskCreateDate() { @@ -272,14 +298,6 @@ public class ResourceInspectTask extends Model { this.actualCompleteDate = actualCompleteDate; } - public String getExecutor() { - return executor; - } - - public void setExecutor(String executor) { - this.executor = executor; - } - public String getResult() { return result; } @@ -288,6 +306,22 @@ public class ResourceInspectTask extends Model { this.result = result; } + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public String getExecutor() { + return executor; + } + + public void setExecutor(String executor) { + this.executor = executor; + } + public String getRemark() { return remark; } @@ -296,12 +330,28 @@ public class ResourceInspectTask extends Model { this.remark = remark; } - public String getReason() { - return reason; + public String getScheduleType() { + return scheduleType; } - public void setReason(String reason) { - this.reason = reason; + public void setScheduleType(String scheduleType) { + this.scheduleType = scheduleType; + } + + public Double getFrequency() { + return frequency; + } + + public void setFrequency(Double frequency) { + this.frequency = frequency; + } + + public String getFrequencyUnit() { + return frequencyUnit; + } + + public void setFrequencyUnit(String frequencyUnit) { + this.frequencyUnit = frequencyUnit; } public String getCreateUser() { @@ -342,8 +392,6 @@ public static final String SITE = "SITE"; public static final String TASK_NO = "TASK_NO"; -public static final String CATEGORY = "CATEGORY"; - public static final String DESCRIPTION = "DESCRIPTION"; public static final String STATUS = "STATUS"; @@ -352,7 +400,9 @@ public static final String RESOURCE_INSPECT_PLAN_BO = "RESOURCE_INSPECT_PLAN_BO" public static final String INSPECTION_ITEM_BO = "INSPECTION_ITEM_BO"; -public static final String RESOURCE_BO = "RESOURCE_BO"; +public static final String RESRCE = "RESRCE"; + +public static final String CATEGORY = "CATEGORY"; public static final String TASK_CREATE_DATE = "TASK_CREATE_DATE"; @@ -364,13 +414,19 @@ public static final String ACTUAL_START_DATE = "ACTUAL_START_DATE"; public static final String ACTUAL_COMPLETE_DATE = "ACTUAL_COMPLETE_DATE"; -public static final String EXECUTOR = "EXECUTOR"; - public static final String RESULT = "RESULT"; +public static final String REASON = "REASON"; + +public static final String EXECUTOR = "EXECUTOR"; + public static final String REMARK = "REMARK"; -public static final String REASON = "REASON"; +public static final String SCHEDULE_TYPE = "SCHEDULE_TYPE"; + +public static final String FREQUENCY = "FREQUENCY"; + +public static final String FREQUENCY_UNIT = "FREQUENCY_UNIT"; public static final String CREATE_USER = "CREATE_USER"; @@ -392,21 +448,24 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME"; "handle = " + handle + ", site = " + site + ", taskNo = " + taskNo + - ", category = " + category + ", description = " + description + ", status = " + status + ", resourceInspectPlanBo = " + resourceInspectPlanBo + ", inspectionItemBo = " + inspectionItemBo + - ", resourceBo = " + resourceBo + + ", resrce = " + resrce + + ", category = " + category + ", taskCreateDate = " + taskCreateDate + ", planStartDate = " + planStartDate + ", planCompleteDate = " + planCompleteDate + ", actualStartDate = " + actualStartDate + ", actualCompleteDate = " + actualCompleteDate + - ", executor = " + executor + ", result = " + result + - ", remark = " + remark + ", reason = " + reason + + ", executor = " + executor + + ", remark = " + remark + + ", scheduleType = " + scheduleType + + ", frequency = " + frequency + + ", frequencyUnit = " + frequencyUnit + ", createUser = " + createUser + ", createdDateTime = " + createdDateTime + ", modifyUser = " + modifyUser + diff --git a/equip/src/main/java/com/foreverwin/mesnac/equip/service/ResourceInspectTaskService.java b/equip/src/main/java/com/foreverwin/mesnac/equip/service/ResourceInspectTaskService.java index 32325ea8..044fa81d 100644 --- a/equip/src/main/java/com/foreverwin/mesnac/equip/service/ResourceInspectTaskService.java +++ b/equip/src/main/java/com/foreverwin/mesnac/equip/service/ResourceInspectTaskService.java @@ -10,11 +10,11 @@ import java.util.List; /** *

- * 设备检验任务表 服务类 + * 设备点检任务表 服务类 *

* - * @author pavel.Liu - * @since 2021-06-24 + * @author pavel_liu + * @since 2021-07-20 */ public interface ResourceInspectTaskService extends IService { @@ -55,5 +55,4 @@ public interface ResourceInspectTaskService extends IService equips = resourceInspectPlan.getMaintainPlanEquipList(); - if (equips.size()<1||equips.equals(null)){ + if (equips == null || equips.size() < 1){ throw BusinessException.build("未添加设备!!!"); } + Collection resourceColl = new ArrayList<>(); for (ResourceInspectResource equip: equips) { equip.setResourceInspectPlanBo(handle); equip.setCreateUser(user); equip.setCreatedDateTime(LocalDateTime.now()); - equip.setHandle(handle+";"+equip.getResourceBo()); - resourceInspectResourceService.save(equip); + equip.setHandle(HandleEnum.RESOURCE_INSPECT_RESOURCE.getHandle(site,handle,equip.getResourceBo())); + resourceColl.add(equip); } + resourceInspectResourceService.saveBatch(resourceColl); // 保存用户组清单 List userGroups = resourceInspectPlan.getInspectPlanUserGroupList(); - if (userGroups.size()>0||userGroups!=null){ + if (userGroups != null && userGroups.size() > 0){ + Collection userGroupColl = new ArrayList<>(); for (InspectPlanUserGroup userGroup: userGroups) { userGroup.setResourceInspectPlanBo(handle); userGroup.setCreateUser(user); userGroup.setCreatedDateTime(LocalDateTime.now()); userGroup.setHandle(handle+";"+userGroup.getUserGroupBo()); - inspectPlanUserGroupService.save(userGroup); + userGroupColl.add(userGroup); } + inspectPlanUserGroupService.saveBatch(userGroupColl); } + // 保存或更新点检计划 resourceInspectPlanService.saveOrUpdate(resourceInspectPlan); // 当更新/保存计划时,自动创建任务 // 计划是否启用,非启用状态不创建 @@ -162,26 +167,25 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl planWrapper = new QueryWrapper<>(); - planWrapper.setEntity(resourceInspectPlan); - List planList = resourceInspectPlanService.list(planWrapper); -// ResourceInspectPlan inspectPlanById = resourceInspectPlanService.getById(resourceInspectPlan.getHandle()); - if (planList.size()<1||planList==null){ + String planNo = resourceInspectPlan.getPlanNo(); + String revision = resourceInspectPlan.getRevision(); + String site = resourceInspectPlan.getSite(); + String handle = HandleEnum.RESOURCE_INSPECT_PLAN.getHandle(site, planNo, revision); + ResourceInspectPlan inspectPlanById = resourceInspectPlanService.getById(handle); + if (inspectPlanById == null){ throw BusinessException.build("检验计划编号不存在!!!"); } - resourceInspectPlan = planList.get(0); - // 根据handle获取设备清单 - String handle = resourceInspectPlan.getHandle(); + // 根据点检计划HANDLE获取设备清单 ResourceInspectResource resourceInspectResource = new ResourceInspectResource(); resourceInspectResource.setResourceInspectPlanBo(handle); List resourceList = resourceInspectResourceService.selectList(resourceInspectResource); - resourceInspectPlan.setMaintainPlanEquipList(resourceList); + inspectPlanById.setMaintainPlanEquipList(resourceList); // 项目明细清单——根据项目handle获取 - String inspectionItemBo = resourceInspectPlan.getInspectionItemBo(); + String inspectionItemBo = inspectPlanById.getInspectionItemBo(); InspectionItemDetail inspectionItemDetail = new InspectionItemDetail(); inspectionItemDetail.setInspectionItemBo(inspectionItemBo); List itemDetailList = inspectionItemDetailService.selectList(inspectionItemDetail); - resourceInspectPlan.setInspectionItemDetailList(itemDetailList); + inspectPlanById.setInspectionItemDetailList(itemDetailList); // 用户组清单——根据项目计划handle获取 InspectPlanUserGroup inspectPlanUserGroup = new InspectPlanUserGroup(); inspectPlanUserGroup.setResourceInspectPlanBo(handle); @@ -192,16 +196,16 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl planQueryWrapper = new QueryWrapper<>(); - planQueryWrapper.setEntity(resourceInspectPlan); - resourceInspectPlanService.remove(planQueryWrapper); + resourceInspectPlanService.removeById(handle); } /** @@ -235,13 +236,11 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl maintainPlanEquipList = resourceInspectPlan.getMaintainPlanEquipList(); - // 任务编号、任务handle + // 自动生产点检任务编号——点检任务handle List taskNoList = nextNumberHelper.getNextNumber(site, Constants.RESOURCE_INSPECT_TASK, maintainPlanEquipList.size()*taskCount); // 遍历设备 int taskNoNum = 0; @@ -251,24 +250,22 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl taskList = resourceInspectTaskService.selectList(resourceInspectTask); + ResourceInspectTask resourceInspectTask = new ResourceInspectTask(); + resourceInspectTask.setResourceInspectPlanBo(planHandle); + resourceInspectTask.setResrce(resourceNo); + resourceInspectTask.setSite(site); + List taskList = resourceInspectTaskMapper.getInspectTaskList(resourceInspectTask); // 遍历,并选取状态为新建及处理中401新建 301启用 int taskNum = 0; - if (taskList.size()>0){ + if (taskList.size() > 0){ sign = 1; } for (ResourceInspectTask task: taskList) { - // 检验任务状态:1、处理中501:不变更任务;2、新建401:将任务状态变为取消 // 检验任务状态:1、处理中DOING:不变更任务;2、新建NEW:将任务状态变为取消;3、完成COMPLETE String taskStatus = task.getStatus(); if (taskStatus.equals(Constants.INSPECTION_TASK_STATUS_DOING)){ @@ -276,7 +273,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl taskList2 = resourceInspectTaskService.selectList(resourceInspectTask); - // 获取状态为处理中的最新的任务时间 - LocalDateTime createdDateTime = taskList2.get(0).getCreatedDateTime(); - for (ResourceInspectTask task: taskList2){ - if (task.getCreatedDateTime().isAfter(createdDateTime)){ - createdDateTime = task.getCreatedDateTime(); - } - } + LocalDateTime createdDateTime = resourceInspectTaskMapper.getMaxCreateTimeByStatus(resourceInspectTask); if (taskCreateDate.isAfter(createdDateTime)){ // 循环创建检验任务 for (int i = 0;i < taskNum;i++){ @@ -347,8 +337,11 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl nextNumber = nextNumberHelper.getNextNumber(site, Constants.RESOURCE_INSPECT_TASK, 1); inspectTask.setTaskNo(nextNumber.get(0)); inspectTask.setHandle(HandleEnum.RESOURCE_INSPECT_TASK.getHandle(site,nextNumber.get(0))); @@ -437,8 +432,14 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl taskList = resourceInspectTaskService.selectList(resourceInspectTask); - if (taskList.size()==1){ + if (taskList.size() == 1){ resourceInspectTask = taskList.get(0); }else { throw BusinessException.build("无法获取任务详情!!!"); @@ -132,7 +129,7 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl taskSpareList = resourceInspectTaskSpareService.selectList(resourceInspectTaskSpare); resourceInspectTask.setTaskItemDetailList(itemParamList); - resourceInspectTask.setTaskSpareList(taskSpareList); + resourceInspectTask.setSpareList(taskSpareList); return resourceInspectTask; } @@ -152,11 +149,7 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl taskSpareList = resourceInspectTaskSpareService.selectList(resourceInspectTaskSpare); - task.setTaskSpareList(taskSpareList); + task.setSpareList(taskSpareList); return task; } @@ -188,7 +181,7 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl taskItemDetailList = resourceInspectTaskDto.getTaskItemDetailList(); - List taskSpareList = resourceInspectTaskDto.getTaskSpareList(); + List taskSpareList = resourceInspectTaskDto.getSpareList(); // 任务主表字段:任务状态、修改人员、修改时间 ResourceInspectTask task = resourceInspectTaskService.getById(taskHandle); task.setStatus(resourceInspectTaskDto.getStatus()); diff --git a/equip/src/main/resources/mapper/ResourceInspectTaskMapper.xml b/equip/src/main/resources/mapper/ResourceInspectTaskMapper.xml index cb7935fa..ef13d9b1 100644 --- a/equip/src/main/resources/mapper/ResourceInspectTaskMapper.xml +++ b/equip/src/main/resources/mapper/ResourceInspectTaskMapper.xml @@ -7,21 +7,24 @@ - - + + - - + + + + + @@ -30,7 +33,7 @@ - HANDLE, SITE, TASK_NO, CATEGORY, DESCRIPTION, STATUS, RESOURCE_INSPECT_PLAN_BO, INSPECTION_ITEM_BO, RESOURCE_BO, TASK_CREATE_DATE, PLAN_START_DATE, PLAN_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, EXECUTOR, RESULT, REMARK, REASON, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME + HANDLE, SITE, TASK_NO, DESCRIPTION, STATUS, RESOURCE_INSPECT_PLAN_BO, INSPECTION_ITEM_BO, RESRCE, CATEGORY, TASK_CREATE_DATE, PLAN_START_DATE, PLAN_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, RESULT, REASON, EXECUTOR, REMARK, SCHEDULE_TYPE, FREQUENCY, FREQUENCY_UNIT, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME @@ -67,21 +70,24 @@ AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -99,21 +105,24 @@ AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -129,7 +138,7 @@ - SELECT ${ew.sqlSelect} FROM Z_RESOURCE_INSPECT_TASK @@ -139,21 +148,24 @@ AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -179,21 +191,24 @@ AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -219,21 +234,24 @@ AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -259,21 +277,24 @@ AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -299,21 +320,24 @@ AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -335,21 +359,24 @@ HANDLE, SITE, TASK_NO, - CATEGORY, DESCRIPTION, STATUS, RESOURCE_INSPECT_PLAN_BO, INSPECTION_ITEM_BO, - RESOURCE_BO, + RESRCE, + CATEGORY, TASK_CREATE_DATE, PLAN_START_DATE, PLAN_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, - EXECUTOR, RESULT, - REMARK, REASON, + EXECUTOR, + REMARK, + SCHEDULE_TYPE, + FREQUENCY, + FREQUENCY_UNIT, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, @@ -359,21 +386,24 @@ #{handle}, #{site}, #{taskNo}, - #{category}, #{description}, #{status}, #{resourceInspectPlanBo}, #{inspectionItemBo}, - #{resourceBo}, + #{resrce}, + #{category}, #{taskCreateDate}, #{planStartDate}, #{planCompleteDate}, #{actualStartDate}, #{actualCompleteDate}, - #{executor}, #{result}, - #{remark}, #{reason}, + #{executor}, + #{remark}, + #{scheduleType}, + #{frequency}, + #{frequencyUnit}, #{createUser}, #{createdDateTime}, #{modifyUser}, @@ -390,21 +420,24 @@ #{handle}, #{site}, #{taskNo}, - #{category}, #{description}, #{status}, #{resourceInspectPlanBo}, #{inspectionItemBo}, - #{resourceBo}, + #{resrce}, + #{category}, #{taskCreateDate}, #{planStartDate}, #{planCompleteDate}, #{actualStartDate}, #{actualCompleteDate}, - #{executor}, #{result}, - #{remark}, #{reason}, + #{executor}, + #{remark}, + #{scheduleType}, + #{frequency}, + #{frequencyUnit}, #{createUser}, #{createdDateTime}, #{modifyUser}, @@ -417,21 +450,24 @@ UPDATE Z_RESOURCE_INSPECT_TASK SITE=#{et.site}, TASK_NO=#{et.taskNo}, - CATEGORY=#{et.category}, DESCRIPTION=#{et.description}, STATUS=#{et.status}, RESOURCE_INSPECT_PLAN_BO=#{et.resourceInspectPlanBo}, INSPECTION_ITEM_BO=#{et.inspectionItemBo}, - RESOURCE_BO=#{et.resourceBo}, + RESRCE=#{et.resrce}, + CATEGORY=#{et.category}, TASK_CREATE_DATE=#{et.taskCreateDate}, PLAN_START_DATE=#{et.planStartDate}, PLAN_COMPLETE_DATE=#{et.planCompleteDate}, ACTUAL_START_DATE=#{et.actualStartDate}, ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate}, - EXECUTOR=#{et.executor}, RESULT=#{et.result}, - REMARK=#{et.remark}, REASON=#{et.reason}, + EXECUTOR=#{et.executor}, + REMARK=#{et.remark}, + SCHEDULE_TYPE=#{et.scheduleType}, + FREQUENCY=#{et.frequency}, + FREQUENCY_UNIT=#{et.frequencyUnit}, CREATE_USER=#{et.createUser}, CREATED_DATE_TIME=#{et.createdDateTime}, MODIFY_USER=#{et.modifyUser}, @@ -444,21 +480,24 @@ UPDATE Z_RESOURCE_INSPECT_TASK SITE=#{et.site}, TASK_NO=#{et.taskNo}, - CATEGORY=#{et.category}, DESCRIPTION=#{et.description}, STATUS=#{et.status}, RESOURCE_INSPECT_PLAN_BO=#{et.resourceInspectPlanBo}, INSPECTION_ITEM_BO=#{et.inspectionItemBo}, - RESOURCE_BO=#{et.resourceBo}, + RESRCE=#{et.resrce}, + CATEGORY=#{et.category}, TASK_CREATE_DATE=#{et.taskCreateDate}, PLAN_START_DATE=#{et.planStartDate}, PLAN_COMPLETE_DATE=#{et.planCompleteDate}, ACTUAL_START_DATE=#{et.actualStartDate}, ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate}, - EXECUTOR=#{et.executor}, RESULT=#{et.result}, - REMARK=#{et.remark}, REASON=#{et.reason}, + EXECUTOR=#{et.executor}, + REMARK=#{et.remark}, + SCHEDULE_TYPE=#{et.scheduleType}, + FREQUENCY=#{et.frequency}, + FREQUENCY_UNIT=#{et.frequencyUnit}, CREATE_USER=#{et.createUser}, CREATED_DATE_TIME=#{et.createdDateTime}, MODIFY_USER=#{et.modifyUser}, @@ -471,21 +510,24 @@ UPDATE Z_RESOURCE_INSPECT_TASK SITE=#{et.site}, TASK_NO=#{et.taskNo}, - CATEGORY=#{et.category}, DESCRIPTION=#{et.description}, STATUS=#{et.status}, RESOURCE_INSPECT_PLAN_BO=#{et.resourceInspectPlanBo}, INSPECTION_ITEM_BO=#{et.inspectionItemBo}, - RESOURCE_BO=#{et.resourceBo}, + RESRCE=#{et.resrce}, + CATEGORY=#{et.category}, TASK_CREATE_DATE=#{et.taskCreateDate}, PLAN_START_DATE=#{et.planStartDate}, PLAN_COMPLETE_DATE=#{et.planCompleteDate}, ACTUAL_START_DATE=#{et.actualStartDate}, ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate}, - EXECUTOR=#{et.executor}, RESULT=#{et.result}, - REMARK=#{et.remark}, REASON=#{et.reason}, + EXECUTOR=#{et.executor}, + REMARK=#{et.remark}, + SCHEDULE_TYPE=#{et.scheduleType}, + FREQUENCY=#{et.frequency}, + FREQUENCY_UNIT=#{et.frequencyUnit}, CREATE_USER=#{et.createUser}, CREATED_DATE_TIME=#{et.createdDateTime}, MODIFY_USER=#{et.modifyUser}, @@ -497,21 +539,24 @@ HANDLE=#{ew.entity.handle} AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -554,21 +599,24 @@ AND SITE=#{ew.entity.site} AND TASK_NO=#{ew.entity.taskNo} - AND CATEGORY=#{ew.entity.category} AND DESCRIPTION=#{ew.entity.description} AND STATUS=#{ew.entity.status} AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo} AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo} - AND RESOURCE_BO=#{ew.entity.resourceBo} + AND RESRCE=#{ew.entity.resrce} + AND CATEGORY=#{ew.entity.category} AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate} AND PLAN_START_DATE=#{ew.entity.planStartDate} AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate} AND ACTUAL_START_DATE=#{ew.entity.actualStartDate} AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate} - AND EXECUTOR=#{ew.entity.executor} AND RESULT=#{ew.entity.result} - AND REMARK=#{ew.entity.remark} AND REASON=#{ew.entity.reason} + AND EXECUTOR=#{ew.entity.executor} + AND REMARK=#{ew.entity.remark} + AND SCHEDULE_TYPE=#{ew.entity.scheduleType} + AND FREQUENCY=#{ew.entity.frequency} + AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit} AND CREATE_USER=#{ew.entity.createUser} AND CREATED_DATE_TIME=#{ew.entity.createdDateTime} AND MODIFY_USER=#{ew.entity.modifyUser} @@ -593,9 +641,9 @@ - + - + + + + + + + + + From 4ad511de7896309b113154773d823f5a1361c2d8 Mon Sep 17 00:00:00 2001 From: zpl Date: Tue, 27 Jul 2021 09:08:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=82=B9=E6=A3=80=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equip/service/impl/ResourceInspectPlanServiceImpl.java | 2 +- .../equip/service/impl/ResourceInspectTaskServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/equip/src/main/java/com/foreverwin/mesnac/equip/service/impl/ResourceInspectPlanServiceImpl.java b/equip/src/main/java/com/foreverwin/mesnac/equip/service/impl/ResourceInspectPlanServiceImpl.java index f5a28dbf..e672cf6e 100644 --- a/equip/src/main/java/com/foreverwin/mesnac/equip/service/impl/ResourceInspectPlanServiceImpl.java +++ b/equip/src/main/java/com/foreverwin/mesnac/equip/service/impl/ResourceInspectPlanServiceImpl.java @@ -450,7 +450,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl