|
@@ -147,25 +147,21 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
}
|
|
|
List<Contract> contracts = new ArrayList<>();
|
|
|
Long totalCnt=0L;
|
|
|
- if (user.getCompanyId()== Constant.JUN_TIAN_COMPANY_ID){
|
|
|
- int type=0;
|
|
|
- Integer dept=user.getDepartmentId();
|
|
|
- String userId=user.getId();
|
|
|
- if (isAll){
|
|
|
- type=1;//查看全部
|
|
|
- }else if (isNotAll) {
|
|
|
- type=2;//查看对应部门
|
|
|
- }else {
|
|
|
- type=3;//查看个人
|
|
|
- }
|
|
|
- contracts = contractMapper.selectContractWithType(user.getCompanyId(), pageStart, pageSize, number, name , typeName , status, startDate,endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,type,dept,userId);
|
|
|
- totalCnt = contractMapper.selectContractCntWithType(user.getCompanyId(), number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,type,dept,userId);
|
|
|
|
|
|
+ int type=0;
|
|
|
+ Integer dept=user.getDepartmentId();
|
|
|
+ String userId=user.getId();
|
|
|
+ if (isAll){
|
|
|
+ type=1;//查看全部
|
|
|
+ }else if (isNotAll) {
|
|
|
+ type=2;//查看对应部门
|
|
|
}else {
|
|
|
- contracts = contractMapper.selectContract(user.getCompanyId(), pageStart, pageSize, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId, customerOrg, finishStatus);
|
|
|
- totalCnt = contractMapper.selectContractCnt(user.getCompanyId(), number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId, customerOrg, finishStatus);
|
|
|
-
|
|
|
+ type=3;//查看个人
|
|
|
}
|
|
|
+ contracts = contractMapper.selectContractWithType(user.getCompanyId(), pageStart, pageSize, number, name , typeName , status, startDate,endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,type,dept,userId);
|
|
|
+ totalCnt = contractMapper.selectContractCntWithType(user.getCompanyId(), number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,type,dept,userId);
|
|
|
+
|
|
|
+
|
|
|
//首先获取所有合同的Id
|
|
|
List<Integer> contractCollect = contracts.stream().map(c -> c.getId()).collect(Collectors.toList());
|
|
|
List<ContractPayment> contractPaymentList = contractPaymentMapper.selectList(new QueryWrapper<ContractPayment>().in("contract_id", contractCollect));
|