|
@@ -12,6 +12,7 @@ import com.management.platform.entity.vo.SysRichFunction;
|
|
|
import com.management.platform.mapper.*;
|
|
|
import com.management.platform.service.ContractService;
|
|
|
import com.management.platform.service.ExcelExportService;
|
|
|
+import com.management.platform.service.SysDictService;
|
|
|
import com.management.platform.util.ExcelUtil;
|
|
|
import com.management.platform.util.HttpRespMsg;
|
|
|
import com.management.platform.util.MessageUtils;
|
|
@@ -83,6 +84,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
private ContractTypeSecMapper contractTypeSecMapper;
|
|
|
@Autowired
|
|
|
private ContractPayCustomizedMapper contractPayCustomizedMapper;
|
|
|
+ @Resource
|
|
|
+ private SysDictService sysDictService;
|
|
|
|
|
|
|
|
|
|
|
@@ -1680,9 +1683,18 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
HttpRespMsg respMsg = new HttpRespMsg();
|
|
|
Contract contract = contractMapper.selectById(id);
|
|
|
if (contract.getTypeId()!=null){
|
|
|
- ContractType contractType = contractTypeMapper.selectById(contract.getTypeId());
|
|
|
- if (contractType!=null){
|
|
|
- contract.setTypeName(contractType.getTypeName());
|
|
|
+ SysDict dict = sysDictService.getById(contract.getTypeId());
|
|
|
+ if (dict!=null){
|
|
|
+ contract.setTypeName(dict.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ContractPayment contractPayment = contractPaymentMapper.selectOne(new QueryWrapper<ContractPayment>().eq("is_payed", 0).eq("contract_id", contract.getId()).orderByAsc("id").last(" limit 1"));
|
|
|
+ if (contractPayment!=null){
|
|
|
+ if (contractPayment.getPayDate()!=null){
|
|
|
+ contract.setNextPaymentDate(contractPayment.getPayDate());
|
|
|
+ }
|
|
|
+ if (contractPayment.getAmount()!=null){
|
|
|
+ contract.setNextPaymentAmount(contractPayment.getAmount());
|
|
|
}
|
|
|
}
|
|
|
List<ContractCustom> selectedList = contractCustomMapper.selectList(new QueryWrapper<ContractCustom>().eq("contract_id", contract.getId()));
|