Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

ouyj 4 месяцев назад
Родитель
Сommit
a95bcff3e6

+ 11 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/GxtMisInfo.java

@@ -51,6 +51,9 @@ public class GxtMisInfo extends BaseEntity {
     /** 许可人 */
     private String permitterName;
 
+    /** 工作票编号 */
+    private String workPermitNum;
+
     /** 工单状态:draft-草稿,to_assign-待派单,assigned-已派单,accepted-已接单,processing-处理中,paused-暂停中,to_approve-待审批,suspended-已挂起,completed-已完成 */
     private String workOrderStatus;
 
@@ -166,6 +169,14 @@ public class GxtMisInfo extends BaseEntity {
         this.permitterName = permitterName;
     }
 
+    public String getWorkPermitNum() {
+        return workPermitNum;
+    }
+
+    public void setWorkPermitNum(String workPermitNum) {
+        this.workPermitNum = workPermitNum;
+    }
+
     public String getWorkOrderStatus() {
         return workOrderStatus;
     }

+ 4 - 2
ygtx-gxt/src/main/resources/mapper/gxt/GxtRepairOrderMapper.xml

@@ -458,7 +458,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="resetMethod != null and resetMethod != ''">reset_method = #{resetMethod},</if>
             <if test="invalidReason != null and invalidReason != ''">invalid_reason = #{invalidReason},</if>
             <if test="returnType != null and returnType != ''">return_type = #{returnType},</if>
-            <if test="workOrderStatus != null and (workOrderStatus == 'return' or workOrderStatus == 'accept_return')">
+            <if test="workOrderStatus != null and workOrderStatus == 'return'">
                 return_reason = #{returnReason},
             </if>
             <if test="feedbackReason != null and feedbackReason != ''">feedback_reason = #{feedbackReason},</if>
@@ -479,7 +479,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderAttachment != null and orderAttachment != ''">order_attachment = #{orderAttachment},</if>
             <if test="extraWork != null and extraWork != ''">extra_work = #{extraWork},</if>
             <if test="acceptReturnType != null and acceptReturnType != ''">accept_return_type = #{acceptReturnType},</if>
-            accept_return_reason = #{acceptReturnReason},
+            <if test="workOrderStatus != null and workOrderStatus == 'accept_return'">
+                accept_return_reason = #{acceptReturnReason},
+            </if>
             <if test="scoreReturnReason != null and scoreReturnReason != ''">score_return_reason = #{scoreReturnReason},</if>
         </trim>
         where id = #{id}

+ 27 - 17
ygtx-gxt/src/main/resources/mapper/gxt/source/GxtMisInfoMapper.xml

@@ -5,49 +5,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.ygtx.gxt.mapper.source.GxtMisInfoMapper">
 
     <resultMap type="com.ygtx.gxt.domain.GxtMisInfo" id="GxtMisInfoResult">
-        <result property="misNo"    column="work_order_project_no"    />
+<!--        <result property="misNo"    column="work_order_project_no"    />-->
+<!--        <result property="workOrderStatus"    column="work_order_status"    />-->
+<!--        <result property="pcsStationName"    column="pcs_stati_name"    />-->
+<!--        <result property="planStartTime"    column="plan_start_time"    />-->
+<!--        <result property="planEndTime"    column="plan_end_time"    />-->
+<!--        <result property="realStartTime"    column="real_start_time"    />-->
+<!--        <result property="realEndTime"    column="real_end_time"    />-->
+<!--        <result property="content"    column="work_content"    />-->
+<!--        <result property="issuerName"    column="issuer_name"    />-->
+<!--        <result property="permitterName"    column="permitter_name"    />-->
+<!--        <result property="createTime"    column="create_time"    />-->
+<!--        <result property="updateTime"    column="update_time"    />-->
+<!--        <result property="remark"    column="remark"    />-->
+        <result property="misNo"    column="work_order_project_code"    />
         <result property="workOrderStatus"    column="work_order_status"    />
         <result property="pcsStationName"    column="pcs_station_name"    />
-        <result property="pcsDeviceName"    column="pcs_device_name"    />
-        <result property="planStartTime"    column="plan_start_time"    />
-        <result property="planEndTime"    column="plan_end_time"    />
+        <result property="pcsDeviceName"    column="work_order_device"    />
         <result property="realStartTime"    column="real_start_time"    />
         <result property="realEndTime"    column="real_end_time"    />
         <result property="content"    column="work_content"    />
-        <result property="issuerName"    column="issuer_name"    />
-        <result property="permitterName"    column="permitter_name"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="workPermitNum"    column="work_ticket_no"    />
     </resultMap>
 
     <resultMap type="com.ygtx.gxt.domain.GxtWorkOrderPerson" id="GxtWorkOrderPersonResult">
         <result property="nickName"    column="person_name"    />
-        <result property="misNo"    column="work_order_project_no"    />
+        <result property="misNo"    column="work_order_project_code"    />
         <result property="userName"    column="person_id"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
     </resultMap>
 
     <sql id="selectGxtMisInfoVo">
-        select work_order_project_no, work_order_status, pcs_station_name,
-               pcs_device_name, plan_start_time, plan_end_time, real_start_time, real_end_time,
-               work_content, issuer_name,permitter_name, create_time, update_time, remark
-        from fujian_wo_workorder_info t
+        select work_order_project_code, work_order_status, pcs_station_name,
+               work_order_device, real_start_time, real_end_time,
+               work_content, create_time, update_time, remark, work_ticket_no
+        from fujian_wo_new_work_item t
     </sql>
 
     <sql id="selectGxtWorkOrderPersonVo">
-        select person_name, work_order_project_no, person_id, create_time, update_time
-        from fujian_wo_gdnb_bzcy
+        select person_name, work_order_project_code, person_id, create_time, update_time
+        from fujian_wo_new_internal_team_members
     </sql>
 
     <select id="selectGxtMisInfoList" parameterType="com.ygtx.gxt.domain.GxtMisInfo" resultMap="GxtMisInfoResult">
         <include refid="selectGxtMisInfoVo"/>
         <where>
-            pcs_device_name is not null
-            <if test="misNo != null  and misNo != ''"> and work_order_project_no like concat('%', #{misNo}, '%')</if>
+            work_order_device is not null
+            <if test="misNo != null  and misNo != ''"> and work_order_project_code like concat('%', #{misNo}, '%')</if>
             <if test="pcsStationName != null  and pcsStationName != ''"> and pcs_station_name like concat('%', #{pcsStationName}, '%')</if>
-            <if test="pcsDeviceName != null  and pcsDeviceName != ''"> and pcs_device_name like concat('%', #{pcsDeviceName}, '%')</if>
+            <if test="pcsDeviceName != null  and pcsDeviceName != ''"> and work_order_device like concat('%', #{pcsDeviceName}, '%')</if>
             <if test="workOrderStatus != null  and workOrderStatus != ''"> and work_order_status in
                 <foreach collection="workOrderStatus.split(',')" item="status" open="(" separator="," close=")">
                     #{status}
@@ -63,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectGxtWorkOrderPersonVo"/>
         <where>
             <if test="nickName != null and nickName != ''"> and person_name = #{nickName}</if>
-            <if test="misNo != null and misNo != ''"> and work_order_project_no = #{misNo}</if>
+            <if test="misNo != null and misNo != ''"> and work_order_project_code = #{misNo}</if>
             <if test="userName != null and userName != ''"> and person_id = #{isLeader}</if>
         </where>
         order by create_time desc

+ 2 - 1
ygtx-ui/src/components/misInfoSelect/single.vue

@@ -63,6 +63,7 @@
           <el-table-column label="风机编号" align="center" key="pcsDeviceName" prop="pcsDeviceName" :show-overflow-tooltip="true" />
           <el-table-column label="场站" align="center" key="pcsStationName" prop="pcsStationName" :show-overflow-tooltip="true" />
           <el-table-column label="检修内容" align="center" key="content" prop="content" :show-overflow-tooltip="true" />
+          <el-table-column label="工作票号" align="center" key="workPermitNum" prop="workPermitNum" :show-overflow-tooltip="true" min-width="120" />
           <el-table-column label="状态" align="center" key="workOrderStatus" prop="workOrderStatus" :show-overflow-tooltip="true" />
           <el-table-column label="计划开始时间" align="center" key="planStartTime" prop="planStartTime" :show-overflow-tooltip="true" />
           <el-table-column label="计划结束时间" align="center" key="planEndTime" prop="planEndTime" :show-overflow-tooltip="true" />
@@ -151,7 +152,7 @@ const queryParams = reactive({
   misNo: undefined,
   pcsDeviceName: props.pcsDeviceName, // 使用 props 的初始值
   pcsStationName: props.pcsStationName, // 使用 props 的初始值
-  workOrderStatus: '结束,作业结束,工作票终结许可人确认,作业中,签发人签发,编辑,互保人签字',
+  workOrderStatus: '结束,作业结束,工作票终结许可人确认,作业中,签发人签发,编辑,互保人签字,运行调控中心',
   beginRealEndTime: undefined, // 添加开始时间参数
   endRealEndTime: undefined    // 添加结束时间参数
 })

+ 4 - 4
ygtx-ui/src/components/repairOrder/return.vue

@@ -50,7 +50,7 @@
             <el-input v-model="formData.teamLeaderName" disabled />
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="formData.workOrderStatus == 'return' || formData.workOrderStatus == 'to_finish'">
+        <el-col :span="12" v-if="formData.workOrderStatus == 'to_finish'">
           <el-form-item label="退回原因" prop="returnType">
             <el-select
               v-model="formData.returnType"
@@ -68,7 +68,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="formData.workOrderStatus == 'assigned'">
+        <el-col :span="12" v-if="formData.workOrderStatus == 'assigned' || formData.workOrderStatus == 'return'">
           <el-form-item label="退回原因" prop="acceptReturnType">
             <el-select
                 v-model="formData.acceptReturnType"
@@ -86,7 +86,7 @@
           </el-form-item>
         </el-col>
       </el-row>
-      <el-form-item label="退回说明" prop="returnReason" v-if="formData.returnType == '0' && (formData.workOrderStatus == 'return' || formData.workOrderStatus == 'to_finish')">
+      <el-form-item label="退回说明" prop="returnReason" v-if="formData.returnType == '0' && formData.workOrderStatus == 'to_finish'">
         <el-input
           v-model="formData.returnReason"
           type="textarea"
@@ -97,7 +97,7 @@
           :disabled="formData.workOrderStatus === 'return'"
         />
       </el-form-item>
-      <el-form-item label="退回说明" prop="acceptReturnReason" v-if="formData.acceptReturnType == '0' && formData.workOrderStatus == 'assigned'">
+      <el-form-item label="退回说明" prop="acceptReturnReason" v-if="formData.acceptReturnType == '0' && (formData.workOrderStatus == 'assigned' || formData.workOrderStatus == 'return')">
         <el-input
             v-model="formData.acceptReturnReason"
             type="textarea"

+ 8 - 5
ygtx-ui/src/views/gxt/orderMyTodo/index.vue

@@ -296,6 +296,7 @@
         :repair-order-flow-action-type-options="gxt_repair_order_flow_action_type"
         :work-area-options="gxt_work_area"
         :return-type-options="gxt_return_type"
+        :accept-return-type-options="gxt_accept_return_type"
     />
 
     <!-- 维保工单详情对话框 -->
@@ -1244,7 +1245,7 @@
         v-model="returnDialogVisible"
         :data="returnForm"
         :work-order-status-options="gxt_work_order_status"
-        :return-type-options="returnForm.workOrderStatus == 'assigned' ? gxt_accept_return_reason : gxt_return_type "
+        :return-type-options="returnForm.workOrderStatus == 'to_finish' ? gxt_return_type : gxt_accept_return_type"
         :on-submit="submitReturnFromParent"
         @success="handleReturnSuccess"
     />
@@ -1482,7 +1483,7 @@ const {
   gxt_info_entry,
   gxt_work_area,
   gxt_return_type,
-  gxt_accept_return_reason
+  gxt_accept_return_type
 } = proxy.useDict(
   "gxt_maintenance_type",
   "gxt_work_order_status",
@@ -1496,7 +1497,7 @@ const {
   "gxt_info_entry",
   "gxt_work_area",
     "gxt_return_type",
-    "gxt_accept_return_reason"
+    "gxt_accept_return_type"
 );
 
 // 表单验证规则
@@ -2686,10 +2687,12 @@ async function submitFinalizeFromParent(data) {
 function handleReturn(row) {
   getRepairOrder(row.id).then(response => {
     returnForm.value = response.data
-    if (row.workOrderStatus != 'return') {
+    // if (row.workOrderStatus != 'return') {
       returnForm.value.returnType = undefined
       returnForm.value.returnReason = undefined
-    }
+      returnForm.value.acceptReturnType = undefined
+      returnForm.value.acceptReturnReason = undefined
+    // }
     returnDialogVisible.value = true
   })
 }

+ 8 - 5
ygtx-ui/src/views/gxt/repairOrder/index.vue

@@ -837,7 +837,7 @@
         v-model="returnDialogVisible"
         :data="returnForm"
         :work-order-status-options="gxt_work_order_status"
-        :return-type-options="returnForm.workOrderStatus == 'assigned' ? gxt_accept_return_type : gxt_return_type "
+        :return-type-options="returnForm.workOrderStatus == 'to_finish' ?gxt_return_type : gxt_accept_return_type "
         :on-submit="submitReturnFromParent"
         @success="handleReturnSuccess"
     />
@@ -3044,12 +3044,15 @@ function handleApprove(row) {
 function handleReturn(row) {
   getRepairOrder(row.id).then(response => {
     returnForm.value = response.data
-    if (row.workOrderStatus != 'return') {
+    if (row.workOrderStatus == 'to_finish') {
+      returnForm.value.returnType = '1'
+    } else {
       returnForm.value.returnType = undefined
-      returnForm.value.returnReason = undefined
-      returnForm.value.acceptReturnType = undefined
-      returnForm.value.acceptReturnReason = undefined
     }
+    returnForm.value.returnReason = undefined
+    returnForm.value.acceptReturnType = undefined
+    returnForm.value.acceptReturnReason = undefined
+    // }
     returnDialogVisible.value = true
     // proxy.resetForm("returnFormRef")
   })