Commit 298adca5 by kangxiaoshan

111

parent bcbeee19
...@@ -42,17 +42,31 @@ public class ContractController { ...@@ -42,17 +42,31 @@ public class ContractController {
private static final Logger logger = LoggerFactory.getLogger(ContractController.class); private static final Logger logger = LoggerFactory.getLogger(ContractController.class);
private static final Map<String, String> CONTRACT_STATUS = new HashMap<String, String>() {{ private static final Map<String, String> CONTRACT_STATUS = new HashMap<String, String>() {{
put(ContractStatusEnum.WAIT.getKey(), ContractStatusEnum.WAIT.getValue()); // put(ContractStatusEnum.WAIT.getKey(), ContractStatusEnum.WAIT.getValue());
put(ContractStatusEnum.EXECUTING.getKey(), ContractStatusEnum.EXECUTING.getValue()); // put(ContractStatusEnum.EXECUTING.getKey(), ContractStatusEnum.EXECUTING.getValue());
put(ContractStatusEnum.END.getKey(), ContractStatusEnum.END.getValue()); // put(ContractStatusEnum.END.getKey(), ContractStatusEnum.END.getValue());
put(ContractStatusEnum.CANCEL.getKey(), ContractStatusEnum.CANCEL.getValue()); // put(ContractStatusEnum.CANCEL.getKey(), ContractStatusEnum.CANCEL.getValue());
put(ContractStatusEnum.MONEY_BACK_ALL.getKey(), ContractStatusEnum.MONEY_BACK_ALL.getValue()); // put(ContractStatusEnum.MONEY_BACK_ALL.getKey(), ContractStatusEnum.MONEY_BACK_ALL.getValue());
put(ContractStatusEnum.MONEY_BACK_PART.getKey(), ContractStatusEnum.MONEY_BACK_PART.getValue()); // put(ContractStatusEnum.MONEY_BACK_PART.getKey(), ContractStatusEnum.MONEY_BACK_PART.getValue());
put(ContractStatusEnum.MONEY_BACK_NONE.getKey(), ContractStatusEnum.MONEY_BACK_NONE.getValue()); // put(ContractStatusEnum.MONEY_BACK_NONE.getKey(), ContractStatusEnum.MONEY_BACK_NONE.getValue());
put(ContractStatusEnum.DELETE.getKey(), ContractStatusEnum.DELETE.getValue()); // put(ContractStatusEnum.DELETE.getKey(), ContractStatusEnum.DELETE.getValue());
putdata(this,ContractStatusEnum.WAIT);
putdata(this,ContractStatusEnum.EXECUTING);
putdata(this,ContractStatusEnum.END);
putdata(this,ContractStatusEnum.CANCEL);
putdata(this,ContractStatusEnum.MONEY_BACK_ALL);
putdata(this,ContractStatusEnum.MONEY_BACK_PART);
putdata(this,ContractStatusEnum.MONEY_BACK_NONE);
putdata(this,ContractStatusEnum.DELETE);
}}; }};
private static void putdata(Map map,ContractStatusEnum a){
map.put(a.getKey(),a.getValue());
}
@Autowired @Autowired
private ContractService service; private ContractService service;
......
package common.service; package common.service;
import java.util.List;
/** /**
* description: * description:
......
...@@ -745,8 +745,6 @@ public class ContractServiceImpl implements ContractService { ...@@ -745,8 +745,6 @@ public class ContractServiceImpl implements ContractService {
} }
} }
List<Long> contractIds = null;
List<String> platforms = new ArrayList<>(); List<String> platforms = new ArrayList<>();
Map<String,String> idsDic = new HashMap<>(); Map<String,String> idsDic = new HashMap<>();
platforms.add(platform); platforms.add(platform);
...@@ -780,7 +778,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -780,7 +778,7 @@ public class ContractServiceImpl implements ContractService {
if(!StringUtils.isEmpty(contractId)){ if(!StringUtils.isEmpty(contractId)){
//查看关联合同 //查看关联合同
if (contractIds != null && contractIds.size() > 0) { if (ids != null && ids.size() > 0) {
contractList = contractRepository.findByDsAndRoileRelation(startDate, endDate, platforms, idList, ids); contractList = contractRepository.findByDsAndRoileRelation(startDate, endDate, platforms, idList, ids);
} }
...@@ -793,7 +791,7 @@ public class ContractServiceImpl implements ContractService { ...@@ -793,7 +791,7 @@ public class ContractServiceImpl implements ContractService {
// contractList = contractRepository.findByDs(startDate, endDate, platform); // contractList = contractRepository.findByDs(startDate, endDate, platform);
if(!StringUtils.isEmpty(contractId)){ if(!StringUtils.isEmpty(contractId)){
if (contractIds != null && contractIds.size() > 0) { if (ids != null && ids.size() > 0) {
contractList = contractRepository.findByDsRelation(startDate, endDate, platforms, ids); contractList = contractRepository.findByDsRelation(startDate, endDate, platforms, ids);
} }
}else{ }else{
......
package common.task; package common.task;
import com.google.common.base.Splitter;
import common.model.AppCategory;
import common.model.AppInfo;
import common.model.Contract; import common.model.Contract;
import common.repository.AppCategoryRepository;
import common.repository.AppInfoRepository;
import common.repository.CityRepository;
import common.repository.ContractRepository; import common.repository.ContractRepository;
import dmp.model.OtPkgDevStats;
import dmp.repository.OtPkgDevStatsRepository;
import dmp.repository.TagCrawlerAppsWandoujiaRepository;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.anarres.lzo.LzoAlgorithm;
import org.anarres.lzo.LzoDecompressor;
import org.anarres.lzo.LzoInputStream;
import org.anarres.lzo.LzoLibrary;
import org.apache.commons.collections.map.HashedMap;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import util.*; import util.DateUtil;
import util.ValidateUtil;
import java.io.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Created by zxy on 2017/12/26. * Created by zxy on 2017/12/26.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment