|
|
|
@ -39,6 +39,8 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private CallItemMapper callItemMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CallItemService callItemService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void sfcDispatchCallItem(String site, String user, List<SfcDispatchDto> sfcDispatchList) {
|
|
|
|
@ -271,8 +273,31 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void refreshCallItemPda(String site, String user, List<CallItem> callItemList) {
|
|
|
|
|
public void refreshCallItemPda(List<CallItem> callItemList) {
|
|
|
|
|
List<CallItem> callItems = new ArrayList<>();
|
|
|
|
|
List<String> list = new ArrayList<>();
|
|
|
|
|
for (CallItem callItem:callItemList) {
|
|
|
|
|
String handle = callItem.getHandle();
|
|
|
|
|
list.add(handle);
|
|
|
|
|
CallItem call = new CallItem();
|
|
|
|
|
call.setHandle(handle);
|
|
|
|
|
callItems.add(call);
|
|
|
|
|
}
|
|
|
|
|
List<CallItem> itemList = callItemMapper.findRefreshCallItemPda(list);
|
|
|
|
|
|
|
|
|
|
Boolean bl = false;
|
|
|
|
|
for (int i = 0; i < callItemList.size(); i++) {
|
|
|
|
|
BigDecimal oldQty = callItemList.get(i).getRequiredQty();
|
|
|
|
|
BigDecimal newQty = itemList.get(i).getRequiredQty();
|
|
|
|
|
if (oldQty.compareTo(newQty) == -1){
|
|
|
|
|
callItems.get(i).setStatus(Constants.CALL_ITEM_STATUS_NEW);
|
|
|
|
|
callItems.get(i).setRequiredQty(newQty);
|
|
|
|
|
bl = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (bl){
|
|
|
|
|
callItemService.updateBatchById(callItems);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -329,7 +354,17 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ("GB".equals(itemGroup) && blankingSize.contains("*")) {
|
|
|
|
|
if (StringUtil.isBlank(blankingSize)) {
|
|
|
|
|
callItem.setSizeReqQty(callItem.getRequiredQty());
|
|
|
|
|
compQtyMap.put(component, callItem.getRequiredQty());
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ("GB".equals(itemGroup)) {
|
|
|
|
|
if (!blankingSize.contains("*")) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String []size = blankingSize.split("\\*");
|
|
|
|
|
if (size != null && size.length >= 2) {
|
|
|
|
|
int sizeLength = size.length;
|
|
|
|
@ -342,7 +377,13 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
|
|
|
|
|
compQtyMap.put(component, (compQtyMap.get(component) != null ? compQtyMap.get(component).add(sizeReqQty) : sizeReqQty));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
String []size = blankingSize.split("\\*");
|
|
|
|
|
String[] size = new String[1];
|
|
|
|
|
if (blankingSize.contains("*")) {
|
|
|
|
|
size = blankingSize.split("\\*");
|
|
|
|
|
} else {
|
|
|
|
|
size[0] = blankingSize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (size != null && size.length >= 1) {
|
|
|
|
|
int sizeLength = size.length;
|
|
|
|
|
BigDecimal length = new BigDecimal(size[sizeLength-1]);
|
|
|
|
|