|
@@ -184,13 +184,14 @@ public class WcsTaskSubService {
|
|
|
BigDecimal canQty= expectedQty.subtract(receivedQty);
|
|
|
InvLotAtt invLotAtt = new InvLotAtt();
|
|
|
invLotAtt.setLotatt07(palletNo);
|
|
|
+ invLotAtt.setLotatt08(asnNo);
|
|
|
List<InvLotLocId> invLotLocIds = invLotLocIdService.queryInvByInvLotatt(invLotAtt);
|
|
|
for (InvLotLocId invLotLocId:invLotLocIds) {
|
|
|
BigDecimal qty = invLotLocId.getQty();
|
|
|
- if (qty.compareTo(expectedQty) == 1){
|
|
|
+ if (qty.compareTo(canQty) == 1){
|
|
|
continue;
|
|
|
- }else if ( qty.compareTo(expectedQty) == 0){
|
|
|
- wmsDocAsnDetails.setReceivedQty(qty);
|
|
|
+ }else if ( qty.compareTo(canQty) == 0){
|
|
|
+ wmsDocAsnDetails.setReceivedQty(expectedQty);
|
|
|
int i = iWmsDocAsnDetailsService.updateWmsDocAsnDetails(wmsDocAsnDetails);
|
|
|
if ( i > 0){
|
|
|
wmsDocAsnDetails.setLineStatus(Constant.ASN_STS.STS40.getValue());
|
|
@@ -199,17 +200,13 @@ public class WcsTaskSubService {
|
|
|
con = false;
|
|
|
continue;
|
|
|
}
|
|
|
- }else if (qty.compareTo(expectedQty) == -1){
|
|
|
- wmsDocAsnDetails.setReceivedQty(qty);
|
|
|
- expectedQty = canQty;
|
|
|
+ }else if (qty.compareTo(canQty) == -1){
|
|
|
+ wmsDocAsnDetails.setReceivedQty(receivedQty.add(qty));
|
|
|
int i = iWmsDocAsnDetailsService.updateWmsDocAsnDetails(wmsDocAsnDetails);
|
|
|
if ( i > 0){
|
|
|
wmsDocAsnDetails.setLineStatus(Constant.ASN_STS.STS30.getValue());
|
|
|
iWmsDocAsnDetailsService.updateWmsDocAsnDetails(wmsDocAsnDetails);
|
|
|
con1 = false;
|
|
|
- }else {
|
|
|
- con = false;
|
|
|
- continue;
|
|
|
}
|
|
|
}
|
|
|
}
|