|
@@ -88,7 +88,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public HttpRespMsg getContractPage(HttpServletRequest request, @RequestParam Integer pageIndex, @RequestParam Integer pageSize, String number, String name, String typeName, Integer status, String startDate, String endDate) {
|
|
|
+ public HttpRespMsg getContractPage(HttpServletRequest request, Integer pageIndex, Integer pageSize, String number, String name, String typeName, Integer status, String startDate, String endDate, String paymentStartDate, String paymentEndDate) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
try {
|
|
|
String token = request.getHeader("token");
|
|
@@ -120,8 +120,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
if (StringUtils.isNotBlank(name)){
|
|
|
name = "%" + name + "%";
|
|
|
}
|
|
|
- List<Contract> contracts = contractMapper.selectContract(user.getCompanyId(), pageStart, pageSize, number, name , typeName , status, startDate,endDate);
|
|
|
- List<Contract> total = contractMapper.selectContract(user.getCompanyId(), null, null, number, name, typeName, status, startDate, endDate);
|
|
|
+ List<Contract> contracts = contractMapper.selectContract(user.getCompanyId(), pageStart, pageSize, number, name , typeName , status, startDate,endDate, paymentStartDate, paymentEndDate);
|
|
|
+ Long totalCnt = contractMapper.selectContractCnt(user.getCompanyId(), number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate);
|
|
|
for (Contract contract : contracts) {
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
contract.setCreatorName(contract.getCreatorWxCorpId());
|
|
@@ -169,6 +169,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
contractPageVO.setAmounts(contract.getAmounts());
|
|
|
contractPageVO.setProjectId(contract.getProjectId());
|
|
|
contractPageVO.setPayment(contract.getPayment());
|
|
|
+ contractPageVO.setNextPaymentDate(contract.getNextPaymentDate());
|
|
|
+ contractPageVO.setNextPaymentAmount(contract.getNextPaymentAmount());
|
|
|
if (contract.getStatus().equals(2)){
|
|
|
for (Map<String, Object> contractLog : contractLogs) {
|
|
|
if (contractLog.get("contractId").toString().equals(contract.getId().toString())){
|
|
@@ -192,7 +194,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
}
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("data",contractPageVOS);
|
|
|
- map.put("total",total.size());
|
|
|
+ map.put("total",totalCnt);
|
|
|
httpRespMsg.data = map;
|
|
|
return httpRespMsg;
|
|
|
}catch (NullPointerException e) {
|
|
@@ -215,7 +217,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public HttpRespMsg ExportContract(HttpServletRequest request, String number, String name, String typeName, Integer status, String startDate, String endDate) {
|
|
|
+ public HttpRespMsg ExportContract(HttpServletRequest request, String number, String name, String typeName, Integer status, String startDate, String endDate, String paymentStartDate, String paymentEndDate) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
|
List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "导出合同");
|
|
@@ -224,7 +226,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
- HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate);
|
|
|
+ HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate);
|
|
|
HashMap<String, Object> resultDate = (HashMap<String, Object>) contractPage.data;
|
|
|
List<ContractPageVO> data = (List<ContractPageVO>)resultDate.get("data");
|
|
|
List<String> headList = new ArrayList<String>();
|