Parcourir la source

20230404 21:46

wangzhuo il y a 2 ans
Parent
commit
83313b22e3

+ 9 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/controller/plugin/ForeignApiController.java

@@ -53,7 +53,9 @@ public class ForeignApiController extends BaseController {
      * @return 结果
      */
     @PostMapping("/queryGoodsAccountByPageV1")
-    public Map<String, Object> queryGoodsAccountByPageV1(@RequestParam(value = "warehouseCode") String warehouseCode,
+    public Map<String, Object> queryGoodsAccountByPageV1(@RequestParam(value = "warehouseCode",required = false) String warehouseCode,
+                                                         @RequestParam(value = "ownerSocialIdentifier",required = false) String ownerSocialIdentifier,
+                                                         @RequestParam(value = "ownerCode",required = false) String ownerCode,
                                                          @RequestParam(value = "ownerName",required = false) String ownerName,
                                                          @RequestParam(value = "goodsName",required = false) String goodsName,
                                                          @RequestParam(value = "specifications",required = false) String specifications,
@@ -62,12 +64,12 @@ public class ForeignApiController extends BaseController {
                                                          @RequestParam(value = "level",required = false) String level,
                                                          @RequestParam(value = "pageNo",required = false) Integer pageNo,
                                                          @RequestParam(value = "pageSize",required = false) Integer pageSize) {
-        List<Map<String, Object>> listSize = foreignHttpService.queryGoodsAccountByPageV1(warehouseCode, ownerName, goodsName, specifications,
+        List<Map<String, Object>> listSize = foreignHttpService.queryGoodsAccountByPageV1(warehouseCode,ownerSocialIdentifier,ownerCode, ownerName, goodsName, specifications,
                 producing, materialQuality, level, pageNo, pageSize);
 
         WMSStartPage(pageNo, pageSize);
 
-        List<Map<String, Object>> list = foreignHttpService.queryGoodsAccountByPageV1(warehouseCode, ownerName, goodsName, specifications,
+        List<Map<String, Object>> list = foreignHttpService.queryGoodsAccountByPageV1(warehouseCode,ownerSocialIdentifier,ownerCode, ownerName, goodsName, specifications,
                 producing, materialQuality, level, pageNo, pageSize);
 
         TableDataInfo tableDataInfo = getDataTable(list);
@@ -93,9 +95,10 @@ public class ForeignApiController extends BaseController {
      * @return 结果
      */
     @PostMapping("/queryGoodsAccountDetailByPageV1")
-    public Map<String, Object> queryGoodsAccountByPageV1(@RequestParam(value = "warehouseCode") String warehouseCode,
+    public Map<String, Object> queryGoodsAccountByPageV1(@RequestParam(value = "warehouseCode",required = false) String warehouseCode,
                                                          @RequestParam(value = "ownerName",required = false) String ownerName,
                                                          @RequestParam(value = "ownerCode",required = false) String ownerCode,
+                                                         @RequestParam(value = "ownerSocialIdentifier",required = false) String ownerSocialIdentifier,
                                                          @RequestParam(value = "goodsName",required = false) String goodsName,
                                                          @RequestParam(value = "specifications",required = false) String specifications,
                                                          @RequestParam(value = "producing",required = false) String producing,
@@ -110,12 +113,12 @@ public class ForeignApiController extends BaseController {
                                                          @RequestParam(value = "pageNo") Integer pageNo,
                                                          @RequestParam(value = "pageSize") Integer pageSize) {
 
-        List<Map<String, Object>> listSize = foreignHttpService.queryGoodsAccountDetailByPageV1(warehouseCode, ownerName, ownerCode, goodsName, specifications,
+        List<Map<String, Object>> listSize = foreignHttpService.queryGoodsAccountDetailByPageV1(warehouseCode, ownerName, ownerCode, ownerSocialIdentifier, goodsName, specifications,
                 producing, materialQuality, level, receiptDoc, billOfLading, areaName, areaCode, slotName, slotCode, pageNo, pageSize);
 
         WMSStartPage(pageNo, pageSize);
 
-        List<Map<String, Object>> list = foreignHttpService.queryGoodsAccountDetailByPageV1(warehouseCode, ownerName, ownerCode, goodsName, specifications,
+        List<Map<String, Object>> list = foreignHttpService.queryGoodsAccountDetailByPageV1(warehouseCode, ownerName, ownerCode, ownerSocialIdentifier, goodsName, specifications,
                 producing, materialQuality, level, receiptDoc, billOfLading, areaName, areaCode, slotName, slotCode, pageNo, pageSize);
 
         TableDataInfo tableDataInfo = getDataTable(list);

+ 3 - 2
ruoyi-plugin/src/main/java/com/ruoyi/ccb/service/ForeignHttpService.java

@@ -6,6 +6,7 @@ import com.ruoyi.ccb.domain.*;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 import com.ruoyi.warehouseBusiness.request.InventoryQueryRequest;
 import com.ruoyi.warehouseBusiness.response.InventoryQueryResponse;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 import java.util.Map;
@@ -29,13 +30,13 @@ public interface ForeignHttpService {
     /**
      * 查询货物台账
      */
-    List<Map<String, Object>> queryGoodsAccountByPageV1(String warehouseCode, String ownerName, String goodsName, String specifications, String producing,
+    List<Map<String, Object>> queryGoodsAccountByPageV1(String warehouseCode, String ownerSocialIdentifier, String ownerCode, String ownerName, String goodsName, String specifications, String producing,
                                                         String materialQuality, String level, Integer pageNo, Integer pageSize);
 
     /**
      * 查询货物台账明细
      */
-    List<Map<String, Object>> queryGoodsAccountDetailByPageV1(String warehouseCode,String ownerName,String ownerCode,String goodsName,String specifications,
+    List<Map<String, Object>> queryGoodsAccountDetailByPageV1(String warehouseCode,String ownerName,String ownerCode,String ownerSocialIdentifier,String goodsName,String specifications,
                                                         String producing,String materialQuality,String level, String receiptDoc,String billOfLading,
                                                         String areaName,String areaCode,String slotName,String slotCode,Integer pageNo,Integer pageSize);
 

+ 13 - 11
ruoyi-plugin/src/main/java/com/ruoyi/ccb/service/impl/ForeignHttpServiceImpl.java

@@ -74,16 +74,18 @@ public class ForeignHttpServiceImpl implements ForeignHttpService{
      */
     @Override
     public List<Map<String, Object>> queryGoodsAccountByPageV1(String warehouseCode,
-                                                           String ownerName,
-                                                           String goodsName,
-                                                           String specifications,
-                                                           String producing,
-                                                           String materialQuality,
-                                                           String level,
-                                                           Integer pageNo,
-                                                           Integer pageSize)
+                                                               String ownerSocialIdentifier,
+                                                               String ownerCode,
+                                                               String ownerName,
+                                                               String goodsName,
+                                                               String specifications,
+                                                               String producing,
+                                                               String materialQuality,
+                                                               String level,
+                                                               Integer pageNo,
+                                                               Integer pageSize)
     {
-        return itWarehouseService.queryGoodsAccountByPageV1(warehouseCode, ownerName, goodsName, specifications,
+        return itWarehouseService.queryGoodsAccountByPageV1(warehouseCode,ownerSocialIdentifier,ownerCode, ownerName, goodsName, specifications,
                 producing, materialQuality, level, pageNo, pageSize);
 
     }
@@ -92,10 +94,10 @@ public class ForeignHttpServiceImpl implements ForeignHttpService{
      * 查询台账明细
      */
     @Override
-    public List<Map<String, Object>> queryGoodsAccountDetailByPageV1(String warehouseCode,String ownerName,String ownerCode,String goodsName,String specifications,
+    public List<Map<String, Object>> queryGoodsAccountDetailByPageV1(String warehouseCode,String ownerName,String ownerCode,String ownerSocialIdentifier,String goodsName,String specifications,
                                                                      String producing,String materialQuality,String level, String receiptDoc,String billOfLading,
                                                                      String areaName,String areaCode,String slotName,String slotCode,Integer pageNo,Integer pageSize){
-        return itWarehouseService.queryGoodsAccountDetailByPageV1(warehouseCode, ownerName, ownerCode, goodsName, specifications,
+        return itWarehouseService.queryGoodsAccountDetailByPageV1(warehouseCode, ownerName, ownerCode, ownerSocialIdentifier, goodsName, specifications,
                 producing, materialQuality, level, receiptDoc, billOfLading, areaName, areaCode, slotName, slotCode, pageNo, pageSize);
     }
 

+ 10 - 5
ruoyi-warehouse/src/main/java/com/ruoyi/approvalFlow/service/impl/AuditPathsServiceImpl.java

@@ -119,6 +119,9 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
     @Autowired
     private SysConfigMapper sysConfigMapper;
 
+    @Autowired
+    private TFeesMapper tFeesMapper;
+
     /**
      * 查询审批流配置主
      *
@@ -409,20 +412,22 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
                                     String configValue = sysConfig.getConfigValue();
                                     if ("0".equals(configValue)){
                                         // 获取仓储费,并判断费用中是否存在仓储费
-
                                         if (Objects.isNull(ccf)) {
                                             throw new WarehouseException("未找到仓储费费用信息");
                                         }
                                     }
                                 }
                                 // 过滤出费用类型等于仓储费并且有商机id,并取出来进行更新仓储费计费日期
-                                TFees finalCcf = ccf;
-                                long count = feesList.stream().filter(li -> Objects.equals(li.getfFeeid(), finalCcf.getfId()) && Objects.nonNull(li.getSrcId()))
+                                long count = feesList.stream().filter(li -> Objects.equals(li.getfFeeid(), ccf.getfId()) && Objects.nonNull(li.getSrcId()))
                                         .count();
                                 if (count > 0) {
-                                    TWarehousebillsfees warehousebillsfees = feesList.stream().findFirst().orElseThrow(() -> new WarehouseException("未找到费用明细"));
+                                    TWarehousebillsfees warehousebillsfees = feesList.stream().filter(f ->
+                                            tFeesMapper.selectTFeesById(f.getfFeeid()).getfName().equals("仓储费")
+                                    ).findFirst().orElse(null);
                                     // 更新子表仓储费截止日期
-                                    tWarehousebillsitemsMapper.updateItemStorageFeeDeadlineByPId(warehousebillsfees.getfPid(), warehousebillsfees.getfBillingDeadline());
+                                    if (ObjectUtils.isNotEmpty(warehousebillsfees)){
+                                        tWarehousebillsitemsMapper.updateItemStorageFeeDeadlineByPId(warehousebillsfees.getfPid(), warehousebillsfees.getfBillingDeadline());
+                                    }
                                 }
                             } else if (Objects.equals(auditItems.getActId(), 150L)) {
                                 tWarehouseBillsService.approvedStorageFee(auditItems.getBillId(), fettle, at.getAuditItem());

+ 3 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TWarehouseMapper.java

@@ -186,6 +186,8 @@ public interface TWarehouseMapper {
     public TWarehouse getWarehouseByNo(String fNo);
 
     List<Map<String, Object>> queryGoodsAccountByPageV1(@Param("warehouseCode") String warehouseCode,
+                                                        @Param("ownerSocialIdentifier") String ownerSocialIdentifier,
+                                                        @Param("ownerCode") String ownerCode,
                                                         @Param("ownerName") String ownerName,
                                                         @Param("goodsName") String goodsName,
                                                         @Param("specifications") String specifications,
@@ -199,6 +201,7 @@ public interface TWarehouseMapper {
     List<Map<String, Object>> queryGoodsAccountDetailByPageV1(@Param("warehouseCode") String warehouseCode,
                                                               @Param("ownerName") String ownerName,
                                                               @Param("ownerCode") String ownerCode,
+                                                              @Param("ownerSocialIdentifier") String ownerSocialIdentifier,
                                                               @Param("goodsName") String goodsName,
                                                               @Param("specifications") String specifications,
                                                               @Param("producing") String producing,

+ 3 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITWarehouseService.java

@@ -197,6 +197,8 @@ public interface ITWarehouseService {
      * 查询货物台账
      */
     List<Map<String,Object>> queryGoodsAccountByPageV1(String warehouseCode,
+                                                       String ownerSocialIdentifier,
+                                                       String ownerCode,
                                                        String ownerName,
                                                        String goodsName,
                                                        String specifications,
@@ -209,7 +211,7 @@ public interface ITWarehouseService {
     /**
      * 查询台账明细
      */
-    List<Map<String,Object>> queryGoodsAccountDetailByPageV1(String warehouseCode,String ownerName,String ownerCode,String goodsName,String specifications,
+    List<Map<String,Object>> queryGoodsAccountDetailByPageV1(String warehouseCode,String ownerName,String ownerCode,String ownerSocialIdentifier, String goodsName,String specifications,
                                                              String producing,String materialQuality,String level, String receiptDoc,String billOfLading,
                                                              String areaName,String areaCode,String slotName,String slotCode,Integer pageNo,Integer pageSize);
 

+ 5 - 3
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TWarehouseServiceImpl.java

@@ -480,6 +480,8 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
 
     @Override
     public List<Map<String, Object>> queryGoodsAccountByPageV1(String warehouseCode,
+                                                               String ownerSocialIdentifier,
+                                                               String ownerCode,
                                                                String ownerName,
                                                                String goodsName,
                                                                String specifications,
@@ -488,15 +490,15 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
                                                                String level,
                                                                Integer pageNo,
                                                                Integer pageSize){
-        return tWarehouseMapper.queryGoodsAccountByPageV1(warehouseCode, ownerName, goodsName, specifications,
+        return tWarehouseMapper.queryGoodsAccountByPageV1(warehouseCode, ownerSocialIdentifier,ownerCode,ownerName, goodsName, specifications,
                 producing, materialQuality, level, pageNo, pageSize);
     }
 
     @Override
-    public List<Map<String, Object>> queryGoodsAccountDetailByPageV1(String warehouseCode,String ownerName,String ownerCode,String goodsName,String specifications,
+    public List<Map<String, Object>> queryGoodsAccountDetailByPageV1(String warehouseCode,String ownerName,String ownerCode,String ownerSocialIdentifier,String goodsName,String specifications,
                                                                      String producing,String materialQuality,String level, String receiptDoc,String billOfLading,
                                                                      String areaName,String areaCode,String slotName,String slotCode,Integer pageNo,Integer pageSize){
-        return tWarehouseMapper.queryGoodsAccountDetailByPageV1(warehouseCode, ownerName, ownerCode, goodsName, specifications,
+        return tWarehouseMapper.queryGoodsAccountDetailByPageV1(warehouseCode, ownerName, ownerCode, ownerSocialIdentifier, goodsName, specifications,
                 producing, materialQuality, level, receiptDoc, billOfLading, areaName, areaCode, slotName, slotCode, pageNo, pageSize);
     }
 

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/impl/TWhgenlegServiceImpl.java

@@ -280,7 +280,7 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
                             + "            </CopBaseInfo>\n"
             );
 
-            List<Map<String, Object>> warehouseList = tWhgenlegMapper.warehouseSupervise(384);
+            List<Map<String, Object>> warehouseList = tWhgenlegMapper.warehouseSupervise(100);
             for (Map<String, Object> warehouse : warehouseList) {
                 bw.write("            <StorageInfo>\n"
                         + "                <HouseId>" + warehouse.get("fNo") + "</HouseId>\n"

+ 4 - 0
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -360,6 +360,7 @@
         SELECT
             TW.f_id AS warehouseCode,
             TW.f_name AS warehouseName,
+            TC.uscc AS ownerSocialIdentifier,
             TC.f_id AS ownerCode,
             TC.f_name AS ownerName,
             TG.f_name AS goodsName,
@@ -385,6 +386,8 @@
             <if test="goodsName != null  and goodsName != ''"> and TG.f_name like concat('%', #{goodsName}, '%')</if>
             <if test="specifications != null  and specifications != ''"> and TG.f_packagespecs like concat('%', #{specifications}, '%')</if>
             <if test="materialQuality != null  and materialQuality != ''"> and TWG.f_marks like concat('%', #{materialQuality}, '%')</if>
+            <if test="ownerSocialIdentifier != null  and ownerSocialIdentifier != ''"> and TC.uscc = #{ownerSocialIdentifier}</if>
+            <if test="ownerCode != null  and ownerCode != ''"> and TC.f_id = #{ownerCode}</if>
         </where>
         GROUP BY
         TW.f_id,TC.f_no,TG.f_name,TG.f_packagespecs,TWG.f_marks
@@ -404,6 +407,7 @@
             TWG.f_mblno AS billOfLading,
             TC.f_id AS ownerCode,
             TC.f_name AS ownerName,
+            TC.uscc AS ownerSocialIdentifier,
             TG.f_name AS goodsName,
             TG.f_packagespecs AS specifications,
             '' AS producing,