소스 검색

20221208 17:33

wangzhuo 2 년 전
부모
커밋
0b7f468eab

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

@@ -57,8 +57,8 @@ public class ForeignApiController extends BaseController {
                                                          @RequestParam(value = "producing",required = false) String producing,
                                                          @RequestParam(value = "materialQuality",required = false) String materialQuality,
                                                          @RequestParam(value = "level",required = false) String level,
-                                                         @RequestParam(value = "pageNo") Integer pageNo,
-                                                         @RequestParam(value = "pageSize") Integer pageSize) {
+                                                         @RequestParam(value = "pageNo",required = false) Integer pageNo,
+                                                         @RequestParam(value = "pageSize",required = false) Integer pageSize) {
         startPage();
         return foreignHttpService.queryGoodsAccountByPageV1(warehouseCode, ownerName, goodsName, specifications,
                 producing, materialQuality, level, pageNo, pageSize);
@@ -95,8 +95,8 @@ public class ForeignApiController extends BaseController {
      * WMS作业通知数字仓库系统接⼝
      */
     @PostMapping("/workNoticeV1")
-    public Map<String, Object> workNoticeV1(){
-        return foreignHttpService.workNoticeV1();
+    public Map<String, Object> workNoticeV1(JSONObject jsonObject){
+        return foreignHttpService.workNoticeV1(jsonObject);
     }
 
 

+ 6 - 1
ruoyi-admin/src/main/resources/application-druid.yml

@@ -6,8 +6,13 @@ spring:
     druid:
       # 主库数据源
       master:
-        url: jdbc:mysql://124.70.179.5:3306/LinuxServer?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        #url: jdbc:mysql://124.70.179.5:3306/LinuxServer?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
         #url: jdbc:mysql://124.70.179.5:3306/linshi?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        #url: jdbc:mysql://124.70.179.5:3306/JinGang?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        #url: jdbc:mysql://119.3.74.195:3306/LianHuaShengYun?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        #url: jdbc:mysql://119.3.74.195:3306/jhy?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        url: jdbc:mysql://119.3.74.195:3306/had?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        #url: jdbc:mysql://124.70.179.5:3306/sengneng?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
         username: root
         password: daasan7ujm^YHN
 

+ 21 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/SignInterceptor.java

@@ -1,10 +1,14 @@
 package com.ruoyi.framework.interceptor;
 
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.ServletUtils;
 import org.springframework.stereotype.Component;
 import org.springframework.web.method.HandlerMethod;
 import org.springframework.web.servlet.HandlerInterceptor;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
 import org.springframework.util.DigestUtils;
 
@@ -31,8 +35,25 @@ public class SignInterceptor implements HandlerInterceptor {
             System.out.println("加密后======>"+md5Upper);
             if (md5Upper.equals(sign)){
                 return true;
+            }else {
+                try {
+                    response.setCharacterEncoding("UTF-8");
+                    response.setContentType("application/json; charset=utf-8");
+                    PrintWriter out = null;
+                    JSONObject res = new JSONObject();
+                    res.put("code", "10003");
+                    res.put("msg", "非法访问");
+                    out = response.getWriter();
+                    out.append(res.toString());
+                    return false;
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    response.sendError(500);
+                    return false;
+                }
             }
         }
+
         return false;
     }
 

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

@@ -1,10 +1,8 @@
 package com.ruoyi.ccb.service;
 
+import cn.hutool.json.JSONObject;
 import com.ruoyi.ccb.domain.*;
-import com.ruoyi.ccb.domain.basic.Page;
-import org.springframework.web.bind.annotation.RequestParam;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -89,5 +87,5 @@ public interface ForeignHttpService {
     /**
      *  WMS作业通知数字仓库系统接
      */
-    Map<String, Object> workNoticeV1();
+    Map<String, Object> workNoticeV1(JSONObject jsonObject);
 }

+ 3 - 29
ruoyi-plugin/src/main/java/com/ruoyi/ccb/service/impl/ForeignHttpServiceImpl.java

@@ -1,41 +1,15 @@
 package com.ruoyi.ccb.service.impl;
 
 import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.github.pagehelper.PageInfo;
-import com.ruoyi.basicData.domain.TWarehouseWebcam;
+import cn.hutool.json.JSONObject;
 import com.ruoyi.basicData.service.ITWarehouseService;
 import com.ruoyi.ccb.domain.*;
-import com.ruoyi.ccb.domain.basic.CargoDetail;
-import com.ruoyi.ccb.domain.basic.CargoLockInfo;
-import com.ruoyi.ccb.domain.basic.Page;
-import com.ruoyi.ccb.domain.basic.SyncedOrg;
-import com.ruoyi.ccb.service.CcbHttpService;
 import com.ruoyi.ccb.service.ForeignHttpService;
-import com.ruoyi.common.constant.LiveBroadcast;
-import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.TWarehouse;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.JsonUtil;
-import com.ruoyi.reportManagement.domain.TWhgenleg;
-import com.ruoyi.warehouseBusiness.domain.TWarehousebillsitems;
-import com.ruoyi.warehouseBusiness.service.IWarehouseBillsCcbService;
 import lombok.AllArgsConstructor;
-import okhttp3.OkHttpClient;
-import okhttp3.Request;
-import okhttp3.RequestBody;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.transaction.interceptor.TransactionAspectSupport;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.io.IOException;
-import java.math.BigDecimal;
 import java.util.*;
-import java.util.stream.Collectors;
 
 /**
  * CCB-HTTP接口实现
@@ -286,7 +260,7 @@ public class ForeignHttpServiceImpl implements ForeignHttpService{
         Map<String,Object> data = new HashMap<>();
 
         //普通过户量
-        List<Map<String, Object>> normalTransferList = new ArrayList<>();
+        List<Map<String, Object>> normalTransferList = itWarehouseService.getTransferTransaction(wareHouseId, startTime, endTime);
         data.put("normalTransferList", normalTransferList);
 
         //仓单过户量
@@ -350,7 +324,7 @@ public class ForeignHttpServiceImpl implements ForeignHttpService{
      * WMS作业通知数字仓库系统接
      */
     @Override
-    public Map<String, Object> workNoticeV1(){
+    public Map<String, Object> workNoticeV1(JSONObject jsonObject){
         Map<String,Object> mapR = new HashMap<>();
         mapR.put("code","0");
         mapR.put("msg","OK");

+ 6 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TWarehouseMapper.java

@@ -243,7 +243,7 @@ public interface TWarehouseMapper {
     List<Map<String, Object>> getGoodsList(@Param("wareHouseId")String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime);
 
     /**
-     *  货物保管信息
+     *  仓库保管趋势
      */
     List<Map<String, Object>> getCargoInfoTrend(@Param("wareHouseId")String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("FTradeModeId") String FTradeModeId);
 
@@ -258,6 +258,11 @@ public interface TWarehouseMapper {
     List<Map<String, Object>> getGoodsTop(@Param("wareHouseId")String wareHouseId,@Param("countType") Integer countType,@Param("topCnt") Integer topCnt);
 
     /**
+     *  过户交易信息获取
+     */
+    List<Map<String, Object>> getTransferTransaction(@Param("wareHouseId")String wareHouseId,@Param("startTime") String startTime,@Param("endTime") String endTime);
+
+    /**
      *  最新的作业统计
      */
     Map<String, Object> getWorkInfo(@Param("wareHouseId")String wareHouseId,@Param("countType") String countType);

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITWarehouseService.java

@@ -255,6 +255,11 @@ public interface ITWarehouseService {
     List<Map<String, Object>> getGoodsTop(String wareHouseId, Integer countType, Integer topCnt);
 
     /**
+     *  过户交易信息获取
+     */
+    List<Map<String, Object>> getTransferTransaction(String wareHouseId, String startTime, String endTime);
+
+    /**
      *  最新的作业统计
      */
     Map<String, Object> getWorkInfo(String wareHouseId, String countType);

+ 8 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TWarehouseServiceImpl.java

@@ -562,6 +562,14 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
     }
 
     /**
+     *  过户交易信息获取
+     */
+    @Override
+    public List<Map<String, Object>> getTransferTransaction(String wareHouseId, String startTime, String endTime) {
+        return tWarehouseMapper.getTransferTransaction(wareHouseId,startTime,endTime);
+    }
+
+    /**
      *  最新的作业统计
      */
     @Override

+ 23 - 2
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -361,7 +361,7 @@
             TW.f_no AS warehouseCode,
             TW.f_name AS warehouseName,
             TC.f_no AS ownerCode,
-            TC.f_name AS ownerName,
+            'xxx有限公司' AS ownerName,
             TG.f_name AS goodsName,
             TG.f_packagespecs AS specifications,
             '' AS producing,
@@ -400,7 +400,7 @@
             TWG.f_originalbillno AS receiptDoc,
             TWG.f_mblno AS billOfLading,
             TC.f_no AS ownerCode,
-            TC.f_name AS ownerName,
+            'XXX有限公司' AS ownerName,
             TG.f_name AS goodsName,
             TG.f_packagespecs AS specifications,
             '' AS producing,
@@ -613,6 +613,27 @@
         LIMIT #{topCnt}
     </select>
 
+    <select id="getTransferTransaction" resultType="map">
+        SELECT
+        IFNULL( f_bsdate, '' ) as time,
+        IFNULL( ROUND( SUM(f_grossweight) / 1000, 2 ), 0 ) as value
+        FROM
+        t_warehousebills
+        <where>
+            del_flag = '0'
+            AND f_id = #{wareHouseId}
+            <if test="startTime != null and startTime != ''">
+                and f_bsdate >= #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                and f_bsdate >= #{endTime}
+            </if>
+            <if test="startTime == null and endTime == null and startTime == '' and endTime == ''">
+                and DATE_SUB( CURDATE(), INTERVAL 7 DAY ) &lt;= date(f_bsdate)
+            </if>
+        </where>
+    </select>
+
     <select id="getWorkInfo"  resultType="map">
         SELECT
             IFNULL( ROUND( SUM( TW.f_grossweight ) / 1000, 2 ), 0 ) AS Fgrossweight,