Pārlūkot izejas kodu

汽运单价修改

zouzhd 3 gadi atpakaļ
vecāks
revīzija
3a98270f86

+ 3 - 2
pom.xml

@@ -111,13 +111,14 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>AMS_SALE_ORDER</param><!--销售计划-->
+<!--                        <param>AMS_SALE_ORDER</param>&lt;!&ndash;销售计划&ndash;&gt;-->
 <!--                        <param>AMSTRUCK_INWARD_REQUIREMENT</param>&lt;!&ndash;销售计划物资中间表&ndash;&gt;-->
 <!--                        <param>AMSTRUCK_RAIL_DAYPLAN</param>&lt;!&ndash;销售计划物资中间表&ndash;&gt;-->
 <!--                        <param>AMS_CONTRACT_TRANSPORT_PRICE</param>&lt;!&ndash;销售订单&ndash;&gt;-->
 <!--                        <param>AMS_SALE_ORDER_MATERIAL</param>&lt;!&ndash;销售订单车序号表&ndash;&gt;-->
 <!--                        <param>AMS_SALE_TRUCKNO_MATERIAL</param>&lt;!&ndash;车序号物资中间表&ndash;&gt;-->
-                            <param>AMSTRUCK_INWARD_PLAN</param>
+                            <param>AMS_CONTRACT_TRANSPORT_PRICE</param>
+                            <param>TMSTRUCK_LOAD_RESULT</param>
                     </tables>
                 </configuration>
                 <executions>

+ 1 - 1
src/main/java/com/steerinfo/dil/controller/AmsSaleOrderController.java

@@ -16,7 +16,7 @@ import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
-import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
+//import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiModelProperty;

+ 20 - 5
src/main/java/com/steerinfo/dil/model/AmsContractTransportPrice.java

@@ -10,31 +10,31 @@ import java.util.Date;
 @ApiModel(value="运输单价")
 public class AmsContractTransportPrice implements IBasePO<BigDecimal> {
     /**
-     * 主键ID(PRICE_ID,DECIMAL,38)
+     * 主键ID(PRICE_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="主键ID",required=true)
     private BigDecimal priceId;
 
     /**
-     * 托运人ID(SHIPPER_ID,DECIMAL,38)
+     * 托运人ID(SHIPPER_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="托运人ID",required=false)
     private BigDecimal shipperId;
 
     /**
-     * 承运商ID(CARRIER_ID,DECIMAL,38)
+     * 承运商ID(CARRIER_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="承运商ID",required=false)
     private BigDecimal carrierId;
 
     /**
-     * 运输线路ID(LINE_ID,DECIMAL,38)
+     * 运输线路ID(LINE_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="运输线路ID",required=false)
     private BigDecimal lineId;
 
     /**
-     * 运力ID(CAPACITY_ID,DECIMAL,38)
+     * 运力ID(CAPACITY_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="运力ID",required=false)
     private BigDecimal capacityId;
@@ -111,6 +111,12 @@ public class AmsContractTransportPrice implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="类型:1为销售 2为内转 3为采购水运 4为采购汽运",required=false)
     private BigDecimal type;
 
+    /**
+     * 所属部门: 1:为物流运输部 2:为化产焦炭部(DEPARTMENT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="所属部门: 1:为物流运输部 2:为化产焦炭部",required=false)
+    private BigDecimal department;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -259,6 +265,14 @@ public class AmsContractTransportPrice implements IBasePO<BigDecimal> {
         this.type = type;
     }
 
+    public BigDecimal getDepartment() {
+        return department;
+    }
+
+    public void setDepartment(BigDecimal department) {
+        this.department = department;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -282,6 +296,7 @@ public class AmsContractTransportPrice implements IBasePO<BigDecimal> {
         sb.append(", deleted=").append(deleted);
         sb.append(", addressId=").append(addressId);
         sb.append(", type=").append(type);
+        sb.append(", department=").append(department);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 68 - 42
src/main/resources/com/steerinfo/dil/mapper/AmsContractTransportPriceMapper.xml

@@ -19,23 +19,24 @@
         <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
         <result column="ADDRESS_ID" jdbcType="DECIMAL" property="addressId" />
         <result column="TYPE" jdbcType="DECIMAL" property="type" />
+        <result column="DEPARTMENT" jdbcType="DECIMAL" property="department" />
     </resultMap>
     <sql id="columns">
-        PRICE_ID, SHIPPER_ID, CARRIER_ID, LINE_ID, CAPACITY_ID, MATERIAL_ID, PRICE_TON_KILOMETER,
-    PRICE_VALUE, PRICE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
-    INSERT_UPDATE_REMARK, DELETED, ADDRESS_ID, TYPE
+        PRICE_ID, SHIPPER_ID, CARRIER_ID, LINE_ID, CAPACITY_ID, MATERIAL_ID, PRICE_TON_KILOMETER, 
+    PRICE_VALUE, PRICE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+    INSERT_UPDATE_REMARK, DELETED, ADDRESS_ID, TYPE, DEPARTMENT
     </sql>
     <sql id="columns_alias">
-        t.PRICE_ID, t.SHIPPER_ID, t.CARRIER_ID, t.LINE_ID, t.CAPACITY_ID, t.MATERIAL_ID,
-    t.PRICE_TON_KILOMETER, t.PRICE_VALUE, t.PRICE_DATE, t.INSERT_USERNAME, t.INSERT_TIME,
-    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.ADDRESS_ID,
-    t.TYPE
+        t.PRICE_ID, t.SHIPPER_ID, t.CARRIER_ID, t.LINE_ID, t.CAPACITY_ID, t.MATERIAL_ID, 
+    t.PRICE_TON_KILOMETER, t.PRICE_VALUE, t.PRICE_DATE, t.INSERT_USERNAME, t.INSERT_TIME, 
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.ADDRESS_ID, 
+    t.TYPE, t.DEPARTMENT
     </sql>
     <sql id="select">
-        SELECT <include refid="columns"/> FROM AMS_CONTRACT_TRANSPORT_PRICE
+        SELECT <include refid="columns" /> FROM AMS_CONTRACT_TRANSPORT_PRICE
     </sql>
     <sql id="select_alias">
-        SELECT <include refid="columns_alias"/> FROM AMS_CONTRACT_TRANSPORT_PRICE t
+        SELECT <include refid="columns_alias" /> FROM AMS_CONTRACT_TRANSPORT_PRICE t
     </sql>
     <sql id="where">
         <where>
@@ -90,6 +91,9 @@
             <if test="type != null">
                 and TYPE = #{type}
             </if>
+            <if test="department != null">
+                and DEPARTMENT = #{department}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -145,9 +149,12 @@
             <if test="type != null">
                 and TYPE = #{type}
             </if>
+            <if test="department != null">
+                and DEPARTMENT = #{department}
+            </if>
         </where>
     </sql>
-    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
         delete from AMS_CONTRACT_TRANSPORT_PRICE
         where PRICE_ID = #{priceId,jdbcType=DECIMAL}
     </delete>
@@ -202,6 +209,9 @@
         <if test="type != null">
             or TYPE = #{type}
         </if>
+        <if test="department != null">
+            or DEPARTMENT = #{department}
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
         insert into AMS_CONTRACT_TRANSPORT_PRICE (PRICE_ID, SHIPPER_ID, CARRIER_ID,
@@ -209,13 +219,15 @@
                                                   PRICE_TON_KILOMETER, PRICE_VALUE, PRICE_DATE,
                                                   INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
                                                   UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
-                                                  ADDRESS_ID, TYPE)
+                                                  ADDRESS_ID, TYPE, DEPARTMENT
+        )
         values (#{priceId,jdbcType=DECIMAL}, #{shipperId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
                 #{lineId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL}, #{materialId,jdbcType=CHAR},
                 #{priceTonKilometer,jdbcType=DECIMAL}, #{priceValue,jdbcType=DECIMAL}, #{priceDate,jdbcType=TIMESTAMP},
                 #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
                 #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
-                #{addressId,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL})
+                #{addressId,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL}, #{department,jdbcType=DECIMAL}
+               )
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
         insert into AMS_CONTRACT_TRANSPORT_PRICE
@@ -271,6 +283,9 @@
             <if test="type != null">
                 TYPE,
             </if>
+            <if test="department != null">
+                DEPARTMENT,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="priceId != null">
@@ -324,6 +339,9 @@
             <if test="type != null">
                 #{type,jdbcType=DECIMAL},
             </if>
+            <if test="department != null">
+                #{department,jdbcType=DECIMAL},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
@@ -343,7 +361,8 @@
             INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
             DELETED = #{deleted,jdbcType=DECIMAL},
             ADDRESS_ID = #{addressId,jdbcType=DECIMAL},
-            TYPE = #{type,jdbcType=DECIMAL}
+            TYPE = #{type,jdbcType=DECIMAL},
+            DEPARTMENT = #{department,jdbcType=DECIMAL}
         where PRICE_ID = #{priceId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
@@ -397,20 +416,23 @@
             <if test="type != null">
                 TYPE = #{type,jdbcType=DECIMAL},
             </if>
+            <if test="department != null">
+                DEPARTMENT = #{department,jdbcType=DECIMAL},
+            </if>
         </set>
         where PRICE_ID = #{priceId,jdbcType=DECIMAL}
     </update>
-    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-        <include refid="select"/>
+    <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+        <include refid="select" />
         where PRICE_ID = #{priceId,jdbcType=DECIMAL}
     </select>
     <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="where"/>
+        <include refid="select" />
+        <include refid="where" />
     </select>
     <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="whereLike"/>
+        <include refid="select" />
+        <include refid="whereLike" />
     </select>
     <insert id="batchInsert" parameterType="java.util.List">
         insert into AMS_CONTRACT_TRANSPORT_PRICE
@@ -420,8 +442,8 @@
         PRICE_VALUE, PRICE_DATE, INSERT_USERNAME,
         INSERT_TIME, UPDATE_USERNAME,
         UPDATE_TIME, INSERT_UPDATE_REMARK,
-        DELETED, ADDRESS_ID, TYPE
-        )
+        DELETED, ADDRESS_ID, TYPE,
+        DEPARTMENT)
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.priceId,jdbcType=DECIMAL},
@@ -430,90 +452,94 @@
         #{item.priceValue,jdbcType=DECIMAL}, #{item.priceDate,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
         #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
         #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
-        #{item.deleted,jdbcType=DECIMAL}, #{item.addressId,jdbcType=DECIMAL}, #{item.type,jdbcType=DECIMAL}
-        from dual
+        #{item.deleted,jdbcType=DECIMAL}, #{item.addressId,jdbcType=DECIMAL}, #{item.type,jdbcType=DECIMAL},
+        #{item.department,jdbcType=DECIMAL} from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
         update AMS_CONTRACT_TRANSPORT_PRICE
         set
         PRICE_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
         </foreach>
         ,SHIPPER_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.shipperId,jdbcType=DECIMAL}
         </foreach>
         ,CARRIER_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
         </foreach>
         ,LINE_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
         </foreach>
         ,CAPACITY_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
         </foreach>
         ,MATERIAL_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=CHAR}
         </foreach>
         ,PRICE_TON_KILOMETER=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.priceTonKilometer,jdbcType=DECIMAL}
         </foreach>
         ,PRICE_VALUE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.priceValue,jdbcType=DECIMAL}
         </foreach>
         ,PRICE_DATE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.priceDate,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
         </foreach>
         ,UPDATE_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
         </foreach>
         ,UPDATE_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_UPDATE_REMARK=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
         </foreach>
         ,DELETED=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
         </foreach>
         ,ADDRESS_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.addressId,jdbcType=DECIMAL}
         </foreach>
         ,TYPE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
             when #{item.priceId,jdbcType=DECIMAL} then #{item.type,jdbcType=DECIMAL}
         </foreach>
+        ,DEPARTMENT=
+        <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
+            when #{item.priceId,jdbcType=DECIMAL} then #{item.department,jdbcType=DECIMAL}
+        </foreach>
         where PRICE_ID in
-        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
             #{item.priceId,jdbcType=DECIMAL}
         </foreach>
     </update>
     <delete id="batchDelete" parameterType="java.util.List">
         delete from AMS_CONTRACT_TRANSPORT_PRICE
         where PRICE_ID in
-        <foreach collection="list" item="id" open="(" close=")" separator=",">
+        <foreach close=")" collection="list" item="id" open="(" separator=",">
             #{id}
         </foreach>
     </delete>

+ 20 - 1
src/main/resources/com/steerinfo/dil/mapper/AmsContractTruckPriceMapper.xml

@@ -531,7 +531,9 @@
     r_r_address.ADDRESS_DISTRICT "addressDistrict",
     r_r_address.ADDRESS_TOWN "addressTown",
     r_r_address.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
+    r_carrier.CARRIER_NAME "carrierName",
     r_line.LINE_PATH_LENGTH "linePathLength",
+    r_c_type.CAPACITY_TYPE_NAME "capacityTypeName",
     a_t_price.PRICE_VALUE "priceValue",
     a_t_price.PRICE_TON_KILOMETER "priceTonKilometer",
     a_t_price.PRICE_DATE "priceDate",
@@ -539,10 +541,15 @@
     from AMS_CONTRACT_TRANSPORT_PRICE a_t_price
     left join RMS_RECEIVE_ADDRESS r_r_address
     on a_t_price.ADDRESS_ID=r_r_address.ADDRESS_ID
+    left join RMS_CAPACITY_TYPE r_c_type
+    on a_t_price.CAPACITY_TYPE_ID=r_c_type.CAPACITY_TYPE_ID
+    left join RMS_CARRIER r_carrier
+    on a_t_price.CARRIER_ID=r_carrier.CARRIER_ID
     left join RMS_LINE r_line
     on a_t_price.LINE_ID=r_line.LINE_ID
     where a_t_price.DELETED = 0
-        and a_t_price.TYPE = 1)
+    and a_t_price.TYPE = 1 and a_t_price.DEPARTMENT = 2)
+
     <where>
       <if test="addressProvince != null">
         and
@@ -575,6 +582,18 @@
         </foreach>
       </if>
 
+      <if test="carrierName != null">
+        and
+        <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+          "carrierName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="capacityTypeName != null">
+        and
+        <foreach collection="capacityTypeName" item="item" open="(" separator="or" close=")">
+          "capacityTypeName" like '%${item}%'
+        </foreach>
+      </if>
       <if test="priceValue != null">
         and
         <foreach collection="priceValue" item="item" open="(" separator="or" close=")">