Merge branch 'dev-cui-1'

pull/1/head
DELL 1 year ago
commit 9c1155d359

@ -45,6 +45,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -390,7 +391,6 @@ public class FlowTaskController extends BaseController {
if (izupuser.contains(",")) { if (izupuser.contains(",")) {
String[] userIds = izupuser.split(","); String[] userIds = izupuser.split(",");
List<String> arrayData = Arrays.asList(userIds); List<String> arrayData = Arrays.asList(userIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("fromuserid", arrayData); searchQuery.addIn("fromuserid", arrayData);
} else { } else {
searchQuery.addEqual("fromuserid", izupuser); searchQuery.addEqual("fromuserid", izupuser);
@ -399,7 +399,9 @@ public class FlowTaskController extends BaseController {
if (org.springframework.util.StringUtils.hasText(izproject)) { if (org.springframework.util.StringUtils.hasText(izproject)) {
if (izproject.contains(",")) { if (izproject.contains(",")) {
String[] projectIds = izproject.split(","); // 以逗号拆分字符串 String[] projectIds = izproject.split(","); // 以逗号拆分字符串
searchQuery.addIn("fromprojectid", projectIds); List<String> arrayData = Arrays.asList(projectIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("fromprojectid", arrayData);
} else { } else {
searchQuery.addEqual("fromprojectid", izproject); searchQuery.addEqual("fromprojectid", izproject);
} }
@ -407,7 +409,9 @@ public class FlowTaskController extends BaseController {
if (org.springframework.util.StringUtils.hasText(izplan)) { if (org.springframework.util.StringUtils.hasText(izplan)) {
if (izplan.contains(",")) { if (izplan.contains(",")) {
String[] planIds = izplan.split(","); // 以逗号拆分字符串 String[] planIds = izplan.split(","); // 以逗号拆分字符串
searchQuery.addIn("fromplanid", planIds); List<String> arrayData = Arrays.asList(planIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("fromplanid", arrayData);
} else { } else {
searchQuery.addEqual("fromplanid", izplan); searchQuery.addEqual("fromplanid", izplan);
} }
@ -415,7 +419,9 @@ public class FlowTaskController extends BaseController {
if (org.springframework.util.StringUtils.hasText(izstatus)) { if (org.springframework.util.StringUtils.hasText(izstatus)) {
if (izstatus.contains(",")) { if (izstatus.contains(",")) {
String[] statusIds = izstatus.split(","); // 以逗号拆分字符串 String[] statusIds = izstatus.split(","); // 以逗号拆分字符串
searchQuery.addIn("states", statusIds); List<String> arrayData = Arrays.asList(statusIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("states", arrayData);
} else { } else {
searchQuery.addEqual("states", izstatus); searchQuery.addEqual("states", izstatus);
} }
@ -423,81 +429,55 @@ public class FlowTaskController extends BaseController {
if (org.springframework.util.StringUtils.hasText(iztaskrrom)) { if (org.springframework.util.StringUtils.hasText(iztaskrrom)) {
if (iztaskrrom.contains(",")) { if (iztaskrrom.contains(",")) {
String[] taskrromIds = iztaskrrom.split(","); // 以逗号拆分字符串 String[] taskrromIds = iztaskrrom.split(","); // 以逗号拆分字符串
searchQuery.addIn("fromsourceid", taskrromIds); List<String> arrayData = Arrays.asList(taskrromIds);
SearchQueryForm searchQueryForm = new SearchQueryForm();
searchQuery.addIn("fromsourceid", arrayData);
} else { } else {
searchQuery.addEqual("fromsourceid", iztaskrrom); searchQuery.addEqual("fromsourceid", iztaskrrom);
} }
} }
// if(org.springframework.util.StringUtils.hasText(izuptime)) {
// if(org.springframework.util.StringUtils.hasText(izproject)){
// searchQuery.addEqual("fromprojectid",izproject);
// }
// if(org.springframework.util.StringUtils.hasText(izplan)){
// searchQuery.addEqual("fromplanid",izplan);
// }
// if(org.springframework.util.StringUtils.hasText(izstatus)){
// searchQuery.addEqual("states",izstatus);
// }
// if(org.springframework.util.StringUtils.hasText(iztaskrrom)){
// searchQuery.addEqual("fromsourceid",iztaskrrom);
// }
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if(org.apache.commons.lang3.StringUtils.isBlank(tenantId)){
return ResultVoUtil.error("租户主键不能为空");
}
User user = this.userService.getSessionUser(request);
if(user.isUserIsSys(xiaoyaoConfig.getWebconfig().getSysLoginUser().split(","))){
}else{
searchQuery.addEqual("thisLoginUserid",user.getId().toString());
searchQuery.addEqual("tenantid",tenantId);
}
Map<String,Object> query = searchQuery.getQuery();
if(org.springframework.util.StringUtils.hasText(izuptime)){
String[] dateRange = izuptime.split("-"); String[] dateRange = izuptime.split("-");
// if (dateRange.length == 2) {
// try {
// long startTimeStamp = Long.parseLong(dateRange[0].trim());
// long endTimeStamp = Long.parseLong(dateRange[1].trim());
// query.put("fromuptimeStart", startTimeStamp);
// query.put("fromuptimeEnd", endTimeStamp);
// } catch (NumberFormatException e) {
// e.printStackTrace();
// }
// }
if (dateRange.length == 2) { if (dateRange.length == 2) {
try { try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); SimpleDateFormat sdfInput = new SimpleDateFormat("yyyy/MM/dd");
// 解析开始时间 // 解析开始时间
long startTimeStamp = Long.parseLong(dateRange[0].trim()); Long startTimeStamp = sdfInput.parse(dateRange[0].trim()).getTime();
Date startDate = new Date(startTimeStamp);
String startDateString = sdf.format(startDate);
// 解析结束时间 // 解析结束时间
long endTimeStamp = Long.parseLong(dateRange[1].trim()); Long endTimeStamp = sdfInput.parse(dateRange[1].trim()).getTime();
Date endDate = new Date(endTimeStamp);
String endDateString = sdf.format(endDate);
// 如果开始时间不为空,则将其放入查询条件中 // 如果开始时间不为空,则将其放入查询条件中
if (!startDateString.isEmpty()) { if (startTimeStamp!=null) {
query.put("fromuptimeStart", startDateString); searchQuery.addGreater("createdateStart",startTimeStamp);
} }
// 如果结束时间不为空,则将其放入查询条件中 // 如果结束时间不为空,则将其放入查询条件中
if (!endDateString.isEmpty()) { if (endTimeStamp!=null) {
query.put("fromuptimeEnd", endDateString); searchQuery.addLess("createdateEnd",endTimeStamp);
} }
} catch (NumberFormatException e) { } catch (ParseException e) {
// 处理时间戳解析异常 // 处理日期解析异常
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if(org.apache.commons.lang3.StringUtils.isBlank(tenantId)){
return ResultVoUtil.error("租户主键不能为空");
}
User user = this.userService.getSessionUser(request);
if(user.isUserIsSys(xiaoyaoConfig.getWebconfig().getSysLoginUser().split(","))){
}else{
searchQuery.addEqual("thisLoginUserid",user.getId().toString());
searchQuery.addEqual("tenantid",tenantId);
}
Map<String,Object> query = searchQuery.getQuery();
flowTaskService.getFinalProcessInstances(query,pageUtils); flowTaskService.getFinalProcessInstances(query,pageUtils);
return ResultVoUtil.success(pageUtils); return ResultVoUtil.success(pageUtils);
} }

@ -139,7 +139,7 @@
<if test="categoryid != null"> and tcp.CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend}</if> <if test="categoryid != null"> and tcp.CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend}</if>
<if test="specification != null"> and tcp.SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend}</if> <if test="specification != null"> and tcp.SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend}</if>
<if test="buessinessno != null"> and tcp.BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend}</if> <if test="buessinessno != null"> and tcp.BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend}</if>
<if test="states != null"> and tcp.STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend}</if> <!-- <if test="states != null"> and tcp.STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend}</if>-->
<if test="processinstanceid != null"> and tcp.PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend}</if> <if test="processinstanceid != null"> and tcp.PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend}</if>
<if test="processdefinitionid != null"> and tcp.PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend}</if> <if test="processdefinitionid != null"> and tcp.PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend}</if>
<if test="deploymentid != null"> and tcp.DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend}</if> <if test="deploymentid != null"> and tcp.DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend}</if>
@ -152,14 +152,81 @@
<if test="createuser != null"> and tcp.CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend}</if> <if test="createuser != null"> and tcp.CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend}</if>
<if test="createusername != null"> and tcp.CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend}</if> <if test="createusername != null"> and tcp.CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend}</if>
<if test="createdate != null"> and tcp.CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend}</if> <if test="createdate != null"> and tcp.CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend}</if>
<if test="createdateStart != null"> and tcp.CREATEDATE ${createdateStart.dataOp} ${createdateStart.likestar}#{createdateStart.value}${createdateStart.likeend}</if>
<if test="createdateEnd != null"> and tcp.CREATEDATE ${createdateEnd.dataOp} ${createdateEnd.likestar}#{createdateEnd.value}${createdateEnd.likeend}</if>
<if test="username != null"> and tcp.USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend}</if> <if test="username != null"> and tcp.USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend}</if>
<if test="fromtaskid != null"> and tcp.FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend}</if> <if test="fromtaskid != null"> and tcp.FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend}</if>
<if test="fromtaskname != null"> and tcp.FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend}</if> <if test="fromtaskname != null"> and tcp.FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend}</if>
<if test="fromuserid != null"> and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend}</if> <!-- <if test="fromuserid != null"> and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend}</if>-->
<if test="fromprojectid != null"> and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend}</if> <!-- <if test="fromprojectid != null"> and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend}</if>-->
<if test="fromplanid != null"> and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend}</if> <!-- <if test="fromplanid != null"> and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend}</if>-->
<if test="fromuptime != null"> and tcp.FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend}</if> <if test="fromuptime != null"> and tcp.FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend}</if>
<if test="fromsourceid != null"> and tcp.FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}#{fromsourceid.value}${fromsourceid.likeend}</if> <if test="fromuserid != null"> and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}
<!-- #{fromuserid.value}-->
<if test="fromuserid.value instanceof java.util.List">
<foreach item="item" collection="fromuserid.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!fromuserid.value instanceof java.util.List">
#{fromuserid.value}
</if>
${fromuserid.likeend}
</if>
<if test="fromprojectid != null"> and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}
<!-- #{fromuserid.value}-->
<if test="fromprojectid.value instanceof java.util.List">
<foreach item="item" collection="fromprojectid.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!fromprojectid.value instanceof java.util.List">
#{fromprojectid.value}
</if>
${fromprojectid.likeend}
</if>
<if test="fromplanid != null"> and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}
<!-- #{fromuserid.value}-->
<if test="fromplanid.value instanceof java.util.List">
<foreach item="item" collection="fromplanid.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!fromplanid.value instanceof java.util.List">
#{fromplanid.value}
</if>
${fromplanid.likeend}
</if>
<if test="states != null"> and tcp.STATES ${states.dataOp} ${states.likestar}
<!-- #{fromuserid.value}-->
<if test="states.value instanceof java.util.List">
<foreach item="item" collection="states.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!states.value instanceof java.util.List">
#{states.value}
</if>
${states.likeend}
</if>
<if test="fromsourceid != null"> and tcp.FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}
<!-- #{fromuserid.value}-->
<if test="fromsourceid.value instanceof java.util.List">
<foreach item="item" collection="fromsourceid.value" open="" separator="," close="">
#{item}
</foreach>
</if>
<if test="!fromsourceid.value instanceof java.util.List">
#{fromsourceid.value}
</if>
${fromsourceid.likeend}
</if>
<!-- <if test="fromuserid.value instanceof java.util.List"> and tcp.FROMUSERID-->
<!-- in-->
<!-- <foreach item="item" collection="fromuserid.value" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </if>-->
<if test="havepoints != null"> and tcp.HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend}</if> <if test="havepoints != null"> and tcp.HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend}</if>
<if test="taskname != null"> and tcp.TASKNAME ${taskname.dataOp} ${taskname.likestar}#{taskname.value}${taskname.likeend}</if> <if test="taskname != null"> and tcp.TASKNAME ${taskname.dataOp} ${taskname.likestar}#{taskname.value}${taskname.likeend}</if>
<if test="userid != null"> and tcp.USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if> <if test="userid != null"> and tcp.USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if>

Loading…
Cancel
Save