From f80df09d8dee5c731cb42d4e3d18f627e32bdaea Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 19 十月 2023 09:51:47 +0800
Subject: [PATCH] 代码提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java | 73 +++++++++++++++++++++++++++---------
1 files changed, 55 insertions(+), 18 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
index e563bbb..29c9092 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
@@ -76,7 +76,7 @@
private IServiceSystemmessageService ServiceSystemmessage;
@Autowired
- private IServiceFundSharedService fundServiceShare;
+ private IBaseOnlyvalueService baseOnlyvalueService;
@Autowired
private IServiceExternalpersonService externalpersonService;
@@ -128,6 +128,7 @@
Integer APPLYTYPE = spFinancialExpensesIn.getAPPLYTYPE();
Integer pageNum = spFinancialExpensesIn.getPageNum();
Integer pageSize = spFinancialExpensesIn.getPageSize();
+ Integer checkstatus = spFinancialExpensesIn.getCheckstatus();
if (pageNum == null) {
pageNum = 1;
@@ -150,16 +151,22 @@
}
//startPage();
- List<SpFinancialExpensesFundOut> list = serviceFundService.getListBypower(loginUser.getUsername(), 2, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE);
+ List<SpFinancialExpensesFundOut> list = serviceFundService.getListBypower(loginUser.getUsername(), 2, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE,checkstatus);
//閫氳繃鎹愮尞鑰呰繃婊�
if (StringUtils.isNotEmpty(spFinancialExpensesIn.getDonorname())) {
list = list.stream().filter(obj -> obj.getDonorname().contains(spFinancialExpensesIn.getDonorname())).collect(Collectors.toList());
}
+ //閫氳繃閲戦杩囨护
+ if (spFinancialExpensesIn.getMoney() != null) {
+ list = list.stream().filter(reimbursementOut -> new BigDecimal(reimbursementOut.getPretaxcost()).compareTo(new BigDecimal(spFinancialExpensesIn.getMoney())) == 0).collect(Collectors.toList());
+
+ }
+
Collections.sort(list, new Comparator<SpFinancialExpensesFundOut>() {
@Override
public int compare(SpFinancialExpensesFundOut o1, SpFinancialExpensesFundOut o2) {
- return o2.getCreateTime().compareTo(o1.getCreateTime());
+ return o1.getCreateTime().compareTo(o2.getCreateTime());
}
});
return getCustomDataTable(list, pageNum, pageSize);
@@ -485,7 +492,7 @@
Integer CheckFlag = 0;
Integer RecordStatus = serviceFund.getRecordstatus();
- Integer FlowLevel = serviceFund.getFlowlevel();
+ Integer FlowLevel = serviceFund.getFlowlevel().intValue();
Integer OriginalFlowLevel = FlowLevel;
if (checkFundVO.getFlowconclusion() == 1) {
CheckFlag = 1;
@@ -517,7 +524,7 @@
}
serviceFund.setRecordstatus(RecordStatus);
- serviceFund.setFlowlevel(FlowLevel);
+ serviceFund.setFlowlevel(FlowLevel.longValue());
// serviceFund.setBackflowlevel(serviceFund.getFlowlevel());
ServiceFundflow serviceFundflow = new ServiceFundflow();
@@ -535,6 +542,11 @@
}
serviceFundflow.setFlowlevel(OriginalFlowLevel + 1);
serviceFundflowService.save(serviceFundflow);
+
+ //001瀹℃壒閫氳繃涔嬪悗锛屽氨闇�瑕佹妸鈥滃姙鍏涓讳换鈥濈殑鍚嶅瓧濉笂
+ if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("001")) {
+ serviceFund.setOfficedirector(user.getNickName());
+ }
serviceFundService.updateById(serviceFund);
ServiceSystemmessage serviceSystemmessage = new ServiceSystemmessage();
@@ -603,17 +615,17 @@
if (!postids.contains(2)) {
serviceFund.setRecordstatus(2);
if (serviceFund.getBackflowlevel() != null) {
- serviceFund.setFlowlevel(serviceFund.getBackflowlevel());
+ serviceFund.setFlowlevel(serviceFund.getBackflowlevel().longValue());
} else {
serviceFund.setBackflowlevel(1);
- serviceFund.setFlowlevel(1);
+ serviceFund.setFlowlevel(1L);
}
} else {
serviceFund.setRecordstatus(0);
if (serviceFund.getBackflowlevel() != null) {
- serviceFund.setFlowlevel(serviceFund.getBackflowlevel());
+ serviceFund.setFlowlevel(serviceFund.getBackflowlevel().longValue());
} else {
- serviceFund.setFlowlevel(0);
+ serviceFund.setFlowlevel(0L);
serviceFund.setBackflowlevel(0);
}
@@ -694,6 +706,7 @@
String time = date.substring(0, 10);
dataMap.put("XZBH", serviceFund.getBh() == null ? "" : serviceFund.getBh());
+ dataMap.put("ZB", serviceFund.getDeptmentname() == null ? "" : serviceFund.getDeptmentname());
dataMap.put("TBYYMMDD", time);
dataMap.put("BXDFJ", serviceFund.getAttachcount() == 0 ? " " : serviceFund.getAttachcount());
dataMap.put("JXZXM", serviceFund.getDonorname() == null ? "" : serviceFund.getDonorname());
@@ -1016,11 +1029,13 @@
Template t = null;
try {
//鎹愮尞琛�.ftl涓鸿瑁呰浇鐨勬ā鏉�
- //涓撳鍔冲姟璐圭敵璇� 1 浼︾悊璇勪及鍔冲姟璐圭敵璇� 2 鍖诲鎴愭湰璐圭敤鐢宠 3 鍔炲叕璐圭敤鎶ラ攢鐢宠 4
+ //涓撳鍔冲姟璐圭敵璇� 1 浼︾悊璇勪及鍔冲姟璐圭敵璇� 2 鍖诲鎴愭湰璐圭敤鐢宠 3 鍔炲叕璐圭敤鎶ラ攢鐢宠 4 缁╂晥璐圭敤鎶ラ攢鐢宠 5
if (dataYX.equals("3")) {
t = configuration.getTemplate("鍖诲鎴愭湰璐圭敤鐢宠鍗�.ftl");
} else if (dataYX.equals("4")) {
t = configuration.getTemplate("鍔炲叕璐圭敤鐢宠鍗�.ftl");
+ }else if (dataYX.equals("5")) {
+ t = configuration.getTemplate("缁╂晥璐圭敤鐢宠鍗�.ftl");
}
} catch (IOException e) {
e.printStackTrace();
@@ -1075,6 +1090,7 @@
List<Map<String, Object>> newList = new ArrayList<Map<String, Object>>();
int seqno = 0;
+ dataMap.put("ZB", serviceFund.getDeptmentname() == null ? "" : serviceFund.getDeptmentname());
dataMap.put("XZBH", serviceFund.getBh() == null ? "" : serviceFund.getBh());
dataMap.put("TBYYMMDD", time);
dataMap.put("BXDFJ", serviceFund.getAttachcount() == 0 ? " " : serviceFund.getAttachcount());
@@ -1104,14 +1120,22 @@
//濡傛灉鏄尰鐤楁垚鏈紝鍒欐妸閾惰鍗″姞涓婃瘡鏉℃槑缁嗙殑鍚庨潰
if (serviceFund.getApplytype().equals("3")) {
i = i + 1;
- bz += f.getUnitname() == null ? "(" + i + ")" : "(" + i + ")" + f.getUnitname() + "锛�";
+ bz += f.getBeneficiaryname() == null ? "(" + i + ")" : "(" + i + ")" + f.getBeneficiaryname() + "锛�";
+ bz += "閲戦 : " + f.getAmount() + "鍏�" + "锛�";
bz += f.getDepositbank() == null ? "" : f.getDepositbank() + ": ";
- bz += f.getBankcardno() == null ? "" : f.getBankcardno() + "锛�";
- bz += "閲戦 : " + f.getAmount() + "鍏�";
- bz += System.lineSeparator();
+ bz += f.getBankcardno() == null ? "" : f.getBankcardno();
+ bz += "<w:br/>";
+ }
+ if (serviceFund.getApplytype().equals("4")) {
+ i = i + 1;
+ bz += f.getBeneficiaryname() == null ? "(" + i + ")" : "(" + i + ")" + f.getBeneficiaryname() + "锛�";
+ bz += "閲戦 : " + f.getAmount() + "鍏�" + "锛�";
+ bz += f.getDepositbank() == null ? "" : f.getDepositbank() + ": ";
+ bz += f.getBankcardno() == null ? "" : f.getBankcardno();
+ bz += "<w:br/>";
}
- String fyxm = f.getItemname() == null ? "" : f.getItemname();
+ String fyxm = "";
fyxm += f.getItemname() == null ? "" : f.getItemname();
fyxm += f.getAmount() + "鍏�";
map.put("FYXM", fyxm);
@@ -1127,7 +1151,7 @@
// dataMap.put("JEDS", convert(serviceFund.getAmountrequested()) + "鏁�");
//澶囨敞閲屾斁鐨勬槸缁忓姙浜虹殑閾惰鍗′俊鎭�
- dataMap.put("BXBZ", serviceFund.getApplytype().equals("3") ? bz : infoByUserNo == null ? "" : infoByUserNo.getBranchbankname() + " " + infoByUserNo.getBankcardno());
+ dataMap.put("BXBZ", serviceFund.getApplytype().equals("3") || serviceFund.getApplytype().equals("4") ? bz : infoByUserNo == null ? "" : infoByUserNo.getBranchbankname() + " " + infoByUserNo.getBankcardno());
dataMap.put("YZ", serviceFund.getPresident() == null ? "" : serviceFund.getPresident());
dataMap.put("CWFYZ", serviceFund.getFinvicepresident() == null ? "" : serviceFund.getFinvicepresident());
dataMap.put("YWFYZ", serviceFund.getBusvicepresident() == null ? "" : serviceFund.getBusvicepresident());
@@ -1150,7 +1174,7 @@
count++;
map.put("XH", count);
map.put("FWNR", f.getItemname() == null ? "" : f.getItemname());
- map.put("DW", f.getUnitname() == null ? "" : f.getUnitname());
+ map.put("DW", f.getBeneficiaryname() == null ? "" : f.getBeneficiaryname());
map.put("SL", f.getQuantity() == 0.00 ? "" : f.getQuantity());
map.put("JG", f.getPrice() == 0.00 ? "" : f.getPrice());
@@ -1889,6 +1913,7 @@
String date = formatter.format(dt);
String time = date.substring(0, 10);
+ dataMap.put("ZB", serviceFund.getDeptmentname() == null ? "" : serviceFund.getDeptmentname());
dataMap.put("XZBH", serviceFund.getBh() == null ? "" : serviceFund.getBh());
dataMap.put("TBYYMMDD", time);
dataMap.put("BXDFJ", serviceFund.getAttachcount() == 0 ? " " : serviceFund.getAttachcount());
@@ -1946,7 +1971,6 @@
dataMap.put("SQZE", String.format("%.2f", sh).toString() + "");
-
}
@@ -1982,4 +2006,17 @@
}
+
+ /**
+ * 缁╂晥璁$畻
+ */
+ @ApiOperation("缁╂晥璁$畻")
+ @Log(title = "缁╂晥璁$畻", businessType = BusinessType.INSERT)
+ @PostMapping("/performance")
+ @RepeatSubmit
+ public AjaxResult performance(@RequestBody ServiceFundVO serviceFundVO) {
+
+ return AjaxResult.success(serviceFundService.performance(serviceFundVO));
+ }
+
}
--
Gitblit v1.9.3