Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9bec09e7c7
@ -6,7 +6,7 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:dm://localhost:5236/CS_HF_WMS?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:dm://localhost:5236/WMS_DJ?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: SYSDBA
|
username: SYSDBA
|
||||||
password: SYSDBA
|
password: SYSDBA
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
|
@ -46,15 +46,15 @@ spring:
|
|||||||
messages:
|
messages:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
basename: i18n/messages
|
basename: i18n/messages
|
||||||
profiles:
|
profiles:
|
||||||
active: druid
|
active: druid
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
# 单个文件大小
|
# 单个文件大小
|
||||||
max-file-size: 10MB
|
max-file-size: 10MB
|
||||||
# 设置总上传的文件大小
|
# 设置总上传的文件大小
|
||||||
max-request-size: 20MB
|
max-request-size: 20MB
|
||||||
# 服务模块
|
# 服务模块
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
@ -63,13 +63,13 @@ spring:
|
|||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
host: jjml.cc
|
host: localhost
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 7067
|
port: 6379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 1
|
database: 0
|
||||||
# 密码
|
# 密码
|
||||||
password: redis_HtWAZW
|
password:
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
@ -85,27 +85,27 @@ spring:
|
|||||||
|
|
||||||
# token配置
|
# token配置
|
||||||
token:
|
token:
|
||||||
# 令牌自定义标识
|
# 令牌自定义标识
|
||||||
header: Authorization
|
header: Authorization
|
||||||
# 令牌密钥
|
# 令牌密钥
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
secret: abcdefghijklmnopqrstuvwxyz
|
||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 30
|
expireTime: 30
|
||||||
|
|
||||||
# MyBatis配置
|
# MyBatis配置
|
||||||
mybatis:
|
mybatis:
|
||||||
# 搜索指定包别名
|
# 搜索指定包别名
|
||||||
typeAliasesPackage: com.ktg.**.domain
|
typeAliasesPackage: com.ktg.**.domain
|
||||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||||
# 加载全局的配置文件
|
# 加载全局的配置文件
|
||||||
configLocation: classpath:mybatis/mybatis-config.xml
|
configLocation: classpath:mybatis/mybatis-config.xml
|
||||||
|
|
||||||
# PageHelper分页插件
|
# PageHelper分页插件
|
||||||
pagehelper:
|
pagehelper:
|
||||||
helperDialect: oracle
|
helperDialect: oracle
|
||||||
supportMethodsArguments: true
|
supportMethodsArguments: true
|
||||||
params: count=countSql
|
params: count=countSql
|
||||||
|
|
||||||
# Swagger配置
|
# Swagger配置
|
||||||
swagger:
|
swagger:
|
||||||
@ -116,7 +116,7 @@ swagger:
|
|||||||
pathMapping: /dev-api
|
pathMapping: /dev-api
|
||||||
|
|
||||||
# 防止XSS攻击
|
# 防止XSS攻击
|
||||||
xss:
|
xss:
|
||||||
# 过滤开关
|
# 过滤开关
|
||||||
enabled: true
|
enabled: true
|
||||||
# 排除链接(多个用逗号分隔)
|
# 排除链接(多个用逗号分隔)
|
||||||
@ -126,7 +126,7 @@ xss:
|
|||||||
|
|
||||||
#Mino配置
|
#Mino配置
|
||||||
minio:
|
minio:
|
||||||
url: http://192.168.100.106:9000
|
url: http://localhost:9000
|
||||||
accessKey: mi80JZXet0K0v8sSHzOm
|
accessKey: seBsDKT7Ss8B4aGiNiNn
|
||||||
secretKey: 2BaCUhfkFStLHdUfkBRwhshLyKFfbOBG366uakzx
|
secretKey: IYvTR63NZE3EemLfIHGTXu72O7svMEiNHG2OoOWI
|
||||||
bucketName: ktg-mes
|
bucketName: wms-dj
|
||||||
|
@ -95,8 +95,8 @@ public class BaseKnifeController extends BaseController
|
|||||||
map.put("mbbMrlClass", item.getKnifeType());
|
map.put("mbbMrlClass", item.getKnifeType());
|
||||||
map.put("wmsAreaCode", item.getAreaCode());
|
map.put("wmsAreaCode", item.getAreaCode());
|
||||||
map.put("knifeLife", "100");
|
map.put("knifeLife", "100");
|
||||||
map.put("knifeLifeUser", item.getKnifeLife() == null ? null : String.valueOf(100 - Integer.parseInt(item.getKnifeLife())));
|
map.put("knifeLifeUser", item.getKnifeLife() == 0 ? null : String.valueOf(100 - item.getKnifeLife()));
|
||||||
map.put("knifeLifeLeave", item.getKnifeLife() == null ? null : item.getKnifeLife());
|
map.put("knifeLifeLeave", item.getKnifeLife() == 0 ? null : String.valueOf(item.getKnifeLife()));
|
||||||
map.put("isLocked", item.getIsLocked().toString());
|
map.put("isLocked", item.getIsLocked().toString());
|
||||||
map.put("lockedStartTime", item.getLockedStartTime() == null ? null : item.getLockedStartTime().toString());
|
map.put("lockedStartTime", item.getLockedStartTime() == null ? null : item.getLockedStartTime().toString());
|
||||||
map.put("lockedEndTime",item.getLockedEndTime() == null ? null : item.getLockedEndTime().toString());
|
map.put("lockedEndTime",item.getLockedEndTime() == null ? null : item.getLockedEndTime().toString());
|
||||||
@ -126,9 +126,11 @@ public class BaseKnifeController extends BaseController
|
|||||||
@PostMapping("/open/checkForAlignment")
|
@PostMapping("/open/checkForAlignment")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult checkForAlignment(@RequestBody String json) {
|
public AjaxResult checkForAlignment(@RequestBody String json) {
|
||||||
|
// 检查请求json是否正确
|
||||||
List<BaseTechnologyBom> technologyBomList = JSON.parseArray(json, BaseTechnologyBom.class);
|
List<BaseTechnologyBom> technologyBomList = JSON.parseArray(json, BaseTechnologyBom.class);
|
||||||
if (technologyBomList.isEmpty() || technologyBomList.size() == 1 && technologyBomList.get(0).getKnifeCode() == null)
|
if (technologyBomList.isEmpty() || technologyBomList.size() == 1 && technologyBomList.get(0).getKnifeCode() == null)
|
||||||
return AjaxResult.error("未检测到工艺bom项");
|
return AjaxResult.error("未检测到工艺bom项");
|
||||||
|
// 记录请求数据
|
||||||
technologyBomList.forEach(baseTechnologyBom -> baseTechnologyBomService.insertBaseTechnologyBom(baseTechnologyBom));
|
technologyBomList.forEach(baseTechnologyBom -> baseTechnologyBomService.insertBaseTechnologyBom(baseTechnologyBom));
|
||||||
|
|
||||||
// 构建日志
|
// 构建日志
|
||||||
@ -164,10 +166,11 @@ public class BaseKnifeController extends BaseController
|
|||||||
return AjaxResult.error("物料台账查询错误", techBom.getKnifeCode());
|
return AjaxResult.error("物料台账查询错误", techBom.getKnifeCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询台账数据
|
||||||
baseKnifeWrapper.setMbbBdMrlId(mdItemTemp.getItemId());
|
baseKnifeWrapper.setMbbBdMrlId(mdItemTemp.getItemId());
|
||||||
baseKnifeWrapper.setIsLocked(0);
|
baseKnifeWrapper.setIsLocked(0);
|
||||||
List<BaseKnife> tempList = this.baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
List<BaseKnife> tempList = this.baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||||
tempList.removeIf(baseKnife -> Integer.parseInt(baseKnife.getKnifeLife()) < Integer.parseInt(techBom.getExpendLife()));
|
tempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||||
AtomicInteger knifeCount = new AtomicInteger(techBom.getKnifeCount());
|
AtomicInteger knifeCount = new AtomicInteger(techBom.getKnifeCount());
|
||||||
|
|
||||||
// 如果台账表中不存在,尝试组刀任务查询
|
// 如果台账表中不存在,尝试组刀任务查询
|
||||||
@ -191,7 +194,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
||||||
baseKnifeWrapper.setIsLocked(0);
|
baseKnifeWrapper.setIsLocked(0);
|
||||||
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||||
sitmTempList.removeIf(baseKnife -> Integer.parseInt(baseKnife.getKnifeLife()) < Integer.parseInt(techBom.getExpendLife()));
|
sitmTempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||||
|
|
||||||
if (sitmTempList.isEmpty()){
|
if (sitmTempList.isEmpty()){
|
||||||
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
||||||
@ -229,7 +232,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
} else {
|
} else {
|
||||||
// 将物料填入集合
|
// 将物料填入集合
|
||||||
tempList.forEach(item -> {
|
tempList.forEach(item -> {
|
||||||
if (knifeCount.get() > 0 && Integer.parseInt(item.getKnifeLife()) >= Integer.parseInt(techBom.getExpendLife()) && tempList.size() > countMap.get(item.getKnifeCode())) {
|
if (knifeCount.get() > 0 && tempList.size() > countMap.get(item.getKnifeCode())) {
|
||||||
knifeCount.getAndDecrement();
|
knifeCount.getAndDecrement();
|
||||||
countMap.put(item.getKnifeCode(), countMap.get(item.getKnifeCode()) + 1);
|
countMap.put(item.getKnifeCode(), countMap.get(item.getKnifeCode()) + 1);
|
||||||
}
|
}
|
||||||
@ -245,7 +248,6 @@ public class BaseKnifeController extends BaseController
|
|||||||
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BomRoute bomRoute = bomRouteService.selectBomRouteByBomRouteId(bomRouteList.get(0).getBomRouteId());
|
BomRoute bomRoute = bomRouteService.selectBomRouteByBomRouteId(bomRouteList.get(0).getBomRouteId());
|
||||||
|
|
||||||
if (!bomRoute.getMbbProduBomList().isEmpty()) {
|
if (!bomRoute.getMbbProduBomList().isEmpty()) {
|
||||||
@ -255,7 +257,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
||||||
baseKnifeWrapper.setIsLocked(0);
|
baseKnifeWrapper.setIsLocked(0);
|
||||||
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||||
sitmTempList.removeIf(baseKnife -> Integer.parseInt(baseKnife.getKnifeLife()) < Integer.parseInt(techBom.getExpendLife()));
|
sitmTempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||||
|
|
||||||
if (sitmTempList.isEmpty()){
|
if (sitmTempList.isEmpty()){
|
||||||
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
||||||
@ -304,11 +306,15 @@ public class BaseKnifeController extends BaseController
|
|||||||
@PostMapping("/open/productionArrangements")
|
@PostMapping("/open/productionArrangements")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult productionArrangements(@RequestBody String json) {
|
public AjaxResult productionArrangements(@RequestBody String json) {
|
||||||
|
// 验证请求数据
|
||||||
List<BaseTechnologyBom> technologyBomList = JSON.parseArray(json, BaseTechnologyBom.class);
|
List<BaseTechnologyBom> technologyBomList = JSON.parseArray(json, BaseTechnologyBom.class);
|
||||||
if (technologyBomList.isEmpty() || technologyBomList.size() == 1 && technologyBomList.get(0).getKnifeCode() == null)
|
if (technologyBomList.isEmpty() || technologyBomList.size() == 1 && technologyBomList.get(0).getKnifeCode() == null)
|
||||||
return AjaxResult.error("未检测到工艺bom项");
|
return AjaxResult.error("未检测到工艺bom项");
|
||||||
technologyBomList.forEach(baseTechnologyBom -> baseTechnologyBomService.insertBaseTechnologyBom(baseTechnologyBom));
|
technologyBomList.forEach(baseTechnologyBom -> baseTechnologyBomService.insertBaseTechnologyBom(baseTechnologyBom));
|
||||||
|
|
||||||
|
// 记录数据修改
|
||||||
|
List<BaseKnife> baseKnifeOriginList = new ArrayList<>();
|
||||||
|
|
||||||
// 构建日志
|
// 构建日志
|
||||||
SysOperLog operLog = new SysOperLog();
|
SysOperLog operLog = new SysOperLog();
|
||||||
operLog.setTitle("生产准备");
|
operLog.setTitle("生产准备");
|
||||||
@ -338,6 +344,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
// 台账表中查询工具 :并记录数量
|
// 台账表中查询工具 :并记录数量
|
||||||
mdItemTemp = mdItemService.selectMdItemByCode(techBom.getKnifeCode());
|
mdItemTemp = mdItemService.selectMdItemByCode(techBom.getKnifeCode());
|
||||||
if (mdItemTemp == null){
|
if (mdItemTemp == null){
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("物料台账查询错误:" + techBom.getKnifeCode());
|
operLog.setJsonResult("物料台账查询错误:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("物料台账查询错误", techBom.getKnifeCode());
|
return AjaxResult.error("物料台账查询错误", techBom.getKnifeCode());
|
||||||
@ -346,7 +353,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
baseKnifeWrapper.setMbbBdMrlId(mdItemTemp.getItemId());
|
baseKnifeWrapper.setMbbBdMrlId(mdItemTemp.getItemId());
|
||||||
baseKnifeWrapper.setIsLocked(0);
|
baseKnifeWrapper.setIsLocked(0);
|
||||||
List<BaseKnife> tempList = this.baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
List<BaseKnife> tempList = this.baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||||
tempList.removeIf(baseKnife -> Integer.parseInt(baseKnife.getKnifeLife()) < Integer.parseInt(techBom.getExpendLife()));
|
tempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||||
AtomicInteger knifeCount = new AtomicInteger(techBom.getKnifeCount());
|
AtomicInteger knifeCount = new AtomicInteger(techBom.getKnifeCount());
|
||||||
|
|
||||||
// 如果台账表中不存在,尝试组刀任务查询
|
// 如果台账表中不存在,尝试组刀任务查询
|
||||||
@ -356,12 +363,12 @@ public class BaseKnifeController extends BaseController
|
|||||||
bomRouteTemp.setMdItemId(mdItemTemp.getItemId());
|
bomRouteTemp.setMdItemId(mdItemTemp.getItemId());
|
||||||
List<BomRoute> bomRouteList = bomRouteService.selectBomRouteList(bomRouteTemp);
|
List<BomRoute> bomRouteList = bomRouteService.selectBomRouteList(bomRouteTemp);
|
||||||
if (bomRouteList.isEmpty()){
|
if (bomRouteList.isEmpty()){
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("Bom头查询错误:" + techBom.getKnifeCode());
|
operLog.setJsonResult("Bom头查询错误:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BomRoute bomRoute = bomRouteService.selectBomRouteByBomRouteId(bomRouteList.get(0).getBomRouteId());
|
BomRoute bomRoute = bomRouteService.selectBomRouteByBomRouteId(bomRouteList.get(0).getBomRouteId());
|
||||||
|
|
||||||
if (!bomRoute.getMbbProduBomList().isEmpty()) {
|
if (!bomRoute.getMbbProduBomList().isEmpty()) {
|
||||||
@ -371,9 +378,10 @@ public class BaseKnifeController extends BaseController
|
|||||||
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
||||||
baseKnifeWrapper.setIsLocked(0);
|
baseKnifeWrapper.setIsLocked(0);
|
||||||
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||||
sitmTempList.removeIf(baseKnife -> Integer.parseInt(baseKnife.getKnifeLife()) < Integer.parseInt(techBom.getExpendLife()));
|
sitmTempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||||
|
|
||||||
if (sitmTempList.isEmpty()){
|
if (sitmTempList.isEmpty()){
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
||||||
@ -381,6 +389,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
if (sitmTempList.size() >= bom.getStandardDosage() * knifeCount.get()){
|
if (sitmTempList.size() >= bom.getStandardDosage() * knifeCount.get()){
|
||||||
countMap.put(sitmTempList.get(0).getKnifeCode(), bom.getStandardDosage() * knifeCount.get());
|
countMap.put(sitmTempList.get(0).getKnifeCode(), bom.getStandardDosage() * knifeCount.get());
|
||||||
} else {
|
} else {
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
||||||
@ -391,17 +400,20 @@ public class BaseKnifeController extends BaseController
|
|||||||
|
|
||||||
// 判断基础物料是否充足
|
// 判断基础物料是否充足
|
||||||
if (sitmTempList.size() < countMap.get(sitmTempList.get(0).getKnifeCode()) && countMap.get(sitmTempList.get(0).getKnifeCode()) > bom.getStandardDosage() * knifeCount.get()){
|
if (sitmTempList.size() < countMap.get(sitmTempList.get(0).getKnifeCode()) && countMap.get(sitmTempList.get(0).getKnifeCode()) > bom.getStandardDosage() * knifeCount.get()){
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("基础物料不足进行组装工具:" + techBom.getKnifeCode());
|
operLog.setJsonResult("基础物料不足进行组装工具:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("暂无记录整刀bom项:" + techBom.getKnifeCode());
|
operLog.setJsonResult("暂无记录整刀bom项:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("暂无记录整刀bom项", techBom.getKnifeCode());
|
return AjaxResult.error("暂无记录整刀bom项", techBom.getKnifeCode());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("基础物料不足:" + techBom.getKnifeCode());
|
operLog.setJsonResult("基础物料不足:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("基础物料不足", techBom.getKnifeCode());
|
return AjaxResult.error("基础物料不足", techBom.getKnifeCode());
|
||||||
@ -409,9 +421,17 @@ public class BaseKnifeController extends BaseController
|
|||||||
} else {
|
} else {
|
||||||
// 将物料填入集合
|
// 将物料填入集合
|
||||||
tempList.forEach(item -> {
|
tempList.forEach(item -> {
|
||||||
if (knifeCount.get() > 0 && Integer.parseInt(item.getKnifeLife()) >= Integer.parseInt(techBom.getExpendLife()) && tempList.size() > countMap.get(item.getKnifeCode())) {
|
if (knifeCount.get() > 0 && tempList.size() > countMap.get(item.getKnifeCode())) {
|
||||||
|
// 更新数量
|
||||||
knifeCount.getAndDecrement();
|
knifeCount.getAndDecrement();
|
||||||
countMap.put(item.getKnifeCode(), countMap.get(item.getKnifeCode()) + 1);
|
countMap.put(item.getKnifeCode(), countMap.get(item.getKnifeCode()) + 1);
|
||||||
|
// 记录源数据然后锁定
|
||||||
|
baseKnifeOriginList.add(item);
|
||||||
|
item.setPlanSheet(techBom.getTechnologyBomId());
|
||||||
|
item.setIsLocked(1);
|
||||||
|
item.setLockedStartTime(techBom.getLockedStartTime());
|
||||||
|
item.setLockedEndTime(techBom.getLockedEndTime());
|
||||||
|
baseKnifeService.updateBaseKnife(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (knifeCount.get() > 0) {
|
if (knifeCount.get() > 0) {
|
||||||
@ -421,6 +441,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
|
|
||||||
List<BomRoute> bomRouteList = bomRouteService.selectBomRouteList(bomRouteTemp);
|
List<BomRoute> bomRouteList = bomRouteService.selectBomRouteList(bomRouteTemp);
|
||||||
if (bomRouteList.isEmpty()){
|
if (bomRouteList.isEmpty()){
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("Bom头查询错误:" + techBom.getKnifeCode());
|
operLog.setJsonResult("Bom头查询错误:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
||||||
@ -435,9 +456,10 @@ public class BaseKnifeController extends BaseController
|
|||||||
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
||||||
baseKnifeWrapper.setIsLocked(0);
|
baseKnifeWrapper.setIsLocked(0);
|
||||||
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||||
sitmTempList.removeIf(baseKnife -> Integer.parseInt(baseKnife.getKnifeLife()) < Integer.parseInt(techBom.getExpendLife()));
|
sitmTempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||||
|
|
||||||
if (sitmTempList.isEmpty()){
|
if (sitmTempList.isEmpty()){
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
||||||
@ -445,6 +467,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
if (sitmTempList.size() >= bom.getStandardDosage() * knifeCount.get()){
|
if (sitmTempList.size() >= bom.getStandardDosage() * knifeCount.get()){
|
||||||
countMap.put(sitmTempList.get(0).getKnifeCode(), bom.getStandardDosage() * knifeCount.get());
|
countMap.put(sitmTempList.get(0).getKnifeCode(), bom.getStandardDosage() * knifeCount.get());
|
||||||
} else {
|
} else {
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
||||||
@ -455,17 +478,20 @@ public class BaseKnifeController extends BaseController
|
|||||||
|
|
||||||
// 判断基础物料是否充足
|
// 判断基础物料是否充足
|
||||||
if (sitmTempList.size() < countMap.get(sitmTempList.get(0).getKnifeCode()) && countMap.get(sitmTempList.get(0).getKnifeCode()) > bom.getStandardDosage() * knifeCount.get()){
|
if (sitmTempList.size() < countMap.get(sitmTempList.get(0).getKnifeCode()) && countMap.get(sitmTempList.get(0).getKnifeCode()) > bom.getStandardDosage() * knifeCount.get()){
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("基础物料不足进行组装工具:" + techBom.getKnifeCode());
|
operLog.setJsonResult("基础物料不足进行组装工具:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
return AjaxResult.error("基础物料不足进行组装工具", bom.getMdItemCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("暂无记录整刀bom项:" + techBom.getKnifeCode());
|
operLog.setJsonResult("暂无记录整刀bom项:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("暂无记录整刀bom项", techBom.getKnifeCode());
|
return AjaxResult.error("暂无记录整刀bom项", techBom.getKnifeCode());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("基础物料不足:" + techBom.getKnifeCode());
|
operLog.setJsonResult("基础物料不足:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("基础物料不足", techBom.getKnifeCode());
|
return AjaxResult.error("基础物料不足", techBom.getKnifeCode());
|
||||||
@ -481,15 +507,15 @@ public class BaseKnifeController extends BaseController
|
|||||||
List<MbbProduBom> bomList;
|
List<MbbProduBom> bomList;
|
||||||
for (BaseTechnologyBom techBom : technologyBomList){
|
for (BaseTechnologyBom techBom : technologyBomList){
|
||||||
mdItem = mdItemService.selectMdItemByCode(techBom.getKnifeCode());
|
mdItem = mdItemService.selectMdItemByCode(techBom.getKnifeCode());
|
||||||
count = techBom.getKnifeCount();
|
count = techBom.getKnifeCount() - countMap.get(techBom.getKnifeCode());
|
||||||
|
|
||||||
// 先从台账表找
|
// 先从台账表找
|
||||||
baseKnifeWrapper.setMbbBdMrlId(mdItem.getItemId());
|
baseKnifeWrapper.setMbbBdMrlId(mdItem.getItemId());
|
||||||
baseKnifeWrapper.setIsLocked(0);
|
baseKnifeWrapper.setIsLocked(0);
|
||||||
baseKnifeList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
baseKnifeList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||||
baseKnifeList.removeIf(wmsBaseKnife -> Integer.parseInt(wmsBaseKnife.getKnifeLife()) < Integer.parseInt(techBom.getExpendLife()));
|
baseKnifeList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||||
for (BaseKnife wmsBaseKnife : baseKnifeList){
|
for (BaseKnife wmsBaseKnife : baseKnifeList){
|
||||||
if (Integer.parseInt(wmsBaseKnife.getKnifeLife()) >= Integer.parseInt(techBom.getExpendLife()) && count > 0){
|
if (wmsBaseKnife.getKnifeLife() >= techBom.getExpendLife() && count > 0){
|
||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -502,6 +528,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
|
|
||||||
List<BomRoute> bomRouteList = bomRouteService.selectBomRouteList(bomRouteTemp);
|
List<BomRoute> bomRouteList = bomRouteService.selectBomRouteList(bomRouteTemp);
|
||||||
if (bomRouteList.isEmpty()){
|
if (bomRouteList.isEmpty()){
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("Bom头查询错误:" + techBom.getKnifeCode());
|
operLog.setJsonResult("Bom头查询错误:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
||||||
@ -509,14 +536,16 @@ public class BaseKnifeController extends BaseController
|
|||||||
|
|
||||||
WmsZdTask wmsZdTask = new WmsZdTask();
|
WmsZdTask wmsZdTask = new WmsZdTask();
|
||||||
wmsZdTask.setmProductId(mdItem.getItemId());
|
wmsZdTask.setmProductId(mdItem.getItemId());
|
||||||
wmsZdTask.setCode(techBom.getProcessCode() + mdItem.getItemCode());
|
wmsZdTask.setAttr4(techBom.getTechnologyBomId());
|
||||||
wmsZdTask.setName(techBom.getProcessName() + "[" + mdItem.getItemName() + "]");
|
wmsZdTask.setCode(techBom.getProcessCode());
|
||||||
|
wmsZdTask.setName(techBom.getProcessName());
|
||||||
wmsZdTask.setProductIdQty(count);
|
wmsZdTask.setProductIdQty(count);
|
||||||
wmsZdTask.setAttr1(bomRouteList.get(0).getBomRouteId());
|
wmsZdTask.setAttr1(bomRouteList.get(0).getBomRouteId());
|
||||||
wmsZdTask.setCreateTime(DateUtils.getNowDate());
|
wmsZdTask.setCreateTime(DateUtils.getNowDate());
|
||||||
zdTaskService.insertWmsZdTask(wmsZdTask);
|
zdTaskService.insertWmsZdTask(wmsZdTask);
|
||||||
msg = "生产准备验证成功!已生成组装任务!";
|
msg = "生产准备验证成功!缺少物料已生成组装任务!";
|
||||||
} else {
|
} else {
|
||||||
|
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||||
operLog.setJsonResult("缺少BOM项:" + techBom.getKnifeCode());
|
operLog.setJsonResult("缺少BOM项:" + techBom.getKnifeCode());
|
||||||
operLogService.insertOperlog(operLog);
|
operLogService.insertOperlog(operLog);
|
||||||
return AjaxResult.error("缺少BOM项", techBom.getKnifeCode());
|
return AjaxResult.error("缺少BOM项", techBom.getKnifeCode());
|
||||||
@ -539,6 +568,8 @@ public class BaseKnifeController extends BaseController
|
|||||||
@PutMapping("/zdTask")
|
@PutMapping("/zdTask")
|
||||||
public AjaxResult zdTask(@RequestBody WmsZdTask zdTask)
|
public AjaxResult zdTask(@RequestBody WmsZdTask zdTask)
|
||||||
{
|
{
|
||||||
|
String batchNum = "ZZPC001";
|
||||||
|
|
||||||
// 判断物料是否充足
|
// 判断物料是否充足
|
||||||
BomRoute bomRoute = bomRouteService.selectBomRouteByBomRouteId(zdTask.getAttr1());
|
BomRoute bomRoute = bomRouteService.selectBomRouteByBomRouteId(zdTask.getAttr1());
|
||||||
BaseKnife baseKnifeWrapper = new BaseKnife();
|
BaseKnife baseKnifeWrapper = new BaseKnife();
|
||||||
@ -555,8 +586,19 @@ public class BaseKnifeController extends BaseController
|
|||||||
List<WmsOutPlanDetail> wmsOutPlanDetailList = new ArrayList<>();
|
List<WmsOutPlanDetail> wmsOutPlanDetailList = new ArrayList<>();
|
||||||
List<BaseKnife> baseKnifeListOutPlan = new ArrayList<>();
|
List<BaseKnife> baseKnifeListOutPlan = new ArrayList<>();
|
||||||
|
|
||||||
|
// 查询工艺bom
|
||||||
|
BaseTechnologyBom technologyBom = new BaseTechnologyBom();
|
||||||
|
if (zdTask.getAttr4() != null){
|
||||||
|
technologyBom = baseTechnologyBomService.selectBaseTechnologyBomByTechnologyBomId(zdTask.getAttr4());
|
||||||
|
} else {
|
||||||
|
technologyBom.setFigureCode(zdTask.getCode());
|
||||||
|
technologyBom.setLockedStartTime(DateUtils.getNowDate());
|
||||||
|
technologyBom.setLockedEndTime(DateUtils.getNowDate());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 出库基础物料
|
||||||
WmsOutPlan outPlan = new WmsOutPlan();
|
WmsOutPlan outPlan = new WmsOutPlan();
|
||||||
outPlan.setPlanCode(zdTask.getCode());
|
outPlan.setPlanCode(technologyBom.getFigureCode());
|
||||||
outPlan.setWmsBusinessTypeId(12L);
|
outPlan.setWmsBusinessTypeId(12L);
|
||||||
outPlan.setPlanState("1");
|
outPlan.setPlanState("1");
|
||||||
outPlan.setPlanType("ZDCK");
|
outPlan.setPlanType("ZDCK");
|
||||||
@ -567,6 +609,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
// 锁定物料
|
// 锁定物料
|
||||||
Boolean outPlanFlag = true;
|
Boolean outPlanFlag = true;
|
||||||
for (int i = 0; i < zdTask.getProductIdQty(); i++) {
|
for (int i = 0; i < zdTask.getProductIdQty(); i++) {
|
||||||
|
// 构建整刀
|
||||||
BaseKnife baseKnife = new BaseKnife();
|
BaseKnife baseKnife = new BaseKnife();
|
||||||
MdItem mdItem = mdItemService.selectMdItemById(zdTask.getmProductId());
|
MdItem mdItem = mdItemService.selectMdItemById(zdTask.getmProductId());
|
||||||
baseKnife.setMbbBdMrlId(zdTask.getmProductId());
|
baseKnife.setMbbBdMrlId(zdTask.getmProductId());
|
||||||
@ -575,17 +618,20 @@ public class BaseKnifeController extends BaseController
|
|||||||
baseKnife.setKnifeUnit(mdItem.getUnitName());
|
baseKnife.setKnifeUnit(mdItem.getUnitName());
|
||||||
baseKnife.setKnifeType(mdItem.getItemTypeName());
|
baseKnife.setKnifeType(mdItem.getItemTypeName());
|
||||||
baseKnife.setAreaCode(zdTask.getAttr3());
|
baseKnife.setAreaCode(zdTask.getAttr3());
|
||||||
baseKnife.setSafeStock(mdItem.getMinStock().toString().split("\\.")[0]);
|
baseKnife.setSafeStock(mdItem.getMinStock());
|
||||||
baseKnife.setStandardQuantity("1");
|
baseKnife.setStandardQuantity("1");
|
||||||
baseKnife.setKnifeLife("100");
|
baseKnife.setKnifeLife(100);
|
||||||
baseKnife.setKnifeFineState(0);
|
baseKnife.setKnifeFineState(0);
|
||||||
baseKnife.setIsLocked(0);
|
baseKnife.setIsLocked(1);
|
||||||
baseKnife.setPlanSheet("");
|
baseKnife.setLockedStartTime(technologyBom.getLockedStartTime());
|
||||||
|
baseKnife.setLockedEndTime(technologyBom.getLockedEndTime());
|
||||||
|
baseKnife.setPlanSheet(zdTask.getAttr4());
|
||||||
baseKnife.setItemOrProduct("PRODUCT");
|
baseKnife.setItemOrProduct("PRODUCT");
|
||||||
baseKnife.setCreateBy(getUsername());
|
baseKnife.setCreateBy(getUsername());
|
||||||
baseKnife.setCreateTime(DateUtils.getNowDate());
|
baseKnife.setCreateTime(DateUtils.getNowDate());
|
||||||
baseKnifeService.insertBaseKnife(baseKnife);
|
baseKnifeService.insertBaseKnife(baseKnife);
|
||||||
|
|
||||||
|
// 锁定物料
|
||||||
int resetCount = 0;
|
int resetCount = 0;
|
||||||
for (MbbProduBom mbbProduBom : bomRoute.getMbbProduBomList()) {
|
for (MbbProduBom mbbProduBom : bomRoute.getMbbProduBomList()) {
|
||||||
baseKnifeWrapper.setMbbBdMrlId(mbbProduBom.getMdItemId());
|
baseKnifeWrapper.setMbbBdMrlId(mbbProduBom.getMdItemId());
|
||||||
@ -593,6 +639,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
baseKnifeList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
baseKnifeList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||||
|
|
||||||
if (outPlanFlag) {
|
if (outPlanFlag) {
|
||||||
|
// 出库任务
|
||||||
MdItem mdItemOutPlan = mdItemService.selectMdItemById(mbbProduBom.getMdItemId());
|
MdItem mdItemOutPlan = mdItemService.selectMdItemById(mbbProduBom.getMdItemId());
|
||||||
WmsOutPlanDetail outPlanDetail = new WmsOutPlanDetail();
|
WmsOutPlanDetail outPlanDetail = new WmsOutPlanDetail();
|
||||||
outPlanDetail.setWmsOutPlanId(outPlan.getWmsOutPlanId());
|
outPlanDetail.setWmsOutPlanId(outPlan.getWmsOutPlanId());
|
||||||
@ -602,7 +649,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
outPlanDetail.setMdItemUnit(mdItemOutPlan.getUnitName());
|
outPlanDetail.setMdItemUnit(mdItemOutPlan.getUnitName());
|
||||||
outPlanDetail.setPlannedQuantity(mbbProduBom.getStandardDosage() * zdTask.getProductIdQty());
|
outPlanDetail.setPlannedQuantity(mbbProduBom.getStandardDosage() * zdTask.getProductIdQty());
|
||||||
outPlanDetail.setRealQuantity(mbbProduBom.getStandardDosage() * zdTask.getProductIdQty());
|
outPlanDetail.setRealQuantity(mbbProduBom.getStandardDosage() * zdTask.getProductIdQty());
|
||||||
outPlanDetail.setDetailBatchNum("1");
|
outPlanDetail.setDetailBatchNum(batchNum);
|
||||||
WmStorageArea wmStorageArea = wmStorageAreaService.selectWmStorageAreaByAreaCode(zdTask.getAttr3());
|
WmStorageArea wmStorageArea = wmStorageAreaService.selectWmStorageAreaByAreaCode(zdTask.getAttr3());
|
||||||
outPlanDetail.setWmStorageAreaId(wmStorageArea.getAreaId());
|
outPlanDetail.setWmStorageAreaId(wmStorageArea.getAreaId());
|
||||||
outPlanDetail.setWmStorageAreaCode(wmStorageArea.getAreaCode());
|
outPlanDetail.setWmStorageAreaCode(wmStorageArea.getAreaCode());
|
||||||
@ -611,13 +658,14 @@ public class BaseKnifeController extends BaseController
|
|||||||
wmsOutPlanDetailList.add(outPlanDetail);
|
wmsOutPlanDetailList.add(outPlanDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 锁定物料
|
||||||
int bomCount = mbbProduBom.getStandardDosage();
|
int bomCount = mbbProduBom.getStandardDosage();
|
||||||
for (BaseKnife wmsBaseKnife : baseKnifeList){
|
for (BaseKnife wmsBaseKnife : baseKnifeList){
|
||||||
if (bomCount > 0){
|
if (bomCount > 0){
|
||||||
wmsBaseKnife.setIsLocked(1);
|
wmsBaseKnife.setIsLocked(1);
|
||||||
wmsBaseKnife.setKnifeFineState(2);
|
wmsBaseKnife.setKnifeFineState(2);
|
||||||
wmsBaseKnife.setLockedStartTime(new Date());
|
wmsBaseKnife.setLockedStartTime(technologyBom.getLockedStartTime());
|
||||||
wmsBaseKnife.setLockedEndTime(new Date());
|
wmsBaseKnife.setLockedEndTime(technologyBom.getLockedEndTime());
|
||||||
wmsBaseKnife.setAttr1(baseKnife.getBaseKnifeId());
|
wmsBaseKnife.setAttr1(baseKnife.getBaseKnifeId());
|
||||||
baseKnifeListOutPlan.add(wmsBaseKnife);
|
baseKnifeListOutPlan.add(wmsBaseKnife);
|
||||||
baseKnifeService.updateBaseKnife(wmsBaseKnife);
|
baseKnifeService.updateBaseKnife(wmsBaseKnife);
|
||||||
@ -627,15 +675,18 @@ public class BaseKnifeController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新重置次数
|
||||||
outPlanFlag = false;
|
outPlanFlag = false;
|
||||||
baseKnife.setResetCount(resetCount);
|
baseKnife.setResetCount(resetCount);
|
||||||
baseKnifeService.updateBaseKnife(baseKnife);
|
baseKnifeService.updateBaseKnife(baseKnife);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 出库
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (WmsOutPlanDetail outPlanDetail : wmsOutPlanDetailList){
|
for (WmsOutPlanDetail outPlanDetail : wmsOutPlanDetailList){
|
||||||
wmsOutPlanMapper.insertWmsOutPlanDetail(outPlanDetail);
|
wmsOutPlanMapper.insertWmsOutPlanDetail(outPlanDetail);
|
||||||
|
|
||||||
|
// 出库计划明细
|
||||||
for (int j = 0; j < outPlanDetail.getPlannedQuantity(); j++) {
|
for (int j = 0; j < outPlanDetail.getPlannedQuantity(); j++) {
|
||||||
WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity();
|
WmsOutPlanDetailEntity wmsOutPlanDetailEntity = new WmsOutPlanDetailEntity();
|
||||||
wmsOutPlanDetailEntity.setBaseKnifeId(baseKnifeListOutPlan.get(i++).getBaseKnifeId());
|
wmsOutPlanDetailEntity.setBaseKnifeId(baseKnifeListOutPlan.get(i++).getBaseKnifeId());
|
||||||
@ -645,6 +696,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
wmsOutPlanDetailEntityMapper.insertWmsOutPlanDetailEntity(wmsOutPlanDetailEntity);
|
wmsOutPlanDetailEntityMapper.insertWmsOutPlanDetailEntity(wmsOutPlanDetailEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 出库任务
|
||||||
WmsOutTask wmsOutTask = new WmsOutTask();
|
WmsOutTask wmsOutTask = new WmsOutTask();
|
||||||
wmsOutTask.setWmsOutPlanId(outPlan.getWmsOutPlanId());
|
wmsOutTask.setWmsOutPlanId(outPlan.getWmsOutPlanId());
|
||||||
wmsOutTask.setWmsOutPlanCode(outPlan.getPlanCode());
|
wmsOutTask.setWmsOutPlanCode(outPlan.getPlanCode());
|
||||||
@ -654,7 +706,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
wmsOutTask.setTaskNumber(outPlanDetail.getPlannedQuantity());
|
wmsOutTask.setTaskNumber(outPlanDetail.getPlannedQuantity());
|
||||||
wmsOutTask.setOutNumber(outPlanDetail.getRealQuantity());
|
wmsOutTask.setOutNumber(outPlanDetail.getRealQuantity());
|
||||||
wmsOutTask.setWmStorageAreaId(outPlanDetail.getWmStorageAreaId());
|
wmsOutTask.setWmStorageAreaId(outPlanDetail.getWmStorageAreaId());
|
||||||
wmsOutTask.setBatchNum("1");
|
wmsOutTask.setBatchNum(batchNum);
|
||||||
wmsOutTask.setMdItemId(outPlanDetail.getMdItemId());
|
wmsOutTask.setMdItemId(outPlanDetail.getMdItemId());
|
||||||
wmsOutTask.setMdItemCode(outPlanDetail.getMdItemCode());
|
wmsOutTask.setMdItemCode(outPlanDetail.getMdItemCode());
|
||||||
wmsOutTask.setMdItemName(outPlanDetail.getMdItemName());
|
wmsOutTask.setMdItemName(outPlanDetail.getMdItemName());
|
||||||
@ -666,22 +718,23 @@ public class BaseKnifeController extends BaseController
|
|||||||
wmsOutTaskMapper.insertWmsOutTask(wmsOutTask);
|
wmsOutTaskMapper.insertWmsOutTask(wmsOutTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 整刀入库计划
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
WmsInPlan wmsInPlan = new WmsInPlan();
|
WmsInPlan wmsInPlan = new WmsInPlan();
|
||||||
wmsInPlan.setState("1");
|
wmsInPlan.setState("1");
|
||||||
wmsInPlan.setSourceType("SGLR");
|
wmsInPlan.setSourceType("SGLR");
|
||||||
wmsInPlan.setWareId("10");
|
|
||||||
wmsInPlan.setCellCode(zdTask.getAttr3());
|
wmsInPlan.setCellCode(zdTask.getAttr3());
|
||||||
wmsInPlan.setPlanCode(zdTask.getCode() + random.nextInt(100));
|
wmsInPlan.setPlanCode(technologyBom.getFigureCode());
|
||||||
wmsInPlan.setRelBillCode("组装单据");
|
wmsInPlan.setRelBillCode("组装单据");
|
||||||
wmsInPlan.setPlanTypeId("7");
|
wmsInPlan.setPlanTypeId("13");
|
||||||
wmsInPlan.setCreateBy(getUsername());
|
wmsInPlan.setCreateBy(getUsername());
|
||||||
wmsInPlan.setCreateTime(DateUtils.getNowDate());
|
wmsInPlan.setCreateTime(DateUtils.getNowDate());
|
||||||
|
|
||||||
|
// 入库任务明细
|
||||||
List<WmsInPlanDetails> wmsInPlanDetailsList = new ArrayList<>();
|
List<WmsInPlanDetails> wmsInPlanDetailsList = new ArrayList<>();
|
||||||
WmsInPlanDetails wmsInPlanDetails = new WmsInPlanDetails();
|
WmsInPlanDetails wmsInPlanDetails = new WmsInPlanDetails();
|
||||||
wmsInPlanDetails.setMaterialId(zdTask.getmProductId().toString());
|
wmsInPlanDetails.setMaterialId(zdTask.getmProductId().toString());
|
||||||
wmsInPlanDetails.setBatch("10112");
|
wmsInPlanDetails.setBatch(batchNum);
|
||||||
wmsInPlanDetails.setCellId("1");
|
wmsInPlanDetails.setCellId("1");
|
||||||
wmsInPlanDetails.setQuantity(zdTask.getProductIdQty().toString());
|
wmsInPlanDetails.setQuantity(zdTask.getProductIdQty().toString());
|
||||||
wmsInPlanDetails.setQuantityIn(zdTask.getProductIdQty().toString());
|
wmsInPlanDetails.setQuantityIn(zdTask.getProductIdQty().toString());
|
||||||
@ -690,6 +743,7 @@ public class BaseKnifeController extends BaseController
|
|||||||
wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailsList);
|
wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailsList);
|
||||||
wmsInPlanService.insertWmsInPlan(wmsInPlan);
|
wmsInPlanService.insertWmsInPlan(wmsInPlan);
|
||||||
|
|
||||||
|
// 入库任务
|
||||||
MdItem mdItem = mdItemService.selectMdItemById(zdTask.getmProductId());
|
MdItem mdItem = mdItemService.selectMdItemById(zdTask.getmProductId());
|
||||||
WmsInTask wmsInTask = new WmsInTask();
|
WmsInTask wmsInTask = new WmsInTask();
|
||||||
wmsInTask.setPlanInId(wmsInPlan.getPlanId());
|
wmsInTask.setPlanInId(wmsInPlan.getPlanId());
|
||||||
@ -699,15 +753,17 @@ public class BaseKnifeController extends BaseController
|
|||||||
wmsInTask.setActualInQuantity(zdTask.getProductIdQty());
|
wmsInTask.setActualInQuantity(zdTask.getProductIdQty());
|
||||||
WmStorageArea wmStorageArea = wmStorageAreaService.selectWmStorageAreaByAreaCode(zdTask.getAttr3());
|
WmStorageArea wmStorageArea = wmStorageAreaService.selectWmStorageAreaByAreaCode(zdTask.getAttr3());
|
||||||
wmsInTask.setCellTgt(wmStorageArea.getAreaId());
|
wmsInTask.setCellTgt(wmStorageArea.getAreaId());
|
||||||
wmsInTask.setBatch("11011");
|
wmsInTask.setBatch(batchNum);
|
||||||
wmsInTask.setMaterialId(zdTask.getmProductId().toString());
|
wmsInTask.setMaterialId(zdTask.getmProductId().toString());
|
||||||
wmsInTask.setPlanTypeId("9");
|
wmsInTask.setPlanTypeId("9");
|
||||||
wmsInTask.setPlanInStatus("1");
|
wmsInTask.setPlanInStatus("1");
|
||||||
wmsInTaskService.insertWmsInTask(wmsInTask);
|
wmsInTaskService.insertWmsInTask(wmsInTask);
|
||||||
|
|
||||||
|
// 更新数量
|
||||||
mdItem.setStandardNumber(mdItem.getStandardNumber() + zdTask.getProductIdQty());
|
mdItem.setStandardNumber(mdItem.getStandardNumber() + zdTask.getProductIdQty());
|
||||||
mdItemService.updateMdItem(mdItem);
|
mdItemService.updateMdItem(mdItem);
|
||||||
|
|
||||||
|
// 更新组装任务
|
||||||
zdTask.setStatus("1");
|
zdTask.setStatus("1");
|
||||||
zdTask.setQtyOk(zdTask.getProductIdQty());
|
zdTask.setQtyOk(zdTask.getProductIdQty());
|
||||||
zdTaskService.updateWmsZdTask(zdTask);
|
zdTaskService.updateWmsZdTask(zdTask);
|
||||||
|
@ -255,10 +255,10 @@ public class MdItemController extends BaseController {
|
|||||||
mdItem.setItemTypeName(type.getItemTypeName());
|
mdItem.setItemTypeName(type.getItemTypeName());
|
||||||
mdItem.setItemOrProduct(type.getItemOrProduct());
|
mdItem.setItemOrProduct(type.getItemOrProduct());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotNull(mdItem.getSafeStockFlag()) && "N".equals(mdItem.getSafeStockFlag())) {
|
// if (StringUtils.isNotNull(mdItem.getSafeStockFlag()) && "N".equals(mdItem.getSafeStockFlag())) {
|
||||||
mdItem.setMinStock(0D);
|
// mdItem.setMinStock(0D);
|
||||||
mdItem.setMaxStock(0D);
|
// mdItem.setMaxStock(0D);
|
||||||
}
|
// }
|
||||||
MdUnitMeasure measure = mdUnitMeasureService.selectMdUnitByCode(mdItem.getUnitOfMeasure());
|
MdUnitMeasure measure = mdUnitMeasureService.selectMdUnitByCode(mdItem.getUnitOfMeasure());
|
||||||
if (StringUtils.isNotNull(measure)) {
|
if (StringUtils.isNotNull(measure)) {
|
||||||
mdItem.setUnitName(measure.getMeasureName());
|
mdItem.setUnitName(measure.getMeasureName());
|
||||||
|
@ -9,7 +9,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工具台账对象 BASE_KNIFE
|
* 刀具台账对象 BASE_KNIFE
|
||||||
*
|
*
|
||||||
* @author yinjinlu
|
* @author yinjinlu
|
||||||
* @date 2024-10-31
|
* @date 2024-10-31
|
||||||
@ -35,15 +35,15 @@ public class BaseKnife extends BaseEntity {
|
|||||||
private String rfid;
|
private String rfid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工具编码
|
* 刀具编码
|
||||||
*/
|
*/
|
||||||
@Excel(name = "工具编码")
|
@Excel(name = "刀具编码")
|
||||||
private String knifeCode;
|
private String knifeCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工具名称
|
* 刀具名称
|
||||||
*/
|
*/
|
||||||
@Excel(name = "工具名称")
|
@Excel(name = "刀具名称")
|
||||||
private String knifeName;
|
private String knifeName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,16 +53,16 @@ public class BaseKnife extends BaseEntity {
|
|||||||
private String knifeUnit;
|
private String knifeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工具类型(物料分类)
|
* 刀具类型(物料分类)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "工具类型", readConverterExp = "物料分类")
|
@Excel(name = "刀具类型", readConverterExp = "物料分类")
|
||||||
private String knifeType;
|
private String knifeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全库存
|
* 安全库存
|
||||||
*/
|
*/
|
||||||
@Excel(name = "安全库存")
|
@Excel(name = "安全库存")
|
||||||
private String safeStock;
|
private Integer safeStock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准数量
|
* 标准数量
|
||||||
@ -77,15 +77,15 @@ public class BaseKnife extends BaseEntity {
|
|||||||
private String areaCode;
|
private String areaCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工具寿命
|
* 刀具寿命
|
||||||
*/
|
*/
|
||||||
@Excel(name = "工具寿命")
|
@Excel(name = "刀具寿命")
|
||||||
private String knifeLife;
|
private Integer knifeLife;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工具状态
|
* 刀具状态
|
||||||
*/
|
*/
|
||||||
@Excel(name = "工具状态")
|
@Excel(name = "刀具状态")
|
||||||
private Integer knifeFineState;
|
private Integer knifeFineState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -262,7 +262,7 @@ public class BaseKnife extends BaseEntity {
|
|||||||
this.knifeType = knifeType;
|
this.knifeType = knifeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSafeStock() {
|
public Integer getSafeStock() {
|
||||||
return safeStock;
|
return safeStock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ public class BaseKnife extends BaseEntity {
|
|||||||
this.itemOrProduct = itemOrProduct;
|
this.itemOrProduct = itemOrProduct;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSafeStock(String safeStock) {
|
public void setSafeStock(Integer safeStock) {
|
||||||
this.safeStock = safeStock;
|
this.safeStock = safeStock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,11 +294,11 @@ public class BaseKnife extends BaseEntity {
|
|||||||
this.areaCode = areaCode;
|
this.areaCode = areaCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKnifeLife() {
|
public Integer getKnifeLife() {
|
||||||
return knifeLife;
|
return knifeLife;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKnifeLife(String knifeLife) {
|
public void setKnifeLife(Integer knifeLife) {
|
||||||
this.knifeLife = knifeLife;
|
this.knifeLife = knifeLife;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public class BaseTechnologyBom extends BaseEntity
|
|||||||
|
|
||||||
/** 消耗定额 */
|
/** 消耗定额 */
|
||||||
@Excel(name = "消耗定额")
|
@Excel(name = "消耗定额")
|
||||||
private String expendLife;
|
private Integer expendLife;
|
||||||
|
|
||||||
/** 锁定开始时间 */
|
/** 锁定开始时间 */
|
||||||
@Excel(name = "锁定开始时间")
|
@Excel(name = "锁定开始时间")
|
||||||
@ -135,12 +135,12 @@ public class BaseTechnologyBom extends BaseEntity
|
|||||||
{
|
{
|
||||||
return knifeCount;
|
return knifeCount;
|
||||||
}
|
}
|
||||||
public void setExpendLife(String expendLife)
|
public void setExpendLife(Integer expendLife)
|
||||||
{
|
{
|
||||||
this.expendLife = expendLife;
|
this.expendLife = expendLife;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getExpendLife()
|
public Integer getExpendLife()
|
||||||
{
|
{
|
||||||
return expendLife;
|
return expendLife;
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,11 @@ public class MdItem extends BaseEntity {
|
|||||||
private String itemTypeName;
|
private String itemTypeName;
|
||||||
private String enableFlag;
|
private String enableFlag;
|
||||||
private String safeStockFlag;
|
private String safeStockFlag;
|
||||||
private Double minStock;
|
private Integer minStock;
|
||||||
private Double maxStock;
|
private Double maxStock;
|
||||||
private String highValue;
|
private String highValue;
|
||||||
private Integer attr1;
|
private Integer attr1;
|
||||||
private String attr2;
|
private Integer attr2;
|
||||||
private String attr3;
|
private String attr3;
|
||||||
private String attr4;
|
private String attr4;
|
||||||
|
|
||||||
@ -163,11 +163,11 @@ public class MdItem extends BaseEntity {
|
|||||||
this.safeStockFlag = safeStockFlag;
|
this.safeStockFlag = safeStockFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getMinStock() {
|
public Integer getMinStock() {
|
||||||
return minStock;
|
return minStock;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMinStock(Double minStock) {
|
public void setMinStock(Integer minStock) {
|
||||||
this.minStock = minStock;
|
this.minStock = minStock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,11 +195,11 @@ public class MdItem extends BaseEntity {
|
|||||||
this.attr1 = attr1;
|
this.attr1 = attr1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAttr2() {
|
public Integer getAttr2() {
|
||||||
return attr2;
|
return attr2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAttr2(String attr2) {
|
public void setAttr2(Integer attr2) {
|
||||||
this.attr2 = attr2;
|
this.attr2 = attr2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,9 +140,9 @@ public class WmsInTaskController extends BaseController {
|
|||||||
baseKnife.setKnifeUnit(mbbBdMrlMitm.getUnitName());
|
baseKnife.setKnifeUnit(mbbBdMrlMitm.getUnitName());
|
||||||
baseKnife.setKnifeType(mbbBdMrlMitm.getItemTypeName());
|
baseKnife.setKnifeType(mbbBdMrlMitm.getItemTypeName());
|
||||||
baseKnife.setAreaCode(wmStorageArea.getAreaCode());
|
baseKnife.setAreaCode(wmStorageArea.getAreaCode());
|
||||||
baseKnife.setSafeStock(mbbBdMrlMitm.getMinStock().toString().split("\\.")[0]);
|
baseKnife.setSafeStock(mbbBdMrlMitm.getMinStock());
|
||||||
baseKnife.setStandardQuantity("1");
|
baseKnife.setStandardQuantity("1");
|
||||||
baseKnife.setKnifeLife("100");
|
baseKnife.setKnifeLife(100);
|
||||||
baseKnife.setKnifeFineState(0);
|
baseKnife.setKnifeFineState(0);
|
||||||
baseKnife.setPlanSheet("");
|
baseKnife.setPlanSheet("");
|
||||||
baseKnife.setResetCount(mbbBdMrlMitm.getAttr1());
|
baseKnife.setResetCount(mbbBdMrlMitm.getAttr1());
|
||||||
|
@ -154,9 +154,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="batchMbbProduBom">
|
<insert id="batchMbbProduBom">
|
||||||
insert into MBB_PRODU_BOM( MBB_PRODU_BOM_ID, BOM_ROUTE_ID, MD_ITEM_ID, MD_ITEM_NAME, MD_ITEM_CODE, MD_ITEM_UNIT, STANDARD_DOSAGE, REMARK, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME) values
|
insert into MBB_PRODU_BOM( BOM_ROUTE_ID, MD_ITEM_ID, MD_ITEM_NAME, MD_ITEM_CODE, MD_ITEM_UNIT, STANDARD_DOSAGE, REMARK, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
( #{item.mbbProduBomId}, #{item.bomRouteId}, #{item.mdItemId}, #{item.mdItemName}, #{item.mdItemCode}, #{item.mdItemUnit}, #{item.standardDosage}, #{item.remark}, #{item.attr1}, #{item.attr2}, #{item.attr3}, #{item.attr4}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
( #{item.bomRouteId}, #{item.mdItemId}, #{item.mdItemName}, #{item.mdItemCode}, #{item.mdItemUnit}, #{item.standardDosage}, #{item.remark}, #{item.attr1}, #{item.attr2}, #{item.attr3}, #{item.attr4}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
@ -51,6 +51,7 @@
|
|||||||
max_stock,
|
max_stock,
|
||||||
high_value,
|
high_value,
|
||||||
attr1,
|
attr1,
|
||||||
|
attr2,
|
||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time,
|
||||||
remark
|
remark
|
||||||
@ -183,12 +184,9 @@
|
|||||||
enable_flag,
|
enable_flag,
|
||||||
</if>
|
</if>
|
||||||
safe_stock_flag,
|
safe_stock_flag,
|
||||||
<if test="safeStockFlag == 'Y'.toString()">
|
<if test="minStock != null and minStock != ''">
|
||||||
min_stock,
|
min_stock,
|
||||||
</if>
|
</if>
|
||||||
<if test="safeStockFlag == 'Y'.toString()">
|
|
||||||
max_stock,
|
|
||||||
</if>
|
|
||||||
<if test="highValue != null and highValue != ''">
|
<if test="highValue != null and highValue != ''">
|
||||||
high_value,
|
high_value,
|
||||||
</if>
|
</if>
|
||||||
@ -238,22 +236,19 @@
|
|||||||
#{enableFlag},
|
#{enableFlag},
|
||||||
</if>
|
</if>
|
||||||
#{safeStockFlag},
|
#{safeStockFlag},
|
||||||
<if test="safeStockFlag == 'Y'.toString() and minStock != null">
|
<if test="minStock != null and minStock != ''">
|
||||||
#{minStock},
|
#{minStock},
|
||||||
</if>
|
</if>
|
||||||
<if test="safeStockFlag == 'Y'.toString() and safeStockFlag != null">
|
|
||||||
#{maxStock},
|
|
||||||
</if>
|
|
||||||
<if test="highValue != null and highValue != ''">
|
<if test="highValue != null and highValue != ''">
|
||||||
#{highValue},
|
#{highValue},
|
||||||
</if>
|
</if>
|
||||||
<if test="remark != null and remark != ''">
|
<if test="remark != null and remark != ''">
|
||||||
#{remark},
|
#{remark},
|
||||||
</if>
|
</if>
|
||||||
<if test="attr1 != null and attr1 != ''">
|
<if test="attr1 != null">
|
||||||
#{attr1},
|
#{attr1},
|
||||||
</if>
|
</if>
|
||||||
<if test="attr2 != null and attr2 != ''">
|
<if test="attr2 != null">
|
||||||
#{attr2},
|
#{attr2},
|
||||||
</if>
|
</if>
|
||||||
<if test="attr3 != null and attr3 != 0">
|
<if test="attr3 != null and attr3 != 0">
|
||||||
@ -319,10 +314,10 @@
|
|||||||
<if test="remark != null and remark != ''">
|
<if test="remark != null and remark != ''">
|
||||||
remark = #{remark},
|
remark = #{remark},
|
||||||
</if>
|
</if>
|
||||||
<if test="attr1 != null and attr1 != ''">
|
<if test="attr1 != null">
|
||||||
attr1=#{attr1},
|
attr1=#{attr1},
|
||||||
</if>
|
</if>
|
||||||
<if test="attr2 != null and attr2 != ''">
|
<if test="attr2 != null">
|
||||||
attr2=#{attr2},
|
attr2=#{attr2},
|
||||||
</if>
|
</if>
|
||||||
<if test="attr3 != null and attr3 != 0">
|
<if test="attr3 != null and attr3 != 0">
|
||||||
|
@ -344,13 +344,13 @@
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="batchWmsOutPlanDetail">
|
<insert id="batchWmsOutPlanDetail">
|
||||||
insert into WMS_OUT_PLAN_DETAIL(WMS_OUT_PLAN_DETAIL_ID, WMS_OUT_PLAN_ID, MD_ITEM_ID, MD_ITEM_CODE, MD_ITEM_NAME,
|
insert into WMS_OUT_PLAN_DETAIL( WMS_OUT_PLAN_ID, MD_ITEM_ID, MD_ITEM_CODE, MD_ITEM_NAME,
|
||||||
MD_ITEM_UNIT, PLANNED_QUANTITY, REAL_QUANTITY, DETAIL_BATCH_NUM,
|
MD_ITEM_UNIT, PLANNED_QUANTITY, REAL_QUANTITY, DETAIL_BATCH_NUM,
|
||||||
WM_STORAGE_AREA_ID, WM_STORAGE_AREA_CODE, WM_STORAGE_AREA_NAME, DETAIL_STATE,
|
WM_STORAGE_AREA_ID, WM_STORAGE_AREA_CODE, WM_STORAGE_AREA_NAME, DETAIL_STATE,
|
||||||
REMARK, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY,
|
REMARK, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY,
|
||||||
UPDATE_TIME) values
|
UPDATE_TIME) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
(#{item.wmsOutPlanDetailId}, #{item.wmsOutPlanId}, #{item.mdItemId}, #{item.mdItemCode}, #{item.mdItemName},
|
( #{item.wmsOutPlanId}, #{item.mdItemId}, #{item.mdItemCode}, #{item.mdItemName},
|
||||||
#{item.mdItemUnit}, #{item.plannedQuantity}, #{item.realQuantity}, #{item.detailBatchNum},
|
#{item.mdItemUnit}, #{item.plannedQuantity}, #{item.realQuantity}, #{item.detailBatchNum},
|
||||||
#{item.wmStorageAreaId}, #{item.wmStorageAreaCode}, #{item.wmStorageAreaName}, #{item.detailState},
|
#{item.wmStorageAreaId}, #{item.wmStorageAreaCode}, #{item.wmStorageAreaName}, #{item.detailState},
|
||||||
#{item.remark}, #{item.attr1}, #{item.attr2}, #{item.attr3}, #{item.attr4}, #{item.createBy},
|
#{item.remark}, #{item.attr1}, #{item.attr2}, #{item.attr3}, #{item.attr4}, #{item.createBy},
|
||||||
@ -360,12 +360,12 @@
|
|||||||
|
|
||||||
<insert id="insertWmsOutPlanDetail" parameterType="WmsOutPlanDetail" useGeneratedKeys="true"
|
<insert id="insertWmsOutPlanDetail" parameterType="WmsOutPlanDetail" useGeneratedKeys="true"
|
||||||
keyProperty="wmsOutPlanDetailId">
|
keyProperty="wmsOutPlanDetailId">
|
||||||
insert into WMS_OUT_PLAN_DETAIL(WMS_OUT_PLAN_DETAIL_ID, WMS_OUT_PLAN_ID, MD_ITEM_ID, MD_ITEM_CODE, MD_ITEM_NAME,
|
insert into WMS_OUT_PLAN_DETAIL( WMS_OUT_PLAN_ID, MD_ITEM_ID, MD_ITEM_CODE, MD_ITEM_NAME,
|
||||||
MD_ITEM_UNIT, PLANNED_QUANTITY, REAL_QUANTITY, DETAIL_BATCH_NUM,
|
MD_ITEM_UNIT, PLANNED_QUANTITY, REAL_QUANTITY, DETAIL_BATCH_NUM,
|
||||||
WM_STORAGE_AREA_ID, WM_STORAGE_AREA_CODE, WM_STORAGE_AREA_NAME, DETAIL_STATE,
|
WM_STORAGE_AREA_ID, WM_STORAGE_AREA_CODE, WM_STORAGE_AREA_NAME, DETAIL_STATE,
|
||||||
REMARK, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY,
|
REMARK, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY,
|
||||||
UPDATE_TIME)
|
UPDATE_TIME)
|
||||||
values (#{wmsOutPlanDetailId}, #{wmsOutPlanId}, #{mdItemId}, #{mdItemCode}, #{mdItemName},
|
values ( #{wmsOutPlanId}, #{mdItemId}, #{mdItemCode}, #{mdItemName},
|
||||||
#{mdItemUnit}, #{plannedQuantity}, #{realQuantity}, #{detailBatchNum},
|
#{mdItemUnit}, #{plannedQuantity}, #{realQuantity}, #{detailBatchNum},
|
||||||
#{wmStorageAreaId}, #{wmStorageAreaCode}, #{wmStorageAreaName}, #{detailState},
|
#{wmStorageAreaId}, #{wmStorageAreaCode}, #{wmStorageAreaName}, #{detailState},
|
||||||
#{remark}, #{attr1}, #{attr2}, #{attr3}, #{attr4}, #{createBy},
|
#{remark}, #{attr1}, #{attr2}, #{attr3}, #{attr4}, #{createBy},
|
||||||
|
Loading…
Reference in New Issue
Block a user