liusheng
2023-08-02 0bc118d74a03685d1b4685a0b7d38468f307b537
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
@@ -446,22 +446,24 @@
    @PostMapping("/travelexpensereport")
    public AjaxResult travelexpensereport(@RequestBody CheckFundVO checkFundVO) {
        ServiceReimbursement serviceReimbursement = serviceReimbursementService.getById(checkFundVO.getFundid());
        //如果等于100,说明已经走到医院财务那边了;财务那边取数据是从分享表取,所以,这里直接往分享表里添加数据就行了
        if (serviceReimbursement.getBackflowlevel() == 100 || serviceReimbursement.getBackflowlevel() == 199) {
        //如果等于100,说明已经走到医院财务那边了;财务那边取数据是从分享表取,所以,这里直接往分享表里添加数据就行了;
        if (!Objects.isNull(serviceReimbursement) && serviceReimbursement.getBackflowlevel() != null) {
            if (serviceReimbursement.getBackflowlevel() == 100 || serviceReimbursement.getBackflowlevel() == 199){
            //将修改的上报数据 新增一条
            ServiceReimbursementShared serviceReimbursementShared = DtoConversionUtils.sourceToTarget(serviceReimbursement, ServiceReimbursementShared.class);
            serviceReimbursementShared.setId(null);
            serviceReimbursementShared.setDelFlag(0L);
            serviceReimbursementShared.setReimid(serviceReimbursement.getId());
            serviceReimbursementSharedService.save(serviceReimbursementShared);
                //将修改的上报数据 新增一条
                ServiceReimbursementShared serviceReimbursementShared = DtoConversionUtils.sourceToTarget(serviceReimbursement, ServiceReimbursementShared.class);
                serviceReimbursementShared.setId(null);
                serviceReimbursementShared.setDelFlag(0L);
                serviceReimbursementShared.setReimid(serviceReimbursement.getId());
                serviceReimbursementSharedService.save(serviceReimbursementShared);
            //将退回阶段设置成100
            serviceReimbursement.setBackflowlevel(100L);
            serviceReimbursement.setFlowlevel(100L);
            serviceReimbursement.setRecordstatus(0);
            serviceReimbursementService.updateById(serviceReimbursement);
            return success();
                //将退回阶段设置成100
                serviceReimbursement.setBackflowlevel(100L);
                serviceReimbursement.setFlowlevel(100L);
                serviceReimbursement.setRecordstatus(0);
                serviceReimbursementService.updateById(serviceReimbursement);
                return success();
            }
        }
        if (serviceReimbursement != null) {
            Integer TotalLevel = 0;
@@ -773,18 +775,30 @@
                    FYXM1.delete(0, FYXM1.length());
                    //再新增
                    otherMoneyall = otherMoneyall.add(otherMoney);
                    FYXM1.append("OPO工作人员" + ":" + otherMoneyall + " ");
                    FYXM1.append("OP0 工作人员报销差旅费" + ":" + otherMoneyall + " ");
                } else {
                    if (flag == 0) {
                        key1 = key;
                        flag = 1;
                    }
                    if (key1 == key) {
                        FYXM2.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
                        allMoney = allMoney.add(otherMoney);
                        if (key.equals("3")) {
//                        FYXM2.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
                            FYXM2.append("专家报销差旅费 :" + otherMoney);
                            allMoney = allMoney.add(otherMoney);
                        } else {
                            FYXM2.append("家属报销差旅费及误工费用 : " + otherMoney);
                            allMoney = allMoney.add(otherMoney);
                        }
                    } else {
                        FYXM3.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
                        allMoney = allMoney.add(otherMoney);
                        if (key.equals("3")) {
//                        FYXM2.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
                            FYXM3.append("专家报销差旅费 :" + otherMoney);
                            allMoney = allMoney.add(otherMoney);
                        } else {
                            FYXM3.append("家属报销差旅费及误工费用 : " + otherMoney);
                            allMoney = allMoney.add(otherMoney);
                        }
                    }
                }
            } else {
@@ -793,18 +807,30 @@
                    FYXM1.delete(0, FYXM1.length());
                    //再新增
                    otherMoneyall = otherMoneyall.add(otherMoney);
                    FYXM1.append("OPO工作人员" + ":" + otherMoneyall + " ");
                    FYXM1.append("OP0 工作人员报销差旅费" + ":" + otherMoneyall + " ");
                } else {
                    if (flag == 0) {
                        key1 = key;
                        flag = 1;
                    }
                    if (key1 == key) {
                        FYXM2.append(key + ":" + otherMoney);
                        allMoney = allMoney.add(otherMoney);
                        if (key.equals("专家")) {
//                        FYXM2.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
                            FYXM2.append("专家报销差旅费 :" + otherMoney);
                            allMoney = allMoney.add(otherMoney);
                        } else {
                            FYXM2.append("家属报销差旅费及误工费用 : " + otherMoney);
                            allMoney = allMoney.add(otherMoney);
                        }
                    } else {
                        FYXM3.append(key + ":" + otherMoney);
                        allMoney = allMoney.add(otherMoney);
                        if (key.equals("专家")) {
//                        FYXM2.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
                            FYXM3.append("专家报销差旅费 :" + otherMoney);
                            allMoney = allMoney.add(otherMoney);
                        } else {
                            FYXM3.append("家属报销差旅费及误工费用 : " + otherMoney);
                            allMoney = allMoney.add(otherMoney);
                        }
                    }
                }
            }