Merge remote-tracking branch 'origin/master'

赵嘉伟 4 years ago
commit 769344acab

@ -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}"),

@ -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<ResourceInspectPlan> result;
QueryWrapper<ResourceInspectPlan> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(resourceInspectPlan);

@ -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();
}
}

@ -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<ResourceInspectTaskParam> taskItemDetailList;
/**消耗备品**/
private List<ResourceInspectTaskSpare> taskSpareList;
private List<ResourceInspectTaskSpare> spareList;
public Integer getItemSeq() {
return itemSeq;
@ -121,23 +121,23 @@ public class ResourceInspectTaskDto implements Serializable {
this.taskItemDetailList = taskItemDetailList;
}
public List<ResourceInspectTaskSpare> getTaskSpareList() {
return taskSpareList;
public List<ResourceInspectTaskSpare> getSpareList() {
return spareList;
}
public void setTaskSpareList(List<ResourceInspectTaskSpare> taskSpareList) {
this.taskSpareList = taskSpareList;
public void setSpareList(List<ResourceInspectTaskSpare> 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() {

@ -10,14 +10,15 @@ import java.util.List;
/**
* <p>
* Mapper
* Mapper
* </p>
*
* @author pavel.Liu
* @since 2021-07-01
* @author pavel_liu
* @since 2021-07-20
*/
@Repository
public interface ResourceInspectTaskMapper extends BaseMapper<ResourceInspectTask> {
/**
* ---
* @param resourceInspectTaskDto
@ -25,7 +26,24 @@ public interface ResourceInspectTaskMapper extends BaseMapper<ResourceInspectTas
*/
List<ResourceInspectTaskDto> findResourceInspectTaskList(ResourceInspectTaskDto resourceInspectTaskDto);
LocalDateTime selectMaxCreateTimeByPlanBoAnd(ResourceInspectTask resourceInspectTask);
/**
* handlehandleDOINGNEW
* @param resourceInspectTask
* @return
*/
List<ResourceInspectTask> getInspectTaskList(ResourceInspectTask resourceInspectTask);
/**
*
* @param resourceInspectTask
* @return
*/
LocalDateTime selectMaxCreateTimeByPlanBoAnd(ResourceInspectTask resourceInspectTask);
/**
*
* @param resourceInspectTask
* @return
*/
LocalDateTime getMaxCreateTimeByStatus(ResourceInspectTask resourceInspectTask);
}

@ -14,11 +14,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
*
*
* </p>
*
* @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<ResourceInspectTask> {
*/
@TableField("TASK_NO")
private String taskNo;
/**
* (AUTO/)
*/
@TableField("CATEGORY")
private String category;
/**
*
*/
@ -68,10 +63,15 @@ public class ResourceInspectTask extends Model<ResourceInspectTask> {
@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<ResourceInspectTask> {
*/
@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;
/**
* (MWDHFS)
*/
@TableField("FREQUENCY_UNIT")
private String frequencyUnit;
/**
*
*/
@ -142,7 +157,18 @@ public class ResourceInspectTask extends Model<ResourceInspectTask> {
private List<ResourceInspectTaskParam> taskItemDetailList;
@TableField(exist = false)
private List<ResourceInspectTaskSpare> taskSpareList;
private List<ResourceInspectTaskSpare> spareList;
@TableField(exist = false)
private String ResourceBo;
public String getResourceBo() {
return ResourceBo;
}
public void setResourceBo(String resourceBo) {
ResourceBo = resourceBo;
}
public List<ResourceInspectTaskParam> getTaskItemDetailList() {
return taskItemDetailList;
@ -152,12 +178,12 @@ public class ResourceInspectTask extends Model<ResourceInspectTask> {
this.taskItemDetailList = taskItemDetailList;
}
public List<ResourceInspectTaskSpare> getTaskSpareList() {
return taskSpareList;
public List<ResourceInspectTaskSpare> getSpareList() {
return spareList;
}
public void setTaskSpareList(List<ResourceInspectTaskSpare> taskSpareList) {
this.taskSpareList = taskSpareList;
public void setSpareList(List<ResourceInspectTaskSpare> spareList) {
this.spareList = spareList;
}
public String getHandle() {
@ -184,14 +210,6 @@ public class ResourceInspectTask extends Model<ResourceInspectTask> {
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<ResourceInspectTask> {
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<ResourceInspectTask> {
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<ResourceInspectTask> {
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<ResourceInspectTask> {
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 +

@ -10,11 +10,11 @@ import java.util.List;
/**
* <p>
*
*
* </p>
*
* @author pavel.Liu
* @since 2021-06-24
* @author pavel_liu
* @since 2021-07-20
*/
public interface ResourceInspectTaskService extends IService<ResourceInspectTask> {
@ -55,5 +55,4 @@ public interface ResourceInspectTaskService extends IService<ResourceInspectTask
void saveOrUpdateTaskInfo(ResourceInspectTaskDto resourceInspectTaskDto);
}

@ -83,8 +83,8 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
// 判断检验项目清单HANDLE是否存在
String inspectionItemBo = resourceInspectPlan.getInspectionItemBo();
InspectionItem inspectionItem = inspectionItemService.getById(inspectionItemBo);
if (inspectionItem==null){
throw BusinessException.build("检验项目编号不存在!!!");
if (inspectionItem == null){
throw BusinessException.build("检验项目清单不存在!!!");
}
//查询设备计划是否存在
String site = CommonMethods.getSite();
@ -99,7 +99,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
String user = CommonMethods.getUser();
Boolean returnStatus = false;
//计划是否已存在
if (planHandle==null){
if (planHandle == null){
// 创建人员和创建时间
resourceInspectPlan.setCreatedDateTime(LocalDateTime.now());
resourceInspectPlan.setCreateUser(user);
@ -124,27 +124,32 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
resourceInspectPlan.setHandle(handle);
//保存计划下设备清单(全删全增)
List<ResourceInspectResource> equips = resourceInspectPlan.getMaintainPlanEquipList();
if (equips.size()<1||equips.equals(null)){
if (equips == null || equips.size() < 1){
throw BusinessException.build("未添加设备!!!");
}
Collection<ResourceInspectResource> 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<InspectPlanUserGroup> userGroups = resourceInspectPlan.getInspectPlanUserGroupList();
if (userGroups.size()>0||userGroups!=null){
if (userGroups != null && userGroups.size() > 0){
Collection<InspectPlanUserGroup> 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<ResourceInspectP
*/
@Override
public ResourceInspectPlan getInspectPlanByHandle(ResourceInspectPlan resourceInspectPlan) {
QueryWrapper<ResourceInspectPlan> planWrapper = new QueryWrapper<>();
planWrapper.setEntity(resourceInspectPlan);
List<ResourceInspectPlan> 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<ResourceInspectResource> 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<InspectionItemDetail> 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<ResourceInspectP
userGroup.setDescription(userGroupById.getDescription());
userGroup.setUserGroupNo(userGroupById.getUserGroup());
}
resourceInspectPlan.setInspectPlanUserGroupList(userGroupList);
return resourceInspectPlan;
inspectPlanById.setInspectPlanUserGroupList(userGroupList);
return inspectPlanById;
}
@Override
public void deleteInspectionPlanByHandle(ResourceInspectPlan resourceInspectPlan) {
String handle = resourceInspectPlan.getHandle();
ResourceInspectPlan inspectPlanById = resourceInspectPlanService.getById(handle);
if (inspectPlanById==null){
throw BusinessException.build("删除失败");
if (inspectPlanById == null){
throw BusinessException.build("点检计划删除失败!");
}
// 设备清单表数据删除
ResourceInspectResource resourceInspectResource = new ResourceInspectResource();
@ -212,10 +216,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
// 用户组清单数据删除
deleteUserGroupList(handle);
// 主表数据删除
resourceInspectPlan.getHandle();
QueryWrapper<ResourceInspectPlan> planQueryWrapper = new QueryWrapper<>();
planQueryWrapper.setEntity(resourceInspectPlan);
resourceInspectPlanService.remove(planQueryWrapper);
resourceInspectPlanService.removeById(handle);
}
/**
@ -235,13 +236,11 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
LocalDateTime indateEnd = resourceInspectPlan.getIndateEnd();
Long planTaskCount = resourceInspectPlan.getPlanTaskCount();
Integer taskCount = Integer.valueOf(planTaskCount.toString());
// 检验项目清单handle
// 点检计划handle
String planHandle = resourceInspectPlan.getHandle();
// 计划状态
String planStatus = resourceInspectPlan.getStatus();
// 设备清单
List<ResourceInspectResource> maintainPlanEquipList = resourceInspectPlan.getMaintainPlanEquipList();
// 任务编号、任务handle
// 自动生产点检任务编号——点检任务handle
List<String> taskNoList = nextNumberHelper.getNextNumber(site, Constants.RESOURCE_INSPECT_TASK, maintainPlanEquipList.size()*taskCount);
// 遍历设备
int taskNoNum = 0;
@ -251,24 +250,22 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
if (!equipStatus.equals("301")){
continue;
}
String resourceHandle = equip.getResourceBo();
// 创建检验任务--用于模糊查询
ResourceInspectTask resourceInspectTask = new ResourceInspectTask();
// 外键HANDLE计划HANDLE、设备HANDLE
resourceInspectTask.setResourceInspectPlanBo(planHandle);
resourceInspectTask.setResourceBo(resourceHandle);
String resourceNo = equip.getResourceNo();
/**
* handlehandle
* handle
* bug
*/
List<ResourceInspectTask> taskList = resourceInspectTaskService.selectList(resourceInspectTask);
ResourceInspectTask resourceInspectTask = new ResourceInspectTask();
resourceInspectTask.setResourceInspectPlanBo(planHandle);
resourceInspectTask.setResrce(resourceNo);
resourceInspectTask.setSite(site);
List<ResourceInspectTask> 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<ResourceInspectP
}else {
if (taskStatus.equals(Constants.INSPECTION_TASK_STATUS_NEW)){
task.setStatus(Constants.INSPECTION_TASK_STATUS_COMPLETE);
resourceInspectTaskService.saveOrUpdate(task);
resourceInspectTaskService.updateById(task);
}
}
}
@ -298,16 +295,9 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
taskNum--;
}
}else{
// 获取处理中的任务数量
// 获取处理中的点检任务最新的创建时间
resourceInspectTask.setStatus(Constants.INSPECTION_TASK_STATUS_DOING);
List<ResourceInspectTask> 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<ResourceInspectP
Double frequency = inspectPlan.getFrequency();
String frequencyUnit = inspectPlan.getFrequencyUnit();
String scheduleType = inspectPlan.getScheduleType();
String resourceBo = resourceInspectTask.getResourceBo();
String resrce = resourceInspectTask.getResrce();
String resourceBo = HandleEnum.RESOURCE.getHandle(site, resrce);
ResourceInspectTask newInspectTask = new ResourceInspectTask();
newInspectTask.setResrce(resourceInspectTask.getResrce());
newInspectTask.setResourceBo(resourceInspectTask.getResourceBo());
if (scheduleType.equals("CYC")){
LocalDateTime maxCreateTime = resourceInspectTaskMapper.selectMaxCreateTimeByPlanBoAnd(resourceInspectTask);
LocalDateTime nextTaskDate = addTime(frequencyUnit, frequency, maxCreateTime);
@ -359,11 +352,13 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
newInspectTask.setTaskCreateDate(nextTaskDate);
}
String planStatus = inspectPlan.getStatus();
// 点检计划非启用状态
if (!planStatus.equals("301")){
return;
}
ResourceInspectResource resource = resourceInspectResourceService.getById(planHandle + ";" + resourceBo);
ResourceInspectResource resource = resourceInspectResourceService.getById(HandleEnum.RESOURCE_INSPECT_RESOURCE.getHandle(site,planHandle,resourceBo));
String resourceStatus = resource.getStatus();
// 设备非启用状态
if (!resourceStatus.equals("301")){
return;
}
@ -372,7 +367,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
return;
}
ResourceInspectTask inspectTask = setResourceInspectTask(inspectPlan, resourceInspectTask, -1);
ResourceInspectTask inspectTask = setResourceInspectTask(inspectPlan, newInspectTask, -1);
List<String> 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<ResourceInspectP
inspectTask.setCategory(resourceInspectPlan.getCategory());
// 设备HANDLE
inspectTask.setResourceBo(resourceInspectTask.getResourceBo());
inspectTask.setResrce(resourceInspectTask.getResrce());
// 任务创建时间
inspectTask.setTaskCreateDate(resourceInspectTask.getTaskCreateDate());
// 排程周期、频率、单位、点检类型
inspectTask.setScheduleType(resourceInspectPlan.getScheduleType());
inspectTask.setFrequency(resourceInspectPlan.getFrequency());
inspectTask.setFrequencyUnit(resourceInspectPlan.getFrequencyUnit());
inspectTask.setCategory(resourceInspectPlan.getCategory());
// 计划开始、计划完成时间
LocalDateTime taskCreateDate = inspectTask.getTaskCreateDate();
Long beforeTolerance = resourceInspectPlan.getBeforeTolerance();
@ -449,7 +450,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
}else {
inspectTask.setPlanStartDate(taskCreateDate.minusDays(beforeTolerance));
}
if (!(afterTolerance < 0 || afterTolerance == null)){
if (!(afterTolerance == null || afterTolerance < 0 )){
inspectTask.setPlanCompleteDate(taskCreateDate.plusDays(afterTolerance));
}
// 创建人员、创建时间;修改人员、修改时间

@ -80,16 +80,13 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectT
task.setCycle(getCycle(task));
task.setCurrentUser(currentUser);
}
for (ResourceInspectTaskDto task:list) {
System.out.println(task.getTaskNo());
}
return list;
}
@Override
public ResourceInspectTask getResourceInspectTaskAll(ResourceInspectTask resourceInspectTask) {
List<ResourceInspectTask> 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<ResourceInspectT
resourceInspectTaskSpare.setResourceInspectTaskBo(taskHandle);
List<ResourceInspectTaskSpare> taskSpareList = resourceInspectTaskSpareService.selectList(resourceInspectTaskSpare);
resourceInspectTask.setTaskItemDetailList(itemParamList);
resourceInspectTask.setTaskSpareList(taskSpareList);
resourceInspectTask.setSpareList(taskSpareList);
return resourceInspectTask;
}
@ -152,11 +149,7 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectT
}
// 状态变更为“取消”:插入数据
if( status.equals(Constants.INSPECTION_TASK_STATUS_CANCEL) ){
/*boolean bl = executor != null;
if( executor != null && !executor.equals(user)){
// throw BusinessException.build("1","当前用户与执行人不一致,取消操作失败!!!");
throw BusinessException.build("当前用户与执行人不一致,取消操作失败!!!");
}*/
task.setExecutor(CommonMethods.getUser());
task.setReason(reason);
// 取消时,创建新任务
resourceInspectPlanService.autoCreateTaskByResourceInspectTask(task);
@ -174,7 +167,7 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectT
ResourceInspectTaskSpare resourceInspectTaskSpare = new ResourceInspectTaskSpare();
resourceInspectTaskSpare.setResourceInspectTaskBo(handle);
List<ResourceInspectTaskSpare> taskSpareList = resourceInspectTaskSpareService.selectList(resourceInspectTaskSpare);
task.setTaskSpareList(taskSpareList);
task.setSpareList(taskSpareList);
return task;
}
@ -188,7 +181,7 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectT
String status = resourceInspectTaskDto.getStatus();
// 检验项、备品清单
List<ResourceInspectTaskParam> taskItemDetailList = resourceInspectTaskDto.getTaskItemDetailList();
List<ResourceInspectTaskSpare> taskSpareList = resourceInspectTaskDto.getTaskSpareList();
List<ResourceInspectTaskSpare> taskSpareList = resourceInspectTaskDto.getSpareList();
// 任务主表字段:任务状态、修改人员、修改时间
ResourceInspectTask task = resourceInspectTaskService.getById(taskHandle);
task.setStatus(resourceInspectTaskDto.getStatus());
@ -196,10 +189,10 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectT
task.setModifiedDateTime(LocalDateTime.now());
// 若状态为完成,则获取检验结果
if ( status.equals(Constants.INSPECTION_TASK_STATUS_COMPLETE) ){
task.setResult("Y");
task.setResult("OK");
for (ResourceInspectTaskParam taskParam:taskItemDetailList) {
if (taskParam.getResult().equals("N")){
task.setResult("N");
task.setResult("NG");
break;
}
}

@ -7,21 +7,24 @@
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="TASK_NO" property="taskNo" />
<result column="CATEGORY" property="category" />
<result column="DESCRIPTION" property="description" />
<result column="STATUS" property="status" />
<result column="RESOURCE_INSPECT_PLAN_BO" property="resourceInspectPlanBo" />
<result column="INSPECTION_ITEM_BO" property="inspectionItemBo" />
<result column="RESOURCE_BO" property="resourceBo" />
<result column="RESRCE" property="resrce" />
<result column="CATEGORY" property="category" />
<result column="TASK_CREATE_DATE" property="taskCreateDate" />
<result column="PLAN_START_DATE" property="planStartDate" />
<result column="PLAN_COMPLETE_DATE" property="planCompleteDate" />
<result column="ACTUAL_START_DATE" property="actualStartDate" />
<result column="ACTUAL_COMPLETE_DATE" property="actualCompleteDate" />
<result column="EXECUTOR" property="executor" />
<result column="RESULT" property="result" />
<result column="REMARK" property="remark" />
<result column="REASON" property="reason" />
<result column="EXECUTOR" property="executor" />
<result column="REMARK" property="remark" />
<result column="SCHEDULE_TYPE" property="scheduleType" />
<result column="FREQUENCY" property="frequency" />
<result column="FREQUENCY_UNIT" property="frequencyUnit" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFY_USER" property="modifyUser" />
@ -30,7 +33,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
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
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -67,21 +70,24 @@
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -99,21 +105,24 @@
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -129,7 +138,7 @@
</if>
</select>
<select id="selectList" resultMap="BaseResultMap" >
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_RESOURCE_INSPECT_TASK
<where>
<if test="ew!=null">
@ -139,21 +148,24 @@
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -179,21 +191,24 @@
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -219,21 +234,24 @@
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -259,21 +277,24 @@
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -299,21 +320,24 @@
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -335,21 +359,24 @@
HANDLE,
<if test="site!=null">SITE,</if>
<if test="taskNo!=null">TASK_NO,</if>
<if test="category!=null">CATEGORY,</if>
<if test="description!=null">DESCRIPTION,</if>
<if test="status!=null">STATUS,</if>
<if test="resourceInspectPlanBo!=null">RESOURCE_INSPECT_PLAN_BO,</if>
<if test="inspectionItemBo!=null">INSPECTION_ITEM_BO,</if>
<if test="resourceBo!=null">RESOURCE_BO,</if>
<if test="resrce!=null">RESRCE,</if>
<if test="category!=null">CATEGORY,</if>
<if test="taskCreateDate!=null">TASK_CREATE_DATE,</if>
<if test="planStartDate!=null">PLAN_START_DATE,</if>
<if test="planCompleteDate!=null">PLAN_COMPLETE_DATE,</if>
<if test="actualStartDate!=null">ACTUAL_START_DATE,</if>
<if test="actualCompleteDate!=null">ACTUAL_COMPLETE_DATE,</if>
<if test="executor!=null">EXECUTOR,</if>
<if test="result!=null">RESULT,</if>
<if test="remark!=null">REMARK,</if>
<if test="reason!=null">REASON,</if>
<if test="executor!=null">EXECUTOR,</if>
<if test="remark!=null">REMARK,</if>
<if test="scheduleType!=null">SCHEDULE_TYPE,</if>
<if test="frequency!=null">FREQUENCY,</if>
<if test="frequencyUnit!=null">FREQUENCY_UNIT,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifyUser!=null">MODIFY_USER,</if>
@ -359,21 +386,24 @@
#{handle},
<if test="site!=null">#{site},</if>
<if test="taskNo!=null">#{taskNo},</if>
<if test="category!=null">#{category},</if>
<if test="description!=null">#{description},</if>
<if test="status!=null">#{status},</if>
<if test="resourceInspectPlanBo!=null">#{resourceInspectPlanBo},</if>
<if test="inspectionItemBo!=null">#{inspectionItemBo},</if>
<if test="resourceBo!=null">#{resourceBo},</if>
<if test="resrce!=null">#{resrce},</if>
<if test="category!=null">#{category},</if>
<if test="taskCreateDate!=null">#{taskCreateDate},</if>
<if test="planStartDate!=null">#{planStartDate},</if>
<if test="planCompleteDate!=null">#{planCompleteDate},</if>
<if test="actualStartDate!=null">#{actualStartDate},</if>
<if test="actualCompleteDate!=null">#{actualCompleteDate},</if>
<if test="executor!=null">#{executor},</if>
<if test="result!=null">#{result},</if>
<if test="remark!=null">#{remark},</if>
<if test="reason!=null">#{reason},</if>
<if test="executor!=null">#{executor},</if>
<if test="remark!=null">#{remark},</if>
<if test="scheduleType!=null">#{scheduleType},</if>
<if test="frequency!=null">#{frequency},</if>
<if test="frequencyUnit!=null">#{frequencyUnit},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifyUser!=null">#{modifyUser},</if>
@ -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 <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
<if test="et.category!=null">CATEGORY=#{et.category},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.resourceInspectPlanBo!=null">RESOURCE_INSPECT_PLAN_BO=#{et.resourceInspectPlanBo},</if>
<if test="et.inspectionItemBo!=null">INSPECTION_ITEM_BO=#{et.inspectionItemBo},</if>
<if test="et.resourceBo!=null">RESOURCE_BO=#{et.resourceBo},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.category!=null">CATEGORY=#{et.category},</if>
<if test="et.taskCreateDate!=null">TASK_CREATE_DATE=#{et.taskCreateDate},</if>
<if test="et.planStartDate!=null">PLAN_START_DATE=#{et.planStartDate},</if>
<if test="et.planCompleteDate!=null">PLAN_COMPLETE_DATE=#{et.planCompleteDate},</if>
<if test="et.actualStartDate!=null">ACTUAL_START_DATE=#{et.actualStartDate},</if>
<if test="et.actualCompleteDate!=null">ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},</if>
<if test="et.executor!=null">EXECUTOR=#{et.executor},</if>
<if test="et.result!=null">RESULT=#{et.result},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
<if test="et.reason!=null">REASON=#{et.reason},</if>
<if test="et.executor!=null">EXECUTOR=#{et.executor},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
<if test="et.scheduleType!=null">SCHEDULE_TYPE=#{et.scheduleType},</if>
<if test="et.frequency!=null">FREQUENCY=#{et.frequency},</if>
<if test="et.frequencyUnit!=null">FREQUENCY_UNIT=#{et.frequencyUnit},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
@ -444,21 +480,24 @@
UPDATE Z_RESOURCE_INSPECT_TASK <trim prefix="SET" suffixOverrides=",">
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 <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
<if test="et.category!=null">CATEGORY=#{et.category},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.resourceInspectPlanBo!=null">RESOURCE_INSPECT_PLAN_BO=#{et.resourceInspectPlanBo},</if>
<if test="et.inspectionItemBo!=null">INSPECTION_ITEM_BO=#{et.inspectionItemBo},</if>
<if test="et.resourceBo!=null">RESOURCE_BO=#{et.resourceBo},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.category!=null">CATEGORY=#{et.category},</if>
<if test="et.taskCreateDate!=null">TASK_CREATE_DATE=#{et.taskCreateDate},</if>
<if test="et.planStartDate!=null">PLAN_START_DATE=#{et.planStartDate},</if>
<if test="et.planCompleteDate!=null">PLAN_COMPLETE_DATE=#{et.planCompleteDate},</if>
<if test="et.actualStartDate!=null">ACTUAL_START_DATE=#{et.actualStartDate},</if>
<if test="et.actualCompleteDate!=null">ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},</if>
<if test="et.executor!=null">EXECUTOR=#{et.executor},</if>
<if test="et.result!=null">RESULT=#{et.result},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
<if test="et.reason!=null">REASON=#{et.reason},</if>
<if test="et.executor!=null">EXECUTOR=#{et.executor},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
<if test="et.scheduleType!=null">SCHEDULE_TYPE=#{et.scheduleType},</if>
<if test="et.frequency!=null">FREQUENCY=#{et.frequency},</if>
<if test="et.frequencyUnit!=null">FREQUENCY_UNIT=#{et.frequencyUnit},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
@ -497,21 +539,24 @@
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -554,21 +599,24 @@
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.resourceInspectPlanBo!=null"> AND RESOURCE_INSPECT_PLAN_BO=#{ew.entity.resourceInspectPlanBo}</if>
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
<if test="ew.entity.resourceBo!=null"> AND RESOURCE_BO=#{ew.entity.resourceBo}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
<if test="ew.entity.taskCreateDate!=null"> AND TASK_CREATE_DATE=#{ew.entity.taskCreateDate}</if>
<if test="ew.entity.planStartDate!=null"> AND PLAN_START_DATE=#{ew.entity.planStartDate}</if>
<if test="ew.entity.planCompleteDate!=null"> AND PLAN_COMPLETE_DATE=#{ew.entity.planCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.reason!=null"> AND REASON=#{ew.entity.reason}</if>
<if test="ew.entity.executor!=null"> AND EXECUTOR=#{ew.entity.executor}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.scheduleType!=null"> AND SCHEDULE_TYPE=#{ew.entity.scheduleType}</if>
<if test="ew.entity.frequency!=null"> AND FREQUENCY=#{ew.entity.frequency}</if>
<if test="ew.entity.frequencyUnit!=null"> AND FREQUENCY_UNIT=#{ew.entity.frequencyUnit}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -593,9 +641,9 @@
<!--自定义sql-->
<!--自定义sql模糊查询检验任务所有字段、车间、设备名称等字段-->
<!--自定义sql模糊查询检验任务所有字段、车间、设备名称等字段-->
<select id="findResourceInspectTaskList" resultType="com.foreverwin.mesnac.equip.dto.ResourceInspectTaskDto">
SELECT DISTINCT RIK.* ,RIP.PLAN_NO AS PLAN_NO ,RIP.FREQUENCY ,RIP.FREQUENCY_UNIT ,
SELECT DISTINCT RIK.* ,RIP.PLAN_NO AS PLAN_NO ,
R.RESRCE AS RESOURCE_NO ,R.DESCRIPTION AS RESOURCE_DESCRIPTION ,
RTR.RESOURCE_TYPE_BO ,RT.RESOURCE_TYPE AS RESOURCE_TYPE_NO ,RT.DESCRIPTION AS RESOURCE_TYPE_DESCRIPTION ,
WCT.DESCRIPTION AS WORK_CENTER
@ -603,10 +651,10 @@
LEFT JOIN Z_INSPECT_PLAN_USER_GROUP ZG ON ZG.RESOURCE_INSPECT_PLAN_BO = RIK.RESOURCE_INSPECT_PLAN_BO
LEFT JOIN USER_GROUP_MEMBER UGM ON UGM.USER_GROUP_BO = ZG.USER_GROUP_BO
LEFT JOIN Z_RESOURCE_INSPECT_PLAN RIP ON RIK.RESOURCE_INSPECT_PLAN_BO = RIP.HANDLE
LEFT JOIN RESRCE R ON R.HANDLE = RIK.RESOURCE_BO
LEFT JOIN WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = RIK.RESOURCE_BO
LEFT JOIN RESRCE R ON R.RESRCE = RIK.RESRCE
LEFT JOIN WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCM.WORK_CENTER_BO
LEFT JOIN RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = RIK.RESOURCE_BO
LEFT JOIN RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
LEFT JOIN RESOURCE_TYPE RT ON RT.HANDLE = RTR.RESOURCE_TYPE_BO
WHERE
(ZG.USER_GROUP_BO IS NULL OR (ZG.USER_GROUP_BO IS NOT NULL AND UGM.USER_OR_GROUP_GBO = #{currentUser}))
@ -623,8 +671,8 @@
<if test="resourceInspectPlanBo != null and resourceInspectPlanBo != ''">
AND RIK.RESOURCE_INSPECT_PLAN_BO LIKE #{resourceInspectPlanBo}
</if>
<if test="resourceBo != null and resourceBo != ''">
AND RIK.RESOURCE_BO = #{resourceBo}
<if test="resrce != null and resrce != ''">
AND RIK.RESRCE = #{resrce}
</if>
<if test="compareStartDate != null and compareStartDate != ''">
AND RIK.TASK_CREATE_DATE &gt; TO_DATE( #{compareStartDate},'yyyy-MM-dd hh24:mi-ss' )
@ -641,13 +689,34 @@
ORDER BY RIK.TASK_NO ASC
</select>
<!--自定义sql条件查询根据检验计划handle及设备handle获取最新的创建任务时间-->
<!--自定义sql条件查询根据检验计划handle及设备handle获取最新的创建任务时间-->
<select id="selectMaxCreateTimeByPlanBoAnd" resultType="java.time.LocalDateTime">
SELECT MAX(ZRIT.TASK_CREATE_DATE) as maxCreateDate FROM WIP.Z_RESOURCE_INSPECT_TASK zrit
WHERE ZRIT.RESOURCE_INSPECT_PLAN_BO = #{resourceInspectPlanBo} AND
ZRIT.RESOURCE_BO = #{resourceBo}
SELECT MAX(ZRIT.TASK_CREATE_DATE) as maxCreateDate
FROM WIP.Z_RESOURCE_INSPECT_TASK ZRIT
WHERE ZRIT.RESOURCE_INSPECT_PLAN_BO = #{resourceInspectPlanBo}
AND ZRIT.RESRCE = #{resrce}
</select>
<!--自定义sql条件查询根据检验计划handle及设备handle获取最新的创建任务时间-->
<select id="getMaxCreateTimeByStatus" resultType="java.time.LocalDateTime">
SELECT MAX(ZRIT.TASK_CREATE_DATE) as maxCreateDate
FROM WIP.Z_RESOURCE_INSPECT_TASK ZRIT
WHERE ZRIT.RESOURCE_INSPECT_PLAN_BO = #{resourceInspectPlanBo}
AND ZRIT.RESRCE = #{resrce}
AND ZRIT.STATUS = #{status}
</select>
<select id="getInspectTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceInspectTask">
SELECT * FROM WIP.Z_RESOURCE_INSPECT_TASK ZRIT
WHERE ZRIT.SITE = #{site}
AND ZRIT.RESOURCE_INSPECT_PLAN_BO = #{resourceInspectPlanBo}
AND ZRIT.RESRCE = #{resrce}
AND ZRIT.STATUS IN ('DOING','NEW')
</select>
<!--自定义sql-->
</mapper>

Loading…
Cancel
Save