luobang пре 2 година
родитељ
комит
4cf791c0cf

+ 14 - 2
src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java

@@ -646,7 +646,10 @@ public class StatisticalReportController extends BaseRESTfulController {
                                           String materialName,
                                           String specification,
                                           String remark,
-                                            String saler
+                                          String capacityNo,
+                                          String carrierName,
+                                          String consigneeName,
+                                          String saler
     ){
         DataChange.queryDataByDateTimeYestDay(startTime, endTime, map, sdfDateTime);//根据时间段查询数据
         if(carrierSsoId != null){
@@ -660,8 +663,17 @@ public class StatisticalReportController extends BaseRESTfulController {
         if (remark != null && !"".equals(remark) && !"null".equals(remark)) {
             map.put("remark","%" + remark + "%");
         }
+        if (capacityNo != null && !"".equals(capacityNo) && !"null".equals(capacityNo)) {
+            map.put("capacityNum","%" + capacityNo + "%");
+        }
+        if (carrierName != null && !"".equals(carrierName) && !"null".equals(carrierName)) {
+            map.put("carrierNames","%" + carrierName + "%");
+        }
+        if (consigneeName != null && !"".equals(consigneeName) && !"null".equals(consigneeName)) {
+            map.put("consigneeNames","%" + consigneeName + "%");
+        }
         if (saler != null && !"".equals(saler) && !"null".equals(saler)) {
-            map.put("saler",saler);
+            map.put("salers",saler);
         }
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getSaleSteelReport(map);

+ 0 - 9
src/main/java/com/steerinfo/dil/service/impl/StatisticalReportImpl.java

@@ -254,15 +254,6 @@ public class StatisticalReportImpl implements IStatisticalReportService {
     @Override
     public List<Map<String, Object>> getSaleSteelReport(Map<String, Object> mapValue) {
         List<Map<String, Object>> saleSteelReport = statisticalReportMapper.getSaleSteelReport(mapValue);
-        for (Map<String, Object> map : saleSteelReport) {
-            Object capacityNo = map.get("capacityNo");
-            if (capacityNo == null) {
-                map.put("isNull","true");
-            }
-            else {
-                map.put("isNull","false");
-            }
-        }
         return saleSteelReport;
     }
 }

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

@@ -26,7 +26,7 @@ piction:
 #feign设置
 openfeign:
   ColumnDataFeign:
-    url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
+    url: ${COLUMNDATAFEIGN_URL:172.16.33.161:8083}
   BmsShipFeign:
     url: ${BMSSHIPFEIGN_URL:172.16.33.166:8078}
   BmsTruckFeign:

+ 87 - 58
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -1857,16 +1857,20 @@
              SELECT distinct OO.ORDER_ID "orderId",
                     ASO.SALE_ORDER_ID "saleOrderId",
                     ASO.SALE_NUMBER "saleOrderNo",
+                    ASM.SALE_MATERIAL_ID "saleMaterialId",
+                    ASM.MATERIAL_NUMBER "materialNum",
                     RC.CONSIGNEE_COMPANY_NAME "consigneeName",
                     ASOM.SALE_ORDER_MATERIAL_ID "saleOrderMaterialId",
                     RS.SHIPPER_NAME "shipperName",
                     RCA.CAPACITY_NUMBER "capacityNo",
+                    NVL(OO.CAPACITY_ID,0)  "capacityIds",
                     OO.CAPACITY_ID "capacityId",
                     ASOM.SALE_ORDER_MATERIAL_TRUCK_NO "truckNo",
                     ASOM.SALE_ORDER_CONSIGNEE_TEL "consigneeTel",
                     OO.ORDER_LINE_SEQUENCE "lineSequence",
                     ASO.SALE_ORDER_ISSELF_MENTION "isSelfMention",
                     RSR.SALER_NAME "saler",
+                    RM.MATERIAL_ID  "materialId",
                     RM.MATERIAL_NAME || RM.MATERIAL_MODEL "materialName",
                     RM.MATERIAL_SPECIFICATION "materialSpe",
                     ASM.EAS_PRIMARY_ID "easPrimary",
@@ -1874,6 +1878,12 @@
                     OO.ORDER_NUMBER "orderNo",
                     RRA.ADDRESS_PROVINCE || RRA.ADDRESS_DISTRICT ||
                     RRA.ADDRESS_TOWN || RRP.ADDRESS_DELIVERY_ADDRESS AS "addressPlace",
+                    RRP.PLACE_ID "placeId",
+                    RRP.ADDRESS_DELIVERY_ADDRESS "place",
+                    RRA.ADDRESS_ID "shipperAddressId",
+                    RRA.ADDRESS_PROVINCE "addressProvince",
+                    RRA.ADDRESS_DISTRICT "addressDistrict",
+                    RRA.ADDRESS_TOWN "addressTown",
                     OO.ORDER_LINE_SEQUENCE "lineSqe",
                     OO.DRIVER_TEL "capacityTel",
                     TWR.RESULT_GROSS_WEIGHT "grossWeight",
@@ -1891,11 +1901,72 @@
                                                  1,'销售订单已上报',
                                                  2,'销售已提交',
                                                  4,'财务已审批') "saleOrderStatus",
-                    DECODE(OO.ORDER_STATUS, 4, '运单未接收',
-                                            5, '运单已接收',
-                                            2, '运单已完成',
-                                            6, '运单被拒绝',
-                                            null, '运单未派发') "orderStatus"
+                    DECODE(OO.ORDER_STATUS || NVL(OO.ORDER_LINE_SEQUENCE, 0),
+                                                                 40,
+                                                                    '运单未接收',
+                                                                 50,
+                                                                    '运单已接收',
+                                                                 25,
+                                                                    '运单已完成',
+                                                                 28,
+                                                                    '运单已完成',
+                                                                 211,
+                                                                    '运单已完成',
+                                                                 214,
+                                                                    '运单已完成',
+                                                                 217,
+                                                                    '运单已完成',
+                                                                 220,
+                                                                    '运单已完成',
+                                                                 223,
+                                                                    '运单已完成',
+                                                                 226,
+                                                                    '运单已完成',
+                                                                 229,
+                                                                    '运单已完成',
+                                                                 232,
+                                                                    '运单已完成',
+                                                                 60,
+                                                                    '运单被拒绝',
+                                                                 70,
+                                                                    '运单已关闭',
+                                                                 71,
+                                                                    '运单已关闭',
+                                                                 72,
+                                                                    '运单已关闭',
+                                                                 73,
+                                                                    '运单已关闭',
+                                                                 74,
+                                                                    '运单已关闭',
+                                                                 75,
+                                                                    '运单已关闭',
+                                                                 76,
+                                                                    '运单已关闭',
+                                                                 77,
+                                                                    '运单已关闭',
+                                                                 78,
+                                                                    '运单已关闭',
+                                                                 79,
+                                                                    '运单已关闭',
+                                                                 710,
+                                                                    '运单已关闭',
+                                                                 711,
+                                                                    '运单已关闭',
+                                                                 712,
+                                                                    '运单已关闭',
+                                                                 80,
+                                                                    '运单已关闭',
+                                                                 81,
+                                                                    '运单已关闭',
+                                                                 82,
+                                                                    '运单已关闭',
+                                                                 83,
+                                                                    '运单已关闭',
+                                                                 60,
+                                                                    '运单被拒绝',
+                                                                 0,
+                                                                    '运单未派发',
+                                                                    '运单作业中') "orderStatus"
                     FROM AMS_SALE_ORDER ASO
                     LEFT JOIN RMS_CONSIGNEE RC
                               ON RC.CONSIGNEE_ID = ASO.RECEIVE_ID
@@ -1954,62 +2025,20 @@
                     <if test="remark != null" >
                         and RCA.CAPACITY_NUMBER || RC.CONSIGNEE_COMPANY_NAME || R_CARRIER.CARRIER_ABBREVIATION || RM.MATERIAL_NAME || RM.MATERIAL_MODEL || RM.MATERIAL_SPECIFICATION LIKE #{remark}
                     </if>
-                    <if test="saler != null">
-                        and RSR.SALER_NAME = #{saler}
+                    <if test="salers != null">
+                        and RSR.SALER_NAME = #{salers}
+                    </if>
+                    <if test="capacityNum != null">
+                        and  RCA.CAPACITY_NUMBER like #{capacityNum}
+                    </if>
+                    <if test="consigneeNames != null">
+                        and RC.CONSIGNEE_COMPANY_NAME like #{consigneeNames}
+                    </if>
+                    <if test="carrierNames != null">
+                        and R_CARRIER.CARRIER_ABBREVIATION like #{carrierNames}
                     </if>
                     order by ASO.SALE_ORDER_ID DESC, OO.ORDER_ID  DESC
                      )
-                    <where>
-                        <if test="materialName != null">
-                            and
-                            <foreach collection="materialName" item="item" open="(" separator="or" close=")">
-                                "materialName" like '%${item}%'
-                            </foreach>
-                        </if>
-                        <if test="materialSpe != null">
-                            and
-                            <foreach collection="materialSpe" item="item" open="(" separator="or" close=")">
-                                "materialSpe" like '%${item}%'
-                            </foreach>
-                        </if>
-                        <if test="capacityNo != null">
-                            and
-                            <foreach collection="capacityNo" item="item" open="(" separator="or" close=")">
-                                "capacityNo" like '%${item}%'
-                            </foreach>
-                        </if>
-                        <if test="saler != null">
-                            and
-                            <foreach collection="saler" item="item" open="(" separator="or" close=")">
-                                "saler" like '%${item}%'
-                            </foreach>
-                        </if>
-                        <if test="consigneeName != null">
-                            and
-                            <foreach collection="consigneeName" item="item" open="(" separator="or" close=")">
-                                "consigneeName" like '%${item}%'
-                            </foreach>
-                        </if>
-                        <if test="carrierName != null">
-                            and
-                            <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
-                                "carrierName" like '%${item}%'
-                            </foreach>
-                        </if>
-                        <if test="orderStatus != null">
-                            and
-                            <foreach collection="orderStatus" item="item" open="(" separator="or" close=")">
-                                "orderStatus" like '%${item}%'
-                            </foreach>
-                        </if>
-                        <if test="saleOrderStatus != null">
-                            and
-                            <foreach collection="saleOrderStatus" item="item" open="(" separator="or" close=")">
-                                "saleOrderStatus" like '%${item}%'
-                            </foreach>
-                        </if>
-                    </where>
-
     </select>
 
 </mapper>