Commit d9ebf0d1 by 杨浩

bug修复

parent 1c55d8f9
...@@ -167,7 +167,7 @@ public class ErpFinanceReceiptServiceImpl implements ErpFinanceReceiptService { ...@@ -167,7 +167,7 @@ public class ErpFinanceReceiptServiceImpl implements ErpFinanceReceiptService {
} else if (ObjectUtil.equal(item.getBizType(), ErpBizTypeEnum.SALE_RETURN.getType())) { } else if (ObjectUtil.equal(item.getBizType(), ErpBizTypeEnum.SALE_RETURN.getType())) {
ErpSaleReturnDO saleReturn = saleReturnService.validateSaleReturn(item.getBizId()); ErpSaleReturnDO saleReturn = saleReturnService.validateSaleReturn(item.getBizId());
Assert.equals(saleReturn.getCustomerId(), customerId, "客户必须相同"); Assert.equals(saleReturn.getCustomerId(), customerId, "客户必须相同");
item.setTotalPrice(saleReturn.getTotalPrice().negate()).setBizNo(saleReturn.getNo()); item.setTotalPrice(BigDecimal.valueOf(saleReturn.getTotalPrice()).negate()).setBizNo(saleReturn.getNo());
} else { } else {
throw new IllegalArgumentException("业务类型不正确:" + item.getBizType()); throw new IllegalArgumentException("业务类型不正确:" + item.getBizType());
} }
......
...@@ -3,6 +3,7 @@ package cn.iocoder.foodnexus.module.system.service.dept; ...@@ -3,6 +3,7 @@ package cn.iocoder.foodnexus.module.system.service.dept;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.foodnexus.framework.common.enums.CommonStatusEnum; import cn.iocoder.foodnexus.framework.common.enums.CommonStatusEnum;
import cn.iocoder.foodnexus.framework.common.util.CommonUtil;
import cn.iocoder.foodnexus.framework.common.util.object.BeanUtils; import cn.iocoder.foodnexus.framework.common.util.object.BeanUtils;
import cn.iocoder.foodnexus.framework.datapermission.core.annotation.DataPermission; import cn.iocoder.foodnexus.framework.datapermission.core.annotation.DataPermission;
import cn.iocoder.foodnexus.module.erp.api.service.ErpCustomerApi; import cn.iocoder.foodnexus.module.erp.api.service.ErpCustomerApi;
...@@ -270,7 +271,7 @@ public class DeptServiceImpl implements DeptService { ...@@ -270,7 +271,7 @@ public class DeptServiceImpl implements DeptService {
@Override @Override
public DeptDO getTopDept(Long deptId) { public DeptDO getTopDept(Long deptId) {
DeptDO deptDO = deptMapper.selectById(deptId); DeptDO deptDO = deptMapper.selectById(deptId);
if (!DeptDO.PARENT_ID_ROOT.equals(deptDO.getParentId())) { if (CommonUtil.isNotEmpty(deptDO) && !DeptDO.PARENT_ID_ROOT.equals(deptDO.getParentId())) {
return this.getTopDept(deptDO.getParentId()); return this.getTopDept(deptDO.getParentId());
} }
return deptDO; return deptDO;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment