ly пре 2 година
родитељ
комит
d1d37c54f0

+ 14 - 0
master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java

@@ -554,6 +554,8 @@ public class TApproveDangerController extends BaseController {
         logger.info("processId:" + JSON.toJSONString(pid));
         HistoricTaskInstanceQuery htiq = historyService.createHistoricTaskInstanceQuery();
         List<HistoricTaskInstance> htiLists = htiq.processInstanceId(pid).finished().orderByHistoricTaskInstanceEndTime().asc().list();
+
+
         logger.info("历史任务:" + JSON.toJSONString(htiLists));
         List<DevTask> devTaskList = new ArrayList<>();
         if (htiLists.size() > 0) {
@@ -573,6 +575,18 @@ public class TApproveDangerController extends BaseController {
                 devTaskList.add(devTask);
             }
         }
+        //当前任务
+        Task task = taskService.createTaskQuery().processInstanceId(pid).active().singleResult();
+        if (task!= null) {
+            task.getName();
+            task.getCreateTime();
+            DevTask devTask = new DevTask();
+            devTask.setTaskName(task.getName());
+            devTask.setTaskCreateTime(task.getCreateTime());
+            SysUser user = sysUserService.selectUserById(Long.parseLong(task.getAssignee()));
+            devTask.setUserName(user.getNickName());
+            devTaskList.add(devTask);
+        }
         return getDataTable(devTaskList);
     }
 

+ 27 - 6
master/src/main/java/com/ruoyi/project/ehs/controller/TJobticketController.java

@@ -36,6 +36,9 @@ import javax.annotation.Resource;
 import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 /**
  * 工作票Controller
@@ -70,11 +73,29 @@ public class TJobticketController extends BaseController {
         startPage();
         List<TJobticket> list = tJobticketService.selectTJobticketList(tJobticket);
         //查询续票
-        for (TJobticket t : list
-        ) {
-            List<TJobticket> cList = tJobticketMapper.selectTJobticketChildren(t);
-            t.setChildren(cList);
+        if (list.size() >0) {
+            //线程池
+            ExecutorService executorService = Executors.newFixedThreadPool(list.size());
+            final CountDownLatch latch = new CountDownLatch(list.size()); //相同线程数量的计数
+            for (TJobticket t : list
+            ) {
+                executorService.execute(() -> {
+                    //续票列表 -- 业务模块
+                    if ("10".equals(t.getXpxp())) {
+                        List<TJobticket> cList = tJobticketMapper.selectTJobticketChildren(t);
+                        t.setChildren(cList);
+                    }
+                    latch.countDown(); //线程计数
+                });
+            }
+            try {
+                latch.await(); //线程计数完毕后继续执行
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            executorService.shutdown();
         }
+
         return getDataTable(list);
     }
 
@@ -165,8 +186,8 @@ public class TJobticketController extends BaseController {
         if (tJobticket.getXpxp()!=null && tJobticket.getXpxp().equals("12")) {
             int i = tJobticketMapper.countXp(tJobticket);
             logger.info("预约票数量:" + i);
-            if (i >= 15) {
-                return AjaxResult.error("超过预约票数量上限15");
+            if (i >= 10) {
+                return AjaxResult.error("超过预约票数量上限10");
             }
         }
         ISysUserService sysUserService = (ISysUserService) SpringContextUtils.getBean("sysUserService");

+ 10 - 8
master/src/main/java/com/ruoyi/project/invoice/controller/TApproveReserveInvoiceController.java

@@ -66,15 +66,17 @@ public class TApproveReserveInvoiceController extends BaseController {
     public TableDataInfo list(TApproveReserveInvoice tApproveReserveInvoice) {
         startPage();
         List<TApproveReserveInvoice> list = tApproveReserveInvoiceService.selectTApproveReserveInvoiceList(tApproveReserveInvoice);
-        for (TApproveReserveInvoice tApprove : list) {
-            String[] ids;
-            ids = tApprove.getInvoiceId().split(",");
-            List<Object> devList = new ArrayList<>();
-            for (String id : ids) {
-                List<TInvoiceBookingworkticketVo> book = workService.selectDetailById(Long.valueOf(id));
-                devList.addAll(book);
+        if (list.size() > 0) {
+            for (TApproveReserveInvoice tApprove : list) {
+                String[] ids;
+                ids = tApprove.getInvoiceId().split(",");
+                List<Object> devList = new ArrayList<>();
+                for (String id : ids) {
+                    List<TInvoiceBookingworkticketVo> book = workService.selectDetailById(Long.valueOf(id));
+                    devList.addAll(book);
+                }
+                tApprove.setDevList(devList);
             }
-            tApprove.setDevList(devList);
         }
         return getDataTable(list);
     }

Разлика између датотеке није приказан због своје велике величине
+ 358 - 280
master/src/main/java/com/ruoyi/project/invoice/controller/TInvoiceBookingworkticketController.java


+ 143 - 95
master/src/main/resources/mybatis/ehs/TJobticketMapper.xml

@@ -1,56 +1,93 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.ehs.mapper.TJobticketMapper">
 
     <resultMap type="TJobticket" id="TJobticketResult">
-        <result property="id"    column="id"    />
-        <result property="plantCode"    column="plant_code"    />
-        <result property="kprq"    column="kprq"    />
-        <result property="qfsj"    column="qfsj"    />
-        <result property="qfbz"    column="qfbz"    />
-        <result property="qfr"    column="qfr"    />
-        <result property="xpxp"    column="xpxp"    />
-        <result property="yqxkzh"    column="yqxkzh"    />
-        <result property="whgzxkzh"    column="whgzxkzh"    />
-        <result property="dhzyxkzh"    column="dhzyxkzh"    />
-        <result property="hpjb"    column="hpjb"    />
-        <result property="xzkjxkzh"    column="xzkjxkzh"    />
-        <result property="content"    column="content"    />
-        <result property="byclxr"    column="byclxr"    />
-        <result property="sgdw"    column="sgdw"    />
-        <result property="lxr"    column="lxr"    />
-        <result property="lxdh"    column="lxdh"    />
-        <result property="xpsj"    column="xpsj"    />
-        <result property="zypzt"    column="zypzt"    />
-        <result property="jccdr"    column="jccdr"    />
-        <result property="wcxxbh"    column="wcxxbh"    />
-        <result property="wcxzt"    column="wcxzt"    />
-        <result property="cxsj"    column="cxsj"    />
-        <result property="delFlag"    column="del_flag"    />
-        <result property="createrCode"    column="creater_code"    />
-        <result property="createdate"    column="createdate"    />
-        <result property="updaterCode"    column="updater_code"    />
-        <result property="updatedate"    column="updatedate"    />
-        <result property="deptId"    column="dept_id"    />
-        <result property="remarks"    column="remarks"    />
-        <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"    />
-        <result property="postponeNumber"    column="postpone_number"    />
-        <result property="userMg"    column="user_mg"    />
-        <result property="userUnit"    column="user_unit"    />
-        <result property="tag"    column="tag"    />
+        <result property="id" column="id"/>
+        <result property="plantCode" column="plant_code"/>
+        <result property="kprq" column="kprq"/>
+        <result property="qfsj" column="qfsj"/>
+        <result property="qfbz" column="qfbz"/>
+        <result property="qfr" column="qfr"/>
+        <result property="xpxp" column="xpxp"/>
+        <result property="yqxkzh" column="yqxkzh"/>
+        <result property="whgzxkzh" column="whgzxkzh"/>
+        <result property="dhzyxkzh" column="dhzyxkzh"/>
+        <result property="hpjb" column="hpjb"/>
+        <result property="xzkjxkzh" column="xzkjxkzh"/>
+        <result property="content" column="content"/>
+        <result property="byclxr" column="byclxr"/>
+        <result property="sgdw" column="sgdw"/>
+        <result property="lxr" column="lxr"/>
+        <result property="lxdh" column="lxdh"/>
+        <result property="xpsj" column="xpsj"/>
+        <result property="zypzt" column="zypzt"/>
+        <result property="jccdr" column="jccdr"/>
+        <result property="wcxxbh" column="wcxxbh"/>
+        <result property="wcxzt" column="wcxzt"/>
+        <result property="cxsj" column="cxsj"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createrCode" column="creater_code"/>
+        <result property="createdate" column="createdate"/>
+        <result property="updaterCode" column="updater_code"/>
+        <result property="updatedate" column="updatedate"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="remarks" column="remarks"/>
+        <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"/>
+        <result property="postponeNumber" column="postpone_number"/>
+        <result property="userMg" column="user_mg"/>
+        <result property="userUnit" column="user_unit"/>
+        <result property="tag" column="tag"/>
     </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.mbzyxkzh,d.gczyxkzh,d.gczyjb,d.postpone_number,d.user_mg,d.user_unit, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks,d.tag ,s.dept_name from t_jobticket d
-      left join sys_dept s on s.dept_id = d.dept_id
+        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.postpone_number,
+               d.user_mg,
+               d.user_unit,
+               d.del_flag,
+               d.creater_code,
+               d.createdate,
+               d.updater_code,
+               d.updatedate,
+               d.dept_id,
+               d.remarks,
+               d.tag,
+               s.dept_name
+        from t_jobticket d
+                 left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
     <select id="selectTJobticketList" parameterType="TJobticket" resultMap="TJobticketResult">
@@ -58,30 +95,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="startDate != null ">and kprq <![CDATA[>=]]> #{startDate}</if>
             <if test="endDate != null">and kprq <![CDATA[<=]]>#{endDate}</if>
-            <if test="qfbz != null  and qfbz != ''"> and qfbz = #{qfbz}</if>
-            <if test="xpxp != null  and xpxp != ''"> and xpxp = #{xpxp}</if>
-            <if test="hpjb != null  and hpjb != ''"> and hpjb = #{hpjb}</if>
-            <if test="zypzt != null  and zypzt != ''"> and zypzt = #{zypzt}</if>
-            <if test="xzkjxkzh !=null and xzkjxkzh!=''"> and xzkjxkzh like concat(concat('%',#{xzkjxkzh}),'%')</if>
-            <if test="mbzyxkzh != null  and mbzyxkzh != ''"> and mbzyxkzh like concat(concat('%',#{mbzyxkzh}),'%')</if>
-            <if test="gczyxkzh != null  and gczyxkzh != ''"> and gczyxkzh like concat(concat('%',#{gczyxkzh}),'%')</if>
-            <if test="content != null  and content != ''"> and content like concat(concat('%',#{content}),'%')</if>
-            <if test="whgzxkzh != null  and whgzxkzh != ''"> and whgzxkzh like concat(concat('%',#{whgzxkzh}),'%')</if>
-            <if test="yqxkzh != null  and yqxkzh != ''"> and yqxkzh like concat(concat('%',#{yqxkzh}),'%')</if>
-            <if test="dhzyxkzh != null  and dhzyxkzh != ''"> and dhzyxkzh like concat(concat('%',#{dhzyxkzh}),'%')</if>
-            <if test="byclxr != null  and byclxr != ''"> and byclxr like concat(concat('%',#{byclxr}),'%')</if>
-            <if test="sgdw != null  and sgdw != ''"> and sgdw like concat(concat('%',#{sgdw}),'%')</if>
-            <if test="jccdr != null  and jccdr != ''"> and jccdr like concat(concat('%',#{jccdr}),'%')</if>
-            <if test="wcxxbh != null  and wcxxbh != ''"> and wcxxbh like concat(concat('%',#{wcxxbh}),'%')</if>
-            <if test="wcxzt != null  and wcxzt != ''"> and wcxzt like concat(concat('%',#{wcxzt}),'%')</if>
-            <if test="xpsj != null "> and xpsj <![CDATA[=]]> #{xpsj}</if>
-            <if test="cxsj != null "> and cxsj <![CDATA[=]]> #{cxsj}</if>
-            <if test="gczyjb != null  and gczyjb != ''"> and gczyjb = #{gczyjb}</if>
-            <if test="postponeNumber != null "> and postpone_number = #{postponeNumber}</if>
-            <if test="userMg != null "> and user_mg = #{userMg}</if>
-            <if test="userUnit != null "> and user_unit = #{userUnit}</if>
-            <if test="tag != null and tag != '' "> and tag = #{tag}</if>
-            and d.del_flag = 0 and xpxp = 10
+            <if test="qfbz != null  and qfbz != ''">and qfbz = #{qfbz}</if>
+            <if test="xpxp != null  and xpxp != ''">and xpxp = #{xpxp}</if>
+            <if test="hpjb != null  and hpjb != ''">and hpjb = #{hpjb}</if>
+            <if test="zypzt != null  and zypzt != ''">and zypzt = #{zypzt}</if>
+            <if test="xzkjxkzh !=null and xzkjxkzh!=''">and xzkjxkzh like concat(concat('%',#{xzkjxkzh}),'%')</if>
+            <if test="mbzyxkzh != null  and mbzyxkzh != ''">and mbzyxkzh like concat(concat('%',#{mbzyxkzh}),'%')</if>
+            <if test="gczyxkzh != null  and gczyxkzh != ''">and gczyxkzh like concat(concat('%',#{gczyxkzh}),'%')</if>
+            <if test="content != null  and content != ''">and content like concat(concat('%',#{content}),'%')</if>
+            <if test="whgzxkzh != null  and whgzxkzh != ''">and whgzxkzh like concat(concat('%',#{whgzxkzh}),'%')</if>
+            <if test="yqxkzh != null  and yqxkzh != ''">and yqxkzh like concat(concat('%',#{yqxkzh}),'%')</if>
+            <if test="dhzyxkzh != null  and dhzyxkzh != ''">and dhzyxkzh like concat(concat('%',#{dhzyxkzh}),'%')</if>
+            <if test="byclxr != null  and byclxr != ''">and byclxr like concat(concat('%',#{byclxr}),'%')</if>
+            <if test="sgdw != null  and sgdw != ''">and sgdw like concat(concat('%',#{sgdw}),'%')</if>
+            <if test="jccdr != null  and jccdr != ''">and jccdr like concat(concat('%',#{jccdr}),'%')</if>
+            <if test="wcxxbh != null  and wcxxbh != ''">and wcxxbh like concat(concat('%',#{wcxxbh}),'%')</if>
+            <if test="wcxzt != null  and wcxzt != ''">and wcxzt like concat(concat('%',#{wcxzt}),'%')</if>
+            <if test="xpsj != null ">and xpsj <![CDATA[=]]> #{xpsj}</if>
+            <if test="cxsj != null ">and cxsj <![CDATA[=]]> #{cxsj}</if>
+            <if test="gczyjb != null  and gczyjb != ''">and gczyjb = #{gczyjb}</if>
+            <if test="postponeNumber != null ">and postpone_number = #{postponeNumber}</if>
+            <if test="userMg != null ">and user_mg = #{userMg}</if>
+            <if test="userUnit != null ">and user_unit = #{userUnit}</if>
+            <if test="tag != null and tag != '' ">and tag = #{tag}</if>
+            <choose>
+                <when test="xpxp == '12'">
+                    and xpxp = #{xpxp}
+                </when>
+                <otherwise>
+                    and xpxp = 10
+                </otherwise>
+            </choose>
+            and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
@@ -91,11 +136,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTJobticketChildren" parameterType="TJobticket" resultMap="TJobticketResult">
         <include refid="selectTJobticketVo"/>
         <where>
-            <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="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>
             and d.del_flag = 0 and xpxp = 12
         </where>
         order by d.kprq
@@ -107,28 +152,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <!-- 查询相同数据 sql-->
-    <select id="selectTJobticketSameData" parameterType="TJobticket" resultType ="java.lang.Integer">
-        select count(*) from t_jobticket  d <where>
-        <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="whgzxkzh != null  and whgzxkzh != ''"> and whgzxkzh = #{whgzxkzh}</if>
-        <if test="dhzyxkzh != null  and dhzyxkzh != ''"> and dhzyxkzh = #{dhzyxkzh}</if>
-        <if test="yqxkzh != null  and yqxkzh != ''"> and yqxkzh = #{yqxkzh}</if>
-        and d.del_flag = 0
-        and  d.xpxp = #{xpxp}
-    </where>
+    <select id="selectTJobticketSameData" parameterType="TJobticket" resultType="java.lang.Integer">
+        select count(*) from t_jobticket d
+        <where>
+            <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="whgzxkzh != null  and whgzxkzh != ''">and whgzxkzh = #{whgzxkzh}</if>
+            <if test="dhzyxkzh != null  and dhzyxkzh != ''">and dhzyxkzh = #{dhzyxkzh}</if>
+            <if test="yqxkzh != null  and yqxkzh != ''">and yqxkzh = #{yqxkzh}</if>
+            and d.del_flag = 0
+            and d.xpxp = #{xpxp}
+        </where>
     </select>
 
     <select id="countXp" parameterType="TJobticket" resultType="int">
-        select count(1) from  t_jobticket d
+        select count(1) from t_jobticket d
         <where>
-            <if test="whgzxkzh != null  and whgzxkzh != ''"> and d.whgzxkzh = #{whgzxkzh}</if>
-            <if test="dhzyxkzh != null  and dhzyxkzh != ''"> and d.dhzyxkzh = #{dhzyxkzh}</if>
-            <if test="xzkjxkzh != null  and xzkjxkzh != ''"> and d.xzkjxkzh = #{xzkjxkzh}</if>
-            <if test="mbzyxkzh != null  and mbzyxkzh != ''"> and d.mbzyxkzh = #{mbzyxkzh}</if>
-            <if test="gczyxkzh != null  and gczyxkzh != ''"> and d.gczyxkzh = #{gczyxkzh}</if>
-            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
+            <if test="whgzxkzh != null  and whgzxkzh != ''">and d.whgzxkzh = #{whgzxkzh}</if>
+            <if test="dhzyxkzh != null  and dhzyxkzh != ''">and d.dhzyxkzh = #{dhzyxkzh}</if>
+            <if test="xzkjxkzh != null  and xzkjxkzh != ''">and d.xzkjxkzh = #{xzkjxkzh}</if>
+            <if test="mbzyxkzh != null  and mbzyxkzh != ''">and d.mbzyxkzh = #{mbzyxkzh}</if>
+            <if test="gczyxkzh != null  and gczyxkzh != ''">and d.gczyxkzh = #{gczyxkzh}</if>
+            <if test="deptId != null ">and d.dept_id = #{deptId}</if>
             and d.del_flag = 0 and d.xpxp = 12 and d.zypzt != 20
         </where>
     </select>
@@ -176,7 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userMg != null">user_mg,</if>
             <if test="userUnit != null">user_unit,</if>
             <if test="tag != null">tag,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="plantCode != null and plantCode != ''">#{plantCode},</if>
@@ -215,7 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userMg != null">#{userMg},</if>
             <if test="userUnit != null">#{userUnit},</if>
             <if test="tag != null">#{tag},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateTJobticket" parameterType="TJobticket">
@@ -262,7 +308,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <update id="deleteTJobticketById" parameterType="Long">
-        update t_jobticket set del_flag = 2 where id = #{id}
+        update t_jobticket
+        set del_flag = 2
+        where id = #{id}
     </update>
 
     <update id="deleteTJobticketByIds" parameterType="String">

+ 10 - 10
ui/src/views/approve/approveDetail/specModify-detail.vue

@@ -421,16 +421,16 @@
       <el-button v-if="!this.taskForm.taskId == ''" type="primary" @click="dataFormSubmit(1)" :disabled="submitDisabled">{{$t('通过')}}</el-button>
       <el-button v-if="!this.taskForm.taskId == ''" type="danger" @click="dataFormSubmit(0)" :disabled="submitDisabled">{{$t('拒绝')}}</el-button>
     </span>
-<!--    <div>-->
-<!--      <span>{{$t('流转详情')}}</span>-->
-<!--      <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">-->
-<!--        <el-table-column prop="taskName" header-align="center" align="center" :label="$t('流程进度')"></el-table-column>-->
-<!--        <el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>-->
-<!--        <el-table-column prop="taskCreateTime" header-align="center" align="center" :label="$t('开始时间')"></el-table-column>-->
-<!--        <el-table-column prop="taskEndTime" header-align="center" align="center" :label="$t('结束时间')"></el-table-column>-->
-<!--        <el-table-column prop="comment" header-align="center" align="center" :label="$t('审批意见')"></el-table-column>-->
-<!--      </el-table>-->
-<!--    </div>-->
+    <div>
+      <span>{{$t('流转详情')}}</span>
+      <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">
+        <el-table-column prop="taskName" header-align="center" align="center" :label="$t('流程进度')"></el-table-column>
+        <el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>
+        <el-table-column prop="taskCreateTime" header-align="center" align="center" :label="$t('开始时间')"></el-table-column>
+        <el-table-column prop="taskEndTime" header-align="center" align="center" :label="$t('结束时间')"></el-table-column>
+        <el-table-column prop="comment" header-align="center" align="center" :label="$t('审批意见')"></el-table-column>
+      </el-table>
+    </div>
     <record v-if="recordVisible" ref="recordDeal"></record>
   </el-dialog>
 </template>

+ 38 - 45
ui/src/views/ehs/jobticket/index.vue

@@ -27,7 +27,7 @@
           />
         </el-select>
       </el-form-item>
-      <!--      <el-form-item :label="$t('新票/续票')" prop="xpxp">
+            <el-form-item :label="$t('新票/续票')" prop="xpxp">
               <el-select v-model="queryParams.xpxp" :placeholder="$t('请选择') + $t('新票/续票')" clearable size="small"
                          @change="handleQuery">
                 <el-option
@@ -37,7 +37,7 @@
                   :value="dict.dictValue"
                 />
               </el-select>
-            </el-form-item>-->
+            </el-form-item>
       <el-form-item label="延期许可证号" prop="yqxkzh">
         <el-input
           v-model="queryParams.yqxkzh"
@@ -279,6 +279,7 @@
               row-key="id"
               :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
               :default-expand-all=true
+              @sort-change="sortList"
     >
       <el-table-column :label="$t('开票日期')" align="center" prop="kprq" width="125">
         <template slot-scope="scope">
@@ -288,16 +289,16 @@
       <el-table-column :label="$t('签发时间')" align="center" prop="qfsj" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('签发班组')" align="center" prop="qfbz" :formatter="qfbzFormat"/>
       <el-table-column :label="$t('新票/续票')" align="center" prop="xpxp" width="100" :formatter="xpxpFormat"/>
-      <el-table-column :label="$t('延期许可证号')" align="center" prop="yqxkzh" width="100" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('危害工作许可证号')" align="center" prop="whgzxkzh" width="100"
+      <el-table-column :label="$t('延期许可证号')" align="center"  sortable="custom" prop="yqxkzh" width="100" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('危害工作许可证号')" align="center" sortable="custom" prop="whgzxkzh" width="100"
                        :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('动火作业许可证号')" align="center" prop="dhzyxkzh" width="100"
+      <el-table-column :label="$t('动火作业许可证号')" align="center" sortable="custom" prop="dhzyxkzh" width="100"
                        :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('火票级别')" align="center" prop="hpjb" :formatter="hpjbFormat"/>
-      <el-table-column :label="$t('限制空间许可证号')" align="center" prop="xzkjxkzh" :show-overflow-tooltip="true"/>
-      <el-table-column label="盲板作业许可证号" align="center" prop="mbzyxkzh" :show-overflow-tooltip="true"/>
-      <el-table-column label="高处作业许可证号" align="center" prop="gczyxkzh" :show-overflow-tooltip="true"/>
-      <el-table-column label="高处作业级别" align="center" prop="gczyjb" :formatter="gczyjbFormat"/>
+      <el-table-column :label="$t('火票级别')" align="center" sortable="custom" prop="hpjb" :formatter="hpjbFormat"/>
+      <el-table-column :label="$t('限制空间许可证号')" align="center" sortable="custom" prop="xzkjxkzh" :show-overflow-tooltip="true"/>
+      <el-table-column label="盲板作业许可证号" align="center" sortable="custom" prop="mbzyxkzh" :show-overflow-tooltip="true"/>
+      <el-table-column label="高处作业许可证号" align="center" sortable="custom" prop="gczyxkzh" :show-overflow-tooltip="true"/>
+      <el-table-column label="高处作业级别" align="center" sortable="custom" prop="gczyjb" :formatter="gczyjbFormat"/>
       <el-table-column :label="$t('工作内容')" align="center" prop="content" width="300" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('BYC负责单位/联系人')" align="center" prop="byclxr" width="100"
                        :show-overflow-tooltip="true"/>
@@ -320,10 +321,10 @@
               <i class="el-icon-caret-bottom"></i>
             </span>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item @click.native="statusWX(0, scope.row)">{{ $t('作业票未销') }}</el-dropdown-item>
-              <el-dropdown-item @click.native="statusGBSH(0, scope.row)">{{ $t('作业票关闭,作业票收回') }}</el-dropdown-item>
-              <el-dropdown-item @click.native="statusYQ(0, scope.row)">{{ $t('作业票延期') }}</el-dropdown-item>
-              <el-dropdown-item @click.native="statusZF(0, scope.row)">{{ $t('作业票作废') }}</el-dropdown-item>
+              <el-dropdown-item @click.native="statusChange(10, scope.row)">{{ $t('作业票未销') }}</el-dropdown-item>
+              <el-dropdown-item @click.native="statusChange(18, scope.row)">{{ $t('作业票关闭,作业票收回') }}</el-dropdown-item>
+              <el-dropdown-item @click.native="statusChange(16, scope.row)">{{ $t('作业票延期') }}</el-dropdown-item>
+              <el-dropdown-item @click.native="statusChange(20, scope.row)">{{ $t('作业票作废') }}</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
         </template>
@@ -388,6 +389,7 @@
       v-show="total>0"
       :total="total"
       :page.sync="queryParams.pageNum"
+      :page-sizes="[20,50,100]"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
@@ -695,6 +697,7 @@ import FireData from "./fireData";
 import StatusData from "./statusData";
 import {listTagAll} from "@/api/invoice/tag";
 import base from "@/assets/js/base";
+import {listSpecYlrq} from "@/api/sems/specYlrq";
 
 export default {
   name: "Jobticket",
@@ -796,7 +799,9 @@ export default {
         wcxxbh: null,
         wcxzt: null,
         cxsj: null,
-        tag: null
+        tag: null,
+        orderByColumn: null,
+        isAsc: null
       },
       //日期快速选择
       pickerOptions: {
@@ -1051,6 +1056,21 @@ export default {
         this.loading = false;
       });
     },
+    //element表格排序
+    sortList(val) {
+      var sort = "asc";
+      let sortTip = val.order
+      this.queryParams.orderByColumn = val.prop;
+      if (sortTip === 'descending') {
+        this.queryParams.isAsc = 'desc' // 降序
+      } else if (sortTip === 'ascending') {
+        this.queryParams.isAsc = 'asc' // 升序
+      } else if (sortTip === null) {
+        this.queryParams.isAsc = null;
+        this.queryParams.orderByColumn = null;
+      }
+      this.getList();
+    },
     /** 查询部门下拉树结构 */
     getTreeselect() {
       treeselect().then(response => {
@@ -1091,37 +1111,10 @@ export default {
       this.reset();
     },
     //变换作业票状态
-    statusWX(index, row) {
-      this.form = row;
-      row.zypzt = 10;
-      this.form.zypzt = 10;
-      updateJobticket(this.form).then(response => {
-        this.msgSuccess(this.$t('修改成功'));
-        this.open = false;
-        this.getList();
-      });
-    },
-    statusGBSH(index, row) {
-      this.form = row;
-      this.form.zypzt = 18;
-      updateJobticket(this.form).then(response => {
-        this.msgSuccess(this.$t('修改成功'));
-        this.open = false;
-        this.getList();
-      });
-    },
-    statusYQ(index, row) {
-      this.form = row;
-      this.form.zypzt = 16;
-      updateJobticket(this.form).then(response => {
-        this.msgSuccess(this.$t('修改成功'));
-        this.open = false;
-        this.getList();
-      });
-    },
-    statusZF(index, row) {
+    statusChange(index, row) {
       this.form = row;
-      this.form.zypzt = 20;
+      row.zypzt = index;
+      this.form.zypzt = index;
       updateJobticket(this.form).then(response => {
         this.msgSuccess(this.$t('修改成功'));
         this.open = false;

+ 71 - 39
ui/src/views/invoice/bookingworkticket/index.vue

@@ -208,7 +208,7 @@
         <template slot-scope="scope">
           <el-tag v-if="scope.row.addStatus == 1" size="small" type="success">已开票</el-tag>
           <el-button
-            v-else
+            v-else-if="scope.row.bookingworkticket.status== 3"
             size="mini"
             type="text"
             @click="tickedStatis(scope.row)"
@@ -470,7 +470,7 @@
     </el-dialog>
 
     <el-dialog :close-on-click-modal="false" title="关联票号" :visible.sync="guanlianVisible" width="30%" center>
-      <el-form :model="licenseForm" :rules="rules" ref="licenseForm" label-width="100px" class="demo-ruleForm">
+      <el-form :model="licenseForm" :rules="licenseRules" ref="licenseForm" label-width="100px" class="demo-ruleForm">
         <el-form-item label="危害工作许可证号" prop="whgzxkzh">
           <el-input v-model="licenseForm.whgzxkzh" placeholder="请输入危害工作许可证号"/>
         </el-form-item>
@@ -599,6 +599,20 @@ export default {
   name: "Bookingworkticket",
   components: {Treeselect, AddApprove},
   data() {
+    var checkHpjb = (rule, value, callback) => {
+      if (this.licenseForm.dhzyxkzh && !value) {
+        callback(new Error('火票级别不能为空'));
+      } else {
+        callback();
+      }
+    }
+    var checkGczyjb = (rule, value, callback) => {
+      if (this.licenseForm.gczyxkzh && !value) {
+        callback(new Error('高处级别不能为空'));
+      } else {
+        callback();
+      }
+    }
     return {
       //关联票号
       associationParams: {},
@@ -757,6 +771,14 @@ export default {
         workStartTime: [
           {required: true, message: "作业时间不能为空", trigger: "blur"}
         ],
+      },
+      licenseRules: {
+        hpjb: [
+          { validator: checkHpjb, trigger: 'blur' }
+        ],
+        gczyjb: [
+          { validator: checkGczyjb, trigger: 'blur' }
+        ],
       }
     };
   },
@@ -1001,10 +1023,15 @@ export default {
     /** 查询预约作业票台账列表 */
     getList() {
       this.loading = true;
-      //得到用户名-承包商名称
+      let oldParams = JSON.stringify(this.queryParams)
       listBookingworkticket(this.queryParams).then(response => {
-        this.bookingworkticketList = response.rows;
-        this.total = response.total;
+        //解决防止出现结果和搜索不一致的问题
+        if (oldParams != JSON.stringify(this.queryParams)){
+          this.loading = false;
+          return
+        }
+          this.bookingworkticketList = response.rows;
+          this.total = response.total;
         this.loading = false;
       });
     },
@@ -1100,7 +1127,7 @@ export default {
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
-      this.getList();
+     this.getList(JSON.stringify(this.queryParams));
     },
     /** 重置按钮操作 */
     resetQuery() {
@@ -1343,42 +1370,47 @@ export default {
     },
     //提交票号
     submitassociation() {
-      this.guanlianVisible = false
-      let arr = []
-      arr.push(this.licenseForm.whgzxkzh)
-      arr.push(this.licenseForm.dhzyxkzh)
-      arr.push(this.licenseForm.xzkjxkzh)
-      arr.push(this.licenseForm.mbzyxkzh)
-      arr.push(this.licenseForm.gczyxkzh)
-      const putData = {}
-      let num = 0
-      arr.forEach(item => {
-        if (item === null || item === '') {
-          num = num + 1
+      this.$refs["licenseForm"].validate(valid => {
+        if (valid) {
+          this.guanlianVisible = false
+          let arr = []
+          arr.push(this.licenseForm.whgzxkzh)
+          arr.push(this.licenseForm.dhzyxkzh)
+          arr.push(this.licenseForm.xzkjxkzh)
+          arr.push(this.licenseForm.mbzyxkzh)
+          arr.push(this.licenseForm.gczyxkzh)
+          const putData = {}
+          let num = 0
+          arr.forEach(item => {
+            if (item === null || item === '') {
+              num = num + 1
+            }
+          })
+          if (num < 5) {
+            putData.id = this.associationParams.id
+            putData.whgzxkzh = this.licenseForm.whgzxkzh
+            putData.hpjb = this.licenseForm.hpjb
+            putData.dhzyxkzh = this.licenseForm.dhzyxkzh
+            putData.xzkjxkzh = this.licenseForm.xzkjxkzh
+            putData.mbzyxkzh = this.licenseForm.mbzyxkzh
+            putData.gczyxkzh = this.licenseForm.gczyxkzh
+            putData.gczyjb = this.licenseForm.gczyjb
+            putData.tag = this.licenseForm.tag
+          } else {
+            return this.msgError("请至少关联一张许可证号");
+          }
+          updateWorkcontent(putData).then(response => {
+            //    console.log(response.row)
+
+          });
+          assion(this.associationParams.bookingticketId).then(response => {
+            this.getList()
+          });
+
+          this.msgSuccess("请求成功");
         }
       })
-      if (num < 5) {
-        putData.id = this.associationParams.id
-        putData.whgzxkzh = this.licenseForm.whgzxkzh
-        putData.hpjb = this.licenseForm.hpjb
-        putData.dhzyxkzh = this.licenseForm.dhzyxkzh
-        putData.xzkjxkzh = this.licenseForm.xzkjxkzh
-        putData.mbzyxkzh = this.licenseForm.mbzyxkzh
-        putData.gczyxkzh = this.licenseForm.gczyxkzh
-        putData.gczyjb = this.licenseForm.gczyjb
-        putData.tag = this.licenseForm.tag
-      } else {
-        return this.msgError("请至少关联一张许可证号");
-      }
-      updateWorkcontent(putData).then(response => {
-        //    console.log(response.row)
-
-      });
-      assion(this.associationParams.bookingticketId).then(response => {
-        this.getList()
-      });
 
-      this.msgSuccess("请求成功");
     },
     //校验表单中作业内容是否重复
 

+ 1 - 1
ui/src/views/sems/specDzsb/index.vue

@@ -219,7 +219,7 @@
     <pagination
       v-show="total>0"
       :total="total"
-             :page.sync="queryParams.pageNum"
+       :page.sync="queryParams.pageNum"
       :page-sizes="[20,100,300,500]"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"

Неке датотеке нису приказане због велике количине промена