添加类型判断
This commit is contained in:
@@ -26,4 +26,6 @@ public class TbHandoverQueryCriteria{
|
||||
/** 精确 */
|
||||
@Query
|
||||
private String merchantName;
|
||||
|
||||
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import cn.ysk.cashier.cons.service.TbConsInfoService;
|
||||
import cn.ysk.cashier.cons.service.dto.TbConsInfoDto;
|
||||
import cn.ysk.cashier.cons.service.dto.TbConsInfoQueryCriteria;
|
||||
import cn.ysk.cashier.cons.service.mapstruct.TbConsInfoMapper;
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.pojo.product.TbProductStockOperate;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopPurveyor;
|
||||
@@ -255,7 +256,7 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||
purveyorTransact.setType("cons_in");
|
||||
|
||||
object.put("number",conInfos.getStockNumber());
|
||||
} else {
|
||||
} else if("out".equals(resources.getType())) {
|
||||
stockOperate.setSubType(-1);
|
||||
info.setStockNumber(info.getStockNumber().subtract(conInfos.getStockNumber()));
|
||||
suppFlow.setBalance(info.getStockNumber().subtract(info.getStockConsume()).subtract(conInfos.getStockNumber()));
|
||||
@@ -271,6 +272,8 @@ public class TbConsInfoServiceImpl implements TbConsInfoService {
|
||||
purveyorTransact.setWaitAmount((resources.getAccountsPayable().subtract(resources.getActualPayment())).negate());
|
||||
purveyorTransact.setType("cons_out");
|
||||
object.put("number",conInfos.getStockNumber());
|
||||
}else {
|
||||
throw new BadRequestException("错误操作类型");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user