结算管理功能开发
This commit is contained in:
parent
23e4885815
commit
12921287b6
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.sgzb.material.mapper;
|
package com.bonus.sgzb.material.mapper;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
||||||
import com.bonus.sgzb.material.domain.AgreementInfo;
|
import com.bonus.sgzb.material.domain.AgreementInfo;
|
||||||
import com.bonus.sgzb.material.domain.CalMonthlyBean;
|
import com.bonus.sgzb.material.domain.CalMonthlyBean;
|
||||||
import com.bonus.sgzb.material.domain.ProjectMonthCosts;
|
import com.bonus.sgzb.material.domain.ProjectMonthCosts;
|
||||||
|
|
@ -35,7 +36,7 @@ public interface CalMonthlyMapper {
|
||||||
|
|
||||||
int updateProMonCosts(ProjectMonthCosts pmcId);
|
int updateProMonCosts(ProjectMonthCosts pmcId);
|
||||||
|
|
||||||
List<ProjectMonthCosts> getMonthCosts(AgreementInfo agreementInfo);
|
List<SltAgreementInfo> getMonthCosts(AgreementInfo agreementInfo);
|
||||||
|
|
||||||
List<ProjectMonthDetail> getMonthDetails(ProjectMonthCosts monthCost);
|
List<SltAgreementInfo> getMonthDetails(SltAgreementInfo monthCost);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
||||||
import com.bonus.sgzb.base.api.domain.SltInfoVo;
|
import com.bonus.sgzb.base.api.domain.SltInfoVo;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.material.domain.AgreementInfo;
|
import com.bonus.sgzb.material.domain.AgreementInfo;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -39,7 +40,7 @@ public interface SltAgreementInfoService {
|
||||||
|
|
||||||
int updateTrimDay(List<SltAgreementInfo> sltAgreementInfo);
|
int updateTrimDay(List<SltAgreementInfo> sltAgreementInfo);
|
||||||
|
|
||||||
List<SltAgreementInfo> getSltInfoMonth(List<AgreementInfo> list);
|
List getSltInfoMonth(List<AgreementInfo> list);
|
||||||
|
|
||||||
int updateOutSourceCosts(SltAgreementInfo sltAgreementInfo);
|
int updateOutSourceCosts(SltAgreementInfo sltAgreementInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper;
|
||||||
import com.bonus.sgzb.material.service.SltAgreementInfoService;
|
import com.bonus.sgzb.material.service.SltAgreementInfoService;
|
||||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -406,7 +407,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
||||||
@Override
|
@Override
|
||||||
public List getSltInfoMonth(List<AgreementInfo> list) {
|
public List getSltInfoMonth(List<AgreementInfo> list) {
|
||||||
List<SltAgreementInfo> leaseListMonth = new ArrayList<>();
|
List<SltAgreementInfo> leaseListMonth = new ArrayList<>();
|
||||||
List<ProjectMonthCosts> monthCostsList = new ArrayList<>();
|
|
||||||
Integer num = 0;
|
Integer num = 0;
|
||||||
//租赁费用列表
|
//租赁费用列表
|
||||||
for (AgreementInfo agreementInfo : list) {
|
for (AgreementInfo agreementInfo : list) {
|
||||||
|
|
@ -414,21 +414,19 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
||||||
if (agreementInfo.getStartTime() == null || DateTimeHelper.getNowMonth().equals(DateTimeHelper.getNowMonth(DateTimeHelper.parse(agreementInfo.getEndTime(), "yyyy-MM")))) {
|
if (agreementInfo.getStartTime() == null || DateTimeHelper.getNowMonth().equals(DateTimeHelper.getNowMonth(DateTimeHelper.parse(agreementInfo.getEndTime(), "yyyy-MM")))) {
|
||||||
List<SltAgreementInfo> listMonth = getLeaseListMonth(agreementInfo, num);
|
List<SltAgreementInfo> listMonth = getLeaseListMonth(agreementInfo, num);
|
||||||
leaseListMonth.addAll(listMonth);
|
leaseListMonth.addAll(listMonth);
|
||||||
return leaseListMonth;
|
|
||||||
} else {
|
} else {
|
||||||
// 查定时任务记录的数据
|
// 查定时任务记录的数据
|
||||||
List<ProjectMonthCosts> listMonth = getLeaseJobListMonth(agreementInfo);
|
List<SltAgreementInfo> listMonth = getLeaseJobListMonth(agreementInfo);
|
||||||
monthCostsList.addAll(listMonth);
|
leaseListMonth.addAll(listMonth);
|
||||||
return monthCostsList;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new ArrayList<>();
|
return leaseListMonth;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<ProjectMonthCosts> getLeaseJobListMonth(AgreementInfo agreementInfo) {
|
private List<SltAgreementInfo> getLeaseJobListMonth(AgreementInfo agreementInfo) {
|
||||||
List<ProjectMonthCosts> monthCosts = calMonthlyMapper.getMonthCosts(agreementInfo);
|
List<SltAgreementInfo> monthCosts = calMonthlyMapper.getMonthCosts(agreementInfo);
|
||||||
for (ProjectMonthCosts monthCost : monthCosts) {
|
for (SltAgreementInfo monthCost : monthCosts) {
|
||||||
List<ProjectMonthDetail> monthDetails = calMonthlyMapper.getMonthDetails(monthCost);
|
List<SltAgreementInfo> monthDetails = calMonthlyMapper.getMonthDetails(monthCost);
|
||||||
monthCost.setNode(monthDetails);
|
monthCost.setNode(monthDetails);
|
||||||
}
|
}
|
||||||
return monthCosts;
|
return monthCosts;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select id,month from calc_project_month
|
select id,month from calc_project_month
|
||||||
where month = #{month}
|
where month = #{month}
|
||||||
</select>
|
</select>
|
||||||
<select id="getMonthCosts" resultType="com.bonus.sgzb.material.domain.ProjectMonthCosts">
|
|
||||||
|
<select id="getMonthCosts" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
||||||
SELECT
|
SELECT
|
||||||
pmc.id as id,
|
pmc.id as id,
|
||||||
bui.unit_name AS unitName,
|
bui.unit_name AS unitName,
|
||||||
|
|
@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
spm.month = DATE_FORMAT(#{endTime}, '%Y-%m')
|
spm.month = DATE_FORMAT(#{endTime}, '%Y-%m')
|
||||||
</select>
|
</select>
|
||||||
<select id="getMonthDetails" resultType="com.bonus.sgzb.material.domain.ProjectMonthDetail">
|
<select id="getMonthDetails" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
||||||
SELECT
|
SELECT
|
||||||
mt1.type_name AS typeName,
|
mt1.type_name AS typeName,
|
||||||
mt.type_name AS modelName,
|
mt.type_name AS modelName,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue