结算协议号直接查询
This commit is contained in:
parent
0c0bf6426c
commit
add7904eb9
|
|
@ -1445,9 +1445,6 @@ public class SltAgreementInfoController extends BaseController {
|
||||||
@ApiOperation(value = "未结算报表list查询")
|
@ApiOperation(value = "未结算报表list查询")
|
||||||
@GetMapping("/getSltReportList")
|
@GetMapping("/getSltReportList")
|
||||||
public TableDataInfo getSltReportList(SltAgreementInfo query) {
|
public TableDataInfo getSltReportList(SltAgreementInfo query) {
|
||||||
// ----------- 定义返回集合 ------------
|
|
||||||
List<SltInfoVo> resultList = new ArrayList<>();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// ----------- 查询列表 ---------------
|
// ----------- 查询列表 ---------------
|
||||||
List<SltAgreementInfo> list = sltAgreementInfoService.getSltReportList(query);
|
List<SltAgreementInfo> list = sltAgreementInfoService.getSltReportList(query);
|
||||||
|
|
@ -1457,12 +1454,14 @@ public class SltAgreementInfoController extends BaseController {
|
||||||
// 设置结算权限,控制展示
|
// 设置结算权限,控制展示
|
||||||
list.forEach(info -> info.setSettlementType(settlementType));
|
list.forEach(info -> info.setSettlementType(settlementType));
|
||||||
|
|
||||||
|
// --------- 定义返回集合 ------------------
|
||||||
List<SltInfoVo> dataList = new ArrayList<>();
|
List<SltInfoVo> dataList = new ArrayList<>();
|
||||||
SltInfoVo bean = new SltInfoVo();
|
// --------- 拿到list中所有的agreementId存成集合,给每个info赋值 ------------------
|
||||||
|
List<Long> AgreementIdsArray = list.stream().map(SltAgreementInfo::getAgreementId).collect(Collectors.toList());
|
||||||
|
|
||||||
// 把每个对象的agreementId设置成集合,避免重复查询
|
// 把每个对象的agreementId设置成集合,避免重复查询
|
||||||
list.forEach(info -> {
|
list.forEach(info -> {
|
||||||
info.setAgreementIds(list.stream().map(SltAgreementInfo::getAgreementId).collect(Collectors.toList()));
|
info.setAgreementIds(AgreementIdsArray);
|
||||||
SltInfoVo vo = sltAgreementInfoService.getSltInfoReportBatch(info);
|
SltInfoVo vo = sltAgreementInfoService.getSltInfoReportBatch(info);
|
||||||
if (vo != null && !ObjectUtil.isEmpty(vo)) {
|
if (vo != null && !ObjectUtil.isEmpty(vo)) {
|
||||||
vo.setAgreementId(info.getAgreementId());
|
vo.setAgreementId(info.getAgreementId());
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
|
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
|
||||||
LEFT JOIN slt_agreement_apply saa on saa.agreement_id = bai.agreement_id
|
LEFT JOIN slt_agreement_apply saa on saa.agreement_id = bai.agreement_id
|
||||||
where bai.status = '1' AND bui.type_id != '1731'
|
where bai.status = '1' AND bui.type_id != '1731'
|
||||||
<if test="unitIds != null">
|
<if test="unitIds != null and unitIds.size() > 0">
|
||||||
and bui.unit_id in
|
and bui.unit_id in
|
||||||
<foreach item="item" index="index" collection="unitIds" open="(" separator="," close=")">
|
<foreach item="item" index="index" collection="unitIds" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
|
|
@ -209,6 +209,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="sltStatus != null">
|
<if test="sltStatus != null">
|
||||||
and bai.is_slt = #{sltStatus}
|
and bai.is_slt = #{sltStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="agreementCode != null">
|
||||||
|
and bai.agreement_code like concat('%',#{agreementCode},'%')
|
||||||
|
</if>
|
||||||
GROUP BY bai.agreement_id
|
GROUP BY bai.agreement_id
|
||||||
ORDER BY bai.create_time desc
|
ORDER BY bai.create_time desc
|
||||||
<!-- <choose>-->
|
<!-- <choose>-->
|
||||||
|
|
@ -855,6 +858,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="sltStatus != null">
|
<if test="sltStatus != null">
|
||||||
and bai.is_slt = #{sltStatus}
|
and bai.is_slt = #{sltStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="agreementCode != null and agreementCode != ''">
|
||||||
|
and bai.agreement_code = #{agreementCode}
|
||||||
|
</if>
|
||||||
GROUP BY bai.agreement_id
|
GROUP BY bai.agreement_id
|
||||||
ORDER BY bai.create_time desc
|
ORDER BY bai.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue