|
|
@ -6,17 +6,19 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
import com.dsic.gj_erp.bean.ResultBean;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.*;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.DmCzplpNew;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.EmGcrl;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.EmSbcnp;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.excel.PlExcel;
|
|
|
|
import com.dsic.gj_erp.bean.jcsj.excel.PlExcel;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.*;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.*;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.dto.*;
|
|
|
|
import com.dsic.gj_erp.bean.jhgk.dto.*;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.bean.sy.Dm_zhbmp;
|
|
|
|
|
|
|
|
import com.dsic.gj_erp.dao.sy.Dm_zhbmpRepository;
|
|
|
|
import com.dsic.gj_erp.handler.ComputePlan;
|
|
|
|
import com.dsic.gj_erp.handler.ComputePlan;
|
|
|
|
import com.dsic.gj_erp.handler.dto.RealCapacity;
|
|
|
|
import com.dsic.gj_erp.handler.dto.RealCapacity;
|
|
|
|
import com.dsic.gj_erp.mapper.jcsj.DmBomMapper;
|
|
|
|
import com.dsic.gj_erp.mapper.jcsj.DmBomMapper;
|
|
|
@ -31,6 +33,7 @@ import com.dsic.gj_erp.service.jhgk.DmTzjhService;
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmXbjhService;
|
|
|
|
import com.dsic.gj_erp.service.jhgk.DmXbjhService;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
@ -66,7 +69,115 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
private DmSygdMxLjServiceImpl ljService;
|
|
|
|
private DmSygdMxLjServiceImpl ljService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private EmSbcnpService sbcnpService;
|
|
|
|
private EmSbcnpService sbcnpService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
Dm_zhbmpRepository dm_zhbmpRepository;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String,List<EmGcrlDto>> getMxMap(String begin,String end){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<EmGcrlDto> list=baseMapper.getMxMap(begin,end);
|
|
|
|
|
|
|
|
//1.页面 arr=[日期+工序+设备,...]
|
|
|
|
|
|
|
|
//2.后端1 日期范围查询 所有加工内容 按日期+工序+设备 分组
|
|
|
|
|
|
|
|
//上料
|
|
|
|
|
|
|
|
Map<String,List<EmGcrlDto>> mx= list.stream().collect(Collectors.groupingBy(l->l.getSlrq()+l.getSlgxbm()+l.getSlsb()));
|
|
|
|
|
|
|
|
//抛丸
|
|
|
|
|
|
|
|
Map<String,List<EmGcrlDto>> mxPwMap= list.stream().collect(Collectors.groupingBy(l->l.getPwrq()+l.getPwgxbm()+l.getPwsb()));
|
|
|
|
|
|
|
|
//划线
|
|
|
|
|
|
|
|
Map<String,List<EmGcrlDto>> mxHxMap= list.stream().collect(Collectors.groupingBy(l->l.getHxrq()+l.getHxgxbm()+l.getHxsb()));
|
|
|
|
|
|
|
|
//切割
|
|
|
|
|
|
|
|
Map<String,List<EmGcrlDto>> mxQgMap= list.stream().collect(Collectors.groupingBy(l->l.getQgrq()+l.getQggxbm()+l.getQgsb()));
|
|
|
|
|
|
|
|
//坡口
|
|
|
|
|
|
|
|
Map<String,List<EmGcrlDto>> mxPkMap= list.stream().collect(Collectors.groupingBy(l->l.getPkrq()+l.getPkgxbm()+l.getPksb()));
|
|
|
|
|
|
|
|
//打磨
|
|
|
|
|
|
|
|
Map<String,List<EmGcrlDto>> mxDmMap= list.stream().collect(Collectors.groupingBy(l->l.getDmrq()+l.getDmgxbm()+l.getDmsb()));
|
|
|
|
|
|
|
|
//曲
|
|
|
|
|
|
|
|
Map<String,List<EmGcrlDto>> mxQMap= list.stream().collect(Collectors.groupingBy(l->l.getQjgrq()+l.getQjggxbm()+l.getQsb()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mx.putAll(mxPwMap);
|
|
|
|
|
|
|
|
mx.putAll(mxHxMap);
|
|
|
|
|
|
|
|
mx.putAll(mxQgMap);
|
|
|
|
|
|
|
|
mx.putAll(mxPkMap);
|
|
|
|
|
|
|
|
mx.putAll(mxDmMap);
|
|
|
|
|
|
|
|
mx.putAll(mxQMap);
|
|
|
|
|
|
|
|
//循环第二布查询结果 取bom
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//3.后端 日期范围查询所有的需求
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//4.页面 按照后端1提取list 循环匹配 需求 (同时包含bom)
|
|
|
|
|
|
|
|
//把第4步的结果赋值到table
|
|
|
|
|
|
|
|
return mx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<Kwdto> getGcrlList(List<DmSygdMx> list,String begin,String end) {
|
|
|
|
|
|
|
|
// 1.根据list汇总
|
|
|
|
|
|
|
|
Map<String,List<EmGcrlDto>> listMap= getMxMap(begin,end);
|
|
|
|
|
|
|
|
//三月滚动明细 船号 批量 分段 图纸编号 工序 工序加工日期
|
|
|
|
|
|
|
|
//工厂日历 -> 工序+设备 ->三月滚动明细 - 分段钢料滚动需求
|
|
|
|
|
|
|
|
//工序
|
|
|
|
|
|
|
|
ComputePlan c=ComputePlan.instance();
|
|
|
|
|
|
|
|
c.computeRealCapacity(DateUtil.parse(begin,"yyyy/MM/dd"), DateUtil.parse(end,"yyyy/MM/dd"));
|
|
|
|
|
|
|
|
JSONObject realDeviceList=c.getRealDeviceList();
|
|
|
|
|
|
|
|
List<EmGcrl> gcrlList=c.getGcrlList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Dm_zhbmp> pcgx = dm_zhbmpRepository.findByBMLB("PCGX");
|
|
|
|
|
|
|
|
gcrlList.forEach(gcrl->{
|
|
|
|
|
|
|
|
String jgrq=gcrl.getGl();
|
|
|
|
|
|
|
|
Map<String,List<EmSbjbb>> map=new HashMap<>();
|
|
|
|
|
|
|
|
//日期+设备list(工序)
|
|
|
|
|
|
|
|
if (realDeviceList.size()>1 && ObjectUtil.isNotEmpty(realDeviceList.getJSONArray(gcrl.getGl()))) {
|
|
|
|
|
|
|
|
//根据工序分组
|
|
|
|
|
|
|
|
JSONArray data =realDeviceList.getJSONArray(gcrl.getGl());
|
|
|
|
|
|
|
|
String js = JSONObject.toJSONString(data, SerializerFeature.WriteClassName);
|
|
|
|
|
|
|
|
List<EmSbjbb> list1=JSONObject.parseArray(js, EmSbjbb.class);
|
|
|
|
|
|
|
|
map=list1.stream().collect(Collectors.groupingBy(EmSbjbb::getGx));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//1.页面 arr=[日期+工序+设备,...]
|
|
|
|
|
|
|
|
//2.后端1 日期范围查询所有加工内容 按日期+工序+设备
|
|
|
|
|
|
|
|
//循环第二布查询结果 取bom
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//3.后端 日期范围查询所有的需求
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//4.页面 按照后端1提取list 循环匹配 需求 (同时包含bom)
|
|
|
|
|
|
|
|
//把第4步的结果赋值到table
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//日期 工序
|
|
|
|
|
|
|
|
for (Dm_zhbmp dmZhbmp : pcgx) {
|
|
|
|
|
|
|
|
String gx=dmZhbmp.getBM();
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(map)
|
|
|
|
|
|
|
|
&&ObjectUtil.isNotEmpty(map.get(gx))
|
|
|
|
|
|
|
|
&&map.get(gx).size()>0){
|
|
|
|
|
|
|
|
List<EmSbjbb> sbList= map.get(gx);
|
|
|
|
|
|
|
|
for (EmSbjbb emSbjbb : sbList) {
|
|
|
|
|
|
|
|
String sbbh=emSbjbb.getSbbh();
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(listMap.get(jgrq+gx+sbbh))&&listMap.get(jgrq+gx+sbbh).size()>0){
|
|
|
|
|
|
|
|
List<EmGcrlDto> l= listMap.get(jgrq+gx+sbbh);
|
|
|
|
|
|
|
|
l.stream().collect(Collectors.groupingBy(dto->dto.getDcCh()+dto.getDcPl()+dto.getDcFd()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EmGcrlDto getFdglxqs(String gx,DmSygdMx mx,EmGcrl gcrl,EmSbjbb emSbjbb){
|
|
|
|
|
|
|
|
List<DmSygdxq> dmSygdxqs= baseMapper.getGlgdxq(mx);
|
|
|
|
|
|
|
|
// 新增一个对象
|
|
|
|
|
|
|
|
EmGcrlDto dto=new EmGcrlDto();
|
|
|
|
|
|
|
|
for (DmSygdxq dmSygdxq : dmSygdxqs) {
|
|
|
|
|
|
|
|
dto=BeanUtil.copyProperties(dmSygdxq,EmGcrlDto.class);
|
|
|
|
|
|
|
|
dto.setGl(gcrl.getGl());
|
|
|
|
|
|
|
|
dto.setBbgs(gcrl.getBbgs());
|
|
|
|
|
|
|
|
dto.setYbgs(gcrl.getYbgs());
|
|
|
|
|
|
|
|
dto.setGx(gx);
|
|
|
|
|
|
|
|
dto.setSbbh(emSbjbb.getSbbh());
|
|
|
|
|
|
|
|
dto.setSbmc(emSbjbb.getSbmc());
|
|
|
|
|
|
|
|
dto.setDegsYb(emSbjbb.getDegsYb());
|
|
|
|
|
|
|
|
dto.setDegs(emSbjbb.getDegs());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// dto.setBomList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return dto;
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 采购计划到货情况
|
|
|
|
* 采购计划到货情况
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -110,6 +221,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
//todo 排产
|
|
|
|
//todo 排产
|
|
|
|
ypc(mxList);
|
|
|
|
ypc(mxList);
|
|
|
|
this.saveBatch(mxList);
|
|
|
|
this.saveBatch(mxList);
|
|
|
|
|
|
|
|
|
|
|
|
baseMapper.setParent(begin, end);
|
|
|
|
baseMapper.setParent(begin, end);
|
|
|
|
|
|
|
|
|
|
|
|
List<DmYdjhxf> list= tqSygd1(begin,end);
|
|
|
|
List<DmYdjhxf> list= tqSygd1(begin,end);
|
|
|
@ -122,15 +234,15 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 预排产,根据套料图号及跨位
|
|
|
|
* 预排产,根据套料图号及跨位
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param list
|
|
|
|
* @param list 三月滚动明细
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void ypc(List<DmSygdMx> list) {
|
|
|
|
public void ypc(List<DmSygdMx> list) {
|
|
|
|
// Map<String, List<DmSygdMx>> mxMap = list.stream().filter(l->StrUtil.isNotEmpty(l.getTzbh())).collect(Collectors.groupingBy(l -> l.getKw() + l.getZl()));
|
|
|
|
//可用设备/产能 根据日期、跨位+工序 分组
|
|
|
|
ComputePlan c=ComputePlan.instance();
|
|
|
|
ComputePlan c=ComputePlan.instance();
|
|
|
|
c.computeRealCapacity(DateUtil.beginOfMonth(DateUtil.date()), DateUtil.endOfMonth(DateUtil.date()));
|
|
|
|
c.computeRealCapacity(DateUtil.beginOfMonth(DateUtil.date()), DateUtil.endOfMonth(DateUtil.date()));
|
|
|
|
Map<String,Map<String,List<RealCapacity>>> rel=c.getRealCapacityMap();
|
|
|
|
Map<String,Map<String,List<RealCapacity>>> rel=c.getRealCapacityMap();
|
|
|
|
|
|
|
|
|
|
|
|
//加工工序list
|
|
|
|
//产能
|
|
|
|
List<EmSbcnp> sbcnp =c.getSbcnList();
|
|
|
|
List<EmSbcnp> sbcnp =c.getSbcnList();
|
|
|
|
Map<String, List<EmSbcnp>> cnMap = sbcnp.stream().collect(Collectors.groupingBy(l -> l.getTzbh() + l.getZl()));
|
|
|
|
Map<String, List<EmSbcnp>> cnMap = sbcnp.stream().collect(Collectors.groupingBy(l -> l.getTzbh() + l.getZl()));
|
|
|
|
|
|
|
|
|
|
|
@ -151,7 +263,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void jggx( Map<String,Map<String,List<RealCapacity>>> rel,DmSygdMx l,List<EmSbcnp> list){
|
|
|
|
public void jggx( Map<String,Map<String,List<RealCapacity>>> rel,DmSygdMx l,List<EmSbcnp> list){
|
|
|
|
String date="";
|
|
|
|
String date="";
|
|
|
|
Map<String,String> map=new TreeMap<>();
|
|
|
|
Map<String,String> map;
|
|
|
|
for (EmSbcnp cn : list) {
|
|
|
|
for (EmSbcnp cn : list) {
|
|
|
|
//上料
|
|
|
|
//上料
|
|
|
|
if (cn.getGx().equals("19")) {
|
|
|
|
if (cn.getGx().equals("19")) {
|
|
|
@ -159,6 +271,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
date=map.get("jgsj");
|
|
|
|
date=map.get("jgsj");
|
|
|
|
l.setSlrq(date);
|
|
|
|
l.setSlrq(date);
|
|
|
|
l.setSlsb(map.get("sbbh"));
|
|
|
|
l.setSlsb(map.get("sbbh"));
|
|
|
|
|
|
|
|
l.setSlgxbm("19");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//抛丸
|
|
|
|
//抛丸
|
|
|
|
if (cn.getGx().equals("20")) {
|
|
|
|
if (cn.getGx().equals("20")) {
|
|
|
@ -166,6 +279,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
date=map.get("jgsj");
|
|
|
|
date=map.get("jgsj");
|
|
|
|
l.setPwrq(date);
|
|
|
|
l.setPwrq(date);
|
|
|
|
l.setPwsb(map.get("sbbh"));
|
|
|
|
l.setPwsb(map.get("sbbh"));
|
|
|
|
|
|
|
|
l.setPwgxbm("20");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//理料
|
|
|
|
//理料
|
|
|
|
if (cn.getGx().equals("21")) {
|
|
|
|
if (cn.getGx().equals("21")) {
|
|
|
@ -173,6 +287,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
date=map.get("jgsj");
|
|
|
|
date=map.get("jgsj");
|
|
|
|
l.setLlrq(date);
|
|
|
|
l.setLlrq(date);
|
|
|
|
l.setLlsb(map.get("sbbh"));
|
|
|
|
l.setLlsb(map.get("sbbh"));
|
|
|
|
|
|
|
|
l.setLlgxbm("21");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 划线
|
|
|
|
// 划线
|
|
|
|
if ("01,02".indexOf(cn.getGx()) > -1 && l.getHxcd()>0) {
|
|
|
|
if ("01,02".indexOf(cn.getGx()) > -1 && l.getHxcd()>0) {
|
|
|
@ -180,13 +295,17 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
date=map.get("jgsj");
|
|
|
|
date=map.get("jgsj");
|
|
|
|
l.setHxrq(date);
|
|
|
|
l.setHxrq(date);
|
|
|
|
l.setHxsb(map.get("sbbh"));
|
|
|
|
l.setHxsb(map.get("sbbh"));
|
|
|
|
|
|
|
|
l.setHxgxbm(cn.getGx());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//切割
|
|
|
|
//切割
|
|
|
|
if ("03,04,05,06,07".indexOf(cn.getGx()) > -1 && l.getQgcd()>0) {
|
|
|
|
if ("03,04,05,06,07".indexOf(cn.getGx()) > -1 && l.getQgcd()>0) {
|
|
|
|
|
|
|
|
// .
|
|
|
|
|
|
|
|
date=StrUtil.isEmpty(date)?"": DateUtil.offsetDay(DateUtil.parse(date),-1).toString("yyyy/MM/dd");
|
|
|
|
map=xhcn(rel,cn.getKw(),cn.getGx(),1, date);
|
|
|
|
map=xhcn(rel,cn.getKw(),cn.getGx(),1, date);
|
|
|
|
date=map.get("jgsj");
|
|
|
|
date=map.get("jgsj");
|
|
|
|
l.setQgrq(date);
|
|
|
|
l.setQgrq(date);
|
|
|
|
l.setQgsb(map.get("sbbh"));
|
|
|
|
l.setQgsb(map.get("sbbh"));
|
|
|
|
|
|
|
|
l.setQggxbm(cn.getGx());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 坡口
|
|
|
|
// 坡口
|
|
|
|
if (ObjectUtil.isNotEmpty(l.getPkcd()) && ("08,10".indexOf(cn.getGx()) > 0)) {
|
|
|
|
if (ObjectUtil.isNotEmpty(l.getPkcd()) && ("08,10".indexOf(cn.getGx()) > 0)) {
|
|
|
@ -194,6 +313,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
date=map.get("jgsj");
|
|
|
|
date=map.get("jgsj");
|
|
|
|
l.setPkrq(date);
|
|
|
|
l.setPkrq(date);
|
|
|
|
l.setPksb(map.get("sbbh"));
|
|
|
|
l.setPksb(map.get("sbbh"));
|
|
|
|
|
|
|
|
l.setPkgxbm(cn.getGx());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 打磨
|
|
|
|
// 打磨
|
|
|
|
if (ObjectUtil.isNotEmpty(l.getDmcd()) && ("16,13".indexOf(cn.getGx()) > 0)) {
|
|
|
|
if (ObjectUtil.isNotEmpty(l.getDmcd()) && ("16,13".indexOf(cn.getGx()) > 0)) {
|
|
|
@ -201,6 +321,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
date=map.get("jgsj");
|
|
|
|
date=map.get("jgsj");
|
|
|
|
l.setDmrq(date);
|
|
|
|
l.setDmrq(date);
|
|
|
|
l.setDmsb(map.get("sbbh"));
|
|
|
|
l.setDmsb(map.get("sbbh"));
|
|
|
|
|
|
|
|
l.setDmgxbm(cn.getGx());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 曲 (个)
|
|
|
|
// 曲 (个)
|
|
|
|
if (StrUtil.isNotEmpty(l.getQbs()) && cn.getGx().equals("18")) {
|
|
|
|
if (StrUtil.isNotEmpty(l.getQbs()) && cn.getGx().equals("18")) {
|
|
|
@ -208,6 +329,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
date=map.get("jgsj");
|
|
|
|
date=map.get("jgsj");
|
|
|
|
l.setQjgrq(date);
|
|
|
|
l.setQjgrq(date);
|
|
|
|
l.setQsb(map.get("sbbh"));
|
|
|
|
l.setQsb(map.get("sbbh"));
|
|
|
|
|
|
|
|
l.setQjggxbm(cn.getGx());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 号料 手工切割 倒棱 切端头 自由边 预组
|
|
|
|
// 号料 手工切割 倒棱 切端头 自由边 预组
|
|
|
@ -230,7 +352,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
if (gzl==0)return map;
|
|
|
|
if (gzl==0)return map;
|
|
|
|
String kwAndGx=kw+gx;
|
|
|
|
String kwAndGx=kw+gx;
|
|
|
|
for (String date:rel.keySet()){
|
|
|
|
for (String date:rel.keySet()){
|
|
|
|
if (StrUtil.isEmpty(kssj)||date.compareTo(kssj)>=0){
|
|
|
|
if (StrUtil.isEmpty(kssj)||date.compareTo(kssj)>0){
|
|
|
|
//日期下 跨位+工序分组
|
|
|
|
//日期下 跨位+工序分组
|
|
|
|
Map<String,List<RealCapacity>> kwMap= rel.get(date);
|
|
|
|
Map<String,List<RealCapacity>> kwMap= rel.get(date);
|
|
|
|
if (ObjectUtil.isEmpty(kwMap.get(kwAndGx)))break;
|
|
|
|
if (ObjectUtil.isEmpty(kwMap.get(kwAndGx)))break;
|
|
|
@ -249,20 +371,8 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
|
|
|
|
rel.get(date).get(kwAndGx).set(index,l);
|
|
|
|
rel.get(date).get(kwAndGx).set(index,l);
|
|
|
|
map.put("jgsj",l.getDate());
|
|
|
|
map.put("jgsj",l.getDate());
|
|
|
|
map.put("sbbh",l.getDeviceName());
|
|
|
|
map.put("sbbh",l.getDeviceName());
|
|
|
|
// break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// for (String kwAndGx :kwMap.keySet()){
|
|
|
|
|
|
|
|
// if (kwAndGx.equals(kw+gx)){
|
|
|
|
|
|
|
|
// // 设备 list
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// for (RealCapacity l:rel.get(date)){
|
|
|
|
|
|
|
|
// //设备 改为 跨位
|
|
|
|
|
|
|
|
// if (l.getKw().equals(kw)&&l.getGx().equals(gx)){
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|