1.排产临时提交

master
董哲奇 1 year ago
parent 65b67912b7
commit 039f774a9a

@ -1,39 +1,10 @@
package com.dsic.gj_erp.pc; package com.dsic.gj_erp.pc;
import com.dsic.gj_erp.pc.dto.sb.01;
import com.dsic.gj_erp.pc.dto.sb.02;
import com.dsic.gj_erp.pc.dto.sb.05;
import com.dsic.gj_erp.pc.dto.;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import java.util.Map;
public interface Constant { public interface Constant {
//手动配置,后期可根据设备进行计算(计算方式根据所有设备的产能合并后的结果,设备维护时不计入产能,休息日产能默认为0)
// ImmutableMap<工序, Double> 工序产能 = ImmutableMap.<工序, Double>builder()
// .put(工序.上料, 200.0)
// .put(工序.抛丸, 200.0)
// .put(工序.理料, 200.0)
// .put(工序.划线, 200.0)
//
// .put(工序.一跨龙门切割, 200.0)
// .put(工序.一跨数控切割, 200.0)
// .put(工序.二跨数控切割, 200.0)
// .put(工序.三跨数控切割, 200.0)
// .put(工序.三跨平铁切割, 200.0)
// .put(工序.手工切割, 200.0)
//
// .put(工序.坡口, 200.0)
// .put(工序.型材面板, 200.0)
// .put(工序.曲加工, 200.0)
// .put(工序.平铁打磨, 200.0)
// .put(工序.手工打磨, 200.0)
// .put(工序.预配盘, 200.0)
// .put(工序.光电结束, 200.0)
// .build();
//相对于钢料需求期 //相对于钢料需求期
ImmutableMap<, Integer> CD = ImmutableMap.<, Integer>builder() ImmutableMap<, Integer> CD = ImmutableMap.<, Integer>builder()
.put(., -10) .put(., -10)
@ -50,87 +21,29 @@ public interface Constant {
.put(., 0) .put(., 0)
.build(); .build();
//来源数据库
// ImmutableMap<String, 工序> 套料图工序对应关系 = ImmutableMap.of();
// .<String, 工序>builder()
//二跨超长超宽曲板小组
// .put("10101019", 工序.上料)
// .put("10101020", 工序.抛丸)
// .put("10101021", 工序.理料)
// .put("10101004", 工序.二跨数控切割)
// .put("10101008", 工序.坡口)
// .put("10101018", 工序.曲加工)
//二跨超长超宽曲板中大组
// .put("10111019", 工序.上料)
// .put("10111020", 工序.抛丸)
// .put("10111021", 工序.理料)
// .put("10111004", 工序.二跨数控切割)
// .put("10111008", 工序.坡口)
// .put("10111018", 工序.曲加工)
// .build();
//来源数据库
ImmutableMap<, Map<String, >> = ImmutableMap.<, Map<String, >>builder()
//二跨超长超宽曲板小组
.put(., ImmutableMap.<String, >builder()
.put(.01.,new 01(.01))
.build())
.put(., ImmutableMap.<String, >builder()
.put(.01.,new 02(.01))
.build())
.put(., ImmutableMap.<String, >builder()
.put(.01.,new 02(.01))
.build())
.put(.线, ImmutableMap.<String, >builder()
.put(.线01.,new 02(.线01))
.build())
.put(., ImmutableMap.<String, >builder()
.put(.01.,new 05(.01))
.put(.01.,new 05(.01))
.put(.01.,new 05(.01))
.put(.03.,new 05(.03))
.put(.03.,new 05(.03))
.put(.03.,new 05(.03))
.put(.02.,new 05(.02))
.put(.02.,new 05(.02))
.put(.02.,new 05(.02))
.build())
.put(., ImmutableMap.<String, >builder()
.put("",new 02(.01))
.build())
.put(., ImmutableMap.<String, >builder()
.put("",new 02(.01))
.build())
.put(., ImmutableMap.<String, >builder()
.put("",new 02(.01))
.build())
.put(., ImmutableMap.<String, >builder()
.put("",new 02(.01))
.build())
.build();
@Getter @Getter
@AllArgsConstructor @AllArgsConstructor
enum { enum {
01(.,"","",0,0,200.0,200.0,400), 01(.,"上料01","",0,0,200.0,200.0,400),
01(.,"","",0,0,240.0,286.0,526.0), 01(.,"抛丸01","",0,0,240.0,286.0,526.0),
01(.,"","",0,0,240.0,286.0,526.0), 01(.,"理料01","",0,0,240.0,286.0,526.0),
线01(.线,"","",0,0,240.0,286.0,526.0), 线01(.线,"划线01","",0,0,240.0,286.0,526.0),
01(.,"","",2.4,3.6,9.6,15.6,25.2), 01(.,"龙门01","",2.4,3.6,9.6,15.6,25.2),
01(.,"","",0.3,11.5,2.0,0,2.0), 01(.,"火焰01","",0.3,11.5,2.0,0,2.0),
01(.,"","",1.5,3.0,0,8.5,8.5), 01(.,"数控01","",1.5,3.0,0,8.5,8.5),
03(.,"","",0.3,11.5,2.0,0,2.0), 03(.,"火焰03","",0.3,11.5,2.0,0,2.0),
03(.,"","",2.0,4.2,0,14.0,14.0), 03(.,"数控03","",2.0,4.2,0,14.0,14.0),
03(.,"","",1.6,3.2,7.2,11.2,18.4), 03(.,"龙门03","",1.6,3.2,7.2,11.2,18.4),
02(.,"","",0.3,11.5,3.9,0,3.9), 02(.,"火焰02","",0.3,11.5,3.9,0,3.9),
02(.,"","",1.4,3.0,0,18.2,18.2), 02(.,"数控02","",1.4,3.0,0,18.2,18.2),
02(.,"","",2.0,3.0,1.0,13.0,13.0), 02(.,"龙门02","",2.0,3.0,1.0,13.0,13.0),
01(.,"","",2.0,3.0,1.0,13.0,13.0), 01(.,"坡口01","",2.0,3.0,1.0,13.0,13.0),
01(.,"","",2.0,3.0,1.0,13.0,13.0), 01(.,"型材01","",2.0,3.0,1.0,13.0,13.0),
01(.,"","",2.0,3.0,1.0,13.0,13.0), 01(.,"曲加工01","",2.0,3.0,1.0,13.0,13.0),
01(.,"","",2.0,3.0,1.0,13.0,13.0), 01(.,"打磨01","",2.0,3.0,1.0,13.0,13.0),
; ;
public _; public _;
public String ; public String ;
@ -167,7 +80,7 @@ public interface Constant {
//通过code获取工序 //通过code获取工序
public static getGxByCode(String code) { public static getGxByCode(String code) {
for ( gx : .values()) { for ( gx : .values()) {
if (gx.getCode().equals(code)) { if (gx.getCode().contains(code)) {
return gx; return gx;
} }
} }

@ -7,11 +7,13 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.dsic.gj_erp.bean.SpringContextHolder; import com.dsic.gj_erp.bean.SpringContextHolder;
import com.dsic.gj_erp.bean.jcsj.DmBom;
import com.dsic.gj_erp.bean.jcsj.EmGcrl; import com.dsic.gj_erp.bean.jcsj.EmGcrl;
import com.dsic.gj_erp.bean.jcsj.EmSbcnp; import com.dsic.gj_erp.bean.jcsj.EmSbcnp;
import com.dsic.gj_erp.bean.jcsj.EmSbjbb; import com.dsic.gj_erp.bean.jcsj.EmSbjbb;
import com.dsic.gj_erp.bean.jhgk.DmSygdxq; import com.dsic.gj_erp.bean.jhgk.DmSygdxq;
import com.dsic.gj_erp.pc.dto.gx.*; import com.dsic.gj_erp.pc.dto.gx.*;
import com.dsic.gj_erp.pc.dto.sb.*;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
@ -20,6 +22,7 @@ import com.dsic.gj_erp.service.jcsj.EmGcrlService;
import com.dsic.gj_erp.service.jcsj.EmSbcnpService; import com.dsic.gj_erp.service.jcsj.EmSbcnpService;
import com.dsic.gj_erp.service.jcsj.EmSbjbbService; import com.dsic.gj_erp.service.jcsj.EmSbjbbService;
import com.dsic.gj_erp.service.jhgk.DmSygdxqService; import com.dsic.gj_erp.service.jhgk.DmSygdxqService;
import com.google.common.collect.ImmutableMap;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.OutputStream; import java.io.OutputStream;
@ -27,6 +30,7 @@ import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.dsic.gj_erp.pc.Constant.CD; import static com.dsic.gj_erp.pc.Constant.CD;
import static com.dsic.gj_erp.pc.Manager.;
import static com.dsic.gj_erp.pc.Manager.*; import static com.dsic.gj_erp.pc.Manager.*;
public class DataFactory { public class DataFactory {
@ -34,15 +38,17 @@ public class DataFactory {
public static void (){ public static void (){
.clear(); .clear();
List<> list = .list; List<> list = .list;
List<DmBom> =new ArrayList<>();
list.clear(); list.clear();
List<DmSygdxq> xqWithBom = getBean(DmSygdxqService.class).getXqWithBom(from, to); List<DmSygdxq> = getBean(DmSygdxqService.class).getXqWithBom(from, to);
xqWithBom.forEach(xq->{ .forEach(->{
xq.getBomList().forEach(bom->{ .getBomList().forEach(bom->{
Arrays.stream(Constant..values()).forEach(gx->{ Arrays.stream(Constant..values()).forEach(gx->{
if (StrUtil.isEmpty(gx.getCode()))return; if (StrUtil.isEmpty(gx.getCode()))return;
//todo 由于工序code存在多个值的情况,这里需要抽象套料图工序,修改后可支持多线程运算
if (ObjUtil.isNotEmpty(.get(bom.getKw()+bom.getZl()+"_"+gx.getCode()))){ if (ObjUtil.isNotEmpty(.get(bom.getKw()+bom.getZl()+"_"+gx.getCode()))){
Integer cd = CD.get(gx); Integer cd = CD.get(gx);
DateTime parse = DateUtil.parse(xq.getXzglxq(), "yyyy/MM/dd"); DateTime parse = DateUtil.parse(.getXzglxq(), "yyyy/MM/dd");
DateTime dateTime = DateUtil.offsetDay(parse, cd); DateTime dateTime = DateUtil.offsetDay(parse, cd);
_ = (dateTime); _ = (dateTime);
//除切割工序外默认需求数量都是1 //除切割工序外默认需求数量都是1
@ -65,8 +71,8 @@ public class DataFactory {
_.ifPresent(tmp->{ _.ifPresent(tmp->{
bom.set(tmp); bom.set(tmp);
tmp.(bom.getTzbh(),); tmp.(bom.getTzbh(),);
final.(bom.getTzbh(), );
bom.set(it); bom.set(it);
final.(bom.getTzbh(), );
.put(bom.getTzbh(),it); .put(bom.getTzbh(),it);
}); });
} }
@ -74,13 +80,13 @@ public class DataFactory {
//没有可用资源是全局搜索可用资源,进行排产 //没有可用资源是全局搜索可用资源,进行排产
if (bom.get()==null){ if (bom.get()==null){
Optional<> = (gx, ); Optional<> = (gx, DateUtil.parse(from,"yyyy/MM/dd"), parse,);
.ifPresent(tmp->{ .ifPresent(tmp->{
_ = tmp.getMAP().get(gx); _ = tmp.getMAP().get(gx);
Optional<> _ = _.(0); Optional<> _ = _.(0);
_.ifPresent(tmp->{ _.ifPresent(tmp->{
bom.set(tmp);
tmp.(bom.getTzbh(),); tmp.(bom.getTzbh(),);
bom.set(tmp);
_.(bom.getTzbh(), ); _.(bom.getTzbh(), );
bom.set(tmp); bom.set(tmp);
.put(bom.getTzbh(),tmp); .put(bom.getTzbh(),tmp);
@ -88,11 +94,12 @@ public class DataFactory {
}); });
} }
//没有可用资源放入月末,待手工调整 //没有可用资源放入月末(强占),待手工调整
if (bom.get()==null){ if (bom.get()==null){
tmp = (DateUtil.endOfMonth(DateUtil.parse(xq.getXzglxq(), "yyyy/MM/dd"))); .add(bom);
tmp = (DateUtil.endOfMonth(DateUtil.parse(.getXzglxq(), "yyyy/MM/dd")));
_ = tmp.getMAP().get(gx); _ = tmp.getMAP().get(gx);
Optional<> _ = _.(0); Optional<> _ = _.get().values().stream().findAny();
bom.set(_.get()); bom.set(_.get());
bom.set(tmp); bom.set(tmp);
_.(bom.getTzbh(),0); _.(bom.getTzbh(),0);
@ -102,13 +109,31 @@ public class DataFactory {
}); });
}); });
}); });
System.out.println(111); //========调试打印===========
.forEach((day,item)->{
System.out.println("====打印资源===");
System.out.println(day);
Map<Constant., > MAP = item.getMAP();
MAP.forEach((,)->{
if (.get().size()>0){
System.out.println("工序:"+);
if ("2024/06/03".equals(day)){
System.out.println(.get());
}
System.out.println("工序产能:"+.get().size());
}
});
System.out.println("====打印资源完成===");
});
System.out.println(.size());
//========调试打印结束===========
} }
public static Optional<> (Constant. , double ){ public static Optional<> (Constant. ,Date ,Date , double ){
return .values().stream().filter(->{ return .values().stream().filter(->{
= .getMAP().get(); = .getMAP().get();
return .(); Date =DateUtil.parse(.getDate(),"yyyy/MM/dd");
return .()&&.after()&&.before();
}).findFirst(); }).findFirst();
} }
@ -122,37 +147,73 @@ public class DataFactory {
public static void (){ public static void (){
.clear(); .clear();
.stream().filter(item -> "1".equals(item.getXxr()))
.forEach(item -> {
Map<Constant., > map=new HashMap<>(); Map<Constant., > map=new HashMap<>();
Arrays.stream(Constant..values()).forEach(item->{ Arrays.stream(Constant..values()).forEach(_item->{
if (StrUtil.isNotEmpty(item.getCode())){ if (StrUtil.isNotEmpty(_item.getCode())){
map.put(item,(item)); map.put(_item,(_item));
} }
}); });
.stream().filter(item -> "1".equals(item.getXxr())) .put(item.getGl(),.of(item.getGl(), map));
.forEach(item -> .put(item.getGl(),.of(item.getGl(), map))); });
} }
public static (Constant. _){ public static (Constant. _){
Map<String, > _ = Constant..get(_); Map<String,> _=null;
switch (_){ switch (_){
case : case :
_= ImmutableMap.<String, >builder()
.put(Constant..01.,new 01(Constant..01))
.build();
return new 01(_); return new 01(_);
case : case :
_=ImmutableMap.<String, >builder()
.put(Constant..01.,new 02(Constant..01))
.build();
return new 02(_); return new 02(_);
case : case :
_=ImmutableMap.<String, >builder()
.put(Constant..01.,new 03(Constant..01))
.build();
return new 03(_); return new 03(_);
case 线: case 线:
_=ImmutableMap.<String, >builder()
.put(Constant..线01.,new 04线(Constant..线01))
.build();
return new 04线(_); return new 04线(_);
case : case :
_=ImmutableMap.<String, >builder()
.put(Constant..01.,new 05(Constant..01))
.put(Constant..01.,new 05(Constant..01))
.put(Constant..01.,new 05(Constant..01))
.put(Constant..03.,new 05(Constant..03))
.put(Constant..03.,new 05(Constant..03))
.put(Constant..03.,new 05(Constant..03))
.put(Constant..02.,new 05(Constant..02))
.put(Constant..02.,new 05(Constant..02))
.put(Constant..02.,new 05(Constant..02))
.build();
return new 05(_); return new 05(_);
case : case :
_=ImmutableMap.<String, >builder()
.put(Constant..01.,new 07(Constant..01))
.build();
return new 07(_); return new 07(_);
case : case :
_=ImmutableMap.<String, >builder()
.put(Constant..01.,new 10(Constant..01))
.build();
return new 10(_); return new 10(_);
case : case :
_=ImmutableMap.<String, >builder()
.put(Constant..01.,new 08(Constant..01))
.build();
return new 08(_); return new 08(_);
case : case :
_=ImmutableMap.<String, >builder()
.put(Constant..01.,new 09(Constant..01))
.build();
return new 09(_); return new 09(_);
// case 预配盘: // case 预配盘:
// return new 工序01上料(_工序,_设备); // return new 工序01上料(_工序,_设备);
@ -187,15 +248,6 @@ public class DataFactory {
.addAll(deviceList); .addAll(deviceList);
} }
public static void (){
.clear();
Arrays.stream(Constant..values()).forEach(gx->{
if (StrUtil.isNotEmpty(gx.getCode())){
.putIfAbsent(gx, .stream().filter(d->d.getGx().equals(gx.getCode())).collect(Collectors.toList()));
}
});
}
public static void EXCEL(OutputStream stream){ public static void EXCEL(OutputStream stream){
} }

@ -2,9 +2,11 @@ package com.dsic.gj_erp.pc;
import com.dsic.gj_erp.bean.jcsj.EmGcrl; import com.dsic.gj_erp.bean.jcsj.EmGcrl;
import com.dsic.gj_erp.bean.jcsj.EmSbjbb; import com.dsic.gj_erp.bean.jcsj.EmSbjbb;
import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
@ -14,13 +16,13 @@ public class Manager {
public static String to; public static String to;
public static ; public static ;
public static final List<EmGcrl> =new ArrayList<>(); public static final List<EmGcrl> =new ArrayList<>();
public static final Map<String,> = new ConcurrentHashMap<>(); public static final Map<String,> = new LinkedHashMap<>();
//key=tlth+"_"+工序名称 //key=tlth+"_"+工序名称
public static final Map<String,> = new ConcurrentHashMap<>(); public static final Map<String,> = new ConcurrentHashMap<>();
public static final Map<String, Constant.> = new ConcurrentHashMap<>(); public static final Map<String, Constant.> = new ConcurrentHashMap<>();
public static final List<EmSbjbb> = new ArrayList<>(); public static final List<EmSbjbb> = new ArrayList<>();
//实时加载 //实时加载
public static final Map<Constant., List<EmSbjbb>> = new ConcurrentHashMap<>(); public static Map<Constant., Map<String, >> ;
private Manager(){} private Manager(){}
} }

@ -16,6 +16,17 @@ public class 工序01上料 extends 工序产能 {
super(Constant..,_); super(Constant..,_);
} }
@Override
public void () {
this.=0;
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
super.(1.0); super.(1.0);

@ -15,6 +15,17 @@ public class 工序02抛丸 extends 工序产能 {
super(Constant..,_); super(Constant..,_);
} }
@Override
public void () {
this.=0;
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
super.(1.0); super.(1.0);

@ -15,6 +15,17 @@ public class 工序03理料 extends 工序产能 {
super(Constant..,_); super(Constant..,_);
} }
@Override
public void () {
this.=0;
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
super.(); super.();

@ -1,6 +1,5 @@
package com.dsic.gj_erp.pc.dto.gx; package com.dsic.gj_erp.pc.dto.gx;
import com.dsic.gj_erp.bean.jcsj.EmSbjbb;
import com.dsic.gj_erp.pc.Constant; import com.dsic.gj_erp.pc.Constant;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
@ -17,6 +16,17 @@ public class 工序04划线 extends 工序产能 {
super(Constant..线,_); super(Constant..线,_);
} }
@Override
public void () {
this.=0;
if (this.>0){
this.+=this.*Constant..线01.get()/7.0;
}
if (this.>0){
this.+=this.*Constant..线01.get()/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
super.(); super.();

@ -1,6 +1,5 @@
package com.dsic.gj_erp.pc.dto.gx; package com.dsic.gj_erp.pc.dto.gx;
import com.dsic.gj_erp.bean.jcsj.EmSbjbb;
import com.dsic.gj_erp.pc.Constant; import com.dsic.gj_erp.pc.Constant;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
@ -16,6 +15,15 @@ public class 工序05切割 extends 工序产能 {
super(Constant..,_); super(Constant..,_);
} }
@Override
public void () {
this.=0;
this..values().forEach(->{
.(this.,this.);
this.+=.get();
});
}
@Override @Override
public void (double ) { public void (double ) {
super.(); super.();

@ -1,6 +1,5 @@
package com.dsic.gj_erp.pc.dto.gx; package com.dsic.gj_erp.pc.dto.gx;
import com.dsic.gj_erp.bean.jcsj.EmSbjbb;
import com.dsic.gj_erp.pc.Constant; import com.dsic.gj_erp.pc.Constant;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
@ -16,6 +15,17 @@ public class 工序07坡口 extends 工序产能 {
super(Constant..,_); super(Constant..,_);
} }
@Override
public void () {
this.=0;
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
super.(); super.();

@ -1,6 +1,5 @@
package com.dsic.gj_erp.pc.dto.gx; package com.dsic.gj_erp.pc.dto.gx;
import com.dsic.gj_erp.bean.jcsj.EmSbjbb;
import com.dsic.gj_erp.pc.Constant; import com.dsic.gj_erp.pc.Constant;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
@ -16,6 +15,17 @@ public class 工序08曲面 extends 工序产能 {
super(Constant..,_); super(Constant..,_);
} }
@Override
public void () {
this.=0;
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
super.(); super.();

@ -1,6 +1,5 @@
package com.dsic.gj_erp.pc.dto.gx; package com.dsic.gj_erp.pc.dto.gx;
import com.dsic.gj_erp.bean.jcsj.EmSbjbb;
import com.dsic.gj_erp.pc.Constant; import com.dsic.gj_erp.pc.Constant;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
@ -16,6 +15,17 @@ public class 工序09打磨 extends 工序产能 {
super(Constant..,_); super(Constant..,_);
} }
@Override
public void () {
this.=0;
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
super.(); super.();

@ -1,6 +1,5 @@
package com.dsic.gj_erp.pc.dto.gx; package com.dsic.gj_erp.pc.dto.gx;
import com.dsic.gj_erp.bean.jcsj.EmSbjbb;
import com.dsic.gj_erp.pc.Constant; import com.dsic.gj_erp.pc.Constant;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
import com.dsic.gj_erp.pc.dto.; import com.dsic.gj_erp.pc.dto.;
@ -16,6 +15,17 @@ public class 工序10型材 extends 工序产能 {
super(Constant..,_); super(Constant..,_);
} }
@Override
public void () {
this.=0;
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
if (this.>0){
this.+=this.*Constant..01.get()/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
super.(); super.();

@ -17,14 +17,14 @@ public class 设备05切割 extends 设备 {
super(_); super(_);
} }
@Override // @Override
public void (double , double ) { // public void 修正工作量(double 白班时长, double 二班时长) {
this.=; // this.白班时长=白班时长;
this.=; // this.二班时长=二班时长;
this.(); // this.修正产能();
} // }
//
public void (){ // public void 修正产能(){
this.=this.*this.+this.*this.; // this.产能=this.白班设备产能*this.白班时长+this.二班设备产能*this.二班时长;
} // }
} }

@ -17,7 +17,7 @@ public abstract class 工序产能 implements 工序排产处理接口 {
protected double ; protected double ;
protected double ; protected double ;
protected double ; protected double ;
protected double =0.0; protected volatile double =0.0;
protected int cd; protected int cd;
protected Constant. CD;//需要根据对应工序进行计算cd protected Constant. CD;//需要根据对应工序进行计算cd
protected Map<String,> ; protected Map<String,> ;
@ -30,10 +30,9 @@ public abstract class 工序产能 implements 工序排产处理接口 {
this.=; this.=;
this.=; this.=;
this.=7; this.=7;
this.=0;
this.=0; this.=0;
.values().forEach(item->{ this.();
this.+=item.*this.+item.*this.;
});
this.cd=Constant.CD.get(); this.cd=Constant.CD.get();
=new ArrayList<>(); =new ArrayList<>();
} }
@ -44,22 +43,24 @@ public abstract class 工序产能 implements 工序排产处理接口 {
this.=; this.=;
this.=; this.=;
this.=0; this.=0;
.values().forEach(item->{ this.();
this.+=item.*this.+item.*this.;
});
this.cd=Constant.CD.get(); this.cd=Constant.CD.get();
=new ArrayList<>(); =new ArrayList<>();
} }
public void (double ,double ){ private void (){
this.=; this.();
this.=; this.();
.values().forEach(item->{ }
item.(,);
this.+=item.; public void (){}
});
private void (){
this..values().forEach(_-> _.(this.,this.));
} }
public void (double ,double ){}
public Optional<> (String ){ public Optional<> (String ){
return this..values().stream() return this..values().stream()
.filter(item -> item.get().contains()) .filter(item -> item.get().contains())
@ -72,7 +73,7 @@ public abstract class 工序产能 implements 工序排产处理接口 {
} }
public boolean (String ,double ){ public boolean (String ,double ){
_ = .get(); _ = this..get();
return _.+<=_.; return _.+<=_.;
} }

@ -5,6 +5,7 @@ import com.dsic.gj_erp.pc.service.设备接口;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Getter @Getter
@ -15,9 +16,19 @@ public abstract class 设备 implements 设备接口 {
protected double ; protected double ;
protected double ; protected double ;
protected double ; protected double ;
protected double =0.0; protected volatile double =0.0;
protected List<String> ; protected List<String> ;
@Override
public void (double , double ) {
this.=0;
if (>0){
this.+=*/7.0;
}
if (>0){
this.+=*/7.0;
}
}
@Override @Override
public void (double ) { public void (double ) {
this.+=; this.+=;
@ -28,15 +39,12 @@ public abstract class 设备 implements 设备接口 {
this..add(); this..add();
} }
@Override
public void (double , double ) {
}
public (Constant. _){ public (Constant. _){
this.= _.; this.= _.;
this.= _.; this.= _.;
this.= _.; this.= _.;
this.= _.; this.= _.;
this.=new ArrayList<>();
} }
} }

@ -9,6 +9,8 @@ public interface 工序排产处理接口 {
(); ();
} }
void ();
void (double ); void (double );
void (String ); void (String );

@ -48,7 +48,6 @@ public class 排产 {
DataFactory.(); DataFactory.();
DataFactory.(); DataFactory.();
DataFactory.(); DataFactory.();
DataFactory.();
DataFactory.(); DataFactory.();
} }
return Manager.; return Manager.;

Loading…
Cancel
Save