update 工作组成员导出增加实收金额

fix 工作组成员导出和查询不一致
This commit is contained in:
lijiarao
2023-08-16 10:19:10 +08:00
parent a19a7bb4f3
commit 647bfa0ca5
3 changed files with 32 additions and 14 deletions
@@ -571,7 +571,9 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
@RequiresPermissions("workingGroupMember:export")
@GetMapping(value = "/exportXls")
@ApiOperation(value = "工作组成员-导出excel", notes = "工作组成员-导出excel")
public ModelAndView exportXls(HttpServletRequest request, PayWorkingGroupSubItem payWorkingGroupSubItem) {
public ModelAndView exportXls(HttpServletRequest request,
PayWorkingGroupSubItem payWorkingGroupSubItem,
@RequestParam(name = "paymentDate", required = false) String paymentDate) {
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupSubItem.getWorkingGroupId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
@@ -583,10 +585,12 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
throw new JeroBootException("数据权限不足!");
}
// Step.1 组装查询条件
QueryWrapper<PayWorkingGroupSubItem> queryWrapper = QueryGenerator.initQueryWrapper(payWorkingGroupSubItem, request.getParameterMap());
//QueryWrapper<PayWorkingGroupSubItem> queryWrapper = QueryGenerator.initQueryWrapper(payWorkingGroupSubItem, request.getParameterMap());
// Step.2 获取导出数据
List<PayWorkingGroupSubItem> pageList = payWorkingGroupSubItemService.list(queryWrapper);
Page<PayWorkingGroupSubItem> page = new Page<>(-1, -1);
IPage<PayWorkingGroupSubItem> payWorkingGroupSubItemIPage = payWorkingGroupSubItemService.queryPageList(page, payWorkingGroupSubItem, paymentDate);
List<PayWorkingGroupSubItem> pageList = payWorkingGroupSubItemIPage.getRecords();
List<PayWorkingGroupSubItem> exportList;
// 过滤选中数据
@@ -604,6 +608,12 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
queryPayWorkingGroupSubItemContacts.in(PayWorkingGroupSubItemContacts::getWorkingGroupSubId,listWGSIds);
List<PayWorkingGroupSubItemContacts> payWorkingGroupSubItemContactsList = payWorkingGroupSubItemContactsService.list(queryPayWorkingGroupSubItemContacts);
for (PayWorkingGroupSubItem workingGroupSubItem : exportList) {
if(Objects.isNull(workingGroupSubItem.getReceivableAmount())){
workingGroupSubItem.setReceivableAmount(new BigDecimal("0.00"));
}
if(Objects.isNull(workingGroupSubItem.getPaidAmount())){
workingGroupSubItem.setPaidAmount(new BigDecimal("0.00"));
}
PayWorkingGroupSubItemExcel excel = new PayWorkingGroupSubItemExcel();
BeanUtils.copyProperties(workingGroupSubItem,excel);
List<PayWorkingGroupSubItemContacts> listPayWorkingGroupSubItemContacts = payWorkingGroupSubItemContactsList.stream().filter(o->Objects.equals(workingGroupSubItem.getId(),o.getWorkingGroupSubId())).collect(Collectors.toList());
@@ -2436,6 +2436,7 @@
paidNoTaxAmount AS comeAllMoney,
invoiceNoTaxAmount AS billMoney,
confirmNoTaxAmount AS confirmAmount,
pmb.bill_date,
year
FROM v_statistical_all v
left join pay_mail_bill_project pmbp on v.projectId = pmbp.project_id
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import javax.validation.constraints.DecimalMax;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -40,10 +41,16 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 待确收金额(元)
*/
@Excel(name = "待确收金额(元)", width = 15)
@Excel(name = "待确收金额(元)", width = 16)
@ApiModelProperty(value = "待确收金额(元)")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal receivableAmount;
/**实收金额(元)*/
@Excel(name = "实收金额(元)", width = 15)
@ApiModelProperty(value = "实收金额(元)")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal paidAmount;
/**
* 合同编号
*/
@@ -78,7 +85,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人1手机号
*/
@Excel(name = "企业联系人1手机号", width = 15)
@Excel(name = "企业联系人1手机号", width = 17)
private String contactsPhoneOne;
/**
@@ -102,7 +109,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人2手机号
*/
@Excel(name = "企业联系人2手机号", width = 15)
@Excel(name = "企业联系人2手机号", width = 17)
private String contactsPhoneTwo;
/**
* 企业联系人2邮箱
@@ -124,7 +131,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人3手机号
*/
@Excel(name = "企业联系人3手机号", width = 15)
@Excel(name = "企业联系人3手机号", width = 17)
private String contactsPhoneThree;
/**
* 企业联系人3邮箱
@@ -146,7 +153,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人4手机号
*/
@Excel(name = "企业联系人4手机号", width = 15)
@Excel(name = "企业联系人4手机号", width = 17)
private String contactsPhoneFour;
/**
* 企业联系人4邮箱
@@ -168,7 +175,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人5手机号
*/
@Excel(name = "企业联系人5手机号", width = 15)
@Excel(name = "企业联系人5手机号", width = 17)
private String contactsPhoneFive;
/**
* 企业联系人5邮箱
@@ -190,7 +197,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人6手机号
*/
@Excel(name = "企业联系人6手机号", width = 15)
@Excel(name = "企业联系人6手机号", width = 17)
private String contactsPhoneSix;
/**
* 企业联系人6邮箱
@@ -212,7 +219,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人7手机号
*/
@Excel(name = "企业联系人7手机号", width = 15)
@Excel(name = "企业联系人7手机号", width = 17)
private String contactsPhoneSeven;
/**
* 企业联系人7邮箱
@@ -234,7 +241,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人8手机号
*/
@Excel(name = "企业联系人8手机号", width = 15)
@Excel(name = "企业联系人8手机号", width = 17)
private String contactsPhoneEight;
/**
* 企业联系人8邮箱
@@ -256,7 +263,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人9手机号
*/
@Excel(name = "企业联系人9手机号", width = 15)
@Excel(name = "企业联系人9手机号", width = 17)
private String contactsPhoneNine;
/**
* 企业联系人9邮箱
@@ -278,7 +285,7 @@ public class PayWorkingGroupSubItemExcel implements Serializable {
/**
* 企业联系人10手机号
*/
@Excel(name = "企业联系人10手机号", width = 15)
@Excel(name = "企业联系人10手机号", width = 17)
private String contactsPhoneTen;
/**
* 企业联系人10邮箱