领悦 temp

This commit is contained in:
Harryxzy 2024-09-06 09:12:38 +08:00
parent 27f2084c47
commit a4d5c21cde
2 changed files with 23 additions and 1 deletions

View File

@ -24,4 +24,8 @@ public class LyFzhslxParam extends BaseQueryParam {
private String key;
/**
* 辅助核算类型
*/
private Integer fzhslx;
}

View File

@ -256,6 +256,20 @@ public class LyPZServiceImpl extends Service implements LyPZService {
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("columns" , columns);
resultMap.put("data", lyPzPreviewList);
// 求合计值
BigDecimal jfTotal = new BigDecimal("0");
BigDecimal dfTotal = new BigDecimal("0");
for (LyPzPreview pzPreview : lyPzPreviewList) {
if (NumberUtils.isCreatable(pzPreview.getJfValue())) {
jfTotal = jfTotal.add(new BigDecimal(pzPreview.getJfValue()));
}
if (NumberUtils.isCreatable(pzPreview.getDfValue())) {
dfTotal = dfTotal.add(new BigDecimal(pzPreview.getDfValue()));
}
}
LyPzPreview sumPz = LyPzPreview.builder().zy("合计").jfValue(jfTotal.toPlainString()).dfValue(dfTotal.toPlainString()).build();
resultMap.put("totalData", sumPz);
return resultMap;
}
@ -313,7 +327,11 @@ public class LyPZServiceImpl extends Service implements LyPZService {
RecordSet rs = new RecordSet();
BaseBean baseBean = new BaseBean();
String fzhslxFieldId = baseBean.getPropValue("lySalaryNCVoucher", "fzhslx_field_id");
rs.execute("select bh,mc,fzhslx,b.selectname from uf_NCfuhs a left join workflow_selectitem b on a. fzhslx= b.SELECTVALUE where b.FIELDID=" + fzhslxFieldId);
if (queryParam.getFzhslx() == null ) {
rs.execute("select bh,mc,fzhslx,b.selectname from uf_NCfuhs a left join workflow_selectitem b on a. fzhslx= b.SELECTVALUE where b.FIELDID=" + fzhslxFieldId );
} else {
rs.execute("select bh,mc,fzhslx,b.selectname from uf_NCfuhs a left join workflow_selectitem b on a. fzhslx= b.SELECTVALUE where b.FIELDID=" + fzhslxFieldId + "and a.fzhslx = "+ queryParam.getFzhslx());
}
List<Map<String, Object>> resultList = new ArrayList<>();
while (rs.next()) {
if (StringUtils.isNotBlank(queryParam.getKey())