Ver Fonte

新增工单类型

HD_wangm há 5 meses atrás
pai
commit
b8022a7e3b

+ 12 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/GxtRepairOrder.java

@@ -187,6 +187,9 @@ public class GxtRepairOrder extends BaseEntity
     /** 终评系数 */
     private BigDecimal finalCoefficient;
 
+    /** 工单类型 */
+    private Long orderType;
+
     private List<GxtRepairOrderPerson> repairOrderPersonList;
 
     private List<GxtRepairOrderFlow> repairOrderFlowList;
@@ -672,6 +675,14 @@ public class GxtRepairOrder extends BaseEntity
         this.finalCoefficient = finalCoefficient;
     }
 
+    public Long getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(Long orderType) {
+        this.orderType = orderType;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -715,6 +726,7 @@ public class GxtRepairOrder extends BaseEntity
             .append("approvalStatus", getApprovalStatus())
             .append("rejectionReason", getRejectionReason())
             .append("finalizationRemark", getFinalizationRemark())
+            .append("orderType", getOrderType())
             .toString();
     }
 }

+ 1 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtRepairOrderServiceImpl.java

@@ -141,6 +141,7 @@ public class GxtRepairOrderServiceImpl implements IGxtRepairOrderService
             gxtRepairOrder.setAssignUserId(SecurityUtils.getUserId());
             gxtRepairOrder.setAssignUserName(nickName);
         }
+        gxtRepairOrder.setOrderType(1L);
         gxtRepairOrder.setCreateBy(SecurityUtils.getUsername());
         gxtRepairOrder.setCreateTime(DateUtils.getNowDate());
         int result = gxtRepairOrderMapper.insertGxtRepairOrder(gxtRepairOrder);

+ 1 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtWorkOrderServiceImpl.java

@@ -148,6 +148,7 @@ public class GxtWorkOrderServiceImpl implements IGxtWorkOrderService
             throw new ServiceException("新增失败!" + gxtWorkOrder.getPcsStationName()+"不存在!");
         }
 
+        gxtWorkOrder.setOrderType(2L);
         gxtWorkOrder.setCreateTime(DateUtils.getNowDate());
         int result = gxtWorkOrderMapper.insertGxtWorkOrder(gxtWorkOrder);
         String actionType = null;

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

@@ -205,7 +205,7 @@
     <select id="selectMobileUnionOrderList" resultMap="OrderScoreInfoResult">
         SELECT * FROM (
         SELECT
-        1 as order_type,
+        order_type,
         id as id,
         work_order_project_no as work_order_project_no,
         work_order_status as work_order_status,
@@ -278,7 +278,7 @@
         UNION ALL
 
         SELECT
-        2 as order_type,
+        order_type,
         id as id,
         work_order_project_no as work_order_project_no,
         work_order_status as work_order_status,

+ 6 - 1
ygtx-gxt/src/main/resources/mapper/gxt/GxtRepairOrderMapper.xml

@@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="attachmentUrls"    column="attachment_urls"    />
         <result property="reviewScoreNum"    column="review_score_num"    />
         <result property="finalCoefficient"    column="final_coefficient"    />
+        <result property="orderType"    column="order_type"    />
     </resultMap>
 
     <resultMap type="GxtRepairOrder" id="GxtRepairOrderWithPersonResult" extends="GxtRepairOrderResult">
@@ -81,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                accept_user_id, accept_user_name, real_start_time, real_end_time, team_leader_id, team_leader_name, work_group_member_id,
                work_group_member_name, t.create_by, t.create_time, t.update_by, t.update_time, t.remark, content, plan_hour, priority_type, score,
                review_content, maintenance_type, occur_time, fault_barcode, suspend_reason, suspend_description, approval_status,
-               rejection_reason, modify_reason, finalization_remark, related_order_code, related_order_content, mis_order_no, restart_time, scoring_status, pcs_station_pid, attachment_urls, review_score_num, final_coefficient
+               rejection_reason, modify_reason, finalization_remark, related_order_code, related_order_content, mis_order_no, restart_time, scoring_status, pcs_station_pid, attachment_urls, review_score_num, final_coefficient, order_type
         from gxt_repair_order t
         left join sys_user u on u.user_name = t.create_by
         left join sys_dept d on u.dept_id = d.dept_id
@@ -137,6 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="attachmentUrls != null  and attachmentUrls != ''"> and attachment_urls = #{attachmentUrls}</if>
             <if test="reviewScoreNum != null "> and review_score_num = #{reviewScoreNum}</if>
             <if test="finalCoefficient != null "> and final_coefficient = #{finalCoefficient}</if>
+            <if test="orderType != null "> and order_type = #{orderType}</if>
 
             <!-- 业务特定数据权限过滤条件 -->
             <if test="params.businessDataScope != null and params.businessDataScope != ''">
@@ -211,6 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="attachmentUrls != null and attachmentUrls != ''">attachment_urls,</if>
             <if test="reviewScoreNum != null">review_score_num,</if>
             <if test="finalCoefficient != null">final_coefficient,</if>
+            <if test="orderType != null">order_type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="workOrderProjectNo != null and workOrderProjectNo != ''">#{workOrderProjectNo},</if>
@@ -265,6 +268,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="attachmentUrls != null and attachmentUrls != ''">#{attachmentUrls},</if>
             <if test="reviewScoreNum != null">#{reviewScoreNum},</if>
             <if test="finalCoefficient != null">#{finalCoefficient},</if>
+            <if test="orderType != null">#{orderType},</if>
          </trim>
     </insert>
 
@@ -323,6 +327,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="attachmentUrls != null and attachmentUrls != ''">attachment_urls = #{attachmentUrls},</if>
             <if test="reviewScoreNum != null">review_score_num = #{reviewScoreNum},</if>
             <if test="finalCoefficient != null">final_coefficient = #{finalCoefficient},</if>
+            <if test="orderType != null">order_type = #{orderType},</if>
         </trim>
         where id = #{id}
     </update>