From da62ea09a74d21858fdee09798157e7f32a292b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=83=9C=E8=B6=85?= <504565038@qq.com> Date: Thu, 15 May 2025 09:29:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E5=BA=A6=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/IProgressNewMapper.java | 3 +++ .../impl/IProductionPlanServiceImpl.java | 23 +++++++------------ .../resources/mappers/IProgressNewMapper.xml | 3 +++ 3 files changed, 14 insertions(+), 15 deletions(-) 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 +