Procházet zdrojové kódy

修改项目打包配置文件

lhs před 5 roky
rodič
revize
04bb596eb3

+ 4 - 4
README-DEPLOY.md

@@ -10,12 +10,12 @@
 
 ## 上线打包的流程:
 1. cus_reader_card的打包
-    + 在Maven Projects中找到cus_reader_card
-    + 打开Lifecycle,点击clean运行,之后点击package运行
+    + 在控制台中对项目进行打包
+    + 在Terminal中进入cus_reader_card目录下,输入gradle clean buildDependents
 
 2. 相应类结构和路径
-    + cus_reader_card的打包路径:cus_reader_card\target\cus_reader_card
-    + 打开WEB-INF文件,将lib文件名改成dependency,并压缩cus_reader_card
+    + cus_reader_card的打包路径:cus_reader_card\build\libs\cus_reader_card-1.0.0.war
+    + 解压cus_reader_card-1.0.0.war,打开WEB-INF文件,将lib文件名改成dependency
     + cus_reader_card.zip包里面包含的文件夹目录结构:
     ```
     -META-INF

+ 13 - 2
src/main/java/com/emato/cus/config/CusCardConfiguration.java

@@ -12,10 +12,13 @@ public class CusCardConfiguration {
     @Value("${cus.card.password}")
     private String cusCardPassword;
 
-    @Value("${cus.login.url}")
+    @Value("${cus.loginUrl}")
     private String cusLoginUrl;
 
-    @Value("${cus.inveQueryUrl}")
+    @Value("${cus.inve.date}")
+    private int inveQueryDate;
+
+    @Value("${cus.inve.url}")
     private String inveQueryUrl;
 
     public String getCusCardUrl() {
@@ -42,6 +45,14 @@ public class CusCardConfiguration {
         this.cusLoginUrl = cusLoginUrl;
     }
 
+    public int getInveQueryDate() {
+        return inveQueryDate;
+    }
+
+    public void setInveQueryDate(int inveQueryDate) {
+        this.inveQueryDate = inveQueryDate;
+    }
+
     public String getInveQueryUrl() {
         return inveQueryUrl;
     }

+ 15 - 7
src/main/java/com/emato/cus/controller/ReaderCardController.java

@@ -6,6 +6,8 @@ import com.emato.cus.config.CusCardConfiguration;
 import com.emato.cus.entity.ResponseMsg;
 import com.emato.cus.utils.HttpUtil;
 import com.emato.cus.utils.JacksonUtils;
+import com.emato.cus.utils.date.DateConstant;
+import com.emato.cus.utils.date.DateUtil;
 import com.emato.cus.utils.websocket.Callback;
 import com.emato.cus.utils.websocket.WebSocketClientHandle;
 import org.apache.commons.lang3.StringUtils;
@@ -29,10 +31,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 读取操作员卡数据,获取互联网+海关登录信息
@@ -52,7 +51,7 @@ public class ReaderCardController {
     // 记录历史登录信息
     private static StringBuilder cookieStr = new StringBuilder();
 
-    @RequestMapping("/readCusCard")
+    @RequestMapping(value = "/readCusCard", produces = "application/json;charset=utf-8")
     public ResponseMsg readCusCard() {
         // 读取互联网+海关的配置
         String url = cusCardConfiguration.getCusLoginUrl();
@@ -62,6 +61,8 @@ public class ReaderCardController {
         // 判断登录信息是否失效
         if(checkCookie(cookieStr.toString())) {
             try {
+                //------------------------------ 登录信息已过期,执行以下模拟登录操作 ------------------------------
+
                 httpClient = HttpClients.createDefault();
                 cookieStr.delete(0, cookieStr.length());
 
@@ -210,6 +211,7 @@ public class ReaderCardController {
                 return new ResponseMsg(ResponseMsg.ERROR_CODE, "读取操作员卡异常!");
             }
         } else {
+            //------------------------------ 登录信息未过期,获取上一次登录数据 ------------------------------
             LOGGER.info("获取上一次登录信息:" + cookieStr);
         }
 
@@ -227,20 +229,26 @@ public class ReaderCardController {
      */
     public boolean checkCookie(String cookie) {
         //-------------------- 模拟清单回执表单查询操作 --------------------
+        // 表单参数
+        Map<String, Object> formMap = new HashMap<>();
+        formMap.put("sysDateFrom", DateUtil.getDaysAgoStart(cusCardConfiguration.getInveQueryDate()));
+        formMap.put("sysDateTo", DateUtil.dateConvertString(new Date(), DateConstant.DATE_TIME_SECOND));
+
         // 查询参数
         Map<String, Object> map = new HashMap<>();
-        map.put("formCondition", "{\"invtNo\":\"53492020I121054368\",\"sysDateFrom\":\"2020-02-01 00:00:00\",\"sysDateTo\":\"2020-03-05 23:59:59\"}");
+        map.put("formCondition", JacksonUtils.toJson(formMap));
         map.put("limit", 10);
         map.put("offset", 0);
         map.put("order", "asc");
         map.put("queryArea", "QUERY");
         String requestParams = JSONObject.toJSONString(map);
+        LOGGER.info("调用【互联网+海关】查询清单接口入参:" + requestParams);
 
         boolean ckFlag = true;
         try {
             // 调用清单回执查询接口
             String result = HttpUtil.postRequet(cusCardConfiguration.getInveQueryUrl(), requestParams, cookie);
-            LOGGER.info("调用【互联网+海关】查询清单接口响应:" + result);
+            LOGGER.info("调用【互联网+海关】查询清单接口出参:" + result);
 
             if(StringUtils.isNotBlank(result) && JacksonUtils.isJson(result)) {
                 ckFlag = false;

+ 20 - 0
src/main/java/com/emato/cus/utils/date/DateConstant.java

@@ -0,0 +1,20 @@
+package com.emato.cus.utils.date;
+
+public class DateConstant {
+
+    public static final String DATE_TIME_SECOND_ZONE = "yyyy-MM-dd HH:mm:ssZ";
+    public static final String DATE_TIME_SECOND_MILL = "yyyy-MM-dd HH:mm:ss.SSS";
+    public static final String DATE_TIME_SECOND = "yyyy-MM-dd HH:mm:ss";
+    public static final String DATE_TIME_SECOND_14 = "yyyyMMddHHmmss";
+    public static final String DATE_TIME_MINUTE = "yyyy-MM-dd HH:mm";
+
+    public static final String TIME_SECOND_MILL = "HH:mm:ss.SSS";
+    public static final String TIME_SECOND = "HH:mm:ss";
+    public static final String TIME_MINUTE = "HH:mm";
+
+    public static final String DATE_MONTH_DAY = "yyyy-MM-dd";
+    public static final String DATE_MONTH_DAY_8 = "yyyyMMdd";
+    public static final String DATE_MONTH = "yyyy-MM";
+    public static final String MONTH_DAY = "MM-dd";
+    public static final String YEAR = "yyyy";
+}

+ 347 - 0
src/main/java/com/emato/cus/utils/date/DateUtil.java

@@ -0,0 +1,347 @@
+package com.emato.cus.utils.date;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Locale;
+
+public class DateUtil {
+
+    /**
+     * 时间格式(yyyy-MM-dd)
+     */
+    public final static String DATE_PATTERN_YYYY_MM_DD = "yyyy-MM-dd";
+
+    /**
+     * 时间格式(yyyy-MM-dd)
+     */
+    public final static String DATE_PATTERN_YYYY_T_HH_Z = "yyyy-MM-dd'T'HH:mm:ss.SSS Z";
+
+    /**
+     * 字符串的日期类型 转换称 Date 类型
+     *
+     * @param timeContent 字符串的日期类型
+     * @param formatStyle 日期格式
+     * @return
+     */
+    public static Date stringConvertDate(String timeContent, String formatStyle) {
+        SimpleDateFormat format = new SimpleDateFormat(formatStyle);
+        try {
+            return format.parse(timeContent);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 检查日期格式
+     *
+     * @param time
+     * @param format
+     * @return
+     */
+    public static boolean checkDate(String time, String format) {
+        if (stringConvertDate(time, format) == null) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Date 转化成 String 类型的字符串日期格式
+     *
+     * @param date
+     * @param formatStyle 转化成 什么格式
+     * @return
+     */
+    public static String dateConvertString(Date date, String formatStyle) {
+        SimpleDateFormat format = new SimpleDateFormat(formatStyle);
+        return format.format(date);
+    }
+
+    /**
+     * 字符串日期格式 转换成 带 地区标识的 Date 类型
+     *
+     * @param strDate
+     * @param locale
+     * @param formatStyle
+     * @return
+     */
+    public static Date stringConvertLocalDate(String strDate, Locale locale, String formatStyle) {
+        SimpleDateFormat srcsdf = new SimpleDateFormat(formatStyle, locale);
+        try {
+            return srcsdf.parse(strDate);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 获取本地时间相对的UTC | GMT时间
+     *
+     * @return
+     */
+    public static Date getUtcTime() {
+        // 1、取得本地时间:
+        Calendar calendar = Calendar.getInstance();
+        // 2、取得时间偏移量:
+        final int zoneOffset = calendar.get(Calendar.ZONE_OFFSET);
+        // 3、取得夏令时差:
+        final int dstOffset = calendar.get(Calendar.DST_OFFSET);
+        // 4、从本地时间里扣除这些差量,即可以取得UTC时间:
+        calendar.add(Calendar.MILLISECOND, -(zoneOffset + dstOffset));
+        return calendar.getTime();
+    }
+
+    /**
+     * 获取2个时间相差多少秒
+     *
+     * @param date1
+     * @param date2
+     * @return
+     */
+    public static Long getDiffSeconds(Date date1, Date date2) {
+        long milliseconds1 = date1.getTime();
+        long milliseconds2 = date2.getTime();
+        long diff = milliseconds1 - milliseconds2;
+        if (diff < 0) {
+            diff = -diff;
+        }
+        long diffSeconds = diff / (1000);
+        return diffSeconds;
+    }
+
+    /**
+     * 获取2个时间相差多少分钟
+     *
+     * @param date1
+     * @param date2
+     * @return
+     */
+    public static Long getDiffMinutes(Date date1, Date date2) {
+        Long diffMinutes = getDiffSeconds(date1, date2) / 60;
+        return diffMinutes;
+    }
+
+    /**
+     * 获取2个时间直接 相差多少小时
+     *
+     * @param date1
+     * @param date2
+     * @return
+     */
+    public static Long getDiffHours(Date date1, Date date2) {
+        Long diffHours = getDiffMinutes(date1, date2) / 60;
+        return diffHours;
+    }
+
+    /**
+     * 获取2个时间直接 相差多少天
+     *
+     * @param date1
+     * @param date2
+     * @return
+     */
+    public static Long getDiffDays(Date date1, Date date2) {
+        Long diffDays = getDiffHours(date1, date2) / 24;
+        return diffDays;
+    }
+
+    /**
+     * 多少天以前
+     *
+     * @param ago
+     * @return
+     */
+    public static String getDaysAgoStart(int ago) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.add(Calendar.DAY_OF_YEAR, -ago);
+        String time = DateUtil.dateConvertString(calendar.getTime(), DateConstant.DATE_MONTH_DAY);
+        String timeFrom = time + " 00:00:00";
+        return timeFrom;
+    }
+
+    /**
+     * 获得指定日期的下一天
+     *
+     * @param day
+     * @return
+     */
+    public static String getNextDayTime(String day) {
+        Date date = DateUtil.stringConvertDate(day, DateConstant.DATE_TIME_SECOND);
+
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.DATE, 1);
+
+        return new SimpleDateFormat(DateConstant.DATE_TIME_SECOND).format(cal.getTime());
+    }
+
+    /**
+     * 获得指定日期的前一天
+     *
+     * @param day
+     * @return
+     */
+    public static String getPreDayTime(String day) {
+        Date date = DateUtil.stringConvertDate(day, DateConstant.DATE_TIME_SECOND);
+
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.DATE, -1);
+
+        return new SimpleDateFormat(DateConstant.DATE_TIME_SECOND).format(cal.getTime());
+    }
+
+    /**
+     * 获得指定日期的前一天
+     *
+     * @param day
+     * @return
+     */
+    public static String getPreDayDate(String day) {
+        Date date = DateUtil.stringConvertDate(day, DateConstant.DATE_MONTH_DAY);
+
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        cal.add(Calendar.DATE, -1);
+
+        return new SimpleDateFormat(DateConstant.DATE_MONTH_DAY).format(cal.getTime());
+    }
+
+    /**
+     * 多少天以后
+     *
+     * @param date
+     * @param dayNum
+     * @return
+     */
+    public static Date getNextPrevDay(Date date, int dayNum) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.add(Calendar.DAY_OF_MONTH, dayNum);
+        return calendar.getTime();
+    }
+
+    /**
+     * 判断time1 是否早于time2
+     *
+     * @param time1
+     * @param time2
+     * @return
+     */
+    public static boolean before(String time1, String time2) {
+        Date date1 = DateUtil.stringConvertDate(time1, DateConstant.DATE_TIME_SECOND);
+        Date date2 = DateUtil.stringConvertDate(time2, DateConstant.DATE_TIME_SECOND);
+
+        return date1.before(date2);
+    }
+
+    /**
+     * 获得当前系统时间
+     *
+     * @return
+     */
+    public static String getSystemDate() {
+        SimpleDateFormat sdf = new SimpleDateFormat(DateConstant.DATE_TIME_SECOND);
+        return sdf.format(new Date());
+    }
+
+    /**
+     * 得到某个时间段加上多少小时的时间
+     *
+     * @param dateTime
+     * @param hours
+     * @return
+     */
+    public static Date getDateTimeAddHours(Date dateTime, Integer hours) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(dateTime);
+        calendar.add(Calendar.HOUR, hours);
+        return calendar.getTime();
+    }
+
+    /**
+     * 获取当前时间的时间戳
+     *
+     * @return
+     */
+    public static long getTimestampByDate() {
+        return System.currentTimeMillis();
+    }
+
+    /**
+     * 获取指定时间的时间戳
+     *
+     * @param dt
+     * @return
+     */
+    public static long getTimestampByDate(Date dt) {
+        return dt.getTime();
+    }
+
+    /**
+     * 取得当前unix时间戳(精确到秒)
+     *
+     * @return unixTimeStamp
+     */
+    public static String getUnixTimeStamp() {
+        long time = System.currentTimeMillis();
+        String unixTimeStamp = String.valueOf(time / 1000);
+        return unixTimeStamp;
+    }
+
+    /**
+     * 日期格式字符串转换成时间戳
+     *
+     * @param dateStr 字符串日期
+     * @param format  如:yyyy-MM-dd HH:mm:ss
+     * @return
+     */
+    public static String Date2UnixTimeStamp(String dateStr, String format) {
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat(format);
+            return String.valueOf(sdf.parse(dateStr).getTime() / 1000);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+
+    /**
+     * 判断是否当天日期
+     *
+     * @param dateStr
+     * @param formatStr
+     * @return
+     */
+    public static boolean isToday(String dateStr, String formatStr) {
+        try {
+            SimpleDateFormat format = new SimpleDateFormat(formatStr);
+            Date date = format.parse(dateStr);
+
+            Calendar c1 = Calendar.getInstance();
+            c1.setTime(date);
+            int year1 = c1.get(Calendar.YEAR);
+            int month1 = c1.get(Calendar.MONTH) + 1;
+            int day1 = c1.get(Calendar.DAY_OF_MONTH);
+
+            Calendar c2 = Calendar.getInstance();
+            c2.setTime(new Date());
+            int year2 = c2.get(Calendar.YEAR);
+            int month2 = c2.get(Calendar.MONTH) + 1;
+            int day2 = c2.get(Calendar.DAY_OF_MONTH);
+
+            if (year1 == year2 && month1 == month2 && day1 == day2) {
+                return true;
+            }
+            return false;
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return false;
+    }
+}

+ 219 - 0
src/main/java/com/emato/cus/utils/date/LocalDateTimeUtils.java

@@ -0,0 +1,219 @@
+package com.emato.cus.utils.date;
+
+import java.time.*;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalUnit;
+import java.util.Date;
+
+public class LocalDateTimeUtils {
+
+    private LocalDateTimeUtils() { }
+
+    /**
+     * String转LocalDateTime
+     * @param src
+     * @param formatter
+     * @return
+     */
+    public static LocalDateTime stringToLocalDateTime(String src, DateTimeFormatter formatter) {
+       return LocalDateTime.parse(src, formatter);
+    }
+
+    /**
+     * LocalDateTime转String
+     * @param time
+     * @param pattern
+     * @return
+     */
+    public static String localDateTimeToString(LocalDateTime time, String pattern) {
+        return time.format(DateTimeFormatter.ofPattern(pattern));
+    }
+
+    /**
+     * 将当前LocalDateTime时间按为指定格式转为String
+     * @param pattern
+     * @return
+     */
+    public static String formatNow(String pattern) {
+        return  localDateTimeToString(LocalDateTime.now(), pattern);
+    }
+
+    /**
+     * String转LocalDate
+     * @param src
+     * @param formatter
+     * @return
+     */
+    public static LocalDate stringToLocalDate(String src, DateTimeFormatter formatter) {
+        return LocalDate.parse(src, formatter);
+    }
+
+    /**
+     * LocalDate转String
+     * @param time
+     * @param pattern
+     * @return
+     */
+    public static String localDateToString(LocalDate time, String pattern) {
+        return time.format(DateTimeFormatter.ofPattern(pattern));
+    }
+
+    /**
+     * String转LocalTime
+     * @param src
+     * @param formatter
+     * @return
+     */
+    public static LocalTime stringToLocalTime(String src, DateTimeFormatter formatter) {
+        return LocalTime.parse(src, formatter);
+    }
+
+    /**
+     * LocalTime转String
+     * @param time
+     * @param pattern
+     * @return
+     */
+    public static String localTimeToString(LocalTime time, String pattern) {
+        return time.format(DateTimeFormatter.ofPattern(pattern));
+    }
+
+    /**
+     * Date转换为LocalDateTime
+     * @param date
+     * @return
+     */
+    public static LocalDateTime localDateTimeToDate(Date date) {
+        return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
+    }
+
+    /**
+     * LocalDateTime转换为Date
+     * @param time
+     * @return
+     */
+    public static Date dateToLocalDateTime(LocalDateTime time) {
+        return Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
+    }
+
+
+    /**
+     * 获取指定日期的毫秒
+     * @param time
+     * @return
+     */
+    public static Long getMilliByTime(LocalDateTime time) {
+        return time.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
+    }
+
+
+    /**
+     * 获取指定日期的秒
+     * @param time
+     * @return
+     */
+    public static Long getSecondsByTime(LocalDateTime time) {
+        return time.atZone(ZoneId.systemDefault()).toInstant().getEpochSecond();
+    }
+
+
+    //日期加上一个数,根据field不同加不同值,field为ChronoUnit.*
+    public static LocalDateTime plus(LocalDateTime time, long number, TemporalUnit field) {
+        return time.plus(number, field);
+    }
+
+    //日期减去一个数,根据field不同减不同值,field参数为ChronoUnit.*
+    public static LocalDateTime minu(LocalDateTime time, long number, TemporalUnit field) {
+        return time.minus(number, field);
+    }
+
+    /**
+     * 获取两个日期的差  field参数为ChronoUnit.*
+     * @param startTime
+     * @param endTime
+     * @param field  单位(年月日时分秒)
+     * @return
+     */
+    public static long betweenTwoTime(LocalDateTime startTime, LocalDateTime endTime, ChronoUnit field) {
+        Period period = Period.between(LocalDate.from(startTime), LocalDate.from(endTime));
+        if (field == ChronoUnit.YEARS) {
+            return period.getYears();
+        }
+        if (field == ChronoUnit.MONTHS) {
+            return period.getYears() * 12 + period.getMonths();
+        }
+        return field.between(startTime, endTime);
+    }
+
+    //获取一天的开始时间,2017,7,22 00:00
+    public static LocalDateTime getDayStart(LocalDateTime time) {
+        return time.withHour(0)
+                .withMinute(0)
+                .withSecond(0)
+                .withNano(0);
+    }
+
+    //获取一天的结束时间,2017,7,22 23:59:59.999999999
+    public static LocalDateTime getDayEnd(LocalDateTime time) {
+        return time.withHour(23)
+                .withMinute(59)
+                .withSecond(59)
+                .withNano(999999999);
+    }
+
+
+    /**
+     * 纳秒转换
+     * 可转为:天/小时/分钟/秒/毫秒
+     *
+     * @param nanoTime
+     * @return
+     */
+    public static String fromNanoTime(long nanoTime){
+        if (nanoTime <= 0) {
+            return "0秒";
+        }
+        double a,b,c,d = 0.000d;
+        long day = 0L;  //天
+        long HH = 0L;   //小时
+        long mm = 0L;   //分
+        long ss = 0L;   //秒
+        long ms = 0L;   //毫秒
+
+        a = ((double) nanoTime) / 1000000000d / 60d / 60d / 24d;
+        if (a > 24) {
+            return (long) a + "天";
+        }else{
+            day = (long) a; //整数部分为天
+            b = (a - day) * 24; //小数部分转为小时
+
+            HH = (long) b; //小时
+            c = (b - HH) * 60;  //小数部分转为分钟
+
+            mm = (long) c; //分钟
+            d = (c - mm) * 60;  //小数部分转为秒
+
+            ss = (long)d; //秒
+            ms = (long)((d - ss) * 1000); //毫秒
+        }
+
+        String result = "";
+        if (day > 0) {
+            result = day + "天";
+        }
+        if (HH > 0) {
+            result += HH + "小时";
+        }
+        if (mm > 0) {
+            result += mm + "分钟";
+        }
+        if (ss > 0) {
+            result += ss + "秒";
+        }
+        if (ms > 0) {
+            result += ms + "毫秒";
+        }
+        return result;
+    }
+}

+ 0 - 13
src/main/resources/application-dev.yml

@@ -10,16 +10,3 @@ server:
 spring:
     profiles:
         active: dev
-
-
-### 互联网+海关配置
-cus:
-    ## 操作员卡配置
-    card:
-        url: 'wss://wss.singlewindow.cn:61231'
-        password: '88888888'
-    ## 登陆地址
-    login:
-        url: https://app.singlewindow.cn/cas/login?service=https://swapp.singlewindow.cn/deskserver/j_spring_cas_security_check&logoutFlag=1&_swCardF=1
-    ## 查询地址
-    inveQueryUrl: https://swapp.singlewindow.cn/swceb2web/inventory/inventoryQuery

+ 1 - 14
src/main/resources/application-test.yml

@@ -2,7 +2,7 @@
 ### 服务配置
 server:
     address: 127.0.0.1
-    port: 50080
+    port: 50090
     servlet:
         context-path: /api
 
@@ -10,16 +10,3 @@ server:
 spring:
     profiles:
         active: test
-
-
-### 互联网+海关配置
-cus:
-    ## 操作员卡配置
-    card:
-        url: 'wss://wss.singlewindow.cn:61231'
-        password: '88888888'
-    ## 登陆地址
-    login:
-        url: https://app.singlewindow.cn/cas/login?service=https://swapp.singlewindow.cn/deskserver/j_spring_cas_security_check&logoutFlag=1&_swCardF=1
-    ## 查询地址
-    inveQueryUrl: https://swapp.singlewindow.cn/swceb2web/inventory/inventoryQuery

+ 8 - 5
src/main/resources/application.yml

@@ -23,8 +23,11 @@ cus:
     card:
         url: 'wss://wss.singlewindow.cn:61231'
         password: '88888888'
-    ## 登陆地址
-    login:
-        url: https://app.singlewindow.cn/cas/login?service=https://swapp.singlewindow.cn/deskserver/j_spring_cas_security_check&logoutFlag=1&_swCardF=1
-    ## 查询地址
-    inveQueryUrl: https://swapp.singlewindow.cn/swceb2web/inventory/inventoryQuery
+    ## 模拟登陆地址
+    loginUrl: https://app.singlewindow.cn/cas/login?service=https://swapp.singlewindow.cn/deskserver/j_spring_cas_security_check&logoutFlag=1&_swCardF=1
+    ## 模拟查询配置
+    inve:
+        # 查询多少天前数据
+        date: 1
+        # 查询地址
+        url: https://swapp.singlewindow.cn/swceb2web/inventory/inventoryQuery