parent
039f774a9a
commit
c5a65c1623
@ -0,0 +1,39 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 一跨平直大板 extends 套料图工序 {
|
||||
|
||||
public 一跨平直大板 小组(DmBom bom) {
|
||||
this.kw = "7";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.划线)
|
||||
.add(Constant.工序.切割)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 一跨平直大板 大组(DmBom bom) {
|
||||
this.kw = "7";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.划线)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.曲型)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 一跨进线板 extends 套料图工序 {
|
||||
|
||||
public 一跨进线板 小组(DmBom bom) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public 一跨进线板 大组(DmBom bom) {
|
||||
this.kw = "8";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 七跨型板 extends 套料图工序 {
|
||||
|
||||
public 七跨型板 小组(DmBom bom) {
|
||||
this.kw = "16";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.号料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.打磨)
|
||||
.add(Constant.工序.自由边处理)
|
||||
.add(Constant.工序.曲型)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 七跨型板 大组(DmBom bom) {
|
||||
this.kw = "16";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.号料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.打磨)
|
||||
.add(Constant.工序.自由边处理)
|
||||
.add(Constant.工序.曲型)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 三跨厚板 extends 套料图工序 {
|
||||
|
||||
public 三跨厚板 小组(DmBom bom) {
|
||||
this.kw = "14";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 三跨厚板 大组(DmBom bom) {
|
||||
this.kw = "14";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 三跨平铁 extends 套料图工序 {
|
||||
|
||||
public 三跨平铁 小组(DmBom bom) {
|
||||
this.kw = "6";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.划线)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.打磨)
|
||||
.add(Constant.工序.曲型)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 三跨平铁 大组(DmBom bom) {
|
||||
this.kw = "6";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.划线)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.打磨)
|
||||
.add(Constant.工序.曲型)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 三跨平铁 焊接机器人肘板(DmBom bom) {
|
||||
this.kw = "6";
|
||||
this.zl = "4230";
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.划线)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.打磨)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 三跨曲板 extends 套料图工序 {
|
||||
|
||||
public 三跨曲板 小组(DmBom bom) {
|
||||
this.kw = "13";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 三跨曲板 大组(DmBom bom) {
|
||||
this.kw = "13";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
private void 设置工序() {
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.曲型)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 二跨T型材腹板 extends 套料图工序 {
|
||||
|
||||
public 二跨T型材腹板 小组(DmBom bom) {
|
||||
this.kw = "11";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 二跨T型材腹板 大组(DmBom bom) {
|
||||
this.kw = "11";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
private void 设置工序() {
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.划线)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.型材面板)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 二跨T型材面板 extends 套料图工序 {
|
||||
|
||||
public 二跨T型材面板 小组(DmBom bom) {
|
||||
this.kw = "5";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 二跨T型材面板 大组(DmBom bom) {
|
||||
this.kw = "5";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
private void 设置工序() {
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.划线)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.倒棱)
|
||||
.add(Constant.工序.切端头)
|
||||
.add(Constant.工序.型材面板)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 二跨激光切割板 extends 套料图工序 {
|
||||
|
||||
public 二跨激光切割板 小组(DmBom bom) {
|
||||
this.kw = "12";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 二跨激光切割板 大组(DmBom bom) {
|
||||
this.kw = "12";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 二跨超长超宽曲板 extends 套料图工序 {
|
||||
|
||||
public 二跨超长超宽曲板 小组(DmBom bom) {
|
||||
this.kw = "10";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.add(Constant.工序.曲型)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 二跨超长超宽曲板 大组(DmBom bom) {
|
||||
二跨超长超宽曲板 _二跨超长超宽曲板 = new 二跨超长超宽曲板();
|
||||
_二跨超长超宽曲板.kw = "10";
|
||||
_二跨超长超宽曲板.zl = "1110";
|
||||
_二跨超长超宽曲板.bom = bom;
|
||||
_二跨超长超宽曲板.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.add(Constant.工序.曲型)
|
||||
.build();
|
||||
return _二跨超长超宽曲板;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 二跨超长超宽板 extends 套料图工序 {
|
||||
|
||||
public 二跨超长超宽板 小组(DmBom bom) {
|
||||
this.kw = "9";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 二跨超长超宽板 大组(DmBom bom) {
|
||||
this.kw = "9";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
private void 设置工序() {
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 光电 extends 套料图工序 {
|
||||
|
||||
public 光电 小组(DmBom bom) {
|
||||
this.kw = "17";
|
||||
this.zl = "1120";
|
||||
this.bom = bom;
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.坡口)
|
||||
.add(Constant.工序.自由边处理)
|
||||
.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 光电 大组(DmBom bom) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.dsic.gj_erp.pc.dto.tlt;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
public class 四跨普通板 extends 套料图工序 {
|
||||
|
||||
public 四跨普通板 小组(DmBom bom) {
|
||||
this.kw = "15";
|
||||
this.zl = "1010";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 四跨普通板 大组(DmBom bom) {
|
||||
this.kw = "15";
|
||||
this.zl = "1110";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
public 四跨普通板 焊接机器人肘板(DmBom bom) {
|
||||
this.kw = "15";
|
||||
this.zl = "4230";
|
||||
this.bom = bom;
|
||||
this.设置工序();
|
||||
return this;
|
||||
}
|
||||
|
||||
private void 设置工序() {
|
||||
this.工序 = ImmutableList.<Constant.工序>builder()
|
||||
.add(Constant.工序.上料)
|
||||
.add(Constant.工序.切割)
|
||||
.add(Constant.工序.理料)
|
||||
.add(Constant.工序.划线)
|
||||
.add(Constant.工序.抛丸)
|
||||
.add(Constant.工序.坡口)
|
||||
.add(Constant.工序.自由边处理)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.dsic.gj_erp.pc.dto;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.Constant;
|
||||
import com.dsic.gj_erp.pc.service.套料图工序接口;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static com.dsic.gj_erp.pc.Constant.工序CD;
|
||||
import static com.dsic.gj_erp.pc.DataFactory.提取资源;
|
||||
import static com.dsic.gj_erp.pc.DataFactory.搜索可用资源;
|
||||
import static com.dsic.gj_erp.pc.Manager.from;
|
||||
import static com.dsic.gj_erp.pc.Manager.套料图所占工序的资源;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public abstract class 套料图工序 implements 套料图工序接口 {
|
||||
protected String kw;
|
||||
protected String zl;
|
||||
protected DmBom bom;
|
||||
protected String 需求日期;
|
||||
protected Date _需求日期;
|
||||
protected List<Constant.工序> 工序;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (ObjUtil.isEmpty(this.bom)||StrUtil.isEmpty(this.bom.getTzbh())){
|
||||
return;
|
||||
}
|
||||
this._需求日期 = DateUtil.parse(this.需求日期, "yyyy/MM/dd");
|
||||
double 需求数量 = 1;
|
||||
this.工序.forEach(_工序 -> {
|
||||
if (!this.已占资源(_工序)&&!this.占用资源(_工序,需求数量)){
|
||||
if (bom.get所在设备() == null) {
|
||||
Optional<资源> 可用资源 = 搜索可用资源(_工序, DateUtil.parse(from, "yyyy/MM/dd"), this._需求日期, 需求数量);
|
||||
可用资源.ifPresent(tmp资源 -> {
|
||||
工序产能 _工序产能 = tmp资源.get工序产能MAP().get(_工序);
|
||||
Optional<设备> _设备 = _工序产能.获取可占用设备(0);
|
||||
_设备.ifPresent(tmp -> {
|
||||
this.占用设备(tmp资源,_工序产能,tmp,需求数量);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//没有可用资源放入月末(强占),待手工调整
|
||||
if (bom.get所在设备() == null) {
|
||||
资源 tmp资源 = 提取资源(DateUtil.endOfMonth(DateUtil.parse(this.需求日期, "yyyy/MM/dd")));
|
||||
工序产能 _工序产能 = tmp资源.get工序产能MAP().get(_工序);
|
||||
Optional<设备> _设备 = _工序产能.get设备().values().stream().findAny();
|
||||
this.占用设备(tmp资源,_工序产能,_设备.get(),需求数量);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void 占用设备(资源 _资源,工序产能 工序产能,设备 tmp,double 需求数量){
|
||||
bom.set所在设备(tmp);
|
||||
tmp.占用设备(bom.getTzbh(), 需求数量);
|
||||
bom.set所在资源(_资源);
|
||||
工序产能.占用资源(bom.getTzbh(), 需求数量);
|
||||
套料图所占工序的资源.put(bom.getTzbh(), _资源);
|
||||
}
|
||||
|
||||
protected boolean 占用资源(Constant.工序 _工序,double 需求数量){
|
||||
Integer cd = 工序CD.get(_工序);
|
||||
DateTime dateTime = DateUtil.offsetDay(this._需求日期, cd);
|
||||
资源 _资源 = 提取资源(dateTime);
|
||||
工序产能 工序产能 = _资源.get工序产能MAP().get(_工序);
|
||||
AtomicBoolean 占用成功=new AtomicBoolean(false);
|
||||
try {
|
||||
Optional<设备> _设备 = 工序产能.获取可占用设备(需求数量);
|
||||
_设备.ifPresent(tmp -> {
|
||||
this.占用设备(_资源,工序产能,tmp,需求数量);
|
||||
占用成功.set(true);
|
||||
});
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
|
||||
return 占用成功.get();
|
||||
}
|
||||
|
||||
protected boolean 已占资源(Constant.工序 _工序){
|
||||
资源 已占资源 = this.获取所在资源();
|
||||
工序产能 工序产能 = null;
|
||||
if (已占资源 != null) {
|
||||
工序产能 = 已占资源.get工序产能MAP().get(_工序);
|
||||
}
|
||||
if (工序产能 != null && 工序产能.get资源占用图纸表().contains(bom.getTzbh())) {
|
||||
bom.set所在资源(已占资源);
|
||||
Optional<设备> _设备 = 工序产能.获取已占用设备(bom.getTzbh());
|
||||
_设备.ifPresent(bom::set所在设备);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected 资源 获取所在资源() {
|
||||
return 套料图所占工序的资源.get(this.bom.getTzbh());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.dsic.gj_erp.pc.service;
|
||||
|
||||
import com.dsic.gj_erp.bean.jcsj.DmBom;
|
||||
import com.dsic.gj_erp.pc.dto.套料图工序;
|
||||
|
||||
public interface 套料图工序接口 extends Runnable {
|
||||
套料图工序 小组(DmBom bom);
|
||||
|
||||
套料图工序 大组(DmBom bom);
|
||||
}
|
Loading…
Reference in new issue