Merge branch 'master' into part20240822

This commit is contained in:
sxu 2024-08-26 21:27:11 +08:00
commit 93bde69baa
3 changed files with 11 additions and 8 deletions

View File

@ -28,10 +28,8 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author c liu
@ -437,8 +435,12 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
List<SltAgreementInfo> monthCosts = calMonthlyMapper.getMonthCosts(agreementInfo);
int num = 0;
for (SltAgreementInfo monthCost : monthCosts) {
List<SltAgreementInfo> monthDetails = new ArrayList<>();
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);
}
return monthCosts;

View File

@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="authPerson != null">auth_person,</if>
<if test="phone != null">phone,</if>
<if test="updateBy != null">update_by,</if>
<if test="protocol != null">protocol,</if>
protocol,
update_time,
<if test="remark != null">remark,</if>
<if test="companyId != null">company_id,</if>

View File

@ -28,13 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getMonthCosts" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
SELECT
pmc.id as id,
GROUP_CONCAT(pmc.id) as ids,
bui.unit_name AS unitName,
bp.lot_name AS projectName,
spm.month as month,
pmc.agreement_id as agreementId,
pmc.cost_bearing_party as costBearingParty,
pmc.costs as costs
SUM(pmc.costs) as costs
FROM
project_month_costs pmc
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 != ''">
and pmc.cost_bearing_party = #{costBearingParty}
</if>
GROUP BY spm.month,pmc.cost_bearing_party
</select>
<select id="getMonthDetails" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
SELECT