出库审核

dev
siontion 4 months ago
parent 7b66eb7cb9
commit a1f63e3611

@ -117,8 +117,8 @@ public class StorageServiceImpl implements StorageService {
if(!isAllow) {
for (StorageMatDO storageMatDO : storageMatList) {
if (storageMatDO.getStorageOkQty().compareTo(new BigDecimal(0)) == 0
|| storageMatDO.getStockQuantity().compareTo(storageMatDO.getStorageOkQty()) < 0) {
if (storageMatDO.getStorageOkQty()!= null && storageMatDO.getStockQuantity()!=null && (storageMatDO.getStorageOkQty().compareTo(new BigDecimal(0)) == 0
|| storageMatDO.getStockQuantity().compareTo(storageMatDO.getStorageOkQty()) < 0)) {
throw exception(STORAGE_STOCK_QUANTITY_LACK);
}
}

@ -78,7 +78,7 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
"case when exists(select id from base_process_setting where user_id=b.owner and procedure_id=b.procedure_id and salary_type='HourWage') " +
"then (select price from base_process_setting where user_id=b.owner and procedure_id=b.procedure_id and salary_type='HourWage' limit 1)*b.workTime " +
"when exists(select id from base_process_setting where user_id=b.owner and procedure_id=b.procedure_id and salary_type='PieceRateWage') " +
"then (select id from base_process_setting where user_id=b.owner and procedure_id=b.procedure_id and salary_type='PieceRateWage' limit 1)*b.amount " +
"then (select price from base_process_setting where user_id=b.owner and procedure_id=b.procedure_id and salary_type='PieceRateWage' limit 1)*b.amount " +
"when exists(select id from base_procedure where id=b.procedure_id and salary_type='HourWage') " +
"then (select standard_labour_price from base_procedure where id=b.procedure_id and salary_type='HourWage' limit 1)*b.workTime " +
"when exists(select id from base_procedure where id=b.procedure_id and salary_type='PieceRateWage') " +

Loading…
Cancel
Save