Leon 4 years ago
commit 7517c1deac

@ -1,217 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.0.6" level="project" />
<orderEntry type="library" name="Maven: com.foreverwin.modular:modular-core:1.0-SNAPSHOT.standlone-hana" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.5.22.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.5.22.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.5.22.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.5.22.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.5.22.RELEASE" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.43" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.43" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.43" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.43" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-validator:5.3.6.Final" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.11.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:1.5.22.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.7" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.26" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.26" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-test:1.5.22.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test:1.5.22.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:1.5.22.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.jayway.jsonpath:json-path:2.2.0" level="project" />
<orderEntry type="library" name="Maven: net.minidev:json-smart:2.2.1" level="project" />
<orderEntry type="library" name="Maven: net.minidev:accessors-smart:1.1" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Maven: org.assertj:assertj-core:2.6.0" level="project" />
<orderEntry type="library" name="Maven: org.mockito:mockito-core:1.10.19" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.objenesis:objenesis:2.1" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" name="Maven: org.skyscreamer:jsonassert:1.4.0" level="project" />
<orderEntry type="library" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-test:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:2.5.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:1.5.1.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:1.5.22.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.14" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.2" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.1.0" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.1.0" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.1.0" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.1.0" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.1.0" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.4" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.0" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.5.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.48" level="project" />
<orderEntry type="library" name="Maven: ojdbc6:ojdbc6:11.2.0.4" level="project" />
<orderEntry type="library" name="Maven: com.sap:ngdbc:2.5.52" level="project" />
<orderEntry type="library" name="Maven: com.sap:sapdbc:7.9.09" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-legacy:1.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-typehandlers-jsr310:1.0.2" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.11" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.11" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-jaxws:3.1.12" level="project" />
<orderEntry type="library" name="Maven: xml-resolver:xml-resolver:1.2" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-core:3.1.12" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.4.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.ws.xmlschema:xmlschema-core:2.2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-soap:3.1.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-wsdl:3.1.12" level="project" />
<orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-databinding-jaxb:3.1.12" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.11" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.2.11" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-bindings-xml:3.1.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-frontend-simple:3.1.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-addr:3.1.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-ws-policy:3.1.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.neethi:neethi:3.0.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.cxf:cxf-rt-transports-http:3.1.12" level="project" />
<orderEntry type="library" name="Maven: com.sap:sapjco:NTAMD64-3.0.6" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:9.4.19.v20190610" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.19.v20190610" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.19.v20190610" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.4.19.v20190610" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.19.v20190610" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-websocket:8.2.0.v20160908" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.73" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:1.0.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.foreverwin.modular:modular-melib:15.4.0.2.RELEASE" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.activity.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.annotation.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.appconfig.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.backgroundprocess.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.browse.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.certification.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.collaboration.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.common.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.container.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.customdata.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.datacollection.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.dataformat.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.datatransfer.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.datatype.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.demand.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.document.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.extension.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.framework.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.framework.api-internal:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.framework.globalization:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.integration.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.integration.cncdnc.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.integration.erp.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.inventory.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.labor.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.legacy.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.messaging.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.nonconformance.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.numbering.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.plant.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.productdefinition.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.production.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.productiondate.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.reasoncode.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.reporting.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.resourcetracking.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.sampling.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.schedulingstandards.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.script.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.security.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.setpoint.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.status.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.timeelement.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.tooling.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.uom.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.user.api:154.0.2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:service-core.api:3.4.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:common-libs:3.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:sap-usermanagement-api:1.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.sap:me.common.domain:154.0.2" level="project" />
<orderEntry type="module" module-name="meapi" />
<orderEntry type="module" module-name="common" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-activemq:2.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jms:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.activemq:activemq-broker:5.14.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.activemq:activemq-openwire-legacy:5.14.5" level="project" />
<orderEntry type="library" name="Maven: javax.jms:javax.jms-api:2.0.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.activemq:activemq-pool:5.13.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.activemq:activemq-jms-pool:5.14.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.activemq:activemq-client:5.14.5" level="project" />
<orderEntry type="library" name="Maven: org.fusesource.hawtbuf:hawtbuf:1.11" level="project" />
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:1.0.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.4.3" level="project" />
<orderEntry type="library" name="Maven: javax.mail:mail:1.4.7" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.8" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.8" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.8" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.3.0" level="project" />
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:28.0-jre" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.8.1" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.2" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.17" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.25.RELEASE" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
</component>
</module>

@ -27,6 +27,8 @@ public interface Constants {
//任务编号常量
String RESOURCE_INSPECT_TASK = "RESOURCE_INSPECT_TASK";
//报修任务单号
String RESOURCE_REPAIR_TASK = "RESOURCE_REPAIR_TASK";
String SITE_ADMIN = "SITE_ADMIN";

@ -87,6 +87,9 @@ public enum HandleEnum {
/**设备检验任务**/
RESOURCE_INSPECT_TASK("ResourceInspectTaskBo","ResourceInspectTaskBo:{0},{1}"),
/**设备检验任务**/
RESOURCE_REPAIR_TASK("ResourceRepairTaskBo","ResourceRepairTaskBo:{0},{1}"),
/**物料批次**/
ITEM_BATCH("ItemBatchBo", "ItemBatchBo:{0},{1},{2}"),

@ -155,7 +155,11 @@ public class ResourceInspectTaskController {
if (resourceTypeNo != null){
resourceInspectTaskDto.setResourceTypeBo(HandleEnum.RESOURCE_TYPE.getHandle(site,resourceTypeNo));
}
return R.ok(resourceInspectTaskService.findResourceInspectTaskList(resourceInspectTaskDto));
try{
return R.ok(resourceInspectTaskService.findResourceInspectTaskList(resourceInspectTaskDto));
}catch (Exception e){
return R.failed("检索失败:" + e.getMessage());
}
}
@ -179,26 +183,20 @@ public class ResourceInspectTaskController {
}
/**
*
* @param taskNo
*
* 1
* 2
* @param resourceInspectTask
* @return
*/
@ResponseBody
@GetMapping("/startAndUpdateTask")
public R startAndUpdateTask(String taskNo){
String handle = HandleEnum.RESOURCE_INSPECT_TASK.getHandle(CommonMethods.getSite(), taskNo);
ResourceInspectTask task = resourceInspectTaskService.getById(handle);
task.setStatus("501");
task.setActualStartDate(LocalDateTime.now());
task.setExecutor(CommonMethods.getUser());
// 保存的数据id或者handle
//task.setExecutor(CommonMethods.getUser());
@GetMapping("/startOrCancelTask")
public R startOrCancelTask(ResourceInspectTask resourceInspectTask){
try {
resourceInspectTaskService.saveOrUpdate(task);
return R.ok(resourceInspectTaskService.startOrCancelTask(resourceInspectTask));
}catch (Exception e){
return R.failed("数据更新失败,开始执行异常" + e.getMessage());
return R.failed("数据更新失败" + e.getMessage());
}
return R.ok(task);
}
/***
@ -208,7 +206,6 @@ public class ResourceInspectTaskController {
* @param
* @return
*/
@PostMapping ("/saveOrUpdateTaskInfo")
public R saveOrUpdateTaskInfo(@RequestBody ResourceInspectTaskDto resourceInspectTaskDto){
String user = CommonMethods.getUser();

@ -0,0 +1,262 @@
package com.foreverwin.mesnac.equip.controller;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.CommonMethods;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.equip.service.ResourceRepairTaskService;
import com.foreverwin.mesnac.equip.model.ResourceRepairTask;
import java.util.List;
/**
*
* @author pavel.Liu
* @since 2021-07-07
*/
@RestController
@RequestMapping("/Z-RESOURCE-REPAIR-TASK")
public class ResourceRepairTaskController {
@Autowired
public ResourceRepairTaskService resourceRepairTaskService;
/**
* id
*
* @param id
* @return
*/
@ResponseBody
@GetMapping("/{id:.+}")
public R getResourceRepairTaskById(@PathVariable String id) {
return R.ok( resourceRepairTaskService.getById(id));
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("")
public R getResourceRepairTaskList(ResourceRepairTask resourceRepairTask){
List<ResourceRepairTask> result;
QueryWrapper<ResourceRepairTask> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(resourceRepairTask);
result = resourceRepairTaskService.list(queryWrapper);
return R.ok(result);
}
/**
*
*
* @param frontPage
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<ResourceRepairTask> frontPage, ResourceRepairTask resourceRepairTask){
IPage result;
QueryWrapper<ResourceRepairTask> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(resourceRepairTask);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(ResourceRepairTask::getHandle, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getSite, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getRepairNo, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getDescription, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getStatus, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getResourceNo, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getReportUser, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getNcCodeNo, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getRepairType, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getStopMachine, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getBreakDownDescription, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getFindLink, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getReportSource, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getObjectBo, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getRepairUsers, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getCancelCode, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getCancelDescription, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getCancelUser, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getDealWay, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getPreliminaryReason, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getDealWayDescription, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getWaitDescription, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getPrimaryReason, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getPrimaryReasonDescription, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getPrecautionMeasureDescription, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getRemark, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getOther, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getAnother, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getCreateUser, frontPage.getGlobalQuery())
.or().like(ResourceRepairTask::getModifyUser, frontPage.getGlobalQuery())
);
}
result = resourceRepairTaskService.page(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}
/**
*
* @param resourceRepairTask
* @return null
*/
@PostMapping
public R save(@RequestBody ResourceRepairTask resourceRepairTask) {
return R.ok(resourceRepairTaskService.save(resourceRepairTask));
}
/**
*
* @param resourceRepairTask
* @return null
*/
@PutMapping
public R updateById(@RequestBody ResourceRepairTask resourceRepairTask) {
return R.ok(resourceRepairTaskService.updateById(resourceRepairTask));
}
/**
* id
* @param id ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
public R removeById(@PathVariable("id") String id){
return R.ok(resourceRepairTaskService.removeById(id));
}
/**
*
* @param ids ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
public R removeByIds(List<String> ids){
return R.ok(resourceRepairTaskService.removeByIds(ids));
}
/**
*
* @param resourceRepairTask
* @return
*/
@ResponseBody
@GetMapping("/saveRepairTask")
public R saveRepairTask(ResourceRepairTask resourceRepairTask){
try{
resourceRepairTaskService.saveRepairTask(resourceRepairTask);
}catch (Exception e){
R.failed("提报失败,"+e.getMessage());
}
return R.ok();
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("/findResourceRepairTaskList")
public R findResourceRepairTaskList(ResourceRepairTask resourceRepairTask){
try {
return R.ok(resourceRepairTaskService.findResourceRepairTaskList(resourceRepairTask));
}catch (Exception e){
return R.failed(""+e.getMessage());
}
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("/selOrStartRepairTask")
public R selOrStartRepairTask(ResourceRepairTask resourceRepairTask){
try {
return R.ok(resourceRepairTaskService.selOrStartRepairTask(resourceRepairTask));
}catch (Exception e){
return R.failed(""+e.getMessage());
}
}
/**
*
*
* @return
*/
@PostMapping("/saveOrUpdateTaskInfo")
public R saveOrUpdateTaskInfo(@RequestBody ResourceRepairTask resourceRepairTask){
try {
return R.ok(resourceRepairTaskService.saveOrUpdateTaskInfo(resourceRepairTask));
}catch (Exception e){
return R.failed(""+e.getMessage());
}
}
/**
* sqlHANDLE
* 1
* 2
* @return
*/
@ResponseBody
@GetMapping("/findResourceRepairTaskByHandleAndSite")
public R findResourceRepairTaskByHandleAndSite(String repairNo){
String site = CommonMethods.getSite();
String handle = HandleEnum.RESOURCE_REPAIR_TASK.getHandle(site, repairNo);
try {
return R.ok(resourceRepairTaskService.findResourceRepairTaskByHandleAndSite(site,handle));
}catch (Exception e){
return R.failed(""+e.getMessage());
}
}
/**
* sqlHANDLE
*
* @return
*/
@PostMapping("/updateResourceRepairTaskByHandle")
public R updateResourceRepairTaskByHandle(@RequestBody ResourceRepairTask resourceRepairTask){
String handle = resourceRepairTask.getHandle();
ResourceRepairTask repairTask = resourceRepairTaskService.getById(handle);
repairTask.setPrimaryReason(resourceRepairTask.getPrimaryReason());
repairTask.setPrecautionMeasureDescription(resourceRepairTask.getPrecautionMeasureDescription());
repairTask.setPrimaryReasonDescription(resourceRepairTask.getPrimaryReasonDescription());
try {
return R.ok(resourceRepairTaskService.updateById(repairTask));
}catch (Exception e){
return R.failed("纠正预防更新失败:"+e.getMessage());
}
}
/**
* sqlHANDLE
*
* @return
*/
@PostMapping("/updateResourceRepairTaskInfoByHandle")
public R updateResourceRepairTaskInfoByHandle(@RequestBody ResourceRepairTask resourceRepairTask){
try {
return R.ok(resourceRepairTaskService.updateResourceRepairTaskInfoByHandle(resourceRepairTask));
}catch (Exception e){
return R.failed("维修任务数据更改失败:"+e.getMessage());
}
}
}

@ -5,6 +5,7 @@ import com.foreverwin.mesnac.equip.model.ResourceInspectTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import java.time.LocalDateTime;
import java.util.List;
/**
@ -24,4 +25,7 @@ public interface ResourceInspectTaskMapper extends BaseMapper<ResourceInspectTas
*/
List<ResourceInspectTaskDto> findResourceInspectTaskList(ResourceInspectTaskDto resourceInspectTaskDto);
LocalDateTime selectMaxCreateTimeByPlanBoAnd(ResourceInspectTask resourceInspectTask);
}

@ -0,0 +1,36 @@
package com.foreverwin.mesnac.equip.mapper;
import com.foreverwin.mesnac.equip.model.ResourceRepairTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* @author pavel.Liu
* @since 2021-07-06
*/
@Repository
public interface ResourceRepairTaskMapper extends BaseMapper<ResourceRepairTask> {
/**
* sql
* @param resourceRepairTask
* @return
*/
List<ResourceRepairTask> findResourceRepairTaskList(ResourceRepairTask resourceRepairTask);
/**
* sqlHANDLE
* @param site
* @param handle
* @return
*/
ResourceRepairTask findResourceRepairTaskByHandleAndSite(@Param("site") String site,@Param("handle") String handle);
}

@ -0,0 +1,866 @@
package com.foreverwin.mesnac.equip.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
* /
* </p>
*
* @author pavel.Liu
* @since 2021-07-07
*/
@TableName("Z_RESOURCE_REPAIR_TASK")
public class ResourceRepairTask extends Model<ResourceRepairTask> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
/**
*
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("REPAIR_NO")
private String repairNo;
/**
*
*/
@TableField("DESCRIPTION")
private String description;
/**
*
*/
@TableField("STATUS")
private String status;
/**
*
*/
@TableField("RESOURCE_NO")
private String resourceNo;
/**
*
*/
@TableField("REPORT_USER")
private String reportUser;
/**
* HANDLE
*/
@TableField("NC_CODE_NO")
private String ncCodeNo;
/**
*
*/
@TableField("REPAIR_TYPE")
private String repairType;
/**
*
*/
@TableField("STOP_MACHINE")
private String stopMachine;
/**
*
*/
@TableField("BREAK_DOWN_DESCRIPTION")
private String breakDownDescription;
/**
*
*/
@TableField("FIND_LINK")
private String findLink;
/**
*
*/
@TableField("REPORT_SOURCE")
private String reportSource;
/**
* -
*/
@TableField("OBJECT_BO")
private String objectBo;
/**
*
*/
@TableField("PLAN_START_DATE")
private LocalDateTime planStartDate;
/**
*
*/
@TableField("PLAN_COMPLETE_DATE")
private LocalDateTime planCompleteDate;
/**
*
*/
@TableField("ACTUAL_START_DATE")
private LocalDateTime actualStartDate;
/**
*
*/
@TableField("ACTUAL_COMPLETE_DATE")
private LocalDateTime actualCompleteDate;
/**
*
*/
@TableField("REPAIR_USERS")
private String repairUsers;
/**
*
*/
@TableField("CANCEL_CODE")
private String cancelCode;
/**
*
*/
@TableField("CANCEL_DATE")
private LocalDateTime cancelDate;
/**
*
*/
@TableField("CANCEL_DESCRIPTION")
private String cancelDescription;
/**
*
*/
@TableField("CANCEL_USER")
private String cancelUser;
/**
*
*/
@TableField("DEAL_WAY")
private String dealWay;
/**
*
*/
@TableField("PRELIMINARY_REASON")
private String preliminaryReason;
/**
*
*/
@TableField("DEAL_WAY_DESCRIPTION")
private String dealWayDescription;
/**
*
*/
@TableField("WAIT_TIME")
private Double waitTime;
/**
*
*/
@TableField("WAIT_START_DATE")
private LocalDateTime waitStartDate;
/**
*
*/
@TableField("WAIT_END_DATE")
private LocalDateTime waitEndDate;
/**
*
*/
@TableField("WAIT_DESCRIPTION")
private String waitDescription;
/**
*
*/
@TableField("PRIMARY_REASON")
private String primaryReason;
/**
*
*/
@TableField("PRIMARY_REASON_DESCRIPTION")
private String primaryReasonDescription;
/**
*
*/
@TableField("PRECAUTION_MEASURE_DESCRIPTION")
private String precautionMeasureDescription;
/**
*
*/
@TableField("REMARK")
private String remark;
/**
* 1
*/
@TableField("OTHER")
private String other;
/**
* 2
*/
@TableField("ANOTHER")
private String another;
/**
*
*/
@TableField("CREATE_USER")
private String createUser;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@TableField("MODIFY_USER")
private String modifyUser;
/**
*
*/
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
/**
* HANDLE
*/
@TableField(exist = false)
private String resourceBo;
/**
*
*/
@TableField(exist = false)
private String resourceDescription;
/**
*
*/
@TableField(exist = false)
private String resourceTypeNo;
/**
* HANDLE
*/
@TableField(exist = false)
private String resourceTypeBo;
/**
*
*/
@TableField(exist = false)
private String resourceTypeDescription;
/**
* HANDLE
*/
@TableField(exist = false)
private String ncCodeBo;
/**
*
*/
@TableField(exist = false)
private String ncCodeDescription;
/**
*
*/
@TableField(exist = false)
private String workCenterNo;
/**
* HANDLE
*/
@TableField(exist = false)
private String workCenterBo;
/**
*
*/
@TableField(exist = false)
private String workCenterDescription;
/**
*
*/
@TableField(exist = false)
private LocalDateTime compareStartTime;
/**
*
*/
@TableField(exist = false)
private LocalDateTime compareEndTime;
/**
*
*/
@TableField(exist = false)
private List<ResourceInspectTaskSpare> spareList;
/**
*
*/
@TableField(exist = false)
private Integer seq;
public List<ResourceInspectTaskSpare> getSpareList() {
return spareList;
}
public void setSpareList(List<ResourceInspectTaskSpare> spareList) {
this.spareList = spareList;
}
public String getWorkCenterBo() {
return workCenterBo;
}
public void setWorkCenterBo(String workCenterBo) {
this.workCenterBo = workCenterBo;
}
public String getNcCodeBo() {
return ncCodeBo;
}
public void setNcCodeBo(String ncCodeBo) {
this.ncCodeBo = ncCodeBo;
}
public String getResourceBo() {
return resourceBo;
}
public void setResourceBo(String resourceBo) {
this.resourceBo = resourceBo;
}
public String getResourceDescription() {
return resourceDescription;
}
public void setResourceDescription(String resourceDescription) {
this.resourceDescription = resourceDescription;
}
public String getResourceTypeNo() {
return resourceTypeNo;
}
public void setResourceTypeNo(String resourceTypeNo) {
this.resourceTypeNo = resourceTypeNo;
}
public String getResourceTypeBo() {
return resourceTypeBo;
}
public void setResourceTypeBo(String resourceTypeBo) {
this.resourceTypeBo = resourceTypeBo;
}
public String getResourceTypeDescription() {
return resourceTypeDescription;
}
public void setResourceTypeDescription(String resourceTypeDescription) {
this.resourceTypeDescription = resourceTypeDescription;
}
public String getNcCodeDescription() {
return ncCodeDescription;
}
public void setNcCodeDescription(String ncCodeDescription) {
this.ncCodeDescription = ncCodeDescription;
}
public String getWorkCenterNo() {
return workCenterNo;
}
public void setWorkCenterNo(String workCenterNo) {
this.workCenterNo = workCenterNo;
}
public String getWorkCenterDescription() {
return workCenterDescription;
}
public void setWorkCenterDescription(String workCenterDescription) {
this.workCenterDescription = workCenterDescription;
}
public LocalDateTime getCompareStartTime() {
return compareStartTime;
}
public void setCompareStartTime(LocalDateTime compareStartTime) {
this.compareStartTime = compareStartTime;
}
public LocalDateTime getCompareEndTime() {
return compareEndTime;
}
public void setCompareEndTime(LocalDateTime compareEndTime) {
this.compareEndTime = compareEndTime;
}
public Integer getSeq() {
return seq;
}
public void setSeq(Integer seq) {
this.seq = seq;
}
/** ------------------------------------------------------------------------------------------------------ **/
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getRepairNo() {
return repairNo;
}
public void setRepairNo(String repairNo) {
this.repairNo = repairNo;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getResourceNo() {
return resourceNo;
}
public void setResourceNo(String resourceNo) {
this.resourceNo = resourceNo;
}
public String getReportUser() {
return reportUser;
}
public void setReportUser(String reportUser) {
this.reportUser = reportUser;
}
public String getNcCodeNo() {
return ncCodeNo;
}
public void setNcCodeNo(String ncCodeNo) {
this.ncCodeNo = ncCodeNo;
}
public String getRepairType() {
return repairType;
}
public void setRepairType(String repairType) {
this.repairType = repairType;
}
public String getStopMachine() {
return stopMachine;
}
public void setStopMachine(String stopMachine) {
this.stopMachine = stopMachine;
}
public String getBreakDownDescription() {
return breakDownDescription;
}
public void setBreakDownDescription(String breakDownDescription) {
this.breakDownDescription = breakDownDescription;
}
public String getFindLink() {
return findLink;
}
public void setFindLink(String findLink) {
this.findLink = findLink;
}
public String getReportSource() {
return reportSource;
}
public void setReportSource(String reportSource) {
this.reportSource = reportSource;
}
public String getObjectBo() {
return objectBo;
}
public void setObjectBo(String objectBo) {
this.objectBo = objectBo;
}
public LocalDateTime getPlanStartDate() {
return planStartDate;
}
public void setPlanStartDate(LocalDateTime planStartDate) {
this.planStartDate = planStartDate;
}
public LocalDateTime getPlanCompleteDate() {
return planCompleteDate;
}
public void setPlanCompleteDate(LocalDateTime planCompleteDate) {
this.planCompleteDate = planCompleteDate;
}
public LocalDateTime getActualStartDate() {
return actualStartDate;
}
public void setActualStartDate(LocalDateTime actualStartDate) {
this.actualStartDate = actualStartDate;
}
public LocalDateTime getActualCompleteDate() {
return actualCompleteDate;
}
public void setActualCompleteDate(LocalDateTime actualCompleteDate) {
this.actualCompleteDate = actualCompleteDate;
}
public String getRepairUsers() {
return repairUsers;
}
public void setRepairUsers(String repairUsers) {
this.repairUsers = repairUsers;
}
public String getCancelCode() {
return cancelCode;
}
public void setCancelCode(String cancelCode) {
this.cancelCode = cancelCode;
}
public LocalDateTime getCancelDate() {
return cancelDate;
}
public void setCancelDate(LocalDateTime cancelDate) {
this.cancelDate = cancelDate;
}
public String getCancelDescription() {
return cancelDescription;
}
public void setCancelDescription(String cancelDescription) {
this.cancelDescription = cancelDescription;
}
public String getCancelUser() {
return cancelUser;
}
public void setCancelUser(String cancelUser) {
this.cancelUser = cancelUser;
}
public String getDealWay() {
return dealWay;
}
public void setDealWay(String dealWay) {
this.dealWay = dealWay;
}
public String getPreliminaryReason() {
return preliminaryReason;
}
public void setPreliminaryReason(String preliminaryReason) {
this.preliminaryReason = preliminaryReason;
}
public String getDealWayDescription() {
return dealWayDescription;
}
public void setDealWayDescription(String dealWayDescription) {
this.dealWayDescription = dealWayDescription;
}
public Double getWaitTime() {
return waitTime;
}
public void setWaitTime(Double waitTime) {
this.waitTime = waitTime;
}
public LocalDateTime getWaitStartDate() {
return waitStartDate;
}
public void setWaitStartDate(LocalDateTime waitStartDate) {
this.waitStartDate = waitStartDate;
}
public LocalDateTime getWaitEndDate() {
return waitEndDate;
}
public void setWaitEndDate(LocalDateTime waitEndDate) {
this.waitEndDate = waitEndDate;
}
public String getWaitDescription() {
return waitDescription;
}
public void setWaitDescription(String waitDescription) {
this.waitDescription = waitDescription;
}
public String getPrimaryReason() {
return primaryReason;
}
public void setPrimaryReason(String primaryReason) {
this.primaryReason = primaryReason;
}
public String getPrimaryReasonDescription() {
return primaryReasonDescription;
}
public void setPrimaryReasonDescription(String primaryReasonDescription) {
this.primaryReasonDescription = primaryReasonDescription;
}
public String getPrecautionMeasureDescription() {
return precautionMeasureDescription;
}
public void setPrecautionMeasureDescription(String precautionMeasureDescription) {
this.precautionMeasureDescription = precautionMeasureDescription;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getOther() {
return other;
}
public void setOther(String other) {
this.other = other;
}
public String getAnother() {
return another;
}
public void setAnother(String another) {
this.another = another;
}
public String getCreateUser() {
return createUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public String getModifyUser() {
return modifyUser;
}
public void setModifyUser(String modifyUser) {
this.modifyUser = modifyUser;
}
public LocalDateTime getModifiedDateTime() {
return modifiedDateTime;
}
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
this.modifiedDateTime = modifiedDateTime;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
public static final String REPAIR_NO = "REPAIR_NO";
public static final String DESCRIPTION = "DESCRIPTION";
public static final String STATUS = "STATUS";
public static final String RESOURCE_NO = "RESOURCE_NO";
public static final String REPORT_USER = "REPORT_USER";
public static final String NC_CODE_NO = "NC_CODE_NO";
public static final String REPAIR_TYPE = "REPAIR_TYPE";
public static final String STOP_MACHINE = "STOP_MACHINE";
public static final String BREAK_DOWN_DESCRIPTION = "BREAK_DOWN_DESCRIPTION";
public static final String FIND_LINK = "FIND_LINK";
public static final String REPORT_SOURCE = "REPORT_SOURCE";
public static final String OBJECT_BO = "OBJECT_BO";
public static final String PLAN_START_DATE = "PLAN_START_DATE";
public static final String PLAN_COMPLETE_DATE = "PLAN_COMPLETE_DATE";
public static final String ACTUAL_START_DATE = "ACTUAL_START_DATE";
public static final String ACTUAL_COMPLETE_DATE = "ACTUAL_COMPLETE_DATE";
public static final String REPAIR_USERS = "REPAIR_USERS";
public static final String CANCEL_CODE = "CANCEL_CODE";
public static final String CANCEL_DATE = "CANCEL_DATE";
public static final String CANCEL_DESCRIPTION = "CANCEL_DESCRIPTION";
public static final String CANCEL_USER = "CANCEL_USER";
public static final String DEAL_WAY = "DEAL_WAY";
public static final String PRELIMINARY_REASON = "PRELIMINARY_REASON";
public static final String DEAL_WAY_DESCRIPTION = "DEAL_WAY_DESCRIPTION";
public static final String WAIT_TIME = "WAIT_TIME";
public static final String WAIT_START_DATE = "WAIT_START_DATE";
public static final String WAIT_END_DATE = "WAIT_END_DATE";
public static final String WAIT_DESCRIPTION = "WAIT_DESCRIPTION";
public static final String PRIMARY_REASON = "PRIMARY_REASON";
public static final String PRIMARY_REASON_DESCRIPTION = "PRIMARY_REASON_DESCRIPTION";
public static final String PRECAUTION_MEASURE_DESCRIPTION = "PRECAUTION_MEASURE_DESCRIPTION";
public static final String REMARK = "REMARK";
public static final String OTHER = "OTHER";
public static final String ANOTHER = "ANOTHER";
public static final String CREATE_USER = "CREATE_USER";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String MODIFY_USER = "MODIFY_USER";
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "ResourceRepairTask{" +
"handle = " + handle +
", site = " + site +
", repairNo = " + repairNo +
", description = " + description +
", status = " + status +
", resourceNo = " + resourceNo +
", reportUser = " + reportUser +
", ncCodeNo = " + ncCodeNo +
", repairType = " + repairType +
", stopMachine = " + stopMachine +
", breakDownDescription = " + breakDownDescription +
", findLink = " + findLink +
", reportSource = " + reportSource +
", objectBo = " + objectBo +
", planStartDate = " + planStartDate +
", planCompleteDate = " + planCompleteDate +
", actualStartDate = " + actualStartDate +
", actualCompleteDate = " + actualCompleteDate +
", repairUsers = " + repairUsers +
", cancelCode = " + cancelCode +
", cancelDate = " + cancelDate +
", cancelDescription = " + cancelDescription +
", cancelUser = " + cancelUser +
", dealWay = " + dealWay +
", preliminaryReason = " + preliminaryReason +
", dealWayDescription = " + dealWayDescription +
", waitTime = " + waitTime +
", waitStartDate = " + waitStartDate +
", waitEndDate = " + waitEndDate +
", waitDescription = " + waitDescription +
", primaryReason = " + primaryReason +
", primaryReasonDescription = " + primaryReasonDescription +
", precautionMeasureDescription = " + precautionMeasureDescription +
", remark = " + remark +
", other = " + other +
", another = " + another +
", createUser = " + createUser +
", createdDateTime = " + createdDateTime +
", modifyUser = " + modifyUser +
", modifiedDateTime = " + modifiedDateTime +
"}";
}
}

@ -3,6 +3,7 @@ package com.foreverwin.mesnac.equip.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.equip.model.ResourceInspectPlan;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.equip.model.ResourceInspectTask;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
@ -34,4 +35,10 @@ public interface ResourceInspectPlanService extends IService<ResourceInspectPlan
void autoCreateTaskByResourceInspectPlan(ResourceInspectPlan resourceInspectPlan);
/**
*
* @param resourceInspectTask
*/
void autoCreateTaskByResourceInspectTask(ResourceInspectTask resourceInspectTask);
}

@ -42,9 +42,19 @@ public interface ResourceInspectTaskService extends IService<ResourceInspectTask
* **/
ResourceInspectTask getResourceInspectTaskAll(ResourceInspectTask resourceInspectTask);
/**
*
* @param resourceInspectTask
* @return
*/
ResourceInspectTask startOrCancelTask(ResourceInspectTask resourceInspectTask);
/**
*
* @param resourceInspectTaskDto
*/
void saveOrUpdateTaskInfo(ResourceInspectTaskDto resourceInspectTaskDto);
}

@ -0,0 +1,71 @@
package com.foreverwin.mesnac.equip.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.equip.model.ResourceRepairTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author pavel.Liu
* @since 2021-07-06
*/
public interface ResourceRepairTaskService extends IService<ResourceRepairTask> {
/**
*
* @param frontPage
* @return
*/
IPage<ResourceRepairTask> selectPage(FrontPage<ResourceRepairTask> frontPage, ResourceRepairTask resourceRepairTask);
List<ResourceRepairTask> selectList(ResourceRepairTask resourceRepairTask);
void deleteRepairTaskList(ResourceRepairTask resourceRepairTask);
/**
*
* @param resourceRepairTask
*/
void saveRepairTask(ResourceRepairTask resourceRepairTask);
/**
*
* @param resourceRepairTask
* @return
*/
List<ResourceRepairTask> findResourceRepairTaskList(ResourceRepairTask resourceRepairTask);
/**
* HANDLE
* 1
* 2
* @param resourceRepairTask
* @return
*/
ResourceRepairTask selOrStartRepairTask(ResourceRepairTask resourceRepairTask);
/**
* 使
* 1301->
* 2302->
* 3502->
* 4501->
* @param resourceRepairTask
* @return
*/
ResourceRepairTask saveOrUpdateTaskInfo(ResourceRepairTask resourceRepairTask);
/**
* sqlHANDLE
**/
ResourceRepairTask findResourceRepairTaskByHandleAndSite(String site,String handle);
Boolean updateResourceRepairTaskInfoByHandle(ResourceRepairTask resourceRepairTask);
}

@ -7,7 +7,7 @@ import com.foreverwin.mesnac.common.model.InspectionItem;
import com.foreverwin.mesnac.common.model.InspectionItemDetail;
import com.foreverwin.mesnac.common.service.InspectionItemDetailService;
import com.foreverwin.mesnac.common.service.InspectionItemService;
import com.foreverwin.mesnac.common.service.NextNumberService;
import com.foreverwin.mesnac.equip.mapper.ResourceInspectTaskMapper;
import com.foreverwin.mesnac.equip.model.*;
import com.foreverwin.mesnac.equip.service.*;
import com.foreverwin.mesnac.meapi.model.UserGroup;
@ -24,7 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@ -59,6 +58,8 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
public ResourceInspectTaskService resourceInspectTaskService;
@Autowired
public ResourceInspectTaskParamService resourceInspectTaskParamService;
@Autowired
public ResourceInspectTaskMapper resourceInspectTaskMapper;
@Override
public IPage<ResourceInspectPlan> selectPage(FrontPage<ResourceInspectPlan> frontPage, ResourceInspectPlan resourceInspectPlan) {
@ -350,6 +351,47 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
}
}
@Override
public void autoCreateTaskByResourceInspectTask(ResourceInspectTask resourceInspectTask) {
// 检验计划HANDLE、检验计划周期频率、单位排程方式前后容差时间
String site = resourceInspectTask.getSite();
String planHandle = resourceInspectTask.getResourceInspectPlanBo();
ResourceInspectPlan inspectPlan = resourceInspectPlanService.getById(planHandle);
Double frequency = inspectPlan.getFrequency();
String frequencyUnit = inspectPlan.getFrequencyUnit();
String scheduleType = inspectPlan.getScheduleType();
String resourceBo = resourceInspectTask.getResourceBo();
ResourceInspectTask newInspectTask = new ResourceInspectTask();
if (scheduleType.equals("1")){
LocalDateTime maxCreateTime = resourceInspectTaskMapper.selectMaxCreateTimeByPlanBoAnd(resourceInspectTask);
LocalDateTime nextTaskDate = addTime(frequencyUnit, frequency, maxCreateTime);
newInspectTask.setTaskCreateDate(nextTaskDate);
}else{
LocalDateTime modifiedDateTime = resourceInspectTask.getModifiedDateTime();
LocalDateTime nextTaskDate = addTime(frequencyUnit, frequency, modifiedDateTime);
newInspectTask.setTaskCreateDate(nextTaskDate);
}
String planStatus = inspectPlan.getStatus();
if (!planStatus.equals("301")){
return;
}
ResourceInspectResource resource = resourceInspectResourceService.getById(planHandle + ";" + resourceBo);
String resourceStatus = resource.getStatus();
if (!resourceStatus.equals("301")){
return;
}
LocalDateTime indateEnd = inspectPlan.getIndateEnd();
if (newInspectTask.getTaskCreateDate().isAfter(indateEnd)){
return;
}
ResourceInspectTask inspectTask = setResourceInspectTask(inspectPlan, resourceInspectTask, -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)));
resourceInspectTaskService.save(inspectTask);
}
/**
*
*/
@ -402,7 +444,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
ResourceInspectTask inspectTask = new ResourceInspectTask();
// 基本字段录入站点、状态、计划HANDLE、检验项清单HANDLE、检验类型
inspectTask.setSite(resourceInspectPlan.getSite());
inspectTask.setStatus("301");
inspectTask.setStatus("401");
inspectTask.setResourceInspectPlanBo(resourceInspectPlan.getHandle());
inspectTask.setInspectionItemBo(resourceInspectPlan.getInspectionItemBo());
inspectTask.setCategory(resourceInspectPlan.getCategory());
@ -424,7 +466,7 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
inspectTask.setPlanCompleteDate(taskCreateDate.plusDays(afterTolerance));
}
// 创建人员、创建时间;修改人员、修改时间
if (sign==1){ // sign==1更新添加修改人员和修改时间
if (sign == 1){ // sign==1更新添加修改人员和修改时间
inspectTask.setModifyUser(resourceInspectPlan.getModifyUser());
inspectTask.setModifiedDateTime(resourceInspectPlan.getModifiedDateTime());
}

@ -129,13 +129,57 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectT
return resourceInspectTask;
}
@Override
public ResourceInspectTask startOrCancelTask(ResourceInspectTask resourceInspectTask) {
String handle = resourceInspectTask.getHandle();
String status = resourceInspectTask.getStatus();
String reason = resourceInspectTask.getReason();
String user = CommonMethods.getUser();
ResourceInspectTask task = resourceInspectTaskService.getById(handle);
String executor = task.getExecutor();
task.setStatus(status);
// 状态变更为“处理中/进行中”:插入数据执行人、实际开始时间
if ( status.equals("501") ){
task.setActualStartDate(LocalDateTime.now());
task.setExecutor(user);
}
// 状态变更为“取消”:插入数据
if( status.equals("302") ){
boolean bl = executor != null;
if( executor != null && !executor.equals(user)){
// throw BusinessException.build("1","当前用户与执行人不一致,取消操作失败!!!");
throw BusinessException.build("当前用户与执行人不一致,取消操作失败!!!");
}
task.setReason(reason);
// 取消时,创建新任务
resourceInspectPlanService.autoCreateTaskByResourceInspectTask(task);
}
task.setModifyUser(user);
task.setModifiedDateTime(LocalDateTime.now());
// 保存数据
resourceInspectTaskService.saveOrUpdate(task);
// 获取检验项清单
ResourceInspectTaskParam resourceInspectTaskParam = new ResourceInspectTaskParam();
resourceInspectTaskParam.setResourceInspectTaskBo(handle);
List<ResourceInspectTaskParam> taskParamList = resourceInspectTaskParamService.selectList(resourceInspectTaskParam);
task.setTaskItemDetailList(taskParamList);
// 获取备品清单
ResourceInspectTaskSpare resourceInspectTaskSpare = new ResourceInspectTaskSpare();
resourceInspectTaskSpare.setResourceInspectTaskBo(handle);
List<ResourceInspectTaskSpare> taskSpareList = resourceInspectTaskSpareService.selectList(resourceInspectTaskSpare);
task.setTaskSpareList(taskSpareList);
return task;
}
@Override
public void saveOrUpdateTaskInfo(ResourceInspectTaskDto resourceInspectTaskDto) {
// 站点、任务编号——任务handle
// 站点、任务编号——任务handle、执行人、状态
String site = CommonMethods.getSite();
String taskNo = resourceInspectTaskDto.getTaskNo();
String taskHandle = HandleEnum.RESOURCE_INSPECT_TASK.getHandle(site, taskNo);
String executor = resourceInspectTaskDto.getExecutor();
String status = resourceInspectTaskDto.getStatus();
// 检验项、备品清单
List<ResourceInspectTaskParam> taskItemDetailList = resourceInspectTaskDto.getTaskItemDetailList();
List<ResourceInspectTaskSpare> taskSpareList = resourceInspectTaskDto.getTaskSpareList();
@ -144,15 +188,23 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectT
task.setStatus(resourceInspectTaskDto.getStatus());
task.setModifyUser(executor);
task.setModifiedDateTime(LocalDateTime.now());
// 若状态为完成,则获取检验结果
if ( status.equals("301") ){
task.setResult("Y");
for (ResourceInspectTaskParam taskParam:taskItemDetailList) {
if (taskParam.getResult().equals("N")){
task.setResult("N");
break;
}
}
resourceInspectPlanService.autoCreateTaskByResourceInspectTask(task);
}
resourceInspectTaskService.saveOrUpdate(task);
// 检验项全删、全增
ResourceInspectTaskParam resourceInspectTaskParam = new ResourceInspectTaskParam();
resourceInspectTaskParam.setResourceInspectTaskBo(taskHandle);
/*List<ResourceInspectTaskParam> taskParams = resourceInspectTaskParamService.selectList(resourceInspectTaskParam);
if ( taskParams.size() > 0 ){
}*/
resourceInspectTaskParamService.removeAll(resourceInspectTaskParam);
for (ResourceInspectTaskParam taskParam:taskItemDetailList) {
taskParam.setCreatedDateTime(LocalDateTime.now());
taskParam.setCreateUser(executor);
@ -163,9 +215,6 @@ public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectT
resourceInspectTaskSpare.setResourceInspectTaskBo(taskHandle);
resourceInspectTaskSpareService.removeAll(resourceInspectTaskSpare);
for (ResourceInspectTaskSpare taskSpare:taskSpareList) {
if (taskSpare.getDescription()==null){
continue;
}
taskSpare.setResourceInspectTaskBo(taskHandle);
taskSpare.setHandle(HandleEnum.RESOURCE_INSPECT_TASK_SPARE.getHandle(site,UUID.randomUUID().toString()));
taskSpare.setCreatedDateTime(LocalDateTime.now());

@ -0,0 +1,305 @@
package com.foreverwin.mesnac.equip.service.impl;
import com.foreverwin.mesnac.common.constant.Constants;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.helper.NextNumberHelper;
import com.foreverwin.mesnac.equip.model.ResourceInspectTaskSpare;
import com.foreverwin.mesnac.equip.service.EquipService;
import com.foreverwin.mesnac.equip.service.ResourceInspectTaskSpareService;
import com.foreverwin.mesnac.meapi.service.NcCodeService;
import com.foreverwin.mesnac.meapi.service.ResrceService;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.equip.model.ResourceRepairTask;
import com.foreverwin.mesnac.equip.mapper.ResourceRepairTaskMapper;
import com.foreverwin.mesnac.equip.service.ResourceRepairTaskService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.List;
import java.util.UUID;
/**
* <p>
*
* </p>
*
* @author pavel.Liu
* @since 2021-07-06
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class ResourceRepairTaskServiceImpl extends ServiceImpl<ResourceRepairTaskMapper, ResourceRepairTask> implements ResourceRepairTaskService {
@Autowired
private NextNumberHelper nextNumberHelper;
@Autowired
private ResourceRepairTaskMapper resourceRepairTaskMapper;
@Autowired
private EquipService equipService;
@Autowired
private ResourceRepairTaskService resourceRepairTaskService;
@Autowired
private NcCodeService ncCodeService;
@Autowired
private ResourceInspectTaskSpareService resourceInspectTaskSpareService;
@Autowired
private ResrceService resrceService;
@Override
public IPage<ResourceRepairTask> selectPage(FrontPage<ResourceRepairTask> frontPage, ResourceRepairTask resourceRepairTask) {
QueryWrapper<ResourceRepairTask> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(resourceRepairTask);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<ResourceRepairTask> selectList(ResourceRepairTask resourceRepairTask) {
QueryWrapper<ResourceRepairTask> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(resourceRepairTask);
return super.list(queryWrapper);
}
@Override
public void deleteRepairTaskList(ResourceRepairTask resourceRepairTask) {
QueryWrapper<ResourceRepairTask> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(resourceRepairTask);
super.remove(queryWrapper);
}
@Override
public void saveRepairTask(ResourceRepairTask resourceRepairTask) {
String site = resourceRepairTask.getSite();
// 设备编号
String resourceNo = resourceRepairTask.getResourceNo();
String resourceHandle = HandleEnum.RESOURCE.getHandle(site, resourceNo);
if ( equipService.getById(resourceHandle) == null ){
throw BusinessException.build("设备编号错误!!!");
}
// 不良代码
String ncCOdeNo = resourceRepairTask.getNcCodeNo();
String ncCodeHandle = HandleEnum.NC_CODE.getHandle(site, ncCOdeNo);
if ( ncCodeService.getById(ncCodeHandle) == null ){
throw BusinessException.build("不良代码错误!!!");
}
// 维修单号、维修HANDLE
List<String> nextNumber = nextNumberHelper.getNextNumber(site, Constants.RESOURCE_REPAIR_TASK, 1);
resourceRepairTask.setRepairNo(nextNumber.get(0));
resourceRepairTask.setHandle(HandleEnum.RESOURCE_REPAIR_TASK.getHandle(site,nextNumber.get(0)));
// 默认新建状态
resourceRepairTask.setStatus("401");
// 创建人、创建时间
String reportUser = resourceRepairTask.getReportUser();
if (reportUser == null){
throw BusinessException.build("提报人不能为空!!!");
}
resourceRepairTask.setCreateUser(reportUser);
resourceRepairTask.setCreatedDateTime(LocalDateTime.now());
resourceRepairTaskService.save(resourceRepairTask);
}
@Override
public List<ResourceRepairTask> findResourceRepairTaskList(ResourceRepairTask resourceRepairTask) {
return resourceRepairTaskMapper.findResourceRepairTaskList(resourceRepairTask);
}
@Override
public ResourceRepairTask selOrStartRepairTask(ResourceRepairTask resourceRepairTask) {
// 根据HANDLE查询维修任务
String handle = resourceRepairTask.getHandle();
String stopMachine = resourceRepairTask.getStopMachine();
ResourceRepairTask repairTask = resourceRepairTaskService.getById(handle);
String site = repairTask.getSite();
String statusBo = repairTask.getStatus();
if (repairTask == null){
throw BusinessException.build("维修任务查询失败!!!");
}
String status = resourceRepairTask.getStatus();
if (statusBo.equals("301")){
// 根据维修任务HANDEL查询备品清单
ResourceInspectTaskSpare resourceInspectTaskSpare = new ResourceInspectTaskSpare();
resourceInspectTaskSpare.setResourceInspectTaskBo(handle);
List<ResourceInspectTaskSpare> spareList = resourceInspectTaskSpareService.selectList(resourceInspectTaskSpare);
repairTask.setSpareList(spareList);
}
// 判断是否点击开始维修
if (stopMachine != null && status.equals("501")){
repairTask.setStatus("501");
repairTask.setActualStartDate(LocalDateTime.now());
repairTask.setRepairUsers(CommonMethods.getUser());
resourceRepairTaskService.updateById(repairTask);
// 修改设备状态---若stopMachie=Y则状态改为非预定停机
if (stopMachine.equals("Y")){
String resourceNo = repairTask.getResourceNo();
String resourceBo = HandleEnum.RESOURCE.getHandle(site, resourceNo);
resrceService.updateResourceStatusByHandle(resourceBo,"5");
}
}
return repairTask;
}
@Override
public ResourceRepairTask saveOrUpdateTaskInfo(ResourceRepairTask resourceRepairTask) {
// 状态、HANDLE
String status = resourceRepairTask.getStatus();
String handle = resourceRepairTask.getHandle();
String user = CommonMethods.getUser();
ResourceRepairTask repairTask = resourceRepairTaskService.getById(handle);
String site = repairTask.getSite();
switch (status){
case "301":
List<ResourceInspectTaskSpare> spareList = resourceRepairTask.getSpareList();
for (ResourceInspectTaskSpare spare:spareList) {
spare.setCreateUser(user);
spare.setHandle(HandleEnum.RESOURCE_INSPECT_TASK_SPARE.getHandle(site,UUID.randomUUID().toString()));
spare.setResourceInspectTaskBo(handle);
spare.setCreatedDateTime(LocalDateTime.now());
}
resourceInspectTaskSpareService.saveBatch(spareList);
repairTask.setSpareList(spareList);
// 完成时间、维修人员
repairTask.setActualCompleteDate(LocalDateTime.now());
repairTask.setRepairUsers(resourceRepairTask.getRepairUsers());
// 处理方式、处理方式描述、初步原因
repairTask.setDealWay(resourceRepairTask.getDealWay());
repairTask.setDealWayDescription(resourceRepairTask.getDealWayDescription());
repairTask.setPreliminaryReason(resourceRepairTask.getPreliminaryReason());
// 根本原因、根本原因描述、预防措施描述
repairTask.setPrimaryReason(resourceRepairTask.getPrimaryReason());
repairTask.setPrimaryReasonDescription(resourceRepairTask.getPrimaryReasonDescription());
repairTask.setPrecautionMeasureDescription(resourceRepairTask.getPrecautionMeasureDescription());
// 修改设备状态判断维修前和维修结束的stopMachie字段是否修改
String stopMachine = resourceRepairTask.getStopMachine();
String stopMachineT = repairTask.getStopMachine();
if (!stopMachine.equals(stopMachineT)){
String resourceNo = repairTask.getResourceNo();
String resourceBo = HandleEnum.RESOURCE.getHandle(site, resourceNo);
resrceService.updateResourceStatusByHandle(resourceBo,stopMachineT.equals("N")?"301":"5");
}
break;
case "302":
// 取消代码、取消描述、取消时间、取消人员
repairTask.setCancelCode(resourceRepairTask.getCancelCode());
repairTask.setCancelDescription(resourceRepairTask.getCancelDescription());
repairTask.setCancelDate(LocalDateTime.now());
repairTask.setCancelUser(CommonMethods.getUser());
break;
case "502":
if (repairTask.getWaitStartDate() != null){
throw BusinessException.build("已有等待记录,不能再次进入等待状态!!!");
}else {
repairTask.setWaitStartDate(LocalDateTime.now());
repairTask.setWaitDescription(resourceRepairTask.getWaitDescription());
}
break;
case "501":
// 结束时间、等待时长
repairTask.setWaitEndDate(LocalDateTime.now());
Duration betweenTime = Duration.between(repairTask.getWaitStartDate(), repairTask.getWaitEndDate());
Long waitTime = betweenTime.toHours();
double v = waitTime.doubleValue();
repairTask.setWaitTime(v);
break;
}
/*// 维修完成
if (status.equals("301")){
// 耗用备品清单
List<ResourceInspectTaskSpare> spareList = resourceRepairTask.getSpareList();
for (ResourceInspectTaskSpare spare:spareList) {
spare.setResourceInspectTaskBo(handle);
}
repairTask.setSpareList(spareList);
// 完成时间、维修人员
repairTask.setActualCompleteDate(LocalDateTime.now());
repairTask.setRepairUsers(resourceRepairTask.getRepairUsers());
// 处理方式、处理方式描述、初步原因
repairTask.setDealWay(resourceRepairTask.getDealWay());
repairTask.setDealWayDescription(resourceRepairTask.getDealWayDescription());
repairTask.setPreliminaryReason(resourceRepairTask.getPreliminaryReason());
// 根本原因、根本原因描述、预防措施描述
repairTask.setPrimaryReason(resourceRepairTask.getPrimaryReason());
repairTask.setPrimaryReasonDescription(resourceRepairTask.getPrimaryReasonDescription());
repairTask.setPrecautionMeasureDescription(resourceRepairTask.getPrecautionMeasureDescription());
}
// 取消任务
if (status.equals("302")){
// 取消代码、取消描述、取消时间、取消人员
repairTask.setCancelCode(resourceRepairTask.getCancelCode());
repairTask.setCancelDescription(resourceRepairTask.getCancelDescription());
repairTask.setCancelDate(LocalDateTime.now());
repairTask.setCancelUser(CommonMethods.getUser());
}
// 开始等待
if (status.equals("502")){
if (repairTask.getWaitStartDate() != null){
throw BusinessException.build("已有等待记录,不能再次进入等待状态!!!");
}else {
repairTask.setWaitStartDate(LocalDateTime.now());
}
}
// 结束等待
if (status.equals("501")){
// 结束时间、等待时长
repairTask.setWaitEndDate(LocalDateTime.now());
Duration betweenTime = Duration.between(repairTask.getWaitStartDate(), repairTask.getWaitEndDate());
Long waitTime = betweenTime.toHours();
double v = waitTime.doubleValue();
repairTask.setWaitTime(v);
}*/
// 状态、修改人、修改时间
repairTask.setStatus(status);
repairTask.setModifyUser(user);
repairTask.setModifiedDateTime(LocalDateTime.now());
resourceRepairTaskService.saveOrUpdate(repairTask);
return repairTask;
}
@Override
public ResourceRepairTask findResourceRepairTaskByHandleAndSite(String site, String handle) {
ResourceInspectTaskSpare taskSpare = new ResourceInspectTaskSpare();
taskSpare.setResourceInspectTaskBo(handle);
List<ResourceInspectTaskSpare> spareList = resourceInspectTaskSpareService.selectList(taskSpare);
ResourceRepairTask repairTask = resourceRepairTaskMapper.findResourceRepairTaskByHandleAndSite(site, handle);
repairTask.setSpareList(spareList);
return repairTask;
}
@Override
public Boolean updateResourceRepairTaskInfoByHandle(ResourceRepairTask resourceRepairTask) {
String user = CommonMethods.getUser();
String site = CommonMethods.getSite();
String handle = resourceRepairTask.getHandle();
// 备品信息,全删全增
ResourceInspectTaskSpare resourceInspectTaskSpare = new ResourceInspectTaskSpare();
resourceInspectTaskSpare.setResourceInspectTaskBo(handle);
resourceInspectTaskSpareService.removeAll(resourceInspectTaskSpare);
List<ResourceInspectTaskSpare> spareList = resourceRepairTask.getSpareList();
for (ResourceInspectTaskSpare spare:spareList) {
if (spare.getCreateUser() != null){
spare.setModifyUser(user);
spare.setModifiedDateTime(LocalDateTime.now());
}else {
spare.setCreateUser(user);
spare.setCreatedDateTime(LocalDateTime.now());
}
spare.setResourceInspectTaskBo(handle);
spare.setHandle(HandleEnum.RESOURCE_INSPECT_TASK_SPARE.getHandle(site,UUID.randomUUID().toString()));
}
resourceInspectTaskSpareService.saveBatch(spareList);
return resourceRepairTaskService.updateById(resourceRepairTask);
}
private Double minus(LocalDateTime startDate,LocalDateTime endDate){
return null;
}
}

@ -592,8 +592,10 @@
<!-- BaseMapper标准查询/修改/删除 -->
<!--自定义sql-->
<!--自定义sql模糊查询检验任务所有字段、车间、设备名称等字段-->
<select id="findResourceInspectTaskList" resultType="com.foreverwin.mesnac.equip.dto.ResourceInspectTaskDto">
SELECT ZK.* ,RIP.PLAN_NO AS PLAN_NO ,RIP.FREQUENCY ,RIP.FREQUENCY_UNIT ,
SELECT DISTINCT ZK.* ,RIP.PLAN_NO AS PLAN_NO ,RIP.FREQUENCY ,RIP.FREQUENCY_UNIT ,
R.RESRCE AS RESOURCE_NO ,R.DESCRIPTION AS RESOURCE_DESCRIPTION ,
RTR.RESOURCE_TYPE_BO,WCT.DESCRIPTION AS WORK_CENTER
FROM ( SELECT * FROM Z_RESOURCE_INSPECT_TASK SD
@ -636,5 +638,14 @@
AND WCM.WORK_CENTER_BO = #{workCenter}
</if>
</select>
<!--自定义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>
<!--自定义sql-->
</mapper>

@ -0,0 +1,943 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.foreverwin.mesnac.equip.mapper.ResourceRepairTaskMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="REPAIR_NO" property="repairNo" />
<result column="DESCRIPTION" property="description" />
<result column="STATUS" property="status" />
<result column="RESOURCE_NO" property="resourceNo" />
<result column="REPORT_USER" property="reportUser" />
<result column="NC_CODE_NO" property="ncCodeNo" />
<result column="REPAIR_TYPE" property="repairType" />
<result column="STOP_MACHINE" property="stopMachine" />
<result column="BREAK_DOWN_DESCRIPTION" property="breakDownDescription" />
<result column="FIND_LINK" property="findLink" />
<result column="REPORT_SOURCE" property="reportSource" />
<result column="OBJECT_BO" property="objectBo" />
<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="REPAIR_USERS" property="repairUsers" />
<result column="CANCEL_CODE" property="cancelCode" />
<result column="CANCEL_DATE" property="cancelDate" />
<result column="CANCEL_DESCRIPTION" property="cancelDescription" />
<result column="CANCEL_USER" property="cancelUser" />
<result column="DEAL_WAY" property="dealWay" />
<result column="PRELIMINARY_REASON" property="preliminaryReason" />
<result column="DEAL_WAY_DESCRIPTION" property="dealWayDescription" />
<result column="WAIT_TIME" property="waitTime" />
<result column="WAIT_START_DATE" property="waitStartDate" />
<result column="WAIT_END_DATE" property="waitEndDate" />
<result column="WAIT_DESCRIPTION" property="waitDescription" />
<result column="PRIMARY_REASON" property="primaryReason" />
<result column="PRIMARY_REASON_DESCRIPTION" property="primaryReasonDescription" />
<result column="PRECAUTION_MEASURE_DESCRIPTION" property="precautionMeasureDescription" />
<result column="REMARK" property="remark" />
<result column="OTHER" property="other" />
<result column="ANOTHER" property="another" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFY_USER" property="modifyUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, REPAIR_NO, DESCRIPTION, STATUS, RESOURCE_NO, REPORT_USER, NC_CODE_NO, REPAIR_TYPE, STOP_MACHINE, BREAK_DOWN_DESCRIPTION, FIND_LINK, REPORT_SOURCE, OBJECT_BO, PLAN_START_DATE, PLAN_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, REPAIR_USERS, CANCEL_CODE, CANCEL_DATE, CANCEL_DESCRIPTION, CANCEL_USER, DEAL_WAY, PRELIMINARY_REASON, DEAL_WAY_DESCRIPTION, WAIT_TIME, WAIT_START_DATE, WAIT_END_DATE, WAIT_DESCRIPTION, PRIMARY_REASON, PRIMARY_REASON_DESCRIPTION, PRECAUTION_MEASURE_DESCRIPTION, REMARK, OTHER, ANOTHER, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_RESOURCE_REPAIR_TASK WHERE HANDLE=#{handle}
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_RESOURCE_REPAIR_TASK
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectBatchIds" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_RESOURCE_REPAIR_TASK WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_RESOURCE_REPAIR_TASK
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_RESOURCE_REPAIR_TASK
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<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_REPAIR_TASK
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
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_REPAIR_TASK
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
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_REPAIR_TASK
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" 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_REPAIR_TASK
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
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_REPAIR_TASK
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
INSERT INTO Z_RESOURCE_REPAIR_TASK
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="repairNo!=null">REPAIR_NO,</if>
<if test="description!=null">DESCRIPTION,</if>
<if test="status!=null">STATUS,</if>
<if test="resourceNo!=null">RESOURCE_NO,</if>
<if test="reportUser!=null">REPORT_USER,</if>
<if test="ncCodeNo!=null">NC_CODE_NO,</if>
<if test="repairType!=null">REPAIR_TYPE,</if>
<if test="stopMachine!=null">STOP_MACHINE,</if>
<if test="breakDownDescription!=null">BREAK_DOWN_DESCRIPTION,</if>
<if test="findLink!=null">FIND_LINK,</if>
<if test="reportSource!=null">REPORT_SOURCE,</if>
<if test="objectBo!=null">OBJECT_BO,</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="repairUsers!=null">REPAIR_USERS,</if>
<if test="cancelCode!=null">CANCEL_CODE,</if>
<if test="cancelDate!=null">CANCEL_DATE,</if>
<if test="cancelDescription!=null">CANCEL_DESCRIPTION,</if>
<if test="cancelUser!=null">CANCEL_USER,</if>
<if test="dealWay!=null">DEAL_WAY,</if>
<if test="preliminaryReason!=null">PRELIMINARY_REASON,</if>
<if test="dealWayDescription!=null">DEAL_WAY_DESCRIPTION,</if>
<if test="waitTime!=null">WAIT_TIME,</if>
<if test="waitStartDate!=null">WAIT_START_DATE,</if>
<if test="waitEndDate!=null">WAIT_END_DATE,</if>
<if test="waitDescription!=null">WAIT_DESCRIPTION,</if>
<if test="primaryReason!=null">PRIMARY_REASON,</if>
<if test="primaryReasonDescription!=null">PRIMARY_REASON_DESCRIPTION,</if>
<if test="precautionMeasureDescription!=null">PRECAUTION_MEASURE_DESCRIPTION,</if>
<if test="remark!=null">REMARK,</if>
<if test="other!=null">OTHER,</if>
<if test="another!=null">ANOTHER,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifyUser!=null">MODIFY_USER,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="repairNo!=null">#{repairNo},</if>
<if test="description!=null">#{description},</if>
<if test="status!=null">#{status},</if>
<if test="resourceNo!=null">#{resourceNo},</if>
<if test="reportUser!=null">#{reportUser},</if>
<if test="ncCodeNo!=null">#{ncCodeNo},</if>
<if test="repairType!=null">#{repairType},</if>
<if test="stopMachine!=null">#{stopMachine},</if>
<if test="breakDownDescription!=null">#{breakDownDescription},</if>
<if test="findLink!=null">#{findLink},</if>
<if test="reportSource!=null">#{reportSource},</if>
<if test="objectBo!=null">#{objectBo},</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="repairUsers!=null">#{repairUsers},</if>
<if test="cancelCode!=null">#{cancelCode},</if>
<if test="cancelDate!=null">#{cancelDate},</if>
<if test="cancelDescription!=null">#{cancelDescription},</if>
<if test="cancelUser!=null">#{cancelUser},</if>
<if test="dealWay!=null">#{dealWay},</if>
<if test="preliminaryReason!=null">#{preliminaryReason},</if>
<if test="dealWayDescription!=null">#{dealWayDescription},</if>
<if test="waitTime!=null">#{waitTime},</if>
<if test="waitStartDate!=null">#{waitStartDate},</if>
<if test="waitEndDate!=null">#{waitEndDate},</if>
<if test="waitDescription!=null">#{waitDescription},</if>
<if test="primaryReason!=null">#{primaryReason},</if>
<if test="primaryReasonDescription!=null">#{primaryReasonDescription},</if>
<if test="precautionMeasureDescription!=null">#{precautionMeasureDescription},</if>
<if test="remark!=null">#{remark},</if>
<if test="other!=null">#{other},</if>
<if test="another!=null">#{another},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifyUser!=null">#{modifyUser},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
INSERT INTO Z_RESOURCE_REPAIR_TASK
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{repairNo},
#{description},
#{status},
#{resourceNo},
#{reportUser},
#{ncCodeNo},
#{repairType},
#{stopMachine},
#{breakDownDescription},
#{findLink},
#{reportSource},
#{objectBo},
#{planStartDate},
#{planCompleteDate},
#{actualStartDate},
#{actualCompleteDate},
#{repairUsers},
#{cancelCode},
#{cancelDate},
#{cancelDescription},
#{cancelUser},
#{dealWay},
#{preliminaryReason},
#{dealWayDescription},
#{waitTime},
#{waitStartDate},
#{waitEndDate},
#{waitDescription},
#{primaryReason},
#{primaryReasonDescription},
#{precautionMeasureDescription},
#{remark},
#{other},
#{another},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
</trim>
</insert>
<update id="updateById">
UPDATE Z_RESOURCE_REPAIR_TASK <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.repairNo!=null">REPAIR_NO=#{et.repairNo},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.resourceNo!=null">RESOURCE_NO=#{et.resourceNo},</if>
<if test="et.reportUser!=null">REPORT_USER=#{et.reportUser},</if>
<if test="et.ncCodeNo!=null">NC_CODE_NO=#{et.ncCodeNo},</if>
<if test="et.repairType!=null">REPAIR_TYPE=#{et.repairType},</if>
<if test="et.stopMachine!=null">STOP_MACHINE=#{et.stopMachine},</if>
<if test="et.breakDownDescription!=null">BREAK_DOWN_DESCRIPTION=#{et.breakDownDescription},</if>
<if test="et.findLink!=null">FIND_LINK=#{et.findLink},</if>
<if test="et.reportSource!=null">REPORT_SOURCE=#{et.reportSource},</if>
<if test="et.objectBo!=null">OBJECT_BO=#{et.objectBo},</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.repairUsers!=null">REPAIR_USERS=#{et.repairUsers},</if>
<if test="et.cancelCode!=null">CANCEL_CODE=#{et.cancelCode},</if>
<if test="et.cancelDate!=null">CANCEL_DATE=#{et.cancelDate},</if>
<if test="et.cancelDescription!=null">CANCEL_DESCRIPTION=#{et.cancelDescription},</if>
<if test="et.cancelUser!=null">CANCEL_USER=#{et.cancelUser},</if>
<if test="et.dealWay!=null">DEAL_WAY=#{et.dealWay},</if>
<if test="et.preliminaryReason!=null">PRELIMINARY_REASON=#{et.preliminaryReason},</if>
<if test="et.dealWayDescription!=null">DEAL_WAY_DESCRIPTION=#{et.dealWayDescription},</if>
<if test="et.waitTime!=null">WAIT_TIME=#{et.waitTime},</if>
<if test="et.waitStartDate!=null">WAIT_START_DATE=#{et.waitStartDate},</if>
<if test="et.waitEndDate!=null">WAIT_END_DATE=#{et.waitEndDate},</if>
<if test="et.waitDescription!=null">WAIT_DESCRIPTION=#{et.waitDescription},</if>
<if test="et.primaryReason!=null">PRIMARY_REASON=#{et.primaryReason},</if>
<if test="et.primaryReasonDescription!=null">PRIMARY_REASON_DESCRIPTION=#{et.primaryReasonDescription},</if>
<if test="et.precautionMeasureDescription!=null">PRECAUTION_MEASURE_DESCRIPTION=#{et.precautionMeasureDescription},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
<if test="et.other!=null">OTHER=#{et.other},</if>
<if test="et.another!=null">ANOTHER=#{et.another},</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>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="updateAllColumnById">
UPDATE Z_RESOURCE_REPAIR_TASK <trim prefix="SET" suffixOverrides=",">
SITE=#{et.site},
REPAIR_NO=#{et.repairNo},
DESCRIPTION=#{et.description},
STATUS=#{et.status},
RESOURCE_NO=#{et.resourceNo},
REPORT_USER=#{et.reportUser},
NC_CODE_NO=#{et.ncCodeNo},
REPAIR_TYPE=#{et.repairType},
STOP_MACHINE=#{et.stopMachine},
BREAK_DOWN_DESCRIPTION=#{et.breakDownDescription},
FIND_LINK=#{et.findLink},
REPORT_SOURCE=#{et.reportSource},
OBJECT_BO=#{et.objectBo},
PLAN_START_DATE=#{et.planStartDate},
PLAN_COMPLETE_DATE=#{et.planCompleteDate},
ACTUAL_START_DATE=#{et.actualStartDate},
ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},
REPAIR_USERS=#{et.repairUsers},
CANCEL_CODE=#{et.cancelCode},
CANCEL_DATE=#{et.cancelDate},
CANCEL_DESCRIPTION=#{et.cancelDescription},
CANCEL_USER=#{et.cancelUser},
DEAL_WAY=#{et.dealWay},
PRELIMINARY_REASON=#{et.preliminaryReason},
DEAL_WAY_DESCRIPTION=#{et.dealWayDescription},
WAIT_TIME=#{et.waitTime},
WAIT_START_DATE=#{et.waitStartDate},
WAIT_END_DATE=#{et.waitEndDate},
WAIT_DESCRIPTION=#{et.waitDescription},
PRIMARY_REASON=#{et.primaryReason},
PRIMARY_REASON_DESCRIPTION=#{et.primaryReasonDescription},
PRECAUTION_MEASURE_DESCRIPTION=#{et.precautionMeasureDescription},
REMARK=#{et.remark},
OTHER=#{et.other},
ANOTHER=#{et.another},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="update">
UPDATE Z_RESOURCE_REPAIR_TASK <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.repairNo!=null">REPAIR_NO=#{et.repairNo},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.resourceNo!=null">RESOURCE_NO=#{et.resourceNo},</if>
<if test="et.reportUser!=null">REPORT_USER=#{et.reportUser},</if>
<if test="et.ncCodeNo!=null">NC_CODE_NO=#{et.ncCodeNo},</if>
<if test="et.repairType!=null">REPAIR_TYPE=#{et.repairType},</if>
<if test="et.stopMachine!=null">STOP_MACHINE=#{et.stopMachine},</if>
<if test="et.breakDownDescription!=null">BREAK_DOWN_DESCRIPTION=#{et.breakDownDescription},</if>
<if test="et.findLink!=null">FIND_LINK=#{et.findLink},</if>
<if test="et.reportSource!=null">REPORT_SOURCE=#{et.reportSource},</if>
<if test="et.objectBo!=null">OBJECT_BO=#{et.objectBo},</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.repairUsers!=null">REPAIR_USERS=#{et.repairUsers},</if>
<if test="et.cancelCode!=null">CANCEL_CODE=#{et.cancelCode},</if>
<if test="et.cancelDate!=null">CANCEL_DATE=#{et.cancelDate},</if>
<if test="et.cancelDescription!=null">CANCEL_DESCRIPTION=#{et.cancelDescription},</if>
<if test="et.cancelUser!=null">CANCEL_USER=#{et.cancelUser},</if>
<if test="et.dealWay!=null">DEAL_WAY=#{et.dealWay},</if>
<if test="et.preliminaryReason!=null">PRELIMINARY_REASON=#{et.preliminaryReason},</if>
<if test="et.dealWayDescription!=null">DEAL_WAY_DESCRIPTION=#{et.dealWayDescription},</if>
<if test="et.waitTime!=null">WAIT_TIME=#{et.waitTime},</if>
<if test="et.waitStartDate!=null">WAIT_START_DATE=#{et.waitStartDate},</if>
<if test="et.waitEndDate!=null">WAIT_END_DATE=#{et.waitEndDate},</if>
<if test="et.waitDescription!=null">WAIT_DESCRIPTION=#{et.waitDescription},</if>
<if test="et.primaryReason!=null">PRIMARY_REASON=#{et.primaryReason},</if>
<if test="et.primaryReasonDescription!=null">PRIMARY_REASON_DESCRIPTION=#{et.primaryReasonDescription},</if>
<if test="et.precautionMeasureDescription!=null">PRECAUTION_MEASURE_DESCRIPTION=#{et.precautionMeasureDescription},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
<if test="et.other!=null">OTHER=#{et.other},</if>
<if test="et.another!=null">ANOTHER=#{et.another},</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>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteById">
DELETE FROM Z_RESOURCE_REPAIR_TASK WHERE HANDLE=#{handle}
</delete>
<delete id="deleteByMap">
DELETE FROM Z_RESOURCE_REPAIR_TASK
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM Z_RESOURCE_REPAIR_TASK
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.repairNo!=null"> AND REPAIR_NO=#{ew.entity.repairNo}</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.resourceNo!=null"> AND RESOURCE_NO=#{ew.entity.resourceNo}</if>
<if test="ew.entity.reportUser!=null"> AND REPORT_USER=#{ew.entity.reportUser}</if>
<if test="ew.entity.ncCodeNo!=null"> AND NC_CODE_NO=#{ew.entity.ncCodeNo}</if>
<if test="ew.entity.repairType!=null"> AND REPAIR_TYPE=#{ew.entity.repairType}</if>
<if test="ew.entity.stopMachine!=null"> AND STOP_MACHINE=#{ew.entity.stopMachine}</if>
<if test="ew.entity.breakDownDescription!=null"> AND BREAK_DOWN_DESCRIPTION=#{ew.entity.breakDownDescription}</if>
<if test="ew.entity.findLink!=null"> AND FIND_LINK=#{ew.entity.findLink}</if>
<if test="ew.entity.reportSource!=null"> AND REPORT_SOURCE=#{ew.entity.reportSource}</if>
<if test="ew.entity.objectBo!=null"> AND OBJECT_BO=#{ew.entity.objectBo}</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.repairUsers!=null"> AND REPAIR_USERS=#{ew.entity.repairUsers}</if>
<if test="ew.entity.cancelCode!=null"> AND CANCEL_CODE=#{ew.entity.cancelCode}</if>
<if test="ew.entity.cancelDate!=null"> AND CANCEL_DATE=#{ew.entity.cancelDate}</if>
<if test="ew.entity.cancelDescription!=null"> AND CANCEL_DESCRIPTION=#{ew.entity.cancelDescription}</if>
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
<if test="ew.entity.dealWay!=null"> AND DEAL_WAY=#{ew.entity.dealWay}</if>
<if test="ew.entity.preliminaryReason!=null"> AND PRELIMINARY_REASON=#{ew.entity.preliminaryReason}</if>
<if test="ew.entity.dealWayDescription!=null"> AND DEAL_WAY_DESCRIPTION=#{ew.entity.dealWayDescription}</if>
<if test="ew.entity.waitTime!=null"> AND WAIT_TIME=#{ew.entity.waitTime}</if>
<if test="ew.entity.waitStartDate!=null"> AND WAIT_START_DATE=#{ew.entity.waitStartDate}</if>
<if test="ew.entity.waitEndDate!=null"> AND WAIT_END_DATE=#{ew.entity.waitEndDate}</if>
<if test="ew.entity.waitDescription!=null"> AND WAIT_DESCRIPTION=#{ew.entity.waitDescription}</if>
<if test="ew.entity.primaryReason!=null"> AND PRIMARY_REASON=#{ew.entity.primaryReason}</if>
<if test="ew.entity.primaryReasonDescription!=null"> AND PRIMARY_REASON_DESCRIPTION=#{ew.entity.primaryReasonDescription}</if>
<if test="ew.entity.precautionMeasureDescription!=null"> AND PRECAUTION_MEASURE_DESCRIPTION=#{ew.entity.precautionMeasureDescription}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
<if test="ew.entity.other!=null"> AND OTHER=#{ew.entity.other}</if>
<if test="ew.entity.another!=null"> AND ANOTHER=#{ew.entity.another}</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>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<delete id="deleteBatchIds">
DELETE FROM Z_RESOURCE_REPAIR_TASK WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<!--自定义sql-->
<!--批量获取维修任务-->
<select id="findResourceRepairTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
SELECT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
FROM
WIP.Z_RESOURCE_REPAIR_TASK RRT
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO
LEFT JOIN WIP.NC_CODE NC ON NC.NC_CODE = RRT.NC_CODE_NO
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCM.WORK_CENTER_BO
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
WHERE RRT.SITE = #{site} AND R.SITE = #{site} AND NC.SITE = #{site}
<if test="resourceBo != null and resourceBo != ''">
AND RRT.RESOURCE_BO = #{resourceBo}
</if>
<if test="resourceTypeBo != null and resourceTypeBo != ''">
AND RTR.RESOURCE_TYPE_BO = #{resourceTypeBo}
</if>
<if test="repairNo != null and repairNo != ''">
AND RRT.REPAIR_NO = #{repairNo}
</if>
<if test="status != null and status != ''">
AND RRT.STATUS = #{status}
</if>
<if test="workCenterBo != null and workCenterBo != ''">
AND WCM.WORK_CENTER_BO = #{workCenterBo}
</if>
<if test="resourceTypeBo != null and resourceTypeBo != ''">
AND RTR.RESOURCE_TYPE_BO = #{resourceTypeBo}
</if>
<if test="reportSource != null and reportSource != ''">
AND RRT.REPORT_SOURCE = #{reportSource}
</if>
<if test="compareStartTime != null and compareStartTime != ''">
AND RRT.PLAN_START_DATE &gt; #{compareStartTime}
</if>
<if test="compareEndTime != null and compareEndTime != ''">
AND RRT.PLAN_START_DATE &lt; #{compareEndTime}
</if>
</select>
<!--根据维修任务HANDLE获取维修任务详细数据-->
<select id="findResourceRepairTaskByHandleAndSite" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
SELECT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
FROM
WIP.Z_RESOURCE_REPAIR_TASK RRT
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO
LEFT JOIN WIP.NC_CODE NC ON NC.NC_CODE = RRT.NC_CODE_NO
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCM.WORK_CENTER_BO
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
WHERE RRT.SITE = #{site} AND RRT.HANDLE = #{handle}
AND R.SITE = #{site} AND NC.SITE = #{site}
</select>
<!--自定义sql-->
</mapper>

@ -47,4 +47,10 @@ public interface ResrceService extends IService<Resrce> {
Resrce findByResrce(String resrce);
List<Resrce> findAllResrce();
/**
*
*/
void updateResourceStatusByHandle(String handle,String status);
}

@ -68,5 +68,12 @@ public class ResrceServiceImpl extends ServiceImpl<ResrceMapper, Resrce> impleme
return resrceMapper.findAllResrce(site);
}
@Override
public void updateResourceStatusByHandle(String handle,String status) {
Resrce resrce = resrceMapper.selectById(handle);
resrce.setStatusBo("StatusBo:1000,"+status);
resrceMapper.updateById(resrce);
}
}
Loading…
Cancel
Save