opt:eas同步单据错填优化
This commit is contained in:
@@ -69,12 +69,24 @@ public class InboundEasSyncServiceImpl implements InboundEasSyncService {
|
||||
if (easMst == null) {
|
||||
throw new BadRequestException("EAS采购单同步失败:EAS系统中未找到单据: " + billId);
|
||||
}
|
||||
//判断是否因为填错仓库号保证中鼎一致
|
||||
List<Purchasedtl> purchasedtlList = purchasedtlMapper.selectList(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlList(billId);
|
||||
boolean hasZDEas = easDtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (!purchasedtlList.isEmpty() &&!hasZDEas){ //不包含立库则判断是否是填错仓库单据
|
||||
boolean hasZD = purchasedtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (hasZD){//原来单据包含中鼎立库
|
||||
billChangeDto.setStatus(3);//删除中鼎异常单据
|
||||
wmsToZDWmdService.syncPurchaseReceiving(billChangeDto);
|
||||
}
|
||||
}
|
||||
|
||||
purchasedtlMapper.delete(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
purchasemstMapper.delete(new LambdaQueryWrapper<Purchasemst>()
|
||||
.eq(Purchasemst::getBill_id, billId));
|
||||
//更新单据
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlList(billId);
|
||||
Boolean allZD = true;
|
||||
for (Purchasedtl dtl : easDtlList) {
|
||||
if (ZD_STOR_SET.contains(dtl.getHouse_code())){
|
||||
@@ -133,12 +145,24 @@ public class InboundEasSyncServiceImpl implements InboundEasSyncService {
|
||||
if (easMst == null) {
|
||||
throw new BadRequestException("EAS采购单同步失败:EAS系统中未找到单据: " + billId);
|
||||
}
|
||||
//判断是否因为填错仓库号保证中鼎一致
|
||||
List<Purchasedtl> purchasedtlList = purchasedtlMapper.selectList(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlListByTransfer(billId);
|
||||
boolean hasZDEas = easDtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (!purchasedtlList.isEmpty() &&!hasZDEas){ //不包含立库则判断是否是填错仓库单据
|
||||
boolean hasZD = purchasedtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (hasZD){//原来单据包含中鼎立库
|
||||
billChangeDto.setStatus(3);//删除中鼎异常单据
|
||||
wmsToZDWmdService.syncPurchaseReceiving(billChangeDto);
|
||||
}
|
||||
}
|
||||
|
||||
purchasedtlMapper.delete(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
purchasemstMapper.delete(new LambdaQueryWrapper<Purchasemst>()
|
||||
.eq(Purchasemst::getBill_id, billId));
|
||||
//更新单据
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlListByTransfer(billId);
|
||||
Boolean allZD = true;
|
||||
for (Purchasedtl dtl : easDtlList) {
|
||||
if (ZD_STOR_SET.contains(dtl.getHouse_code())){
|
||||
@@ -197,12 +221,24 @@ public class InboundEasSyncServiceImpl implements InboundEasSyncService {
|
||||
if (easMst == null) {
|
||||
throw new BadRequestException("EAS采购单同步失败:EAS系统中未找到单据: " + billId);
|
||||
}
|
||||
//判断是否因为填错仓库号保证中鼎一致
|
||||
List<Purchasedtl> purchasedtlList = purchasedtlMapper.selectList(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlListByOther(billId);
|
||||
boolean hasZDEas = easDtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (!purchasedtlList.isEmpty() &&!hasZDEas){ //不包含立库则判断是否是填错仓库单据
|
||||
boolean hasZD = purchasedtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (hasZD){//原来单据包含中鼎立库
|
||||
billChangeDto.setStatus(3);//删除中鼎异常单据
|
||||
wmsToZDWmdService.syncPurchaseReceiving(billChangeDto);
|
||||
}
|
||||
}
|
||||
|
||||
purchasedtlMapper.delete(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
purchasemstMapper.delete(new LambdaQueryWrapper<Purchasemst>()
|
||||
.eq(Purchasemst::getBill_id, billId));
|
||||
//更新单据
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlListByOther(billId);
|
||||
Boolean allZD = true;
|
||||
for (Purchasedtl dtl : easDtlList) {
|
||||
if (ZD_STOR_SET.contains(dtl.getHouse_code())){
|
||||
@@ -261,12 +297,24 @@ public class InboundEasSyncServiceImpl implements InboundEasSyncService {
|
||||
if (easMst == null) {
|
||||
throw new BadRequestException("EAS采购单同步失败:EAS系统中未找到单据: " + billId);
|
||||
}
|
||||
//判断是否因为填错仓库号保证中鼎一致
|
||||
List<Purchasedtl> purchasedtlList = purchasedtlMapper.selectList(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlListByTransferOut(billId);
|
||||
boolean hasZDEas = easDtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (!purchasedtlList.isEmpty() &&!hasZDEas){ //不包含立库则判断是否是填错仓库单据
|
||||
boolean hasZD = purchasedtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (hasZD){//原来单据包含中鼎立库
|
||||
billChangeDto.setStatus(3);//删除中鼎异常单据
|
||||
wmsToZDWmdService.syncPurchaseReceiving(billChangeDto);
|
||||
}
|
||||
}
|
||||
|
||||
purchasedtlMapper.delete(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
purchasemstMapper.delete(new LambdaQueryWrapper<Purchasemst>()
|
||||
.eq(Purchasemst::getBill_id, billId));
|
||||
//更新单据
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlListByTransferOut(billId);
|
||||
Boolean allZD = true;
|
||||
for (Purchasedtl dtl : easDtlList) {
|
||||
if (ZD_STOR_SET.contains(dtl.getHouse_code())){
|
||||
@@ -325,12 +373,24 @@ public class InboundEasSyncServiceImpl implements InboundEasSyncService {
|
||||
if (easMst == null) {
|
||||
throw new BadRequestException("EAS采购单同步失败:EAS系统中未找到单据: " + billId);
|
||||
}
|
||||
//判断是否因为填错仓库号保证中鼎一致
|
||||
List<Purchasedtl> purchasedtlList = purchasedtlMapper.selectList(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlListByOtherOut(billId);
|
||||
boolean hasZDEas = easDtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (!purchasedtlList.isEmpty() &&!hasZDEas){ //不包含立库则判断是否是填错仓库单据
|
||||
boolean hasZD = purchasedtlList.stream().anyMatch((item) -> ZD_STOR_SET.contains(item.getHouse_code()));
|
||||
if (hasZD){//原来单据包含中鼎立库
|
||||
billChangeDto.setStatus(3);//删除中鼎异常单据
|
||||
wmsToZDWmdService.syncPurchaseReceiving(billChangeDto);
|
||||
}
|
||||
}
|
||||
|
||||
purchasedtlMapper.delete(new LambdaQueryWrapper<Purchasedtl>()
|
||||
.eq(Purchasedtl::getBill_id, billId));
|
||||
purchasemstMapper.delete(new LambdaQueryWrapper<Purchasemst>()
|
||||
.eq(Purchasemst::getBill_id, billId));
|
||||
//更新单据
|
||||
List<Purchasedtl> easDtlList = easQueryService.queryDtlListByOtherOut(billId);
|
||||
Boolean allZD = true;
|
||||
for (Purchasedtl dtl : easDtlList) {
|
||||
if (ZD_STOR_SET.contains(dtl.getHouse_code())){
|
||||
|
||||
Reference in New Issue
Block a user