Commit 8a3846bc by lzxry

流量同步排序规则变更

parent fb37e524
......@@ -321,11 +321,13 @@ public class TrackingFlowTask {
public Contract[] orderByContract(Contract[] contractsArray){
for (int i = 0; i < contractsArray.length-1; i++) {
for (int j = 0; j < contractsArray.length-1-i; j++) {
if(DateUtil.getDate(contractsArray[j].getStartDate()).getTime() > DateUtil.getDate(contractsArray[j + 1].getStartDate()).getTime()){
String startDate1 = contractsArray[j].getSignedDate() == null ? contractsArray[j].getStartDate() : contractsArray[j].getSignedDate();
String startDate2 = contractsArray[j + 1].getSignedDate() == null ? contractsArray[j + 1].getStartDate() : contractsArray[j + 1].getSignedDate();
if(DateUtil.getDate(startDate1).getTime() > DateUtil.getDate(startDate2).getTime()){
Contract temp = contractsArray[j];
contractsArray[j] = contractsArray[j+1];
contractsArray[j + 1] = temp;
}else if(DateUtil.getDate(contractsArray[j].getStartDate()).getTime() == DateUtil.getDate(contractsArray[j + 1].getStartDate()).getTime()){
}else if(DateUtil.getDate(startDate1).getTime() == DateUtil.getDate(startDate2).getTime()){
String contractCode = StringUtil.matchNumber(contractsArray[j].getContractCode());
String contractCodeMin = StringUtil.matchNumber(contractsArray[j+ 1].getContractCode());
......
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