|
|
|
@ -21,6 +21,7 @@ import com.glxp.api.res.collect.CollectOrderBizResponse;
|
|
|
|
|
import com.glxp.api.res.collect.IoCollectOrderResponse;
|
|
|
|
|
import com.glxp.api.res.inout.IoSplitCodeResponse;
|
|
|
|
|
import com.glxp.api.service.auth.SysWorkplaceService;
|
|
|
|
|
import io.swagger.models.auth.In;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
@ -147,7 +148,8 @@ public class IoSplitFifoCodeService extends ServiceImpl<IoSplitFifoCodeMapper, I
|
|
|
|
|
List<CollectOrderBizResponse> bizList = collectOrderBizMapper.filterList(bizRequest);
|
|
|
|
|
if (CollUtil.isNotEmpty(bizList)){
|
|
|
|
|
//自动分配 工位存量、更新splitMap、更新 bizList上的 缺少存量数
|
|
|
|
|
autoAllocationWorkPace(splitMap,bizList);
|
|
|
|
|
Integer invAlert = autoAllocationWorkPace(splitMap, bizList);
|
|
|
|
|
collectOrderMapper.updateInvAlert(order.getId(),invAlert);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -159,7 +161,8 @@ public class IoSplitFifoCodeService extends ServiceImpl<IoSplitFifoCodeMapper, I
|
|
|
|
|
* @param bizList
|
|
|
|
|
*/
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
void autoAllocationWorkPace(Map<Long, List<IoSplitCodeResponse>> splitMap, List<CollectOrderBizResponse> bizList) {
|
|
|
|
|
Integer autoAllocationWorkPace(Map<Long, List<IoSplitCodeResponse>> splitMap, List<CollectOrderBizResponse> bizList) {
|
|
|
|
|
Integer invAlert = 1;
|
|
|
|
|
for (int i = 0; i < bizList.size(); i++) {
|
|
|
|
|
CollectOrderBizResponse collectOrderBizResponse = bizList.get(i);
|
|
|
|
|
Long relId = collectOrderBizResponse.getRelId();
|
|
|
|
@ -192,10 +195,13 @@ public class IoSplitFifoCodeService extends ServiceImpl<IoSplitFifoCodeMapper, I
|
|
|
|
|
|
|
|
|
|
if (count > 0){//不够分配
|
|
|
|
|
collectOrderBizMapper.updateAutoResCount(bizId,-count);
|
|
|
|
|
invAlert = 2;
|
|
|
|
|
}else {
|
|
|
|
|
collectOrderBizMapper.updateAutoResCount(bizId,collectOrderBizResponse.getCount());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return invAlert;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|