liusheng
11 小时以前 9c8b4a7d08ea43cccb5fd296d930ca55a2fa5a8a
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -21,6 +21,7 @@
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.DtoConversionUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.project.common.IdGeneratorUtils;
import com.ruoyi.project.domain.*;
import com.ruoyi.project.domain.vo.*;
import com.ruoyi.project.mapper.*;
@@ -517,13 +518,19 @@
        Boolean aBoolean = serviceFundflowService.saveData(serviceFundflow);
        log.info("sserviceFund保存的的值是-------- :{}", aBoolean);
        //053审批通过之后,就需要把“办公室主任”的名字填上
        if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) {
        //办公室审批通过之后,就需要把“办公室主任”的名字填上
        SysUser sysUsers = null;
        if (StringUtils.isNotEmpty(user.getUserName())) {
            sysUsers = sysUserMapper.selectUserByUserName(user.getUserName());
            log.info("费用sysUsers返回的值为:{}", sysUsers);
        }
        if (checkFundVO.getFlowconclusion() == 1 && sysUsers != null && sysUsers.getRoles() != null && sysUsers.getRoles().stream().anyMatch(role -> "officedirector".equals(role.getRoleKey()))) {
            serviceFund.setOfficedirector(user.getNickName());
            serviceFund.setUploadStates(1);
            //数据发送
            Boolean aBoolean1 = null;
            if (newSwitch == 1) {
                log.info("费用newSwitch返回的值为:{}", newSwitch);
                //搞一个开关,别影响老流程
                aBoolean1 = sendData(serviceFund);
                if (!aBoolean1) {
@@ -682,14 +689,16 @@
        return true;
    }
    private static final AtomicLong COUNTER = new AtomicLong(System.currentTimeMillis());
    private Map<String, List<Map<String, Object>>> formson_0832(List<ServiceFunddetailShared> serviceFunddetailSharedList) {
        Map<String, List<Map<String, Object>>> allMap = new HashMap<>();
        List<Map<String, Object>> list = new ArrayList<>();
        List<Map<String, Object>> annexfilesList = new ArrayList<>();
        for (ServiceFunddetailShared serviceFunddetailShared : serviceFunddetailSharedList) {
            //附件处理
            String annexfiles = serviceFunddetailShared.getAnnexfiles();
            String invoicefiles = serviceFunddetailShared.getInvoicefiles();
            Map<String, Object> map = new HashMap<>();
            map.put("序号1", serviceFunddetailShared.getOrderno());
            map.put("费用项目", serviceFunddetailShared.getItemname());
@@ -699,13 +708,19 @@
            map.put("收益人家属或专家", serviceFunddetailShared.getBeneficiaryname());
            map.put("税后金额", serviceFunddetailShared.getTaxedamount());
            map.put("作废最终金额", null);
            Long fpuuid = COUNTER.incrementAndGet();
            map.put("发票附件", fpuuid);
            Long fpuuid = IdGeneratorUtils.nextId();
            map.put("发票附件", "");
            if (StringUtils.isNotEmpty(invoicefiles)) {
                map.put("发票附件", fpuuid);
            }
            map.put("发票识别", null);
            map.put("识别人", null);
            map.put("税额", serviceFunddetailShared.getTaxamount());
            long qtuuid = COUNTER.incrementAndGet();
            map.put("其他附件", qtuuid);
            long qtuuid = IdGeneratorUtils.nextId();
            map.put("其他附件", "");
            if (StringUtils.isNotEmpty(annexfiles)) {
                map.put("其他附件", qtuuid);
            }
            map.put("项目编码", serviceFunddetailShared.getItemcode());
            map.put("预算项目", null);
            map.put("贷方科目", null);
@@ -715,9 +730,6 @@
            map.put("费用说明", null);
            list.add(map);
            //附件处理
            String annexfiles = serviceFunddetailShared.getAnnexfiles();
            String invoicefiles = serviceFunddetailShared.getInvoicefiles();
            int i = 0;
            if (StringUtils.isNotEmpty(annexfiles)) {
@@ -767,16 +779,17 @@
        formmain_0831.put("财务审批", null);
        formmain_0831.put("财务部负责人审批", getLastApprovalInfo(serviceFundflows, serviceFund.getFinancedirector()));
//        formmain_0831.put("办公室主任审批", "办公室主任审批", "审批人:周育成 & 审批时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " & 审批结果:通过");
//        formmain_0831.put("办公室主任审批", "办公室主任审批", "审批人:吴志强 & 审批时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " & 审批结果:通过");
        if (serviceFund.getBackflowlevel() == 3)
            formmain_0831.put("办公室主任审批", "审批人:周育成 & 审批时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " & 审批结果:通过");
        else formmain_0831.put("办公室主任审批", getLastApprovalInfo(serviceFundflows, "周育成"));
            formmain_0831.put("办公室主任审批", "审批人:吴志强 & 审批时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " & 审批结果:通过");
        else formmain_0831.put("办公室主任审批", getLastApprovalInfo(serviceFundflows, "吴志强"));
        formmain_0831.put("业务副院长审批", serviceFund.getBusvicepresident());
        formmain_0831.put("财务副院长审批", serviceFund.getFinvicepresident());
        formmain_0831.put("中心负责人审批", serviceFund.getOpochecker());
        formmain_0831.put("支付方式", serviceFund.getZffs());
        formmain_0831.put("组长", getLastApprovalInfo(serviceFundflows, serviceFund.getManagername()));
        String lastApprovalInfo = getLastApprovalInfo(serviceFundflows, serviceFund.getManagername());
        formmain_0831.put("组长", lastApprovalInfo.contains("吴志强") ? null : lastApprovalInfo);
        formmain_0831.put("审批人员", StringUtils.isEmpty(getLastApprovalInfo(serviceFundflows, serviceFund.getFinancechecher())) ? "陈慕华" : getLastApprovalInfo(serviceFundflows, serviceFund.getFinancechecher()));
        formmain_0831.put("支付日期", serviceFund.getRiqi());
        formmain_0831.put("识别人-作废", null);