liyg 2 gadi atpakaļ
vecāks
revīzija
c85124a6b5

+ 13 - 0
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -159,6 +159,8 @@ public class AMScontroller {
     public Map<String, Object> productionStatusUpdate(@RequestBody(required = false) Map<String, Object> map) {
         return amsFeign.productionStatusUpdate(map);
     }
+
+
     @ApiOperation(value = "生产需求状态修改接口", notes = "生产需求状态修改接口")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
@@ -169,6 +171,15 @@ public class AMScontroller {
         return amsFeign.productionRequirementChange(map);
     }
 
+    @ApiOperation(value = "生产需求状态修改接口批量", notes = "生产需求状态修改接口批量")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
+    })
+    @PostMapping(value = "/productionRequirementChangeList")
+    public Map<String, Object> productionRequirementChangeList(@RequestBody(required = false) Map<String, Object> map) {
+        return amsFeign.productionRequirementChangeList(map);
+    }
+
 
     @ApiOperation(value = "展示生产需求详情")
     @ApiImplicitParams({
@@ -607,4 +618,6 @@ public class AMScontroller {
         return amsFeign.getproductionRequirementworkflowList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
 
     }
+
+
 }

+ 2 - 10
src/main/java/com/steerinfo/dil/controller/BackgroundProcessingController.java

@@ -33,14 +33,6 @@ public class BackgroundProcessingController extends BaseRESTfulController {
     @Autowired
     private BackgroundProcessingMapper backgroundProcessingMapper;
 
-    @Autowired
-    private BackgroundProcessingServiceImpl backgroundProcessingService;
-
-    @Autowired
-    private OmstruckOrderMapper omstruckOrderMapper;
-
-    @Autowired
-    private UniversalMapper universalMapper;
 
     @Resource
     SSOUtil ssoUtil;
@@ -54,9 +46,9 @@ public class BackgroundProcessingController extends BaseRESTfulController {
             Map<String, Object> userInfo = (Map<String, Object>) dataMap.get("user");
             // 根据用户名去查询该用户绑定的公司及下属公司
             List<Map<String, Object>> companyList = backgroundProcessingMapper.getCompanyList(loginName);
-            List<Map<String,Object>> currentCompanyList = backgroundProcessingMapper.getCurrentCompanyList(loginName);
+            //List<Map<String,Object>> currentCompanyList = backgroundProcessingMapper.getCurrentCompanyList(loginName);
             userInfo.put("dilCompanyList", companyList);
-            userInfo.put("currentCompanyList",currentCompanyList);
+            //userInfo.put("currentCompanyList",currentCompanyList);
             // 根据查询到的公司ID
             //System.out.println(userInfo);
             //// 获取机构

+ 28 - 0
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -639,4 +639,32 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> changeSaleTransOrder(@RequestBody(required = false) Map<String, Object> map) {
         return tmsFeign.changeSaleTransOrder(map);
     }
+
+
+    @ApiOperation(value = "查询司机运输汇总")
+    @PostMapping("/getDriverTotalResult")
+    public Map<String, Object> getDriverTotalResult(@RequestBody(required = false) Map<String, Object> map,
+                                                       Integer apiId,
+                                                       Integer pageNum,
+                                                       Integer pageSize) {
+        return tmsFeign.getDriverTotalResult(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
+    }
+
+
+
+    @ApiOperation(value = "查询车辆运输汇总")
+    @PostMapping("/getCapacityTotalResult")
+    public Map<String, Object> getCapacityTotalResult(@RequestBody(required = false) Map<String, Object> map,
+                                                       Integer apiId,
+                                                       Integer pageNum,
+                                                       Integer pageSize) {
+        return tmsFeign.getDriverTotalResult(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
+    }
+
+
+    @ApiOperation("生产物流-调度任务新增")
+    @PostMapping("/dispatchTask")
+    Map<String,Object> dispatchTask(@RequestBody Map<String,Object> map) {
+        return tmsFeign.dispatchTask(map);
+    }
 }

+ 2 - 0
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -95,6 +95,7 @@ public class UniversalController extends BaseRESTfulController {
     @ApiModelProperty(value = "边输边查作业点")
     @PostMapping("/getOperationPointByLike")
     public RESTfulResult getOperationPointByLike(@RequestBody(required = false) Map<String,Object> map) {
+        //System.out.println(map.get("id"));
         List<Map<String, Object>> list = universalMapper.getOperationPointByLike(map);
         return success(list);
     }
@@ -102,6 +103,7 @@ public class UniversalController extends BaseRESTfulController {
     @ApiModelProperty(value = "边输边查人员")
     @PostMapping("/getPersonnelByLike")
     public RESTfulResult getPersonnelByLike(@RequestBody(required = false) Map<String,Object> map) {
+        DataChange.getMonthStartEnd(map);
         List<Map<String, Object>> list = universalMapper.getPersonnelByLike(map);
         return success(list);
     }

+ 6 - 0
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -56,6 +56,10 @@ public interface AmsFeign {
     Map<String, Object> productionRequirementChange(Map<String, Object> map);
 
 
+    @PostMapping(value = "api/v1/ams/amstransrequirements/productionRequirementChangeList")
+    Map<String, Object> productionRequirementChangeList(@RequestBody Map<String, Object> map);
+
+
     @PostMapping(value = "api/v1/ams/amstransrequirements/purchaseRequirementUpdate")
     Map<String, Object> purchaseRequirementUpdate(Map<String, Object> map);
 
@@ -216,4 +220,6 @@ public interface AmsFeign {
                                                      @RequestParam  Integer pageNum,
                                                      @RequestParam  Integer pageSize);
 
+
+
 }

+ 16 - 0
src/main/java/com/steerinfo/dil/feign/TmsFeign.java

@@ -222,6 +222,22 @@ public interface TmsFeign {
     @PostMapping("api/v1/tms/omstransorders/changeSaleTransOrder")
     Map<String, Object> changeSaleTransOrder(Map<String, Object> map);
 
+
+    @PostMapping("api/v1/tms/omstransorders/getDriverTotalResult")
+    Map<String, Object> getDriverTotalResult(@RequestBody(required = false) Map<String, Object> map,
+                                             @RequestParam Integer apiId,
+                                             @RequestParam Integer pageNum,
+                                             @RequestParam Integer pageSize);
+
+    @PostMapping("api/v1/tms/omstransorders/getCapacityTotalResult")
+    Map<String, Object> getCapacityTotalResult(@RequestBody(required = false) Map<String, Object> map,
+                                             @RequestParam Integer apiId,
+                                             @RequestParam Integer pageNum,
+                                             @RequestParam Integer pageSize);
+
+    @PostMapping(value = "/api/v1/tms/omstransorders/dispatchTask")
+    Map<String, Object> dispatchTask(@RequestBody Map<String, Object> map);
+
 }
 
 

+ 23 - 0
src/main/java/com/steerinfo/dil/util/DataChange.java

@@ -3,6 +3,7 @@ package com.steerinfo.dil.util;
 import java.math.BigDecimal;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -266,4 +267,26 @@ public class DataChange {
         map.put("startDate", dayStartTime + " 00:00:00");
         map.put("endDate", dayEndTime + " 00:00:00");
     }
+
+    public static void getMonthStartEnd(Map<String,Object> map) {
+        //
+        Calendar cale = Calendar.getInstance();
+
+        // 获取当月第一天和最后一天
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        String firstDay, lastDay;
+        // 获取前月的第一天
+        cale.add(Calendar.MONTH, 0);
+        cale.set(Calendar.DAY_OF_MONTH, 1);
+        firstDay = format.format(cale.getTime());
+        // 获取前月的最后一天
+        cale = Calendar.getInstance();
+        cale.add(Calendar.MONTH, 1);
+        cale.set(Calendar.DAY_OF_MONTH, 0);
+        lastDay = format.format(cale.getTime());
+        System.out.println("本月第一天和最后一天分别是 : " + firstDay + " and " + lastDay);
+        map.put("firstDay",firstDay);
+        map.put("lastDay",lastDay);
+
+    }
 }

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

@@ -22,7 +22,8 @@
     <select id="getCompanyList" resultType="java.util.Map">
         SELECT distinct rc.company_id "companyId",
                rc.COMPANY_TYPE "companyType",
-               rc.DELETED "deleted" FROM RMS_COMPANY RC
+               rc.DELETED "deleted",
+               level "level" FROM RMS_COMPANY RC
         START WITH RC.COMPANY_ID IN (
         SELECT RPC.COMPANY_ID FROM RMS_PERSONNEL RP
         LEFT JOIN RMS_PERSONNEL_COMPANY RPC on RP.PERSONNEL_ID = RPC.PERSONNEL_ID

+ 42 - 3
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -123,6 +123,12 @@
             <if test="companyType!=null and companyType!=''">
                 AND RC.COMPANY_TYPE = #{companyType}
             </if>
+            <if test="companyId!=null and companyId!=''">
+                AND RC.COMPANY_ID = #{companyId}
+            </if>
+            <if test="carrierId!=null and carrierId!=''">
+                AND RC.COMPANY_ID = #{carrierId}
+            </if>
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE(RC.COMPANY_NAME, #{index})
             </if>
@@ -196,6 +202,15 @@
             <if test="remark!=null and remark!=''">
                 AND REGEXP_LIKE("remark", #{remark})
             </if>
+            <if test="materialTypeId!=null and materialTypeId!=''">
+                AND REGEXP_LIKE("materialTypeId", #{materialTypeId})
+            </if>
+           <if test="id!=null and id.size>0 and !(index!=null and index!='')">
+                AND "id" in
+                <foreach collection="id" item="item"  open="(" close=")" separator="," >
+                    #{item}
+                </foreach>
+            </if>
         </where>
         FETCH NEXT 10 ROWS ONLY
         )
@@ -280,11 +295,12 @@
         PERSONNEL_ID "personnelId",
         PERSONNEL_NAME "personnelName",
         PERSONNEL_POST "personnelPost",
+        PERSONNEL_PHONE "personnelPhone",
         PERSONNEL_ID "id",
         PERSONNEL_ID "value",
         PERSONNEL_NAME "label",
-        PERSONNEL_NAME "text"
-
+        PERSONNEL_NAME "text",
+        'personnelName' "prop"
         from RMS_PERSONNEL
         where DELETED = 0
         )
@@ -292,6 +308,9 @@
             <if test="personnelPost!=null and personnelPost!=''">
                 AND "personnelPost" = #{personnelPost}
             </if>
+            <if test="personnelId!=null and personnelId!=''">
+                AND REGEXP_LIKE("personnelId", #{personnelId})
+            </if>
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
@@ -322,7 +341,9 @@
             RCA .CAPACITY_ID "id",
             RCA .CAPACITY_ID "value",
             RCA .CAPACITY_NUMBER "label",
-            RCA .CAPACITY_NUMBER "text"
+            RCA .CAPACITY_NUMBER "text",
+            RCA.CAPACITY_NUMBER "capacityNumber",
+            'capacityNumber' "prop"
             FROM RMS_CAPACITY RCA
             LEFT JOIN RMS_CAPACITY_CARRIER RCC ON RCA .CAPACITY_ID = RCC .CAPACITY_ID
             LEFT JOIN RMS_COMPANY RC ON RC .COMPANY_ID = RCC .COMPANY_ID
@@ -340,6 +361,15 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE(RCA .CAPACITY_NUMBER, #{index})
             </if>
+            <if test="capacityId!=null and capacityId!=''">
+                AND REGEXP_LIKE(RCA .CAPACITY_ID, #{capacityId})
+            </if>
+            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
+                AND RCA .CAPACITY_ID in
+                <foreach collection="id" item="item"  open="(" close=")" separator="," >
+                    #{item}
+                </foreach>
+            </if>
             FETCH NEXT 10 ROWS ONLY
         )
         <if test="id!=null and id.size>0">
@@ -403,6 +433,9 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
+            <if test="transrangeId!=null and transrangeId!=''">
+                AND REGEXP_LIKE("transrangeId", #{transrangeId})
+            </if>
             <if test="id!=null and id.size>0 and !(index!=null and index!='')">
                 AND "id" in
                 <foreach collection="id" item="item"  open="(" close=")" separator="," >
@@ -457,6 +490,9 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE(RCT.CAPACITY_TYPE_NAME, #{index})
             </if>
+            <if test="capacityTypeId!=null and capacityTypeId!=''">
+                AND REGEXP_LIKE(RCT.CAPACITY_TYPE_ID, #{capacityTypeId})
+            </if>
         </where>
         GROUP BY RCT .CAPACITY_TYPE_ID,RCT.CAPACITY_TYPE_NAME,RCT .CAPACITY_MAX_LOAD
         FETCH NEXT 10 ROWS ONLY
@@ -515,6 +551,9 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label" || "points", #{index})
             </if>
+            <if test="lineId!=null and lineId!=''">
+                AND REGEXP_LIKE("lineId" , #{lineId})
+            </if>
             <if test="lineType!=null and lineType!=''">
                 AND REGEXP_LIKE("lineType" , #{lineType})
             </if>