Browse Source

LY 预约票 导出

ly 2 years ago
parent
commit
597e956e8b

+ 5 - 5
master/src/main/java/com/ruoyi/project/invoice/controller/TInvoiceBookingworkticketController.java

@@ -218,9 +218,9 @@ public class TInvoiceBookingworkticketController extends BaseController
         row0.createCell(15).setCellValue("用户主管");row0.getCell(15).setCellStyle(style);
         row0.createCell(16).setCellValue("危害工作许可证号");row0.getCell(16).setCellStyle(style);
         row0.createCell(17).setCellValue("动火作业许可证号");row0.getCell(17).setCellStyle(style);
-        row0.createCell(18).setCellValue("危害工作许可证号");row0.getCell(18).setCellStyle(style);
-        row0.createCell(19).setCellValue("限制空间许可证号");row0.getCell(19).setCellStyle(style);
-        row0.createCell(20).setCellValue("盲板作业许可证号");row0.getCell(20).setCellStyle(style);
+        row0.createCell(18).setCellValue("限制空间许可证号");row0.getCell(18).setCellStyle(style);
+        row0.createCell(19).setCellValue("盲板作业许可证号");row0.getCell(19).setCellStyle(style);
+        row0.createCell(20).setCellValue("高处作业许可证号");row0.getCell(20).setCellStyle(style);
         //填充数据
         int rowIndex = 1;
         int columnIndex = 1;
@@ -277,11 +277,11 @@ public class TInvoiceBookingworkticketController extends BaseController
             //
             row.createCell(12).setCellValue("");
             //装置批准人
-            row.createCell(13).setCellValue(t.getBookingworkticket().getContact());
+            row.createCell(13).setCellValue(t.getBookingworkticket().getUserSupName());
             //用户单位
             row.createCell(14).setCellValue(t.getBookingworkticket().getUserUnit());
             //用户主管
-            row.createCell(15).setCellValue(t.getBookingworkticket().getUserMg());
+            row.createCell(15).setCellValue(t.getBookingworkticket().getUserMgName());
             //危害工作许可证号
             row.createCell(16).setCellValue(t.getWhgzxkzh());
             //动火作业许可证号

+ 16 - 2
master/src/main/java/com/ruoyi/project/invoice/domain/TInvoiceBookingworkticket.java

@@ -89,6 +89,10 @@ public class TInvoiceBookingworkticket extends BaseEntity
     @Excel(name = "用户主管")
     private Long userMg;
 
+    /** 用户主管姓名 */
+    @TableField(exist = false)
+    private String userMgName;
+
     /** 用户单位 */
     @Excel(name = "用户单位")
     private String userUnit;
@@ -141,9 +145,13 @@ public class TInvoiceBookingworkticket extends BaseEntity
     @TableField(exist = false)
     private String userSupId;
 
+    /** 装置主管签名人 */
     @TableField(exist = false)
     private String userSupName;
 
+    @TableField(exist = false)
+    private String deptName;
+
     public void setId(Long id)
     {
         this.id = id;
@@ -303,8 +311,7 @@ public class TInvoiceBookingworkticket extends BaseEntity
         this.userUnit = userUnit;
     }
 
-    @TableField(exist = false)
-    private String deptName;
+
 
     public String getDeptName() {
         return deptName;
@@ -339,6 +346,13 @@ public class TInvoiceBookingworkticket extends BaseEntity
         return filename;
     }
 
+    public String getUserMgName() {
+        return userMgName;
+    }
+
+    public void setUserMgName(String userMgName) {
+        this.userMgName = userMgName;
+    }
 
     @Override
     public String toString() {

+ 8 - 1
master/src/main/java/com/ruoyi/project/sems/controller/SpecHomeController.java

@@ -26,6 +26,8 @@ import org.springframework.web.bind.annotation.RestController;
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
 import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 /**
  * 特种设备申请Controller
@@ -205,7 +207,7 @@ public class SpecHomeController extends BaseController
     public AjaxResult sumYlgcLength(@RequestBody Map<String, Object> params){
         List plantIds = (List) params.get("plantIds");
 //        查询管道长度
-        List<TSpecdevYlgd> gdList = tSpecdevYlgdService.list(new QueryWrapper<TSpecdevYlgd>()
+        List<TSpecdevYlgd> gdList = tSpecdevYlgdService.list(new QueryWrapper<TSpecdevYlgd>().select("length")
                         .eq("STATUS" , 1)
                         .eq("del_flag" , 0)
                         .in("plant_code",plantIds)
@@ -214,7 +216,11 @@ public class SpecHomeController extends BaseController
 //                        .and(unitIds.size()>0 ,i -> i.in("unit",unitIds).or().in("plant_code",unitIds).or().isNull("unit"))
         );
         double allLength = 0;
+        ExecutorService executorService = Executors.newFixedThreadPool(100);
         for (int i = 0; i < gdList.size(); i++) {
+            executorService.execute(() -> {
+
+            });
             double gdLength = 0;
             if (!StringUtils.isBlank(gdList.get(i).getLength())) {
                 if (gdList.get(i).getLength().indexOf("\n") > -1) {
@@ -237,6 +243,7 @@ public class SpecHomeController extends BaseController
             }
             allLength += gdLength;
         }
+        executorService.shutdown();
         DecimalFormat df = new DecimalFormat("0.00#");
         System.out.println(df.format(allLength));
         return AjaxResult.success(df.format(allLength));

+ 3 - 2
master/src/main/resources/mybatis/invoice/TInvoiceBookingworkticketMapper.xml

@@ -160,11 +160,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTInvoiceBookingworkticketById" parameterType="Long" resultMap="TInvoiceBookingworkticketResult">
         select d.id, d.work_unit, d.work_area, d.unit_number, d.floor_location, d.work_start_time, d.work_end_time, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.contact, d.phonenumber, d.status, d.dept_id, d.user_mg ,d.user_unit,s.dept_name,d.filename,d.reservation_number
-
+        ,su.nick_name as userSupName,su2.nick_name as userMgName
         from t_invoice_bookingworkticket d
          left join sys_dept s on s.dept_id = d.dept_id
         left join t_approve_reserve_invoice r on r.invoice_id = d.id
-         left join sys_user su on r.user_sup_id = su.user_id
+         left join sys_user su on r.DEV_SUP_ID = su.user_id
+         left join sys_user su2 on d.user_mg = su2.user_id
         where d.id = #{id}
         and r.status!=3
         and d.del_flag = 0

+ 2 - 0
ui/src/views/invoice/bookingworkticket/index.vue

@@ -139,6 +139,8 @@
                        :show-overflow-tooltip="true"/>
       <el-table-column label="楼层位置" align="center" prop="bookingworkticket.floorLocation" width="100"
                        :formatter="floorLocationFormat"/>
+      <el-table-column label="用户主管" align="center" prop="bookingworkticket.userMgName" width="100"
+                       :show-overflow-tooltip="true"/>
       <el-table-column label=" 预约作业日期" align="center" prop="workStartTime" width="90">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.bookingworkticket.workStartTime, '{y}-{m}-{d}') }}</span>