From 22655ad10d386f0fc3c38389f519d3d188b46f19 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 13 十月 2023 16:29:54 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java |  225 ++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 161 insertions(+), 64 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
index 7218186..cf2d34f 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
@@ -1,9 +1,5 @@
 package com.ruoyi.web.controller.project;
 
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.annotation.RepeatSubmit;
 import com.ruoyi.common.config.RuoYiConfig;
@@ -15,7 +11,6 @@
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.exception.ServiceException;
-import com.ruoyi.common.utils.HttpClientKit;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.bean.DtoConversionUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -32,7 +27,7 @@
 import freemarker.template.TemplateException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang.ObjectUtils;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.apache.ibatis.annotations.Options;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -41,9 +36,9 @@
 
 import java.io.*;
 import java.math.BigDecimal;
-import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
 
@@ -53,6 +48,7 @@
  * @author ruoyi
  * @date 2022-01-24
  */
+@Slf4j
 @Api("鎶ラ攢鐢宠")
 @RestController
 @RequestMapping("/project/reimbursement")
@@ -77,6 +73,9 @@
 
     @Autowired
     private IServiceFundService serviceFundService;
+
+    @Autowired
+    private IBaseOnlyvalueService baseOnlyvalueService;
 
     @Autowired
     private ISysPostService postService;
@@ -105,6 +104,7 @@
     public TableDataInfo list(ServiceReimbursement serviceReimbursement) {
         SysUser user = SecurityUtils.getLoginUser().getUser();
         serviceReimbursement.setCreateBy(user.getUserName());
+        serviceReimbursement.setUsername(user.getNickName());
         startPage();
         List<ServiceReimbursement> list = serviceReimbursementService.queryList(serviceReimbursement);
         return getDataTable(list);
@@ -135,6 +135,7 @@
         String APPLICATIONENDTIME = spFinancialExpensesIn.getAPPLICATIONENDTIME();
         Integer CHECKFLAG = spFinancialExpensesIn.getCHECKFLAG();
         Integer APPLYTYPE = spFinancialExpensesIn.getAPPLYTYPE();
+        Integer checkstatus = spFinancialExpensesIn.getCheckstatus();
         Integer pageNum = spFinancialExpensesIn.getPageNum();
         Integer pageSize = spFinancialExpensesIn.getPageSize();
 
@@ -158,11 +159,21 @@
             APPLICATIONENDTIME = "";
         }
         //startPage();
-        List<SpFinancialExpensesReimbursementOut> list = serviceReimbursementService.getListBypower(loginUser.getUsername(), 1, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE);
+        List<SpFinancialExpensesReimbursementOut> list = serviceReimbursementService.getListBypower(loginUser.getUsername(), 1, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE,checkstatus);
+        //鏍规嵁缁忓姙浜虹瓫閫�
+        if (StringUtils.isNotBlank(spFinancialExpensesIn.getUsername())) {
+            list = list.stream().filter(reimbursementOut -> reimbursementOut.getUsername().contains(spFinancialExpensesIn.getUsername())).collect(Collectors.toList()); // 鎸塶ame瀛楁杩囨护
+        }
+        //鏍规嵁閲戦绛涢��
+        if (spFinancialExpensesIn.getMoney() != null) {
+            list = list.stream().filter(reimbursementOut -> new BigDecimal(reimbursementOut.getAmountrequested()).compareTo(new BigDecimal(spFinancialExpensesIn.getMoney())) == 0).collect(Collectors.toList());
+
+        }
+        //鏍规嵁鍒涘缓鏃堕棿鎺掑簭
         Collections.sort(list, new Comparator<SpFinancialExpensesReimbursementOut>() {
             @Override
             public int compare(SpFinancialExpensesReimbursementOut o1, SpFinancialExpensesReimbursementOut o2) {
-                return o2.getCreateTime().compareTo(o1.getCreateTime());
+                return o1.getCreateTime().compareTo(o2.getCreateTime());
             }
         });
         return getCustomDataTable(list, pageNum, pageSize);
@@ -211,13 +222,13 @@
     @RepeatSubmit
     @Options(useGeneratedKeys = true, keyProperty = "id")
     public AjaxResult add(@RequestBody ServiceReimbursement serviceReimbursement) {
-
-        boolean b = serviceReimbursementService.save(serviceReimbursement);
-//        if (b) {
-//            addReiSharedDatd(serviceReimbursement, 1);
-//        }
-        Long id = serviceReimbursement.getId();
-        return AjaxResult.success(id);
+        if (!Objects.isNull(serviceReimbursement)) {
+            serviceReimbursement.setCheckstatus(serviceReimbursement.getCheckstatus() == null ? 1 : serviceReimbursement.getCheckstatus());
+            boolean b = serviceReimbursementService.save(serviceReimbursement);
+            Long id = serviceReimbursement.getId();
+            return AjaxResult.success(id);
+        }
+        return error();
     }
 
 //    public int addReiSharedDatd(ServiceReimbursement serviceReimbursement, int nType) {
@@ -453,22 +464,21 @@
     @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) {
+            if (serviceReimbursement.getBackflowlevel() == 199) {
+                //灏嗛��鍥為樁娈佃缃垚100
+                serviceReimbursement.setBackflowlevel(100L);
+                serviceReimbursement.setFlowlevel(100L);
+                serviceReimbursement.setRecordstatus(0);
+                serviceReimbursementService.updateById(serviceReimbursement);
 
-            //灏嗕慨鏀圭殑涓婃姤鏁版嵁 鏂板涓�鏉�
-            ServiceReimbursementShared serviceReimbursementShared = DtoConversionUtils.sourceToTarget(serviceReimbursement, ServiceReimbursementShared.class);
-            serviceReimbursementShared.setId(null);
-            serviceReimbursementShared.setDelFlag(0L);
-            serviceReimbursementShared.setReimid(serviceReimbursement.getId());
-            serviceReimbursementSharedService.save(serviceReimbursementShared);
+                //灏嗕慨鏀圭殑涓婃姤鏁版嵁 鏂板涓�鏉�
+                serviceReimbursementService.addSharedData(checkFundVO.getFundid());
 
-            //灏嗛��鍥為樁娈佃缃垚100
-            serviceReimbursement.setBackflowlevel(100L);     
-            serviceReimbursement.setFlowlevel(100L);
-            serviceReimbursement.setRecordstatus(0);
-            serviceReimbursementService.updateById(serviceReimbursement);
-            return success();
+                return success();
+            }
         }
         if (serviceReimbursement != null) {
             Integer TotalLevel = 0;
@@ -477,16 +487,25 @@
             List<Integer> postids = postService.selectPostListByUserId(loginUser.getUserId());
 
             if (!postids.contains(2)) {
-                serviceReimbursement.setFlowlevel(1L);
-                serviceReimbursement.setBackflowlevel(1L);
                 serviceReimbursement.setRecordstatus(2);
+                if (serviceReimbursement.getBackflowlevel() != null) {
+                    serviceReimbursement.setFlowlevel(serviceReimbursement.getBackflowlevel());
+                } else {
+                    serviceReimbursement.setBackflowlevel(1L);
+                    serviceReimbursement.setFlowlevel(1L);
+                }
             } else {
-                serviceReimbursement.setFlowlevel(0L);
                 serviceReimbursement.setRecordstatus(0);
-                serviceReimbursement.setBackflowlevel(0L);
+                if (serviceReimbursement.getBackflowlevel() != null) {
+                    serviceReimbursement.setFlowlevel(serviceReimbursement.getBackflowlevel());
+                } else {
+                    serviceReimbursement.setFlowlevel(0L);
+                    serviceReimbursement.setBackflowlevel(0L);
+                }
+
             }
 
-            if (!postids.contains(2)) {
+            if (!postids.contains(2) && (serviceReimbursement.getBackflowlevel() == null || serviceReimbursement.getBackflowlevel() == 0)) {
                 ServiceFundflow serviceFundflow = new ServiceFundflow();
                 serviceFundflow.setFundid(serviceReimbursement.getId());
                 serviceFundflow.setCheckuserno(user.getUserName());
@@ -515,8 +534,9 @@
     @Log(title = "瀹℃牳璐圭敤", businessType = BusinessType.OTHER)
     @PostMapping("/checkfund")
     public AjaxResult checkFund(@RequestBody CheckFundVO checkFundVO) {
+        log.info("瀹℃牳璐圭敤鐨勫叆鍙� : {}", checkFundVO);
         ServiceReimbursement serviceReimbursement = serviceReimbursementService.getById(checkFundVO.getFundid());
-
+        log.info("瀹℃牳璐圭敤鐨剆erviceReimbursementService.getById杩斿弬 : {}", serviceReimbursement);
         if (serviceReimbursement != null) {
             Integer totalLevel = 0;
             LoginUser loginUser = getLoginUser();
@@ -525,7 +545,7 @@
             serviceFundflowrule.setApplytype("0");
             serviceFundflowrule.setCheckuserno(loginUser.getUsername());
             List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule);
-
+            log.info("瀹℃牳璐圭敤鐨剆erviceFundflowruleService.queryList杩斿弬 : {}", serviceFundflowrules.size());
             if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) {
                 return AjaxResult.error(HttpStatus.ERROR, "褰撳墠浜哄憳鏃犳璁板綍瀹℃牳鏉冮檺");
             }
@@ -559,12 +579,14 @@
                     }
                 }
                 FlowLevel = FlowLevel + 1;
+                serviceReimbursement.setBackflowlevel(Long.valueOf(FlowLevel));
             } else {
                 CheckFlag = 2;
 
                 if (CheckFlag == 2) {
                     //搴斿尰闄㈣姹傚鏋滃嚭鐜伴��鍥烇紝鐩存帴閫�鍒板彂璧疯��
                     FlowLevel = 0;
+                    RecordStatus = -1;
                 } else {
                     //涓嬮潰鏄師鏉ョ殑鍐欐硶锛屼竴绾т竴绾х殑寰�涓嬮��锛屽尰闄㈢幇鍦ㄤ笉瑕佽繖鏍锋悶浜嗭紝涓嬮潰杩欐浠g爜鍏堜繚鐣欙紝绛夊尰闄㈠洖蹇冭浆鎰忥紝鍐嶇粰鏀惧紑
                     RecordStatus = (FlowLevel + 1) * 2 - 1;
@@ -585,13 +607,17 @@
             serviceFundflow.setFundtype(1);
             serviceFundflow.setApplytype("0");
             serviceFundflow.setFlowconclusion(CheckFlag);
-            serviceFundflow.setFlowcontent(checkFundVO.getFlowcontent());
+            if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) {
+                serviceFundflow.setFlowcontent(checkFundVO.getFlowcontent());
+            } else {
+                serviceFundflow.setFlowcontent(checkFundVO.getFlowconclusion() == 1 ? "閫氳繃" : "涓嶉�氳繃");
+            }
             serviceFundflow.setFlowlevel(OriginalFlowLevel + 1);
             serviceFundflowService.save(serviceFundflow);
 
             List<Integer> postids = postService.selectPostListByUserId(loginUser.getUserId());
-
-            if (!postids.contains(2)) {
+            log.info("postService.selectPostListByUserId : {}", postids.size());
+            if (!postids.contains(2) && !postids.contains(6) && (serviceReimbursement.getBackflowlevel() == null || serviceReimbursement.getBackflowlevel() == 0)) {
                 if (CheckFlag == 2 && OriginalFlowLevel == 1) {
                     ServiceFundflow serviceFundflowAuto = new ServiceFundflow();
                     serviceFundflowAuto.setFundid(serviceReimbursement.getId());
@@ -603,9 +629,13 @@
                     serviceFundflowAuto.setFlowcontent("闈炰笓鑱屼汉鍛樹簩绾у鏍告嫆缁濆悗鐩存帴閫�鍥炲埌淇敼鐘舵��");
                     serviceFundflowAuto.setFlowlevel(1);
                     serviceFundflowService.save(serviceFundflowAuto);
-
                     serviceReimbursement.setRecordstatus(1);
                 }
+
+            }
+            //001瀹℃壒閫氳繃涔嬪悗锛屽氨闇�瑕佹妸鈥滃姙鍏涓讳换鈥濈殑鍚嶅瓧濉笂
+            if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("001")) {
+                serviceReimbursement.setOfficedirector(user.getNickName());
             }
 
             serviceReimbursementService.updateById(serviceReimbursement);
@@ -620,10 +650,12 @@
             serviceSystemmessage.setIsread(0);
             serviceSystemmessage.setMessagetype(1);
             serviceSystemmessage.setRelevantno(serviceReimbursement.getId());
+            log.info("CheckFlag鐨勫�� : {}", CheckFlag);
             if (CheckFlag == 1) {
                 //閫氳繃
                 serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
                 serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceReimbursement.getCreateTime()) + "鎻愪氦鐨勫叧浜庢崘鐚渚嬨��" + serviceReimbursement.getDonorname() + "銆戠殑宸梾璐圭敵璇峰凡閫氳繃" + (OriginalFlowLevel + 1) + "绾у鏍�");
+                log.info("totalLevel鐨勫�� : {},  OriginalFlowLevel鐨勫��:{}", totalLevel, OriginalFlowLevel);
                 if (totalLevel == OriginalFlowLevel + 1) {
                     //鎵�鏈夋暟鎹柊澧炲埌澶囦唤琛�
                     serviceReimbursementService.addSharedData(checkFundVO.getFundid());
@@ -648,7 +680,7 @@
     @ApiOperation("淇敼鎶ラ攢鐢宠")
     //@PreAuthorize("@ss.hasPermi('project:reimbursement:edit')")
     @Log(title = "鎶ラ攢鐢宠", businessType = BusinessType.UPDATE)
-    @PutMapping
+    @PostMapping("/reimbursementEdit")
     @RepeatSubmit
     public AjaxResult edit(@RequestBody ServiceReimbursement serviceReimbursement) {
         boolean b = serviceReimbursementService.updateById(serviceReimbursement);
@@ -678,8 +710,8 @@
      */
     @ApiOperation("鍒犻櫎鎶ラ攢鐢宠")
     //@PreAuthorize("@ss.hasPermi('project:reimbursement:remove')")
-    @Log(title = "鎶ラ攢鐢宠", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
+    @Log(title = "鎶ラ攢鐢宠")
+    @GetMapping("/remove/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(serviceReimbursementService.removeByIds(Arrays.asList(ids)));
     }
@@ -693,6 +725,7 @@
         Map dataMap = new HashMap();
         getData(dataMap, id);
         String filePath = getClass().getResource("/template/").getPath();
+        log.info("涓嬭浇鍦板潃鏄暐锛燂紵锛焮}", filePath);
         System.out.println(filePath);
         //璁剧疆妯℃湰瑁呯疆鏂规硶鍜岃矾寰�,FreeMarker鏀寔澶氱妯℃澘瑁呰浇鏂规硶銆傚彲浠ラ噸servlet锛宑lasspath锛屾暟鎹簱鏁欑▼瑁呰浇锛�
         configuration.setDirectoryForTemplateLoading(new File(filePath));
@@ -705,7 +738,7 @@
             e.printStackTrace();
         }
         String newTime = String.valueOf(Calendar.getInstance().getTimeInMillis());
-        String name = "宸梾璐规姤閿�鐢宠鍗昣" + dataMap.get("XM") + "_" + newTime;
+        String name = "宸梾璐规姤閿�鐢宠鍗昣" + dataMap.get("JSR") + "_" + newTime;
 
         //杈撳嚭鏂囨。璺緞鍙婂悕绉�
         File outFile = new File(RuoYiConfig.getProfile() + "/download/wordtemplate/" + name + ".doc");
@@ -748,9 +781,15 @@
         ServiceReimbursementEo serviceReimbursementEo = new ServiceReimbursementEo();
         serviceReimbursementEo.setId(id);
         List<ServiceReimbursementEo> rdInfoByItem = serviceReimbursementService.getRDInfoByItem(serviceReimbursementEo);
+        log.info("rdInfoByItem鏄惁涓虹┖ :{}", CollectionUtils.isEmpty(rdInfoByItem) ? null : rdInfoByItem.size());
+        for (int i = 0; i < rdInfoByItem.size(); i++) {
+            ServiceReimbursementEo serviceReimbursementEo1 = rdInfoByItem.get(i);
+            String codeByInfo = PersonType.getCodeByInfo(serviceReimbursementEo1.getPersontype());
+            serviceReimbursementEo1.setPersontype(codeByInfo);
+        }
         //鑾峰彇鎶ラ攢鏀粯淇℃伅
         List<ServiceReimbursementpayee> reimbursementpayeeInfo = reimbursementpayeeService.getReimbursementpayeeInfo(serviceReimbursementEo);
-
+        log.info("reimbursementpayeeInfo鏄惁涓虹┖ :{}", CollectionUtils.isEmpty(reimbursementpayeeInfo) ? null : reimbursementpayeeInfo.size());
         Map<String, List<ServiceReimbursementEo>> listMap = rdInfoByItem.stream().collect(Collectors.groupingBy(ServiceReimbursementEo::getPersontype));
         List<Map<String, BigDecimal>> list = new ArrayList<>();
         StringBuffer FYXM1 = new StringBuffer();
@@ -767,28 +806,76 @@
             BigDecimal keyOneMoney = new BigDecimal(0.00);
             BigDecimal keyTwoMoney = new BigDecimal(0.00);
             for (ServiceReimbursementEo serviceReimbursementEo1 : values) {
-                otherMoney = otherMoney.add(serviceReimbursementEo1.getTrafficexpense()).add(serviceReimbursementEo1.getHotelexpense()).add(serviceReimbursementEo1.getFoodexpenses()).add(serviceReimbursementEo1.getFoodallowance()).add(serviceReimbursementEo1.getOtherexpense()).add(serviceReimbursementEo1.getOtherfeeamount());
+                otherMoney = otherMoney.add(serviceReimbursementEo1.getTrafficexpense()).add(serviceReimbursementEo1.getHotelexpense()).add(serviceReimbursementEo1.getCityfee()).add(serviceReimbursementEo1.getFoodexpenses()).add(serviceReimbursementEo1.getFoodallowance()).add(serviceReimbursementEo1.getOtherexpense()).add(serviceReimbursementEo1.getOtherfeeamount());
             }
             map.put(key, otherMoney);
             list.add(map);
-            // 涓嶄负涓撳鎴栧灞�
-            if (!key.equals("3") && !key.equals("4")) {
-                //灏嗕笂涓�娆$殑娓呯┖
-                FYXM1.delete(0, FYXM1.length());
-                //鍐嶆柊澧�
-                otherMoneyall = otherMoneyall.add(otherMoney);
-                FYXM1.append("OPO宸ヤ綔浜哄憳" + ":" + otherMoneyall + " ");
-            } else {
-                if (flag == 0) {
-                    key1 = key;
-                    flag = 1;
-                }
-                if (key1 == key) {
-                    FYXM2.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
-                    allMoney = allMoney.add(otherMoney);
+            // 涓嶄负涓撳鎴栧灞烇紝key鏈夊彲鑳芥槸鏁板瓧锛屾湁鍙兘鏄眽瀛�
+            Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
+            boolean matches = pattern.matcher(key).matches();
+            if (matches) {
+                if (!key.equals("3") && !key.equals("4")) {
+                    //灏嗕笂涓�娆$殑娓呯┖
+                    FYXM1.delete(0, FYXM1.length());
+                    //鍐嶆柊澧�
+                    otherMoneyall = otherMoneyall.add(otherMoney);
+                    FYXM1.append("OP0 宸ヤ綔浜哄憳鎶ラ攢宸梾璐�" + ":" + otherMoneyall + " ");
                 } else {
-                    FYXM3.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
-                    allMoney = allMoney.add(otherMoney);
+                    if (flag == 0) {
+                        key1 = key;
+                        flag = 1;
+                    }
+                    if (key1 == key) {
+                        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 {
+                        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 {
+                if (!key.equals("涓撳") && !key.equals("瀹跺睘")) {
+                    //灏嗕笂涓�娆$殑娓呯┖
+                    FYXM1.delete(0, FYXM1.length());
+                    //鍐嶆柊澧�
+                    otherMoneyall = otherMoneyall.add(otherMoney);
+                    FYXM1.append("OP0 宸ヤ綔浜哄憳鎶ラ攢宸梾璐�" + ":" + otherMoneyall + " ");
+                } else {
+                    if (flag == 0) {
+                        key1 = key;
+                        flag = 1;
+                    }
+                    if (key1 == key) {
+                        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 {
+                        if (key.equals("涓撳")) {
+//                        FYXM2.append(PersonType.getInfoByCode(key) + ":" + otherMoney);
+                            FYXM3.append("涓撳鎶ラ攢宸梾璐� :" + otherMoney);
+                            allMoney = allMoney.add(otherMoney);
+                        } else {
+                            FYXM3.append("瀹跺睘鎶ラ攢宸梾璐瑰強璇伐璐圭敤 : " + otherMoney);
+                            allMoney = allMoney.add(otherMoney);
+                        }
+                    }
                 }
             }
         }
@@ -818,6 +905,8 @@
         String date = formatter.format(dt);
         String time = date.substring(0, 10);
 
+        dataMap.put("ZB", rdInfoByItem.get(0).getDeptmentname() == null ? "" : rdInfoByItem.get(0).getDeptmentname());
+        dataMap.put("XZBH", rdInfoByItem.get(0).getBh() == null ? "" : rdInfoByItem.get(0).getBh());
         dataMap.put("TBYYMMDD", time);
         dataMap.put("BXDFJ", rdInfoByItem.get(0).getAttachcount() == null ? "   " : "" + rdInfoByItem.get(0).getAttachcount());
         dataMap.put("JXZXM", rdInfoByItem.get(0).getDonorname() == null ? "" : rdInfoByItem.get(0).getDonorname());
@@ -854,6 +943,14 @@
         }
         dataMap.put("BXBZ", remark);
 
+        dataMap.put("ZXFZR", StringUtils.isEmpty(rdInfoByItem.get(0).getOpochecker()) ? "" : rdInfoByItem.get(0).getOpochecker());
+//
+        dataMap.put("CWFYZ", StringUtils.isEmpty(rdInfoByItem.get(0).getFinvicepresident()) ? "" : rdInfoByItem.get(0).getFinvicepresident());
+        dataMap.put("YWFYZ", StringUtils.isEmpty(rdInfoByItem.get(0).getBusvicepresident()) ? "" : rdInfoByItem.get(0).getBusvicepresident());
+        dataMap.put("BGSZR", StringUtils.isEmpty(rdInfoByItem.get(0).getOfficedirector()) ? "" : rdInfoByItem.get(0).getOfficedirector());
+        dataMap.put("CWBZR", StringUtils.isEmpty(rdInfoByItem.get(0).getFinancedirector()) ? "" : rdInfoByItem.get(0).getFinancedirector());
+        dataMap.put("CWSH", StringUtils.isEmpty(rdInfoByItem.get(0).getFinancechecher()) ? "" : rdInfoByItem.get(0).getFinancechecher());
+
 
         dataMap.put("YYMMDD", time);
 

--
Gitblit v1.9.3