Showing
3 changed files
with
5 additions
and
2 deletions
| @@ -326,6 +326,7 @@ public class ContractDistributorStandardController extends DefaultBaseController | @@ -326,6 +326,7 @@ public class ContractDistributorStandardController extends DefaultBaseController | ||
| 326 | GetContractDistributorStandardBo result = new GetContractDistributorStandardBo(data); | 326 | GetContractDistributorStandardBo result = new GetContractDistributorStandardBo(data); |
| 327 | Wrapper<ContractDistributorLine> lineWrapper = Wrappers.lambdaQuery(ContractDistributorLine.class) | 327 | Wrapper<ContractDistributorLine> lineWrapper = Wrappers.lambdaQuery(ContractDistributorLine.class) |
| 328 | .eq(ContractDistributorLine::getContractId, id) | 328 | .eq(ContractDistributorLine::getContractId, id) |
| 329 | + .gt(ContractDistributorLine::getQuantity, BigDecimal.ZERO) | ||
| 329 | .orderByAsc(ContractDistributorLine::getShowOrder); | 330 | .orderByAsc(ContractDistributorLine::getShowOrder); |
| 330 | List<ContractDistributorLine> contractDistributorLineList = contractDistributorLineService.list(lineWrapper); | 331 | List<ContractDistributorLine> contractDistributorLineList = contractDistributorLineService.list(lineWrapper); |
| 331 | 332 |
| @@ -787,8 +787,8 @@ public class ContractDistributorStandardServiceImpl extends | @@ -787,8 +787,8 @@ public class ContractDistributorStandardServiceImpl extends | ||
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | BigDecimal newOriginalTotalQuantity = original.getTotalQuantity().subtract(splitTotalQuantity); | 789 | BigDecimal newOriginalTotalQuantity = original.getTotalQuantity().subtract(splitTotalQuantity); |
| 790 | - if (newOriginalTotalQuantity.compareTo(BigDecimal.ZERO) < 0) { | ||
| 791 | - throw new DefaultClientException("拆分数量不能大于合同合计数量!"); | 790 | + if (newOriginalTotalQuantity.compareTo(BigDecimal.ZERO) <= 0) { |
| 791 | + throw new DefaultClientException("拆分数量不能大于等于合同合计数量!"); | ||
| 792 | } | 792 | } |
| 793 | 793 | ||
| 794 | String baseCode = original.getCode(); | 794 | String baseCode = original.getCode(); |
| @@ -79,6 +79,8 @@ | @@ -79,6 +79,8 @@ | ||
| 79 | <if test="vo.contractId != null and vo.contractId != ''"> | 79 | <if test="vo.contractId != null and vo.contractId != ''"> |
| 80 | AND tb.contract_id = #{vo.contractId} | 80 | AND tb.contract_id = #{vo.contractId} |
| 81 | </if> | 81 | </if> |
| 82 | + AND tb.quantity IS NOT NULL | ||
| 83 | + AND tb.quantity <![CDATA[>]]> 0 | ||
| 82 | </where> | 84 | </where> |
| 83 | </select> | 85 | </select> |
| 84 | </mapper> | 86 | </mapper> |