Selaa lähdekoodia

Merge branch 'master' of http://114.55.67.98:8070/Natural_p1/zjugis_OA

qiny 1 vuosi sitten
vanhempi
commit
b82428d2a9

+ 4 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/resign/controller/vo/ResignPageReqVO.java

@@ -103,6 +103,10 @@ public class ResignPageReqVO extends PageParam {
      * 对公司建议
      */
     private String dgsjy;
+    /**
+     * 员工所在地
+     */
+    private String lzygszd;
 
 
     //========================离职员工交接清单==================================

+ 23 - 11
zjugis-business/src/main/java/com/zjugis/business/flow/resign/event/ResignEvent.java

@@ -44,6 +44,7 @@ import java.util.*;
 import java.util.stream.Collectors;
 
 import static com.zjugis.business.constants.FlowStatusConstants.*;
+import static com.zjugis.framework.common.util.collection.CollectionUtils.convertSet;
 
 /**
  * @author jzh
@@ -229,12 +230,13 @@ public class ResignEvent extends BaseController {
                 List<Map<String, String>> userMaps = new ArrayList<>();
                 List<ResignDetailDO> detailDOS = resignDetailService.getListByResignId(entity.getId());
                 if (CollectionUtil.isNotEmpty(detailDOS)) {
+                    Set<String> ids = convertSet(detailDOS, ResignDetailDO::getReceiver);
 
 
-                    detailDOS.forEach(v -> {
+                    ids.forEach(v -> {
                         HashMap<String, String> map = new HashMap<>();
-                        if (v.getReceiver() != null) {
-                            map.put("id", v.getReceiver());
+                        if (v != null) {
+                            map.put("id", v);
                             userMaps.add(map);
                         }
                     });
@@ -257,9 +259,10 @@ public class ResignEvent extends BaseController {
 
     /**
      * 判断是否存在
+     * 必须返回true 才会继续往下流转
      */
-    @PostMapping("/exist")
-    public String exist(@ParamModel Map flowInstance) {
+    @PostMapping("/exist/{type}")
+    public String exist(@ParamModel Map flowInstance, @PathVariable String type) {
         try {
             String flowInstanceId = flowInstance.get("id").toString();
 
@@ -267,14 +270,23 @@ public class ResignEvent extends BaseController {
             List<ResignDetailDO> detailDOS = resignDetailService.getListByResignId(entity.getId());
 
 
-            System.out.println(detailDOS.size());
-            if (CollectionUtil.isNotEmpty(detailDOS)) {
-                return "true";
-            } else {
-                return "false";
+            switch (type) {
+                case "1":
+                    if (CollectionUtil.isNotEmpty(detailDOS)) {
+                        return "true";
+                    } else {
+                        return "false";
+                    }
+                case "2":
+                    if (CollectionUtil.isNotEmpty(detailDOS)) {
+                        return "false";
+                    } else {
+                        return "true";
+                    }
+                default:
+                    return "false";
             }
 
-
         } catch (Exception ex) {
             return error(ex.getMessage(), ErrorCode.DEFAULT);
         }

+ 26 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/event/UseMoneyEvent.java

@@ -5,6 +5,7 @@ import com.google.common.base.Strings;
 import com.zjugis.business.bean.entity.ContractApply;
 import com.zjugis.business.bean.entity.ContractSub;
 import com.zjugis.business.bean.entity.Project;
+import com.zjugis.business.converter.commoncost.CommonCostConvert;
 import com.zjugis.business.converter.usemoney.UseMoneyConvert;
 import com.zjugis.business.flow.Asset.dao.AssetProcureDao;
 import com.zjugis.business.flow.Asset.entity.AssetProcureDO;
@@ -51,6 +52,7 @@ import java.time.LocalDateTime;
 import java.util.*;
 
 import static com.zjugis.business.constants.FlowStatusConstants.FLOW_FINISHED;
+import static com.zjugis.business.constants.FlowStatusConstants.FLOW_PAYMENT;
 import static com.zjugis.framework.common.util.collection.CollectionUtils.convertSet;
 
 
@@ -858,4 +860,28 @@ public class UseMoneyEvent extends BaseController {
             return error(ex.getMessage(), ErrorCode.DEFAULT);
         }
     }
+    /**
+     * 出纳事件
+     *
+     * @param flowInstance 流程实例
+     * @return
+     */
+    @PostMapping("/cashierEvent")
+    public String cashierEvent(@ParamModel Map flowInstance) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                UseMoneyDO entity = useMoneyService.findByInstanceId(flowInstanceId);
+                entity.setFlowStatus(FLOW_PAYMENT);
+                entity.setFlowFinishtime(LocalDateTime.now());
+                useMoneyService.updateUseMoney(UseMoneyConvert.INSTANCE.convert(entity));
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
 }

+ 2 - 2
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/service/UseMoneyServiceImpl.java

@@ -378,7 +378,7 @@ public class UseMoneyServiceImpl implements UseMoneyService {
                     useMoneyRespVO.setStatus("已付");
                 }
                 if (FLOW_PAYMENT == flowStatus) {
-                    useMoneyRespVO.setStatus("办理中");
+                    useMoneyRespVO.setStatus("未付款");
                 }
             });
         }
@@ -892,7 +892,7 @@ public class UseMoneyServiceImpl implements UseMoneyService {
                 useMoneyRespVO.setStatus("已付");
             }
             if (FLOW_PAYMENT == flowStatus) {
-                useMoneyRespVO.setStatus("办理中");
+                useMoneyRespVO.setStatus("未付款");
             }
         });
         return useMoneyRespVOPageResult;

+ 2 - 2
zjugis-business/src/main/resources/templates/TravelCost/js/index.js

@@ -80,7 +80,7 @@
         }
         initCompany();
         bindEvents();
-        let bz2 = z.ui.input("[name='createReqVO$bz2']").getValue();
+        let bz2 = $("[name='createReqVO$bz2']").val();
         if (finance === "1") {
             if (!bz2) {
                 bz2 = 0;
@@ -752,7 +752,7 @@
         z.ui.input("[name='createReqVO$subsidyAmount']").setValue(subsidyAmount);
         z.ui.input("[name='createReqVO$subsidyTotalAmount']").setValue(subsidyAmount);
         z.ui.input("[name='createReqVO$subsidyArithmetic']").setValue(subsidyArithmeticValue);
-        z.ui.input("[name='createReqVO$travelDays']").setValue((work + nonWork));
+        $("[name='createReqVO$travelDays']").val((work + nonWork));
         // 重新计算报销总额
         totalAmount();
         const stringValue = generateValue(subsidyArr)