From 00e066b1b6c1f2c5e94adfcf50b49cf2a3d682d0 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 12 九月 2023 13:43:02 +0800
Subject: [PATCH] 代码提交
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java | 10 ++
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceReimbursementdetailVO.java | 3
ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/SpFinancialExpensesIn.java | 6 ++
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java | 83 +++++++++++++--------------
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementdetailController.java | 21 +++++++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java | 22 ++++++-
6 files changed, 96 insertions(+), 49 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..982ecc3 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
@@ -156,10 +156,16 @@
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);
@@ -1108,10 +1114,18 @@
bz += f.getDepositbank() == null ? "" : f.getDepositbank() + ": ";
bz += f.getBankcardno() == null ? "" : f.getBankcardno() + "锛�";
bz += "閲戦 : " + f.getAmount() + "鍏�";
- bz += System.lineSeparator();
+ bz += "<w:br/>";
+ }
+ if (serviceFund.getApplytype().equals("4")) {
+ i = i + 1;
+ bz += f.getBeneficiaryname() == null ? "(" + i + ")" : "(" + i + ")" + f.getBeneficiaryname() + "锛�";
+ bz += f.getDepositbank() == null ? "" : f.getDepositbank() + ": ";
+ bz += f.getBankcardno() == null ? "" : f.getBankcardno() + "锛�";
+ bz += "閲戦 : " + f.getAmount() + "鍏�";
+ 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 +1141,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());
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 90cf6dd..c7957f2 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
@@ -156,10 +156,15 @@
}
//startPage();
List<SpFinancialExpensesReimbursementOut> list = serviceReimbursementService.getListBypower(loginUser.getUsername(), 1, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE);
+ //鏍规嵁缁忓姙浜虹瓫閫�
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()) == new BigDecimal(spFinancialExpensesIn.getMoney())).collect(Collectors.toList());
+ }
+ //鏍规嵁鍒涘缓鏃堕棿鎺掑簭
Collections.sort(list, new Comparator<SpFinancialExpensesReimbursementOut>() {
@Override
public int compare(SpFinancialExpensesReimbursementOut o1, SpFinancialExpensesReimbursementOut o2) {
@@ -711,6 +716,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));
@@ -723,7 +729,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");
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementdetailController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementdetailController.java
index 4e3ee9c..b176898 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementdetailController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementdetailController.java
@@ -133,6 +133,27 @@
@PostMapping("/reimbursementdetailEdit")
//@RepeatSubmit
public AjaxResult edit(@RequestBody ServiceReimbursementdetailVO serviceReimbursementdetailVO) {
+ if (serviceReimbursementdetailVO.getTrafficexpense() == null) {
+ serviceReimbursementdetailVO.setTrafficexpense(new BigDecimal(0));
+ }
+ if (serviceReimbursementdetailVO.getCityfee() == null) {
+ serviceReimbursementdetailVO.setCityfee(new BigDecimal(0));
+ }
+ if (serviceReimbursementdetailVO.getHotelexpense() == null) {
+ serviceReimbursementdetailVO.setHotelexpense(new BigDecimal(0));
+ }
+ if (serviceReimbursementdetailVO.getFoodexpenses() == null) {
+ serviceReimbursementdetailVO.setFoodexpenses(new BigDecimal(0));
+ }
+ if (serviceReimbursementdetailVO.getFoodallowance() == null) {
+ serviceReimbursementdetailVO.setFoodallowance(new BigDecimal(0));
+ }
+ if (serviceReimbursementdetailVO.getOtherexpense() == null) {
+ serviceReimbursementdetailVO.setOtherexpense(new BigDecimal(0));
+ }
+ if (serviceReimbursementdetailVO.getOtherfeeamount() == null) {
+ serviceReimbursementdetailVO.setOtherfeeamount(new BigDecimal(0));
+ }
ServiceReimbursementdetail serviceReimbursementdetail = DtoConversionUtils.sourceToTarget(serviceReimbursementdetailVO, ServiceReimbursementdetail.class);
if (!CollectionUtils.isEmpty(serviceReimbursementdetailVO.getAnnexfilesList())) {
//瀵瑰墠绔紶杩囨潵鐨勬暟缁勶紝杩涜JSON搴忓垪鍖栵紝骞惰祴鍊肩粰Annexfiles
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceReimbursementdetailVO.java b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceReimbursementdetailVO.java
index 71e6470..90b734c 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceReimbursementdetailVO.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceReimbursementdetailVO.java
@@ -126,7 +126,7 @@
private Long attachcount;
/**
- * 鏉傝垂
+ * 鍏潅璐硅ˉ鍔�
*/
@ApiModelProperty("鏉傝垂")
@Excel(name = "鏉傝垂")
@@ -217,6 +217,7 @@
@Excel(name = "鎵�灞炶閬擄紙闀囷級鍚嶇О")
private String traveltownname;
+ @ApiModelProperty("鍏跺畠璐圭敤")
private BigDecimal otherfeeamount;
private String otherfeedesc;
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/SpFinancialExpensesIn.java b/ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/SpFinancialExpensesIn.java
index 80ac4ee..433fc23 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/SpFinancialExpensesIn.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/SpFinancialExpensesIn.java
@@ -63,4 +63,10 @@
@ApiModelProperty("鎹愮尞鑰呭鍚�")
private String donorname;
+ /**
+ * 閲戦
+ */
+ @ApiModelProperty("閲戦")
+ private Double money;
+
}
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java
index 549a817..daf25c0 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java
@@ -4,6 +4,7 @@
import java.util.Date;
import java.util.List;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
@@ -18,8 +19,10 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
import java.util.ArrayList;
import java.util.Map;
+
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.domain.ServiceDonatebaseinfo;
import com.ruoyi.project.mapper.BaseOrganizationMapper;
@@ -27,13 +30,12 @@
/**
* 鎹愮尞鍩虹Service涓氬姟灞傚鐞�
- *
+ *
* @author ruoyi
* @date 2021-11-13
*/
@Service
-public class ServiceDonatebaseinfoServiceImpl extends ServiceImpl<ServiceDonatebaseinfoMapper, ServiceDonatebaseinfo> implements IServiceDonatebaseinfoService
-{
+public class ServiceDonatebaseinfoServiceImpl extends ServiceImpl<ServiceDonatebaseinfoMapper, ServiceDonatebaseinfo> implements IServiceDonatebaseinfoService {
@Autowired
BaseOrganizationMapper baseOrganizationMapper;
@@ -48,40 +50,39 @@
ServiceDonationwitnessMapper serviceDonationwitnessMapper;
-
/**
* 鏌ヨ鎹愮尞鍩虹鍒楄〃
- *
+ *
* @param serviceDonatebaseinfo 鎹愮尞鍩虹
* @return 鎹愮尞鍩虹
*/
@Override
public List<ServiceDonatebaseinfo> queryList(ServiceDonatebaseinfo serviceDonatebaseinfo) {
LambdaQueryWrapper<ServiceDonatebaseinfo> wrappers = Wrappers.lambdaQuery();
- if (StringUtils.isNotBlank(serviceDonatebaseinfo.getName())){
- wrappers.like(ServiceDonatebaseinfo::getName ,serviceDonatebaseinfo.getName());
+ if (StringUtils.isNotBlank(serviceDonatebaseinfo.getName())) {
+ wrappers.like(ServiceDonatebaseinfo::getName, serviceDonatebaseinfo.getName());
}
- if (StringUtils.isNotBlank(serviceDonatebaseinfo.getIdcardno())){
- wrappers.like(ServiceDonatebaseinfo::getIdcardno ,serviceDonatebaseinfo.getIdcardno());
+ if (StringUtils.isNotBlank(serviceDonatebaseinfo.getIdcardno())) {
+ wrappers.like(ServiceDonatebaseinfo::getIdcardno, serviceDonatebaseinfo.getIdcardno());
}
- if (StringUtils.isNotBlank(serviceDonatebaseinfo.getResidenceprovince())){
- wrappers.eq(ServiceDonatebaseinfo::getResidenceprovince ,serviceDonatebaseinfo.getResidenceprovince());
+ if (StringUtils.isNotBlank(serviceDonatebaseinfo.getResidenceprovince())) {
+ wrappers.eq(ServiceDonatebaseinfo::getResidenceprovince, serviceDonatebaseinfo.getResidenceprovince());
}
- if (serviceDonatebaseinfo.getRecordstate() != null){
- wrappers.eq(ServiceDonatebaseinfo::getRecordstate ,serviceDonatebaseinfo.getRecordstate());
+ if (serviceDonatebaseinfo.getRecordstate() != null) {
+ wrappers.eq(ServiceDonatebaseinfo::getRecordstate, serviceDonatebaseinfo.getRecordstate());
}
- if (StringUtils.isNotBlank(serviceDonatebaseinfo.getTreatmenthospitalname())){
- wrappers.like(ServiceDonatebaseinfo::getTreatmenthospitalname ,serviceDonatebaseinfo.getTreatmenthospitalname());
+ if (StringUtils.isNotBlank(serviceDonatebaseinfo.getTreatmenthospitalname())) {
+ wrappers.like(ServiceDonatebaseinfo::getTreatmenthospitalname, serviceDonatebaseinfo.getTreatmenthospitalname());
}
- if (StringUtils.isNotBlank(serviceDonatebaseinfo.getDonorno())){
- wrappers.eq(ServiceDonatebaseinfo::getDonorno ,serviceDonatebaseinfo.getDonorno());
+ if (StringUtils.isNotBlank(serviceDonatebaseinfo.getDonorno())) {
+ wrappers.eq(ServiceDonatebaseinfo::getDonorno, serviceDonatebaseinfo.getDonorno());
}
- if (StringUtils.isNotBlank(serviceDonatebaseinfo.getReportername())){
- wrappers.like(ServiceDonatebaseinfo::getReportername ,serviceDonatebaseinfo.getReportername());
+ if (StringUtils.isNotBlank(serviceDonatebaseinfo.getReportername())) {
+ wrappers.like(ServiceDonatebaseinfo::getReportername, serviceDonatebaseinfo.getReportername());
}
Map<String, Object> params = serviceDonatebaseinfo.getParams();
if (params.get("beginReporttime") != null && params.get("endReporttime") != null) {
- wrappers.between(ServiceDonatebaseinfo::getReporttime ,params.get("beginReporttime"),params.get("endReporttime"));
+ wrappers.between(ServiceDonatebaseinfo::getReporttime, params.get("beginReporttime"), params.get("endReporttime"));
}
return this.list(wrappers);
}
@@ -95,7 +96,9 @@
//鍙戠幇鍖婚櫌 C1C2AF1N1
String hospitalNo = serviceDonatebaseinfo.getTreatmenthospitalno();
BaseOrganization baseOrganization = baseOrganizationMapper.getOrganizationByNumber(hospitalNo);
- donateNumber += baseOrganization.getOrganizationid();
+ if (ObjectUtils.isNotEmpty(baseOrganization)) {
+ donateNumber += baseOrganization.getOrganizationid();
+ }
//宸ヤ綔浜哄憳 H1H2H3
donateNumber += serviceDonatebaseinfo.getReporterno();
@@ -133,29 +136,25 @@
public String updateS1S2S3S4(Long id) {
String oldDonateNumber = serviceDonatebaseinfoMapper.getDonateNumberById(id);
- List <ServiceDonationwitness> list = serviceDonationwitnessMapper.getWitnessList();
+ List<ServiceDonationwitness> list = serviceDonationwitnessMapper.getWitnessList();
int completeDonation = list.size();
String number = "";
- if(completeDonation < 10){
+ if (completeDonation < 10) {
number = "000" + completeDonation;
- }
- else if(completeDonation >= 10 && completeDonation < 100){
+ } else if (completeDonation >= 10 && completeDonation < 100) {
number = "00" + completeDonation;
- }
- else if(completeDonation >= 100 && completeDonation < 1000){
+ } else if (completeDonation >= 100 && completeDonation < 1000) {
number = "0" + completeDonation;
- }
- else {
+ } else {
number = "" + completeDonation;
}
int last = oldDonateNumber.lastIndexOf("*");
- if(last == -1){
+ if (last == -1) {
return oldDonateNumber;
- }
- else {
+ } else {
StringBuilder newDonateNumber = new StringBuilder(oldDonateNumber);
newDonateNumber.replace(last - 3, last + 1, number);
@@ -170,21 +169,21 @@
public List<ServiceDonatebaseinfo> selectServiceDonatebaseinfoList(ServiceDonatebaseinfo serviceDonatebaseinfo) {
SysUser user = SecurityUtils.getLoginUser().getUser();
- List <SysRole> l = user.getRoles();
+ List<SysRole> l = user.getRoles();
int b = 0;
- for(SysRole r : l){
- if(r.getRoleId().longValue() == 3){
+ for (SysRole r : l) {
+ if (r.getRoleId().longValue() == 3) {
b = 1;
}
- if(r.getRoleId().longValue() == 13){
+ if (r.getRoleId().longValue() == 13) {
b = 2;
}
}
- if(b == 1){
+ if (b == 1) {
serviceDonatebaseinfo.setCreateBy(user.getUserName());
}
- if(b == 2){
+ if (b == 2) {
serviceDonatebaseinfo.setDeptid(user.getDeptId());
}
return serviceDonatebaseinfoMapper.selectServiceDonatebaseinfoList(serviceDonatebaseinfo);
@@ -193,14 +192,14 @@
@Override
public List<ServiceDonatebaseinfo> listForSearch(ServiceDonatebaseinfo serviceDonatebaseinfo) {
SysUser user = SecurityUtils.getLoginUser().getUser();
- List <SysRole> l = user.getRoles();
+ List<SysRole> l = user.getRoles();
Boolean b = false;
- for(SysRole r : l){
- if(r.getRoleId().longValue() == 3){
+ for (SysRole r : l) {
+ if (r.getRoleId().longValue() == 3) {
b = true;
}
}
- if(b){
+ if (b) {
serviceDonatebaseinfo.setCreateBy(user.getUserName());
}
--
Gitblit v1.9.3