Просмотр исходного кода

修改取餐功能HS码相关,mybatis-plus增强 功能bug修善

xianwait 2 лет назад
Родитель
Сommit
630be88182
54 измененных файлов с 1251 добавлено и 245 удалено
  1. 1 1
      pom.xml
  2. 28 3
      willalp-admin/src/main/java/com/willalp/web/controller/api/ApiOneController.java
  3. 71 70
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppConsumerMachineController.java
  4. 0 36
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppController.java
  5. 6 7
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppPushController.java
  6. 1 0
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppTwoController.java
  7. 78 25
      willalp-admin/src/main/java/com/willalp/web/controller/app/CustomController.java
  8. 106 0
      willalp-admin/src/main/java/com/willalp/web/controller/clockingin/FileApprovalController.java
  9. 1 1
      willalp-admin/src/main/java/com/willalp/web/controller/news/AppHomeConfigController.java
  10. 11 10
      willalp-admin/src/main/java/com/willalp/web/controller/system/SysProfileController.java
  11. 7 1
      willalp-admin/src/main/java/com/willalp/web/controller/system/SysUserController.java
  12. 3 4
      willalp-admin/src/main/java/com/willalp/web/controller/yiqing/HsYiqingTaskController.java
  13. 4 4
      willalp-admin/src/main/resources/application-dev.yml
  14. 0 1
      willalp-admin/src/main/resources/application.yml
  15. 0 9
      willalp-biz/src/main/java/com/willalp/web/demo/twotable/service/impl/CarServiceImpl.java
  16. 20 0
      willalp-canteen/src/main/java/com/willalp/canteen/domain/resp/CustomGetOrderResp.java
  17. 10 0
      willalp-canteen/src/main/java/com/willalp/canteen/domain/vo/CustomGetOrderVo.java
  18. 17 0
      willalp-canteen/src/main/java/com/willalp/canteen/domain/vo/GetFoodUpLoadItemVo.java
  19. 27 0
      willalp-canteen/src/main/java/com/willalp/canteen/domain/vo/GetFoodUpLoadVo.java
  20. 7 0
      willalp-canteen/src/main/java/com/willalp/canteen/mapper/HsCanteenOrderMapper.java
  21. 1 0
      willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsCanteenMenuRegisterMapper.xml
  22. 7 0
      willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsCanteenOrderMapper.xml
  23. 7 0
      willalp-canteen/src/main/java/com/willalp/canteen/service/IHsCanteenOrderService.java
  24. 3 0
      willalp-canteen/src/main/java/com/willalp/canteen/service/impl/HsCanteenMenuRegisterServiceImpl.java
  25. 6 0
      willalp-canteen/src/main/java/com/willalp/canteen/service/impl/HsCanteenOrderServiceImpl.java
  26. 0 1
      willalp-clocking-in/src/main/java/com/willalp/clockingin/mapper/xml/BizLeaveMapper.xml
  27. 1 1
      willalp-clocking-in/src/main/java/com/willalp/clockingin/service/impl/BizLeaveServiceImpl.java
  28. 9 7
      willalp-clocking-in/src/main/java/com/willalp/files/mapper/HsOrgPersonnelFilesMapper.java
  29. 156 0
      willalp-clocking-in/src/main/java/com/willalp/flow/domain/FileApproval.java
  30. 22 0
      willalp-clocking-in/src/main/java/com/willalp/flow/mapper/FileApprovalMapper.java
  31. 54 0
      willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/FileApprovalMapper.xml
  32. 22 0
      willalp-clocking-in/src/main/java/com/willalp/flow/service/IFileApprovalService.java
  33. 35 0
      willalp-clocking-in/src/main/java/com/willalp/flow/service/impl/FileApprovalServiceImpl.java
  34. 1 1
      willalp-clocking-in/src/main/java/com/willalp/flow/service/impl/HsFlowEngineServiceImpl.java
  35. 2 2
      willalp-clocking-in/src/main/java/com/willalp/msg/mapper/HsAppUserMsgMapper.java
  36. 2 0
      willalp-clocking-in/src/main/java/com/willalp/msg/service/impl/HsAppUserMsgServiceImpl.java
  37. 2 2
      willalp-clocking-in/src/main/java/com/willalp/yiqing/service/impl/HsPositiveContiguityUserServiceImpl.java
  38. 29 0
      willalp-common/src/main/java/com/willalp/common/core/mybatis/EasyBaseMapper.java
  39. 25 0
      willalp-common/src/main/java/com/willalp/common/core/mybatis/EasySqlInjector.java
  40. 0 10
      willalp-common/src/main/java/com/willalp/common/core/service/impl/TreeCommonServiceImpl.java
  41. 5 4
      willalp-common/src/main/java/com/willalp/common/enums/PartternIdEnum.java
  42. 15 19
      willalp-common/src/main/java/com/willalp/common/uniapp/UinAppPushConfig.java
  43. 23 9
      willalp-common/src/main/java/com/willalp/common/uniapp/UniAppUtils.java
  44. 92 4
      willalp-common/src/main/java/com/willalp/common/utils/http/HttpUtils.java
  45. 8 0
      willalp-framework/src/main/java/com/willalp/framework/config/MybatisPlusConfig.java
  46. 0 1
      willalp-framework/src/main/java/com/willalp/framework/config/SecurityConfig.java
  47. 1 1
      willalp-ui/.env.production
  48. 53 0
      willalp-ui/src/api/flow/accessory.js
  49. 3 2
      willalp-ui/src/api/system/user.js
  50. 8 5
      willalp-ui/src/views/canteen/order/index.vue
  51. 2 2
      willalp-ui/src/views/canteen/scrk/index.vue
  52. 257 0
      willalp-ui/src/views/files/approval/index.vue
  53. 1 1
      willalp-ui/src/views/system/user/index.vue
  54. 1 1
      willalp-ui/vue.config.js

+ 1 - 1
pom.xml

@@ -23,7 +23,7 @@
         <bitwalker.version>1.21</bitwalker.version>
         <swagger.version>3.0.0</swagger.version>
         <kaptcha.version>2.3.2</kaptcha.version>
-        <mybatis-plus-boot-starter.version>3.4.2</mybatis-plus-boot-starter.version>
+        <mybatis-plus-boot-starter.version>3.5.2</mybatis-plus-boot-starter.version>
         <pagehelper.boot.version>1.3.1</pagehelper.boot.version>
         <fastjson.version>1.2.78</fastjson.version>
         <oshi.version>5.8.0</oshi.version>

+ 28 - 3
willalp-admin/src/main/java/com/willalp/web/controller/api/ApiOneController.java

@@ -4,14 +4,13 @@ import com.willalp.common.core.domain.AjaxResult;
 import com.willalp.common.core.domain.entity.SysUser;
 import com.willalp.common.enums.SysOrgCodeEnum;
 import com.willalp.common.utils.SecurityUtils;
+import com.willalp.common.utils.StringUtils;
 import com.willalp.files.domain.HsOrgPersonnelFiles;
 import com.willalp.files.service.IHsOrgPersonnelFilesService;
 import com.willalp.system.service.ISysUserService;
 import io.swagger.annotations.Api;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.net.URLDecoder;
@@ -48,4 +47,30 @@ public class ApiOneController {
         }
         return AjaxResult.success(userService.insertUser(user));
     }
+
+
+    /**
+     * 重置密码
+     *
+     * @param un
+     * @return
+     */
+    @GetMapping("/updatePwd")
+    public AjaxResult resetPwd(@RequestParam String un,@RequestParam String pwd) {
+        if (StringUtils.isNotBlank(un)) {
+            int result = 0;
+            if (StringUtils.isBlank(pwd)) {
+                result = userService.resetUserPwd(un, SecurityUtils.encryptPassword("123456"));
+            } else {
+                result = userService.resetUserPwd(un, SecurityUtils.encryptPassword(pwd));
+            }
+            if (result > 0) {
+                return AjaxResult.success();
+            } else {
+                return AjaxResult.error();
+            }
+        } else {
+            return AjaxResult.error("用户编码为空");
+        }
+    }
 }

+ 71 - 70
willalp-admin/src/main/java/com/willalp/web/controller/app/AppConsumerMachineController.java

@@ -144,6 +144,9 @@ public class AppConsumerMachineController extends BaseController {
             return AjaxResult.error(e.getMessage());
         }
         String type = jsonObject.getString("type");
+        String userCode = null;
+        String nickName = null;
+        String orgCode = null;
         LoginUser user = null;
         if (StringUtils.isNotBlank(type)) {
             if (StringUtils.equals(type, IC_CARD)) {
@@ -171,16 +174,18 @@ public class AppConsumerMachineController extends BaseController {
                 if (null == data) {
                     throw new BaseException("无效二维码,请使用HS码");
                 }
-                if (null == data.getString("u")) {
+                userCode = data.getString("u");
+                nickName = data.getString("un");
+                orgCode = data.getString("o");
+                if (null == userCode) {
                     throw new BaseException("无效二维码,请使用HS码");
                 }
-                String uToken = data.getString("u");
-                String token = "login_tokens:" + uToken;
-                user = redisCache.getCacheObject(token);
-                if (user == null) {
-                    return AjaxResult.error("不存在用户信息");
+                if (null == nickName) {
+                    throw new BaseException("无效二维码,请使用HS码");
+                }
+                if (null == orgCode) {
+                    throw new BaseException("无效二维码,请使用HS码");
                 }
-                user.setOrgCode(data.getString("o"));
             } else {
                 return AjaxResult.error("支付方式异常请重新支付");
             }
@@ -191,25 +196,22 @@ public class AppConsumerMachineController extends BaseController {
         String placeNumber = dn.getPlaceNumber();
         HsCanteenOrder canteenOrder = new HsCanteenOrder();
         canteenOrder.setDeviceNumber(deviceNumber);
-        if (null != user.getUser()) {
-            canteenOrder.setNickName(user.getUser().getNickName());
-        }
+        canteenOrder.setNickName(nickName);
         canteenOrder.setPaytime(new Date());
         canteenOrder.setConsumeSign(0);
+        canteenOrder.setMenuNumber("CM00000242");
         canteenOrder.setZfbz(2);
         canteenOrder.setOrderTotal(orderTotal);
-        canteenOrder.setJgid(user.getOrgCode());
+        canteenOrder.setJgid(orgCode);
         canteenOrder.setPlaceNumber(placeNumber);
-        if (null != user.getUser()) {
-            canteenOrder.setUserNumber(user.getUsername());
-        }
+        canteenOrder.setUserNumber(userCode);
         NumberRuleReq numberRuleReq = new NumberRuleReq();
         numberRuleReq.setRuleId(NumberRuleEnum.ORDER.getValue());
         numberRuleReq.setInput(String.valueOf(DateUtil.year(canteenOrder.getPaytime())).substring(2, 4));
         String number = numberRuleService.getNumber(numberRuleReq);
         canteenOrder.setOrderNumber(number);
         SysUserOrganization sysUserOrganization = uoService.getBaseMapper().selectOne(new QueryWrapper<SysUserOrganization>().
-                eq("login_name", user.getUsername()).eq("organization_code", user.getOrgCode()));
+                eq("login_name", userCode).eq("organization_code", orgCode));
         if (null != sysUserOrganization) {
             BigDecimal integral = sysUserOrganization.getIntegral();
             if (integral.compareTo(orderTotal) > 0) {
@@ -244,6 +246,9 @@ public class AppConsumerMachineController extends BaseController {
             return AjaxResult.error(e.getMessage());
         }
         String type = jsonObject.getString("type");
+        String userCode = null;
+        String nickName = null;
+        String orgCode = null;
         LoginUser user = null;
         if (StringUtils.isNotBlank(type)) {
             if (StringUtils.equals(type, IC_CARD)) {
@@ -268,69 +273,65 @@ public class AppConsumerMachineController extends BaseController {
                 if (null == data) {
                     throw new BaseException("无效二维码,请使用HS码");
                 }
-                if (null == data.getString("u")) {
+                userCode = data.getString("u");
+                nickName = data.getString("un");
+                orgCode = data.getString("o");
+                if (null == userCode) {
                     throw new BaseException("无效二维码,请使用HS码");
                 }
-                String uToken = data.getString("u");
-                String token = "login_tokens:" + uToken;
-                user = redisCache.getCacheObject(token);
-                if (user == null) {
-                    return AjaxResult.error("不存在用户信息");
+                if (null == nickName) {
+                    throw new BaseException("无效二维码,请使用HS码");
+                }
+                if (null == orgCode) {
+                    throw new BaseException("无效二维码,请使用HS码");
                 }
-                user.setOrgCode(data.getString("o"));
             } else {
                 return AjaxResult.error("支付方式异常请重试");
             }
         }
-        if (null != user) {
-            BigDecimal orderTotal = dn.getOrderTotal();
-            List<CuisineListResp> details = dn.getDetails();
-            String placeNumber = dn.getPlaceNumber();
-            HsCanteenOrder canteenOrder = new HsCanteenOrder();
-            canteenOrder.setDeviceNumber(deviceNumber);
-            if (null != user.getUser()) {
-                canteenOrder.setNickName(user.getUser().getNickName());
-            }
-            canteenOrder.setMenuNumber(details.get(0).getMenuNumber());
-            canteenOrder.setPaytime(new Date());
-            canteenOrder.setConsumeSign(0);
-            canteenOrder.setZfbz(2);
-            canteenOrder.setOrderTotal(orderTotal);
-            canteenOrder.setJgid(user.getOrgCode());
-            canteenOrder.setPlaceNumber(placeNumber);
-            if (null != user.getUser()) {
-                canteenOrder.setUserNumber(user.getUsername());
-            }
-            NumberRuleReq numberRuleReq = new NumberRuleReq();
-            numberRuleReq.setRuleId(NumberRuleEnum.ORDER.getValue());
-            numberRuleReq.setInput(String.valueOf(DateUtil.year(canteenOrder.getPaytime())).substring(2, 4));
-            String number = numberRuleService.getNumber(numberRuleReq);
-            canteenOrder.setOrderNumber(number);
-            List<HsCanteenOrderDetail> list = new ArrayList<>();
-            details.forEach(item -> {
-                HsCanteenOrderDetail canteenOrderDetail = new HsCanteenOrderDetail();
-                BeanUtils.copyProperties(item, canteenOrderDetail);
-                canteenOrderDetail.setOrderNumber(number);
-                list.add(canteenOrderDetail);
-            });
-            if (canteenOrderService.save(canteenOrder)) {
-                if (canteenOrderDetailService.saveBatch(list)) {
-                    HsCanteenDiningPlace jcd = canteenDiningPlaceService.getBaseMapper().selectOne(new QueryWrapper<HsCanteenDiningPlace>()
-                            .eq("place_number", placeNumber));
-                    String jgid = jcd.getJgid();
-                    SysUserOrganization sysUserOrganization = uoService.getBaseMapper().selectOne(new QueryWrapper<SysUserOrganization>().
-                            eq("login_name", user.getUsername()).eq("organization_code", jgid));
-                    if (null != sysUserOrganization) {
-                        BigDecimal integral = sysUserOrganization.getIntegral();
-                        if (integral.compareTo(orderTotal) > 0) {
-                            BigDecimal subtract = integral.subtract(orderTotal);
-                            sysUserOrganization.setIntegral(subtract);
-                            if (uoService.updateById(sysUserOrganization)) {
-                                return AjaxResult.success("PAYMENT_SUCCESSFUL");
-                            }
-                        } else {
-                            return AjaxResult.error("余额不足,请充值");
+        BigDecimal orderTotal = dn.getOrderTotal();
+        List<CuisineListResp> details = dn.getDetails();
+        String placeNumber = dn.getPlaceNumber();
+        HsCanteenOrder canteenOrder = new HsCanteenOrder();
+        canteenOrder.setDeviceNumber(deviceNumber);
+        canteenOrder.setNickName(nickName);
+        canteenOrder.setMenuNumber(details.get(0).getMenuNumber());
+        canteenOrder.setPaytime(new Date());
+        canteenOrder.setConsumeSign(0);
+        canteenOrder.setZfbz(2);
+        canteenOrder.setOrderTotal(orderTotal);
+        canteenOrder.setJgid(orgCode);
+        canteenOrder.setPlaceNumber(placeNumber);
+        canteenOrder.setUserNumber(userCode);
+        NumberRuleReq numberRuleReq = new NumberRuleReq();
+        numberRuleReq.setRuleId(NumberRuleEnum.ORDER.getValue());
+        numberRuleReq.setInput(String.valueOf(DateUtil.year(canteenOrder.getPaytime())).substring(2, 4));
+        String number = numberRuleService.getNumber(numberRuleReq);
+        canteenOrder.setOrderNumber(number);
+        List<HsCanteenOrderDetail> list = new ArrayList<>();
+        details.forEach(item -> {
+            HsCanteenOrderDetail canteenOrderDetail = new HsCanteenOrderDetail();
+            BeanUtils.copyProperties(item, canteenOrderDetail);
+            canteenOrderDetail.setOrderNumber(number);
+            list.add(canteenOrderDetail);
+        });
+        if (canteenOrderService.save(canteenOrder)) {
+            if (canteenOrderDetailService.saveBatch(list)) {
+                HsCanteenDiningPlace jcd = canteenDiningPlaceService.getBaseMapper().selectOne(new QueryWrapper<HsCanteenDiningPlace>()
+                        .eq("place_number", placeNumber));
+                String jgid = jcd.getJgid();
+                SysUserOrganization sysUserOrganization = uoService.getBaseMapper().selectOne(new QueryWrapper<SysUserOrganization>().
+                        eq("login_name", userCode).eq("organization_code", jgid));
+                if (null != sysUserOrganization) {
+                    BigDecimal integral = sysUserOrganization.getIntegral();
+                    if (integral.compareTo(orderTotal) > 0) {
+                        BigDecimal subtract = integral.subtract(orderTotal);
+                        sysUserOrganization.setIntegral(subtract);
+                        if (uoService.updateById(sysUserOrganization)) {
+                            return AjaxResult.success("PAYMENT_SUCCESSFUL");
                         }
+                    } else {
+                        return AjaxResult.error("余额不足,请充值");
                     }
                 }
             }

+ 0 - 36
willalp-admin/src/main/java/com/willalp/web/controller/app/AppController.java

@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.willalp.app.service.IHsAppHomeService;
 import com.willalp.canteen.domain.*;
@@ -24,7 +23,6 @@ import com.willalp.common.enums.PlaceEnum;
 import com.willalp.common.exception.base.BaseException;
 import com.willalp.common.utils.DateUtils;
 import com.willalp.common.utils.SecurityUtils;
-import com.willalp.common.utils.StringUtils;
 import com.willalp.common.utils.bean.BeanUtils;
 import com.willalp.consume.domain.ConsumeMaintain;
 import com.willalp.consume.service.IConsumeMaintainService;
@@ -738,38 +736,4 @@ public class AppController extends BaseController {
     @Resource
     private IHsOrgPersonnelFilesService orgPersonnelFilesService;
 
-    /**
-     * 获取通知公告
-     *
-     * @param un
-     * @param phone
-     * @return
-     */
-    @GetMapping("/resetPwd")
-    public AjaxResult resetPwd(@RequestParam String un, @RequestParam String phone) {
-        if (StringUtils.isBlank(un)) {
-            return AjaxResult.error("姓名不能为空");
-        }
-        if (StringUtils.isBlank(phone)) {
-            return AjaxResult.error("手机号不能为空");
-        }
-        HsOrgPersonnelFiles hsOrgPersonnelFiles = orgPersonnelFilesService.getBaseMapper().selectOne(new QueryWrapper<HsOrgPersonnelFiles>()
-                .eq("user_name", un)
-                .eq("phone", phone));
-        if (null != hsOrgPersonnelFiles) {
-            String userCode = hsOrgPersonnelFiles.getUserCode();
-            if (StringUtils.isNotBlank(userCode)) {
-                if (userService.resetUserPwd(userCode, SecurityUtils.encryptPassword("123456")) > 0) {
-                    return AjaxResult.success();
-                } else {
-                    return AjaxResult.error();
-                }
-            } else {
-                return AjaxResult.error("账号非法");
-            }
-        } else {
-            return AjaxResult.error("找不到对应用户");
-        }
-    }
-
 }

+ 6 - 7
willalp-admin/src/main/java/com/willalp/web/controller/app/AppPushController.java

@@ -2,7 +2,6 @@ package com.willalp.web.controller.app;
 
 import com.willalp.common.core.controller.BaseController;
 import com.willalp.common.core.domain.AjaxResult;
-import com.willalp.common.uniapp.UniAppUtils;
 import com.willalp.common.utils.ip.IpUtils;
 import com.willalp.push.service.IHsAppPushService;
 import com.willalp.yiqing.domain.vo.UserQueResultVo;
@@ -22,8 +21,8 @@ import javax.servlet.http.HttpServletRequest;
 @RequestMapping("/api/push/")
 public class AppPushController extends BaseController {
 
-    @Resource
-    private UniAppUtils uniAppUtils;
+//    @Resource
+//    private UniAppUtils uniAppUtils;
 
     @Resource
     private IHsAppPushService pushService;
@@ -37,10 +36,10 @@ public class AppPushController extends BaseController {
 
     @RequestMapping("off/line")
     public AjaxResult offLinePush() {
-        uniAppUtils.pushMsgOffLine(
-                "b588d2a110c79b7591de409c17719ef2",
-                "测试标题",
-                "测试内容");
+//        uniAppUtils.pushMsgOffLine(
+//                "b588d2a110c79b7591de409c17719ef2",
+//                "测试标题",
+//                "测试内容");
         return AjaxResult.success();
     }
 }

+ 1 - 0
willalp-admin/src/main/java/com/willalp/web/controller/app/AppTwoController.java

@@ -112,4 +112,5 @@ public class AppTwoController extends BaseController {
     public AjaxResult msgSum(HttpServletRequest request) {
         return AjaxResult.success(hsAppUserMsgService.msgSum(request.getHeader("UserName")));
     }
+
 }

+ 78 - 25
willalp-admin/src/main/java/com/willalp/web/controller/app/CustomController.java

@@ -2,6 +2,7 @@ package com.willalp.web.controller.app;
 
 import cn.hutool.core.date.DateUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.willalp.canteen.domain.*;
 import com.willalp.canteen.domain.req.CustomMenuSaveReq;
@@ -11,6 +12,8 @@ import com.willalp.canteen.domain.resp.CuisineListResp;
 import com.willalp.canteen.domain.resp.CustomGetOrderResp;
 import com.willalp.canteen.domain.resp.UsableOrderResp;
 import com.willalp.canteen.domain.vo.CustomGetOrderVo;
+import com.willalp.canteen.domain.vo.GetFoodUpLoadItemVo;
+import com.willalp.canteen.domain.vo.GetFoodUpLoadVo;
 import com.willalp.canteen.service.*;
 import com.willalp.common.core.controller.BaseController;
 import com.willalp.common.core.domain.AjaxResult;
@@ -34,6 +37,8 @@ import com.willalp.system.domain.SysUserOrganization;
 import com.willalp.system.service.ISysConfigService;
 import com.willalp.system.service.ISysUserOrganizationService;
 import com.willalp.system.service.ISysUserService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -53,6 +58,8 @@ import java.util.stream.Collectors;
 @RequestMapping("/custom")
 public class CustomController extends BaseController {
 
+    private static final Log LOG = LogFactory.getLog(CustomController.class);
+
     @Autowired
     IHsCanteenMenuService hsCanteenMenuService;
 
@@ -92,6 +99,7 @@ public class CustomController extends BaseController {
     @Autowired
     private ISysConfigService sysConfigService;
 
+
     private final String IC_CARD = "IC_CARD";
     private final String HS_CODE = "HS_CODE";
 
@@ -118,29 +126,29 @@ public class CustomController extends BaseController {
                         System.out.println("使用IC卡:" + bodyText);
                     } else
                         //HS码
-                        if (length == 86) {
+                        if (length > 8) {
                             type = HS_CODE;
                             dataStr = bodyText;
-                            System.out.println("使用HS码:" + bodyText);
-                        } else
-                            //同时刷卡扫码
-                            if (length > 86) {
-                                if (bodyText.indexOf("{") != 0) {
-                                    type = IC_CARD;
-                                    dataStr = bodyText.substring(0, bodyText.indexOf("{"));
-                                } else {
-                                    type = HS_CODE;
-                                    dataStr = bodyText.substring(bodyText.indexOf("{"), bodyText.indexOf("}") + 1);
-                                }
-                                System.out.println(bodyText);
-                                System.out.println("同时使用:" + dataStr);
-                            } else {
-                                return AjaxResult.error("无效的非法结果");
-                            }
+                            LOG.debug("使用HS码:" + bodyText);
+                        }
+//                        else if (length > 86) {
+//                            //同时刷卡扫码
+//                            if (bodyText.indexOf("{") != 0) {
+//                                type = IC_CARD;
+//                                dataStr = bodyText.substring(0, bodyText.indexOf("{"));
+//                            } else {
+//                                type = HS_CODE;
+//                                dataStr = bodyText.substring(bodyText.indexOf("{"), bodyText.indexOf("}") + 1);
+//                            }
+//                            System.out.println(bodyText);
+//                            System.out.println("同时使用:" + dataStr);
+//                        } else {
+//                            return AjaxResult.error("无效的非法结果");
+//                        }
                     jsonObject.put("type", type);
                     jsonObject.put("data", dataStr);
-                    redisCache.setCacheObject(dn, jsonObject, 2, TimeUnit.MINUTES);
-                    return AjaxResult.error("无效二维码,请使用 HS码 再次扫描");
+                    redisCache.setCacheObject(dn, jsonObject, 20, TimeUnit.SECONDS);
+                    return AjaxResult.error("无效二维码,请使用[HS码]再次扫描");
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
@@ -537,20 +545,65 @@ public class CustomController extends BaseController {
         customGetOrderVo.setPlaceNumber(req.getPlaceNumber());
         //查询订单信息
         List<CustomGetOrderResp> orders = hsCanteenOrderService.getOrderNow(customGetOrderVo);
+        result.put("orders", orders);
+        if (0 == orders.size()) {
+            return AjaxResult.success(result);
+        }
+        CustomGetOrderResp menuNow = hsCanteenOrderService.getMenuNow(customGetOrderVo);
+        result.put("menu", menuNow);
+        if (menuNow != null) {
+            List<HsCanteenOrderDetail> orderDetails = hsCanteenOrderDetailService.getBaseMapper().selectList(new QueryWrapper<HsCanteenOrderDetail>()
+                    .eq("menu_number", menuNow.getMenuNumber()));
+            result.put("orderDetails", orderDetails);
+        }
         Map<Integer, List<CustomGetOrderResp>> groupMap = orders.stream().collect(Collectors.groupingBy(CustomGetOrderResp::getZfbz));
         //未取餐
-        if (groupMap.get(0) != null) {
-            result.put("wait", groupMap.get(0).size());
-        } else {
-            result.put("wait", 0);
-        }
+        result.put("wait", orders.size());
         //已取餐
         if (groupMap.get(2) != null) {
             result.put("finish", groupMap.get(2).size());
         } else {
             result.put("finish", 0);
         }
-
         return AjaxResult.success(result);
     }
+
+
+    /**
+     * 定时上传取餐数据
+     *
+     * @return
+     */
+    @RequestMapping("/timing/upload/getFoodData")
+    public AjaxResult timingUpLoadGetFoodData(@RequestBody GetFoodUpLoadVo getFoodUpLoad) {
+        List<HsCanteenOrder> ordersUpdate = new ArrayList<>(16);
+        List<String> numbers = new ArrayList<String>();
+        List<String> numbersUpdate = new ArrayList<String>();
+        if (getFoodUpLoad.getList().size() <= 0) {
+            return AjaxResult.error();
+        }
+        for (GetFoodUpLoadItemVo food : getFoodUpLoad.getList()) {
+            numbers.add(food.getOrderNumber());
+        }
+        List<HsCanteenOrder> orders = hsCanteenOrderService.getBaseMapper().selectList(
+                new QueryWrapper<HsCanteenOrder>().in("order_number", numbers));
+        orders.forEach(order -> {
+            for (GetFoodUpLoadItemVo food : getFoodUpLoad.getList()) {
+                if (StringUtils.equals(order.getOrderNumber(), food.getOrderNumber()) &&
+                        order.getZfbz() != 2) {
+                    order.setZfbz(2);
+                    ordersUpdate.add(order);
+                    numbersUpdate.add(order.getOrderNumber());
+                }
+            }
+        });
+        if (0 < ordersUpdate.size()) {
+            if (hsCanteenOrderService.updateBatchById(ordersUpdate)) {
+                return AjaxResult.success(numbersUpdate);
+            }
+        } else {
+            return AjaxResult.error("ALL Data Already Update Please Remove");
+        }
+        return AjaxResult.error();
+    }
 }

+ 106 - 0
willalp-admin/src/main/java/com/willalp/web/controller/clockingin/FileApprovalController.java

@@ -0,0 +1,106 @@
+package com.willalp.flow.controller;
+
+import com.willalp.common.annotation.Log;
+import com.willalp.common.core.controller.BaseController;
+import com.willalp.common.core.domain.AjaxResult;
+import com.willalp.common.core.page.TableDataInfo;
+import com.willalp.common.enums.BusinessType;
+import com.willalp.common.utils.DateUtils;
+import com.willalp.common.utils.SecurityUtils;
+import com.willalp.common.utils.poi.ExcelUtil;
+import com.willalp.flow.domain.FileApproval;
+import com.willalp.flow.service.IFileApprovalService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 文件审批业务Controller
+ *
+ * @author willalp
+ * @date 2022-11-30
+ */
+@RestController
+@RequestMapping("/flow/accessory")
+public class FileApprovalController extends BaseController
+{
+    @Resource
+    private IFileApprovalService fileApprovalService;
+
+    /**
+     * 查询文件审批业务列表
+     */
+    @PreAuthorize("@ss.hasPermi('flow:accessory:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FileApproval fileApproval)
+    {
+        startPage();
+        List<FileApproval> list = fileApprovalService.selectFileApprovalList(fileApproval);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出文件审批业务列表
+     */
+    @PreAuthorize("@ss.hasPermi('flow:accessory:export')")
+    @Log(title = "文件审批业务", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FileApproval fileApproval)
+    {
+        List<FileApproval> list = fileApprovalService.selectFileApprovalList(fileApproval);
+        ExcelUtil<FileApproval> util = new ExcelUtil<FileApproval>(FileApproval.class);
+        return util.exportExcel(list, "文件审批业务数据");
+    }
+
+    /**
+     * 获取文件审批业务详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('flow:accessory:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fileApprovalService.getById(id));
+    }
+
+    /**
+     * 新增文件审批业务
+     */
+    @PreAuthorize("@ss.hasPermi('flow:accessory:add')")
+    @Log(title = "文件审批业务", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FileApproval fileApproval)
+    {
+        fileApproval.setApplyUserId(getUsername());
+        fileApproval.setApplyUserName(getLoginUser().getUser().getNickName());
+        fileApproval.setCreateBy(SecurityUtils.getUsername());
+        fileApproval.setCreateTime(DateUtils.getNowDate());
+        return toAjax(fileApprovalService.save(fileApproval));
+    }
+
+    /**
+     * 修改文件审批业务
+     */
+    @PreAuthorize("@ss.hasPermi('flow:accessory:edit')")
+    @Log(title = "文件审批业务", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FileApproval fileApproval)
+    {
+        fileApproval.setUpdateBy(SecurityUtils.getUsername());
+        fileApproval.setUpdateTime(DateUtils.getNowDate());
+        return toAjax(fileApprovalService.updateById(fileApproval));
+    }
+
+    /**
+     * 删除文件审批业务
+     */
+    @PreAuthorize("@ss.hasPermi('flow:accessory:remove')")
+    @Log(title = "文件审批业务", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fileApprovalService.removeByIds(Arrays.asList(ids)));
+    }
+}

+ 1 - 1
willalp-admin/src/main/java/com/willalp/web/controller/news/AppHomeConfigController.java

@@ -91,7 +91,7 @@ public class AppHomeConfigController extends BaseController {
                 }
                 JSONObject jsonObject;
                 List<HsAppHomeData> cacheList = new ArrayList<>();
-                Integer count = 0;
+                long count = 0;
                 QueryWrapper<HsAppHomeData> queryWrapper = new QueryWrapper<HsAppHomeData>()
                         .notIn("home_parent_id", 0L);
                 try {

+ 11 - 10
willalp-admin/src/main/java/com/willalp/web/controller/system/SysProfileController.java

@@ -1,15 +1,5 @@
 package com.willalp.web.controller.system;
 
-import java.io.IOException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
 import com.willalp.common.annotation.Log;
 import com.willalp.common.config.WillalpConfig;
 import com.willalp.common.constant.UserConstants;
@@ -21,8 +11,15 @@ import com.willalp.common.enums.BusinessType;
 import com.willalp.common.utils.SecurityUtils;
 import com.willalp.common.utils.StringUtils;
 import com.willalp.common.utils.file.FileUploadUtils;
+import com.willalp.common.utils.http.HttpUtils;
 import com.willalp.framework.web.service.TokenService;
 import com.willalp.system.service.ISysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.IOException;
 
 /**
  * 个人信息 业务处理
@@ -87,6 +84,9 @@ public class SysProfileController extends BaseController
         return AjaxResult.error("修改个人信息异常,请联系管理员");
     }
 
+    @Resource
+    private HttpUtils httpUtils;
+
     /**
      * 重置密码
      */
@@ -107,6 +107,7 @@ public class SysProfileController extends BaseController
         }
         if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0)
         {
+            httpUtils.httpsGet(httpUtils.getHttpsMasterUrl("/updatePwd?un=" + userName + "&pwd=" + newPassword));
             // 更新缓存用户密码
             loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
             tokenService.setLoginUser(loginUser);

+ 7 - 1
willalp-admin/src/main/java/com/willalp/web/controller/system/SysUserController.java

@@ -11,6 +11,7 @@ import com.willalp.common.core.page.TableDataInfo;
 import com.willalp.common.enums.BusinessType;
 import com.willalp.common.utils.SecurityUtils;
 import com.willalp.common.utils.StringUtils;
+import com.willalp.common.utils.http.HttpUtils;
 import com.willalp.common.utils.poi.ExcelUtil;
 import com.willalp.system.domain.SysUserOrganization;
 import com.willalp.system.service.ISysPostService;
@@ -25,6 +26,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -162,6 +164,9 @@ public class SysUserController extends BaseController {
         return toAjax(userService.deleteUserByIds(userIds));
     }
 
+    @Resource
+    private HttpUtils httpUtils;
+
     /**
      * 重置密码
      */
@@ -170,8 +175,9 @@ public class SysUserController extends BaseController {
     @PutMapping("/resetPwd")
     public AjaxResult resetPwd(@RequestBody SysUser user) {
         userService.checkUserAllowed(user);
-        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
         user.setUpdateBy(getUsername());
+        httpUtils.httpsGet(httpUtils.getHttpsMasterUrl("/updatePwd?un=" + user.getUserName() + "&pwd=" + user.getPassword()));
+        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
         return toAjax(userService.resetPwd(user));
     }
 

+ 3 - 4
willalp-admin/src/main/java/com/willalp/web/controller/yiqing/HsYiqingTaskController.java

@@ -8,7 +8,6 @@ import com.willalp.common.core.domain.AjaxResult;
 import com.willalp.common.core.page.TableDataInfo;
 import com.willalp.common.enums.BusinessType;
 import com.willalp.common.exception.base.BaseException;
-import com.willalp.common.uniapp.UniAppUtils;
 import com.willalp.common.utils.DateUtils;
 import com.willalp.common.utils.SecurityUtils;
 import com.willalp.common.utils.StringUtils;
@@ -56,8 +55,8 @@ public class HsYiqingTaskController extends BaseController {
     @Resource
     private IHsAppPushService pushService;
 
-    @Resource
-    private UniAppUtils uniAppUtils;
+//    @Resource
+//    private UniAppUtils uniAppUtils;
 
     /**
      * 查询疫情防控-任务排班列表
@@ -84,7 +83,7 @@ public class HsYiqingTaskController extends BaseController {
         });
         userNos.forEach(u-> hsAppPushes.forEach(p -> {
             if (StringUtils.equals(u, p.getUserNo())) {
-                uniAppUtils.pushMsgOffLine(p.getPushCid(), "测试标题", "测试内容");
+//                uniAppUtils.pushMsgOffLine(p.getPushCid(), "测试标题", "测试内容");
             }
         }));
         belongUserService.updateBatchById(belongUsers);

+ 4 - 4
willalp-admin/src/main/resources/application-dev.yml

@@ -32,13 +32,13 @@ spring:
       # 主库数据源
       master:
         #url: jdbc:mysql://47.103.86.55:3306/willalp_pns_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-        url: jdbc:mysql://114.115.142.166:3306/willalp_pns_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#        url: jdbc:mysql://114.115.142.166:3306/willalp_pns_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
         #url: jdbc:mysql://114.115.142.166:3306/willalp_pns_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-#        url: jdbc:mysql://localhost:3306/willalp_pns_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        url: jdbc:mysql://localhost:3306/willalp-pns-ml-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
         username: root
         #password: annaru_mysql
-        password: willalp_mysql
-#        password: 123456
+#        password: willalp_mysql
+        password: 123456
       # 从库数据源
       slave:
       # 从数据源开关/默认关闭

+ 0 - 1
willalp-admin/src/main/resources/application.yml

@@ -66,7 +66,6 @@ mybatis-plus:
       #主键类型 com.baomidou.mybatisplus.annotation.IdType";
       id-type: ASSIGN_ID
       #字段策略 com.baomidou.mybatisplus.annotation.FieldStrategy"
-      select-strategy: NOT_EMPTY
       insert-strategy: NOT_EMPTY
       update-strategy: IGNORED
       #逻辑删除配置(下面3个配置)

+ 0 - 9
willalp-biz/src/main/java/com/willalp/web/demo/twotable/service/impl/CarServiceImpl.java

@@ -12,7 +12,6 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.Serializable;
-import java.util.Collection;
 
 @Transactional
 @Service("carService")
@@ -25,12 +24,4 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
         carModelService.remove(new QueryWrapper<CarModel>().eq("car_id",id));
         return super.removeById(id);
     }
-
-    @Override
-    public boolean removeByIds(Collection<? extends Serializable> idList) {
-        idList.forEach(id ->{
-            removeById(id);
-        });
-        return true;
-    }
 }

+ 20 - 0
willalp-canteen/src/main/java/com/willalp/canteen/domain/resp/CustomGetOrderResp.java

@@ -25,6 +25,10 @@ public class CustomGetOrderResp {
 
     private Integer zfbz;
 
+    private String menuName;
+
+    private String menuNumber;
+
     public String getOrderNumber() {
         return orderNumber;
     }
@@ -88,4 +92,20 @@ public class CustomGetOrderResp {
     public void setZfbz(Integer zfbz) {
         this.zfbz = zfbz;
     }
+
+    public String getMenuName() {
+        return menuName;
+    }
+
+    public void setMenuName(String menuName) {
+        this.menuName = menuName;
+    }
+
+    public String getMenuNumber() {
+        return menuNumber;
+    }
+
+    public void setMenuNumber(String menuNumber) {
+        this.menuNumber = menuNumber;
+    }
 }

+ 10 - 0
willalp-canteen/src/main/java/com/willalp/canteen/domain/vo/CustomGetOrderVo.java

@@ -12,6 +12,8 @@ public class CustomGetOrderVo {
 
     private String placeNumber;
 
+    private String menuName;
+
     public String getUserNumber() {
         return userNumber;
     }
@@ -51,4 +53,12 @@ public class CustomGetOrderVo {
     public void setPlaceNumber(String placeNumber) {
         this.placeNumber = placeNumber;
     }
+
+    public String getMenuName() {
+        return menuName;
+    }
+
+    public void setMenuName(String menuName) {
+        this.menuName = menuName;
+    }
 }

+ 17 - 0
willalp-canteen/src/main/java/com/willalp/canteen/domain/vo/GetFoodUpLoadItemVo.java

@@ -0,0 +1,17 @@
+package com.willalp.canteen.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+/**
+ * @author Administrator
+ */
+@Data
+public class GetFoodUpLoadItemVo {
+    @JsonProperty("orderNumber")
+    private String orderNumber;
+    @JsonProperty("userNumber")
+    private String userNumber;
+    @JsonProperty("zfbz")
+    private Integer zfbz;
+}

+ 27 - 0
willalp-canteen/src/main/java/com/willalp/canteen/domain/vo/GetFoodUpLoadVo.java

@@ -0,0 +1,27 @@
+/**
+ * @projectName willalp-pns-ml
+ * @package com.willalp.canteen.domain.vo
+ * @className com.willalp.canteen.domain.vo.GetFoodUpLoadVo
+ * @copyright Copyright 2019 HuiShan, Inc All rights reserved.
+ */
+package com.willalp.canteen.domain.vo;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * GetFoodUpLoadVo
+ * @description 消费机上传取餐数据伪类
+ * @author hs
+ * @date 2022/12/5 14:50
+ * @version 1.0
+ */
+
+@NoArgsConstructor
+@Data
+public class GetFoodUpLoadVo {
+    private List<GetFoodUpLoadItemVo> list;
+}
+ 

+ 7 - 0
willalp-canteen/src/main/java/com/willalp/canteen/mapper/HsCanteenOrderMapper.java

@@ -51,6 +51,13 @@ public interface HsCanteenOrderMapper extends BaseMapper<HsCanteenOrder>
      */
     List<CustomGetOrderResp> getOrderNow(CustomGetOrderVo customGetOrderVo);
 
+    /**
+     * 获取当前时间可取订单
+     * @param customGetOrderVo
+     * @return
+     */
+    CustomGetOrderResp getMenuNow(CustomGetOrderVo customGetOrderVo);
+
     /**
      * 作废食堂订单
      * @param jgid

+ 1 - 0
willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsCanteenMenuRegisterMapper.xml

@@ -121,4 +121,5 @@
             </if>
         </where>
     </select>
+
 </mapper>

+ 7 - 0
willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsCanteenOrderMapper.xml

@@ -98,6 +98,13 @@
         <if test="jgid != null and jgid != ''">and a.jgid = #{jgid}</if>
     </select>
 
+    <select id="getMenuNow" parameterType="CustomGetOrderVo" resultType="CustomGetOrderResp">
+        SELECT b.menu_number menuNumber,
+               b.menu_name   menuName
+        FROM hs_canteen_menu b
+        WHERE Date(b.use_date) = #{useDate}
+          and b.period_id = #{periodId}
+    </select>
 
     <update id="updateCanteenOrderZfpb">
         update hs_canteen_order

+ 7 - 0
willalp-canteen/src/main/java/com/willalp/canteen/service/IHsCanteenOrderService.java

@@ -67,6 +67,13 @@ public interface IHsCanteenOrderService extends IService<HsCanteenOrder> {
      */
     public List<CustomGetOrderResp> getOrderNow(CustomGetOrderVo customGetOrderVo);
 
+    /**
+     * 获取当前时间可取订单
+     * @param customGetOrderVo
+     * @return
+     */
+    CustomGetOrderResp getMenuNow(CustomGetOrderVo customGetOrderVo);
+
     /**
      * 近一月订单
      *

+ 3 - 0
willalp-canteen/src/main/java/com/willalp/canteen/service/impl/HsCanteenMenuRegisterServiceImpl.java

@@ -85,6 +85,9 @@ public class HsCanteenMenuRegisterServiceImpl extends ServiceImpl<HsCanteenMenuR
         List<HsCanteenMenu> hsCanteenMenus = canteenMenuMapper.selectList(new QueryWrapper<HsCanteenMenu>()
                 .eq("dining_place", placeNumber)
                 .in("pattern_id", PartternIdEnum.FREEDOM.getValue()));
+        if (0 == hsCanteenMenus.size()) {
+            return new OrderPaginatedListResq();
+        }
         List<CuisineListResp> list = new ArrayList<>();
         String menuNumber = hsCanteenMenus.get(0).getMenuNumber();
         OrderPaginatedListResq orderPaginatedListResq = new OrderPaginatedListResq();

+ 6 - 0
willalp-canteen/src/main/java/com/willalp/canteen/service/impl/HsCanteenOrderServiceImpl.java

@@ -287,6 +287,12 @@ public class HsCanteenOrderServiceImpl extends ServiceImpl<HsCanteenOrderMapper,
         return hsCanteenOrderMapper.getOrderNow(customGetOrderVo);
     }
 
+    @Override
+    public CustomGetOrderResp getMenuNow(CustomGetOrderVo customGetOrderVo) {
+        return hsCanteenOrderMapper.getMenuNow(customGetOrderVo);
+    }
+
+
     /**
      * 近一月订单量
      *

+ 0 - 1
willalp-clocking-in/src/main/java/com/willalp/clockingin/mapper/xml/BizLeaveMapper.xml

@@ -3,7 +3,6 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.willalp.clockingin.mapper.BizLeaveMapper">
-
     <resultMap type="BizLeave" id="BizLeaveResult">
         <result property="id" column="id"/>
         <result property="type" column="type"/>

+ 1 - 1
willalp-clocking-in/src/main/java/com/willalp/clockingin/service/impl/BizLeaveServiceImpl.java

@@ -62,7 +62,7 @@ public class BizLeaveServiceImpl extends ServiceImpl<BizLeaveMapper, BizLeave> i
     public List<BizLeave> selectPersonnelList(BizLeave bizLeave) {
         String username = SecurityUtils.getUsername();
         if (StringUtils.isNotBlank(username)) {
-            int department = orgPersonnelFilesService.count(new QueryWrapper<HsOrgPersonnelFiles>()
+            long department = orgPersonnelFilesService.count(new QueryWrapper<HsOrgPersonnelFiles>()
                     .eq("department", "319")
                     .eq("user_code", username));
             if (department > 0) {

+ 9 - 7
willalp-clocking-in/src/main/java/com/willalp/files/mapper/HsOrgPersonnelFilesMapper.java

@@ -23,14 +23,16 @@ public interface HsOrgPersonnelFilesMapper extends BaseMapper<HsOrgPersonnelFile
 
 
     @Select("SELECT\n" +
-            "\tuser_code,\n" +
-            "\thopf.user_name,\n" +
-            "\thopf.phone,\n" +
+            "\thopf.user_name user_code,\n" +
+            "\thopf.nick_name as user_name,\n" +
+            "\thopf.phonenumber as phone,\n" +
             "\tsuo.user_type\n" +
             "FROM\n" +
-            "\ths_org_personnel_files hopf\n" +
-            "\tleft JOIN sys_user_organization suo on hopf.user_code = suo.login_name\n" +
-            "\tWHERE suo.organization_code = 'G00000007'" +
-            "\tGROUP BY hopf.user_code")
+            "\tsys_user hopf\n" +
+            "\tleft JOIN sys_user_organization suo on hopf.user_name = suo.login_name\n" +
+            "\tWHERE suo.organization_code = 'G00000007' " +
+            "AND hopf.user_type = '1'" +
+            "AND hopf.del_flag = '0'" +
+            "\tGROUP BY hopf.user_name")
     List<HsOrgPersonnelFiles> templateHsOrgPersonnelFilesList();
 }

+ 156 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/domain/FileApproval.java

@@ -0,0 +1,156 @@
+package com.willalp.flow.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.willalp.common.annotation.Excel;
+import com.willalp.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 文件审批业务对象 file_approval
+ *
+ * @author willalp
+ * @date 2022-11-30
+ */
+
+@TableName("file_approval")
+public class FileApproval extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId
+    private String id;
+
+    /**
+     * 审批标题
+     */
+    @Excel(name = "审批标题")
+    private String title;
+
+    /**
+     * 附件列表
+     */
+    @Excel(name = "附件列表")
+    private String fileList;
+
+    /**
+     * 图片列表
+     */
+    @Excel(name = "图片列表")
+    private String imgList;
+
+    /**
+     * 申请人user_code
+     */
+    @Excel(name = "申请人user_code")
+    private String applyUserId;
+
+    /**
+     * 申请人
+     */
+    @Excel(name = "申请人")
+    private String applyUserName;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date endTime;
+
+    /**
+     * 是否删除(0.未删除;1.已删除)
+     */
+    @TableLogic
+    private Integer isDelete;
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setFileList(String fileList) {
+        this.fileList = fileList;
+    }
+
+    public String getFileList() {
+        return fileList;
+    }
+
+    public void setImgList(String imgList) {
+        this.imgList = imgList;
+    }
+
+    public String getImgList() {
+        return imgList;
+    }
+
+    public void setApplyUserId(String applyUserId) {
+        this.applyUserId = applyUserId;
+    }
+
+    public String getApplyUserId() {
+        return applyUserId;
+    }
+
+    public void setApplyUserName(String applyUserName) {
+        this.applyUserName = applyUserName;
+    }
+
+    public String getApplyUserName() {
+        return applyUserName;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("title", getTitle())
+                .append("fileList", getFileList())
+                .append("imgList", getImgList())
+                .append("applyUserId", getApplyUserId())
+                .append("applyUserName", getApplyUserName())
+                .append("endTime", getEndTime())
+                .append("isDelete", getIsDelete())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("remark", getRemark())
+                .toString();
+    }
+}

+ 22 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/mapper/FileApprovalMapper.java

@@ -0,0 +1,22 @@
+package com.willalp.flow.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import java.util.List;
+import com.willalp.flow.domain.FileApproval;
+
+/**
+ * 文件审批业务Mapper接口
+ *
+ * @author willalp
+ * @date 2022-11-30
+ */
+public interface FileApprovalMapper extends BaseMapper<FileApproval>
+{
+    /**
+     * 查询文件审批业务列表
+     *
+     * @param fileApproval 文件审批业务
+     * @return 文件审批业务集合
+     */
+    List<FileApproval> selectFileApprovalList(FileApproval fileApproval);
+}

+ 54 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/FileApprovalMapper.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.willalp.flow.mapper.FileApprovalMapper">
+
+    <resultMap type="com.willalp.flow.domain.FileApproval" id="FileApprovalResult">
+                    <result property="id" column="id"/>
+                    <result property="title" column="title"/>
+                    <result property="fileList" column="file_list"/>
+                    <result property="imgList" column="img_list"/>
+                    <result property="applyUserId" column="apply_user_id"/>
+                    <result property="applyUserName" column="apply_user_name"/>
+                    <result property="endTime" column="end_time"/>
+                    <result property="isDelete" column="is_delete"/>
+                    <result property="createBy" column="create_by"/>
+                    <result property="createTime" column="create_time"/>
+                    <result property="updateBy" column="update_by"/>
+                    <result property="updateTime" column="update_time"/>
+                    <result property="remark" column="remark"/>
+            </resultMap>
+    
+    <sql id="selectFileApprovalVo">
+        select id, title, file_list, img_list, apply_user_id, apply_user_name, end_time, is_delete, create_by, create_time, update_by, update_time, remark        from file_approval
+    </sql>
+
+    <select id="selectFileApprovalList" parameterType="FileApproval" resultMap="FileApprovalResult">
+        <include refid="selectFileApprovalVo"/>
+        <where>
+            is_delete = 0
+                                                                                                    <if test="title != null  and title != ''">
+                            and title = #{title}
+                        </if>
+                                                                                                            <if test="fileList != null  and fileList != ''">
+                            and file_list = #{fileList}
+                        </if>
+                                                                                                            <if test="imgList != null  and imgList != ''">
+                            and img_list = #{imgList}
+                        </if>
+                                                                                                            <if test="applyUserId != null  and applyUserId != ''">
+                            and apply_user_id = #{applyUserId}
+                        </if>
+                                                                                                            <if test="applyUserName != null  and applyUserName != ''">
+                            and apply_user_name like concat('%', #{applyUserName}, '%')
+                        </if>
+                                                                                                            <if test="endTime != null ">
+                            and end_time = #{endTime}
+                        </if>
+                                                                                                            <if test="isDelete != null ">
+                            and is_delete = #{isDelete}
+                        </if>
+                                                                                                                                                                                                    </where>
+    </select>
+</mapper>

+ 22 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/service/IFileApprovalService.java

@@ -0,0 +1,22 @@
+package com.willalp.flow.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.willalp.flow.domain.FileApproval;
+
+/**
+ * 文件审批业务Service接口
+ *
+ * @author willalp
+ * @date 2022-11-30
+ */
+public interface IFileApprovalService extends IService<FileApproval>
+{
+    /**
+     * 查询文件审批业务列表
+     *
+     * @param fileApproval 文件审批业务
+     * @return 文件审批业务集合
+     */
+    public List<FileApproval> selectFileApprovalList(FileApproval fileApproval);
+}

+ 35 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/service/impl/FileApprovalServiceImpl.java

@@ -0,0 +1,35 @@
+package com.willalp.flow.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.willalp.flow.domain.FileApproval;
+import com.willalp.flow.mapper.FileApprovalMapper;
+import com.willalp.flow.service.IFileApprovalService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 文件审批业务Service业务层处理
+ *
+ * @author willalp
+ * @date 2022-11-30
+ */
+@Service
+public class FileApprovalServiceImpl extends ServiceImpl<FileApprovalMapper, FileApproval>  implements IFileApprovalService
+{
+    @Resource
+    private FileApprovalMapper fileApprovalMapper;
+
+    /**
+     * 查询文件审批业务列表
+     *
+     * @param fileApproval 文件审批业务
+     * @return 文件审批业务
+     */
+    @Override
+    public List<FileApproval> selectFileApprovalList(FileApproval fileApproval)
+    {
+        return fileApprovalMapper.selectFileApprovalList(fileApproval);
+    }
+}

+ 1 - 1
willalp-clocking-in/src/main/java/com/willalp/flow/service/impl/HsFlowEngineServiceImpl.java

@@ -360,7 +360,7 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
     @Override
     public int revoke(String taskId) {
         if (StringUtils.isNotBlank(taskId)) {
-            Integer selectCount = flowRunningRecordService.getBaseMapper().selectCount(new QueryWrapper<HsFlowRunningRecord>()
+            long selectCount = flowRunningRecordService.getBaseMapper().selectCount(new QueryWrapper<HsFlowRunningRecord>()
                     .eq("task_id", taskId));
             if (selectCount > 0) {
                 throw new BaseException("已有审批结果无法撤销");

+ 2 - 2
willalp-clocking-in/src/main/java/com/willalp/msg/mapper/HsAppUserMsgMapper.java

@@ -1,6 +1,6 @@
 package com.willalp.msg.mapper;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.willalp.common.core.mybatis.EasyBaseMapper;
 import com.willalp.msg.domain.HsAppUserMsg;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Update;
@@ -13,7 +13,7 @@ import java.util.List;
  * @author willalp
  * @date 2022-10-26
  */
-public interface HsAppUserMsgMapper extends BaseMapper<HsAppUserMsg> {
+public interface HsAppUserMsgMapper extends EasyBaseMapper<HsAppUserMsg> {
     /**
      * 查询APP用户消息列表
      *

+ 2 - 0
willalp-clocking-in/src/main/java/com/willalp/msg/service/impl/HsAppUserMsgServiceImpl.java

@@ -41,6 +41,8 @@ public class HsAppUserMsgServiceImpl extends ServiceImpl<HsAppUserMsgMapper, HsA
             List<HsAppUserMsg> msgsByUserCode = hsAppUserMsgMapper.selectList(new QueryWrapper<HsAppUserMsg>()
                     .eq("user_code", uc)
                     .eq("msg_is_read", "0"));
+
+            hsAppUserMsgMapper.insertBatchSomeColumn(msgsByUserCode);
             List<HsAppUserMsg> l1 = new ArrayList<>();
             List<HsAppUserMsg> l3 = new ArrayList<>();
             List<HsAppUserMsg> l2 = new ArrayList<>();

+ 2 - 2
willalp-clocking-in/src/main/java/com/willalp/yiqing/service/impl/HsPositiveContiguityUserServiceImpl.java

@@ -308,9 +308,9 @@ public class HsPositiveContiguityUserServiceImpl extends ServiceImpl<HsPositiveC
                 && StringUtils.isBlank(jw)) {
             //判断是否需要更新 不需要直接返回
             Integer pcuSum = redisCache.getCacheObject("pcuSum");
-            Integer integer = pcuMapper.selectCount(new QueryWrapper<HsPositiveContiguityUser>()
+            long integer = pcuMapper.selectCount(new QueryWrapper<HsPositiveContiguityUser>()
                     .in("normal_status", "1", "4", "5", "6"));
-            if (integer.equals(pcuSum)) {
+            if (integer == pcuSum) {
                 return homeDataVo;
             }
         }

+ 29 - 0
willalp-common/src/main/java/com/willalp/common/core/mybatis/EasyBaseMapper.java

@@ -0,0 +1,29 @@
+/**
+ * @projectName willalp-pns-ml
+ * @package com.willalp.common.core.mybatis
+ * @className com.willalp.common.core.mybatis.EasyBaseMapper
+ * @copyright Copyright 2019 HuiShan, Inc All rights reserved.
+ */
+package com.willalp.common.core.mybatis;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.Collection;
+
+/**
+ * EasyBaseMapper
+ * @description mybatis-plus 批量新增扩展接口
+ * @author hs
+ * @date 2022/12/7 18:50
+ * @version 1.0
+ */
+public interface EasyBaseMapper<T> extends BaseMapper<T> {
+    /**
+     * 批量插入 仅适用于mysql
+     *
+     * @param entityList 实体列表
+     * @return 影响行数
+     */
+    Integer insertBatchSomeColumn(Collection<T> entityList);
+}
+ 

+ 25 - 0
willalp-common/src/main/java/com/willalp/common/core/mybatis/EasySqlInjector.java

@@ -0,0 +1,25 @@
+package com.willalp.common.core.mybatis;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.core.injector.AbstractMethod;
+import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
+import com.baomidou.mybatisplus.core.metadata.TableInfo;
+import com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ */
+public class EasySqlInjector extends DefaultSqlInjector {
+ 
+
+    @Override
+    public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
+        // 注意:此SQL注入器继承了DefaultSqlInjector(默认注入器),调用了DefaultSqlInjector的getMethodList方法,保留了mybatis-plus的自带方法
+        List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
+        methodList.add(new InsertBatchSomeColumn(i -> i.getFieldFill() != FieldFill.UPDATE));
+        return methodList;
+    }
+ 
+}

+ 0 - 10
willalp-common/src/main/java/com/willalp/common/core/service/impl/TreeCommonServiceImpl.java

@@ -8,7 +8,6 @@ import com.willalp.common.core.service.ITreeCommonService;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.Serializable;
-import java.util.Collection;
 import java.util.List;
 
 @Transactional(rollbackFor = Exception.class)
@@ -70,13 +69,4 @@ public class TreeCommonServiceImpl<M extends BaseTreeMapper<T>, T extends TreeEn
         return super.removeById(id);
     }
 
-    @Override
-    public boolean removeByIds(Collection<? extends Serializable> idList) {
-        for (Serializable  treeId: idList) {
-            removeById(treeId);
-        }
-        return true;
-    }
-
-
 }

+ 5 - 4
willalp-common/src/main/java/com/willalp/common/enums/PartternIdEnum.java

@@ -7,10 +7,11 @@ package com.willalp.common.enums;
  */
 public enum PartternIdEnum {
 
-    RESERVE(1,"订餐消费"),
-    CREDIT(2,"订餐记账"),
-    FREEDOM(3,"点餐消费"),
-    FREE_CREDIT(4,"点餐记账");
+    RESERVE(1, "订餐消费"),
+    CREDIT(2, "订餐记账"),
+    FREEDOM(3, "点餐消费"),
+    FREE_CREDIT(4, "点餐记账"),
+    LIVE_PAY(5, "现场消费");
 
     private Integer value;
 

+ 15 - 19
willalp-common/src/main/java/com/willalp/common/uniapp/UinAppPushConfig.java

@@ -1,11 +1,7 @@
 package com.willalp.common.uniapp;
 
 
-import com.getui.push.v2.sdk.ApiHelper;
-import com.getui.push.v2.sdk.GtApiConfiguration;
-import com.getui.push.v2.sdk.api.PushApi;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
 /**
@@ -32,20 +28,20 @@ public class UinAppPushConfig {
     @Value("${uniapp.push.masterSecret}")
     private String masterSecret;
 
-    @Bean(name = "myPushApi")
-    public PushApi pushApi() {
-        GtApiConfiguration apiConfiguration = new GtApiConfiguration();
-        //填写应用配置
-        apiConfiguration.setAppId(appId);
-        apiConfiguration.setAppKey(appKey);
-        apiConfiguration.setMasterSecret(masterSecret);
-        // 接口调用前缀,请查看文档: 接口调用规范 -> 接口前缀, 可不填写appId
-        apiConfiguration.setDomain(baseUrl);
-        // 实例化ApiHelper对象,用于创建接口对象
-        ApiHelper apiHelper = ApiHelper.build(apiConfiguration);
-        // 创建对象,建议复用。目前有PushApi、StatisticApi、UserApi
-        PushApi pushApi = apiHelper.creatApi(PushApi.class);
-        return pushApi;
-    }
+//    @Bean(name = "myPushApi")
+//    public PushApi pushApi() {
+//        GtApiConfiguration apiConfiguration = new GtApiConfiguration();
+//        //填写应用配置
+//        apiConfiguration.setAppId(appId);
+//        apiConfiguration.setAppKey(appKey);
+//        apiConfiguration.setMasterSecret(masterSecret);
+//        // 接口调用前缀,请查看文档: 接口调用规范 -> 接口前缀, 可不填写appId
+//        apiConfiguration.setDomain(baseUrl);
+//        // 实例化ApiHelper对象,用于创建接口对象
+//        ApiHelper apiHelper = ApiHelper.build(apiConfiguration);
+//        // 创建对象,建议复用。目前有PushApi、StatisticApi、UserApi
+//        PushApi pushApi = apiHelper.creatApi(PushApi.class);
+//        return pushApi;
+//    }
 }
 

+ 23 - 9
willalp-common/src/main/java/com/willalp/common/uniapp/UniAppUtils.java

@@ -1,3 +1,4 @@
+/*
 package com.willalp.common.uniapp;
 
 import cn.hutool.core.util.IdUtil;
@@ -24,9 +25,11 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+*/
 /**
  * @author hs
- */
+ *//*
+
 @Slf4j
 @Component
 public class UniAppUtils {
@@ -34,13 +37,15 @@ public class UniAppUtils {
     @Resource(name = "myPushApi")
     private PushApi myPushApi;
 
-    /**
+    */
+/**
      * 单点推送(离线不推送)
      *
      * @param cid     目标
      * @param title   标题
      * @param content 内容
-     */
+     *//*
+
     public void pushMsg(String cid, String title, String content) {
         //根据cid进行单推
         PushDTO<Audience> pushDTO = new PushDTO<Audience>();
@@ -48,14 +53,18 @@ public class UniAppUtils {
         pushDTO.setRequestId(System.currentTimeMillis() + "");
         PushMessage pushMessage = new PushMessage();
         pushDTO.setPushMessage(pushMessage);
-        /** 带跳转url*/
+        */
+/** 带跳转url*//*
+
 //        GTNotification notification = new GTNotification();
 //        pushMessage.setNotification(notification);
 //        notification.setTitle(title + new Date());
 //        notification.setBody(content);
 //        notification.setClickType("url");
 //        notification.setUrl("https://www.baidu.com");// 跳转地址
-        /** 不带跳转url*/
+        */
+/** 不带跳转url*//*
+
         pushMessage.setTransmission(" {title:\"" + title + "\",content:\"" + content + "\",payload:\"自定义数据\"}");
         pushDTO.setPushMessage(pushMessage);
         // 设置接收人信息
@@ -73,13 +82,15 @@ public class UniAppUtils {
         }
     }
 
-    /**
+    */
+/**
      * 推送给多个
      *
      * @param cids    目标集
      * @param title   标题
      * @param content 内容
-     */
+     *//*
+
     public void pushMsg(List<String> cids, String title, String content) {
         List<PushDTO<Audience>> list = new ArrayList<>(cids.size());
         cids.forEach(s -> {
@@ -111,13 +122,15 @@ public class UniAppUtils {
         }
     }
 
-    /**
+    */
+/**
      * 消息推送(离线推送)
      *
      * @param cid
      * @param title
      * @param content
-     */
+     *//*
+
     public void pushMsgOffLine(String cid, String title, String content) {
         //b588d2a110c79b7591de409c17719ef2
         //根据cid进行单推
@@ -190,3 +203,4 @@ public class UniAppUtils {
         }
     }
 }
+*/

+ 92 - 4
willalp-common/src/main/java/com/willalp/common/utils/http/HttpUtils.java

@@ -9,11 +9,9 @@ import org.springframework.stereotype.Component;
 
 import javax.net.ssl.*;
 import java.io.*;
-import java.net.ConnectException;
-import java.net.SocketTimeoutException;
-import java.net.URL;
-import java.net.URLConnection;
+import java.net.*;
 import java.nio.charset.StandardCharsets;
+import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
 
 /**
@@ -176,6 +174,96 @@ public class HttpUtils {
         return result.toString();
     }
 
+    final static HostnameVerifier DO_NOT_VERIFY = new HostnameVerifier() {
+        @Override
+        public boolean verify(String hostname, SSLSession session) {
+            return true;
+        }
+    };
+
+    /**
+     * Trust every server - dont check for any certificate
+     */
+    private static void trustAllHosts() {
+        final String TAG = "trustAllHosts";
+        // Create a trust manager that does not validate certificate chains
+        TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {
+            @Override
+            public X509Certificate[] getAcceptedIssuers() {
+                return new X509Certificate[]{};
+            }
+
+            @Override
+            public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+            }
+
+            @Override
+            public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
+            }
+        }};
+        // Install the all-trusting trust manager
+        try {
+            SSLContext sc = SSLContext.getInstance("TLS");
+            sc.init(null, trustAllCerts, new java.security.SecureRandom());
+            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 发起HTTPS协议 get请求
+     *
+     * @param httpUrl
+     * @return
+     */
+    public String httpsGet(String httpUrl) {
+        BufferedReader input = null;
+        StringBuilder sb = null;
+        URL url = null;
+        HttpURLConnection con = null;
+        try {
+            url = new URL(httpUrl);
+            log.info("sendHttpsGet - {}", httpUrl);
+            try {
+                // trust all hosts
+                trustAllHosts();
+                HttpsURLConnection https = (HttpsURLConnection) url.openConnection();
+                if ("https".equals(url.getProtocol().toLowerCase())) {
+                    https.setHostnameVerifier(DO_NOT_VERIFY);
+                    con = https;
+                } else {
+                    con = (HttpURLConnection) url.openConnection();
+                }
+                input = new BufferedReader(new InputStreamReader(con.getInputStream()));
+                sb = new StringBuilder();
+                String s;
+                while ((s = input.readLine()) != null) {
+                    sb.append(s).append("\n");
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        } catch (MalformedURLException e1) {
+            e1.printStackTrace();
+        } finally {
+            // close buffered
+            if (input != null) {
+                try {
+                    input.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+
+            // disconnecting releases the resources held by a connection so they may be closed or reused
+            if (con != null) {
+                con.disconnect();
+            }
+        }
+        return sb == null ? null : sb.toString();
+    }
+
     public String sendSSLPost(String url, String param) {
         StringBuilder result = new StringBuilder();
         String urlNameString = url + "?" + param;

+ 8 - 0
willalp-framework/src/main/java/com/willalp/framework/config/MybatisPlusConfig.java

@@ -1,6 +1,8 @@
 package com.willalp.framework.config;
 
+import com.willalp.common.core.mybatis.EasySqlInjector;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.core.env.Environment;
 import org.springframework.core.io.Resource;
@@ -83,6 +85,12 @@ public class MybatisPlusConfig {
         return resources.toArray(new Resource[resources.size()]);
     }
 
+    @Bean
+    public EasySqlInjector sqlInjector() {
+        return new EasySqlInjector();
+    }
+
+
     //    @Bean
 //    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
 //    {

+ 0 - 1
willalp-framework/src/main/java/com/willalp/framework/config/SecurityConfig.java

@@ -118,7 +118,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                 .antMatchers("/Print/**").anonymous()
                 .antMatchers("/api/**").permitAll()
                 .antMatchers("/canteen/place/list").permitAll()
-
                 // activiti modeler 放行
                 .antMatchers("/modeler/**").anonymous()
                 .antMatchers("/activiti/definition/upload").anonymous()

+ 1 - 1
willalp-ui/.env.production

@@ -1,4 +1,4 @@
-# 页面标题
+ # 页面标题
 VUE_APP_TITLE = HS平台
 
 # 生产环境配置

+ 53 - 0
willalp-ui/src/api/flow/accessory.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询文件审批业务列表
+export function listAccessory(query) {
+  return request({
+    url: '/flow/accessory/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询文件审批业务详细
+export function getAccessory(id) {
+  return request({
+    url: '/flow/accessory/' + id,
+    method: 'get'
+  })
+}
+
+// 新增文件审批业务
+export function addAccessory(data) {
+  return request({
+    url: '/flow/accessory',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改文件审批业务
+export function updateAccessory(data) {
+  return request({
+    url: '/flow/accessory',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除文件审批业务
+export function delAccessory(id) {
+  return request({
+    url: '/flow/accessory/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出文件审批业务
+export function exportAccessory(query) {
+  return request({
+    url: '/flow/accessory/export',
+    method: 'get',
+    params: query
+  })
+}

+ 3 - 2
willalp-ui/src/api/system/user.js

@@ -54,9 +54,10 @@ export function exportUser(query) {
 }
 
 // 用户密码重置
-export function resetUserPwd(userId, password) {
+export function resetUserPwd(row, password) {
   const data = {
-    userId,
+    userId :row.userId,
+    userName:row.userName,
     password
   }
   return request({

+ 8 - 5
willalp-ui/src/views/canteen/order/index.vue

@@ -214,6 +214,9 @@
       <el-table-column label="消费模式" align="center" prop="patternId">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.consumption_pattern" :value="scope.row.patternId"/>
+          <div v-if="!scope.row.menuNumber">
+            现场消费
+          </div>
         </template>
       </el-table-column>
       <el-table-column label="订单总额" align="center" prop="orderTotal"/>
@@ -442,8 +445,8 @@ import {
   payMiwp
 } from '@/api/canteen/order'
 import user from '@/store/modules/user'
-import { addCuisineforMenu, miwp, listRegister, menus } from '@/api/canteen/register'
-import { queryUser } from '@/api/system/user'
+import {addCuisineforMenu, miwp, listRegister, menus} from '@/api/canteen/register'
+import {queryUser} from '@/api/system/user'
 
 export default {
   name: 'Order',
@@ -699,7 +702,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const orderIds = row.orderId || this.ids
-      this.$modal.confirm('是否确认删除食堂订单编号为"' + orderIds + '"的数据项?').then(function() {
+      this.$modal.confirm('是否确认删除食堂订单编号为"' + orderIds + '"的数据项?').then(function () {
         return delOrder(orderIds)
       }).then(() => {
         this.getList()
@@ -710,7 +713,7 @@ export default {
     /** 作废按钮操作 */
     handleBack(row) {
       const orderIds = row.orderId || this.ids
-      this.$modal.confirm('是否作废食堂订单编号为"' + orderIds + '"的数据项?').then(function() {
+      this.$modal.confirm('是否作废食堂订单编号为"' + orderIds + '"的数据项?').then(function () {
         return backOrder(row)
       }).then(() => {
         this.getList()
@@ -718,7 +721,7 @@ export default {
       }).catch(() => {
       })
     },
-    search: function(event) {
+    search: function (event) {
       //方法一:直接通过event.data可以获得文本内容
       if (event.data != null) {
         this.form.leftTotal = parseFloat(this.form.orderTotal) - parseFloat(event.data)

+ 2 - 2
willalp-ui/src/views/canteen/scrk/index.vue

@@ -85,7 +85,7 @@
     </el-row>
 
     <el-table v-loading="loading" :data="scrkList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+        <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="食材入库记录id" align="center" prop="recordId" v-if="false"/>
       <el-table-column label="入库种类" align="center" prop="name" />
       <el-table-column label="采购数量" align="center" prop="amount" />
@@ -159,7 +159,7 @@
           <el-input v-model="form.isDelete" placeholder="请输入是否删除" />
         </el-form-item>
       </el-form>
-      <div slot="footer" class="dialog-footer">
+        <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>

+ 257 - 0
willalp-ui/src/views/files/approval/index.vue

@@ -0,0 +1,257 @@
+<template>
+  <div style="padding: 10px">
+    <el-row :gutter="10">
+      <el-col :span="8">
+        <el-card>
+          <div slot="header" class="clearfix">
+            <span>新增审批</span>
+          </div>
+          <el-form ref="form" :model="form">
+            <el-form-item label="审批标题" prop="title">
+              <el-input v-model="form.title" placeholder="请输入审批标题"/>
+            </el-form-item>
+            <el-form-item label="附件上传" prop="fileList">
+              <el-upload
+                class="upload-demo"
+                :action="uploadImgUrl"
+                :on-preview="handlePreview"
+                :on-remove="handleRemove"
+                :on-success="handleUploadSuccess"
+                :before-remove="beforeRemove"
+                :headers="headers"
+                :limit="1"
+                drag
+                :file-list="form.fileList">
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+                <!--          <el-button size="small" type="primary">点击上传</el-button>-->
+                <!--    <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
+              </el-upload>
+            </el-form-item>
+            <el-form-item label="上传图片" prop="imgList">
+              <el-upload
+                :action="uploadImgUrl"
+                list-type="picture-card"
+                :on-exceed="handleExceed"
+                :on-success="handleImgUploadSuccess"
+                :file-list="form.imgList"
+                :headers="headers">
+                <i slot="default" class="el-icon-plus"></i>
+                <div slot="file" slot-scope="{file}">
+                  <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+                  <span class="el-upload-list__item-actions">
+                    <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+                      <i class="el-icon-zoom-in"></i>
+                    </span>
+                    <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
+                      <i class="el-icon-download"></i>
+                    </span>
+                    <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+                      <i class="el-icon-delete"></i>
+                    </span>
+                  </span>
+                </div>
+              </el-upload>
+            </el-form-item>
+            <el-form-item label="级联选择" prop="">
+              <el-cascader v-model="form.field103" @change="handleChange"
+                           :style="{width: '100%'}" placeholder="请选择级联选择" clearable></el-cascader>
+            </el-form-item>
+            <div>
+              <div style="text-align: center">
+                <el-button type="primary" @click="submitForm">提交审批</el-button>
+              </div>
+            </div>
+          </el-form>
+        </el-card>
+      </el-col>
+      <el-col :span="16">
+        <el-card>
+          <div slot="header" class="clearfix">
+            <span>已提交审批</span>
+          </div>
+          <el-table v-loading="loading" :data="accessoryList" @selection-change="handleSelectionChange">
+            <el-table-column type="selection" width="55" align="center"/>
+            <el-table-column label="审批标题" align="center" prop="title"/>
+            <el-table-column label="附件列表" align="center" prop="fileList"/>
+            <el-table-column label="图片列表" align="center" prop="imgList"/>
+            <el-table-column label="申请人" align="center" prop="applyUserName"/>
+            <el-table-column label="结束时间" align="center" prop="endTime" width="180">
+              <template slot-scope="scope">
+                <span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleUpdate(scope.row)"
+                  v-hasPermi="['flow:accessory:edit']"
+                >修改
+                </el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDelete(scope.row)"
+                  v-hasPermi="['flow:accessory:remove']"
+                >删除
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination
+            v-show="total>0"
+            :total="total"
+            :page.sync="queryParams.pageNum"
+            :limit.sync="queryParams.pageSize"
+            @pagination="getList"
+          />
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script>
+import {getToken} from "@/utils/auth";
+import {listAccessory, addAccessory} from "@/api/flow/accessory";
+
+export default {
+  data() {
+    return {
+      baseUrl: process.env.VUE_APP_BASE_API,
+      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
+      headers: {
+        Authorization: "Bearer " + getToken(),
+      },
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 总条数
+      total: 0,
+      accessoryList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        title: null,
+        fileList: null,
+        imgList: null,
+        applyUserId: null,
+        applyUserName: null,
+        endTime: null,
+      },
+      form: {
+        title: null,
+        fileList: [],
+        imgList: []
+      },
+      dialogImageUrl: '',
+      dialogVisible: false,
+      disabled: false
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      listAccessory(this.queryParams).then(response => {
+        this.accessoryList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        title: null,
+        fileList: null,
+        imgList: null,
+        applyUserId: null,
+        applyUserName: null,
+        endTime: null,
+        isDelete: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加文件审批业务";
+    },
+    // 上传成功回调
+    handleUploadSuccess(res, file) {
+      this.$message.success("上传成功");
+      this.form.fileList.push({url: res.url});
+    },
+    handleImgUploadSuccess(res, file) {
+      this.$message.success("上传成功");
+      this.form.imgList.push({url: res.url});
+    },
+    /** 提交按钮 */
+    submitForm() {
+      if (this.form.imgList) {
+        this.form.imgList = JSON.stringify(this.form.imgList)
+      } else {
+        this.$modal.msgError("表单不完整");
+        return
+      }
+      if (this.form.fileList) {
+        this.form.fileList = JSON.stringify(this.form.fileList)
+      } else {
+        this.$modal.msgError("表单不完整");
+        return
+      }
+      this.$refs["form"].validate(valid => {
+        addAccessory(this.form).then(() => {
+          this.$modal.msgSuccess("新增成功");
+          this.open = false;
+          this.getList();
+        });
+      });
+    },
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+    handlePreview(file) {
+      console.log(file);
+    },
+    handleExceed(files, fileList) {
+      this.$modal.msgWarning(`当前最多选择 4 个图片`);
+    },
+    beforeRemove(file, fileList) {
+      return this.$modal.confirm(`确定移除 ${file.name}?`);
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+    },
+    handleDownload(file) {
+      console.log(file);
+    },
+    handleChange(value) {
+      console.log(value);
+    }
+  }
+}
+</script>

+ 1 - 1
willalp-ui/src/views/system/user/index.vue

@@ -770,7 +770,7 @@ export default {
         inputPattern: /^.{5,20}$/,
         inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
       }).then(({ value }) => {
-          resetUserPwd(row.userId, value).then(response => {
+          resetUserPwd(row, value).then(response => {
             this.$modal.msgSuccess("修改成功,新密码是:" + value);
           });
         }).catch(() => {});

+ 1 - 1
willalp-ui/vue.config.js

@@ -33,7 +33,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://localhost:8080`,
+        target: `https://localhost:3012`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''