结算月结明细编组功能
This commit is contained in:
parent
ab5b90b85d
commit
d1aa5f26e6
|
|
@ -28,10 +28,8 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
import java.util.stream.Collectors;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author c liu
|
* @author c liu
|
||||||
|
|
@ -437,8 +435,12 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
||||||
List<SltAgreementInfo> monthCosts = calMonthlyMapper.getMonthCosts(agreementInfo);
|
List<SltAgreementInfo> monthCosts = calMonthlyMapper.getMonthCosts(agreementInfo);
|
||||||
int num = 0;
|
int num = 0;
|
||||||
for (SltAgreementInfo monthCost : monthCosts) {
|
for (SltAgreementInfo monthCost : monthCosts) {
|
||||||
|
List<SltAgreementInfo> monthDetails = new ArrayList<>();
|
||||||
monthCost.setCodeNum(num++);
|
monthCost.setCodeNum(num++);
|
||||||
List<SltAgreementInfo> monthDetails = calMonthlyMapper.getMonthDetails(monthCost);
|
for (String id : monthCost.getIds().split(",")) {
|
||||||
|
monthCost.setId(Long.parseLong(id));
|
||||||
|
monthDetails.addAll(calMonthlyMapper.getMonthDetails(monthCost));
|
||||||
|
}
|
||||||
monthCost.setNode(monthDetails);
|
monthCost.setNode(monthDetails);
|
||||||
}
|
}
|
||||||
return monthCosts;
|
return monthCosts;
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getMonthCosts" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
<select id="getMonthCosts" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
||||||
SELECT
|
SELECT
|
||||||
pmc.id as id,
|
GROUP_CONCAT(pmc.id) as ids,
|
||||||
bui.unit_name AS unitName,
|
bui.unit_name AS unitName,
|
||||||
bp.lot_name AS projectName,
|
bp.lot_name AS projectName,
|
||||||
spm.month as month,
|
spm.month as month,
|
||||||
pmc.agreement_id as agreementId,
|
pmc.agreement_id as agreementId,
|
||||||
pmc.cost_bearing_party as costBearingParty,
|
pmc.cost_bearing_party as costBearingParty,
|
||||||
pmc.costs as costs
|
SUM(pmc.costs) as costs
|
||||||
FROM
|
FROM
|
||||||
project_month_costs pmc
|
project_month_costs pmc
|
||||||
LEFT JOIN slt_project_month spm ON pmc.task_id = spm.id
|
LEFT JOIN slt_project_month spm ON pmc.task_id = spm.id
|
||||||
|
|
@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="costBearingParty != null and costBearingParty != ''">
|
<if test="costBearingParty != null and costBearingParty != ''">
|
||||||
and pmc.cost_bearing_party = #{costBearingParty}
|
and pmc.cost_bearing_party = #{costBearingParty}
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY spm.month,pmc.cost_bearing_party
|
||||||
</select>
|
</select>
|
||||||
<select id="getMonthDetails" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
<select id="getMonthDetails" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue