diff --git a/src/main/java/com/zilber/boot/intelligencesite/mapper/IProgressNewMapper.java b/src/main/java/com/zilber/boot/intelligencesite/mapper/IProgressNewMapper.java index 67ae1ea..7a2e62e 100644 --- a/src/main/java/com/zilber/boot/intelligencesite/mapper/IProgressNewMapper.java +++ b/src/main/java/com/zilber/boot/intelligencesite/mapper/IProgressNewMapper.java @@ -21,4 +21,7 @@ public interface IProgressNewMapper extends BaseMapper { IProgressNew queryByDate(@Param("planId") Long planId, Date processDate); List queryList(IProgress setPlanId); + + List queryProcessSj(@Param("planId") Long planId, @Param("date") String date); + } diff --git a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProductionPlanServiceImpl.java b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProductionPlanServiceImpl.java index 677373e..ee36603 100644 --- a/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProductionPlanServiceImpl.java +++ b/src/main/java/com/zilber/boot/intelligencesite/service/impl/IProductionPlanServiceImpl.java @@ -1,14 +1,7 @@ package com.zilber.boot.intelligencesite.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.zilber.boot.intelligencesite.entity.IManpower; -import com.zilber.boot.intelligencesite.entity.IProductionPlan; -import com.zilber.boot.intelligencesite.entity.IProgress; -import com.zilber.boot.intelligencesite.entity.IWarn; -import com.zilber.boot.intelligencesite.mapper.IManpowerMapper; -import com.zilber.boot.intelligencesite.mapper.IProductionPlanMapper; -import com.zilber.boot.intelligencesite.mapper.IProgressMapper; -import com.zilber.boot.intelligencesite.mapper.IWarnMapper; +import com.zilber.boot.intelligencesite.entity.*; +import com.zilber.boot.intelligencesite.mapper.*; import com.zilber.boot.intelligencesite.service.IIProductionPlanService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zilber.boot.utils.AjaxResult; @@ -18,8 +11,6 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.math.BigDecimal; -import java.text.ParseException; -import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.*; @@ -43,6 +34,8 @@ public class IProductionPlanServiceImpl extends ServiceImpl progresseslist = iProgressMapper.queryProcessSj(iProductionPlan.getId(),recentWeekDates.get(i)); - long total = progresseslist.stream().mapToLong(IProgress::getDayProgress).sum(); + List progresseslist = iProgressNewMapper.queryProcessSj(iProductionPlan.getId(),recentWeekDates.get(i)); + long total = progresseslist.stream().mapToLong(IProgressNew::getDayProgress).sum(); map.put("sj", total); res.add(map); }else{ @@ -85,8 +78,8 @@ public class IProductionPlanServiceImpl extends ServiceImpl progresseslist = iProgressMapper.queryProcessSj(iProductionPlan.getId(),recentWeekDates.get(i)); - long total = progresseslist.stream().mapToLong(IProgress::getDayProgress).sum(); + List progresseslist = iProgressNewMapper.queryProcessSj(iProductionPlan.getId(),recentWeekDates.get(i)); + long total = progresseslist.stream().mapToLong(IProgressNew::getDayProgress).sum(); /* List progresseslist = iProgressMapper.queryList(new IProgress().setPlanId(iProductionPlan.getId())); long total = progresseslist.stream().mapToLong(IProgress::getDayProgress).sum();*/ map.put("sj", total); diff --git a/src/main/resources/mappers/IProgressNewMapper.xml b/src/main/resources/mappers/IProgressNewMapper.xml index 1a21685..700e472 100644 --- a/src/main/resources/mappers/IProgressNewMapper.xml +++ b/src/main/resources/mappers/IProgressNewMapper.xml @@ -34,5 +34,8 @@ id, plan_id, day_progress, accumulative_progress, create_time, creator,process_ order by create_time desc +