1.修复排产日期顺序错误问题

2.优化月度计划排产页面步骤条无法通过点击激活各步骤的问题,调整设备产能排序按照垮位显示
master
董哲奇 6 months ago
parent dd04b80fd0
commit d6edbc7488

@ -79,6 +79,7 @@ public class DataFactory {
List<> list=1();
// list=list.stream().filter(item->"G175K-4".equals(item.getDcCh())&&"116".equals(item.getDcPl())).collect(Collectors.toList());
List<> = (list);
System.out.println("=======");
try {
();
@ -116,6 +117,7 @@ public class DataFactory {
Map<String, AtomicDouble> = item.get();
_=null;
Integer cd = CDMap.get().getCd();
PcDto dto=lastedData.get(item.getDcCh());
do {
//因为第一次计算时候就是当前批量小组需求日期,所以再次循环到的时候不需要再次计算
if (times==0){
@ -139,17 +141,25 @@ public class DataFactory {
//continue;
}
//记录6次计算的全部资源
PcDto dto=lastedData.get(item.getDcCh());
if (times==-3){
tmpList.add(_);
}else if (dto!=null&&dto.get_().get_date().isBefore(_.get_date())){
}else if (dto!=null&&_.get_date().isAfterOrEquals(dto.get_().get_date())){
tmpList.add(_);
}
if (_.()){
if (dto==null){
(item.getBomList(),item.get(),CDMap);
break;
}
if(_.get_date().isAfterOrEquals(dto.get_().get_date())){
(item.getBomList(),item.get(),CDMap);
break;
}
if ("G175K-12".equals(item.getDcCh())&&"085".equals(item.getDcPl())){
System.out.println("=====");
}
}
//需求日期可利用范围是±3天,排产是需要根据产能进行调整
item.set(DateUtil.offsetDay(DateUtil.parse(item.getXzglxq(),"yyyy/MM/dd"),times));
times+=1;
@ -159,8 +169,11 @@ public class DataFactory {
if (times>3){
AtomicReference<> _tmp= new AtomicReference<>();
//查找最小可用资源,进行占用
tmpList = tmpList.stream().filter( -> dto != null && .get_date().isAfterOrEquals(dto.get_().get_date())).collect(Collectors.toList());
tmpList.sort(Comparator.comparingDouble((tmp)->tmp.getMAP().get(Constant..).get()));
if ("G175K-12".equals(item.getDcCh())&&"085".equals(item.getDcPl())){
System.out.println("=====");
}
tmpList.stream().findFirst().ifPresent(tmp->{
DateTime dateTime = DateUtil.offsetDay(tmp.get_date(), 7);
(item.getBomList(),dateTime,CDMap);
@ -169,6 +182,12 @@ public class DataFactory {
_=_tmp.get();
}
if (_==null){
item.set(null);
(item.getBomList(),item.get(),CDMap);
_=(item.get());
}
log.info("船号:{},批次:{},占用资源成功,切割日期:{}",item.getDcCh(),item.getDcPl(),_.getDate());
PcDto pcDto = new PcDto();
pcDto.setCh(item.getDcCh());
@ -186,6 +205,24 @@ public class DataFactory {
}
private static void (List<Bom> list,DateTime ,Map<Constant.,CD> CDMap){
for (Bom bom:list){
_ = (bom);
if (_==null){
log.info("船号:{},批次:{},图纸编号:{},无法找到对应套料图",bom.getDcch(),bom.getPl(),bom.getTzbh());
continue;
}
_.setXzglxq(bom.getXzglxq());
_.setDzglxq(bom.getDzglxq());
_.setCD(CDMap);
_.set((bom.getDcch() + bom.getPl() + bom.getFd()));
_.set();
_.run();
}
}
private static void 0(List<Bom> list,DateTime ,Map<Constant.,CD> CDMap){
CountDownLatch latch = new CountDownLatch(list.size());
for (Bom bom:list){
_ = (bom);
@ -201,6 +238,7 @@ public class DataFactory {
_.setCD(CDMap);
_.set((bom.getDcch() + bom.getPl() + bom.getFd()));
_.set();
_.run();
es.execute(() -> {
try{
_.run();
@ -217,7 +255,7 @@ public class DataFactory {
}
private static List<> (List<> list){
Map<String,> map=new HashMap<>();
Map<String,> map=new LinkedHashMap<>();
list.forEach(item->{
String key=item.getDcCh() + item.getDcPl();
_ = map.get(key);

@ -995,7 +995,7 @@ public class DmSygdMxServiceImpl extends ServiceImpl<DmSygdMxMapper, DmSygdMx> i
}
public List<DmYdjhxf> tqSygd2(String begin,String end,String zt){
List<String> slkw=Arrays.asList("7","8","9","5","10","6","15","11","12","13","14");
List<String> slkw=Arrays.asList("7","8","9","5","6","15","11","14");
List<DmSygdMx> list = this.list(Wrappers.<DmSygdMx>lambdaQuery()
.eq(StrUtil.isNotEmpty(zt),DmSygdMx::getZt,zt)
.between(DmSygdMx::getJssj, begin, end)

Loading…
Cancel
Save