Browse Source

工作票导出功能,修改

wangchangsheng 3 years ago
parent
commit
6c224c49f2
2 changed files with 20 additions and 3 deletions
  1. 7 0
      pom.xml
  2. 13 3
      src/main/resources/mapper/ticket/WorkticketMapper.xml

+ 7 - 0
pom.xml

@@ -18,6 +18,7 @@
         <java.version>1.8</java.version>
         <java.version>1.8</java.version>
         <tomcat.version>9.0.35</tomcat.version>
         <tomcat.version>9.0.35</tomcat.version>
         <skipTests>ture</skipTests>
         <skipTests>ture</skipTests>
+        <log4j.version>2.15.0</log4j.version>
     </properties>
     </properties>
     <profiles>
     <profiles>
 
 
@@ -51,6 +52,12 @@
             <version>1.18.12</version>
             <version>1.18.12</version>
         </dependency>
         </dependency>
 
 
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+
 
 
 
 
 
 

+ 13 - 3
src/main/resources/mapper/ticket/WorkticketMapper.xml

@@ -275,12 +275,21 @@
         w.ticketnum,
         w.ticketnum,
         w.principal,
         w.principal,
         w.deptgroup1,
         w.deptgroup1,
-        w.startdate,
-        w.enddate,
+        t.description2,
+        t.address,
+        w.wspeed,
+        CASE WHEN w.startdate IS NULL THEN w.applyfirestarttime ELSE w.startdate END AS startdate,
+        CASE WHEN w.enddate IS NULL THEN w.applyfireendtime ELSE w.enddate END AS enddate,
+        w.signatory,
+        w.inceptdate,
+        CASE WHEN w.fiatuser1 IS NULL THEN w.fiatuser ELSE w.fiatuser1 END AS fiatuser1,
+        w.fiatdate,
+        w.startworktime,
         w.newdate,
         w.newdate,
         w.finaltime,
         w.finaltime,
         w.status,
         w.status,
         w.workdept,
         w.workdept,
+        w.remark3 persons,
         e.description,
         e.description,
         w.wtickettype,
         w.wtickettype,
         CASE WHEN w.finaltime IS NULL THEN '1' ELSE '0' END AS tag,
         CASE WHEN w.finaltime IS NULL THEN '1' ELSE '0' END AS tag,
@@ -289,6 +298,7 @@
         workticket w
         workticket w
         LEFT JOIN LOCATIONS e ON w.wtnum = e.LOCATION
         LEFT JOIN LOCATIONS e ON w.wtnum = e.LOCATION
         LEFT JOIN WINDFARM f ON  w.WORKDEPT = f.WFNAME
         LEFT JOIN WINDFARM f ON  w.WORKDEPT = f.WFNAME
+        LEFT JOIN WOWORKTASK t ON  t.WONUM = w.wonum
         <where>
         <where>
         <if test="st !=null and et !=null">
         <if test="st !=null and et !=null">
 
 
@@ -317,7 +327,7 @@
         </where>
         </where>
 
 
         )
         )
-        select  *  from cte1 order by ticketnum,startdate
+        select  *  from cte1 order by ticketnum desc
 
 
     </select>
     </select>