Browse Source

请假功能优化

xianwait 2 years ago
parent
commit
8e0b4c49d4
47 changed files with 1654 additions and 588 deletions
  1. 1 2
      willalp-admin/src/main/java/com/willalp/WillalpApplication.java
  2. 17 1
      willalp-admin/src/main/java/com/willalp/web/controller/api/ApiOneController.java
  3. 1 2
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppController.java
  4. 55 0
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppThreeController.java
  5. 31 14
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppTwoController.java
  6. 16 18
      willalp-admin/src/main/java/com/willalp/web/controller/apply/HsSysApplyController.java
  7. 13 0
      willalp-admin/src/main/java/com/willalp/web/controller/clockingin/BizLeaveImgController.java
  8. 104 0
      willalp-admin/src/main/java/com/willalp/web/controller/clockingin/HsFlowCcController.java
  9. 5 4
      willalp-admin/src/main/resources/application.yml
  10. 1 3
      willalp-admin/src/main/resources/logback.xml
  11. 1 1
      willalp-canteen/src/main/java/com/willalp/canteen/mapper/HsGiftOrderDetailMapper.java
  12. 13 8
      willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsCanteenOrderMapper.xml
  13. 6 5
      willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsGiftOrderMapper.xml
  14. 1 1
      willalp-canteen/src/main/java/com/willalp/canteen/service/IHsGiftOrderService.java
  15. 5 5
      willalp-clocking-in/src/main/java/com/willalp/clockingin/domain/BizLeave.java
  16. 0 15
      willalp-clocking-in/src/main/java/com/willalp/files/domain/HsOrgPersonnelFiles.java
  17. 1 6
      willalp-clocking-in/src/main/java/com/willalp/files/mapper/xml/HsOrgPersonnelFilesMapper.xml
  18. 8 0
      willalp-clocking-in/src/main/java/com/willalp/files/service/IHsOrgPersonnelFilesService.java
  19. 49 0
      willalp-clocking-in/src/main/java/com/willalp/files/service/impl/HsOrgPersonnelFilesServiceImpl.java
  20. 72 74
      willalp-clocking-in/src/main/java/com/willalp/flow/domain/HsFlowBase.java
  21. 130 0
      willalp-clocking-in/src/main/java/com/willalp/flow/domain/HsFlowCc.java
  22. 8 2
      willalp-clocking-in/src/main/java/com/willalp/flow/domain/enums/FlowEnum.java
  23. 23 0
      willalp-clocking-in/src/main/java/com/willalp/flow/mapper/HsFlowCcMapper.java
  24. 41 30
      willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/BizLeaveImgMapper.xml
  25. 60 0
      willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/HsFlowCcMapper.xml
  26. 14 14
      willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/HsFlowTaskMapper.xml
  27. 1 1
      willalp-clocking-in/src/main/java/com/willalp/flow/service/IHsFlowBaseService.java
  28. 31 0
      willalp-clocking-in/src/main/java/com/willalp/flow/service/IHsFlowCcService.java
  29. 1 1
      willalp-clocking-in/src/main/java/com/willalp/flow/service/impl/HsFlowBaseServiceImpl.java
  30. 47 0
      willalp-clocking-in/src/main/java/com/willalp/flow/service/impl/HsFlowCcServiceImpl.java
  31. 113 65
      willalp-clocking-in/src/main/java/com/willalp/flow/service/impl/HsFlowEngineServiceImpl.java
  32. 14 1
      willalp-clocking-in/src/main/java/com/willalp/wx/enums/WxTemplateKeyEnum.java
  33. 8 0
      willalp-clocking-in/src/main/java/com/willalp/wx/service/WxMsgService.java
  34. 14 1
      willalp-clocking-in/src/main/java/com/willalp/wx/service/impl/WxMsgServiceImpl.java
  35. 1 0
      willalp-ui/.env.development
  36. 1 0
      willalp-ui/.env.production
  37. 8 0
      willalp-ui/src/api/files/files.js
  38. 53 0
      willalp-ui/src/api/flow/cc.js
  39. 10 1
      willalp-ui/src/api/leave/leave.js
  40. 31 26
      willalp-ui/src/views/canteen/order/jcdMonthlyStat.vue
  41. 33 2
      willalp-ui/src/views/files/files/index.vue
  42. 303 0
      willalp-ui/src/views/flow/cc/index.vue
  43. 1 1
      willalp-ui/src/views/leave/leave/index.vue
  44. 120 102
      willalp-ui/src/views/leave/leave/indexPre.vue
  45. 141 141
      willalp-ui/src/views/login.vue
  46. 14 14
      willalp-ui/src/views/system/postConfig/index.vue
  47. 33 27
      willalp-ui/vue.config.js

+ 1 - 2
willalp-admin/src/main/java/com/willalp/WillalpApplication.java

@@ -55,8 +55,7 @@ public class WillalpApplication extends SpringBootServletInitializer implements
     @Primary
     @Bean
     public TaskExecutor primaryTaskExecutor() {
-        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
-        return executor;
+        return new ThreadPoolTaskExecutor();
     }
 
     @Override

+ 17 - 1
willalp-admin/src/main/java/com/willalp/web/controller/api/ApiOneController.java

@@ -1,10 +1,12 @@
 package com.willalp.web.controller.api;
 
+import com.alibaba.fastjson.JSONObject;
 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.common.utils.http.HttpUtils;
 import com.willalp.files.domain.HsOrgPersonnelFiles;
 import com.willalp.files.service.IHsOrgPersonnelFilesService;
 import com.willalp.system.service.ISysUserService;
@@ -27,6 +29,9 @@ public class ApiOneController {
     @Resource
     private IHsOrgPersonnelFilesService orgPersonnelFilesService;
 
+    @Resource
+    private HttpUtils httpUtils;
+
     @Transactional(rollbackFor = Exception.class)
     @RequestMapping("/add")
     public AjaxResult add(@RequestBody SysUser user) {
@@ -56,7 +61,7 @@ public class ApiOneController {
      * @return
      */
     @GetMapping("/updatePwd")
-    public AjaxResult resetPwd(@RequestParam String un,@RequestParam String pwd) {
+    public AjaxResult resetPwd(@RequestParam String un, @RequestParam String pwd) {
         if (StringUtils.isNotBlank(un)) {
             int result = 0;
             if (StringUtils.isBlank(pwd)) {
@@ -73,4 +78,15 @@ public class ApiOneController {
             return AjaxResult.error("用户编码为空");
         }
     }
+
+    /**
+     * 获取主服务机构
+     *
+     * @return
+     */
+    @GetMapping("/getOrganization")
+    public AjaxResult getOrganization() {
+        String result = httpUtils.sendSSLPost(httpUtils.getHttpsMasterUrl("/getOrganization"), "");
+        return AjaxResult.success(JSONObject.parseObject(result));
+    }
 }

+ 1 - 2
willalp-admin/src/main/java/com/willalp/web/controller/app/AppController.java

@@ -411,10 +411,9 @@ public class AppController extends BaseController {
     @ResponseBody
     public TableDataInfo getOrder(HttpServletRequest request) {
         startPage();
-        List<HsGiftOrder> orders = new ArrayList<>();
         HsGiftOrder order = new HsGiftOrder();
         order.setUserNumber(request.getHeader("UserName"));
-        orders = giftOrderService.selectHsCanteenOrderList(order);
+        List<HsGiftOrder> orders = giftOrderService.selectHsCanteenOrderList(order);
         orders.sort(Comparator.comparing(HsGiftOrder::getPaytime).reversed());
         return getDataTable(orders);
     }

+ 55 - 0
willalp-admin/src/main/java/com/willalp/web/controller/app/AppThreeController.java

@@ -0,0 +1,55 @@
+/**
+ * @projectName willalp-pns-ml
+ * @package com.willalp.web.controller.app
+ * @className com.willalp.web.controller.app.AppThreeController
+ * @copyright Copyright 2019 HuiShan, Inc All rights reserved.
+ */
+package com.willalp.web.controller.app;
+
+import com.willalp.common.core.controller.BaseController;
+import com.willalp.common.core.domain.AjaxResult;
+import com.willalp.common.core.page.TableDataInfo;
+import com.willalp.files.service.IHsOrgPersonnelFilesService;
+import com.willalp.flow.service.IHsFlowCcService;
+import io.swagger.annotations.Api;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * AppThreeController
+ * @description APP对外接口3
+ * @author hs
+ * @date 2023/2/6 17:18
+ * @version 1.0
+ */
+@Api("app接口")
+@RestController
+@RequestMapping("/app")
+public class AppThreeController extends BaseController {
+    private static final Log LOG = LogFactory.getLog(AppThreeController.class);
+
+    @Resource
+    private IHsOrgPersonnelFilesService opfService;
+
+    @Resource
+    private IHsFlowCcService flowCcService;
+
+
+    @RequestMapping("/getOpfInfo")
+    public AjaxResult getOpfInfo(@RequestParam String opfUserPhone) {
+        return AjaxResult.success(opfService.appGetHsOrgPersonnelFilesByPhone(opfUserPhone));
+    }
+
+    @RequestMapping("/ccRecord")
+    public TableDataInfo getCcRecord(HttpServletRequest request) {
+        return getDataTable(flowCcService.selectHsFlowCcListByUserId(request.getHeader("UserName")));
+    }
+
+}
+ 

+ 31 - 14
willalp-admin/src/main/java/com/willalp/web/controller/app/AppTwoController.java

@@ -20,6 +20,8 @@ import com.willalp.common.utils.DateUtils;
 import com.willalp.common.utils.StringUtils;
 import com.willalp.common.utils.bean.BeanUtils;
 import com.willalp.common.utils.http.HttpUtils;
+import com.willalp.event.domain.HsEvent;
+import com.willalp.event.service.IHsEventService;
 import com.willalp.flow.service.HsFlowEngineService;
 import com.willalp.flow.service.IHsFlowTaskService;
 import com.willalp.msg.domain.HsAppUserMsg;
@@ -174,10 +176,10 @@ public class AppTwoController extends BaseController {
     private IHsGiftService hsGiftService;
 
     @Resource
-    private IHsGiftOrderService canteenOrderService;
+    private IHsGiftOrderService giftOrderService;
 
     @Resource
-    private IHsGiftOrderDetailService canteenOrderDetailServic;
+    private IHsGiftOrderDetailService giftOrderDetailServic;
 
     @Resource
     private WxUtils wxUtils;
@@ -250,7 +252,7 @@ public class AppTwoController extends BaseController {
                 return AjaxResult.error("非法接口请求 - 用户无法获取");
             }
             //获取订单信息
-            HsGiftOrder one = canteenOrderService.getOne(new QueryWrapper<HsGiftOrder>()
+            HsGiftOrder one = giftOrderService.getOne(new QueryWrapper<HsGiftOrder>()
                     .eq("order_number", on)
                     .eq("user_number", userName));
             if (null != one) {
@@ -286,7 +288,7 @@ public class AppTwoController extends BaseController {
                 //修改订单状态
                 one.setStatusText("已完成");
                 one.setIsNews("1");
-                canteenOrderService.updateById(one);
+                giftOrderService.updateById(one);
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -308,6 +310,9 @@ public class AppTwoController extends BaseController {
     @Resource
     private WxMsgService wxMsgService;
 
+    @Resource
+    private IHsEventService eventService;
+
     /**
      * 积分商城下单
      *
@@ -363,6 +368,18 @@ public class AppTwoController extends BaseController {
         for (HsGiftOrderDetail gift : req.getHsGifts()) {
             String giftId = gift.getGiftId();
             Integer amount = gift.getAmount();
+            //如果是活动商品
+            if (StringUtils.isNotBlank(gift.getEventId())) {
+                //获取结束时间
+                HsEvent eventbyId = eventService.getById(gift.getEventId());
+                long time = eventbyId.getEndTime().getTime();
+                //当前时间
+                long l = System.currentTimeMillis();
+                //结束时间大于当前时间(活动范围内),则支持下单
+                if (time < l) {
+                    throw new BaseException("活动已结束");
+                }
+            }
             if (hsGiftService.checkAndReduceGiftInventory(amount, giftId) < 0) {
                 throw new BaseException(gift.getGiftName() + "库存不足,下单失败");
             }
@@ -380,8 +397,8 @@ public class AppTwoController extends BaseController {
             }
             //更新DB数据
             sysUserOrganizationService.updateById(sysUserOrganization);//更新账户信息
-            canteenOrderService.save(hsGiftOrder);//订单主表
-            canteenOrderDetailServic.saveBatch(req.getHsGifts());//订单明细
+            giftOrderService.save(hsGiftOrder);//订单主表
+            giftOrderDetailServic.saveBatch(req.getHsGifts());//订单明细
             //发送微信订阅通知
             wxMsgTemplateInExcSuccess.setThing3(wxUtils.getFormat(String.valueOf(req.getOrderTotal())));
             wxMsgTemplateInExcSuccess.setThing6(wxUtils.getFormat(String.valueOf(sysUserOrganization.getIntegral())));
@@ -401,19 +418,19 @@ public class AppTwoController extends BaseController {
             op.setProcessDate(new Date());
             opList.add(op);
             //记录积分变动
-//            HsAmassScoreChange hasc = new HsAmassScoreChange();
-//            hasc.setChangeDate(new Date());
-//            hasc.setAmassScore(req.getOrderTotal());
-//            hasc.setChangeType("2");
-//            hasc.setUserCode(req.getUserNumber());
+            //HsAmassScoreChange hasc = new HsAmassScoreChange();
+            //hasc.setChangeDate(new Date());
+            //hasc.setAmassScore(req.getOrderTotal());
+            //hasc.setChangeType("2");
+            //hasc.setUserCode(req.getUserNumber());
             appUserMsg.setMsgTitle("积分兑换成功");
             appUserMsg.setMsgContent(String.valueOf(content));
             appUserMsg.setMsgIsRead("0");
             appUserMsg.setUserCode(req.getUserNumber());
             appUserMsg.setMsgType("6");
             userMsgService.save(appUserMsg);
-//            hsAmassScoreChangeService.save(hasc);
-//            orderProcessService.saveBatch(opList);
+            //hsAmassScoreChangeService.save(hasc);
+            //orderProcessService.saveBatch(opList);
         } catch (Exception e) {
             e.printStackTrace();
             throw new BaseException("保存失败");
@@ -437,7 +454,7 @@ public class AppTwoController extends BaseController {
     public AjaxResult getOrderInfo(String on) {
         HsGiftOrder hco = new HsGiftOrder();
         hco.setOrderNumber(on);
-        List<HsGiftOrder> hsGiftOrders = canteenOrderService.selectHsCanteenOrderList(hco);
+        List<HsGiftOrder> hsGiftOrders = giftOrderService.selectHsCanteenOrderList(hco);
         if (hsGiftOrders == null) {
             return AjaxResult.error();
         }

+ 16 - 18
willalp-admin/src/main/java/com/willalp/web/controller/apply/HsSysApplyController.java

@@ -1,29 +1,25 @@
 package com.willalp.web.controller.apply;
 
-import java.text.SimpleDateFormat;
-import java.util.*;
-
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
-import com.willalp.common.utils.DateUtils;
-import com.willalp.common.utils.SecurityUtils;
-import org.springframework.security.access.prepost.PreAuthorize;
-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.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.willalp.apply.domain.HsSysApply;
+import com.willalp.apply.service.IHsSysApplyService;
 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.apply.domain.HsSysApply;
-import com.willalp.apply.service.IHsSysApplyService;
+import com.willalp.common.utils.DateUtils;
+import com.willalp.common.utils.SecurityUtils;
 import com.willalp.common.utils.poi.ExcelUtil;
-import com.willalp.common.core.page.TableDataInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 编码申请Controller
@@ -183,6 +179,8 @@ public class HsSysApplyController extends BaseController
             case "9":
                 ex = ex;
                 break;
+            default:
+                throw new IllegalStateException("Unexpected value: " + value);
         }
         return ex;
     }

+ 13 - 0
willalp-admin/src/main/java/com/willalp/web/controller/clockingin/BizLeaveImgController.java

@@ -30,6 +30,19 @@ public class BizLeaveImgController extends BaseController
     @Resource
     private IBizLeaveImgService bizLeaveImgService;
 
+
+
+    /**
+     * 根据请假表单ID查询请假记录图像信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('flow:leavenImg:list')")
+    @GetMapping("/getBizLeaveImg")
+    public AjaxResult getById(BizLeaveImg bizLeaveImg)
+    {
+        return AjaxResult.success(bizLeaveImgService.selectBizLeaveImgList(bizLeaveImg));
+    }
+
+
     /**
      * 查询请假记录图像信息列表
      */

+ 104 - 0
willalp-admin/src/main/java/com/willalp/web/controller/clockingin/HsFlowCcController.java

@@ -0,0 +1,104 @@
+package com.willalp.web.controller.clockingin;
+
+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.HsFlowCc;
+import com.willalp.flow.service.IHsFlowCcService;
+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 2023-02-14
+ */
+@RestController
+@RequestMapping("/flow/cc")
+public class HsFlowCcController extends BaseController
+{
+    @Resource
+    private IHsFlowCcService hsFlowCcService;
+
+    /**
+     * 查询流程单抄送记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('flow:cc:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(HsFlowCc hsFlowCc)
+    {
+        startPage();
+        List<HsFlowCc> list = hsFlowCcService.selectHsFlowCcList(hsFlowCc);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出流程单抄送记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('flow:cc:export')")
+    @Log(title = "流程单抄送记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(HsFlowCc hsFlowCc)
+    {
+        List<HsFlowCc> list = hsFlowCcService.selectHsFlowCcList(hsFlowCc);
+        ExcelUtil<HsFlowCc> util = new ExcelUtil<HsFlowCc>(HsFlowCc.class);
+        return util.exportExcel(list, "流程单抄送记录数据");
+    }
+
+    /**
+     * 获取流程单抄送记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('flow:cc:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return AjaxResult.success(hsFlowCcService.getById(id));
+    }
+
+    /**
+     * 新增流程单抄送记录
+     */
+    @PreAuthorize("@ss.hasPermi('flow:cc:add')")
+    @Log(title = "流程单抄送记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody HsFlowCc hsFlowCc)
+    {
+        hsFlowCc.setCreateBy(SecurityUtils.getUsername());
+        hsFlowCc.setCreateTime(DateUtils.getNowDate());
+        return toAjax(hsFlowCcService.save(hsFlowCc));
+    }
+
+    /**
+     * 修改流程单抄送记录
+     */
+    @PreAuthorize("@ss.hasPermi('flow:cc:edit')")
+    @Log(title = "流程单抄送记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody HsFlowCc hsFlowCc)
+    {
+        hsFlowCc.setUpdateBy(SecurityUtils.getUsername());
+        hsFlowCc.setUpdateTime(DateUtils.getNowDate());
+        return toAjax(hsFlowCcService.updateById(hsFlowCc));
+    }
+
+    /**
+     * 删除流程单抄送记录
+     */
+    @PreAuthorize("@ss.hasPermi('flow:cc:remove')")
+    @Log(title = "流程单抄送记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(hsFlowCcService.removeByIds(Arrays.asList(ids)));
+    }
+}

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

@@ -8,10 +8,11 @@ server:
   tomcat:
     # tomcat的URI编码
     uri-encoding: UTF-8
-    # tomcat最大线程数,默认为200
-    max-threads: 800
-    # Tomcat启动初始化的线程数,默认值25
-    min-spare-threads: 30
+    threads:
+      # tomcat最大线程数,默认为200
+      max: 800
+      # Tomcat启动初始化的线程数,默认值25
+      min-spare: 30
 
 # Spring配置
 spring:

+ 1 - 3
willalp-admin/src/main/resources/logback.xml

@@ -7,11 +7,10 @@
     <!-- 日志输出格式 -->
     <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
     <property name="CONSOLE_LOG_PATTERN"
-              value="%highlight(%date{yyyy-MM-dd HH:mm:ss.SSS}) %cyan([%thread]) %yellow(%-5level) %green(%logger{36}).%boldMagenta(%line) - %blue(%msg%n)"/>
+              value="%highlight(%date{HH:mm:ss.SSS}) %cyan([%thread]) %yellow(%-5level) %green(%logger{36}).%boldMagenta(%line) - %blue(%msg%n)"/>
     <!--value="%date{yyyy-MM-dd HH:mm:ss}|%highlight(%-5level)|%boldYellow(%thread)|%boldGreen(%logger)|%msg%n"/>
     %highlight(%date{yyyy-MM-dd HH:mm:ss.SSS}) %yellow(%-5level) %green(%logger{36}).%boldMagenta(%line) -->
 
-    <!-- 活动文件的大小 -->
     <property name="max.file.size" value="50MB"/>
     <!-- 保留的归档文件的最大数量 -->
     <property name="max.history" value="30"/>
@@ -20,7 +19,6 @@
     <!-- 异步缓冲队列的深度,该值会影响性能.默认值为256 -->
     <property name="queueSize" value="256"/>
 
-
     <!-- 控制台输出 -->
     <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
         <encoder>

+ 1 - 1
willalp-canteen/src/main/java/com/willalp/canteen/mapper/HsGiftOrderDetailMapper.java

@@ -21,7 +21,7 @@ public interface HsGiftOrderDetailMapper extends BaseMapper<HsGiftOrderDetail>
      * @param hsGiftOrderDetail 食堂订单明细
      * @return 食堂订单明细集合
      */
-    public List<OrderResp> selectHsCanteenOrderDetailList(HsGiftOrderDetail hsGiftOrderDetail);
+    List<OrderResp> selectHsCanteenOrderDetailList(HsGiftOrderDetail hsGiftOrderDetail);
 
 
 }

+ 13 - 8
willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsCanteenOrderMapper.xml

@@ -40,7 +40,7 @@
                a.is_delete,
                b.nick_name,
                a.consume_sign,
-#                c.pattern_id,
+               c.pattern_id,
                a.place_number,
                a.zfsj,
                b.phonenumber,
@@ -48,7 +48,7 @@
                f.place_name
         from hs_canteen_order a
                  left join sys_user b on a.user_number = b.user_name
-#                  left join hs_canteen_menu c on a.menu_number = c.menu_number
+                 left join hs_canteen_menu c on a.menu_number = c.menu_number
                  left join sys_card_info d on a.user_number = d.user_id and a.jgid = d.organization_code
                  left join hs_canteen_dining_place f on a.place_number = f.place_number
     </sql>
@@ -223,18 +223,23 @@
     </select>
     <select id="getOrderDataBasedOnMenuAndMonthStat"
             resultType="com.willalp.canteen.domain.vo.LiveUseMoneyMonthStatExcel">
-        SELECT count(1)             count,
-               hco.user_number,
+        SELECT COUNT(0)             count,
                SUM(hco.order_total) sumTotal,
+               hco.user_number,
                su.nick_name,
-               sdd.dict_label       userTypeTitle
+               (
+                   SELECT sdd.dict_label
+                   FROM sys_dict_data sdd,
+                        sys_user_organization suo
+                   WHERE sdd.dict_value = suo.user_type
+                     AND suo.login_name = hco.user_number
+                     AND sdd.dict_type = 'user_type'
+                   LIMIT 1
+               )                    userTypeTitle
         FROM hs_canteen_order hco
                  LEFT JOIN sys_user su ON su.user_name = hco.user_number
-                 LEFT JOIN sys_user_organization suo ON suo.login_name = su.user_name
-                 LEFT JOIN sys_dict_data sdd ON sdd.dict_value = suo.user_type
         WHERE hco.menu_number = #{menuCode}
           AND hco.is_delete = 0
-          AND sdd.dict_type = 'user_type'
           AND YEAR(hco.paytime) = #{year}
           AND MONTH(hco.paytime) = #{month}
         group by hco.user_number

+ 6 - 5
willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsGiftOrderMapper.xml

@@ -65,8 +65,6 @@
         a.user_number,
         a.user_name,
         a.order_total,
-        he.event_name,
-        he.event_time,
         a.device_number,
         a.device_name,
         a.paytime,
@@ -83,9 +81,8 @@
         b.event_id
         from hs_gift_order a
         LEFT JOIN hs_gift_order_detail b ON a.order_number = b.order_number
-        LEFT JOIN hs_event he ON he.id = b.event_id
         <where>
-            a.is_delete = 0 AND b.is_delete = 0 AND he.is_delete = 0
+            a.is_delete = 0 AND b.is_delete = 0
             <if test="orderNumber != null  and orderNumber != ''">and a.order_number = #{orderNumber}</if>
             <if test="userNumber != null  and userNumber != ''">and a.user_number = #{userNumber}</if>
             <if test="userName != null  and userName != ''">and a.user_name = #{userName}</if>
@@ -101,8 +98,12 @@
             <if test="jgid != null and jgid != ''">and a.jgid = #{jgid}</if>
             <if test="placeNumber != null and placeNumber != ''">and a.place_number = #{placeNumber}</if>
         </where>
-        group by a.order_number
+        GROUP BY
+        a.order_number
+        ORDER BY
+        paytime DESC
     </select>
+
     <select id="getSumpay" parameterType="HsGiftOrder" resultType="java.lang.String">
         select sum(order_total) as fee
         from hs_canteen_order

+ 1 - 1
willalp-canteen/src/main/java/com/willalp/canteen/service/IHsGiftOrderService.java

@@ -20,7 +20,7 @@ public interface IHsGiftOrderService extends IService<HsGiftOrder> {
      * @param hsGiftOrder 食堂订单
      * @return 食堂订单集合
      */
-    public List<HsGiftOrder> selectHsCanteenOrderList(HsGiftOrder hsGiftOrder);
+    List<HsGiftOrder> selectHsCanteenOrderList(HsGiftOrder hsGiftOrder);
 
     /**
      * 导出查询礼品订单集合

+ 5 - 5
willalp-clocking-in/src/main/java/com/willalp/clockingin/domain/BizLeave.java

@@ -51,14 +51,14 @@ public class BizLeave extends BaseEntity {
      * e
      * 开始时间
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date leaveStartTime;
 
     /**
      * 结束时间
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date leaveEndTime;
 
@@ -71,13 +71,13 @@ public class BizLeave extends BaseEntity {
     /**
      * 实际开始时间
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date realityStartTime;
 
     /**
      * 实际结束时间
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date realityEndTime;
 
     /**
@@ -95,7 +95,7 @@ public class BizLeave extends BaseEntity {
     /**
      * 申请时间
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date applyTime;
 

+ 0 - 15
willalp-clocking-in/src/main/java/com/willalp/files/domain/HsOrgPersonnelFiles.java

@@ -95,12 +95,6 @@ public class HsOrgPersonnelFiles extends BaseEntity {
     @Excel(name = "文化程度")
     private String educationalLevel;
 
-    /**
-     * 身份证号
-     */
-    @Excel(name = "身份证号(需要文本格式)", width = 30)
-    private String idCard;
-
     /**
      * 生日
      */
@@ -247,14 +241,6 @@ public class HsOrgPersonnelFiles extends BaseEntity {
         return educationalLevel;
     }
 
-    public void setIdCard(String idCard) {
-        this.idCard = idCard;
-    }
-
-    public String getIdCard() {
-        return idCard;
-    }
-
     public void setBirthday(String birthday) {
         this.birthday = birthday;
     }
@@ -348,7 +334,6 @@ public class HsOrgPersonnelFiles extends BaseEntity {
                 .append("origo", getOrigo())
                 .append("politicsStatus", getPoliticsStatus())
                 .append("educationalLevel", getEducationalLevel())
-                .append("idCard", getIdCard())
                 .append("birthday", getBirthday())
                 .append("residence", getResidence())
                 .append("phone", getPhone())

+ 1 - 6
willalp-clocking-in/src/main/java/com/willalp/files/mapper/xml/HsOrgPersonnelFilesMapper.xml

@@ -16,7 +16,6 @@
         <result property="origo" column="origo"/>
         <result property="politicsStatus" column="politics_status"/>
         <result property="educationalLevel" column="educational_level"/>
-        <result property="idCard" column="id_card"/>
         <result property="birthday" column="birthday"/>
         <result property="residence" column="residence"/>
         <result property="phone" column="phone"/>
@@ -47,7 +46,6 @@
                origo,
                politics_status,
                educational_level,
-               id_card,
                birthday,
                residence,
                hpf.phone,
@@ -99,9 +97,6 @@
             <if test="educationalLevel != null  and educationalLevel != ''">
                 and educational_level = #{educationalLevel}
             </if>
-            <if test="idCard != null  and idCard != ''">
-                and id_card = #{idCard}
-            </if>
             <if test="birthday != null  and birthday != ''">
                 and birthday = #{birthday}
             </if>
@@ -109,7 +104,7 @@
                 and residence = #{residence}
             </if>
             <if test="phone != null  and phone != ''">
-                and  hpf.phone = #{phone}
+                and hpf.phone = #{phone}
             </if>
             <if test="email != null  and email != ''">
                 and email = #{email}

+ 8 - 0
willalp-clocking-in/src/main/java/com/willalp/files/service/IHsOrgPersonnelFilesService.java

@@ -23,4 +23,12 @@ public interface IHsOrgPersonnelFilesService extends IService<HsOrgPersonnelFile
     List<HsOrgPersonnelFiles> importHsOrgPersonnelFilesList(HsOrgPersonnelFiles hsOrgPersonnelFiles);
 
     String importData(List<HsOrgPersonnelFiles> list);
+
+    /**
+     * app根据手机号查询员工档案 展示名片功能
+     *
+     * @param phone
+     * @return
+     */
+    HsOrgPersonnelFiles appGetHsOrgPersonnelFilesByPhone(String phone);
 }

+ 49 - 0
willalp-clocking-in/src/main/java/com/willalp/files/service/impl/HsOrgPersonnelFilesServiceImpl.java

@@ -1,12 +1,17 @@
 package com.willalp.files.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.willalp.common.core.domain.AjaxResult;
+import com.willalp.common.core.domain.entity.SysDept;
 import com.willalp.common.core.domain.entity.SysDictData;
 import com.willalp.common.exception.base.BaseException;
 import com.willalp.common.utils.StringUtils;
 import com.willalp.files.domain.HsOrgPersonnelFiles;
 import com.willalp.files.mapper.HsOrgPersonnelFilesMapper;
 import com.willalp.files.service.IHsOrgPersonnelFilesService;
+import com.willalp.system.domain.SysDeptPost;
+import com.willalp.system.service.ISysDeptPostService;
 import com.willalp.system.service.ISysDeptService;
 import com.willalp.system.service.ISysDictDataService;
 import com.willalp.system.service.ISysDictTypeService;
@@ -118,4 +123,48 @@ public class HsOrgPersonnelFilesServiceImpl extends ServiceImpl<HsOrgPersonnelFi
         }
         return "共导入【" + savaList.size() + "】条新数据,更新【" + updateList.size() + "】条数据";
     }
+
+
+    @Resource
+    private ISysDeptService sysDeptService;
+
+    @Resource
+    private ISysDeptPostService sysDeptPostService;
+
+    @Override
+    public HsOrgPersonnelFiles appGetHsOrgPersonnelFilesByPhone(String phone) {
+        if (StringUtils.isBlank(phone)) {
+            throw new BaseException("手机号为空,请添加档案信息");
+        }
+        HsOrgPersonnelFiles orgPersonnelFiles = this.getBaseMapper().selectOne(new QueryWrapper<HsOrgPersonnelFiles>()
+                .eq("phone", phone));
+        if (orgPersonnelFiles == null) {
+            throw new BaseException("暂未查询到该用户名片信息");
+        }
+        //补充部门信息
+        String department = orgPersonnelFiles.getDepartment();
+        if (StringUtils.isNotBlank(department)) {
+            SysDept sysDept = sysDeptService.selectDeptById(Long.valueOf(department));
+            orgPersonnelFiles.setDepartment(sysDept.getDeptName());
+        } else {
+            orgPersonnelFiles.setDepartment("暂无");
+        }
+        //补充岗位信息
+        String post = orgPersonnelFiles.getPost();
+        if (StringUtils.isNotBlank(post)) {
+            SysDeptPost sysDeptPost = sysDeptPostService.selectById(Long.valueOf(post));
+            orgPersonnelFiles.setPost(sysDeptPost.getPostName());
+        } else {
+            orgPersonnelFiles.setPost("暂无");
+        }
+        String seatNo = orgPersonnelFiles.getSeatNo();
+        if (StringUtils.isBlank(seatNo)) {
+            orgPersonnelFiles.setSeatNo("暂无");
+        }
+        String email = orgPersonnelFiles.getEmail();
+        if (StringUtils.isBlank(email)) {
+            orgPersonnelFiles.setEmail("暂无");
+        }
+        return orgPersonnelFiles;
+    }
 }

+ 72 - 74
willalp-clocking-in/src/main/java/com/willalp/flow/domain/HsFlowBase.java

@@ -14,8 +14,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
  */
 
 @TableName("hs_flow_base")
-public class HsFlowBase
-{
+public class HsFlowBase {
     private static final long serialVersionUID = 1L;
 
     /** 主键 */
@@ -74,150 +73,149 @@ public class HsFlowBase
     @Excel(name = "会签ID")
     private String countersignId;
 
-    public void setId(String id)
-    {
+    /**
+     * 抄送ID
+     */
+    @Excel(name = "抄送ID")
+    private String ccId;
+
+    public void setId(String id) {
         this.id = id;
     }
 
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
-    public void setModelId(String modelId)
-    {
+
+    public void setModelId(String modelId) {
         this.modelId = modelId;
     }
 
-    public String getModelId()
-    {
+    public String getModelId() {
         return modelId;
     }
-    public void setExamplesId(String examplesId)
-    {
+
+    public void setExamplesId(String examplesId) {
         this.examplesId = examplesId;
     }
 
-    public String getExamplesId()
-    {
+    public String getExamplesId() {
         return examplesId;
     }
-    public void setGroupId(String groupId)
-    {
+
+    public void setGroupId(String groupId) {
         this.groupId = groupId;
     }
 
-    public String getGroupId()
-    {
+    public String getGroupId() {
         return groupId;
     }
-    public void setFlowModuleName(String flowModuleName)
-    {
+
+    public void setFlowModuleName(String flowModuleName) {
         this.flowModuleName = flowModuleName;
     }
 
-    public String getFlowModuleName()
-    {
+    public String getFlowModuleName() {
         return flowModuleName;
     }
-    public void setUpStepId(String upStepId)
-    {
+
+    public void setUpStepId(String upStepId) {
         this.upStepId = upStepId;
     }
 
-    public String getUpStepId()
-    {
+    public String getUpStepId() {
         return upStepId;
     }
-    public void setDownStepId(String downStepId)
-    {
+
+    public void setDownStepId(String downStepId) {
         this.downStepId = downStepId;
     }
 
-    public String getDownStepId()
-    {
+    public String getDownStepId() {
         return downStepId;
     }
-    public void setAssignStepId(String assignStepId)
-    {
+
+    public void setAssignStepId(String assignStepId) {
         this.assignStepId = assignStepId;
     }
 
-    public String getAssignStepId()
-    {
+    public String getAssignStepId() {
         return assignStepId;
     }
-    public void setIsAudit(String isAudit)
-    {
+
+    public void setIsAudit(String isAudit) {
         this.isAudit = isAudit;
     }
 
-    public String getIsAudit()
-    {
+    public String getIsAudit() {
         return isAudit;
     }
-    public void setPassTrueStepId(String passTrueStepId)
-    {
+
+    public void setPassTrueStepId(String passTrueStepId) {
         this.passTrueStepId = passTrueStepId;
     }
 
-    public String getPassTrueStepId()
-    {
+    public String getPassTrueStepId() {
         return passTrueStepId;
     }
-    public void setPassFalseStepId(String passFalseStepId)
-    {
+
+    public void setPassFalseStepId(String passFalseStepId) {
         this.passFalseStepId = passFalseStepId;
     }
 
-    public String getPassFalseStepId()
-    {
+    public String getPassFalseStepId() {
         return passFalseStepId;
     }
-    public void setOperator(String operator)
-    {
+
+    public void setOperator(String operator) {
         this.operator = operator;
     }
 
-    public String getOperator()
-    {
+    public String getOperator() {
         return operator;
     }
-    public void setTermModuleId(String termModuleId)
-    {
+
+    public void setTermModuleId(String termModuleId) {
         this.termModuleId = termModuleId;
     }
 
-    public String getTermModuleId()
-    {
+    public String getTermModuleId() {
         return termModuleId;
     }
-    public void setCountersignId(String countersignId)
-    {
+
+    public void setCountersignId(String countersignId) {
         this.countersignId = countersignId;
     }
 
-    public String getCountersignId()
-    {
+    public String getCountersignId() {
         return countersignId;
     }
 
+    public String getCcId() {
+        return ccId;
+    }
+
+    public void setCcId(String ccId) {
+        this.ccId = ccId;
+    }
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("modelId", getModelId())
-            .append("examplesId", getExamplesId())
-            .append("groupId", getGroupId())
-            .append("flowModuleName", getFlowModuleName())
-            .append("upStepId", getUpStepId())
-            .append("downStepId", getDownStepId())
-            .append("assignStepId", getAssignStepId())
-            .append("isAudit", getIsAudit())
-            .append("passTrueStepId", getPassTrueStepId())
-            .append("passFalseStepId", getPassFalseStepId())
-            .append("operator", getOperator())
-            .append("termModuleId", getTermModuleId())
-            .append("countersignId", getCountersignId())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("modelId", getModelId())
+                .append("examplesId", getExamplesId())
+                .append("groupId", getGroupId())
+                .append("flowModuleName", getFlowModuleName())
+                .append("upStepId", getUpStepId())
+                .append("downStepId", getDownStepId())
+                .append("assignStepId", getAssignStepId())
+                .append("isAudit", getIsAudit())
+                .append("passTrueStepId", getPassTrueStepId())
+                .append("passFalseStepId", getPassFalseStepId())
+                .append("operator", getOperator())
+                .append("termModuleId", getTermModuleId())
+                .append("countersignId", getCountersignId())
+                .toString();
     }
 }

+ 130 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/domain/HsFlowCc.java

@@ -0,0 +1,130 @@
+package com.willalp.flow.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+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;
+
+/**
+ * 流程单抄送记录对象 hs_flow_cc
+ *
+ * @author willalp
+ * @date 2023-02-14
+ */
+
+@TableName("hs_flow_cc")
+public class HsFlowCc extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @TableId
+    private String id;
+
+    /** 标题 */
+    @Excel(name = "标题")
+    private String title;
+
+    /** 业务数据 */
+    @Excel(name = "业务数据")
+    private String formData;
+
+    /** 发起人 */
+    @Excel(name = "发起人")
+    private String apply;
+
+    /** 抄送用户 */
+    @Excel(name = "抄送用户")
+    private String users;
+
+    /** 是否删除(0.未删除;1.已删除) */
+    private Integer isDelete;
+
+    /** 模型ID */
+    @Excel(name = "模型ID")
+    private String examplesId;
+
+    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 String getFormData() {
+        return formData;
+    }
+
+    public void setFormData(String formData) {
+        this.formData = formData;
+    }
+
+    public void setApply(String apply)
+    {
+        this.apply = apply;
+    }
+
+    public String getApply()
+    {
+        return apply;
+    }
+    public void setUsers(String users)
+    {
+        this.users = users;
+    }
+
+    public String getUsers()
+    {
+        return users;
+    }
+    public void setIsDelete(Integer isDelete)
+    {
+        this.isDelete = isDelete;
+    }
+
+    public Integer getIsDelete()
+    {
+        return isDelete;
+    }
+    public void setExamplesId(String examplesId)
+    {
+        this.examplesId = examplesId;
+    }
+
+    public String getExamplesId()
+    {
+        return examplesId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("title", getTitle())
+            .append("jsonData", getFormData())
+            .append("apply", getApply())
+            .append("users", getUsers())
+            .append("isDelete", getIsDelete())
+            .append("examplesId", getExamplesId())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 8 - 2
willalp-clocking-in/src/main/java/com/willalp/flow/domain/enums/FlowEnum.java

@@ -5,14 +5,20 @@ package com.willalp.flow.domain.enums;
  */
 
 public enum FlowEnum {
+    /** 否 */
     IS_ZERO("0", "否"),
+    /** 是 */
     IS_ONE("1", "是"),
+    /** 同意 */
     RESULT_TRUE("RESULT_TRUE", "同意"),
+    /** 拒绝 */
     RESULT_FALSE("RESULT_FALSE", "拒绝"),
+    /** 第一位 */
     FIRST("FIRST", "第一位"),
+    /** 转交 */
     RESULT_CASE_OF("RESULT_CASE_OF", "转交"),
-    LEAVE_FLOW_EXAMPLES_ID("1580107848471093250", "请假流程实例ID"),
-    FILE_FLOW_EXAMPLES_ID("1600773666636759041", "文件流程实例ID");
+    /** 抄送 */
+    CC("CC", "抄送");
 
     private String value;
     private String label;

+ 23 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/mapper/HsFlowCcMapper.java

@@ -0,0 +1,23 @@
+package com.willalp.flow.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.willalp.flow.domain.HsFlowCc;
+
+import java.util.List;
+
+/**
+ * 流程单抄送记录Mapper接口
+ *
+ * @author willalp
+ * @date 2023-02-14
+ */
+public interface HsFlowCcMapper extends BaseMapper<HsFlowCc>
+{
+    /**
+     * 查询流程单抄送记录列表
+     *
+     * @param hsFlowCc 流程单抄送记录
+     * @return 流程单抄送记录集合
+     */
+    List<HsFlowCc> selectHsFlowCcList(HsFlowCc hsFlowCc);
+}

+ 41 - 30
willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/BizLeaveImgMapper.xml

@@ -5,42 +5,53 @@
 <mapper namespace="com.willalp.flow.mapper.BizLeaveImgMapper">
 
     <resultMap type="com.willalp.flow.domain.BizLeaveImg" id="BizLeaveImgResult">
-                    <result property="id" column="id"/>
-                    <result property="bizLeaveId" column="biz_leave_id"/>
-                    <result property="url" column="url"/>
-                    <result property="size" column="size"/>
-                    <result property="type" column="type"/>
-                    <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>
-    
+        <result property="id" column="id"/>
+        <result property="bizLeaveId" column="biz_leave_id"/>
+        <result property="url" column="url"/>
+        <result property="size" column="size"/>
+        <result property="type" column="type"/>
+        <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="selectBizLeaveImgVo">
-        select id, biz_leave_id, url, size, type, is_delete, create_by, create_time, update_by, update_time, remark        from biz_leave_img
+        select id,
+               biz_leave_id,
+               url,
+               size,
+               type,
+               is_delete,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark
+        from biz_leave_img
     </sql>
 
     <select id="selectBizLeaveImgList" parameterType="BizLeaveImg" resultMap="BizLeaveImgResult">
         <include refid="selectBizLeaveImgVo"/>
         <where>
             is_delete = 0
-                                                                                                    <if test="bizLeaveId != null  and bizLeaveId != ''">
-                            and biz_leave_id = #{bizLeaveId}
-                        </if>
-                                                                                                            <if test="url != null  and url != ''">
-                            and url = #{url}
-                        </if>
-                                                                                                            <if test="size != null ">
-                            and size = #{size}
-                        </if>
-                                                                                                            <if test="type != null  and type != ''">
-                            and type = #{type}
-                        </if>
-                                                                                                            <if test="isDelete != null ">
-                            and is_delete = #{isDelete}
-                        </if>
-                                                                                                                                                                                                    </where>
+            <if test="bizLeaveId != null  and bizLeaveId != ''">
+                and biz_leave_id = #{bizLeaveId}
+            </if>
+            <if test="url != null  and url != ''">
+                and url = #{url}
+            </if>
+            <if test="size != null ">
+                and size = #{size}
+            </if>
+            <if test="type != null  and type != ''">
+                and type = #{type}
+            </if>
+            <if test="isDelete != null ">
+                and is_delete = #{isDelete}
+            </if>
+        </where>
     </select>
 </mapper>

+ 60 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/HsFlowCcMapper.xml

@@ -0,0 +1,60 @@
+<?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.HsFlowCcMapper">
+
+    <resultMap type="com.willalp.flow.domain.HsFlowCc" id="HsFlowCcResult">
+        <result property="id" column="id"/>
+        <result property="title" column="title"/>
+        <result property="formData" column="form_data"/>
+        <result property="apply" column="apply"/>
+        <result property="users" column="users"/>
+        <result property="isDelete" column="is_delete"/>
+        <result property="examplesId" column="examples_id"/>
+        <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="selectHsFlowCcVo">
+        select id,
+               title,
+               form_data,
+               apply,
+               users,
+               is_delete,
+               examples_id,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark
+        from hs_flow_cc
+    </sql>
+
+    <select id="selectHsFlowCcList" parameterType="HsFlowCc" resultMap="HsFlowCcResult">
+        <include refid="selectHsFlowCcVo"/>
+        <where>
+            is_delete = 0
+            <if test="title != null  and title != ''">
+                and title = #{title}
+            </if>
+            <if test="jsonData != null  and jsonData != ''">
+                and json_data = #{jsonData}
+            </if>
+            <if test="apply != null  and apply != ''">
+                and apply = #{apply}
+            </if>
+            <if test="users != null  and users != ''">
+                and users = #{users}
+            </if>
+            <if test="examplesId != null  and examplesId != ''">
+                and examples_id = #{examplesId}
+            </if>
+        </where>
+        order by update_time desc
+    </select>
+</mapper>

+ 14 - 14
willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/HsFlowTaskMapper.xml

@@ -26,25 +26,25 @@
     </resultMap>
 
     <sql id="selectHsFlowTaskVo">
-        select id,
+        select hft.id,
                task_name,
                examples_id,
                base_group_id,
-               base_id,
+               hft.base_id,
                base_name,
                is_candidate,
                initiator,
-               operator,
+               hft.operator,
                is_end,
                business_id,
                msg_is_read,
-               is_delete,
-               create_by,
-               create_time,
-               update_by,
-               update_time,
-               remark
-        from hs_flow_task
+               hft.is_delete,
+               hft.create_by,
+               hft.create_time,
+               hft.update_by,
+               hft.update_time,
+               hft.remark
+        from hs_flow_task hft
     </sql>
 
     <select id="selectHsFlowTaskList" parameterType="HsFlowTask" resultMap="HsFlowTaskResult">
@@ -90,11 +90,11 @@
 
     <select id="getDone" resultType="com.willalp.flow.domain.HsFlowTask">
         <include refid="selectHsFlowTaskVo"/>
+        left join hs_flow_running_record hfrr on hft.id = hfrr.task_id
         <where>
-            is_delete = 0
-            AND is_end = '1'
-            AND operator = #{userCode}
+            hft.is_delete = 0
+            AND hfrr.operator = #{userCode}
         </where>
-        group by create_time desc
+        group by hft.create_time desc
     </select>
 </mapper>

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

@@ -28,7 +28,7 @@ public interface IHsFlowBaseService extends IService<HsFlowBase>
      * @param baseId
      * @return
      */
-    HsFlowBase getCurrentFlowTaskBase(String groupId, String baseId);
+    HsFlowBase getFlowTaskBaseByGroupIdAndBaseId(String groupId, String baseId);
 
     /**
      * 获取下一个流程任务 Base组件信息

+ 31 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/service/IHsFlowCcService.java

@@ -0,0 +1,31 @@
+package com.willalp.flow.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.willalp.flow.domain.HsFlowCc;
+
+import java.util.List;
+
+/**
+ * 流程单抄送记录Service接口
+ *
+ * @author willalp
+ * @date 2023-02-14
+ */
+public interface IHsFlowCcService extends IService<HsFlowCc>
+{
+    /**
+     * 查询流程单抄送记录列表
+     *
+     * @param hsFlowCc 流程单抄送记录
+     * @return 流程单抄送记录集合
+     */
+    public List<HsFlowCc> selectHsFlowCcList(HsFlowCc hsFlowCc);
+
+    /**
+     * 根据UserID查询流程单抄送记录列表
+     *
+     * @param userId 用户ID
+     * @return 流程单抄送记录集合
+     */
+    List<HsFlowCc> selectHsFlowCcListByUserId(String userId);
+}

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

@@ -35,7 +35,7 @@ public class HsFlowBaseServiceImpl extends ServiceImpl<HsFlowBaseMapper, HsFlowB
     }
 
     @Override
-    public HsFlowBase getCurrentFlowTaskBase(String groupId, String baseId) {
+    public HsFlowBase getFlowTaskBaseByGroupIdAndBaseId(String groupId, String baseId) {
         return hsFlowBaseMapper.selectOne(
                 new QueryWrapper<HsFlowBase>()
                         .eq("group_id", groupId)

+ 47 - 0
willalp-clocking-in/src/main/java/com/willalp/flow/service/impl/HsFlowCcServiceImpl.java

@@ -0,0 +1,47 @@
+package com.willalp.flow.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.willalp.common.utils.StringUtils;
+import com.willalp.flow.domain.HsFlowCc;
+import com.willalp.flow.mapper.HsFlowCcMapper;
+import com.willalp.flow.service.IHsFlowCcService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 流程单抄送记录Service业务层处理
+ *
+ * @author willalp
+ * @date 2023-02-14
+ */
+@Service
+public class HsFlowCcServiceImpl extends ServiceImpl<HsFlowCcMapper, HsFlowCc>  implements IHsFlowCcService
+{
+    @Resource
+    private HsFlowCcMapper hsFlowCcMapper;
+
+    /**
+     * 查询流程单抄送记录列表
+     *
+     * @param hsFlowCc 流程单抄送记录
+     * @return 流程单抄送记录
+     */
+    @Override
+    public List<HsFlowCc> selectHsFlowCcList(HsFlowCc hsFlowCc)
+    {
+        return hsFlowCcMapper.selectHsFlowCcList(hsFlowCc);
+    }
+
+    @Override
+    public List<HsFlowCc> selectHsFlowCcListByUserId(String userId) {
+        if (StringUtils.isBlank(userId)) {
+            return new ArrayList<>();
+        }
+        return getBaseMapper().selectList(new QueryWrapper<HsFlowCc>().last("where locate('" + userId + "',users) order by update_time desc"));
+    }
+
+}

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

@@ -19,7 +19,6 @@ import com.willalp.msg.service.IHsAppUserMsgService;
 import com.willalp.system.domain.vo.PostTreeVo;
 import com.willalp.system.service.ISysConfigService;
 import com.willalp.wx.domain.WxMsgTemplateApproval;
-import com.willalp.wx.domain.WxMsgTemplateApprovalResult;
 import com.willalp.wx.enums.WxTemplateKeyEnum;
 import com.willalp.wx.service.WxMsgService;
 import com.willalp.wx.utils.WxUtils;
@@ -42,6 +41,9 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
     @Resource
     private IHsFlowBaseService flowBaseService;
 
+    @Resource
+    private IHsFlowCcService flowCcService;
+
     @Resource
     private HsFlowExamplesMapper hsFlowExamplesMapper;
 
@@ -204,7 +206,7 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
             throw new BaseException("FLOW_BASE_GROUP_ID - IS_NULL");
         }
         //获取当前基础组件
-        HsFlowBase hsFlowBase = flowBaseService.getCurrentFlowTaskBase(hsFlowTask.getBaseGroupId(), flow.getBaseId());
+        HsFlowBase hsFlowBase = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(hsFlowTask.getBaseGroupId(), flow.getBaseId());
         if (null == hsFlowBase) {
             throw new BaseException("没有找到组件");
         }
@@ -228,11 +230,15 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
         boolean resultCaseOf = FlowEnum.RESULT_CASE_OF.getValue().equals(flow.getResult());
         Map<String, Object> formData = flow.getFormData();
         List<HsFlowRunningRecord> list = new ArrayList<>();
-        //生成记录
+        HsFlowBase nextFlowBase = null;
+        //生成审批记录
         HsFlowRunningRecord frr = new HsFlowRunningRecord();
+        String username = SecurityUtils.getUsername();
         frr.setBaseId(flow.getBaseId());
         frr.setTaskId(flow.getTaskId());
         frr.setCreateTime(new Date());
+        frr.setOperator(username);
+        String baseName = null;
         if (resultCaseOf) {
             //转交
             hsFlowTask.setOperator(flow.getNextApproval());
@@ -240,64 +246,102 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
             frr.setOperator(SecurityUtils.getUsername());
             frr.setYesOrNo(flow.getResult());
         } else {
-            //查看有无条件组件
             if (resultTrue) {
+                //查看有无条件组件
                 hsFlowBase = getFlowBaseByTermResult(flow.getTaskId(), hsFlowBase, formData);
-            }
-            if (resultTrue) {
                 stepId = hsFlowBase.getDownStepId();
             } else {
-                // stepId = hsFlowBase.getUpStepId();
                 stepId = flow.getRejectBaseId();
             }
-            String username = SecurityUtils.getUsername();
+            nextFlowBase = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(hsFlowTask.getBaseGroupId(), stepId);
+            //判断新组件下一步是否需要抄送
+            if (nextFlowBase != null && StringUtils.isNotBlank(nextFlowBase.getCcId())) {
+                HsFlowCc cc = new HsFlowCc();
+                cc.setExamplesId(hsFlowTask.getExamplesId());
+                cc.setFormData(JSON.toJSONString(formData));
+                cc.setApply(hsFlowTask.getInitiator());
+                cc.setTitle(hsFlowTask.getTaskName());
+                Operators operators = JSON.parseObject(nextFlowBase.getOperator(), Operators.class);
+                List<Operators.OperatorDto> assignedUser = operators.getAssignedUser();
+                StringBuilder sbUid = new StringBuilder();
+                StringBuilder sbUname = new StringBuilder();
+                if (0 != assignedUser.size()) {
+                    for (int i = 0; i < assignedUser.size(); i++) {
+                        if (i != (assignedUser.size() - 1)) {
+                            sbUid.append(assignedUser.get(i).getId()).append(",");
+                            sbUname.append(assignedUser.get(i).getName()).append(",");
+                        } else {
+                            sbUid.append(assignedUser.get(i).getId());
+                            sbUname.append(assignedUser.get(i).getName());
+                        }
+                    }
+                    cc.setUsers(sbUid.toString());
+                }
+                flowCcService.save(cc);
+                if (StringUtils.isBlank(nextFlowBase.getDownStepId())) {
+                    if (resultTrue) {
+                        wxMsgService.sendResultMsg("审批抄送 - " + formData.get("title"), "已通过", String.valueOf(formData.get("apply_user_id")));
+                    }
+                } else {
+                    stepId = nextFlowBase.getDownStepId();
+                    nextFlowBase = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(hsFlowTask.getBaseGroupId(), stepId);
+                    baseName = nextFlowBase.getFlowModuleName();
+                    wxMsgService.sendResultMsg("审批抄送 - " + formData.get("title"), "进行中", String.valueOf(formData.get("apply_user_id")));
+                }
+                HsFlowRunningRecord frrCc = new HsFlowRunningRecord();
+                frrCc.setBaseId(flow.getBaseId());
+                frrCc.setTaskId(flow.getTaskId());
+                frrCc.setCreateTime(new Date());
+                frrCc.setComment("已抄送至下述人员:" + sbUname);
+                frrCc.setOperator(username);
+                frrCc.setYesOrNo(FlowEnum.CC.getValue());
+                list.add(frrCc);
+            } else {
+                nextFlowBase = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(hsFlowTask.getBaseGroupId(), stepId);
+            }
             frr.setComment(hsFlowTask.getBaseName() + ":" + SecurityUtils.getLoginUser().getUser().getNickName() + " - " + flow.getComment());
-            frr.setOperator(username);
             frr.setYesOrNo(flow.getResult());
         }
         list.add(frr);
-        if (StringUtils.isNotBlank(stepId)) {
+        if (StringUtils.isNotBlank(stepId) && StringUtils.isBlank(nextFlowBase.getCcId())) {
             hsFlowTask.setBaseId(stepId);
             //判断新组件下一步是否需要选择人员
-            HsFlowBase hsFlowBase1 = flowBaseService.getCurrentFlowTaskBase(hsFlowTask.getBaseGroupId(), stepId);
             if (StringUtils.isNotBlank(flow.getNextApproval())) {
                 frr.setOperator(SecurityUtils.getUsername());
                 hsFlowTask.setOperator(flow.getNextApproval());
-                hsFlowTask.setBaseName(hsFlowBase1.getFlowModuleName());
+                //如果有抄送获取抄送下一级的baseName
+                if (StringUtils.isNotBlank(nextFlowBase.getCcId())) {
+                    hsFlowTask.setBaseName(baseName);
+                } else {
+                    hsFlowTask.setBaseName(nextFlowBase.getFlowModuleName());
+                }
             } else if (!resultTrue) {
                 hsFlowTask.setBaseId(stepId);
                 hsFlowTask.setOperator(flow.getNextApproval());
-                HsFlowBase currentFlowTaskBase = flowBaseService.getCurrentFlowTaskBase(hsFlowTask.getBaseGroupId(), stepId);
+                HsFlowBase currentFlowTaskBase = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(hsFlowTask.getBaseGroupId(), stepId);
                 hsFlowTask.setBaseName(currentFlowTaskBase.getFlowModuleName());
-                //拒绝时 通过记录 反向比对 查找上一步 同意的数据并 更新任务
-//                List<HsFlowRunningRecord> flowRunningRecords = flowRunningRecordService.selectHsFlowRunningRecordTrue(flow.getTaskId());
-//                int count = 0;
-//                for (int i = 0; i < flowRunningRecords.size(); i++) {
-//                    String baseId = flowRunningRecords.get(i).getBaseId();
-//                    if (StringUtils.isNotBlank(baseId) && StringUtils.equals(baseId, stepId)) {
-//                        hsFlowTask.setBaseId(flowRunningRecords.get(i).getBaseId());
-//                        hsFlowTask.setOperator(flowRunningRecords.get(i).getOperator());
-//                        HsFlowBase currentFlowTaskBase = flowBaseService.getCurrentFlowTaskBase(hsFlowTask.getBaseGroupId(), baseId);
-//                        hsFlowTask.setBaseName(currentFlowTaskBase.getFlowModuleName());
-//                        count++;
-//                        break;
-//                    }
-//                }
-                //没有找到 直接结束
-//                if (count == 0) {
-//                    stepId = null;
-//                }
             } else {
                 //避免异常找不到任务默认admin
                 hsFlowTask.setOperator("admin");
                 throw new BaseException("未选择下一步审批人员");
             }
-            if (null != hsFlowBase1 && StringUtils.isBlank(hsFlowBase1.getDownStepId()) &&
-                    StringUtils.isBlank(hsFlowBase1.getTermModuleId())) {
-                hsFlowTask.setIsCandidate("1");
+            String isCandidate = null;
+            if (StringUtils.isNotBlank(nextFlowBase.getDownStepId())) {
+                //查询是否是抄送组件
+                HsFlowBase base = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(hsFlowTask.getBaseGroupId(), nextFlowBase.getDownStepId());
+                if (base != null && StringUtils.isNotBlank(base.getCcId())) {
+                    isCandidate = "1";
+                } else {
+                    isCandidate = "0";
+                }
+            } else if (StringUtils.isBlank(nextFlowBase.getTermModuleId())) {
+                isCandidate = "1";
             } else {
-                hsFlowTask.setIsCandidate("0");
+                isCandidate = "0";
             }
+            hsFlowTask.setIsCandidate(isCandidate);
+        } else {
+            stepId = null;
         }
         //任务结束
         if (StringUtils.isBlank(stepId) && !resultCaseOf) {
@@ -321,39 +365,29 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
             appUserMsg.setRemark(hsFlowTask.getId());
             appUserMsg.setCreateTime(new Date());
             userMsgService.save(appUserMsg);
-
             //推送微信审批结果通知
-            WxMsgTemplateApprovalResult wxMsgTemplateApproval = new WxMsgTemplateApprovalResult();
-            wxMsgTemplateApproval.setPhrase4(wxUtils.getFormat(resultTrue ? "已通过" : "已拒绝"));
-            wxMsgTemplateApproval.setDate3(wxUtils.getFormat(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date())));
-            wxMsgTemplateApproval.setThing6(wxUtils.getFormat(String.valueOf(formData.get("title"))));
-            wxMsgService.sendQRCodeMsg(String.valueOf(formData.get("apply_user_id")), wxMsgTemplateApproval, WxTemplateKeyEnum.APPROVAL_RESULT, true);
+            wxMsgService.sendResultMsg(String.valueOf(formData.get("title")), resultTrue ? "已通过" : "已拒绝", String.valueOf(formData.get("apply_user_id")));
         } else {
             //任务继续
             hsFlowTask.setMsgIsRead("0");
             //生成审批结果消息列表
             HsAppUserMsg appUserMsg = new HsAppUserMsg();
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
             String content = null;
-            try {
-                String examplesId = hsFlowTask.getExamplesId();
-                if (examplesId.equals(sysConfigService.selectConfigByKey(HsFlowEngineService.BIZ_LEAVE_FLOW_KEY))) {
-                    content = "<p>标题:" + formData.get("title") + "</p>" +
-                            "<p>申请人:" + formData.get("apply_user_name") + "</p>" +
-                            "<p>开始时间:" + DateUtils.dateTime(sdf.parse(formData.get("leave_start_time").toString())) + "</p>" +
-                            "<p>结束时间:" + DateUtils.dateTime(sdf.parse(formData.get("leave_end_time").toString())) + "</p>";
-                } else if (examplesId.equals(sysConfigService.selectConfigByKey(HsFlowEngineService.FILE_APPROVAL_FLOW_KEY))) {
-                    //异步生成审批消息列表
-                    content = "<p>标题:" + formData.get("title") + "</p>" +
-                            "<p>申请人:" + formData.get("apply_user_name") + "</p>";
-                } else if (examplesId.equals(sysConfigService.selectConfigByKey(HsFlowEngineService.RESERVE_FLOW_KEY))) {
-                    content = "<p>标题:" + formData.get("title") + "</p>" +
-                            "<p>申请人:" + formData.get("apply_user_name") + "</p>" +
-                            "<p>物资名称:" + formData.get("reserve_name") + "</p>" +
-                            "<p>申请数量:" + formData.get("apply_amount") + "</p>";
-                }
-            } catch (ParseException e) {
-                e.printStackTrace();
+            String examplesId = hsFlowTask.getExamplesId();
+            if (examplesId.equals(sysConfigService.selectConfigByKey(HsFlowEngineService.BIZ_LEAVE_FLOW_KEY))) {
+                content = "<p>标题:" + formData.get("title") + "</p>" +
+                        "<p>申请人:" + formData.get("apply_user_name") + "</p>" +
+                        "<p>开始时间:" + formData.get("leave_start_time").toString() + "</p>" +
+                        "<p>结束时间:" + formData.get("leave_end_time").toString() + "</p>";
+            } else if (examplesId.equals(sysConfigService.selectConfigByKey(HsFlowEngineService.FILE_APPROVAL_FLOW_KEY))) {
+                //异步生成审批消息列表
+                content = "<p>标题:" + formData.get("title") + "</p>" +
+                        "<p>申请人:" + formData.get("apply_user_name") + "</p>";
+            } else if (examplesId.equals(sysConfigService.selectConfigByKey(HsFlowEngineService.RESERVE_FLOW_KEY))) {
+                content = "<p>标题:" + formData.get("title") + "</p>" +
+                        "<p>申请人:" + formData.get("apply_user_name") + "</p>" +
+                        "<p>物资名称:" + formData.get("reserve_name") + "</p>" +
+                        "<p>申请数量:" + formData.get("apply_amount") + "</p>";
             }
             appUserMsg.setMsgContent(content);
             appUserMsg.setMsgTitle(String.valueOf(formData.get("title")));
@@ -413,7 +447,7 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
                         if (StringUtils.isBlank(termModule.getDownStepId())) {
                             throw new BaseException("流程条件配置出错,没有后续审批人");
                         }
-                        HsFlowBase taskCurrentBase = flowBaseService.getCurrentFlowTaskBase(termModule.getGroupId()
+                        HsFlowBase taskCurrentBase = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(termModule.getGroupId()
                                 , termModule.getDownStepId());
                         if (null == taskCurrentBase) {
                             throw new BaseException("流程条件配置出错");
@@ -516,12 +550,19 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
     @Override
     public List<HsFlowRunningRecord> rejectTaskRecords(String taskId) {
         if (StringUtils.isNotBlank(taskId)) {
-            List<HsFlowRunningRecord> flowRunningRecords = flowRunningRecordService.getBaseMapper().selectList(new QueryWrapper<HsFlowRunningRecord>()
+            List<HsFlowRunningRecord> flowRunningRecords = new ArrayList<>();
+            HsFlowRunningRecord hsFlowRunningRecord = new HsFlowRunningRecord();
+            hsFlowRunningRecord.setTaskId(taskId);
+            hsFlowRunningRecord.setComment("发起人");
+            hsFlowRunningRecord.setYesOrNo("LAUNCH");
+            flowRunningRecords.add(hsFlowRunningRecord);
+            List<HsFlowRunningRecord> records = flowRunningRecordService.getBaseMapper().selectList(new QueryWrapper<HsFlowRunningRecord>()
                     .eq("task_id", taskId).last("AND yes_or_no = 'RESULT_TRUE' GROUP BY base_id"));
-            flowRunningRecords.forEach(flowRunningRecord -> {
+            records.forEach(flowRunningRecord -> {
                 String comment = flowRunningRecord.getComment();
                 flowRunningRecord.setComment(comment.substring(0, comment.indexOf("-")));
             });
+            flowRunningRecords.addAll(records);
             return flowRunningRecords;
         }
         return null;
@@ -558,10 +599,17 @@ public class HsFlowEngineServiceImpl implements HsFlowEngineService {
 
     @Override
     public List<PostTreeVo> getApprovalTreePost(String groupId, String baseId) {
-        HsFlowBase flowTaskCurrentBase = flowBaseService.getCurrentFlowTaskBase(groupId, baseId);
+        HsFlowBase flowTaskCurrentBase = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(groupId, baseId);
         if (null == flowTaskCurrentBase) {
             return null;
         }
+        //如果是抄送组件
+        if (StringUtils.isNotBlank(flowTaskCurrentBase.getCcId())) {
+            String downStepId = flowTaskCurrentBase.getDownStepId();
+            if (StringUtils.isNotBlank(downStepId)) {
+                flowTaskCurrentBase = flowBaseService.getFlowTaskBaseByGroupIdAndBaseId(groupId, downStepId);
+            }
+        }
         PostTreeVo postTreeVo = new PostTreeVo();
         postTreeVo.setText(flowTaskCurrentBase.getFlowModuleName());
         postTreeVo.setValue(flowTaskCurrentBase.getId());

+ 14 - 1
willalp-clocking-in/src/main/java/com/willalp/wx/enums/WxTemplateKeyEnum.java

@@ -1,14 +1,27 @@
 package com.willalp.wx.enums;
 
-public enum WxTemplateKeyEnum {
+/**
+ * 微信订阅消息模板ID
+ *
+ * @author Administratorl
+ */
 
+public enum WxTemplateKeyEnum {
+    /** 审批结果通知 */
     APPROVAL_RESULT("审批结果通知", "qgp7iG6xTRm4JewW8N46nXJT-E6xorFn2hZ2V7gD8wY"),
+    /** 待审批通知 */
     APPROVAL_WAIT("待审批通知", "Toomi1XWGMzNxOCoPX1rRNj7gLuykgszEzUstXaAp9c"),
+    /** 预约订餐 */
     SUBSCRIBE("预约订餐", "Toomi1XWGMzNxOCoPX1rRNj7gLuykgszEzUstXaAp9c"),
+    /** 预约订餐 */
     SALARY_STRIP("预约订餐", "Toomi1XWGMzNxOCoPX1rRNj7gLuykgszEzUstXaAp9c"),
+    /** 工资条 */
     SALARY_SHEET("工资条", "SSsS8EV9dfv-CC7-w_JUKYnfEuWm6FiGL_eED8hf80Q"),
+    /** 取餐提醒 */
     TAKE_FOOD("取餐提醒", "88SU4FmQU0cwuJTwoddwyu6kr9Kq-PdfB6dT9-SlXaA"),
+    /** 预订提醒 */
     APPOINTMENT("预订提醒", "76FWJYEGNoYT0XzGycTh-s6dJ7ETsK3-_r1xcvPWvaI"),
+    /** 积分兑换成功通知 */
     INTEGRAL_EXCHANGE_SUCCESS("积分兑换成功通知", "-57EtxA5K6MUpKbvQwHblrKldu5j1tG6-JlYZNpIZ04");;
 
     private String value;

+ 8 - 0
willalp-clocking-in/src/main/java/com/willalp/wx/service/WxMsgService.java

@@ -24,4 +24,12 @@ public interface WxMsgService {
      * @param createTime
      */
     void sendApprovalMsg(String title, String sendUser, String applyUn, Date createTime);
+
+    /**
+     * 推送微信审批结果通知
+     * @param title
+     * @param result
+     * @param sendUser
+     */
+    void sendResultMsg(String title, String result, String sendUser);
 }

+ 14 - 1
willalp-clocking-in/src/main/java/com/willalp/wx/service/impl/WxMsgServiceImpl.java

@@ -7,6 +7,7 @@ import com.willalp.common.utils.StringUtils;
 import com.willalp.push.service.IHsAppPushService;
 import com.willalp.wx.domain.WxMsgConfig;
 import com.willalp.wx.domain.WxMsgTemplateApproval;
+import com.willalp.wx.domain.WxMsgTemplateApprovalResult;
 import com.willalp.wx.enums.WxTemplateKeyEnum;
 import com.willalp.wx.service.WxMsgService;
 import com.willalp.wx.utils.WxUtils;
@@ -49,7 +50,7 @@ public class WxMsgServiceImpl implements WxMsgService {
     public boolean sendQRCodeMsg(String openId, Object obj, WxTemplateKeyEnum wxTemplateKeyEnum, boolean isQuery) {
         boolean sendSuccess = false;
         if (StringUtils.isBlank(openId)) {
-            log.error("openId - 为空,推送失败");
+            log.error("OPEN_ID - 为空,推送失败");
             return false;
         }
         openId = isQuery ? pushService.getOpenIdByUserNo(openId) : openId;
@@ -57,6 +58,8 @@ public class WxMsgServiceImpl implements WxMsgService {
         requesData.setTouser(openId);
         requesData.setTemplate_id(wxTemplateKeyEnum.getValue());
         requesData.setData(obj);
+        //小程序默认统一页面
+        requesData.setPage("/pages/tabbar/wpTabbar");
         log.info("推送消息请求参数:{}", JSON.toJSONString(requesData));
         String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + wxUtils.getAccessToken();
         log.info("推送消息请求地址:{}", url);
@@ -84,4 +87,14 @@ public class WxMsgServiceImpl implements WxMsgService {
         sendQRCodeMsg(sendUser, wxMsgTemplateApproval, WxTemplateKeyEnum.APPROVAL_WAIT, true);
 
     }
+
+    @Override
+    public void sendResultMsg(String title, String result, String sendUser) {
+        //推送微信审批结果通知
+        WxMsgTemplateApprovalResult wxMsgTemplateApproval = new WxMsgTemplateApprovalResult();
+        wxMsgTemplateApproval.setPhrase4(wxUtils.getFormat(result));
+        wxMsgTemplateApproval.setDate3(wxUtils.getFormat(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date())));
+        wxMsgTemplateApproval.setThing6(wxUtils.getFormat(title));
+        sendQRCodeMsg(sendUser, wxMsgTemplateApproval, WxTemplateKeyEnum.APPROVAL_RESULT, true);
+    }
 }

+ 1 - 0
willalp-ui/.env.development

@@ -6,6 +6,7 @@ ENV = 'development'
 
 # HS平台/开发环境
 VUE_APP_BASE_API = '/dev-api'
+VUE_APP_MASTER_API = '/dev-master-api'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

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

@@ -6,3 +6,4 @@ ENV = 'production'
 
 # HS平台/生产环境
 VUE_APP_BASE_API = '/prod-api'
+VUE_APP_MASTER_API = '/prod-master-api'

+ 8 - 0
willalp-ui/src/api/files/files.js

@@ -59,3 +59,11 @@ export function exportFiles(query) {
     params: query
   })
 }
+
+// 通过api获取主服务机构信息
+export function apiGetOrgInfos() {
+  return request({
+    url: '/api/getOrganization',
+    method: 'get'
+  })
+}

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

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询流程单抄送记录列表
+export function listCc(query) {
+  return request({
+    url: '/flow/cc/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询流程单抄送记录详细
+export function getCc(id) {
+  return request({
+    url: '/flow/cc/' + id,
+    method: 'get'
+  })
+}
+
+// 新增流程单抄送记录
+export function addCc(data) {
+  return request({
+    url: '/flow/cc',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改流程单抄送记录
+export function updateCc(data) {
+  return request({
+    url: '/flow/cc',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除流程单抄送记录
+export function delCc(id) {
+  return request({
+    url: '/flow/cc/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出流程单抄送记录
+export function exportCc(query) {
+  return request({
+    url: '/flow/cc/export',
+    method: 'get',
+    params: query
+  })
+}

+ 10 - 1
willalp-ui/src/api/leave/leave.js

@@ -50,4 +50,13 @@ export function exportLeave(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+// 根据请假表单ID查询请假记录图像信息列表
+export function getBizLeaveImg(query) {
+  return request({
+    url: '/flow/leavenImg/getBizLeaveImg',
+    method: 'get',
+    params: query
+  })
+}

+ 31 - 26
willalp-ui/src/views/canteen/order/jcdMonthlyStat.vue

@@ -6,12 +6,12 @@
       </div>
       <div style="display: inline-flex;padding: 10px 20px;">
         <el-date-picker
-          @change="getMonthJcdTj"
-          v-model="value2"
-          format="yyyy-MM"
-          :default-value="new Date()"
-          type="month"
-          placeholder="选择月">
+            @change="getMonthJcdTj"
+            v-model="value2"
+            format="yyyy-MM"
+            :default-value="new Date()"
+            type="month"
+            placeholder="选择月">
         </el-date-picker>
       </div>
       <el-row :gutter="20">
@@ -30,29 +30,29 @@
           <el-card shadow="hover">
             <div style="padding: 5px">
               <el-button
-                type="warning"
-                plain
-                icon="el-icon-download"
-                size="mini"
-                :loading="exportLoading"
-                @click="download"
+                  type="warning"
+                  plain
+                  icon="el-icon-download"
+                  size="mini"
+                  :loading="exportLoading"
+                  @click="download"
               >导出
               </el-button>
             </div>
-            <div style="padding: 5px">
+            <div style="padding: 5px 10px">
               <el-table :data="list2" v-loading="loading2">
-                <el-table-column label="用户编号" align="center" prop="userNumber" width="95"/>
-                <el-table-column label="用户名" align="center" prop="nickName" width="95"/>
-                <el-table-column label="用户类型" align="center" prop="userTypeTitle" width="95"/>
+                <el-table-column label="用户编号" align="center" prop="userNumber" width="120"/>
+                <el-table-column label="用户名" align="center" prop="nickName" width="120"/>
+                <el-table-column label="用户类型" align="center" prop="userTypeTitle" width="120"/>
                 <el-table-column label="订单总数" align="center" prop="count" width="95"/>
-                <el-table-column label="消费总额" align="center" prop="sumTotal" width="95"/>
+                <el-table-column label="消费总额" align="center" prop="sumTotal" width="120"/>
               </el-table>
               <pagination
-                v-show="useMoneyParams.total>0"
-                :total="useMoneyParams.total"
-                :page.sync="useMoneyParams.pageNum"
-                :limit.sync="useMoneyParams.pageSize"
-                @pagination="getUseMoney"
+                  v-show="useMoneyParams.total>0"
+                  :total="useMoneyParams.total"
+                  :page.sync="useMoneyParams.pageNum"
+                  :limit.sync="useMoneyParams.pageSize"
+                  @pagination="getUseMoney"
               />
             </div>
           </el-card>
@@ -63,7 +63,7 @@
 </template>
 
 <script>
-import {jdcMonthTj, useMoneyMonthTj, useMoneyMonthTjExport} from '@/api/canteen/order'
+import { jdcMonthTj, useMoneyMonthTj, useMoneyMonthTjExport } from '@/api/canteen/order'
 
 export default {
   name: 'jcdStat',
@@ -110,11 +110,16 @@ export default {
       for (let j = i; j < i + this.useMoneyParams.pageSize; j++) {
         copyList.push(this.list2Data[j])
       }
-      this.list2 = copyList;
+      this.list2 = copyList
     },
     getMonthJcdTj() {
-      this.loading = true
-      this.loading2 = true
+      if (this.value2) {
+        this.loading = true
+        this.loading2 = true
+      } else {
+        this.list = []
+        this.list2 = []
+      }
       let params = {
         year: 1900 + this.value2.getYear(),
         month: (this.value2.getMonth() + 1)

+ 33 - 2
willalp-ui/src/views/files/files/index.vue

@@ -470,6 +470,20 @@
             </el-col>
           </el-row>
           <el-row :gutter="20">
+            <el-col :span="6">
+              <div class="grid-content bg-purple">
+                <el-form-item label="常用机构" prop="jobTitle">
+                  <el-select v-model="form.jobTitle" placeholder="请选择常用机构">
+                    <el-option
+                      v-for="dict in dict.type.job_title"
+                      :key="dict.value"
+                      :label="dict.label"
+                      :value="dict.value"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </div>
+            </el-col>
             <el-col :span="6">
               <div class="grid-content bg-purple">
                 <el-form-item label="入职时间" prop="hiredate">
@@ -541,7 +555,16 @@
 </template>
 
 <script>
-import {listFiles, getFiles, delFiles, addFiles, updateFiles, exportFiles, importTemp} from '@/api/files/files'
+import {
+  listFiles,
+  getFiles,
+  delFiles,
+  addFiles,
+  updateFiles,
+  exportFiles,
+  importTemp,
+  apiGetOrgInfos
+} from '@/api/files/files'
 import {treeselect} from '@/api/system/dept'
 import user from '@/store/modules/user'
 import Treeselect from '@riophae/vue-treeselect'
@@ -549,6 +572,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 import {importTempSalaryslip} from '@/api/salary/salaryslip'
 import {getToken} from '@/utils/auth'
 import {listDeptPost} from "@/api/system/deptPost";
+import result from "@/components/Crontab/result";
 
 export default {
   name: 'Files',
@@ -634,11 +658,18 @@ export default {
   created() {
     this.getTreeselect()
     this.getList()
+    this.doGetOrgInfos()
     listDeptPost().then(response => {
       this.postData = response.data
     })
   },
-  methods: { // 筛选节点
+  methods: {
+    doGetOrgInfos() {
+      apiGetOrgInfos().then(result => {
+        console.log(result)
+      })
+    },
+    // 筛选节点
     filterNode(value, data) {
       if (!value) return true
       return data.label.indexOf(value) !== -1

+ 303 - 0
willalp-ui/src/views/flow/cc/index.vue

@@ -0,0 +1,303 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+      <el-form-item label="标题" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="发起人" prop="apply">
+        <el-input
+          v-model="queryParams.apply"
+          placeholder="请输入发起人"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="模型ID" prop="examplesId">
+        <el-input
+          v-model="queryParams.examplesId"
+          placeholder="请输入模型ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['flow:cc:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['flow:cc:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['flow:cc:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['flow:cc:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="ccList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键ID" align="center" prop="id" />
+      <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="业务数据" align="center" prop="jsonData" />
+      <el-table-column label="发起人" align="center" prop="apply" />
+      <el-table-column label="抄送用户" align="center" prop="users" />
+      <el-table-column label="模型ID" align="center" prop="examplesId" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <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:cc:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['flow:cc: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-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" >
+        <el-form-item label="标题" prop="title">
+          <el-input v-model="form.title" placeholder="请输入标题" />
+        </el-form-item>
+        <el-form-item label="发起人" prop="apply">
+          <el-input v-model="form.apply" placeholder="请输入发起人" />
+        </el-form-item>
+        <el-form-item label="抄送用户" prop="users">
+          <el-input v-model="form.users" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="模型ID" prop="examplesId">
+          <el-input v-model="form.examplesId" placeholder="请输入模型ID" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCc, getCc, delCc, addCc, updateCc, exportCc } from "@/api/flow/cc";
+
+export default {
+  name: "Cc",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 流程单抄送记录表格数据
+      ccList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        title: null,
+        jsonData: null,
+        apply: null,
+        users: null,
+        examplesId: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询流程单抄送记录列表 */
+    getList() {
+      this.loading = true;
+      listCc(this.queryParams).then(response => {
+        this.ccList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        title: null,
+        jsonData: null,
+        apply: null,
+        users: null,
+        isDelete: null,
+        examplesId: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    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 = "添加流程单抄送记录";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getCc(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改流程单抄送记录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCc(this.form).then(() => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCc(this.form).then(() => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除流程单抄送记录编号为"' + ids + '"的数据项?').then(function() {
+        return delCc(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$modal.confirm('是否确认导出所有流程单抄送记录数据项?').then(() => {
+        this.exportLoading = true;
+        return exportCc(queryParams);
+      }).then(response => {
+        this.$download.name(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
+    }
+  }
+};
+</script>

+ 1 - 1
willalp-ui/src/views/leave/leave/index.vue

@@ -156,7 +156,7 @@
 </template>
 
 <script>
-import {listLeave, getLeave, delLeave, addLeave, updateLeave, exportLeave} from "@/api/leave/leave";
+import {listLeave, getLeave, delLeave, addLeave, updateLeave, exportLeave,getBizLeaveImg} from "@/api/leave/leave";
 
 export default {
   name: "Leave",

+ 120 - 102
willalp-ui/src/views/leave/leave/indexPre.vue

@@ -1,119 +1,125 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="请假类型" prop="type">
-        <el-select v-model="queryParams.type" placeholder="请选择请假类型" clearable size="small">
-          <el-option
-            v-for="dict in typeOptions"
-            :key="dict.dictValue"
-            :label="dict.dictLabel"
-            :value="dict.dictValue"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="月份" prop="month">
-        <el-select v-model="queryParams.month" placeholder="请选择请假月份" clearable size="small">
-          <el-option
-            v-for="item in yf"
-            :key="item"
-            :label="item"
-            :value="item"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+    <div>
+      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+        <el-form-item label="请假类型" prop="type">
+          <el-select v-model="queryParams.type" placeholder="请选择请假类型" clearable size="small">
+            <el-option
+              v-for="dict in typeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="月份" prop="month">
+          <el-select v-model="queryParams.month" placeholder="请选择请假月份" clearable size="small">
+            <el-option
+              v-for="item in yf"
+              :key="item"
+              :label="item"
+              :value="item"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
 
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleExport"
-        >导出
-        </el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="primary"
+            icon="el-icon-plus"
+            size="mini"
+            @click="handleExport"
+          >导出
+          </el-button>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      </el-row>
 
-    <el-table v-loading="loading" :data="leaveList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center"/>
-      <!--      <el-table-column label="ID" align="center" prop="id" width="40"/>-->
-      <el-table-column label="请假类型" align="center" prop="type" :formatter="typeFormat" width="75">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.app_vacate_type" :value="scope.row.type"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="标题" align="center" prop="title" width="140"/>
-      <el-table-column label="原因" align="center" prop="reason" width="120"/>
-      <el-table-column label="开始时间" align="center" prop="leaveStartTime" width="120">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.leaveStartTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="结束时间" align="center" prop="leaveEndTime" width="120">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.leaveEndTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="天数" align="center" prop="totalTime"/>
-      <!--<el-table-column label="请假时长" align="center" prop="totalTime" />-->
-      <!--      <el-table-column label="流程实例ID" align="center" prop="instanceId"/>-->
-      <el-table-column label="申请人" align="center" prop="applyUserName"/>
-      <el-table-column label="申请时间" align="center" prop="applyTime" width="120">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="是否离沪" align="center" prop="isLh"/>
-      <el-table-column label="出行方式" align="center" prop="tripMode"/>
-      <el-table-column label="出行城市" align="center" prop="tripAddress"/>
-      <el-table-column label="详细地址" align="center" prop="detailAddr"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <apply-before
-            v-show="!scope.row.instanceId"
-            :row="scope.row"
-            :handleUpdate="handleUpdate"
-            :handleDelete="handleDelete"
-            :requestMapping="requestMapping"
-            @getList="getList"
-          ></apply-before>
-          <apply-after
-            v-show="scope.row.instanceId"
-            :row="scope.row"
-            :taskId="scope.row.taskId"
-            :type="scope.row.type"
-            @getList="getList"
-          ></apply-after>
-        </template>
-      </el-table-column>
-    </el-table>
+      <el-table v-loading="loading" :data="leaveList" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"/>
+        <!--      <el-table-column label="ID" align="center" prop="id" width="40"/>-->
+        <el-table-column label="请假类型" align="center" prop="type" :formatter="typeFormat" width="75">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.app_vacate_type" :value="scope.row.type"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="标题" align="center" prop="title" width="140"/>
+        <el-table-column label="原因" align="center" prop="reason" width="120"/>
+        <el-table-column label="开始时间" align="center" prop="leaveStartTime" width="120">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.leaveStartTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="结束时间" align="center" prop="leaveEndTime" width="120">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.leaveEndTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="天数" align="center" prop="totalTime"/>
+        <!--<el-table-column label="请假时长" align="center" prop="totalTime" />-->
+        <!--      <el-table-column label="流程实例ID" align="center" prop="instanceId"/>-->
+        <el-table-column label="申请人" align="center" prop="applyUserName"/>
+        <el-table-column label="申请时间" align="center" prop="applyTime" width="120">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="是否离沪" align="center" prop="isLh"/>
+        <el-table-column label="出行方式" align="center" prop="tripMode"/>
+        <el-table-column label="出行城市" align="center" prop="tripAddress"/>
+        <el-table-column label="详细地址" align="center" prop="detailAddr"/>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-col :span="1.5">
+              <el-button
+                type="primary"
+                size="mini"
+                @click="getBizLeaveImg(scope.row.id)"
+              >查看图片
+              </el-button>
+            </el-col>
+          </template>
+        </el-table-column>
+      </el-table>
 
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    <div>
+      <el-dialog title="查看图片" :visible.sync="open" width="750px" append-to-body>
+        <el-carousel trigger="click" height="750px">
+          <el-carousel-item v-for="item in bizLeaveImg" :key="item.id">
+            <div style="padding: 10px;align-items: center;text-align: center">
+              <img :src="item.url"/>
+            </div>
+          </el-carousel-item>
+        </el-carousel>
+      </el-dialog>
+    </div>
   </div>
 </template>
 
 <script>
-import {listLeave, getLeave, delLeave, addLeave, updateLeave, exportLeave} from "@/api/leave/leave";
+import {listLeave, getLeave, delLeave, addLeave, updateLeave, exportLeave, getBizLeaveImg} from "@/api/leave/leave";
 
 export default {
   name: "Leave",
-  components: {
-  },
+  components: {},
   dicts: ['app_vacate_type'],
   data() {
     return {
+      baseUrl: process.env.VUE_APP_BASE_API,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -168,7 +174,8 @@ export default {
         ],
       },
       requestMapping: '/leave/leave',
-      yf: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']
+      yf: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],
+      bizLeaveImg: []
     };
   },
   created() {
@@ -187,6 +194,17 @@ export default {
         this.loading = false;
       });
     },
+    getBizLeaveImg(id) {
+      this.open = true;
+      let img = {
+        bizLeaveId: id
+      }
+      getBizLeaveImg(img).then(result => {
+        if (result.code === 200) {
+          this.bizLeaveImg = result.data
+        }
+      })
+    },
     // 请假类型字典翻译
     typeFormat(row, column) {
       return this.selectDictLabel(this.typeOptions, row.type);

+ 141 - 141
willalp-ui/src/views/login.vue

@@ -57,169 +57,169 @@
 </template>
 
 <script>
-  import { getCodeImg } from '@/api/login'
-  import Cookies from 'js-cookie'
-  import { encrypt, decrypt } from '@/utils/jsencrypt'
+import {getCodeImg} from '@/api/login'
+import Cookies from 'js-cookie'
+import {encrypt, decrypt} from '@/utils/jsencrypt'
 
-  export default {
-    name: 'Login',
-    data() {
-      return {
-        codeUrl: '',
-        cookiePassword: '',
-        loginForm: {
-          username: '',
-          password: '',
-          rememberMe: false,
-          code: '',
-          uuid: ''
-        },
-        loginRules: {
-          username: [
-            { required: true, trigger: 'blur', message: '请输入您的账号' }
-          ],
-          password: [
-            { required: true, trigger: 'blur', message: '请输入您的密码' }
-          ],
-          code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
-        },
-        loading: false,
-        // 验证码开关
-        captchaOnOff: true,
-        // 注册开关
-        register: false,
-        redirect: undefined
-      }
+export default {
+  name: 'Login',
+  data() {
+    return {
+      codeUrl: '',
+      cookiePassword: '',
+      loginForm: {
+        username: '',
+        password: '',
+        rememberMe: false,
+        code: '',
+        uuid: ''
+      },
+      loginRules: {
+        username: [
+          {required: true, trigger: 'blur', message: '请输入您的账号'}
+        ],
+        password: [
+          {required: true, trigger: 'blur', message: '请输入您的密码'}
+        ],
+        code: [{required: true, trigger: 'change', message: '请输入验证码'}]
+      },
+      loading: false,
+      // 验证码开关
+      captchaOnOff: true,
+      // 注册开关
+      register: false,
+      redirect: undefined
+    }
+  },
+  watch: {
+    $route: {
+      handler: function (route) {
+        this.redirect = route.query && route.query.redirect
+      },
+      immediate: true
+    }
+  },
+  created() {
+    this.getCode()
+    this.getCookie()
+  },
+  methods: {
+    getCode() {
+      getCodeImg().then(res => {
+        this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff
+        if (this.captchaOnOff) {
+          this.codeUrl = 'data:image/gif;base64,' + res.img
+          this.loginForm.uuid = res.uuid
+        }
+      })
     },
-    watch: {
-      $route: {
-        handler: function(route) {
-          this.redirect = route.query && route.query.redirect
-        },
-        immediate: true
+    getCookie() {
+      const username = Cookies.get('username')
+      const password = Cookies.get('password')
+      const rememberMe = Cookies.get('rememberMe')
+      this.loginForm = {
+        username: username === undefined ? this.loginForm.username : username,
+        password: password === undefined ? this.loginForm.password : decrypt(password),
+        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
       }
     },
-    created() {
-      this.getCode()
-      this.getCookie()
-    },
-    methods: {
-      getCode() {
-        getCodeImg().then(res => {
-          this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff
-          if (this.captchaOnOff) {
-            this.codeUrl = 'data:image/gif;base64,' + res.img
-            this.loginForm.uuid = res.uuid
+    handleLogin() {
+      this.$refs.loginForm.validate(valid => {
+        if (valid) {
+          this.loading = true
+          if (this.loginForm.rememberMe) {
+            Cookies.set('username', this.loginForm.username, {expires: 30})
+            Cookies.set('password', encrypt(this.loginForm.password), {expires: 30})
+            Cookies.set('rememberMe', this.loginForm.rememberMe, {expires: 30})
+          } else {
+            Cookies.remove('username')
+            Cookies.remove('password')
+            Cookies.remove('rememberMe')
           }
-        })
-      },
-      getCookie() {
-        const username = Cookies.get('username')
-        const password = Cookies.get('password')
-        const rememberMe = Cookies.get('rememberMe')
-        this.loginForm = {
-          username: username === undefined ? this.loginForm.username : username,
-          password: password === undefined ? this.loginForm.password : decrypt(password),
-          rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
-        }
-      },
-      handleLogin() {
-        this.$refs.loginForm.validate(valid => {
-          if (valid) {
-            this.loading = true
-            if (this.loginForm.rememberMe) {
-              Cookies.set('username', this.loginForm.username, { expires: 30 })
-              Cookies.set('password', encrypt(this.loginForm.password), { expires: 30 })
-              Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 })
-            } else {
-              Cookies.remove('username')
-              Cookies.remove('password')
-              Cookies.remove('rememberMe')
-            }
-            this.$store.dispatch('Login', this.loginForm).then(() => {
-              this.$router.push({ path: this.redirect || '/' }).catch(() => {
-              })
-            }).catch(() => {
-              this.loading = false
-              if (this.captchaOnOff) {
-                this.getCode()
-              }
+          this.$store.dispatch('Login', this.loginForm).then(() => {
+            this.$router.push({path: this.redirect || '/'}).catch(() => {
             })
-          }
-        })
-      }
+          }).catch(() => {
+            this.loading = false
+            if (this.captchaOnOff) {
+              this.getCode()
+            }
+          })
+        }
+      })
     }
   }
+}
 </script>
 
 <style rel="stylesheet/scss" lang="scss">
-  .login {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    height: 100%;
-    background-image: url("../assets/images/login-background.jpg");
-    background-size: cover;
-  }
-
-  .title {
-    margin: 0px auto 30px auto;
-    text-align: center;
-    color: #707070;
-  }
+.login {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  background-image: url("../assets/images/login-background.jpg");
+  background-size: cover;
+}
 
-  .login-form {
-    border-radius: 6px;
-    background: #ffffff;
-    width: 400px;
-    padding: 25px 25px 5px 25px;
+.title {
+  margin: 0px auto 30px auto;
+  text-align: center;
+  color: #707070;
+}
 
-    .el-input {
-      height: 38px;
+.login-form {
+  border-radius: 6px;
+  background: #ffffff;
+  width: 400px;
+  padding: 25px 25px 5px 25px;
 
-      input {
-        height: 38px;
-      }
-    }
+  .el-input {
+    height: 38px;
 
-    .input-icon {
-      height: 39px;
-      width: 14px;
-      margin-left: 2px;
+    input {
+      height: 38px;
     }
   }
 
-  .login-tip {
-    font-size: 13px;
-    text-align: center;
-    color: #bfbfbf;
+  .input-icon {
+    height: 39px;
+    width: 14px;
+    margin-left: 2px;
   }
+}
 
-  .login-code {
-    width: 33%;
-    height: 38px;
-    float: right;
+.login-tip {
+  font-size: 13px;
+  text-align: center;
+  color: #bfbfbf;
+}
 
-    img {
-      cursor: pointer;
-      vertical-align: middle;
-    }
-  }
+.login-code {
+  width: 33%;
+  height: 38px;
+  float: right;
 
-  .el-login-footer {
-    height: 40px;
-    line-height: 40px;
-    position: fixed;
-    bottom: 0;
-    width: 100%;
-    text-align: center;
-    color: #fff;
-    font-family: Arial;
-    font-size: 12px;
-    letter-spacing: 1px;
+  img {
+    cursor: pointer;
+    vertical-align: middle;
   }
+}
 
-  .login-code-img {
-    height: 38px;
-  }
+.el-login-footer {
+  height: 40px;
+  line-height: 40px;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  text-align: center;
+  color: #fff;
+  font-family: Arial;
+  font-size: 12px;
+  letter-spacing: 1px;
+}
+
+.login-code-img {
+  height: 38px;
+}
 </style>

+ 14 - 14
willalp-ui/src/views/system/postConfig/index.vue

@@ -383,20 +383,6 @@ export default {
         this.loading = false;
       });
     },
-    /** 查询机构人员档案列表 */
-    getUserDialogList() {
-      this.userListDialog.loading = true
-      listFiles(this.userListDialog).then(response => {
-        this.filesList = response.rows
-        this.userListDialog.total = response.total
-        this.userListDialog.loading = false
-      })
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
     // 表单重置
     reset() {
       this.form = {
@@ -424,12 +410,26 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
     // 多选框选中数据
     addConfigUser(selection) {
       this.ids = selection.map(item => item.userName + item.userCode)
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
+    /** 查询机构人员档案列表 */
+    getUserDialogList() {
+      this.userListDialog.loading = true
+      listFiles(this.userListDialog).then(response => {
+        this.filesList = response.rows
+        this.userListDialog.total = response.total
+        this.userListDialog.loading = false
+      })
+    },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)

+ 33 - 27
willalp-ui/vue.config.js

@@ -31,13 +31,19 @@ module.exports = {
     port: port,
     open: true,
     proxy: {
-      // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         target: `https://localhost:3005`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''
         }
+      },
+      [process.env.VUE_APP_MASTER_API]: {
+        target: `https://localhost:3010`,
+        changeOrigin: true,
+        pathRewrite: {
+          ['^' + process.env.VUE_APP_MASTER_API]: ''
+        }
       }
     },
     disableHostCheck: true
@@ -81,39 +87,39 @@ module.exports = {
             .plugin('ScriptExtHtmlWebpackPlugin')
             .after('html')
             .use('script-ext-html-webpack-plugin', [{
-            // `runtime` must same as runtimeChunk name. default is `runtime`
+              // `runtime` must same as runtimeChunk name. default is `runtime`
               inline: /runtime\..*\.js$/
             }])
             .end()
           config
             .optimization.splitChunks({
-              chunks: 'all',
-              cacheGroups: {
-                libs: {
-                  name: 'chunk-libs',
-                  test: /[\\/]node_modules[\\/]/,
-                  priority: 10,
-                  chunks: 'initial' // only package third parties that are initially dependent
-                },
-                elementUI: {
-                  name: 'chunk-elementUI', // split elementUI into a single package
-                  priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
-                  test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
-                },
-                commons: {
-                  name: 'chunk-commons',
-                  test: resolve('src/components'), // can customize your rules
-                  minChunks: 3, //  minimum common number
-                  priority: 5,
-                  reuseExistingChunk: true
-                }
+            chunks: 'all',
+            cacheGroups: {
+              libs: {
+                name: 'chunk-libs',
+                test: /[\\/]node_modules[\\/]/,
+                priority: 10,
+                chunks: 'initial' // only package third parties that are initially dependent
+              },
+              elementUI: {
+                name: 'chunk-elementUI', // split elementUI into a single package
+                priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
+                test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
+              },
+              commons: {
+                name: 'chunk-commons',
+                test: resolve('src/components'), // can customize your rules
+                minChunks: 3, //  minimum common number
+                priority: 5,
+                reuseExistingChunk: true
               }
-            })
+            }
+          })
           config.optimization.runtimeChunk('single'),
-          {
-             from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
-             to: './' //到根目录下
-          }
+            {
+              from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
+              to: './' //到根目录下
+            }
         }
       )
   }