wangggziwen 1 сар өмнө
parent
commit
005568c395

+ 10 - 5
master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java

@@ -693,11 +693,16 @@ public class TApproveDangerController extends BaseController {
                     devProcess.setApName(user.getNickName());
                     devProcess.setApproveObject(approve);
                 } else if (pi.getProcessDefinitionName().equals("EOEG_SAI开项申请流程")) {
-                    TEoegSaiApply approve = tEoegSaiApplyService.selectTSaiApplyById(Long.parseLong(pi.getBusinessKey()));
-                    SysUser user = sysUserService.selectUserById(Long.valueOf(approve.getCreateBy()));
-                    devProcess.setApNo(approve.getApNo());
-                    devProcess.setApName(user.getNickName());
-                    devProcess.setApproveObject(approve);
+                        TEoegSaiApply approve = tEoegSaiApplyService.selectTSaiApplyById(Long.parseLong(pi.getBusinessKey()));
+                        if (approve != null) {
+                            SysUser user = sysUserService.selectUserById(Long.valueOf(approve.getCreateBy()));
+                            if (approve != null) {
+                                devProcess.setApNo(approve.getApNo());
+                                devProcess.setApName(user.getNickName());
+                                devProcess.setApproveObject(approve);
+                            }
+
+                        }
                 } else if (pi.getProcessDefinitionName().equals("每周安全排查报告")) {
                     TSpecWeekcheck t = tSpecWeekcheckService.selectTSpecWeekcheckById(Long.parseLong(pi.getBusinessKey()));
                     SysUser user = sysUserService.selectUserById(Long.valueOf(t.getCreaterCode()));

+ 14 - 0
master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiApplyQueryVO.java

@@ -46,6 +46,8 @@ public class EoegSaiApplyQueryVO extends BaseEntity {
 
     private String saiType;
 
+    private String tpmStatus;
+
     /** 登记人部门 */
     @Excel(name = "登记人部门")
     private String applicantDept;
@@ -159,6 +161,18 @@ public class EoegSaiApplyQueryVO extends BaseEntity {
     /** 备注(执行阶段) */
     private String remarksExecute;
 
+    public String getTpmStatus() {
+        return tpmStatus;
+    }
+
+    public void setTpmStatus(String tpmStatus) {
+        this.tpmStatus = tpmStatus;
+    }
+
+    public void setVeResult(String veResult) {
+        this.veResult = veResult;
+    }
+
     public String getSaiType() {
         return saiType;
     }

+ 4 - 3
master/src/main/java/com/ruoyi/project/production/service/impl/TEoegSaiApplyServiceImpl.java

@@ -76,9 +76,10 @@ public class TEoegSaiApplyServiceImpl implements ITEoegSaiApplyService
     public TEoegSaiApply selectTSaiApplyById(Long saiApplyId)
     {
         TEoegSaiApply tSaiApply = tSaiApplyMapper.selectTSaiApplyById(saiApplyId);
-        if (tSaiApply.getApplicant() != null) {
-            tSaiApply.setApplicantName(sysUserMapper.selectUserById(Long.parseLong(tSaiApply.getApplicant())).getNickName());
-        }
+        if (tSaiApply != null) {
+            if (tSaiApply.getApplicant() != null) {
+                tSaiApply.setApplicantName(sysUserMapper.selectUserById(Long.parseLong(tSaiApply.getApplicant())).getNickName());
+            }}
         return tSaiApply;
     }
 

+ 2 - 1
master/src/main/resources/mybatis/production/TEoegSaiApplyMapper.xml

@@ -129,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remarksExecute != null  and remarksExecute != ''"> and remarks_execute = #{remarksExecute}</if>
             <if test="workArea != null  and workArea != ''"> and instr(#{workArea}, work_area ) > 0 </if>
             <if test="saiType != null  and saiType != ''"> and sai_type = #{saiType}</if>
+            <if test="tpmStatus != null  and tpmStatus != ''"> and tpm_status = #{tpmStatus}</if>
             <if test="ids != null and ids.length > 0"> and sai_apply_id in
                 <foreach item="id" collection="ids" open="(" separator="," close=")">
                     #{id}
@@ -136,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </if>
             and d.del_flag = 0
         </where>
-        order by APPLY_DATE asc
+        order by APPLY_DATE desc
     </select>
 
     <select id="selectTSaiApplyById" parameterType="Long" resultMap="TEoegSaiApplyResult">

+ 9 - 3
ui/src/views/approve/approveDetail/eoeg-sai-apply-detail.vue

@@ -13,6 +13,7 @@
           <el-descriptions-item label="SAI类型" :span="1">
             <el-form-item prop="saiType">
               <el-select
+                disabled
                 v-model="dataForm.saiType"
                 placeholder="请选择SAI类型">
                 <el-option key="SAI" label="SAI" value="SAI"></el-option>
@@ -23,6 +24,7 @@
           <el-descriptions-item label="TPM状态" :span="2" v-if="dataForm.saiType == 'TPM'">
             <el-form-item prop="tpmStatus">
               <el-select
+                disabled
                 v-model="dataForm.tpmStatus"
                 placeholder="请选择TPM状态">
                 <el-option key="未完成" label="未完成" value="未完成"></el-option>
@@ -111,9 +113,10 @@
               </el-select>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="片区" :span="1">
+          <el-descriptions-item label="片区" :span="1" v-if="dataForm.saiType == 'SAI' || (dataForm.saiType == 'TPM' && dataForm.tpmStatus == '未完成')">
             <el-form-item prop="workArea">
               <el-select
+                disabled
                 filterable
                 clearable
                 v-model="dataForm.workArea"
@@ -123,7 +126,7 @@
               </el-select>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="整改负责人">
+          <el-descriptions-item label="整改负责人" v-if="dataForm.saiType == 'SAI' || (dataForm.saiType == 'TPM' && dataForm.tpmStatus == '未完成')">
             <el-form-item prop="executor">
               <el-select
                 filterable
@@ -371,7 +374,7 @@
                 ref="doc"
                 :limit="50"
                 :headers="doc.headers"
-                :action="doc.url + '?pType=saiInspect&pId=' + doc.pId"
+                :action="doc.url + '?pType=eoegSaiInspect&pId=' + doc.pId"
                 :disabled="doc.isUploading"
                 :on-progress="handleFileDocProgress"
                 :on-success="handleFileDocSuccess"
@@ -870,10 +873,13 @@ export default {
       })
     },
     getFileList() {
+      console.log(this.dataForm.saiApplyId)
       listFile({
         approveId: this.dataForm.saiApplyId
       }).then(response => {
         this.doc.commonfileListApply = response;
+
+        console.log(response)
       });
       allFileList({
         pId: this.doc.queryParams.pId,

+ 5 - 5
ui/src/views/production/eoegapply/all/index.vue

@@ -1374,21 +1374,21 @@ export default {
         if (saiLevel == 1 && this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
           let saiCategoryOption = {
             dictValue: this.saiCategoryOptions[i].dictValue,
-            dictLabel: this.saiCategoryOptions[i].dictLabel,
+            dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
           };
           saiCategoryOptionsTemp.push(saiCategoryOption);
         }
         if (saiLevel == 2 && this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
           let saiCategoryOption = {
             dictValue: this.saiCategoryOptions[i].dictValue,
-            dictLabel: this.saiCategoryOptions[i].dictLabel,
+            dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
           };
           saiCategoryOptionsTemp.push(saiCategoryOption);
         }
         if (saiLevel == 3 && this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
           let saiCategoryOption = {
             dictValue: this.saiCategoryOptions[i].dictValue,
-            dictLabel: this.saiCategoryOptions[i].dictLabel,
+            dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
           };
           saiCategoryOptionsTemp.push(saiCategoryOption);
         }
@@ -1426,11 +1426,11 @@ export default {
         for (let i = 0; i < data.length; i++) {
           if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
             this.saiCategoryOptions.push({
-              dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
+              dictLabel: data[i].saiCategoryName + " (" + data[i].saiCategoryDescription.substring(0, 30) + "...)",
               dictValue: data[i].saiCategoryId
             });
             this.saiCategoryOptions2.push({
-              dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
+              dictLabel: data[i].saiCategoryName + " (" + data[i].saiCategoryDescription.substring(0, 30) + "...)",
               dictValue: data[i].saiCategoryId
             });
           }

+ 5 - 5
ui/src/views/production/eoegapply/mine/index.vue

@@ -1164,21 +1164,21 @@
           if (saiLevel == 1 && this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
             let saiCategoryOption = {
               dictValue: this.saiCategoryOptions[i].dictValue,
-              dictLabel: this.saiCategoryOptions[i].dictLabel,
+              dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
             };
             saiCategoryOptionsTemp.push(saiCategoryOption);
           }
           if (saiLevel == 2 && this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
             let saiCategoryOption = {
               dictValue: this.saiCategoryOptions[i].dictValue,
-              dictLabel: this.saiCategoryOptions[i].dictLabel,
+              dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
             };
             saiCategoryOptionsTemp.push(saiCategoryOption);
           }
           if (saiLevel == 3 && this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
             let saiCategoryOption = {
               dictValue: this.saiCategoryOptions[i].dictValue,
-              dictLabel: this.saiCategoryOptions[i].dictLabel,
+              dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
             };
             saiCategoryOptionsTemp.push(saiCategoryOption);
           }
@@ -1216,11 +1216,11 @@
           for (let i = 0; i < data.length; i++) {
             if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
               this.saiCategoryOptions.push({
-                dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
+                dictLabel: data[i].saiCategoryName + " (" + data[i].saiCategoryDescription.substring(0, 30) + "...)",
                 dictValue: data[i].saiCategoryId
               });
               this.saiCategoryOptions2.push({
-                dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
+                dictLabel: data[i].saiCategoryName + " (" + data[i].saiCategoryDescription.substring(0, 30) + "...)",
                 dictValue: data[i].saiCategoryId
               });
             }

+ 5 - 5
ui/src/views/production/eoegapply/pending/index.vue

@@ -1164,21 +1164,21 @@
           if (saiLevel == 1 && this.saiCategoryOptions[i].dictLabel.indexOf("-1-") != -1) {
             let saiCategoryOption = {
               dictValue: this.saiCategoryOptions[i].dictValue,
-              dictLabel: this.saiCategoryOptions[i].dictLabel,
+              dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
             };
             saiCategoryOptionsTemp.push(saiCategoryOption);
           }
           if (saiLevel == 2 && this.saiCategoryOptions[i].dictLabel.indexOf("-2-") != -1) {
             let saiCategoryOption = {
               dictValue: this.saiCategoryOptions[i].dictValue,
-              dictLabel: this.saiCategoryOptions[i].dictLabel,
+              dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
             };
             saiCategoryOptionsTemp.push(saiCategoryOption);
           }
           if (saiLevel == 3 && this.saiCategoryOptions[i].dictLabel.indexOf("-3-") != -1) {
             let saiCategoryOption = {
               dictValue: this.saiCategoryOptions[i].dictValue,
-              dictLabel: this.saiCategoryOptions[i].dictLabel,
+              dictLabel: this.saiCategoryOptions[i].dictLabel.substring(0, 30) + "...)",
             };
             saiCategoryOptionsTemp.push(saiCategoryOption);
           }
@@ -1216,11 +1216,11 @@
           for (let i = 0; i < data.length; i++) {
             if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
               this.saiCategoryOptions.push({
-                dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
+                dictLabel: data[i].saiCategoryName + " (" + data[i].saiCategoryDescription.substring(0, 30) + "...)",
                 dictValue: data[i].saiCategoryId
               });
               this.saiCategoryOptions2.push({
-                dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
+                dictLabel: data[i].saiCategoryName + " (" + data[i].saiCategoryDescription.substring(0, 30) + "...)",
                 dictValue: data[i].saiCategoryId
               });
             }