opt:优化混料组盘入库带任务执行逻辑
This commit is contained in:
@@ -365,7 +365,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
|
|||||||
.eq("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"))
|
.eq("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||||
.eq("sect_code", param.getSect_code())
|
.eq("sect_code", param.getSect_code())
|
||||||
;
|
;
|
||||||
if(!param.getStoragevehicle_code().startsWith("VTP")){//虚拟托盘不验证空位
|
if(!StrUtil.isEmptyIfStr(param.getStoragevehicle_code())&&!param.getStoragevehicle_code().startsWith("VTP")){//虚拟托盘不验证空位
|
||||||
query.isNull("storagevehicle_code");
|
query.isNull("storagevehicle_code");
|
||||||
}
|
}
|
||||||
List<Structattr> list = this.list(query);
|
List<Structattr> list = this.list(query);
|
||||||
|
|||||||
@@ -329,9 +329,9 @@ public class InboundPdaServiceImpl implements InboundPdaService {
|
|||||||
jsonMst.put("biz_date", DateUtil.now());
|
jsonMst.put("biz_date", DateUtil.now());
|
||||||
// 组织明细数据
|
// 组织明细数据
|
||||||
ArrayList<HashMap> tableData = new ArrayList<>();
|
ArrayList<HashMap> tableData = new ArrayList<>();
|
||||||
HashMap<String, Object> dtl = new HashMap<>();
|
|
||||||
// GroupPlate plateDao = plateDaoList.get(0);
|
// GroupPlate plateDao = plateDaoList.get(0);
|
||||||
for (GroupPlate plateDao : plateDaoList) {
|
for (GroupPlate plateDao : plateDaoList) {
|
||||||
|
HashMap<String, Object> dtl = new HashMap<>();
|
||||||
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getByCode(plateDao.getMaterial_code());
|
MdMeMaterialbase materDao = iMdMeMaterialbaseService.getByCode(plateDao.getMaterial_code());
|
||||||
dtl.put("storagevehicle_code", plateDao.getStoragevehicle_code());
|
dtl.put("storagevehicle_code", plateDao.getStoragevehicle_code());
|
||||||
dtl.put("material_id", materDao.getMaterial_id());
|
dtl.put("material_id", materDao.getMaterial_id());
|
||||||
@@ -362,10 +362,11 @@ public class InboundPdaServiceImpl implements InboundPdaService {
|
|||||||
jsonMst1.put("stor_code", storeDao.getStor_code());
|
jsonMst1.put("stor_code", storeDao.getStor_code());
|
||||||
jsonMst1.put("storagevehicle_code", groupPlateInboundDto.getVehicle_code());
|
jsonMst1.put("storagevehicle_code", groupPlateInboundDto.getVehicle_code());
|
||||||
// 组织明细数据
|
// 组织明细数据
|
||||||
IOStorInvDtl dtlDao = ioStorInvDtlMapper.selectOne(
|
List<IOStorInvDtl> ioStorInvDtls = ioStorInvDtlMapper.selectList(
|
||||||
new QueryWrapper<IOStorInvDtl>().lambda()
|
new QueryWrapper<IOStorInvDtl>().lambda()
|
||||||
.eq(IOStorInvDtl::getIostorinv_id, iostorinv_id)
|
.eq(IOStorInvDtl::getIostorinv_id, iostorinv_id)
|
||||||
);
|
);
|
||||||
|
IOStorInvDtl dtlDao = ioStorInvDtls.get(0);
|
||||||
// 查找分配明细
|
// 查找分配明细
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("iostorinvdtl_id", dtlDao.getIostorinvdtl_id());
|
map.put("iostorinvdtl_id", dtlDao.getIostorinvdtl_id());
|
||||||
@@ -540,10 +541,11 @@ public class InboundPdaServiceImpl implements InboundPdaService {
|
|||||||
Map<String, Object> jsonMst = new HashMap<>();
|
Map<String, Object> jsonMst = new HashMap<>();
|
||||||
jsonMst.put("point_code", whereJson.getString("point_code"));
|
jsonMst.put("point_code", whereJson.getString("point_code"));
|
||||||
// 组织明细数据
|
// 组织明细数据
|
||||||
IOStorInvDtl dtlDao = ioStorInvDtlMapper.selectOne(
|
List<IOStorInvDtl> ioStorInvDtls = ioStorInvDtlMapper.selectList(
|
||||||
new QueryWrapper<IOStorInvDtl>().lambda()
|
new QueryWrapper<IOStorInvDtl>().lambda()
|
||||||
.eq(IOStorInvDtl::getIostorinv_id, whereJson.getString("iostorinv_id"))
|
.eq(IOStorInvDtl::getIostorinv_id, whereJson.getString("iostorinv_id"))
|
||||||
);
|
);
|
||||||
|
IOStorInvDtl dtlDao = ioStorInvDtls.get(0);
|
||||||
// 查找分配明细
|
// 查找分配明细
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("iostorinvdtl_id",dtlDao.getIostorinvdtl_id());
|
map.put("iostorinvdtl_id",dtlDao.getIostorinvdtl_id());
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvMapper;
|
|||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDtlDto;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDtlDto;
|
||||||
import org.nl.wms.warehouse_manage.inventory.IStInventoryService;
|
import org.nl.wms.warehouse_manage.inventory.IStInventoryService;
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.enums.InventoryChangeType;
|
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.param.impl.AddInvParam;
|
|
||||||
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
|
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
|
||||||
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
|
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
|
||||||
import org.nl.wms.warehouse_manage.service.dto.GroupPlateDto;
|
import org.nl.wms.warehouse_manage.service.dto.GroupPlateDto;
|
||||||
@@ -703,28 +701,30 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
|
|||||||
.eq(IOStorInvDis::getIostorinvdtl_id,disList.get(0).getIostorinvdtl_id())
|
.eq(IOStorInvDis::getIostorinvdtl_id,disList.get(0).getIostorinvdtl_id())
|
||||||
.ne(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
.ne(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||||
);
|
);
|
||||||
final List<AddInvParam> addInvParams = new ArrayList<>();
|
// final List<AddInvParam> addInvParams = new ArrayList<>();
|
||||||
for (IOStorInvDis invDis : disList) {
|
// for (IOStorInvDis invDis : disList) {
|
||||||
AddInvParam addParam = new AddInvParam();
|
// AddInvParam addParam = new AddInvParam();
|
||||||
addParam.setPcsn(invDis.getPcsn());
|
// addParam.setPcsn(invDis.getPcsn());
|
||||||
addParam.setMaterialCode(invDis.getMaterial_code());
|
// addParam.setMaterialCode(invDis.getMaterial_code());
|
||||||
addParam.setStoragevehicleCode(invDis.getStoragevehicle_code());
|
// addParam.setStoragevehicleCode(invDis.getStoragevehicle_code());
|
||||||
addParam.setUnitName(invDis.getQty_unit_name());
|
// addParam.setUnitName(invDis.getQty_unit_name());
|
||||||
addParam.setUnitId(invDis.getQty_unit_id());
|
// addParam.setUnitId(invDis.getQty_unit_id());
|
||||||
addParam.setQty(invDis.getPlan_qty());
|
// addParam.setQty(invDis.getPlan_qty());
|
||||||
addInvParams.add(addParam);
|
// addInvParams.add(addParam);
|
||||||
}
|
// }
|
||||||
iStInventoryService.changeInventory(InventoryChangeType.ADD_INV, addInvParams);
|
// iStInventoryService.changeInventory(InventoryChangeType.ADD_INV, addInvParams);
|
||||||
// 如果分配明细全部完成则更新明细表状态
|
// 如果分配明细全部完成则更新明细表状态
|
||||||
if (countDis == 0){
|
if (countDis == 0){
|
||||||
// 更新明细表状态
|
// 更新明细表状态
|
||||||
final IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(disList.get(0).getIostorinvdtl_id());
|
for (IOStorInvDis ioStorInvDis : disList) {
|
||||||
|
final IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(ioStorInvDis.getIostorinvdtl_id());
|
||||||
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
|
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
|
||||||
ioStorInvDtlMapper.updateById(ioStorInvDtl);
|
ioStorInvDtlMapper.updateById(ioStorInvDtl);
|
||||||
callbackStrategyPublish.callbackStrategy(ioStorInvDtl.getCallback_strategy(),ioStorInvDtl);
|
callbackStrategyPublish.callbackStrategy(ioStorInvDtl.getCallback_strategy(),ioStorInvDtl);
|
||||||
|
}
|
||||||
// 查看明细是否全部完成
|
// 查看明细是否全部完成
|
||||||
int countDtl = ioStorInvDtlMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDtl.class)
|
int countDtl = ioStorInvDtlMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDtl.class)
|
||||||
.eq(IOStorInvDtl::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
.eq(IOStorInvDtl::getIostorinv_id,disList.get(0).getIostorinv_id())
|
||||||
.ne(IOStorInvDtl::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
.ne(IOStorInvDtl::getBill_status,IOSEnum.BILL_STATUS.code("完成"))
|
||||||
);
|
);
|
||||||
// 如果明细全部完成则更新主表状态
|
// 如果明细全部完成则更新主表状态
|
||||||
@@ -735,7 +735,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
|
|||||||
.set(IOStorInv::getConfirm_optid, SecurityUtils.getCurrentUserId())
|
.set(IOStorInv::getConfirm_optid, SecurityUtils.getCurrentUserId())
|
||||||
.set(IOStorInv::getConfirm_optname, SecurityUtils.getCurrentNickName())
|
.set(IOStorInv::getConfirm_optname, SecurityUtils.getCurrentNickName())
|
||||||
.set(IOStorInv::getConfirm_time, DateUtil.now())
|
.set(IOStorInv::getConfirm_time, DateUtil.now())
|
||||||
.eq(IOStorInv::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
.eq(IOStorInv::getIostorinv_id,disList.get(0).getIostorinv_id())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,23 +47,19 @@ public class DealPurchaseRecBillCallback implements CallbackStrategy {
|
|||||||
final String orderCode = param.getSource_bill_code();
|
final String orderCode = param.getSource_bill_code();
|
||||||
Purchasemst purchasemst = purchaseService.getOne(new LambdaQueryWrapper<Purchasemst>()
|
Purchasemst purchasemst = purchaseService.getOne(new LambdaQueryWrapper<Purchasemst>()
|
||||||
.eq(Purchasemst::getBill_id, orderCode));
|
.eq(Purchasemst::getBill_id, orderCode));
|
||||||
List<IOStorInvDtl> ioStorInvDtls = ioStorInvDtlMapper.selectList(new LambdaQueryWrapper<IOStorInvDtl>()
|
|
||||||
.eq(IOStorInvDtl::getIostorinv_id, param.getIostorinv_id()));
|
|
||||||
List<EasAuditRequestDto.EasAuditEntryDto> entryList = new ArrayList<>();
|
List<EasAuditRequestDto.EasAuditEntryDto> entryList = new ArrayList<>();
|
||||||
for (IOStorInvDtl item : ioStorInvDtls) {
|
|
||||||
Purchasedtl purchasedtl = purchasedtlService.getOne(new LambdaQueryWrapper<Purchasedtl>()
|
Purchasedtl purchasedtl = purchasedtlService.getOne(new LambdaQueryWrapper<Purchasedtl>()
|
||||||
.eq(Purchasedtl::getBill_id, orderCode)
|
.eq(Purchasedtl::getBill_id, orderCode)
|
||||||
.eq(Purchasedtl::getSku_code, item.getMaterial_code()));
|
.eq(Purchasedtl::getSku_code, param.getMaterial_code()));
|
||||||
|
|
||||||
purchasedtl.setInstock_qty(item.getPlan_qty().add(purchasedtl.getInstock_qty()));
|
purchasedtl.setInstock_qty(param.getPlan_qty().add(purchasedtl.getInstock_qty()));
|
||||||
purchasedtlService.updateById(purchasedtl);
|
purchasedtlService.updateById(purchasedtl);
|
||||||
|
|
||||||
EasAuditRequestDto.EasAuditEntryDto easAuditEntryDto = new EasAuditRequestDto.EasAuditEntryDto();
|
EasAuditRequestDto.EasAuditEntryDto easAuditEntryDto = new EasAuditRequestDto.EasAuditEntryDto();
|
||||||
easAuditEntryDto.setSeq(Integer.parseInt(purchasedtl.getItem_no()));
|
easAuditEntryDto.setSeq(Integer.parseInt(purchasedtl.getItem_no()));
|
||||||
easAuditEntryDto.setQty(item.getPlan_qty());
|
easAuditEntryDto.setQty(param.getPlan_qty());
|
||||||
easAuditEntryDto.setEntryId(purchasedtl.getEntry_id());
|
easAuditEntryDto.setEntryId(purchasedtl.getEntry_id());
|
||||||
entryList.add(easAuditEntryDto);
|
entryList.add(easAuditEntryDto);
|
||||||
}
|
|
||||||
List<Purchasedtl> list = purchasedtlService.list(new LambdaQueryWrapper<Purchasedtl>()
|
List<Purchasedtl> list = purchasedtlService.list(new LambdaQueryWrapper<Purchasedtl>()
|
||||||
.eq(Purchasedtl::getBill_id, orderCode));
|
.eq(Purchasedtl::getBill_id, orderCode));
|
||||||
boolean flag = list.stream().anyMatch(i -> i.getQty().compareTo(i.getInstock_qty()) != 0);
|
boolean flag = list.stream().anyMatch(i -> i.getQty().compareTo(i.getInstock_qty()) != 0);
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ spring:
|
|||||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms_standardv2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms_standardv2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:5XXX/3GEgdUnRZd4cbVnDL6BA6P9YToc}
|
password: ${DB_PWD:5XXX/3GEgdUnRZd4cbVnDL6BA6P9YToc}
|
||||||
|
# password: ${DB_PWD:123456}
|
||||||
druid:
|
druid:
|
||||||
# 基础连接池配置
|
# 基础连接池配置
|
||||||
initial-size: 15
|
initial-size: 15
|
||||||
@@ -61,14 +62,14 @@ spring:
|
|||||||
max-active: 40
|
max-active: 40
|
||||||
max-wait: 9000
|
max-wait: 9000
|
||||||
# 连接回收配置
|
# 连接回收配置
|
||||||
remove-abandoned: false # ⚠️ 生产环境建议改为 false,你之前的日志也警告了
|
remove-abandoned: false # ⚠️ 生产环境建议改为 false
|
||||||
remove-abandoned-timeout-millis: 180000
|
remove-abandoned-timeout-millis: 180000
|
||||||
# 连接检测配置
|
# 连接检测配置
|
||||||
time-between-eviction-runs-millis: 20000
|
time-between-eviction-runs-millis: 20000
|
||||||
min-evictable-idle-time-millis: 300000
|
min-evictable-idle-time-millis: 300000
|
||||||
max-evictable-idle-time-millis: 900000
|
max-evictable-idle-time-millis: 900000
|
||||||
test-while-idle: true
|
test-while-idle: true
|
||||||
test-on-borrow: false
|
test-on-borrow: true
|
||||||
test-on-return: false
|
test-on-return: false
|
||||||
validation-query: SELECT 1 # MySQL 用 SELECT 1,Oracle 才用 select 1 from dual
|
validation-query: SELECT 1 # MySQL 用 SELECT 1,Oracle 才用 select 1 from dual
|
||||||
|
|
||||||
@@ -77,19 +78,19 @@ spring:
|
|||||||
DruidFilter,stat # 修正:stat是监控统计,wall是SQL防火墙
|
DruidFilter,stat # 修正:stat是监控统计,wall是SQL防火墙
|
||||||
log-abandoned: false
|
log-abandoned: false
|
||||||
eas:
|
eas:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: oracle.jdbc.OracleDriver
|
||||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms_standardv2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
url: jdbc:oracle:thin:@//192.168.100.96:1521/orcl
|
||||||
username: ${EAS_DB_USER:root}
|
username: ${EAS_DB_USER:EAS_NOBLE}
|
||||||
password: ${DB_PWD:5XXX/3GEgdUnRZd4cbVnDL6BA6P9YToc}
|
password: ${DB_PWD:abc123}
|
||||||
druid:
|
druid:
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
min-idle: 5
|
min-idle: 5
|
||||||
max-active: 20
|
max-active: 20
|
||||||
test-while-idle: true
|
test-while-idle: true
|
||||||
validation-query: SELECT 1 # 修正:MySQL 用 SELECT 1
|
validation-query: SELECT 1 FROM DUAL
|
||||||
# 如果 eas 也需要监控,添加下面两行(可选)
|
# 如果 eas 也需要监控,添加下面两行(可选)
|
||||||
filters:
|
filters:
|
||||||
DruidFilter,stat
|
stat,wall
|
||||||
log-abandoned: false
|
log-abandoned: false
|
||||||
redis:
|
redis:
|
||||||
#数据库索引
|
#数据库索引
|
||||||
@@ -175,17 +176,19 @@ sa-token:
|
|||||||
lucene:
|
lucene:
|
||||||
index:
|
index:
|
||||||
path: D:\lucene\index
|
path: D:\lucene\index
|
||||||
eas:
|
|
||||||
webservice:
|
|
||||||
wsdl: http://192.168.100.100:8080/ormrpc/services/WSNLWQFacade?wsdl
|
|
||||||
namespace: http://ws.eas.kingdee.com/
|
|
||||||
inbound:
|
|
||||||
liku-codes: LK01
|
|
||||||
erp:
|
erp:
|
||||||
loginUrl: http://192.168.100.100:8080/ormrpc/services/EASLogin?wsdl
|
loginUrl: http://192.168.100.100:8080/ormrpc/services/EASLogin?wsdl
|
||||||
busUrl: http://192.168.100.100:8080/ormrpc/services/WSNLMESFacade?wsdl
|
busUrl: http://192.168.100.100:8080/ormrpc/services/WSNLMESFacade?wsdl
|
||||||
username: user
|
username: user
|
||||||
password: Noble123!9
|
password: test
|
||||||
slnName: eas
|
slnName: eas
|
||||||
dcName: test
|
dcName: testNL_YK
|
||||||
dbType: 1
|
dbType: 1
|
||||||
|
#erp: # 正式
|
||||||
|
# loginUrl: http://192.168.100.9:6896/ormrpc/services/EASLogin?wsdl
|
||||||
|
# busUrl: http://192.168.100.9:6896/ormrpc/services/WSNLMESFacade?wsdl
|
||||||
|
# username: mes_eas2
|
||||||
|
# password: eas@123456
|
||||||
|
# slnName: eas
|
||||||
|
# dcName: orcl
|
||||||
|
# dbType: 1
|
||||||
|
|||||||
Reference in New Issue
Block a user