张江玮
2 years ago
22 changed files with 376 additions and 36 deletions
@ -0,0 +1,35 @@ |
|||||
|
package org.nl.wms.sch.manage; |
||||
|
|
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 入库类型 |
||||
|
* |
||||
|
* @author zhangjiangwei |
||||
|
* @date 2023/05/19 09:53 |
||||
|
*/ |
||||
|
@RequiredArgsConstructor |
||||
|
public enum RegionInType { |
||||
|
|
||||
|
WGRK("完工入库", "F"), |
||||
|
BCPRK("半成品入库", "W"), |
||||
|
FPRK("废品入库", "W"); |
||||
|
|
||||
|
private final String label; |
||||
|
private final String value; |
||||
|
|
||||
|
public String label() { |
||||
|
return this.label; |
||||
|
} |
||||
|
|
||||
|
public String value() { |
||||
|
return this.value; |
||||
|
} |
||||
|
|
||||
|
public static RegionInType get(String value) { |
||||
|
return Arrays.stream(RegionInType.values()).filter(r -> r.value.equals(value)).collect(Collectors.toList()).get(0); |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package org.nl.wms.sch.manage; |
||||
|
|
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* @author zhangjiangwei |
||||
|
* @date 2023/05/20 14:06 |
||||
|
*/ |
||||
|
@RequiredArgsConstructor |
||||
|
public enum RegionOutType { |
||||
|
|
||||
|
BCPCK("半成品出库", "W"); |
||||
|
|
||||
|
private final String label; |
||||
|
private final String value; |
||||
|
|
||||
|
public String label() { |
||||
|
return this.label; |
||||
|
} |
||||
|
|
||||
|
public String value() { |
||||
|
return this.value; |
||||
|
} |
||||
|
|
||||
|
public static RegionOutType get(String value) { |
||||
|
return Arrays.stream(RegionOutType.values()).filter(r -> r.value.equals(value)).collect(Collectors.toList()).get(0); |
||||
|
} |
||||
|
} |
@ -0,0 +1,71 @@ |
|||||
|
[交易说明] |
||||
|
交易名: 任务工具类 |
||||
|
所属模块: |
||||
|
功能简述: |
||||
|
版权所有: |
||||
|
表引用: |
||||
|
版本经历: |
||||
|
|
||||
|
[数据库] |
||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库 |
||||
|
|
||||
|
[IO定义] |
||||
|
################################################# |
||||
|
## 表字段对应输入参数 |
||||
|
################################################# |
||||
|
输入.flag TYPEAS s_string |
||||
|
输入.vd_id TYPEAS f_string |
||||
|
输入.workorder_id TYPEAS f_string |
||||
|
|
||||
|
[临时表] |
||||
|
--这边列出来的临时表就会在运行期动态创建 |
||||
|
|
||||
|
[临时变量] |
||||
|
--所有中间过程变量均可在此处定义 |
||||
|
|
||||
|
[业务过程] |
||||
|
|
||||
|
########################################## |
||||
|
# 1、输入输出检查 # |
||||
|
########################################## |
||||
|
|
||||
|
|
||||
|
########################################## |
||||
|
# 2、主过程前处理 # |
||||
|
########################################## |
||||
|
|
||||
|
|
||||
|
########################################## |
||||
|
# 3、业务主过程 # |
||||
|
########################################## |
||||
|
|
||||
|
IF 输入.flag = "1" |
||||
|
QUERY |
||||
|
SELECT |
||||
|
vd.qty, |
||||
|
vd.weight AS vd_weight, |
||||
|
material.weight AS material_weight, |
||||
|
material.material_code |
||||
|
FROM |
||||
|
st_ivt_vehicle_detail vd |
||||
|
LEFT JOIN md_me_materialbase material ON vd.material_id = material.material_id |
||||
|
WHERE |
||||
|
vd.vd_id = 输入.vd_id |
||||
|
ENDSELECT |
||||
|
ENDQUERY |
||||
|
ENDIF |
||||
|
|
||||
|
IF 输入.flag = "2" |
||||
|
QUERY |
||||
|
SELECT |
||||
|
workorder.unqualified_qty AS qty, |
||||
|
material.material_code AS material_code, |
||||
|
material.weight AS material_weight |
||||
|
FROM |
||||
|
pdm_bd_workorder workorder |
||||
|
LEFT JOIN md_me_materialbase material ON workorder.material_id = material.material_id |
||||
|
WHERE |
||||
|
workorder.vd_id = 输入.workorder_id |
||||
|
ENDSELECT |
||||
|
ENDQUERY |
||||
|
ENDIF |
Binary file not shown.
Loading…
Reference in new issue