|
|
|
@ -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<IProductionPlanMappe |
|
|
|
|
private IManpowerMapper iManpowerMapper; |
|
|
|
|
@Resource |
|
|
|
|
private IWarnMapper iWarnMapper; |
|
|
|
|
@Resource |
|
|
|
|
private IProgressNewMapper iProgressNewMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -66,8 +59,8 @@ public class IProductionPlanServiceImpl extends ServiceImpl<IProductionPlanMappe |
|
|
|
|
|
|
|
|
|
map.put("plan", daypercent); |
|
|
|
|
map.put("date", recentWeekDates.get(i)); |
|
|
|
|
List<IProgress> progresseslist = iProgressMapper.queryProcessSj(iProductionPlan.getId(),recentWeekDates.get(i)); |
|
|
|
|
long total = progresseslist.stream().mapToLong(IProgress::getDayProgress).sum(); |
|
|
|
|
List<IProgressNew> 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<IProductionPlanMappe |
|
|
|
|
map.put("plan", currentpercent); |
|
|
|
|
map.put("date", recentWeekDates.get(i)); |
|
|
|
|
//查询计划实际填报情况
|
|
|
|
|
List<IProgress> progresseslist = iProgressMapper.queryProcessSj(iProductionPlan.getId(),recentWeekDates.get(i)); |
|
|
|
|
long total = progresseslist.stream().mapToLong(IProgress::getDayProgress).sum(); |
|
|
|
|
List<IProgressNew> progresseslist = iProgressNewMapper.queryProcessSj(iProductionPlan.getId(),recentWeekDates.get(i)); |
|
|
|
|
long total = progresseslist.stream().mapToLong(IProgressNew::getDayProgress).sum(); |
|
|
|
|
/* List<IProgress> progresseslist = iProgressMapper.queryList(new IProgress().setPlanId(iProductionPlan.getId())); |
|
|
|
|
long total = progresseslist.stream().mapToLong(IProgress::getDayProgress).sum();*/ |
|
|
|
|
map.put("sj", total); |
|
|
|
|