|
@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fjhx.account.controller.utils.DateUtils;
|
|
|
import com.fjhx.account.entity.account.po.AccountManagement;
|
|
|
import com.fjhx.account.entity.account.vo.AccountRequestFundsDetailVo;
|
|
|
+import com.fjhx.account.entity.account.vo.AccountRunningWaterVo;
|
|
|
import com.fjhx.account.service.account.AccountManagementService;
|
|
|
import com.fjhx.account.service.account.AccountRequestFundsDetailService;
|
|
|
import com.fjhx.area.service.SetCustomizeAreaId;
|
|
@@ -27,6 +28,7 @@ import com.fjhx.common.enums.FlowStatusEnum;
|
|
|
import com.fjhx.common.service.corporation.CorporationService;
|
|
|
import com.fjhx.common.service.currency.CurrencyRateService;
|
|
|
import com.fjhx.common.service.documentary.GetDocumentaryBusinessTemplate;
|
|
|
+import com.fjhx.common.utils.Assert;
|
|
|
import com.fjhx.customer.entity.customer.dto.CustomerDto;
|
|
|
import com.fjhx.customer.entity.customer.po.Customer;
|
|
|
import com.fjhx.customer.service.customer.CustomerService;
|
|
@@ -177,7 +179,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
|
|
|
IWrapper<Contract> wrapper = getWrapper();
|
|
|
wrapper.orderByDesc("t1", Contract::getCreateTime);
|
|
|
- wrapper.eq("t1", Contract::getIsChange,"0");//列表只展示未变更得数据
|
|
|
+ wrapper.eq("t1", Contract::getIsChange, "0");//列表只展示未变更得数据
|
|
|
wrapper.between("t1", Contract::getStatus, FlowStatusEnum.DRAFT.getKey(), FlowStatusEnum.CANCELLATION.getKey() - 1);
|
|
|
if (StringUtils.isNotEmpty(dto.getStatus())) {
|
|
|
wrapper.eq("t1", Contract::getStatus, dto.getStatus());
|
|
@@ -1434,4 +1436,39 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
v.setOther(other);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取合同相关的所有版本列表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<Contract> getVersionList(Long id) {
|
|
|
+ List<Contract> contractList = new ArrayList<>();
|
|
|
+
|
|
|
+ while (true) {
|
|
|
+ Contract contract = this.getById(id);
|
|
|
+ Assert.notEmpty(contract, "查询不到合同信息,id:" + id);
|
|
|
+ contractList.add(contract);
|
|
|
+ if (ObjectUtil.isEmpty(contract.getOldContractId())) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ id = contract.getOldContractId();
|
|
|
+ }
|
|
|
+ return contractList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取合同相关的所有采购合同版本列表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<Purchase> getPurchaseListByContractId(Long id) {
|
|
|
+ return purchaseService.list(q -> q.eq(Purchase::getDataResourceId, id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据合同id获取合同的资金流水信息
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<AccountRunningWaterVo> getAccountRunningWaterByContractId(Long contractId) {
|
|
|
+ return baseMapper.getAccountRunningWaterByContractId(contractId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|