| | |
| | | @Value("${dept.smj}") |
| | | private String smj; |
| | | |
| | | @Value("${dept.smjsc}") |
| | | private String smjsc; |
| | | |
| | | @Value("${dept.smjzt}") |
| | | private String smjzt; |
| | | |
| | | @Value("${dept.sgb}") |
| | | private String sgb; |
| | | |
| | |
| | | //出库 |
| | | addDTO.getSubjectMatterList().stream().forEach(outSubjectMatterAddDTO -> { |
| | | OutBound outBound = BeanUtil.copyProperties(outSubjectMatterAddDTO, OutBound.class); |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smj)){ |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smj)||StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smjsc)|| |
| | | StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smjzt)){ |
| | | outBound.setBatchNumber(generateSMJContractCKNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",sgb)){ |
| | |
| | | //当前为合同最后阶段 |
| | | PaymentConfirm lastNewConfirm = paymentConfirmMapper.selectOne(Wrappers.<PaymentConfirm>lambdaQuery().eq(PaymentConfirm::getContractId, contract.getId()) |
| | | .orderByDesc(PaymentConfirm::getCreateTime).last("limit 1")); |
| | | if (lastNewConfirm.getTotalAmount().compareTo(new BigDecimal("0")) >= 0) { |
| | | if (lastNewConfirm.getTotalAmount().compareTo(new BigDecimal("0")) >= 0 |
| | | &&contract.getBillingAmout().compareTo(contract.getAmount())==0) { |
| | | //有预付且超过应收 关闭合同状态 |
| | | contract.setContractStatus(3); |
| | | contractMapper.updateById(contract); |
| | |
| | | contractSubjectMatterMapper.updateById(subjectMatter); |
| | | // |
| | | OutBound outBound = new OutBound(); |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smj)){ |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smj)||StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smjsc)|| |
| | | StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smjzt)){ |
| | | outBound.setBatchNumber(generateSMJContractCKNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",sgb)){ |
| | |
| | | //当前为合同最后阶段 |
| | | PaymentConfirm lastNewConfirm = paymentConfirmMapper.selectOne(Wrappers.<PaymentConfirm>lambdaQuery().eq(PaymentConfirm::getContractId, contract.getId()) |
| | | .orderByDesc(PaymentConfirm::getCreateTime).last("limit 1")); |
| | | if (lastNewConfirm.getTotalAmount().compareTo(new BigDecimal("0")) >= 0) { |
| | | if (lastNewConfirm.getTotalAmount().compareTo(new BigDecimal("0")) >= 0 |
| | | &&contract.getBillingAmout().compareTo(contract.getAmount())==0) { |
| | | //有预付且超过应收 关闭合同状态 |
| | | contract.setContractStatus(3); |
| | | contractMapper.updateById(contract); |