Переглянути джерело

Merge remote-tracking branch 'origin/master'

zyf 2 роки тому
батько
коміт
564ad8067c

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

@@ -62,10 +62,14 @@ public class AmsContractTruckPriceController extends BaseRESTfulController {
                                                       Integer apiId,
                                                       Integer pageNum,
                                                       Integer pageSize,
+                                                      String con,
                                                       Integer deleted){
         if(deleted != null) {
             mapValue.put("deleted", deleted);
         }
+        if(con !=null){
+            mapValue.put("con",con);
+        }
         PageHelper.startPage(pageNum,pageSize);
         List<Map<String, Object>> amsContractTransportPrice1 = amsContractTruckPriceService.getAmsContractTransportPrice(mapValue);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,amsContractTransportPrice1);
@@ -81,10 +85,14 @@ public class AmsContractTruckPriceController extends BaseRESTfulController {
                                                       Integer apiId,
                                                       Integer pageNum,
                                                       Integer pageSize,
-                                                      Integer deleted){
+                                                      Integer deleted,
+                                                      String con){
         if(deleted != null) {
             mapValue.put("deleted", deleted);
         }
+        if (con != null && !con.equals("undefined")) {
+            mapValue.put("con","%" + con + "%");
+        }
         PageHelper.startPage(pageNum,pageSize);
         List<Map<String, Object>> amsContractTransportPrice1 = amsContractTruckPriceService.getInwardContractPrice(mapValue);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,amsContractTransportPrice1);
@@ -387,4 +395,11 @@ public class AmsContractTruckPriceController extends BaseRESTfulController {
         return b;
 
     }
+
+    @ApiOperation(value="修改内转汽运单价")
+    @PostMapping("/updateTransPrice")
+    public RESTfulResult updateTransPrice(@RequestBody(required=false) Map<String,Object> map){
+        int i = amsContractTruckPriceService.updatePriceByPriceId(map);
+        return success(i);
+    }
 }

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

@@ -491,7 +491,7 @@ public class AmsSaleOrderController extends BaseRESTfulController {
             mapValue.put("con",con);
         }
         if (saler != null && !"".equals(saler) && !"null".equals(saler)){
-            mapValue.put("saler",saler);
+            mapValue.put("saler","%" + saler + "%");
         }
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum,pageSize);
@@ -555,7 +555,7 @@ public class AmsSaleOrderController extends BaseRESTfulController {
             mapValue.put("con",con);
         }
         if (saler != null && !"".equals(saler) && !"null".equals(saler)) {
-            mapValue.put("saler",saler);
+            mapValue.put("saler","%" + saler + "%");
         }
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum,pageSize);
@@ -593,7 +593,7 @@ public class AmsSaleOrderController extends BaseRESTfulController {
             mapValue.put("consigneeSsoId",consigneeSsoId);
         }
         if (saler != null && !"".equals(saler) && !"null".equals(saler)) {
-            mapValue.put("saler",saler);
+            mapValue.put("saler","%" + saler + "%");
         }
         mapValue.put("saleType",saleType);
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据

+ 1 - 1
src/main/java/com/steerinfo/dil/mapper/AmsContaactPriceMaterialMapper.java

@@ -10,7 +10,7 @@ import java.util.Map;
 
 @Mapper
 public interface AmsContaactPriceMaterialMapper extends IBaseMapper<AmsContaactPriceMaterial, BigDecimal> {
-    List<Map<String, Object>> getMaterialName(BigDecimal priceId);
+    List<Map<String, Object>> getMaterialName(Map<String,Object> map);
 
 
 }

+ 1 - 0
src/main/java/com/steerinfo/dil/mapper/AmsContractTruckPriceMapper.java

@@ -61,4 +61,5 @@ public interface AmsContractTruckPriceMapper extends IBaseMapper<AmsContractTran
 
     List<Map<String, Object>> getRangePoint(Map<String, Object> mapValue);
 
+    int updatePriceByPriceId(Map<String, Object> map);
 }

+ 1 - 0
src/main/java/com/steerinfo/dil/service/IAmsContractTruckPriceService.java

@@ -62,4 +62,5 @@ public interface IAmsContractTruckPriceService {
 
     int updatePriceById(Map<String, Object> map);
 
+    int updatePriceByPriceId(Map<String, Object> map);
 }

+ 7 - 2
src/main/java/com/steerinfo/dil/service/impl/AmsContractTruckPriceServiceImpl.java

@@ -604,7 +604,7 @@ public class AmsContractTruckPriceServiceImpl implements IAmsContractTruckPriceS
         List<Map<String,Object>>mapList =  amsContractTruckPriceMapper.getInwardContractPrice(mapValue);
         for (Map<String,Object>map:mapList
              ) {
-            List<Map<String,Object>> materialList = amsContaactPriceMaterialMapper.getMaterialName(DataChange.dataToBigDecimal(map.get("priceId")));
+            List<Map<String,Object>> materialList = amsContaactPriceMaterialMapper.getMaterialName(map);
             String materialNames = "";
             int i = 1;
             for (Map<String,Object>materialMap:materialList
@@ -625,7 +625,6 @@ public class AmsContractTruckPriceServiceImpl implements IAmsContractTruckPriceS
             }else if(((BigDecimal)map.get("type")).intValue() == 6){
                 map.put("type","元/趟");
             }
-
         }
         return mapList;
     }
@@ -667,4 +666,10 @@ public class AmsContractTruckPriceServiceImpl implements IAmsContractTruckPriceS
         }
         return count;
     }
+
+    @Override
+    public int updatePriceByPriceId(Map<String, Object> map){
+        int i = amsContractTruckPriceMapper.updatePriceByPriceId(map);
+        return i;
+    }
 }

+ 1 - 1
src/main/resources/application-prod.yml

@@ -13,7 +13,7 @@ openfeign:
    ESFeign:
      url: ${ESFEIGN_URL:172.16.33.166:8089}
    ColumnDataFeign:
-     url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
+     url: ${COLUMNDATAFEIGN_URL:172.16.33.161:8083}
    TmsTruckFeign:
       url: ${TMSTRUCKFEIGN_URL:172.16.33.166:8088}
    ImFeign:

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

@@ -176,6 +176,77 @@
       </if>
     </where>
   </sql>
+  <sql id="whereLikeForeach">
+    <where>
+      <if test="priceId != null">
+        <foreach collection="priceId" item="item" open="(" separator="or" close=")">
+          "priceId" = '${item}'
+        </foreach>
+      </if>
+      <if test="oilTypeName != null">
+        and
+        <foreach collection="oilTypeName" item="item" open="(" separator="or" close=")">
+          "oilTypeName" = '${item}'
+        </foreach>
+      </if>
+      <if test="capacityTypeName != null">
+        and
+        <foreach collection="capacityTypeName" item="item" open="(" separator="or" close=")">
+          "capacityTypeName" = '${item}'
+        </foreach>
+      </if>
+      <if test="priceValue != null">
+        and
+        <foreach collection="priceValue" item="item" open="(" separator="or" close=")">
+          "priceValue" = '${item}'
+        </foreach>
+      </if>
+      <if test="priceDate != null">
+        and
+        <foreach collection="priceDate" item="item" open="(" separator="or" close=")">
+          TO_CHAR("priceDate",'yyyy-mm-dd hh24:mi:ss') = '${item}'
+        </foreach>
+      </if>
+      <if test="oilpriceBase != null">
+        and
+        <foreach collection="oilpriceBase" item="item" open="(" separator="or" close=")">
+          "oilpriceBase" = '${item}'
+        </foreach>
+      </if>
+      <if test="insertTime != null">
+        and
+        <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
+          TO_CHAR("insertTime",'yyyy-mm-dd hh24:mi:ss') = '${item}'
+        </foreach>
+      </if>
+      <if test="oilpriceChangeThreshold != null">
+        and
+        <foreach collection="oilpriceChangeThreshold" item="item" open="(" separator="or" close=")">
+          "oilpriceChangeThreshold" = '${item}'
+        </foreach>
+      </if>
+      <if test="transRange != null">
+        and
+        <foreach collection="transRange" item="item" open="(" separator="or" close=")">
+          "transRange" = '${item}'
+        </foreach>
+      </if>
+      <if test="type != null">
+        and
+        <foreach collection="type" item="item" open="(" separator="or" close=")">
+          <if test="item=='元/吨'">
+            "type" = '2'
+          </if>
+          <if test="item=='元/小时'">
+            "type" = '5'
+          </if>
+          <if test="item=='元/趟'">
+            "type" = '6'
+          </if>
+        </foreach>
+      </if>
+    </where>
+  </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
     delete from AMS_CONTRACT_TRANSPORT_PRICE
     where PRICE_ID = #{priceId,jdbcType=DECIMAL}
@@ -662,6 +733,12 @@
         <if test="deleted != null">
           and a_t_price.DELETED = #{deleted}
         </if>
+        <if test="con !=null and con != ''.toString()">
+          and
+          r_r_address.ADDRESS_PROVINCE || r_r_address.ADDRESS_DISTRICT  || r_r_address.ADDRESS_TOWN
+          || rrp.ADDRESS_DELIVERY_ADDRESS ||  r_carrier.CARRIER_NAME || r_c_type.CAPACITY_TYPE_NAME
+          like CONCAT('%',CONCAT(#{con},'%'))
+        </if>
     </where>
         )
 
@@ -920,7 +997,12 @@
         where TYPE in (2,5,6)
         <if test="deleted != null">
           and a_t_price.DELETED = #{deleted}
-        </if> )
+        </if>
+        <if test="con != null" >
+          and RGR.TRANS_RANGE_VALUE LIKE #{con}
+        </if>)
+        <include refid="whereLikeForeach"/>
+        <include refid="orderBy"></include>
   </select>
     <select id="selectInwardPrice" resultType="java.util.LinkedHashMap" parameterType="java.util.Map">
       select * from (select
@@ -981,4 +1063,8 @@
           </if>
         </where>
     </select>
+
+  <update id="updatePriceByPriceId" parameterType="java.util.Map">
+    update AMS_CONTRACT_TRANSPORT_PRICE set PRICE_VALUE=#{priceValue} where PRICE_ID=#{priceId}
+  </update>
 </mapper>

+ 5 - 5
src/main/resources/com/steerinfo/dil/mapper/AmsSaleOrderMapper.xml

@@ -1549,8 +1549,8 @@
     <if test="consigneeSsoId != null" >
       and r_consignee.CONSIGNEE_SSO_ID = #{consigneeSsoId}
     </if>
-    <if test="saler != null" >
-      and  R_SALER.SALER_NAME = #{saler}
+    <if test="saler != null " >
+        and  R_SALER.INSERT_UPDATE_REMARK like  #{saler}
     </if>
     <if test="oneDate != null">
       and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= a_s_order.UPDATE_TIME
@@ -1678,7 +1678,7 @@
       and r_consignee.CONSIGNEE_SSO_ID = #{consigneeSsoId}
     </if>
     <if test="saler != null" >
-      and  R_SALER.SALER_NAME = #{saler}
+      and  R_SALER.INSERT_UPDATE_REMARK like  #{saler}
     </if>
         )
     <where>
@@ -1981,7 +1981,7 @@
       and a_s_order.SALE_TYPE is null
     </if>
     <if test="saler != null" >
-      and  R_SALER.SALER_NAME = #{saler}
+      and  R_SALER.INSERT_UPDATE_REMARK like  #{saler}
     </if>
     <if test="consigneeSsoId != null">
       and r_consignee.CONSIGNEE_SSO_ID = #{consigneeSsoId}
@@ -4544,7 +4544,7 @@
         FROM RMS_CONSIGNEE RC
         WHERE RC.CONSIGNEE_ID = #{receiveId}
   </select>
-  <select id="selectSaleAreaIdByName" resultType="java.math.BigDecimal" parameterType="decimal">
+  <select id="selectSaleAreaIdByName" resultType="java.math.BigDecimal" parameterType="string">
         SELECT RSA.AREA_ID FROM RMS_SALE_AREA RSA
         WHERE RSA.AREA_NAME = #{saleAreaName}
   </select>

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

@@ -981,7 +981,7 @@
         rm.material_name || rm.material_specification || '(' || rm.material_model || ')' "materialName",
         AIR.INSERT_UPDATE_REMARK "Tel"
         FROM
-        ( SELECT AIR2.REQUIREMENT_ID,,AIR2.capacity_type_id FROM AMSTRUCK_INWARD_REQUIREMENT AIR2 LEFT JOIN AMSTRUCK_REQUIREMENT_PLAN ARP ON AIR2.REQUIREMENT_ID = ARP.REQUIREMENT_ID WHERE ARP.PLAN_ID IS NULL ) AIRP
+        ( SELECT AIR2.REQUIREMENT_ID,AIR2.capacity_type_id FROM AMSTRUCK_INWARD_REQUIREMENT AIR2 LEFT JOIN AMSTRUCK_REQUIREMENT_PLAN ARP ON AIR2.REQUIREMENT_ID = ARP.REQUIREMENT_ID WHERE ARP.PLAN_ID IS NULL ) AIRP
         LEFT JOIN AMSTRUCK_INWARD_REQUIREMENT AIR ON AIR.REQUIREMENT_ID = AIRP.REQUIREMENT_ID
         LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = AIR.REQUIREMENT_SHIPPER_ID
         LEFT JOIN amstruck_requirement_material arm ON air.requirement_id = arm.requirement_id