diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ContractorMonthlyApprove.java b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ContractorMonthlyApprove.java index ef69b5d23..9880bcea4 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ContractorMonthlyApprove.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ContractorMonthlyApprove.java @@ -92,26 +92,36 @@ public class ContractorMonthlyApprove implements Serializable { private java.util.Date updateDate ; /**年份*/ @ApiModelProperty(value="年份") - private java.lang.Integer year ; - /**月份*/ - @ApiModelProperty(value="月份") - private java.lang.Integer month ; - /**1是第一周类推*/ - @ApiModelProperty(value="1是第一周类推") - private java.lang.Integer whichWeek ; - /**1月报周报;2三周(月)滚动计划**/ - @ApiModelProperty(value="1月报周报;2三周(月)滚动计划") - private java.lang.Integer menuType ; - + private java.lang.Integer year; + /** + * 月份 + */ + @ApiModelProperty(value = "月份") + private java.lang.Integer month; + /** + * 1是第一周类推 + */ + @ApiModelProperty(value = "1是第一周类推") + private java.lang.Integer whichWeek; + /** + * 1月报周报;2三周(月)滚动计划 + **/ + @ApiModelProperty(value = "1月报周报;2三周(月)滚动计划") + private java.lang.Integer menuType; + /** + * 周报月报附件 + **/ + @ApiModelProperty(value = "周报月报附件") + private java.lang.String weekToMonthFileList; @TableField(exist = false) - @ApiModelProperty(value="发起人名称") - private java.lang.String initiatorName ; + @ApiModelProperty(value = "发起人名称") + private java.lang.String initiatorName; @TableField(exist = false) - @ApiModelProperty(value="审批人1名称") - private java.lang.String approver1Name ; + @ApiModelProperty(value = "审批人1名称") + private java.lang.String approver1Name; @TableField(exist = false) - @ApiModelProperty(value="审批人2名称") - private java.lang.String approver2Name ; + @ApiModelProperty(value = "审批人2名称") + private java.lang.String approver2Name; @TableField(exist = false) @ApiModelProperty(value="项目组名称") private java.lang.String groupName ; diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ContractorMonthlyDetail.java b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ContractorMonthlyDetail.java index 5ce244ac2..87b85156e 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ContractorMonthlyDetail.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/entity/ContractorMonthlyDetail.java @@ -46,14 +46,21 @@ public class ContractorMonthlyDetail implements Serializable { @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value="创建时间 yyyy-MM-dd HH:mm:ss") - private java.util.Date createDate ; - /**更新时间 yyyy-MM-dd HH:mm:ss*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value="更新时间 yyyy-MM-dd HH:mm:ss") - private java.util.Date updateDate ; - @ApiModelProperty(value="审批的装置id") - private java.lang.Long approveDeviceId ; - @ApiModelProperty(value="承包商项自组审批id") - private java.lang.Long approveId ; + private java.util.Date createDate; + /** + * 更新时间 yyyy-MM-dd HH:mm:ss + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss") + private java.util.Date updateDate; + @ApiModelProperty(value = "审批的装置id") + private java.lang.Long approveDeviceId; + @ApiModelProperty(value = "承包商项自组审批id") + private java.lang.Long approveId; + /** + * 周报月报附件 + **/ + @ApiModelProperty(value = "周报月报附件") + private java.lang.String weekToMonthFileList; } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/PouringOrderLedgerMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/PouringOrderLedgerMapper.xml index 4e3a04c05..cff72eea7 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/PouringOrderLedgerMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/PouringOrderLedgerMapper.xml @@ -116,6 +116,9 @@ and t.supply_station = #{supplyStation} + + + ${groupby} diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/WorkerAdmissionMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/WorkerAdmissionMapper.xml index 7842466f6..5fbc08885 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/WorkerAdmissionMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/WorkerAdmissionMapper.xml @@ -92,9 +92,10 @@ #{item} and not exists( - select * from exam_train_record where application_id=t.id and worker_card=wad.id_card and application_type = 1 + select * from exam_train_record where application_id=t.id and worker_id=wad.id and application_type = 1 and submit = 1 ) + and wad.is_certificate_qualified = 1 group by t.id diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java index 04659ca46..7ba16fc24 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java @@ -1,7 +1,6 @@ package com.zhgd.xmgl.modules.baotou.plan.controller; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -13,6 +12,8 @@ import com.zhgd.xmgl.modules.baotou.plan.entity.*; import com.zhgd.xmgl.modules.baotou.plan.entity.vo.PlanRecordCurve; import com.zhgd.xmgl.modules.baotou.plan.mapper.PlanRecordMapper; import com.zhgd.xmgl.modules.baotou.plan.service.*; +import com.zhgd.xmgl.modules.baotou.plan.service.impl.PlanRecordServiceImpl; +import com.zhgd.xmgl.util.MapBuilder; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -27,6 +28,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.math.BigDecimal; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; @@ -198,7 +200,7 @@ public class PlanRecordController { @ApiImplicitParam(name = "year", value = "年份", paramType = "query", required = false, dataType = "String") }) @GetMapping(value = "/getPlanCurve") - public Result>> getPlanCurve(@RequestParam Map param) { + public Result> getPlanCurve(@RequestParam Map param) { String year = MapUtils.getString(param, "year"); if (StrUtil.isNotBlank(year)) { param.put("beginDate", year + "-01" + "-01"); @@ -215,62 +217,24 @@ public class PlanRecordController { Long pbsId = MapUtils.getLong(param, "pbsId"); PlanPbs topPbs = planPbsService.getById(pbsId); List planPbs = planPbsService.getChildren(pbsId); -// planPbs.add(topPbs); -// calByRecursionPbs(topPbs, planPbs); - - PlanPeriod planPeriod = planPeriodService.getOne(new LambdaQueryWrapper().eq(PlanPeriod::getProjectSn, projectSn)); - List pbsIds = planPbs.stream().map(PlanPbs::getId).collect(Collectors.toList()); - pbsIds.add(pbsId); - List> rtList = new ArrayList<>(); - List topRecords = planRecordService.list(new LambdaQueryWrapper() - .in(PlanRecord::getPbsId, pbsIds) - .eq(PlanRecord::getParentId, 0) - ); - Map> dateMap = new HashMap<>(); + planPbs.add(topPbs); List milestones = planMilestoneService.list(new LambdaQueryWrapper().eq(PlanMilestone::getProjectSn, projectSn)); List allPlanRecords = planRecordMapper.selectList(new LambdaQueryWrapper().eq(PlanRecord::getProjectSn, projectSn)); - for (PlanRecord topRecord : topRecords) { - topRecord.setChildren(planRecordService.getPlanRecordChildren(topRecord, allPlanRecords)); - List periods = planRecordService.getPlanSharesForCurve(param, topRecord, milestones, planPeriod, allPlanRecords, planPeriod); - for (PlanFeedbackPeriod period : periods) { - List periodList = dateMap.get(period.getPeriodStart()); - if (periodList == null) { - periodList = new ArrayList<>(); - dateMap.put(period.getPeriodStart(), periodList); - } - periodList.add(period); - } + PlanPeriod period = planPeriodService.getOne(new LambdaQueryWrapper().eq(PlanPeriod::getProjectSn, projectSn)); + Map recordIdMap = planFeedbackService.queryManyNewestFeedbackMap(new MapBuilder() + .put("projectSn", projectSn) + .put("approvalStatus", 3) + .build()); + Map curveMap = this.calByRecursionPbs(topPbs, planPbs, param, period, milestones, allPlanRecords, recordIdMap); + BigDecimal weightValue = topPbs.getWeightValue() != null ? NumberUtil.mul(topPbs.getWeightValue(), new BigDecimal("0.01")) : null; + for (Map.Entry entry : curveMap.entrySet()) { + PlanRecordCurve curve = entry.getValue(); + curve.setPlan(NumberUtil.round(NumberUtil.mul(curve.getPlan(), weightValue), 10)); + curve.setPlanTotal(NumberUtil.round(NumberUtil.mul(curve.getPlanTotal(), weightValue), 10)); + curve.setActual(NumberUtil.round(NumberUtil.mul(curve.getActual(), weightValue), 10)); + curve.setActualTotal(NumberUtil.round(NumberUtil.mul(curve.getActualTotal(), weightValue), 10)); } - List planShares = dateMap.entrySet().stream().map(o -> { - PlanFeedbackPeriod feedbackPeriod = new PlanFeedbackPeriod(); - List list = o.getValue(); - BigDecimal planYdz = BigDecimal.ZERO; - BigDecimal actualYdz = BigDecimal.ZERO; - for (PlanFeedbackPeriod period : list) { - planYdz = NumberUtil.add(planYdz, period.getPlanYdz()); - actualYdz = NumberUtil.add(actualYdz, period.getActualYdz()); - } - feedbackPeriod.setPlanYdz(NumberUtil.div(planYdz, list.size())); - feedbackPeriod.setActualYdz(NumberUtil.div(actualYdz, list.size())); - feedbackPeriod.setPeriodStart(o.getKey()); - return feedbackPeriod; - }).sorted((o1, o2) -> o1.getPeriodStart().compareTo(o2.getPeriodStart())).collect(Collectors.toList()); - if (CollUtil.isNotEmpty(planShares)) { - BigDecimal p = new BigDecimal("0"); - BigDecimal a = new BigDecimal("0"); - for (PlanFeedbackPeriod feedbackPeriod : planShares) { - HashMap map = new HashMap<>(); - map.put("time", DateUtil.formatDate(feedbackPeriod.getPeriodStart())); - map.put("plan", feedbackPeriod.getPlanYdz()); - map.put("actual", feedbackPeriod.getActualYdz()); - p = NumberUtil.add(p, feedbackPeriod.getPlanYdz()); - a = NumberUtil.add(a, feedbackPeriod.getActualYdz()); - map.put("planTotal", p); - map.put("actualTotal", a); - rtList.add(map); - } - } - return Result.success(rtList); + return Result.success(new ArrayList<>(curveMap.values())); } } catch (Exception e) { log.error("", e); @@ -283,19 +247,70 @@ public class PlanRecordController { * * @param topPbs * @param planPbs + * @param param + * @param planPeriod + * @param milestones + * @param allPlanRecords + * @param recordIdMap */ - private Map calByRecursionPbs(PlanPbs topPbs, List planPbs) { + private Map calByRecursionPbs(PlanPbs topPbs, List planPbs, Map param, PlanPeriod planPeriod, List milestones, List allPlanRecords, Map recordIdMap) { List children = planPbs.stream() .filter(m -> Objects.equals(m.getParentId(), topPbs.getId())) .collect(Collectors.toList()); if (CollUtil.isNotEmpty(children)) { + //不是最底级累计计算pbs的权重 + Map totoalMap = new HashMap<>(); for (PlanPbs child : children) { - calByRecursionPbs(child, planPbs); + Map map = calByRecursionPbs(child, planPbs, param, planPeriod, milestones, allPlanRecords, recordIdMap); + for (Map.Entry entry : map.entrySet()) { + PlanRecordCurve curve = totoalMap.get(entry.getKey()); + PlanRecordCurve value = entry.getValue(); + if (curve != null) { + //累计pbs权重 + BigDecimal weightValue = child.getWeightValue() != null ? NumberUtil.mul(child.getWeightValue(), new BigDecimal("0.01")) : null; + curve.setPlan(NumberUtil.add(curve.getPlan(), NumberUtil.mul(value.getPlan(), weightValue))); + curve.setPlanTotal(NumberUtil.add(curve.getPlanTotal(), NumberUtil.mul(value.getPlanTotal(), weightValue))); + curve.setActual(NumberUtil.add(curve.getActual(), NumberUtil.mul(value.getActual(), weightValue))); + curve.setActualTotal(NumberUtil.add(curve.getActualTotal(), NumberUtil.mul(value.getActualTotal(), weightValue))); + value = curve; + } + totoalMap.put(entry.getKey(), value); + } } + return totoalMap; } else { - + //最底级计算计划编制 + Map> dateMap = new HashMap<>(); + List topRecords = allPlanRecords.stream().filter(o -> topPbs.getId().equals(o.getPbsId()) && o.getParentId() == 0L).collect(Collectors.toList()); + for (PlanRecord topRecord : topRecords) { + topRecord.setChildren(PlanRecordServiceImpl.getPlanRecordChildren(topRecord, allPlanRecords)); + List periods = planRecordService.getPlanSharesForCurve(param, topRecord, milestones, planPeriod, allPlanRecords, recordIdMap); + for (PlanFeedbackPeriod period : periods) { + List periodList = dateMap.get(period.getPeriodStart()); + if (periodList == null) { + periodList = new ArrayList<>(); + dateMap.put(period.getPeriodStart(), periodList); + } + periodList.add(period); + } + } + List planShares = dateMap.entrySet().stream().map(o -> { + PlanFeedbackPeriod feedbackPeriod = new PlanFeedbackPeriod(); + List list = o.getValue(); + BigDecimal planYdz = BigDecimal.ZERO; + BigDecimal actualYdz = BigDecimal.ZERO; + for (PlanFeedbackPeriod period : list) { + planYdz = NumberUtil.add(planYdz, period.getPlanYdz()); + actualYdz = NumberUtil.add(actualYdz, period.getActualYdz()); + } + feedbackPeriod.setPlanYdz(NumberUtil.div(planYdz, list.size())); + feedbackPeriod.setActualYdz(NumberUtil.div(actualYdz, list.size())); + feedbackPeriod.setPeriodStart(o.getKey()); + return feedbackPeriod; + }).sorted((o1, o2) -> o1.getPeriodStart().compareTo(o2.getPeriodStart())).collect(Collectors.toList()); + List curves = PlanRecordServiceImpl.buildCurveResult(planShares); + return curves.stream().collect(Collectors.toMap(PlanRecordCurve::getTime, Function.identity(), (o1, o2) -> o1)); } - return null; } @OperLog(operModul = "进度计划编制管理", operType = "", operDesc = "查询项目里程碑") diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/entity/vo/PlanRecordCurve.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/entity/vo/PlanRecordCurve.java index 3f79249be..fbc007e4c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/entity/vo/PlanRecordCurve.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/entity/vo/PlanRecordCurve.java @@ -2,14 +2,16 @@ package com.zhgd.xmgl.modules.baotou.plan.entity.vo; import lombok.Data; +import java.math.BigDecimal; + /** * 计划编制的曲线 */ @Data public class PlanRecordCurve { private String time; - private String plan; - private String actual; - private String planTotal; - private String actualTotal; + private BigDecimal plan; + private BigDecimal actual; + private BigDecimal planTotal; + private BigDecimal actualTotal; } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanRecordService.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanRecordService.java index 118d79916..28a187aed 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanRecordService.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/IPlanRecordService.java @@ -2,10 +2,8 @@ package com.zhgd.xmgl.modules.baotou.plan.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; -import com.zhgd.xmgl.modules.baotou.plan.entity.PlanFeedbackPeriod; -import com.zhgd.xmgl.modules.baotou.plan.entity.PlanMilestone; -import com.zhgd.xmgl.modules.baotou.plan.entity.PlanPeriod; -import com.zhgd.xmgl.modules.baotou.plan.entity.PlanRecord; +import com.zhgd.xmgl.modules.baotou.plan.entity.*; +import com.zhgd.xmgl.modules.baotou.plan.entity.vo.PlanRecordCurve; import java.util.HashMap; import java.util.List; @@ -74,19 +72,11 @@ public interface IPlanRecordService extends IService { List getPlanShares(Map param); - List getPlanSharesForCurve(Map param, PlanRecord record, List milestones, PlanPeriod planPeriod, List planRecords, PlanPeriod period); + List getPlanSharesForCurve(Map param, PlanRecord record, List milestones, PlanPeriod planPeriod, List planRecords, Map recordIdMap); - List> getPlanCurve(Map param); + List getPlanCurve(Map param); HashMap getProjectMilestone(HashMap param); - /** - * 获取children的计划编制 - * - * @param topRecord - * @param allPlanRecords - * @return - */ - List getPlanRecordChildren(PlanRecord topRecord, List allPlanRecords); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java index 1baffe60b..3befeb9a8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java @@ -19,6 +19,7 @@ import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.constant.Cts; import com.zhgd.xmgl.modules.baotou.plan.entity.*; +import com.zhgd.xmgl.modules.baotou.plan.entity.vo.PlanRecordCurve; import com.zhgd.xmgl.modules.baotou.plan.mapper.PlanRecordMapper; import com.zhgd.xmgl.modules.baotou.plan.service.*; import com.zhgd.xmgl.util.ListUtils; @@ -81,6 +82,32 @@ public class PlanRecordServiceImpl extends ServiceImpl buildCurveResult(List planShares) { + List rtList = new ArrayList<>(); + if (CollUtil.isNotEmpty(planShares)) { + BigDecimal p = new BigDecimal("0"); + BigDecimal a = new BigDecimal("0"); + for (PlanFeedbackPeriod feedbackPeriod : planShares) { + PlanRecordCurve curve = new PlanRecordCurve(); + curve.setTime(DateUtil.formatDate(feedbackPeriod.getPeriodStart())); + curve.setPlan(feedbackPeriod.getPlanYdz()); + curve.setActual(feedbackPeriod.getActualYdz()); + p = NumberUtil.add(p, feedbackPeriod.getPlanYdz()); + a = NumberUtil.add(a, feedbackPeriod.getActualYdz()); + curve.setPlanTotal(p); + curve.setActualTotal(a); + rtList.add(curve); + } + } + return rtList; + } + @Override public IPage queryPageList(HashMap param) { QueryWrapper queryWrapper = this.getQueryWrapper(param); @@ -371,14 +398,9 @@ public class PlanRecordServiceImpl extends ServiceImpl getPlanSharesForCurve(Map param, PlanRecord record, List milestones, PlanPeriod planPeriod, List planRecords, PlanPeriod period) { + public List getPlanSharesForCurve(Map param, PlanRecord record, List milestones, PlanPeriod planPeriod, List planRecords, Map recordIdMap) { String beginDate = MapUtils.getString(param, "periodStart"); String endDate = MapUtils.getString(param, "periodEnd"); - String projectSn = MapUtils.getString(param, "projectSn"); - Map recordIdMap = planFeedbackService.queryManyNewestFeedbackMap(new MapBuilder() - .put("projectSn", projectSn) - .put("approvalStatus", 3) - .build()); List fbIds = recordIdMap.values().stream().map(PlanFeedback::getId).collect(Collectors.toList()); List fbPeriods = new ArrayList<>(); List allVals = new ArrayList(); @@ -600,25 +622,9 @@ public class PlanRecordServiceImpl extends ServiceImpl> getPlanCurve(Map param) { - List> rtList = new ArrayList<>(); + public List getPlanCurve(Map param) { List planShares = this.getPlanShares(param); - if (CollUtil.isNotEmpty(planShares)) { - BigDecimal p = new BigDecimal("0"); - BigDecimal a = new BigDecimal("0"); - for (PlanFeedbackPeriod feedbackPeriod : planShares) { - HashMap map = new HashMap<>(); - map.put("time", DateUtil.formatDate(feedbackPeriod.getPeriodStart())); - map.put("plan", feedbackPeriod.getPlanYdz()); - map.put("actual", feedbackPeriod.getActualYdz()); - p = NumberUtil.add(p, feedbackPeriod.getPlanYdz()); - a = NumberUtil.add(a, feedbackPeriod.getActualYdz()); - map.put("planTotal", p); - map.put("actualTotal", a); - rtList.add(map); - } - } - return rtList; + return buildCurveResult(planShares); } @Override @@ -677,8 +683,14 @@ public class PlanRecordServiceImpl extends ServiceImpl getPlanRecordChildren(PlanRecord topRecord, List allPlanRecords) { + /** + * 获取children的计划编制 + * + * @param topRecord + * @param allPlanRecords + * @return + */ + public static List getPlanRecordChildren(PlanRecord topRecord, List allPlanRecords) { return allPlanRecords.stream() .filter(m -> Objects.equals(m.getParentId(), topRecord.getId())) .peek(m -> m.setChildren(getPlanRecordChildren(m, allPlanRecords))) diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ContractorMonthlyApproveServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ContractorMonthlyApproveServiceImpl.java index f88f8b057..e8c426b4b 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ContractorMonthlyApproveServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ContractorMonthlyApproveServiceImpl.java @@ -195,6 +195,12 @@ public class ContractorMonthlyApproveServiceImpl extends ServiceImpl periodMilestones = baseMapper.getCountSupplyStationDetail(param); int pageNo = Integer.parseInt(param.getOrDefault("pageNo", 1).toString()); int pageSize = Integer.parseInt(param.getOrDefault("pageSize", 10).toString()); @@ -191,7 +196,7 @@ public class PouringOrderLedgerServiceImpl extends ServiceImpl records = CollUtil.sub(periodMilestones, i, i + pageSize); + List records = CollUtil.sub(pouringOrderLedgers, i, i + pageSize); List ledgerList = this.queryList(param); Integer levelType = MapUtils.getInteger(param, "levelType"); String year = MapUtils.getString(param, "year"); @@ -263,7 +268,7 @@ public class PouringOrderLedgerServiceImpl extends ServiceImpl p = new Page<>(); - p.setTotal(periodMilestones.size()); + p.setTotal(pouringOrderLedgers.size()); p.setRecords(records); p.setCurrent(pageNo); p.setSize(pageSize);