Forráskód Böngészése

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

dengpan 2 éve
szülő
commit
9d9dd2b984

+ 15 - 0
src/main/java/com/steerinfo/dil/controller/WMSController.java

@@ -164,6 +164,21 @@ public class WMSController extends BaseRESTfulController {
         return wmsFeign.getGridMaterialList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
     }
 
+    @ApiOperation(value = "查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping(value = "/getGridMaterialDailyReport")
+    public Map<String, Object> getGridMaterialDailyReport(@RequestBody(required = false) Map<String, Object> map, Integer apiId,
+                                                   Integer pageNum,
+                                                   Integer pageSize) {
+        return wmsFeign.getGridMaterialDailyReport(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
+    }
+
+
 
     @ApiOperation(value = "查询入库实绩")
     @ApiImplicitParams({

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

@@ -75,6 +75,12 @@ public interface WMSFeign {
                              @RequestParam Integer pageNum,
                              @RequestParam Integer pageSize);
 
+
+    @PostMapping("api/v1/wms/wmsgridmaterials/getGridMaterialDailyReport")
+    Map<String, Object> getGridMaterialDailyReport(@RequestBody(required = false) Map<String, Object> map, @RequestParam Integer apiId,
+                                            @RequestParam Integer pageNum,
+                                            @RequestParam Integer pageSize);
+
     @PostMapping("api/v1/wms/wmsinboundresults/getInboundList")
     Map<String, Object> getInboundList(@RequestBody(required = false) Map<String, Object> map, @RequestParam Integer apiId,
                                        @RequestParam Integer pageNum,

+ 36 - 21
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -138,16 +138,48 @@
             <if test="businessCompanyId!=null and businessCompanyId!=''">
                 AND RC.COMPANY_ID = #{businessCompanyId}
             </if>
+            <if test="supplierCompanyId!=null and supplierCompanyId!=''">
+                AND RC.COMPANY_ID = #{supplierCompanyId}
+            </if>
+            <if test="receiveCompanyId!=null and receiveCompanyId!=''">
+                AND RC.COMPANY_ID = #{receiveCompanyId}
+            </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>
-            <if test="!roleCodes.contains('admin') and dilCompanyList != null and dilCompanyList.size > 0">
-                AND RC.COMPANY_ID in
+            <if test="roleCodes.contains('shippingCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '发货单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('recevingCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '收货单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('carrierCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '承运单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('businessCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
                 <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
-                    #{item.companyId}
+                    <if test="companyType == '业务单位'">
+                        #{item.companyId}
+                    </if>
                 </foreach>
             </if>
         </where>
@@ -207,8 +239,6 @@
         select * from(
         select * from(
         select
-        MATERIAL_TYPE_ID "materialTypeId",
-        MATERIAL_TYPE_NAME "materialTypeName",
         MATERIAL_TYPE_ID "id",
         MATERIAL_TYPE_ID "value",
         MATERIAL_TYPE_NAME "label",
@@ -224,23 +254,12 @@
             <if test="remark!=null and remark!=''">
                 AND REGEXP_LIKE("remark", #{remark})
             </if>
-            <if test="materialTypeId!=null and materialTypeId!=''">
-                AND "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
         )
         <if test="id!=null and id.size>0">
         UNION
             select
-            MATERIAL_TYPE_ID "materialTypeId",
-            MATERIAL_TYPE_NAME "materialTypeName",
             MATERIAL_TYPE_ID "id",
             MATERIAL_TYPE_ID "value",
             MATERIAL_TYPE_NAME "label",
@@ -632,15 +651,13 @@
     <select id="getMaterialByLike" resultType="java.util.Map">
         select * from(
         select
-        RC.MATERIAL_ID "materialId",
-        RC.MATERIAL_NAME "materialName",
         RC.MATERIAL_ID "id",
         RC.MATERIAL_ID "value",
         RC.MATERIAL_NAME "label",
         RC.MATERIAL_NAME "text"
         from RMS_MATERIAL RC
-        where DELETED = 0
         <where>
+            DELETED = 0
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE(RC.MATERIAL_NAME, #{index})
             </if>
@@ -650,8 +667,6 @@
         <if test="id!=null and id.size>0">
         UNION
             select
-            RC.MATERIAL_ID "materialId",
-            RC.MATERIAL_NAME "materialName",
             RC.MATERIAL_ID "id",
             RC.MATERIAL_ID "value",
             RC.MATERIAL_NAME "label",