master
parent
d257a6077a
commit
73159cecd7
|
@ -89,40 +89,38 @@ public class SpaceService {
|
|||
queryHelper.addCondition("p.approve_status_estimate>=1 and p.approve_status_estimate<=2");
|
||||
}
|
||||
|
||||
if(StrUtil.isNotEmpty(searchInfo.get("extend")) && "0".equals(searchInfo.get("extend"))) {
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("isSecond")) && !"-1".equals(searchInfo.get("isSecond"))) {
|
||||
queryHelper.addCondition("p.is_second=?", Integer.parseInt(searchInfo.get("isSecond")));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("resolvePlan")) && !"-1".equals(searchInfo.get("resolvePlan"))) {
|
||||
queryHelper.addCondition("p.resolve_plan=?", Integer.parseInt(searchInfo.get("resolvePlan")));
|
||||
}
|
||||
/**
|
||||
* 只选择了一个时间的情况,就项目时间包括这个时间的
|
||||
*/
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("startDate")) && StrUtil.isEmpty(searchInfo.get("endDate"))) {
|
||||
String time = searchInfo.get("startDate") + " 00:00:00";
|
||||
queryHelper.addCondition("p.start_date<=? AND p.end_date>=?", time, time);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("endDate")) && StrUtil.isEmpty(searchInfo.get("startDate"))) {
|
||||
String time = searchInfo.get("endDate") + " 00:00:00";
|
||||
queryHelper.addCondition("p.start_date<=? AND p.end_date>=?", time, time);
|
||||
}
|
||||
/**
|
||||
* 两个时间都选了,则包含项目时间
|
||||
*/
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("startDate")) && StrUtil.isNotEmpty(searchInfo.get("endDate"))) {
|
||||
String startTime = searchInfo.get("startDate") + " 00:00:00";
|
||||
String endTime = searchInfo.get("endDate") + " 23:59:59";
|
||||
queryHelper.addCondition("p.start_date>=? AND p.end_date<=?", startTime, endTime);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("contractStartTime"))) {
|
||||
String time = searchInfo.get("contractStartTime") + " 00:00:00";
|
||||
queryHelper.addCondition("p.contract_time>=?", time);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("contractEndTime"))) {
|
||||
String time = searchInfo.get("contractEndTime") + " 00:00:00";
|
||||
queryHelper.addCondition("p.contract_time<=?", time);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("isSecond")) && !"-1".equals(searchInfo.get("isSecond"))) {
|
||||
queryHelper.addCondition("p.is_second=?", Integer.parseInt(searchInfo.get("isSecond")));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("resolvePlan")) && !"-1".equals(searchInfo.get("resolvePlan"))) {
|
||||
queryHelper.addCondition("p.resolve_plan=?", Integer.parseInt(searchInfo.get("resolvePlan")));
|
||||
}
|
||||
/**
|
||||
* 只选择了一个时间的情况,就项目时间包括这个时间的
|
||||
*/
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("startDate")) && StrUtil.isEmpty(searchInfo.get("endDate"))) {
|
||||
String time = searchInfo.get("startDate") + " 00:00:00";
|
||||
queryHelper.addCondition("p.start_date<=? AND p.end_date>=?", time, time);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("endDate")) && StrUtil.isEmpty(searchInfo.get("startDate"))) {
|
||||
String time = searchInfo.get("endDate") + " 00:00:00";
|
||||
queryHelper.addCondition("p.start_date<=? AND p.end_date>=?", time, time);
|
||||
}
|
||||
/**
|
||||
* 两个时间都选了,则包含项目时间
|
||||
*/
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("startDate")) && StrUtil.isNotEmpty(searchInfo.get("endDate"))) {
|
||||
String startTime = searchInfo.get("startDate") + " 00:00:00";
|
||||
String endTime = searchInfo.get("endDate") + " 23:59:59";
|
||||
queryHelper.addCondition("p.start_date>=? AND p.end_date<=?", startTime, endTime);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("contractStartTime"))) {
|
||||
String time = searchInfo.get("contractStartTime") + " 00:00:00";
|
||||
queryHelper.addCondition("p.contract_time>=?", time);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(searchInfo.get("contractEndTime"))) {
|
||||
String time = searchInfo.get("contractEndTime") + " 00:00:00";
|
||||
queryHelper.addCondition("p.contract_time<=?", time);
|
||||
}
|
||||
|
||||
//项目可见性,根据角色和人员id
|
||||
|
|
Loading…
Reference in New Issue