|
@@ -1,6 +1,7 @@
|
|
|
package cn.ezhizao.project.business.payment.controller;
|
|
|
|
|
|
import cn.ezhizao.common.exception.ServiceException;
|
|
|
+import cn.ezhizao.common.utils.StringUtils;
|
|
|
import cn.ezhizao.common.utils.poi.ExcelUtil;
|
|
|
import cn.ezhizao.common.utils.uuid.SnowflakeIdWorker;
|
|
|
import cn.ezhizao.framework.aspectj.lang.annotation.Log;
|
|
@@ -28,8 +29,10 @@ import cn.ezhizao.project.business.paymentEntry.domain.BizPaymentSubject;
|
|
|
import cn.ezhizao.project.business.paymentEntry.domain.BizPaymentType;
|
|
|
import cn.ezhizao.project.business.paymentEntry.service.IBizPaymentSubjectService;
|
|
|
import cn.ezhizao.project.business.paymentEntry.service.IBizPaymentTypeService;
|
|
|
+import cn.ezhizao.project.system.domain.SysDictData;
|
|
|
import cn.ezhizao.project.system.domain.SysFileStorage;
|
|
|
import cn.ezhizao.project.system.domain.SysUser;
|
|
|
+import cn.ezhizao.project.system.service.ISysDictDataService;
|
|
|
import cn.ezhizao.project.system.service.ISysFileStorageService;
|
|
|
import cn.ezhizao.project.system.service.ISysUserService;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
@@ -39,6 +42,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
+import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -80,6 +84,8 @@ public class BizPaymentController extends BaseController {
|
|
|
@Resource
|
|
|
IBizCollectionDetailService collectionDetailService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ ISysDictDataService sysDictDataService;
|
|
|
@PreAuthorize("@ss.hasPermi('business:payment:query')")
|
|
|
@GetMapping(value = "/{id}")
|
|
|
@ResponseBody
|
|
@@ -205,7 +211,25 @@ public class BizPaymentController extends BaseController {
|
|
|
setTenantId(condition);
|
|
|
startPage();
|
|
|
List<BizArchiveInputDetail> list = contractDetailService.getList(condition);
|
|
|
-
|
|
|
+ list.forEach(l -> {
|
|
|
+ if(l.getTaskTypeId() == 4){
|
|
|
+ SysDictData sysDictData = sysDictDataService.selectDictDataById(l.getBelongRegion().longValue());
|
|
|
+ l.setExplain( sysDictData.getDictLabel()+":");
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.isEmpty(l.getAddressStyle()) && l.getAddressStyle() == 1 ){
|
|
|
+ if (StringUtils.isNotEmpty(l.getExplain())){
|
|
|
+ l.setExplain(l.getExplain().concat(l.getProvince() + l.getCity() + l.getDistrict()));
|
|
|
+ }else {
|
|
|
+ l.setExplain(l.getProvince() + l.getCity() + l.getDistrict());
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ SysDictData sysDictData = sysDictDataService.selectDictDataById(l.getFictionAddressId());
|
|
|
+ l.setExplain(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(l.getRemark())) {
|
|
|
+ l.setExplain(l.getExplain().concat("," + l.getRemark()));
|
|
|
+ }
|
|
|
+ });
|
|
|
Long contractId = condition.getContractId();
|
|
|
List<BizCollection> collectionList = collectionService.list(new LambdaQueryWrapper<BizCollection>().eq(BizCollection::getContractId, contractId).eq(BizCollection::getStatus, 1).eq(BizCollection::getArriveStatus, 1));
|
|
|
List<Long> idCollectionList = collectionList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
|
@@ -283,6 +307,25 @@ public class BizPaymentController extends BaseController {
|
|
|
BizPaymentDetail detailCondition = new BizPaymentDetail();
|
|
|
detailCondition.setPaymentId(payment.getId());
|
|
|
List<BizPaymentDetail> details = paymentDetailService.getListByBean(detailCondition);
|
|
|
+ details.forEach(l -> {
|
|
|
+ if(l.getTaskTypeId() == 4){
|
|
|
+ SysDictData sysDictData = sysDictDataService.selectDictDataById(l.getBelongRegion().longValue());
|
|
|
+ l.setExplain( sysDictData.getDictLabel()+":");
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.isEmpty(l.getAddressStyle()) && l.getAddressStyle() == 1 ){
|
|
|
+ if (StringUtils.isNotEmpty(l.getExplain())){
|
|
|
+ l.setExplain(l.getExplain().concat(l.getProvince() + l.getCity() + l.getDistrict()));
|
|
|
+ }else {
|
|
|
+ l.setExplain(l.getProvince() + l.getCity() + l.getDistrict());
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ SysDictData sysDictData = sysDictDataService.selectDictDataById(l.getFictionAddressId());
|
|
|
+ l.setExplain(sysDictData.getDictLabel());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(l.getInputRemark())) {
|
|
|
+ l.setExplain(l.getExplain().concat("," + l.getInputRemark()));
|
|
|
+ }
|
|
|
+ });
|
|
|
payment.setDetails(details);
|
|
|
totalAmountPaid(payment, details);
|
|
|
totalAmountReceived(payment, details);
|