|
|
|
@ -10,7 +10,6 @@ import cn.jyjz.flowable.entity.FlowTaskInfo;
|
|
|
|
|
import cn.jyjz.flowable.service.IFlowInstanceService;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.language.SystemMessage;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.util.requestFormat.SearchQuery;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
|
|
|
|
@ -31,16 +30,16 @@ import cn.jyjz.xiaoyao.common.base.vo.UserToken;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.dataobject.Category;
|
|
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.dataobject.Flowablecc;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.dataobject.UserFinal;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.service.*;
|
|
|
|
|
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.oa.from.vo.RepeatedTaskVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.*;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.*;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.util.SearchParaFormatting;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.vo.OcrTaskChildPictureVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.vo.OcrTaskchildPictureApproVo;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
@ -55,10 +54,8 @@ import org.flowable.engine.ProcessEngineConfiguration;
|
|
|
|
|
import org.flowable.engine.history.HistoricActivityInstance;
|
|
|
|
|
import org.flowable.engine.history.HistoricProcessInstance;
|
|
|
|
|
import org.flowable.engine.history.HistoricProcessInstanceQuery;
|
|
|
|
|
import org.flowable.engine.impl.persistence.entity.ActivityInstanceEntity;
|
|
|
|
|
import org.flowable.engine.impl.util.ExecutionGraphUtil;
|
|
|
|
|
import org.flowable.engine.repository.ProcessDefinition;
|
|
|
|
|
import org.flowable.engine.runtime.ActivityInstance;
|
|
|
|
|
import org.flowable.engine.runtime.Execution;
|
|
|
|
|
import org.flowable.engine.runtime.ProcessInstance;
|
|
|
|
|
import org.flowable.engine.task.Comment;
|
|
|
|
@ -71,7 +68,6 @@ import org.flowable.task.api.history.HistoricTaskInstance;
|
|
|
|
|
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
@ -439,11 +435,15 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
* 完成任务
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Boolean complete(FlowApprove approve, UserToken userToken) {
|
|
|
|
|
public Integer complete(FlowApprove approve, UserToken userToken, List<String> formIds) {
|
|
|
|
|
Integer successCount = 0;
|
|
|
|
|
try {
|
|
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(approve.getFlowTaskInfoList())) {
|
|
|
|
|
List<FlowTaskInfo> flowTaskInfoList = approve.getFlowTaskInfoList();
|
|
|
|
|
for (FlowTaskInfo flowTaskInfo : flowTaskInfoList) {
|
|
|
|
|
if (!formIds.contains(flowTaskInfo.getFormId())) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// 当前要处理的任务
|
|
|
|
|
Task task = taskService.createTaskQuery().taskId(flowTaskInfo.getTaskId()).singleResult();
|
|
|
|
|
// 查询流程定义的信息
|
|
|
|
@ -458,17 +458,18 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
if (approve.getResult()) {
|
|
|
|
|
disposeSucceedTask(task, processDefinition, variables, model, flowTaskInfo.getFormId(), userToken);
|
|
|
|
|
} else {
|
|
|
|
|
disposeFailureTask(task,flowTaskInfo.getFormId(),variables);
|
|
|
|
|
disposeFailureTask(task, flowTaskInfo.getFormId(), variables);
|
|
|
|
|
}
|
|
|
|
|
userapproveService.save(userToken, approve, task,flowTaskInfo.getFormId());
|
|
|
|
|
userapproveService.save(userToken, approve, task, flowTaskInfo.getFormId());
|
|
|
|
|
successCount++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//保存当前审批用户与业务表的关系
|
|
|
|
|
return true;
|
|
|
|
|
return successCount;
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("e={}", e);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
return successCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -498,7 +499,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
userFinalService.save(user.getId().toString(), formId);
|
|
|
|
|
}
|
|
|
|
|
OcrTaskchildPicture childPicture = ocrTaskchildPictureService.getById(Long.parseLong(formId));
|
|
|
|
|
sendMsg(childPicture, userToken);
|
|
|
|
|
this.sendMsg(childPicture, userToken);
|
|
|
|
|
childPicture.setTaskId(taskData.getId());
|
|
|
|
|
childPicture.setTaskname(taskData.getName());
|
|
|
|
|
ocrTaskchildPictureService.updateById(childPicture);
|
|
|
|
@ -536,19 +537,17 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
//1、获取终止节点
|
|
|
|
|
List<EndEvent> endNodes = findEndFlowElement(task.getProcessDefinitionId());
|
|
|
|
|
String endId = endNodes.get(0).getId();
|
|
|
|
|
//2、执行终止
|
|
|
|
|
List<Execution> executions = runtimeService.createExecutionQuery().parentId(task.getProcessInstanceId()).list();
|
|
|
|
|
List<String> executionIds = new ArrayList<>();
|
|
|
|
|
executions.forEach(execution -> executionIds.add(execution.getId()));
|
|
|
|
|
runtimeService.createChangeActivityStateBuilder().moveExecutionsToSingleActivityId(executionIds, endId).processVariables(variables).changeState();
|
|
|
|
|
OcrTaskchildPicture taskchildPicture = ocrTaskchildPictureService.getById(Long.parseLong(formId));
|
|
|
|
|
taskchildPicture.setFinishtime(System.currentTimeMillis());
|
|
|
|
|
ocrTaskchildPictureService.updateById(taskchildPicture);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//发送消息
|
|
|
|
|
private void sendMsg(OcrTaskchildPicture model, UserToken userToken) {
|
|
|
|
|
public void sendMsg(OcrTaskchildPicture model, UserToken userToken) {
|
|
|
|
|
cn.jyjz.xiaoyao.common.base.vo.User byLoginname = userTokenService.findByLoginname(model.getAssignee());
|
|
|
|
|
OcrMsg msg = new OcrMsg();
|
|
|
|
|
msg.setCreateTime(System.currentTimeMillis());
|
|
|
|
@ -565,6 +564,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
jsonObject.put("sendTime", System.currentTimeMillis());
|
|
|
|
|
jsonObject.put("fromId", model.getId().toString());
|
|
|
|
|
jsonObject.put("taskName", model.getFromtaskname());
|
|
|
|
|
jsonObject.put("pictureId", model.getPictureid());
|
|
|
|
|
jsonObject.put("packageId", model.getPackageid());
|
|
|
|
|
msg.setBusJson(jsonObject.toJSONString());
|
|
|
|
|
msg.setCreateBy(Long.valueOf(userToken.getUserid()));
|
|
|
|
@ -980,7 +980,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
if (StringUtils.isNotBlank(pageUtils.getSortname())) {
|
|
|
|
|
paramterPage.setSortname(pageUtils.getSortname());
|
|
|
|
|
} else {
|
|
|
|
|
paramterPage.setSortname("CREATEDATE");
|
|
|
|
|
paramterPage.setSortname("submit_date_timestamp");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(pageUtils.getSortorder())) {
|
|
|
|
@ -1292,7 +1292,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
* @param tenantId
|
|
|
|
|
* @param pageUtils
|
|
|
|
|
*/
|
|
|
|
|
public void getMyProcessInstances(User user, String tenantId, Map<String, Object> searchQuery, PageUtils pageUtils) {
|
|
|
|
|
public void getMyProcessInstances(User user, String tenantId, Map<String, Object> searchQuery, PageUtils pageUtils, String userSearchId) {
|
|
|
|
|
ParamterPage paramterPage = new ParamterPage();
|
|
|
|
|
paramterPage.setStart((pageUtils.getCurrPage() - 1) * pageUtils.getPageSize());
|
|
|
|
|
paramterPage.setPagesize(pageUtils.getPageSize());
|
|
|
|
@ -1317,11 +1317,19 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
query.put("searchassignee", user.getLoginname());
|
|
|
|
|
query.putAll(searchQuery);
|
|
|
|
|
|
|
|
|
|
// if (!StringUtils.isBlank(userSearchId)) {
|
|
|
|
|
// OcrUsersearch ocrUsersearch = ocrUsersearchService.selectByUserSearchId(userSearchId);
|
|
|
|
|
// SearchQuery additionalQuery = new SearchQuery();
|
|
|
|
|
// for (OcrUsersearchchild usersearchchild : ocrUsersearch.getOcrUsersearchchildList()) {
|
|
|
|
|
// this.formattingSearchChild1(additionalQuery, usersearchchild);
|
|
|
|
|
// }
|
|
|
|
|
// query.putAll(additionalQuery.getQuery());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
Long count = ocrTaskchildPictureService.listmytaskCount(query);
|
|
|
|
|
|
|
|
|
|
query.put("page", paramterPage);
|
|
|
|
|
List<OcrTaskchildPictureAppro> list = ocrTaskchildPictureService.listmytask(query);
|
|
|
|
|
|
|
|
|
|
for (OcrTaskchildPictureAppro taskchildPicture : list) {
|
|
|
|
|
|
|
|
|
|
if (taskchildPicture.getPictureid() != null && !taskchildPicture.getPictureid().isEmpty()) {
|
|
|
|
@ -1331,6 +1339,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
OcrPicture ocrPictureOne = ocrPictureService.getOne(ocrPictureLambdaQueryWrapper);
|
|
|
|
|
taskchildPicture.setFromUserName(ocrPictureOne.getField1());
|
|
|
|
|
taskchildPicture.setPicture(ocrPictureOne);
|
|
|
|
|
taskchildPicture.setFinishTime(ocrPictureOne.getSubmitDateTimestamp());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//查询对应的流程分类
|
|
|
|
@ -1460,7 +1469,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
ocrTaskchildPictureApproVo.setFromtaskname(one.getFromtaskname()); //任务名称
|
|
|
|
|
ocrTaskchildPictureApproVo.setStatshisText(one.getStatshisText()); //历史-审批状态中文
|
|
|
|
|
ocrTaskchildPictureApproVo.setTasknamehis(one.getTasknamehis());//历史-审批节点名称
|
|
|
|
|
ocrTaskchildPictureApproVo.setFinishTime(one.getTransferRecords().get(0).getFinishTime()); //完成时间
|
|
|
|
|
ocrTaskchildPictureApproVo.setFinishTime(one.getFinishTime()); //完成时间
|
|
|
|
|
ocrTaskchildPictureApproVo.setReleaseProvince(one.getPicture().getReleaseprovince()); //省份
|
|
|
|
|
ocrTaskchildPictureApproVo.setFromprojectid(one.getFromprojectid()); //项目id
|
|
|
|
|
ocrTaskchildPictureApproVo.setProductName(one.getPicture().getField9()); //产品
|
|
|
|
@ -1472,12 +1481,57 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
ocrTaskchildPictureApproVo.setFromUserName(one.getFromUserName()); //提报人
|
|
|
|
|
ocrTaskchildPictureApproVo.setManufacturer(one.getPicture().getField5()); //manufacturer
|
|
|
|
|
ocrTaskchildPictureApproVo.setPackageid(one.getPackageid()); //任务包id
|
|
|
|
|
ocrTaskchildPictureApproVo.setProjectName(one.getFromprojectname());//项目名称
|
|
|
|
|
ocrTaskchildPictureApproVo.setCustomerLevel(one.getFromCustomerLevel());//客户级别
|
|
|
|
|
ocrTaskchildPictureApproVo.setReleaseArea(one.getFromCity());//拜访城市
|
|
|
|
|
|
|
|
|
|
listNew.add(ocrTaskchildPictureApproVo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pageUtils.setList(listNew);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询我的待办、已经办理任务
|
|
|
|
|
*
|
|
|
|
|
* @param user
|
|
|
|
|
* @param tenantId
|
|
|
|
|
* @param pageUtils
|
|
|
|
|
*/
|
|
|
|
|
public List<OcrTaskchildPictureAppro> getMyProcessInstancesNew(User user, String tenantId, Map<String, Object> searchQuery, PageUtils pageUtils) {
|
|
|
|
|
ParamterPage paramterPage = new ParamterPage();
|
|
|
|
|
paramterPage.setStart((pageUtils.getCurrPage() - 1) * pageUtils.getPageSize());
|
|
|
|
|
paramterPage.setPagesize(pageUtils.getPageSize());
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(pageUtils.getSortname())) {
|
|
|
|
|
paramterPage.setSortname(pageUtils.getSortname());
|
|
|
|
|
} else {
|
|
|
|
|
paramterPage.setSortname("CREATEDATE");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(pageUtils.getSortorder())) {
|
|
|
|
|
paramterPage.setSortorder(pageUtils.getSortorder());
|
|
|
|
|
} else {
|
|
|
|
|
paramterPage.setSortorder("DESC");
|
|
|
|
|
}
|
|
|
|
|
Map<String, Object> query = new HashMap<>();
|
|
|
|
|
query.put("page", paramterPage);
|
|
|
|
|
|
|
|
|
|
query.put("thisLoginUserid", user.getId().toString());
|
|
|
|
|
query.put("searchtenantid", tenantId);
|
|
|
|
|
//我的待办数据
|
|
|
|
|
query.put("searchassignee", user.getLoginname());
|
|
|
|
|
query.putAll(searchQuery);
|
|
|
|
|
|
|
|
|
|
Long count = ocrTaskchildPictureService.listmytaskCount(query);
|
|
|
|
|
|
|
|
|
|
query.put("page", paramterPage);
|
|
|
|
|
List<OcrTaskchildPictureAppro> list = ocrTaskchildPictureService.listmytask(query);
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询我发起的流程实例
|
|
|
|
|
*
|
|
|
|
@ -1766,8 +1820,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultVo repetitionTaskList() {
|
|
|
|
|
return ResultVoUtil.success(flowableccMybatisDao.repetitionTaskList());
|
|
|
|
|
public Page<OcrTaskchildPicture> repetitionTaskList(Integer pageNo, Integer pageSize) {
|
|
|
|
|
Page<OcrTaskchildPicture> page = new Page<>(pageNo, pageSize);
|
|
|
|
|
Page<OcrTaskchildPicture> result = flowableccMybatisDao.repetitionTaskList(page);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -1897,5 +1953,132 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|
|
|
|
return queryWrapper;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// private SearchQuery formattingSearchChild1(SearchQuery searchQuery, OcrUsersearchchild usersearchchild) {
|
|
|
|
|
// switch (usersearchchild.getSearchRelationType()) {
|
|
|
|
|
// case "where":
|
|
|
|
|
// // 添加 "where" 查询条件
|
|
|
|
|
// this.formattingSearchType1(searchQuery, usersearchchild);
|
|
|
|
|
// break;
|
|
|
|
|
// case "and":
|
|
|
|
|
// // 添加 "and" 查询条件
|
|
|
|
|
// searchQuery.addRulesOp(usersearchchild.getSearchfield(),"and");
|
|
|
|
|
// SearchQuery andQuery = this.formattingSearchType1(searchQuery, usersearchchild);
|
|
|
|
|
// searchQuery.setSearchQuery(andQuery);
|
|
|
|
|
// break;
|
|
|
|
|
// case "or":
|
|
|
|
|
// // 添加 "or" 查询条件
|
|
|
|
|
// searchQuery.addRulesOp(usersearchchild.getSearchfield(),"or");
|
|
|
|
|
// SearchQuery orQuery = this.formattingSearchType1(searchQuery, usersearchchild);
|
|
|
|
|
// searchQuery.setSearchQuery(orQuery);
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// return searchQuery;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// private SearchQuery formattingSearchType1(SearchQuery searchQuery, OcrUsersearchchild usersearchchild) {
|
|
|
|
|
// //查询类型 相等true 不相等fase
|
|
|
|
|
// boolean queryType = "eq".equals(usersearchchild.getSearchtype());
|
|
|
|
|
//
|
|
|
|
|
// // 1.获取检查数据,确定数据类型
|
|
|
|
|
// String valueType = SearchParaFormatting.clickSearchValue(usersearchchild.getSearchvalue());
|
|
|
|
|
// List<String> arrayData = null; //集合型数据
|
|
|
|
|
// List<Integer> sectionInts = null; //纯数字区间型数据
|
|
|
|
|
// String[] sections = null; //字符串区间型数据
|
|
|
|
|
// DateTime beginTime = null; //日期时间区间型数据
|
|
|
|
|
// DateTime endTime = null; //日期时间区间型数据
|
|
|
|
|
//
|
|
|
|
|
// // 2.根据数据类型,解构数据
|
|
|
|
|
// switch (valueType) {
|
|
|
|
|
// case "array":
|
|
|
|
|
// //处理多文件
|
|
|
|
|
// String[] datas = usersearchchild.getSearchvalue().split(",");
|
|
|
|
|
// arrayData = Arrays.asList(datas);
|
|
|
|
|
// break;
|
|
|
|
|
// case "section":
|
|
|
|
|
// //格式化数据,仅在做区间的时候去除空格,其他地方不进行空格去除.
|
|
|
|
|
// sections = usersearchchild.getSearchvalue().trim().replaceAll("\\s+", "").split("-");
|
|
|
|
|
// //校验是否纯数字,纯数字的话,要转成int,否则比对时会有问题
|
|
|
|
|
// sectionInts = new ArrayList<>();
|
|
|
|
|
// for (String data : sections) {
|
|
|
|
|
// if (data.matches("\\d+")) {
|
|
|
|
|
// sectionInts.add(Integer.parseInt(data));
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
// case "time":
|
|
|
|
|
// //格式化时间数据
|
|
|
|
|
// String[] times = usersearchchild.getSearchvalue().trim().replaceAll("\\s+", "").split("-");
|
|
|
|
|
// beginTime = DateUtil.parse(times[0], "yyyy/MM/dd");
|
|
|
|
|
// endTime = DateUtil.parse(times[1], "yyyy/MM/dd");
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// // 3.根据查询类型 组装查询条件 相等
|
|
|
|
|
// switch (valueType) {
|
|
|
|
|
// case "array":
|
|
|
|
|
// //集合数据
|
|
|
|
|
// //相等
|
|
|
|
|
// if (queryType) {
|
|
|
|
|
// searchQuery.addIn(usersearchchild.getSearchfield(), arrayData);
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// //不相等
|
|
|
|
|
// searchQuery.addNotIn(usersearchchild.getSearchfield(), arrayData);
|
|
|
|
|
// break;
|
|
|
|
|
//
|
|
|
|
|
// case "section":
|
|
|
|
|
// //数字区间查询
|
|
|
|
|
// if (sectionInts != null && sectionInts.size() == 2) {
|
|
|
|
|
// if (queryType) {
|
|
|
|
|
// //相等
|
|
|
|
|
// searchQuery.addGreaterEqual(usersearchchild.getSearchfield(), sectionInts.get(0));
|
|
|
|
|
// searchQuery.addLessEqual(usersearchchild.getSearchfield(), sectionInts.get(1));
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// //不相等
|
|
|
|
|
// searchQuery.addLess(usersearchchild.getSearchfield(), sectionInts.get(0));
|
|
|
|
|
// searchQuery.addGreater(usersearchchild.getSearchfield(), sectionInts.get(1));
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// //字符串区间查询
|
|
|
|
|
// if (queryType) {
|
|
|
|
|
// //相等
|
|
|
|
|
// searchQuery.addGreaterEqual(usersearchchild.getSearchfield(), sections[0]);
|
|
|
|
|
// searchQuery.addLessEqual(usersearchchild.getSearchfield(), sections[1]);
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// //不相等
|
|
|
|
|
// searchQuery.addLess(usersearchchild.getSearchfield(), sections[0]);
|
|
|
|
|
// searchQuery.addGreater(usersearchchild.getSearchfield(), sections[1]);
|
|
|
|
|
// break;
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// case "time":
|
|
|
|
|
// //时间区间数据
|
|
|
|
|
// //相等
|
|
|
|
|
// if (queryType) {
|
|
|
|
|
// searchQuery.addGreaterEqual(usersearchchild.getSearchfield(), beginTime);
|
|
|
|
|
// searchQuery.addLessEqual(usersearchchild.getSearchfield(), endTime);
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// //不相等
|
|
|
|
|
// searchQuery.addLess(usersearchchild.getSearchfield(), beginTime);
|
|
|
|
|
// searchQuery.addGreater(usersearchchild.getSearchfield(), endTime);
|
|
|
|
|
// break;
|
|
|
|
|
//
|
|
|
|
|
// default:
|
|
|
|
|
// if (queryType) {
|
|
|
|
|
// searchQuery.addEqual(usersearchchild.getSearchfield(), usersearchchild.getSearchvalue());
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// searchQuery.addNotEqual(usersearchchild.getSearchfield(), usersearchchild.getSearchvalue());
|
|
|
|
|
// }
|
|
|
|
|
// return searchQuery;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|