| | |
| | | @Value("${dept.smj}") |
| | | private String smj; |
| | | |
| | | @Value("${dept.smjsc}") |
| | | private String smjsc; |
| | | |
| | | @Value("${dept.smjzt}") |
| | | private String smjzt; |
| | | |
| | | @Value("${dept.sgb}") |
| | | private String sgb; |
| | | |
| | |
| | | return R.failed("标的物不能为空"); |
| | | } |
| | | |
| | | 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)){ |
| | | contract.setContractNo(generateSMJContractNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",sgb)){ |
| | |
| | | contract.setPaidAmount(new BigDecimal("0")); |
| | | contract.setBillingAmout(new BigDecimal("0")); |
| | | contract.setNickName(SecurityUtils.getUser().getNickname()); |
| | | 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)){ |
| | | contract.setContractNo(generateSMJContractNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",sgb)){ |
| | |
| | | @Override |
| | | public R startApproval(Long id) { |
| | | Contract contract = baseMapper.selectById(id); |
| | | |
| | | //简易合同无法继续后续操作 |
| | | if (StrUtil.equals(contract.getContractCategory(), "simple")){ |
| | | return R.failed("请补充标的物和收款阶段后再进行操作!"); |
| | | } |
| | | |
| | | //启动流程 |
| | | ProcessInstanceParamDto dto = new ProcessInstanceParamDto(); |
| | | Map<String, Object> map = BeanUtil.beanToMap(contract); |
| | |
| | | Contract contract = baseMapper.selectById(id); |
| | | contract.setContractStatus(2); |
| | | baseMapper.updateById(contract); |
| | | |
| | | |
| | | List<ContractSubjectMatter> subjectMatterList = contractSubjectMatterMapper.selectList(Wrappers.<ContractSubjectMatter>lambdaQuery() |
| | | .eq(ContractSubjectMatter::getContractId,id)); |
| | |
| | | newContract.setErpPushFlag("0"); |
| | | newContract.setContractStatus(0); |
| | | newContract.setBillingAmout(new BigDecimal("0")); |
| | | 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)){ |
| | | newContract.setContractNo(generateSMJContractNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",sgb)){ |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public R addSimple(ContractAddDTO addDTO) { |
| | | Contract contract = BeanUtil.copyProperties(addDTO, Contract.class); |
| | | contract.setPartyBId(SecurityUtils.getUser().getCompId()); |
| | | contract.setPartyB(SecurityUtils.getUser().getCompName()); |
| | | if (StrUtil.isEmpty(addDTO.getPartyA())){ |
| | | BusinessCustomer bc = businessCustomerMapper.selectById(addDTO.getPartyAId()); |
| | | if (ObjUtil.isNotNull(bc)){ |
| | | contract.setPartyA(bc.getCompanyName()); |
| | | } |
| | | } |
| | | |
| | | contract.setPaidAmount(new BigDecimal("0")); |
| | | contract.setBillingStatus("1"); |
| | | contract.setBillingAmout(new BigDecimal("0")); |
| | | contract.setErpPushFlag("0"); |
| | | contract.setNickName(SecurityUtils.getUser().getNickname()); |
| | | |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smj)||StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smjsc)|| |
| | | StrUtil.equals(SecurityUtils.getUser().getCompId()+"",smjzt)){ |
| | | contract.setContractNo(generateSMJContractNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",sgb)){ |
| | | contract.setContractNo(generateGYBContractNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",ymj)){ |
| | | contract.setContractNo(generateYMJContractNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",tfgs)){ |
| | | contract.setContractNo(generateTFContractNo()); |
| | | } |
| | | if (StrUtil.equals(SecurityUtils.getUser().getCompId()+"",jxc)){ |
| | | contract.setContractNo(generateJXCContractNo()); |
| | | } |
| | | baseMapper.insert(contract); |
| | | return R.ok(); |
| | | } |
| | | } |