Browse Source

'销售销售'

HUJIANGUO 3 years ago
parent
commit
46ead3ad64

+ 18 - 3
src/main/java/com/steerinfo/dil/model/OmstruckOrder.java

@@ -58,13 +58,13 @@ public class OmstruckOrder implements IBasePO<BigDecimal> {
     private BigDecimal orderCommunicationDuration;
 
     /**
-     * 运单状态 :0:待运输,1:执行中,2:已结束,3:未下发,4:已下发,5:已接收,6:已拒绝,7:逻辑删除 8: 关闭  9:退货关闭(ORDER_STATUS,DECIMAL,0)
+     * 运单状态 :0:待运输,1:执行中,2:已结束,3:未下发,4:已下发,5:已接收,6:已拒绝,7:逻辑删除 8: 关闭  9:退货关闭 10:不可作业(ORDER_STATUS,DECIMAL,0)
      */
-    @ApiModelProperty(value="运单状态 :0:待运输,1:执行中,2:已结束,3:未下发,4:已下发,5:已接收,6:已拒绝,7:逻辑删除 8: 关闭  9:退货关闭",required=false)
+    @ApiModelProperty(value="运单状态 :0:待运输,1:执行中,2:已结束,3:未下发,4:已下发,5:已接收,6:已拒绝,7:逻辑删除 8: 关闭  9:退货关闭 10:不可作业",required=false)
     private BigDecimal orderStatus;
 
     /**
-     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     * 记录创建人(INSERT_USERNAME,VARCHAR,200)
      */
     @ApiModelProperty(value="记录创建人",required=false)
     private String insertUsername;
@@ -171,6 +171,12 @@ public class OmstruckOrder implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="操作人员组织",required=false)
     private String optionerCode;
 
+    /**
+     * 是否可作业(CAN_WORK,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否可作业",required=false)
+    private BigDecimal canWork;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -399,6 +405,14 @@ public class OmstruckOrder implements IBasePO<BigDecimal> {
         this.optionerCode = optionerCode == null ? null : optionerCode.trim();
     }
 
+    public BigDecimal getCanWork() {
+        return canWork;
+    }
+
+    public void setCanWork(BigDecimal canWork) {
+        this.canWork = canWork;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -432,6 +446,7 @@ public class OmstruckOrder implements IBasePO<BigDecimal> {
         sb.append(", orderPrintStatus=").append(orderPrintStatus);
         sb.append(", driverTel=").append(driverTel);
         sb.append(", optionerCode=").append(optionerCode);
+        sb.append(", canWork=").append(canWork);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 36 - 13
src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMapper.xml

@@ -29,13 +29,14 @@
         <result column="ORDER_PRINT_STATUS" jdbcType="DECIMAL" property="orderPrintStatus" />
         <result column="DRIVER_TEL" jdbcType="VARCHAR" property="driverTel" />
         <result column="OPTIONER_CODE" jdbcType="VARCHAR" property="optionerCode" />
+        <result column="CAN_WORK" jdbcType="DECIMAL" property="canWork" />
     </resultMap>
     <sql id="columns">
         ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
     ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION, ORDER_STATUS, INSERT_USERNAME,
     INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ORDER_TYPE,
     ORDER_LINE_SEQUENCE, LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID, DRIVER_CONFIRMATION,
-    PRICE_ID, CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL, OPTIONER_CODE
+    PRICE_ID, CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL, OPTIONER_CODE, CAN_WORK
     </sql>
     <sql id="columns_alias">
         t.ORDER_ID, t.ORDER_PLAN_ID, t.ORDER_NUMBER, t.CAPACITY_ID, t.ORDER_ISSUE_TIME, t.ORDER_RECEIVE_STATUS,
@@ -43,7 +44,7 @@
     t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
     t.ORDER_TYPE, t.ORDER_LINE_SEQUENCE, t.LINE_ID, t.ORDER_ENTRY_TIME, t.UNLOAD_POINT_ID,
     t.DRIVER_CONFIRMATION, t.PRICE_ID, t.CARRIER_ID, t.TRIP_ID, t.ORDER_PRINT_STATUS,
-    t.DRIVER_TEL, t.OPTIONER_CODE
+    t.DRIVER_TEL, t.OPTIONER_CODE, t.CAN_WORK
     </sql>
     <sql id="select">
         SELECT <include refid="columns" /> FROM OMSTRUCK_ORDER
@@ -134,6 +135,9 @@
             <if test="optionerCode != null and optionerCode != ''">
                 and OPTIONER_CODE = #{optionerCode}
             </if>
+            <if test="canWork != null">
+                and CAN_WORK = #{canWork}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -219,6 +223,9 @@
             <if test="optionerCode != null and optionerCode != ''">
                 and OPTIONER_CODE LIKE '%${optionerCode}%'
             </if>
+            <if test="canWork != null">
+                and CAN_WORK = #{canWork}
+            </if>
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
@@ -306,6 +313,9 @@
         <if test="optionerCode != null and optionerCode != ''">
             or OPTIONER_CODE = #{optionerCode}
         </if>
+        <if test="canWork != null">
+            or CAN_WORK = #{canWork}
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrder">
         insert into OMSTRUCK_ORDER (ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER,
@@ -317,7 +327,7 @@
                                     LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
                                     DRIVER_CONFIRMATION, PRICE_ID, CARRIER_ID,
                                     TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL,
-                                    OPTIONER_CODE)
+                                    OPTIONER_CODE, CAN_WORK)
         values (#{orderId,jdbcType=DECIMAL}, #{orderPlanId,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR},
                 #{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP}, #{orderReceiveStatus,jdbcType=DECIMAL},
                 #{orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{orderCommunicationDuration,jdbcType=DECIMAL},
@@ -327,7 +337,7 @@
                 #{lineId,jdbcType=DECIMAL}, #{orderEntryTime,jdbcType=TIMESTAMP}, #{unloadPointId,jdbcType=DECIMAL},
                 #{driverConfirmation,jdbcType=DECIMAL}, #{priceId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
                 #{tripId,jdbcType=VARCHAR}, #{orderPrintStatus,jdbcType=DECIMAL}, #{driverTel,jdbcType=VARCHAR},
-                #{optionerCode,jdbcType=VARCHAR})
+                #{optionerCode,jdbcType=VARCHAR}, #{canWork,jdbcType=DECIMAL})
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
         insert into OMSTRUCK_ORDER
@@ -413,6 +423,9 @@
             <if test="optionerCode != null">
                 OPTIONER_CODE,
             </if>
+            <if test="canWork != null">
+                CAN_WORK,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderId != null">
@@ -496,6 +509,9 @@
             <if test="optionerCode != null">
                 #{optionerCode,jdbcType=VARCHAR},
             </if>
+            <if test="canWork != null">
+                #{canWork,jdbcType=DECIMAL},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrder">
@@ -525,7 +541,8 @@
             TRIP_ID = #{tripId,jdbcType=VARCHAR},
             ORDER_PRINT_STATUS = #{orderPrintStatus,jdbcType=DECIMAL},
             DRIVER_TEL = #{driverTel,jdbcType=VARCHAR},
-            OPTIONER_CODE = #{optionerCode,jdbcType=VARCHAR}
+            OPTIONER_CODE = #{optionerCode,jdbcType=VARCHAR},
+            CAN_WORK = #{canWork,jdbcType=DECIMAL}
         where ORDER_ID = #{orderId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
@@ -609,6 +626,9 @@
             <if test="optionerCode != null">
                 OPTIONER_CODE = #{optionerCode,jdbcType=VARCHAR},
             </if>
+            <if test="canWork != null">
+                CAN_WORK = #{canWork,jdbcType=DECIMAL},
+            </if>
         </set>
         where ORDER_ID = #{orderId,jdbcType=DECIMAL}
     </update>
@@ -637,7 +657,8 @@
         LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
         DRIVER_CONFIRMATION, PRICE_ID,
         CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS,
-        DRIVER_TEL, OPTIONER_CODE)
+        DRIVER_TEL, OPTIONER_CODE, CAN_WORK
+        )
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.orderId,jdbcType=DECIMAL},
@@ -651,7 +672,8 @@
         #{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP}, #{item.unloadPointId,jdbcType=DECIMAL},
         #{item.driverConfirmation,jdbcType=DECIMAL}, #{item.priceId,jdbcType=DECIMAL},
         #{item.carrierId,jdbcType=DECIMAL}, #{item.tripId,jdbcType=VARCHAR}, #{item.orderPrintStatus,jdbcType=DECIMAL},
-        #{item.driverTel,jdbcType=VARCHAR}, #{item.optionerCode,jdbcType=VARCHAR} from dual
+        #{item.driverTel,jdbcType=VARCHAR}, #{item.optionerCode,jdbcType=VARCHAR}, #{item.canWork,jdbcType=DECIMAL}
+        from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
@@ -765,6 +787,10 @@
         <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
             when #{item.orderId,jdbcType=DECIMAL} then #{item.optionerCode,jdbcType=VARCHAR}
         </foreach>
+        ,CAN_WORK=
+        <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.canWork,jdbcType=DECIMAL}
+        </foreach>
         where ORDER_ID in
         <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
             #{item.orderId,jdbcType=DECIMAL}
@@ -1190,7 +1216,9 @@
         RS.SHIPPER_NAME "shipperName",
         RCO.CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
         RRA.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
-        ASOM.SALE_DATE_OF_RECEIPT "saleDateOfReceipt"
+        ASOM.SALE_DATE_OF_RECEIPT "saleDateOfReceipt",
+        OO.CAN_WORK "canWork",
+        OO.ORDER_STATUS "orderStatus"
         from OMSTRUCK_ORDER OO
         left join AMS_SALE_ORDER_MATERIAL ASOM
         on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
@@ -2010,10 +2038,6 @@
         LEFT JOIN RMS_MATERIAL RM
         ON RM.MATERIAL_ID = ASM.MATERIAL_ID
         <where>
-            <if test="orderStatus!=null">
-                AND OO.ORDER_STATUS = #{orderStatus}
-            </if>
-
             <if test="saleOrderId!=null">
                 AND ASO.SALE_ORDER_ID = #{saleOrderId}
             </if>
@@ -2021,7 +2045,6 @@
             <if test="numberPlate!=null">
                 AND RC.CAPACITY_NUMBER LIKE #{numberPlate}
             </if>
-
         </where>
         ) RRC
         <if test="con != null">