|
@@ -108,7 +108,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
@Override
|
|
|
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, Integer secTypeId,String customerOrg,Integer finishStatus,Integer stampDutyStatus ) {
|
|
|
+ String paymentStartDate, String paymentEndDate, Integer secTypeId,String customerOrg,Integer finishStatus,String stampDutyStatus, Integer procurementWay) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
try {
|
|
|
String token = request.getHeader("token");
|
|
@@ -135,14 +135,16 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
if (pageIndex!=null){
|
|
|
pageStart = (pageIndex -1) * pageSize;
|
|
|
}
|
|
|
-// if (StringUtils.isNotBlank(number)){
|
|
|
-// number = "%" + number + "%";
|
|
|
-// }
|
|
|
-// if (StringUtils.isNotBlank(name)){
|
|
|
-// name = "%" + name + "%";
|
|
|
-// }
|
|
|
- List<Contract> contracts = contractMapper.selectContract(user.getCompanyId(), pageStart, pageSize, number, name , typeName , status, startDate,endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatus);
|
|
|
- Long totalCnt = contractMapper.selectContractCnt(user.getCompanyId(), number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatus);
|
|
|
+ List<Integer> stampDutyStatusList = new ArrayList<>();
|
|
|
+ if (!StringUtils.isEmpty(stampDutyStatus)){
|
|
|
+ //stampDutyStatus为逗号隔开
|
|
|
+ String[] split = stampDutyStatus.split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ stampDutyStatusList.add(Integer.parseInt(s));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<Contract> contracts = contractMapper.selectContract(user.getCompanyId(), pageStart, pageSize, number, name , typeName , status, startDate,endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatusList, procurementWay);
|
|
|
+ Long totalCnt = contractMapper.selectContractCnt(user.getCompanyId(), number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatusList, procurementWay);
|
|
|
for (Contract contract : contracts) {
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
contract.setCreatorName(contract.getCreatorWxCorpId());
|
|
@@ -262,7 +264,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
*/
|
|
|
@Override
|
|
|
public HttpRespMsg ExportContract(HttpServletRequest request, String number, String name, String typeName, Integer status,
|
|
|
- String startDate, String endDate, String paymentStartDate, String paymentEndDate, Integer secTypeId,String customerOrg,Integer finishStatus,Integer stampDutyStatus) {
|
|
|
+ String startDate, String endDate, String paymentStartDate, String paymentEndDate, Integer secTypeId,String customerOrg,Integer finishStatus,String stampDutyStatus, Integer procurementWay) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
|
List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "导出合同");
|
|
@@ -272,7 +274,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
}
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
|
|
|
- HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatus);
|
|
|
+ HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatus, procurementWay);
|
|
|
HashMap<String, Object> resultDate = (HashMap<String, Object>) contractPage.data;
|
|
|
List<ContractPageVO> data = (List<ContractPageVO>)resultDate.get("data");
|
|
|
List<String> headList = new ArrayList<String>();
|
|
@@ -1275,7 +1277,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public HttpRespMsg exportContractOneToMany(HttpServletRequest request, String number, String name, String typeName, Integer status, String startDate, String endDate, String paymentStartDate, String paymentEndDate, Integer secTypeId,String customerOrg,Integer finishStatus,Integer stampDutyStatus) {
|
|
|
+ public HttpRespMsg exportContractOneToMany(HttpServletRequest request, String number, String name, String typeName, Integer status, String startDate, String endDate, String paymentStartDate, String paymentEndDate, Integer secTypeId,String customerOrg,Integer finishStatus,String stampDutyStatus, Integer procurementWay) {
|
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
|
User user = userMapper.selectById(request.getHeader("token"));
|
|
|
List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "导出合同");
|
|
@@ -1285,7 +1287,15 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
|
|
|
}
|
|
|
WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
|
|
|
CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", user.getCompanyId()));
|
|
|
- HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatus);
|
|
|
+ //stampDutyStatus为逗号隔开
|
|
|
+ List<Integer> stampDutyStatusList = new ArrayList<>();
|
|
|
+ if (StringUtils.isNotBlank(stampDutyStatus)){
|
|
|
+ String[] split = stampDutyStatus.split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ stampDutyStatusList.add(Integer.parseInt(s));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate, paymentStartDate, paymentEndDate, secTypeId,customerOrg,finishStatus,stampDutyStatus, procurementWay);
|
|
|
HashMap<String, Object> resultDate = (HashMap<String, Object>) contractPage.data;
|
|
|
List<ContractPageVO> data = (List<ContractPageVO>)resultDate.get("data");
|
|
|
List<String> headList = new ArrayList<String>();
|