Ver Fonte

Merge branch 'master' of https://gitee.com/antai-wuliu/ANTAI-API

dengpan há 1 ano atrás
pai
commit
5da233ff03

+ 6 - 1
src/main/java/com/steerinfo/dil/config/SessionInterceptor.java

@@ -35,7 +35,12 @@ public class SessionInterceptor extends HandlerInterceptorAdapter {
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
         HandlerMethod hm = (HandlerMethod) handler;
         String requestUrl = "" + request.getRequestURL();
-        if(!requestUrl.contains("/api/v1/bp/bpLogin") && !requestUrl.contains("/api/v1/ams/dispatch") && !requestUrl.contains("/api/v1/uc/") && !requestUrl.contains("/api/v1/systemfiles/") && !requestUrl.contains("/api/v1/rms/insertPersonnel")
+        if(!requestUrl.contains("/api/v1/bp/bpLogin")
+                && !requestUrl.contains("/api/v1/ams/dispatch")
+                && !requestUrl.contains("/api/v1/report/updateOperateDaily")
+                && !requestUrl.contains("/api/v1/uc/")
+                && !requestUrl.contains("/api/v1/systemfiles/")
+                && !requestUrl.contains("/api/v1/rms/insertPersonnel")
                 && (request.getAttribute("userId")==null || request.getAttribute("userName")==null)){
             //无权访问
             response.setCharacterEncoding("UTF-8");

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

@@ -1036,4 +1036,31 @@ public class AMScontroller  extends BaseRESTfulController {
     public Map<String, Object> forcedModification(@RequestBody Map<String, Object> params) throws Exception {
         return amsFeign.forcedModification(params);
     }
+
+    @ApiOperation("新增绑定关系")
+    @PostMapping("/addAmsFixedBindRequirement")
+    public Map<String, Object> addAmsFixedBindRequirement(@RequestBody Map<String, Object> params) throws Exception {
+        return amsFeign.addAmsFixedBindRequirement(params);
+    }
+
+    @ApiOperation("请求撤回需求")
+    @PostMapping("/withdrawRequirement")
+    public Map<String, Object> withdrawRequirement(@RequestBody Map<String, Object> params) throws Exception {
+        return amsFeign.withdrawRequirement(params);
+    }
+
+    @ApiOperation(value = "展示生产需求详情-绑定")
+    @PostMapping(value = "/getProductionRequirementListBind")
+    Map<String, Object> getProductionRequirementListBind(@RequestBody(required = false) Map<String, Object> mapValue,
+                                                       Integer apiId,
+                                                       Integer pageNum,
+                                                       Integer pageSize) {
+        return amsFeign.getProductionRequirementListBind(mapValue == null ? new HashMap<>() : mapValue, apiId, pageNum, pageSize);
+    }
+
+    @ApiOperation("修改绑定需求")
+    @PostMapping("/updateBindRequirement")
+    public Map<String, Object> updateBindRequirement(@RequestBody Map<String, Object> params) throws Exception {
+        return amsFeign.updateBindRequirement(params);
+    }
 }

+ 6 - 0
src/main/java/com/steerinfo/dil/controller/ReportController.java

@@ -152,4 +152,10 @@ public class ReportController {
                                             Integer pageSize) {
         return reportFeign.staffAttendanceList(mapValue, apiId, pageNum, pageSize);
     }
+
+    @ApiOperation(value="日报表修改")
+    @PostMapping(value = "/updateOperateDaily")
+    Map<String, Object> updateOperateDaily() {
+        return reportFeign.updateOperateDaily();
+    }
 }

+ 52 - 5
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -11,6 +11,7 @@ import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ExcelToolUtils;
 import com.steerinfo.dil.util.Util;
 import com.steerinfo.framework.controller.RESTfulResult;
+import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -214,6 +215,20 @@ public class TMSController extends BaseRESTfulController {
         return tmsFeign.updCountResult(map);
     }
 
+    @ApiOperation(value="审批计时")
+    @PostMapping(value = "/approveTimeResult")
+    @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"计次"})
+    public Map<String, Object> approveTimeResult(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsFeign.approveTimeResult(map);
+    }
+
+    @ApiOperation(value="计时复报")
+    @PostMapping(value = "/resendTimeResult")
+    @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"计次"})
+    public Map<String, Object> resendTimeResult(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsFeign.resendTimeResult(map);
+    }
+
     @ApiOperation(value = "查询计时")
     @PostMapping("/tmstimingresultsList")
     public Map<String, Object> tmstimingresultsList(@RequestBody(required = false) Map<String, Object> map,
@@ -707,12 +722,38 @@ public class TMSController extends BaseRESTfulController {
             //校验行
             if(item.get("通知单号")==null || item.get("通知单号").equals("")
                     || item.get("车号")==null || item.get("车号").equals("")
-                    || item.get("卸车日期")==null || item.get("卸车日期").equals("")
-                    || item.get("皮重")==null || item.get("皮重").equals("")
-                    || item.get("毛重")==null || item.get("毛重").equals("")){
-                throw new Exception("单元格数据异常(通知单号/车号/卸车日期/净重),请检查模板或数据是否正确!");
+                    || item.get("卸车日期")==null || item.get("卸车日期").equals("")){
+                throw new Exception("单元格数据异常(通知单号/车号/卸车日期),请检查模板或数据是否正确!");
+            }
+            if(item.get("净重") == null || item.get("净重").equals("")){
+                //净重为空
+                if(item.get("毛重") != null && !item.get("毛重").equals("")
+                        && item.get("皮重") != null && !item.get("皮重").equals("")){
+                    item.put("净重", DataChange.dataToBigDecimal(item.get("毛重")).subtract(DataChange.dataToBigDecimal(item.get("皮重"))));
+                }else{
+                    throw new Exception("单元格数据异常(净重),请检查模板或数据是否正确!");
+                }
+            }
+
+            if(item.get("毛重") == null || item.get("毛重").equals("")){
+                //毛重为空
+                if(item.get("净重") != null && !item.get("净重").equals("")
+                        && item.get("皮重") != null && !item.get("皮重").equals("")){
+                    item.put("毛重", DataChange.dataToBigDecimal(item.get("净重")).add(DataChange.dataToBigDecimal(item.get("皮重"))));
+                }else{
+                    throw new Exception("单元格数据异常(毛重),请检查模板或数据是否正确!");
+                }
+            }
+
+            if(item.get("皮重") == null || item.get("皮重").equals("")){
+                //毛重为空
+                if(item.get("净重") != null && !item.get("净重").equals("")
+                        && item.get("毛重") != null && !item.get("毛重").equals("")){
+                    item.put("皮重", DataChange.dataToBigDecimal(item.get("毛重")).subtract(DataChange.dataToBigDecimal(item.get("净重"))));
+                }else{
+                    throw new Exception("单元格数据异常(皮重),请检查模板或数据是否正确!");
+                }
             }
-            item.put("净重", DataChange.dataToBigDecimal(item.get("毛重")).subtract(DataChange.dataToBigDecimal(item.get("皮重"))));
             //校验数据
 //            if(unloadTime == null){
 //                unloadTime = item.get("卸车日期").toString();
@@ -1089,4 +1130,10 @@ public class TMSController extends BaseRESTfulController {
                                                 Integer pageSize) {
         return tmsFeign.purchaseTrainsOrderList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
     }
+
+    @ApiOperation("吊装信息")
+    @PostMapping("/disposeHandling")
+    public Map<String,Object> disposeHandling(@RequestBody Map<String,Object> map) {
+        return tmsFeign.disposeHandling(map);
+    }
 }

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

@@ -317,6 +317,14 @@ public class UniversalController extends BaseRESTfulController {
         return success(requireMap);
     }
 
+
+    @ApiOperation("通知单边输边查")
+    @PostMapping("/getRequirementByLike")
+    public RESTfulResult getRequirementByLike(@RequestBody Map<String,Object> map) {
+        List<Map<String, Object>> list = universalMapper.getRequirementByLike(map);
+        return success(list);
+    }
+
     @ApiOperation("查询APP版本更新")
     @PostMapping("/getAppVersion")
     public RESTfulResult getAppVersion() {

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

@@ -375,4 +375,19 @@ public interface AmsFeign {
 
     @PostMapping(value = "api/v1/ams/amstransrequirements/forcedModification")
     Map<String, Object> forcedModification(Map<String, Object> params);
+
+    @PostMapping(value = "api/v1/ams/amsfixedbindrequirements/addAmsFixedBindRequirement")
+    Map<String, Object> addAmsFixedBindRequirement(@RequestBody Map<String, Object> params);
+
+    @PostMapping(value = "api/v1/ams/amstransrequirements/withdrawRequirement")
+    Map<String, Object> withdrawRequirement(@RequestBody Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/ams/amstransrequirements/getProductionRequirementListBind")
+    Map<String, Object> getProductionRequirementListBind(@RequestBody(required=false) Map<String,Object> mapValue,
+                                                       @RequestParam  Integer apiId,
+                                                       @RequestParam  Integer pageNum,
+                                                       @RequestParam  Integer pageSize);
+
+    @PostMapping(value = "api/v1/ams/amstransrequirements/updateBindRequirement")
+    Map<String, Object> updateBindRequirement(@RequestBody Map<String, Object> map);
 }

+ 5 - 0
src/main/java/com/steerinfo/dil/feign/ReportFeign.java

@@ -1,10 +1,12 @@
 package com.steerinfo.dil.feign;
 
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import java.math.BigDecimal;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -78,4 +80,7 @@ public interface ReportFeign {
                                             @RequestParam Integer apiId,
                                             @RequestParam  Integer pageNum,
                                             @RequestParam  Integer pageSize);
+
+    @PostMapping(value = "api/v1/report/reportDaily/updateOperateDaily")
+    Map<String, Object> updateOperateDaily();
 }

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

@@ -85,6 +85,12 @@ public interface TmsFeign {
     @PostMapping("api/v1/tms/tmstimingresults/updCountResult")
     Map<String, Object> updCountResult(Map<String, Object> map);
 
+    @PostMapping("api/v1/tms/tmstimingresults/approveTimeResult")
+    Map<String, Object> approveTimeResult(Map<String, Object> map);
+
+    @PostMapping("api/v1/tms/tmstimingresults/resendTimeResult")
+    Map<String, Object> resendTimeResult(Map<String, Object> map);
+
     @PostMapping("api/v1/tms/tmstimingresults/tmstimingresultsUpdate")
     Map<String, Object> tmstimingresultsUpdate(Map<String, Object> map);
 
@@ -393,6 +399,10 @@ public interface TmsFeign {
                                          @RequestParam Integer apiId,
                                          @RequestParam Integer pageNum,
                                          @RequestParam Integer pageSize);
+
+    @PostMapping("/api/v1/tms/tmsloadresults/disposeHandling")
+    Map<String, Object> disposeHandling(@RequestBody Map<String, Object> map);
+
 }
 
 

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

@@ -115,4 +115,5 @@ public interface UniversalMapper {
 
     List<Map<String, Object>> getQueueGridList(Map<String, Object> map);
 
+    List<Map<String, Object>> getRequirementByLike(Map<String, Object> map);
 }

+ 43 - 0
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -269,6 +269,7 @@
             MATERIAL_TYPE_NAME "label",
             MATERIAL_TYPE_NAME "text",
             REMARK "remark",
+            company_id "businessCompanyId",
             'operationsName' "prop"
             from RMS_MATERIAL_TYPE
             where MATERIAL_TYPE_ID in
@@ -551,6 +552,7 @@
         FROM
         RMS_CAPACITY RCA
         LEFT JOIN RMS_CAPACITY_TYPE RCT ON RCA.CAPACITY_TYPE_ID = RCT.CAPACITY_TYPE_ID
+        LEFT JOIN RMS_CAPACITY_TYPE RCT2 ON RCT2.CAPACITY_TYPE_ID = RCA.CAPACITY_TYPE_ID2
         left join oms_trans_order oto
         on RCA.capacity_id = oto.capacity_id
         and oto.deleted between 4 and 5
@@ -581,6 +583,9 @@
             <if test="capacityType != null and capacityType != '' ">
                 AND RCT.CAPACITY_TYPE_NAME = #{capacityType}
             </if>
+            <if test="capacityType2 != null and capacityType2 != '' ">
+                AND RCT2.CAPACITY_TYPE_NAME = #{capacityType2}
+            </if>
             <if test="capacityType == null">
                 AND RCT.CAPACITY_TYPE_NAME != '火车'
             </if>
@@ -1313,6 +1318,8 @@
             APC .TRANS_PLAN_ID "transPlanId",
             ARC .RECEIVING_POINT_ID "unloadPointId",
             APC .MATERIAL_ID "materialId",
+            RM .MATERIAL_NAME "materialName",
+            RM .MATERIAL_CODE "materialCode",
             #{item.卸车日期} "unloadTime",
             #{item.车号} "capacityId",
             #{item.通知单号} "requireNumber",
@@ -1332,6 +1339,7 @@
             LEFT JOIN  AMS_PLAN_CHILD APC ON APC.PLAN_CHILD_ID = OOC.PLAN_CHILD_ID
             LEFT JOIN AMS_REQUIREMENT_CHILD ARC ON ARC.REQUIREMENT_CHILD_ID = APC.REQUIREMENT_CHILD_ID
             LEFT JOIN AMS_TRANS_REQUIREMENT ATR ON ATR.TRANS_REQUIREMENT_ID = ARC.TRANS_REQUIREMENT_ID
+            LEFT JOIN RMS_MATERIAL RM ON RM .MATERIAL_ID = ARC .MATERIAL_ID
             <where>
                 OTO.DELETED != 1
                 AND 30 >= TO_NUMBER (to_date(#{item.卸车日期}, 'yyyymmdd') - TLR.LOAD_START_TIME)
@@ -2077,4 +2085,39 @@
         FROM TMS_QUEUE_GRID
         where DELETED = 0
     </select>
+    <select id="getRequirementByLike" resultType="java.util.Map">
+        SELECT * FROM (
+            SELECT
+            TRANS_REQUIREMENT_ID "id",
+            TRANS_REQUIREMENT_ID "value",
+            SERIAL_NUMBER "label",
+            SERIAL_NUMBER "text"
+            FROM
+            AMS_TRANS_REQUIREMENT
+            <where>
+                DELETED NOT IN (2,5)
+                <if test="index!=null and index!=''">
+                    AND REGEXP_LIKE(SERIAL_NUMBER, #{index})
+                </if>
+                <if test="businessScene!=null and businessScene!=''">
+                    AND REGEXP_LIKE(BUSINESS_SCENE, #{businessScene})
+                </if>
+            </where>
+            FETCH NEXT 10 ROWS ONLY
+        )
+        <if test="id!=null and id.size>0">
+            UNION
+            SELECT
+            TRANS_REQUIREMENT_ID "id",
+            TRANS_REQUIREMENT_ID "value",
+            SERIAL_NUMBER "label",
+            SERIAL_NUMBER "text"
+            FROM
+            AMS_TRANS_REQUIREMENT
+            WHERE TRANS_REQUIREMENT_ID IN
+            <foreach collection="id" item="item"  open="(" close=")" separator="," >
+                #{item}
+            </foreach>
+        </if>
+    </select>
 </mapper>