1.修复三跨平台套料图切割工序重复的问题

2.增加中日程数据不存在的问题描述
3.修复排产时的钢料需求查询时的大组需求日期拼写错误
master
董哲奇 10 months ago
parent 718a28d8c8
commit 998f48ec0c

@ -69,6 +69,26 @@ public class Bom {
this.errors.add(ErrorType.); this.errors.add(ErrorType.);
} }
public void (){
this.errors.add(ErrorType.);
this.errors.add(ErrorType.);
}
public void (){
this.errors.add(ErrorType.);
this.errors.add(ErrorType.);
}
public void (){
this.errors.add(ErrorType.);
this.errors.add(ErrorType.);
}
public void 使(){
this.errors.add(ErrorType.使);
}
public void (Constant. _){ public void (Constant. _){
switch (_) { switch (_) {
case : case :
@ -108,6 +128,11 @@ public class Bom {
} }
private enum ErrorType{ private enum ErrorType{
使,
,
,
,
,
, ,
, ,
, ,

@ -18,7 +18,6 @@ public class 三跨平铁 extends 套料图工序 {
.add(Constant..) .add(Constant..)
.add(Constant..线) .add(Constant..线)
.add(Constant..) .add(Constant..)
.add(Constant..)
.add(Constant..) .add(Constant..)
.add(Constant..) .add(Constant..)
.build(); .build();
@ -36,7 +35,6 @@ public class 三跨平铁 extends 套料图工序 {
.add(Constant..) .add(Constant..)
.add(Constant..线) .add(Constant..线)
.add(Constant..) .add(Constant..)
.add(Constant..)
.add(Constant..) .add(Constant..)
.add(Constant..) .add(Constant..)
.build(); .build();
@ -54,7 +52,6 @@ public class 三跨平铁 extends 套料图工序 {
.add(Constant..) .add(Constant..)
.add(Constant..线) .add(Constant..线)
.add(Constant..) .add(Constant..)
.add(Constant..)
.add(Constant..) .add(Constant..)
.build(); .build();
return this; return this;

@ -43,22 +43,33 @@ public abstract class 套料图工序 implements 套料图工序接口 {
public void run(){ public void run(){
fail=new AtomicBoolean(false); fail=new AtomicBoolean(false);
(); if (()){
this.run(fail); this.run(fail);
}
} }
protected void (){ protected boolean (){
if (this.zlType==ZlType.){ if (this.zlType==ZlType.||this.zlType==ZlType.){
this.set(this.xzglxq); this.set(this.xzglxq);
} }
if (this.zlType==ZlType.){ if (this.zlType==ZlType.){
this.set(this.dzglxq); if (this.dzglxq==null){
this.set(this.xzglxq);
this.bom.使();
}else {
this.set(this.dzglxq);
}
} }
if (this.zlType==ZlType.&&this..contains(Constant..)){ if (this.zlType==ZlType.&&this..contains(Constant..)){
//大组需求有曲外板,需要按照大组需求期计算 //大组需求有曲外板,需要按照大组需求期计算
this.set(dzglxq); if (this.dzglxq==null){
this.set(this.xzglxq);
this.bom.使();
}else {
this.set(this.dzglxq);
}
//曲外板批量名称设置 //曲外板批量名称设置
this.bom.set_pl(this.bom.getPl()+"Q"); this.bom.set_pl(this.bom.getPl()+"Q");
} }
@ -71,25 +82,39 @@ public abstract class 套料图工序 implements 套料图工序接口 {
} }
if (ObjUtil.isEmpty(this.bom)||StrUtil.isEmpty(this.bom.getTzbh())){ if (ObjUtil.isEmpty(this.bom)||StrUtil.isEmpty(this.bom.getTzbh())){
return; return false;
} }
this._ = DateUtil.parse(this., "yyyy/MM/dd"); this._ = DateUtil.parse(this., "yyyy/MM/dd");
Map<String,List<>> _=DataFactory.(); Map<String,List<>> _=DataFactory.();
this.s = _.get(bom.getDcch()); this.s = _.get(bom.getDcch());
return true;
} }
public void run(AtomicBoolean atomicBoolean) { public void run(AtomicBoolean atomicBoolean) {
if (!this.()){ if (!this.()){
System.out.println(String.format("船号:%s,批量:%s,未订货",this.bom.getDcch(),this.bom.getPl()));
bom.(); bom.();
} }
this..forEach(_ -> { this..forEach(_ -> {
_ = this.2(_, ); _ = this.2(_, );
if (_==Constant..&&!this.(_)){ if (_==Constant..&&!this.(_)){
this.bom.(); this.bom.();
//使用中日程定义需求日期 //使用中日程定义需求日期
if (this.==null){
this.bom.();
return;
}
if (this.zlType==ZlType.&&this..getGjjsXz()==null){
this.bom.();
return;
}
if (this.zlType==ZlType.&&this..getGjjsDz()==null){
this.bom.();
return;
}
this._=this.zlType==ZlType.?DateUtil.parse(this..getGjjsXz()):DateUtil.parse(this..getGjjsDz()); this._=this.zlType==ZlType.?DateUtil.parse(this..getGjjsXz()):DateUtil.parse(this..getGjjsDz());
//再次计算上料日期 //再次计算上料日期
this.2(_, ); this.2(_, );
@ -114,23 +139,22 @@ public abstract class 套料图工序 implements 套料图工序接口 {
} }
} }
protected boolean (){ protected boolean (){
AtomicBoolean =new AtomicBoolean(false); AtomicBoolean =new AtomicBoolean(false);
if (ObjUtil.isEmpty(s)){ if (ObjUtil.isEmpty(s)){
return .get(); return .get();
} }
if (ObjUtil.isNotEmpty(s)){ s.forEach(item->{
s.forEach(item->{ if (item.getPlList().contains(bom.getPl())){
if (item.getPlList().contains(bom.getPl())){ .set(true);
.set(true); }
} });
});
}
return .get(); return .get();
} }
protected boolean ( _){ protected boolean ( _){
AtomicBoolean =new AtomicBoolean(false); AtomicBoolean =new AtomicBoolean(false);
if (ObjUtil.isNotEmpty(s)){ if (ObjUtil.isNotEmpty(s)){
s.forEach(item->{ s.forEach(item->{

@ -1,6 +1,5 @@
package com.dsic.gj_erp.pc; package com.dsic.gj_erp.pc;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -29,6 +28,47 @@ public class 订货计划 {
if (this.plList!=null){ if (this.plList!=null){
return this.plList; return this.plList;
} }
this.plList=new ArrayList<>();
if (this.pls.contains("/")){
this.plsHandler3(this.pls);
return this.plList;
}
if (this.pls.contains("、")){
this.plsHandler2(this.pls);
return this.plList;
}
if (this.pls.contains("-")){
this.plsHandler1(pls);
return this.plList;
}
this.plList.add(this.formatPl(this.pls));
return this.plList;
}
private void plsHandler3(String pls){
String[] _pls = this.pls.split("/");
for (String tmp:_pls){
if (tmp.contains("、")){
this.plsHandler2(this.pls);
continue;
}
this.plList.add(this.formatPl(tmp));
}
}
private void plsHandler2(String pls){
String[] _pls = this.pls.split("、");
for (String tmp:_pls){
if (tmp.indexOf("-")>0){
this.plsHandler1(tmp);
continue;
}
this.plList.add(this.formatPl(tmp));
}
}
private void plsHandler1(String pls){
List<String> split = StrUtil.split(pls, "-"); List<String> split = StrUtil.split(pls, "-");
String logMsg=StrUtil.format("订货计划--船号:{},批量范围格式错误:{}",dcch,pls); String logMsg=StrUtil.format("订货计划--船号:{},批量范围格式错误:{}",dcch,pls);
if (split.size()!=2){ if (split.size()!=2){
@ -38,14 +78,16 @@ public class 订货计划 {
try { try {
int start=Integer.parseInt(split.get(0)); int start=Integer.parseInt(split.get(0));
int end=Integer.parseInt(split.get(1)); int end=Integer.parseInt(split.get(1));
this.plList=new ArrayList<>();
for (int i=start;i<=end;i++){ for (int i=start;i<=end;i++){
this.plList.add(i+""); this.plList.add(this.formatPl(i+""));
} }
return this.plList;
}catch (Exception e){ }catch (Exception e){
log.error(logMsg); log.error(logMsg);
throw new RuntimeException(logMsg); throw new RuntimeException(logMsg);
} }
} }
private String formatPl(String pl){
return String.format("%03d",Integer.parseInt(pl));
}
} }

@ -35,7 +35,7 @@
xq.dc_pl, xq.dc_pl,
xq.dc_fd, xq.dc_fd,
xq.xzglxq, xq.xzglxq,
xq.daglxq, xq.dzglxq,
bom.id as bom_id, bom.id as bom_id,
bom.dcch as bom_dcch, bom.dcch as bom_dcch,
bom.mbch as bom_mbch, bom.mbch as bom_mbch,

Loading…
Cancel
Save