自动化立体仓库 - WMS系统
#
1
6 天以前 311d0b94fe67a711d3f382ff02c69b49069c2da3
#
4个文件已修改
88 ■■■■ 已修改文件
src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/AuthController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/license.lic 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java
@@ -157,7 +157,7 @@
                case "PUR_RECEIVEBIll": //已审核收料单查询
                    jsonObject.put("start_biztime",  latestUpdateTime);//业务起始日期
                    jsonObject.put("end_biztime", sdf1.format(now));//业务结束日期
                    jsonObject.put("billno", "CGSL-260106-000001");
                    jsonObject.put("billno", null);
                    jsonObject.put("billstatus", Arrays.asList("C"));//数据状态 [A:暂存, B:已提交, C:已审核]
                    jsonObject.put("start_auditdate", latestUpdateTime);
                    jsonObject.put("end_auditdate", sdf1.format(now));
src/main/java/com/zy/common/web/AuthController.java
@@ -54,19 +54,21 @@
    @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "登录")
    public R loginAction(String username, String password){
        //验证许可证是否有效
        if (!licenseTimer.getSystemSupport()){
        LicenseVerify licenseVerify = new LicenseVerify();
        boolean verify = licenseVerify.verify();
        if (!verify) {//许可证已失效
            return R.parse(CodeRes.SYSTEM_20001);
        }
        if (username.equals("super") && password.equals(Cools.md5(superPwd))) {
            Map<String, Object> res = new HashMap<>();
            res.put("username", username);
            res.put("token", Cools.enToken(System.currentTimeMillis() + username, superPwd));
            return R.ok(res);
        }
        EntityWrapper<User> userWrapper = new EntityWrapper<>();
        userWrapper.eq("username", username);
        User user = userService.selectOne(userWrapper);
        if (Cools.isEmpty(user)){
            if (username.equals("super") && password.equals(Cools.md5(superPwd))) {
                Map<String, Object> res = new HashMap<>();
                res.put("username", username);
                res.put("token", Cools.enToken(System.currentTimeMillis() + username, superPwd));
                return R.ok(res);
            }
            return R.parse(CodeRes.USER_10001);
        }
        if (user.getStatus()!=1){
src/main/java/com/zy/system/entity/license/LicenseCheckListener.java
@@ -72,48 +72,48 @@
        if(!Cools.isEmpty(licensePath)){
            logger.info("++++++++ 开始加载许可证 ++++++++");
//            try {
//                licenseTimer.getRemoteLicense();
//            } catch (Exception e) {
//            }
            try {
                licenseTimer.getRemoteLicense();
            } catch (Exception e) {
            }
            try {
//                LicenseVerifyParam param = new LicenseVerifyParam();
//                param.s     etSubject(subject);
//                param.setPublicAlias(publicAlias);
//                param.setStorePass(storePass);
//                param.setLicensePath(licensePath);
//                param.setPublicKeysStorePath(publicKeysStorePath);
//
                LicenseVerify licenseVerify = new LicenseVerify();
//
//                LicenseInfos latestLicense = licenseInfosService.getLatestLicense();
//                if (latestLicense == null) {
//                    logger.info("许可证不存在");
//                    return false;
//                }
                LicenseVerifyParam param = new LicenseVerifyParam();
                param.setSubject(subject);
                param.setPublicAlias(publicAlias);
                param.setStorePass(storePass);
                param.setLicensePath(licensePath);
                param.setPublicKeysStorePath(publicKeysStorePath);
                //安装证书
//                LicenseContent install = licenseVerify.install(param, latestLicense.getLicense());
                LicenseVerify licenseVerify = new LicenseVerify();
                LicenseInfos latestLicense = licenseInfosService.getLatestLicense();
                if (latestLicense == null) {
                    logger.info("许可证不存在");
                    return false;
                }
//                安装证书
                LicenseContent install = licenseVerify.install(param, latestLicense.getLicense());
                logger.info("++++++++ 许可证加载结束 ++++++++");
                licenseTimer.setSystemSupport(true);
                licenseTimer.setLicenseDays(11);
                return true;
//                licenseTimer.setSystemSupport(true);
//                licenseTimer.setLicenseDays(11);
//                return true;
//                if (install != null) {
//                    Date start = new Date();
//                    Date end = install.getNotAfter();
//                    Long starTime = start.getTime();
//                    Long endTime = end.getTime();
//                    Long num = endTime - starTime;//时间戳相差的毫秒数
//                    int day = (int) (num / 24 / 60 / 60 / 1000);
//                    licenseTimer.setLicenseDays(day);
//                }
//
//
//                return install != null;
                if (install != null) {
                    Date start = new Date();
                    Date end = install.getNotAfter();
                    Long starTime = start.getTime();
                    Long endTime = end.getTime();
                    Long num = endTime - starTime;//时间戳相差的毫秒数
                    int day = (int) (num / 24 / 60 / 60 / 1000);
                    licenseTimer.setLicenseDays(day);
                }
                return install != null;
            } catch (Exception e) {
                e.printStackTrace();
                return false;
src/main/resources/license.lic
Binary files differ