ソースを参照

张丁 修改票号字段为五种类型等

zhangding 3 年 前
コミット
7705eff569

+ 47 - 0
master/src/main/java/com/ruoyi/project/ehs/controller/TJobticketController.java

@@ -5,14 +5,21 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 
 import com.alibaba.fastjson.JSON;
+import com.deepoove.poi.data.Pictures;
+import com.deepoove.poi.data.Texts;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SpringContextUtils;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.project.common.domain.DataEntity;
+import com.ruoyi.project.ehs.domain.TFirestandpipe;
 import com.ruoyi.project.ehs.mapper.TJobticketMapper;
+import com.ruoyi.project.invoice.domain.TInvoiceWorkcontent;
 import com.ruoyi.project.system.domain.SysDept;
 import com.ruoyi.project.system.domain.SysDictData;
+import com.ruoyi.project.system.domain.SysUser;
 import com.ruoyi.project.system.service.ISysDeptService;
 import com.ruoyi.project.system.service.ISysDictTypeService;
+import com.ruoyi.project.system.service.ISysUserService;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.ss.usermodel.*;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -119,6 +126,46 @@ public class TJobticketController extends BaseController
         return toAjax(tJobticketService.insertTJobticket(tJobticket));
     }
 
+
+    /**
+     * 批量新增工作票
+     */
+    @PreAuthorize("@ss.hasPermi('ehs:jobticket:add')")
+    @Log(title = "工作票", businessType = BusinessType.INSERT)
+    @RequestMapping("/batchAddJobticket")
+    public AjaxResult batchEdit(@RequestBody List<TInvoiceWorkcontent> dto)
+    {
+        ISysUserService sysUserService = (ISysUserService) SpringContextUtils.getBean("sysUserService");
+        StringBuilder contentUserUnit=new StringBuilder();
+        List<SysDictData> book_user_unit = iSysDictTypeService.selectDictDataByType("book_user_unit");
+        for (int i = 0; i < dto.size(); i++) {
+            TJobticket tJobticket=new TJobticket();
+            TInvoiceWorkcontent tInvoiceWorkcontent=dto.get(i);
+            tJobticket.setContent(tInvoiceWorkcontent.getBookingworkticket().getWorkArea()+tInvoiceWorkcontent.getWorkDescription());
+            //用户单位
+            if(tInvoiceWorkcontent.getBookingworkticket().getUserUnit()!=null){
+                for (SysDictData p : book_user_unit) {
+                    if (tInvoiceWorkcontent.getBookingworkticket().getUserUnit().toString().equals(p.getDictValue())) {
+                        contentUserUnit.append(p.getDictLabel());//用户单位
+                    }
+                }
+
+            }
+            //用户主管
+            if(tInvoiceWorkcontent.getBookingworkticket().getUserMg()!=null){
+                SysUser sysUser =sysUserService.selectUserById(tInvoiceWorkcontent.getBookingworkticket().getUserMg());
+              contentUserUnit.append(sysUser.getNickName());
+
+            }
+            tJobticket.setByclxr(contentUserUnit.toString());
+            tJobticket.setSgdw(tInvoiceWorkcontent.getBookingworkticket().getWorkUnit());
+            tJobticket.setLxr(tInvoiceWorkcontent.getBookingworkticket().getContact());
+            tJobticket.setLxdh(tInvoiceWorkcontent.getBookingworkticket().getPhonenumber());
+            tJobticketService.insertTJobticket(tJobticket);
+        }
+        return AjaxResult.success();
+    }
+
     /**
      * 修改工作票
      */

+ 43 - 0
master/src/main/java/com/ruoyi/project/ehs/domain/TJobticket.java

@@ -65,6 +65,18 @@ public class TJobticket extends BaseEntity
     @Excel(name = "限制空间许可证号")
     private String xzkjxkzh;
 
+    /** 盲板作业许可证号 */
+    @Excel(name = "盲板作业许可证号")
+    private String mbzyxkzh;
+
+    /** 高处作业许可证号 */
+    @Excel(name = "高处作业许可证号")
+    private String gczyxkzh;
+
+    /** 高处作业级别 */
+    @Excel(name = "高处作业级别")
+    private String gczyjb;
+
     /** 内容 */
     @Excel(name = "工作内容")
     private String content;
@@ -430,6 +442,34 @@ public class TJobticket extends BaseEntity
 
     public Date getEndDate() { return endDate; }
 
+    public void setMbzyxkzh(String mbzyxkzh)
+    {
+        this.mbzyxkzh = mbzyxkzh;
+    }
+
+    public String getMbzyxkzh()
+    {
+        return mbzyxkzh;
+    }
+    public void setGczyxkzh(String gczyxkzh)
+    {
+        this.gczyxkzh = gczyxkzh;
+    }
+
+    public String getGczyxkzh()
+    {
+        return gczyxkzh;
+    }
+    public void setGczyjb(String gczyjb)
+    {
+        this.gczyjb = gczyjb;
+    }
+
+    public String getGczyjb()
+    {
+        return gczyjb;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -465,6 +505,9 @@ public class TJobticket extends BaseEntity
             .append("remarks", getRemarks())
             .append("startDate", getStartDate())
             .append("endDate", getEndDate())
+                .append("mbzyxkzh", getMbzyxkzh())
+                .append("gczyxkzh", getGczyxkzh())
+                .append("gczyjb", getGczyjb())
             .toString();
     }
 }

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

@@ -4,10 +4,7 @@ import java.io.*;
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import com.alibaba.fastjson.JSON;
 import com.deepoove.poi.XWPFTemplate;
@@ -307,37 +304,41 @@ public class TInvoiceBookingworkticketController extends BaseController
         int workType10=0; int workType11=0; int workType12=0; int workType13=0; int workType14=0;
         int workType15=0; int workType16=0; int workType17=0;
         //填充下一个表格
-      /*  for (TInvoiceWorkcontent t: newtInvoiceWorkcontentList) {
-            if(t.getWorkType()==2){
+        for (TInvoiceWorkcontent t: newtInvoiceWorkcontentList) {
+            //先将字符串 分割数组 再转成集合 防止出现 1,11这种情况判断不清
+            String newStr=t.getWorkType()+",";
+            String[] wtArr=newStr.split(",");
+            List<String> contentlist = Arrays.asList(wtArr);
+            if(contentlist.contains("2")){
                workType0++;
-            }else  if(t.getWorkType()==3){
+            }else  if(contentlist.contains("3")){
                 workType1++;
-            }else  if(t.getWorkType()==1){
+            }else  if(contentlist.contains("1")){
                 workType2++;
-            }else  if(t.getWorkType()==5||t.getWorkType()==6||t.getWorkType()==7||t.getWorkType()==8){
+            }else  if(contentlist.contains("5")||contentlist.contains("6")||contentlist.contains("7")||contentlist.contains("8")){
                 workType3++;
-            }else  if(t.getWorkType()==15){
+            }else  if(contentlist.contains("15")){
                 workType4++;
-            }else  if(t.getWorkType()==12||t.getWorkType()==13||t.getWorkType()==14){
+            }else  if(contentlist.contains("12")||contentlist.contains("13")||contentlist.contains("14")){
                 workType5++;
-            }else  if(t.getWorkType()==4){
+            }else  if(contentlist.contains("4")){
                 workType6++;
-            }else  if(t.getWorkType()==9){
+            }else  if(contentlist.contains("9")){
                 workType7++;
-            }else  if(t.getWorkType()==10){
+            }else  if(contentlist.contains("10")){
                 workType8++;
-            }else  if(t.getWorkType()==11){
+            }else  if(contentlist.contains("11")){
                 workType9++;//盲板
-            }else  if(t.getWorkType()==17){
+            }else  if(contentlist.contains("17")){
                 workType11++;//清罐
-            }else  if(t.getWorkType()==16){
+            }else  if(contentlist.contains("16")){
                 workType12++;//倒灌
-            }else  if(t.getWorkType()==18){
-                workType13++;
+            }else  if(contentlist.contains("16")){
+                workType13++;//切水
             }else {
                 //变更、承包、停车装置暂无数据
             }
-        }*/
+        }
 
         Row row = sheet.createRow(rowIndex1+1);
         row.createCell(0).setCellValue("");
@@ -587,9 +588,12 @@ public class TInvoiceBookingworkticketController extends BaseController
             }
             //作业类型 遍历查找 追加到该条作业内容
             if(tInvoiceWorkcontent.getWorkType()!=null){
-                String[] wtlist=tInvoiceWorkcontent.getWorkType().split(",");
+                //先将字符串 分割数组 再转成集合 防止出现 1,11这种情况判断不清
+                String newStr=tInvoiceWorkcontent.getWorkType()+",";
+                String[] wtArr=newStr.split(",");
+                List<String> contentlist = Arrays.asList(wtArr);
                 for (SysDictData p : book_work_type) {
-                    for (String t : wtlist)
+                    for (String t : contentlist)
                         if (t.equals(p.getDictValue())) {
                         contentUserWorkType.append(p.getDictLabel());//作业类型
                     }

+ 90 - 12
master/src/main/java/com/ruoyi/project/invoice/domain/TInvoiceWorkcontent.java

@@ -59,9 +59,9 @@ public class TInvoiceWorkcontent extends BaseEntity
     @Excel(name = "作业人员数")
     private Long workPeopleNumber;
 
-    /** 监护人单位 */
-    @Excel(name = "监护人单位")
-    private String guardianUnit;
+    /** 火票级别 */
+    @Excel(name = "火票级别")
+    private String hpjb;
 
     /** 预计作业时间 */
     @Excel(name = "预计作业时间")
@@ -77,6 +77,30 @@ public class TInvoiceWorkcontent extends BaseEntity
 
     private TInvoiceBookingworkticket bookingworkticket;
 
+    /** 危害工作许可证号 */
+    @Excel(name = "危害工作许可证号")
+    private String whgzxkzh;
+
+    /** 动火作业许可证号 */
+    @Excel(name = "动火作业许可证号")
+    private String dhzyxkzh;
+
+    /** 限制空间许可证号 */
+    @Excel(name = "限制空间许可证号")
+    private String xzkjxkzh;
+
+    /** 盲板作业许可证号 */
+    @Excel(name = "盲板作业许可证号")
+    private String mbzyxkzh;
+
+    /** 高处作业许可证号 */
+    @Excel(name = "高处作业许可证号")
+    private String gczyxkzh;
+
+    /** 高处作业级别 */
+    @Excel(name = "高处作业级别")
+    private String gczyjb;
+
     /** 部门编号 */
     @Excel(name = "部门编号")
     private Long deptId;
@@ -183,15 +207,7 @@ public class TInvoiceWorkcontent extends BaseEntity
     {
         return workPeopleNumber;
     }
-    public void setGuardianUnit(String guardianUnit)
-    {
-        this.guardianUnit = guardianUnit;
-    }
 
-    public String getGuardianUnit()
-    {
-        return guardianUnit;
-    }
     public void setEstimateWorktime(String estimateWorktime)
     {
         this.estimateWorktime = estimateWorktime;
@@ -243,12 +259,18 @@ public class TInvoiceWorkcontent extends BaseEntity
             .append("riskLevel", getRiskLevel())
             .append("workDescription", getWorkDescription())
             .append("workPeopleNumber", getWorkPeopleNumber())
-            .append("guardianUnit", getGuardianUnit())
+            .append("hpjb", getHpjb())
             .append("estimateWorktime", getEstimateWorktime())
             .append("bookingticketId", getBookingticketId())
                 .append("bookingworkticket", getBookingworkticket())
             .append("deptId", getDeptId())
                 .append("reservationNumber", getReservationNumber())
+                .append("whgzxkzh", getWhgzxkzh())
+                .append("dhzyxkzh", getDhzyxkzh())
+                .append("xzkjxkzh", getXzkjxkzh())
+                .append("mbzyxkzh", getMbzyxkzh())
+                .append("gczyxkzh", getGczyxkzh())
+                .append("gczyjb", getGczyjb())
             .toString();
     }
 
@@ -259,4 +281,60 @@ public class TInvoiceWorkcontent extends BaseEntity
     public void setBookingworkticket(TInvoiceBookingworkticket bookingworkticket) {
         this.bookingworkticket = bookingworkticket;
     }
+
+    public String getGczyjb() {
+        return gczyjb;
+    }
+
+    public void setGczyjb(String gczyjb) {
+        this.gczyjb = gczyjb;
+    }
+
+    public String getWhgzxkzh() {
+        return whgzxkzh;
+    }
+
+    public void setWhgzxkzh(String whgzxkzh) {
+        this.whgzxkzh = whgzxkzh;
+    }
+
+    public String getDhzyxkzh() {
+        return dhzyxkzh;
+    }
+
+    public void setDhzyxkzh(String dhzyxkzh) {
+        this.dhzyxkzh = dhzyxkzh;
+    }
+
+    public String getXzkjxkzh() {
+        return xzkjxkzh;
+    }
+
+    public void setXzkjxkzh(String xzkjxkzh) {
+        this.xzkjxkzh = xzkjxkzh;
+    }
+
+    public String getMbzyxkzh() {
+        return mbzyxkzh;
+    }
+
+    public void setMbzyxkzh(String mbzyxkzh) {
+        this.mbzyxkzh = mbzyxkzh;
+    }
+
+    public String getGczyxkzh() {
+        return gczyxkzh;
+    }
+
+    public void setGczyxkzh(String gczyxkzh) {
+        this.gczyxkzh = gczyxkzh;
+    }
+
+    public String getHpjb() {
+        return hpjb;
+    }
+
+    public void setHpjb(String hpjb) {
+        this.hpjb = hpjb;
+    }
 }

+ 11 - 8
master/src/main/java/com/ruoyi/project/listener/invoiceApprove/InvoiceEndSuccessListener.java

@@ -33,10 +33,7 @@ import java.io.InputStream;
 import java.io.Serializable;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 @Service("invoiceEndSuccessListener")
 public class InvoiceEndSuccessListener implements Serializable, ExecutionListener {
@@ -232,14 +229,20 @@ public class InvoiceEndSuccessListener implements Serializable, ExecutionListene
                     params.put("conUnit",Texts.of(dName).fontSize(10).bold().create());
                 }
             }
-            //作业类型
+            //作业类型 遍历查找 追加到该条作业内容
             if(tInvoiceWorkcontent.getWorkType()!=null){
+                //先将字符串 分割数组 再转成集合 防止出现 1,11这种情况判断不清
+                String newStr=tInvoiceWorkcontent.getWorkType()+",";
+                String[] wtArr=newStr.split(",");
+                List<String> contentlist = Arrays.asList(wtArr);
                 for (SysDictData p : book_work_type) {
-                    if (tInvoiceWorkcontent.getWorkType().toString().equals(p.getDictValue())) {
-                        contentUserWorkType.append(p.getDictLabel());//作业类型
-                    }
+                    for (String t : contentlist)
+                        if (t.equals(p.getDictValue())) {
+                            contentUserWorkType.append(p.getDictLabel());//作业类型
+                        }
                 }
                 params.put("workType"+i, Texts.of(contentUserWorkType.toString()).fontSize(10).bold().create());
+
             }
             //作业开始时间
             if(ticket.getWorkStartTime()!=null){

+ 17 - 1
master/src/main/resources/mybatis/ehs/TJobticketMapper.xml

@@ -38,10 +38,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptName" column="dept_name" />
         <result property="startDate"    column="kprq"    />
         <result property="endDate"    column="kprq"    />
+        <result property="mbzyxkzh"    column="mbzyxkzh"    />
+        <result property="gczyxkzh"    column="gczyxkzh"    />
+        <result property="gczyjb"    column="gczyjb"    />
     </resultMap>
 
     <sql id="selectTJobticketVo">
-        select d.id, d.plant_code, d.kprq, d.qfsj, d.qfbz, d.qfr, d.xpxp, d.yqxkzh, d.whgzxkzh, d.dhzyxkzh, d.hpjb, d.xzkjxkzh, d.content, d.byclxr, d.sgdw, d.lxr, d.lxdh, d.xpsj, d.zypzt, d.jccdr, d.wcxxbh, d.wcxzt, d.cxsj, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_jobticket d
+        select d.id, d.plant_code, d.kprq, d.qfsj, d.qfbz, d.qfr, d.xpxp, d.yqxkzh, d.whgzxkzh, d.dhzyxkzh, d.hpjb, d.xzkjxkzh, d.content, d.byclxr, d.sgdw, d.lxr, d.lxdh, d.xpsj, d.zypzt, d.jccdr, d.wcxxbh, d.wcxzt, d.cxsj,
+               d.mbzyxkzh,d.gczyxkzh,d.gczyjb,d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_jobticket d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -55,6 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="hpjb != null  and hpjb != ''"> and hpjb = #{hpjb}</if>
             <if test="zypzt != null  and zypzt != ''"> and zypzt = #{zypzt}</if>
             <if test="xzkjxkzh == 'true'"> and xzkjxkzh IS NOT NULL</if>
+            <if test="mbzyxkzh != null  and mbzyxkzh != ''"> and mbzyxkzh = #{mbzyxkzh}</if>
+            <if test="gczyxkzh != null  and gczyxkzh != ''"> and gczyxkzh = #{gczyxkzh}</if>
+            <if test="gczyjb != null  and gczyjb != ''"> and gczyjb = #{gczyjb}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -103,6 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updatedate != null">updatedate,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="remarks != null">remarks,</if>
+            <if test="mbzyxkzh != null">mbzyxkzh,</if>
+            <if test="gczyxkzh != null">gczyxkzh,</if>
+            <if test="gczyjb != null">gczyjb,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -135,6 +145,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updatedate != null">#{updatedate},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="remarks != null">#{remarks},</if>
+            <if test="mbzyxkzh != null">#{mbzyxkzh},</if>
+            <if test="gczyxkzh != null">#{gczyxkzh},</if>
+            <if test="gczyjb != null">#{gczyjb},</if>
          </trim>
     </insert>
 
@@ -170,6 +183,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updatedate != null">updatedate = #{updatedate},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="mbzyxkzh != null">mbzyxkzh = #{mbzyxkzh},</if>
+            <if test="gczyxkzh != null">gczyxkzh = #{gczyxkzh},</if>
+            <if test="gczyjb != null">gczyjb = #{gczyjb},</if>
         </trim>
         where id = #{id}
     </update>

+ 33 - 2
master/src/main/resources/mybatis/invoice/TInvoiceWorkcontentMapper.xml

@@ -15,16 +15,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="riskLevel"    column="risk_level"    />
         <result property="workDescription"    column="work_description"    />
         <result property="workPeopleNumber"    column="work_people_number"    />
-        <result property="guardianUnit"    column="guardian_unit"    />
+        <result property="hpjb"    column="hpjb"    />
         <result property="estimateWorktime"    column="estimate_worktime"    />
         <result property="bookingticketId"    column="bookingticket_id"    />
         <result property="deptId"    column="dept_id"    />
         <result property="deptName" column="dept_name" />
         <result property="reservationNumber"    column="reservation_number"    />
+        <result property="whgzxkzh"    column="whgzxkzh"    />
+        <result property="dhzyxkzh"    column="dhzyxkzh"    />
+        <result property="xzkjxkzh"    column="xzkjxkzh"    />
+        <result property="mbzyxkzh"    column="mbzyxkzh"    />
+        <result property="gczyxkzh"    column="gczyxkzh"    />
+        <result property="gczyjb"    column="gczyjb"    />
     </resultMap>
 
     <sql id="selectTInvoiceWorkcontentVo">
-        select d.id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.work_type, d.risk_level, d.work_description, d.work_people_number, d.guardian_unit, d.estimate_worktime, d.bookingticket_id, d.dept_id ,d.reservation_number,s.dept_name from t_invoice_workcontent d
+        select d.id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.work_type, d.risk_level, d.work_description, d.work_people_number, d.hpjb, d.estimate_worktime, d.bookingticket_id, d.dept_id ,
+               d.whgzxkzh,d.dhzyxkzh,d.xzkjxkzh,d.mbzyxkzh,d.gczyxkzh,d.gczyjb,d.reservation_number,s.dept_name from t_invoice_workcontent d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -43,6 +50,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="estimateWorktime != null  and estimateWorktime != ''"> and estimate_worktime = #{estimateWorktime}</if>
             <if test="bookingticketId != null "> and bookingticket_id = #{bookingticketId}</if>
             <if test="reservationNumber != null  and reservationNumber != ''"> and reservation_number = #{reservationNumber}</if>
+            <if test="whgzxkzh != null  and whgzxkzh != ''"> and whgzxkzh = #{whgzxkzh}</if>
+            <if test="dhzyxkzh != null  and dhzyxkzh != ''"> and dhzyxkzh = #{dhzyxkzh}</if>
+            <if test="xzkjxkzh != null  and xzkjxkzh != ''"> and xzkjxkzh = #{xzkjxkzh}</if>
+            <if test="mbzyxkzh != null  and mbzyxkzh != ''"> and mbzyxkzh = #{mbzyxkzh}</if>
+            <if test="gczyxkzh != null  and gczyxkzh != ''"> and gczyxkzh = #{gczyxkzh}</if>
+            <if test="gczyjb != null  and gczyjb != ''"> and gczyjb = #{gczyjb}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
             and d.del_flag = 0
         </where>
@@ -83,6 +96,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="bookingticketId != null">bookingticket_id,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="reservationNumber != null">reservation_number,</if>
+            <if test="whgzxkzh != null">whgzxkzh,</if>
+            <if test="dhzyxkzh != null">dhzyxkzh,</if>
+            <if test="xzkjxkzh != null">xzkjxkzh,</if>
+            <if test="mbzyxkzh != null">mbzyxkzh,</if>
+            <if test="gczyxkzh != null">gczyxkzh,</if>
+            <if test="gczyjb != null">gczyjb,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -100,6 +119,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="bookingticketId != null">#{bookingticketId},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="reservationNumber != null">#{reservationNumber},</if>
+            <if test="whgzxkzh != null">#{whgzxkzh},</if>
+            <if test="dhzyxkzh != null">#{dhzyxkzh},</if>
+            <if test="xzkjxkzh != null">#{xzkjxkzh},</if>
+            <if test="mbzyxkzh != null">#{mbzyxkzh},</if>
+            <if test="gczyxkzh != null">#{gczyxkzh},</if>
+            <if test="gczyjb != null">#{gczyjb},</if>
          </trim>
     </insert>
 
@@ -121,6 +146,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="bookingticketId != null">bookingticket_id = #{bookingticketId},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="reservationNumber != null">reservation_number = #{reservationNumber},</if>
+            <if test="whgzxkzh != null">whgzxkzh = #{whgzxkzh},</if>
+            <if test="dhzyxkzh != null">dhzyxkzh = #{dhzyxkzh},</if>
+            <if test="xzkjxkzh != null">xzkjxkzh = #{xzkjxkzh},</if>
+            <if test="mbzyxkzh != null">mbzyxkzh = #{mbzyxkzh},</if>
+            <if test="gczyxkzh != null">gczyxkzh = #{gczyxkzh},</if>
+            <if test="gczyjb != null">gczyjb = #{gczyjb},</if>
         </trim>
         where id = #{id}
     </update>

+ 26 - 65
ui/src/views/invoice/bookingworkticket/index.vue

@@ -109,12 +109,21 @@
           @click="handleExport"
           v-hasPermi="['invoice:bookingworkticket:export']"
         >导出</el-button>
+      </el-col>
+       <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-copy-document"
+          size="mini"
+          @click="tickedStatis"
+          v-hasPermi="['ehs:jobticket:add']"
+        >作业票统计</el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="cancelQuery"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="bookingworkticketList" ref="multipleTable" class="table-fixed" :span-method="mergeMethod"  @selection-change="handleSelectionChange" :height="clientHeight" border>
-
+      <el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
       <el-table-column label="作业单位" align="center" prop="bookingworkticket.workUnit" width="80" :show-overflow-tooltip="true"/>
       <el-table-column label="作业区域单元" align="center" prop="bookingworkticket.workArea" width="100" :show-overflow-tooltip="true"/>
       <el-table-column label="楼层位置" align="center" prop="bookingworkticket.floorLocation" width="100" :formatter="floorLocationFormat"/>
@@ -295,7 +304,7 @@
    <el-row>
         <el-col :span="18">
           <el-form-item label="作业内容描述" prop="workDescription"  >
-            <el-input v-model="ruleForm.workDescription"></el-input>
+            <el-input type="text" v-model="ruleForm.workDescription" ></el-input>
           </el-form-item>
            </el-col>
         <el-col :span="3">
@@ -367,37 +376,6 @@
 
     </el-dialog>
 
-
-      <!-- 用户导入对话框 -->
-      <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
       <el-dialog
   title="关联票号"
   :visible.sync="guanlianVisible"
@@ -421,6 +399,7 @@ import { listWorkcontent, getWorkcontent, delWorkcontent, addWorkcontent, update
 import { listDevice, getDevice, delDevice, updateDevice, exportDevice, selectDevice} from "@/api/invoice/device";
 import { listUnit, getUnit, delUnit, addUnit, updateUnit, exportUnit,getUserByUnit} from "@/api/invoice/unit";
 import { listUser, getUser, delUser, addUser, updateUser, exportUser, resetUserPwd, changeUserStatus,userDataScope,getUserByUserName } from "@/api/system/user";
+import { listJobticket, getJobticket, delJobticket, addJobticket, updateJobticket, exportJobticket,batchAddJobticket } from "@/api/ehs/jobticket";
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
@@ -560,7 +539,7 @@ export default {
           { required: true, message: "用户单位不能为空", trigger: "blur" }
         ],
       workType: [
-          { required: true, message: "作业类型不能为空", trigger: "change" }
+          { required: true, message: "作业类型不能为空", trigger: "blur" }
         ],
          workDescription: [
           { required: true, message: "作业内容不能为空", trigger: "change" }
@@ -614,6 +593,10 @@ export default {
 
   },
   methods: {
+    //作业票统计
+    tickedStatis(){
+        console.log(this.$refs.multipleTable.selection);
+    },
     //根据用户单位 查询对应选择的用户主管  根据用户单位 字段 查找对应的多个主管 返回 Sysuser的集合(id,name)
         checkCategoryPromotion(oneId){
 
@@ -926,8 +909,6 @@ export default {
 		}
         this.ruleForm[j].workType=st1
     }
-
-
         this.ruleForm.length=response.data.tInvoiceWorkcontentList.length
       });
     },
@@ -1078,32 +1059,12 @@ export default {
 
          this.msgSuccess("请求成功");       
       },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
-      },
+      //校验表单中作业内容是否重复
+  
         //合并单元格
       mergeMethod({ row, column, rowIndex, columnIndex }) {
       // console.log(row)
-       if (columnIndex === 0) {
+       if (columnIndex === 1) {
           const _row = this.setTable(this.bookingworkticketList).merge[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
@@ -1111,7 +1072,7 @@ export default {
             colspan: _col
           };
         }
-        if (columnIndex === 1) {
+        if (columnIndex === 2) {
           const _row = this.setTable(this.bookingworkticketList).merge[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
@@ -1119,7 +1080,7 @@ export default {
             colspan: _col
           };
         }
-         if (columnIndex === 10) {
+         if (columnIndex === 11) {
           const _row = this.setTable(this.bookingworkticketList).merge[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
@@ -1127,7 +1088,7 @@ export default {
             colspan: _col
           };
         }
-        if (columnIndex === 11) {
+        if (columnIndex === 12) {
           const _row = this.setTable(this.bookingworkticketList).merge[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
@@ -1135,7 +1096,7 @@ export default {
             colspan: _col
           };
         }
-         if (columnIndex === 12) {
+         if (columnIndex === 13) {
           const _row = this.setTable(this.bookingworkticketList).merge[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
@@ -1143,7 +1104,7 @@ export default {
             colspan: _col
           };
         }
-        if (columnIndex === 13) {
+        if (columnIndex === 14) {
           const _row = this.setTable(this.bookingworkticketList).merge[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
@@ -1151,7 +1112,7 @@ export default {
             colspan: _col
           };
         }
-        if (columnIndex === 15) {
+        if (columnIndex === 16) {
           const _row = this.setTable(this.bookingworkticketList).merge[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {