Merge branch 'dev-cq' into dev-cq-rudy20240806
This commit is contained in:
commit
9fbf60d747
|
|
@ -1,5 +1,6 @@
|
|||
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.CalMonthlyBean;
|
||||
import com.bonus.sgzb.material.domain.ProjectMonthCosts;
|
||||
|
|
@ -35,7 +36,7 @@ public interface CalMonthlyMapper {
|
|||
|
||||
int updateProMonCosts(ProjectMonthCosts pmcId);
|
||||
|
||||
List<ProjectMonthCosts> getMonthCosts(AgreementInfo agreementInfo);
|
||||
List<SltAgreementInfo> getMonthCosts(AgreementInfo agreementInfo);
|
||||
|
||||
List<ProjectMonthDetail> getMonthDetails(ProjectMonthCosts monthCost);
|
||||
List<SltAgreementInfo> getMonthDetails(SltAgreementInfo monthCost);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public class Inform {
|
|||
|
||||
private final int CAL_DAY = 6;
|
||||
|
||||
@Scheduled(cron = "0 */1 * * * ? ") // 间隔5分钟执行
|
||||
// @Scheduled(cron = "0 */1 * * * ? ") // 间隔5分钟执行
|
||||
// @Scheduled(cron = "0 0 1 22 * ? ") // 每个月22日凌晨1点执行
|
||||
@Async
|
||||
public void taskCycle() {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
|||
import com.bonus.sgzb.base.api.domain.SltInfoVo;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.material.domain.AgreementInfo;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -39,7 +40,7 @@ public interface SltAgreementInfoService {
|
|||
|
||||
int updateTrimDay(List<SltAgreementInfo> sltAgreementInfo);
|
||||
|
||||
List<SltAgreementInfo> getSltInfoMonth(List<AgreementInfo> list);
|
||||
List getSltInfoMonth(List<AgreementInfo> list);
|
||||
|
||||
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.vo.GlobalContants;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -406,7 +407,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
@Override
|
||||
public List getSltInfoMonth(List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> leaseListMonth = new ArrayList<>();
|
||||
List<ProjectMonthCosts> monthCostsList = new ArrayList<>();
|
||||
Integer num = 0;
|
||||
//租赁费用列表
|
||||
for (AgreementInfo agreementInfo : list) {
|
||||
|
|
@ -414,21 +414,21 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
if (agreementInfo.getStartTime() == null || DateTimeHelper.getNowMonth().equals(DateTimeHelper.getNowMonth(DateTimeHelper.parse(agreementInfo.getEndTime(), "yyyy-MM")))) {
|
||||
List<SltAgreementInfo> listMonth = getLeaseListMonth(agreementInfo, num);
|
||||
leaseListMonth.addAll(listMonth);
|
||||
return leaseListMonth;
|
||||
} else {
|
||||
// 查定时任务记录的数据
|
||||
List<ProjectMonthCosts> listMonth = getLeaseJobListMonth(agreementInfo);
|
||||
monthCostsList.addAll(listMonth);
|
||||
return monthCostsList;
|
||||
List<SltAgreementInfo> listMonth = getLeaseJobListMonth(agreementInfo);
|
||||
leaseListMonth.addAll(listMonth);
|
||||
}
|
||||
}
|
||||
return new ArrayList<>();
|
||||
return leaseListMonth;
|
||||
}
|
||||
|
||||
private List<ProjectMonthCosts> getLeaseJobListMonth(AgreementInfo agreementInfo) {
|
||||
List<ProjectMonthCosts> monthCosts = calMonthlyMapper.getMonthCosts(agreementInfo);
|
||||
for (ProjectMonthCosts monthCost : monthCosts) {
|
||||
List<ProjectMonthDetail> monthDetails = calMonthlyMapper.getMonthDetails(monthCost);
|
||||
private List<SltAgreementInfo> getLeaseJobListMonth(AgreementInfo agreementInfo) {
|
||||
List<SltAgreementInfo> monthCosts = calMonthlyMapper.getMonthCosts(agreementInfo);
|
||||
int num = 0;
|
||||
for (SltAgreementInfo monthCost : monthCosts) {
|
||||
monthCost.setCodeNum(num++);
|
||||
List<SltAgreementInfo> monthDetails = calMonthlyMapper.getMonthDetails(monthCost);
|
||||
monthCost.setNode(monthDetails);
|
||||
}
|
||||
return monthCosts;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select id,month from calc_project_month
|
||||
where month = #{month}
|
||||
</select>
|
||||
<select id="getMonthCosts" resultType="com.bonus.sgzb.material.domain.ProjectMonthCosts">
|
||||
|
||||
<select id="getMonthCosts" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
||||
SELECT
|
||||
pmc.id as id,
|
||||
bui.unit_name AS unitName,
|
||||
|
|
@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
spm.month = DATE_FORMAT(#{endTime}, '%Y-%m')
|
||||
</select>
|
||||
<select id="getMonthDetails" resultType="com.bonus.sgzb.material.domain.ProjectMonthDetail">
|
||||
<select id="getMonthDetails" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
||||
SELECT
|
||||
mt1.type_name AS typeName,
|
||||
mt.type_name AS modelName,
|
||||
|
|
|
|||
Loading…
Reference in New Issue