Commit 764b8868 by lzxry

1

parent fda84c42
...@@ -2706,8 +2706,8 @@ public class ContractServiceImpl implements ContractService { ...@@ -2706,8 +2706,8 @@ public class ContractServiceImpl implements ContractService {
s_data[w] = false; s_data[w] = false;
}else{ }else{
s_data[w] = true; s_data[w] = true;
filter.put("validStartDate",formatter.formatCellValue(row_data.getCell(14)).trim());
} }
filter.put("validStartDate",formatter.formatCellValue(row_data.getCell(14)).trim());
filter.put("one_time",dataSTR); filter.put("one_time",dataSTR);
}else { }else {
//主账号不为空,按照之前逻辑不变 //主账号不为空,按照之前逻辑不变
...@@ -2766,20 +2766,20 @@ public class ContractServiceImpl implements ContractService { ...@@ -2766,20 +2766,20 @@ public class ContractServiceImpl implements ContractService {
String start_date = filter.get("start_date"); String start_date = filter.get("start_date");
String end_date = filter.get("end_date"); String end_date = filter.get("end_date");
String rowIndex = filter.get("rowIndex"); String rowIndex = filter.get("rowIndex");
String validStartDateStr=""; String validStartDateStr = filter.get("validStartDate");
if(filter.get("one_time").equals("否")){
validStartDateStr = start_date;
}else{
validStartDateStr = filter.get("validStartDate");
}
//if(filter.get("one_time").equals("否")){ //if(filter.get("one_time").equals("否")){
if(!StringUtils.isEmpty(validStartDateStr)){ if(!StringUtils.isEmpty(validStartDateStr)){
DateTime dateTime = new DateTime(validStartDateStr); DateTime dateTime = new DateTime(validStartDateStr);
DateTime startDate = new DateTime(start_date); DateTime startDate = new DateTime(start_date);
DateTime endDate = new DateTime(end_date); DateTime endDate = new DateTime(end_date);
int contractAllDay = Days.daysBetween(startDate, endDate).getDays();//合同总天数-1 ,用于计算结束日期
filter.put("valid_start_date",dateTime.toString("yyyy-MM-dd")); filter.put("valid_start_date",dateTime.toString("yyyy-MM-dd"));
if(filter.get("one_time").equals("否")){
filter.put("valid_end_date",end_date);
}else{
int contractAllDay = Days.daysBetween(startDate, endDate).getDays();//合同总天数-1 ,用于计算结束日期
filter.put("valid_end_date",dateTime.plusDays(contractAllDay).toString("yyyy-MM-dd")); filter.put("valid_end_date",dateTime.plusDays(contractAllDay).toString("yyyy-MM-dd"));
}
}else{ }else{
return ResultModel.ERROR("第" + rowIndex + "行主账号【" + email + "】未填写IP发送"); return ResultModel.ERROR("第" + rowIndex + "行主账号【" + email + "】未填写IP发送");
} }
......
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