|
|
|
@ -157,14 +157,23 @@ public class WmsInstockOrderServiceImpl implements IWmsInstockOrderService {
|
|
|
|
|
}
|
|
|
|
|
String inStockOrder = order + orderDate + orderLast;
|
|
|
|
|
WmsInstockOrder add = MapstructUtils.convert(bo, WmsInstockOrder.class);
|
|
|
|
|
List<WmsConfiguration> unAuditConfigurationList = baseMapper.selectUnAuditByConfiguration(bo.getWarehouseId());
|
|
|
|
|
if (CollectionUtils.isNotEmpty(unAuditConfigurationList)){
|
|
|
|
|
List<WmsConfiguration> allConfigurationList = baseMapper.selectAllConfiguration(bo.getWarehouseId());
|
|
|
|
|
if (CollectionUtils.isNotEmpty(allConfigurationList)){
|
|
|
|
|
//查询入库单不用审批的配置
|
|
|
|
|
List<WmsConfiguration> unAuditConfigurationList = baseMapper.selectUnAuditByConfiguration(bo.getWarehouseId());
|
|
|
|
|
if (CollectionUtils.isNotEmpty(unAuditConfigurationList)){
|
|
|
|
|
add.setAuditStatus(auditPass);
|
|
|
|
|
}else {
|
|
|
|
|
//查询入库单是否有对应审批配置
|
|
|
|
|
List<WmsConfiguration> configurationList = baseMapper.selectAuditByConfiguration(bo.getWarehouseId());
|
|
|
|
|
if (CollectionUtils.isNotEmpty(configurationList)){
|
|
|
|
|
add.setAuditBy(configurationList.get(0).getAuditBy());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
add.setAuditStatus(auditPass);
|
|
|
|
|
}
|
|
|
|
|
List<WmsConfiguration> configurationList = baseMapper.selectAuditByConfiguration(bo.getWarehouseId());
|
|
|
|
|
if (CollectionUtils.isNotEmpty(configurationList)){
|
|
|
|
|
add.setAuditBy(configurationList.get(0).getAuditBy());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
validEntityBeforeSave(add);
|
|
|
|
|
add.setInstockCode(inStockOrder);
|
|
|
|
|
add.setCreateBy(username);
|
|
|
|
|