Commit 0399f36b by jiang'yun

修改

parent 60d42294
......@@ -40,6 +40,9 @@
<logback.version>1.2.13</logback.version>
<spring-security.version>5.7.12</spring-security.version>
<spring-framework.version>5.3.39</spring-framework.version>
<activiti-spring-boot-starter.version>7.1.0.M6</activiti-spring-boot-starter.version>
<batik-transcoder.version>1.17</batik-transcoder.version>
<batik-codec.version>1.17</batik-codec.version>
</properties>
<dependencies>
......@@ -323,6 +326,60 @@
<artifactId>httpclient5</artifactId>
</dependency>
<!-- activiti -->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter</artifactId>
<version>${activiti-spring-boot-starter.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
</exclusion>
<exclusion>
<artifactId>mybatis</artifactId>
<groupId>org.mybatis</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- activiti json 转换器 -->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-json-converter</artifactId>
<version>${activiti-spring-boot-starter.version}</version>
</dependency>
<!-- 流程图预览 -->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-image-generator</artifactId>
<version>${activiti-spring-boot-starter.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-awt-util</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-dom</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 流程图设计 -->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId>
<version>${batik-transcoder.version}</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-codec</artifactId>
<version>${batik-codec.version}</version>
</dependency>
</dependencies>
......
......@@ -208,4 +208,5 @@ public interface ISysUserService
List<String> selectUserLoginNamesByRoleKeyDept(Long secondaryUnit, String lcsp1);
List<String> selectUserLoginNamesByRoleKeyDept2(Long secondaryUnit, String s);
}
......@@ -557,6 +557,19 @@ public class SysUserServiceImpl implements ISysUserService
public List<String> selectUserLoginNamesByRoleKeyDept(Long deptId, String roleKey) {
List<SysUser> userList=userMapper.selectUserLoginNamesByRoleKeyDept(deptId,roleKey);
List<String> collect = userList.stream().map(SysUser::getUserName).collect(Collectors.toList());
if(collect.size()==0){
collect.add("chenggq58");
}
return collect;
}
@Override
public List<String> selectUserLoginNamesByRoleKeyDept2(Long deptId, String roleKey) {
List<SysUser> userList=userMapper.selectUserLoginNamesByRoleKeyDept(deptId,roleKey);
List<String> collect = userList.stream().map(SysUser::getNickName).collect(Collectors.toList());
if(collect.size()==0){
collect.add("成冠琪");
}
return collect;
}
}
......@@ -46,6 +46,7 @@ public class BizTodoItemController extends BaseController
startPage();
bizTodoItem.setIsHandle("0");
bizTodoItem.setTodoUserId(SecurityUtils.getUsername());
bizTodoItem.setOrderBy("todo_time");
List<BizTodoItem> list = bizTodoItemService.selectBizTodoItemList(bizTodoItem);
return getDataTable(list);
}
......@@ -57,6 +58,7 @@ public class BizTodoItemController extends BaseController
startPage();
bizTodoItem.setIsHandle("1");
bizTodoItem.setTodoUserId(SecurityUtils.getUsername());
bizTodoItem.setOrderBy("handle_time");
List<BizTodoItem> list = bizTodoItemService.selectBizTodoItemList(bizTodoItem);
return getDataTable(list);
}
......
......@@ -416,13 +416,12 @@ public class SjDjjcController extends BaseController
@ResponseBody
public AjaxResult importData(MultipartFile file, boolean updateSupport,SjDjjc sjDjjc) throws Exception
{
System.out.println("--------------执行插入");
SjDjjc sjDjjc1 = sjDjjcService.selectSjDjjcById(sjDjjc.getId());
XSSFWorkbook workbook = null;
try {
// try {
//装载流
workbook = new XSSFWorkbook(file.getInputStream());
// 获取井基础信息表,下标从0开始
......@@ -454,47 +453,47 @@ public class SjDjjcController extends BaseController
// }
info.setJh(jh);
String qk=new DataFormatter().formatCellValue(row.getCell(1));
if(StringUtils.isEmpty(qk)){
return AjaxResult.error("井基础信息中第"+(i+1)+"行区块不能为空");
}
// if(StringUtils.isEmpty(qk)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行区块不能为空");
// }
info.setQk(qk);
String jb=new DataFormatter().formatCellValue(row.getCell(2));
if(StringUtils.isEmpty(jb)){
return AjaxResult.error("井基础信息中第"+(i+1)+"行井别不能为空");
}
// if(StringUtils.isEmpty(jb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井别不能为空");
// }
info.setJb(jb);
String jx=new DataFormatter().formatCellValue(row.getCell(3));
if(StringUtils.isEmpty(jx)){
return AjaxResult.error("井基础信息中第"+(i+1)+"行井型不能为空");
}
// if(StringUtils.isEmpty(jx)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井型不能为空");
// }
info.setJx(jx);
String jkhzb=new DataFormatter().formatCellValue(row.getCell(4));
if(StringUtils.isEmpty(jkhzb)){
return AjaxResult.error("井基础信息中第"+(i+1)+"行井口横坐标不能为空");
}
// if(StringUtils.isEmpty(jkhzb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井口横坐标不能为空");
// }
info.setJkhzb(Double.parseDouble(jkhzb));
jkhzbB=jkhzbB+Double.parseDouble(jkhzb);
String jkzzb=new DataFormatter().formatCellValue(row.getCell(5));
if(StringUtils.isEmpty(jkzzb)){
return AjaxResult.error("井基础信息中第"+(i+1)+"行井口纵坐标不能为空");
}
// if(StringUtils.isEmpty(jkzzb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井口纵坐标不能为空");
// }
info.setJkzzb(Double.parseDouble(jkzzb));
jkzzbB=jkzzbB+Double.parseDouble(jkzzb);
String jdhzb=new DataFormatter().formatCellValue(row.getCell(6));
if(StringUtils.isEmpty(jdhzb)){
return AjaxResult.error("井基础信息中第"+(i+1)+"行井底横坐标不能为空");
}
// if(StringUtils.isEmpty(jdhzb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井底横坐标不能为空");
// }
info.setJdhzb(Double.parseDouble(jdhzb));
jdhzbB=jdhzbB+Double.parseDouble(jdhzb);
String jdzzb=new DataFormatter().formatCellValue(row.getCell(7));
if(StringUtils.isEmpty(jdzzb)){
return AjaxResult.error("井基础信息中第"+(i+1)+"行井底纵坐标不能为空");
}
// if(StringUtils.isEmpty(jdzzb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井底纵坐标不能为空");
// }
info.setJdzzb(Double.parseDouble(jdzzb));
jdzzbB=jdzzbB+Double.parseDouble(jdzzb);
......@@ -1955,14 +1954,14 @@ public class SjDjjcController extends BaseController
//高指标井
sjDjjcService.getGzbjList(jh);
} catch (IOException e) {
e.getMessage();
e.printStackTrace();
throw new Exception("导入Excel失败,请联系网站管理员!");
} finally {
workbook.close();
}
// } catch (IOException e) {
// e.getMessage();
// e.printStackTrace();
// throw new Exception("导入Excel失败,请联系网站管理员!");
//
// } finally {
// workbook.close();
// }
......@@ -2177,8 +2176,8 @@ public class SjDjjcController extends BaseController
String param = gson.toJson(map2);
// System.out.println("最终参数"+param);
//调用接口
// String body = HttpRequest.post("http://10.68.202.238:12001/api/pdf2xlsx").body(param).execute().body();
String body = HttpRequest.post("http://10.68.249.11:12001/api/pdf2xlsx").body(param).execute().body();
String body = HttpRequest.post("http://10.68.202.238:12001/api/pdf2xlsx").body(param).execute().body();//测试
// String body = HttpRequest.post("http://10.68.249.11:5174/api/pdf2xlsx").body(param).execute().body();//正式
System.out.println("接口返回数据"+body);
JsonObject root = gson.fromJson(body, JsonObject.class);
JsonObject outerData = root.getAsJsonObject("message");
......
......@@ -82,7 +82,11 @@ public class BizTodoItem extends BaseEntity
@Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date handleTime;
private String comment;
private String searchOtherTodoFlag;
private String orderBy;
}
......@@ -215,7 +215,7 @@ public class SjDjjc extends ProcessBaseEntity
private String applyUser;
/** 申请时间 流程 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
// @Excel(name = "申请时间 流程", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
......@@ -224,5 +224,41 @@ public class SjDjjc extends ProcessBaseEntity
private String taskId;
private String applyUserName;
private String zjyapplyUserName;
private String ndxsjg;
/** 钻井液流程实例id */
@Excel(name = "钻井液流程实例id")
private String zjyinstanceId;
/** 钻井液流程状态 */
@Excel(name = "钻井液流程状态")
private String zjyprocessStatus;
/** 钻井液驳回意见原因 */
@Excel(name = "钻井液驳回意见原因")
private String zjyrefuseContent;
/** 钻井液类型 流程 */
@Excel(name = "钻井液类型 流程")
private String zjytype;
/** 钻井液申请人 流程 */
@Excel(name = "钻井液申请人 流程")
private String zjyapplyUser;
/** 钻井液申请时间 流程 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "钻井液申请时间 流程", width = 30, dateFormat = "yyyy-MM-dd")
private Date zjyapplyTime;
}
......@@ -66,4 +66,7 @@ public interface BizTodoItemMapper
String selectTodoUserByTaskId(String taskId);
List<BizTodoItem> selectBizTodoItemList2(BizTodoItem bizTodoItem);
}
......@@ -67,4 +67,9 @@ public interface SjDjjcMapper
SjDjjc selectSjDjjcByinstanceId(String instanceId);
int updateSjDjjcById(SjDjjc sjDjjc);
SjDjjc selectSjDjjcByinstanceIdZjy(String instanceId);
}
......@@ -60,5 +60,9 @@ public interface IBizTodoItemService
public int deleteBizTodoItemById(Long id);
// int insertTodoItem(String instanceId, String itemName, String itemContent, String module);
int insertTodoItem(String instanceId, String itemName, String itemContent, String module,String comment);
List<BizTodoItem> selectBizTodoItemList2(BizTodoItem bizTodoItem);
}
package com.zjsgfa.project.zjsgfa.service;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
public interface ProcessService {
void complete(String taskId, String processInstanceId, String itemName, String itemContent, String complete_module, Map<String, Object> variables, HttpServletRequest request,String comment);
}
......@@ -6,6 +6,8 @@ import com.zjsgfa.common.utils.DateUtils;
import com.zjsgfa.common.utils.StringUtils;
import com.zjsgfa.project.system.domain.SysUser;
import com.zjsgfa.project.system.mapper.SysUserMapper;
import org.activiti.engine.TaskService;
import org.activiti.engine.task.Task;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -26,8 +28,8 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService
@Autowired
private BizTodoItemMapper bizTodoItemMapper;
// @Autowired
// private TaskService taskService;
@Autowired
private TaskService taskService;
@Autowired
private SysUserMapper userMapper;
......@@ -104,58 +106,66 @@ public class BizTodoItemServiceImpl implements IBizTodoItemService
return bizTodoItemMapper.deleteBizTodoItemById(id);
}
// @Override
// public int insertTodoItem(String instanceId, String itemName, String itemContent, String module) {
// BizTodoItem todoItem = new BizTodoItem();
// todoItem.setItemName(itemName);
// todoItem.setItemContent(itemContent);
// todoItem.setIsView("0");
// todoItem.setIsHandle("0");
// todoItem.setModule(module);
// todoItem.setTodoTime(DateUtils.getNowDate());
// List<Task> taskList = taskService.createTaskQuery().processInstanceId(instanceId).active().list();
// int counter = 0;
// for (Task task: taskList) {
//
// // todoitem 去重
// BizTodoItem bizTodoItem = bizTodoItemMapper.selectTodoItemByTaskId(task.getId());
// if (bizTodoItem != null) continue;
//
// BizTodoItem newItem = new BizTodoItem();
// BeanUtils.copyProperties(todoItem, newItem);
// newItem.setInstanceId(instanceId);
// newItem.setTaskId(task.getId());
// newItem.setTaskName("task" + task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1));
// newItem.setNodeName(task.getName());
// String assignee = task.getAssignee();
// if (StringUtils.isNotBlank(assignee)) {
// newItem.setTodoUserId(assignee);
// SysUser user = userMapper.selectUserByLoginName(assignee);
// newItem.setTodoUserName(user.getNickName());
// bizTodoItemMapper.insertBizTodoItem(newItem);
// counter++;
// } else {
// // 查询候选用户组
// List<String> todoUserIdList = bizTodoItemMapper.selectTodoUserListByTaskId(task.getId());
// if (!CollectionUtils.isEmpty(todoUserIdList)) {
// for (String todoUserId: todoUserIdList) {
// SysUser todoUser = userMapper.selectUserByLoginName(todoUserId);
// newItem.setTodoUserId(todoUser.getUserName());
// newItem.setTodoUserName(todoUser.getNickName());
// bizTodoItemMapper.insertBizTodoItem(newItem);
// counter++;
// }
// } else {
// // 查询候选用户
// String todoUserId = bizTodoItemMapper.selectTodoUserByTaskId(task.getId());
// SysUser todoUser = userMapper.selectUserByLoginName(todoUserId);
// newItem.setTodoUserId(todoUser.getUserName());
// newItem.setTodoUserName(todoUser.getNickName());
// bizTodoItemMapper.insertBizTodoItem(newItem);
// counter++;
// }
// }
// }
// return counter;
// }
@Override
public int insertTodoItem(String instanceId, String itemName, String itemContent, String module,String comment) {
BizTodoItem todoItem = new BizTodoItem();
todoItem.setItemName(itemName);
todoItem.setItemContent(itemContent);
todoItem.setIsView("0");
todoItem.setIsHandle("0");
todoItem.setModule(module);
todoItem.setTodoTime(DateUtils.getNowDate());
List<Task> taskList = taskService.createTaskQuery().processInstanceId(instanceId).active().list();
int counter = 0;
for (Task task: taskList) {
// todoitem 去重
BizTodoItem bizTodoItem = bizTodoItemMapper.selectTodoItemByTaskId(task.getId());
if (bizTodoItem != null) continue;
BizTodoItem newItem = new BizTodoItem();
BeanUtils.copyProperties(todoItem, newItem);
newItem.setInstanceId(instanceId);
newItem.setTaskId(task.getId());
newItem.setTaskName("task" + task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1));
newItem.setNodeName(task.getName());
String assignee = task.getAssignee();
if (StringUtils.isNotBlank(assignee)) {
newItem.setTodoUserId(assignee);
SysUser user = userMapper.selectUserByLoginName(assignee);
newItem.setTodoUserName(user.getNickName());
newItem.setComment(comment);
bizTodoItemMapper.insertBizTodoItem(newItem);
counter++;
} else {
// 查询候选用户组
List<String> todoUserIdList = bizTodoItemMapper.selectTodoUserListByTaskId(task.getId());
if (!CollectionUtils.isEmpty(todoUserIdList)) {
for (String todoUserId: todoUserIdList) {
SysUser todoUser = userMapper.selectUserByLoginName(todoUserId);
newItem.setTodoUserId(todoUser.getUserName());
newItem.setTodoUserName(todoUser.getNickName());
newItem.setComment(comment);
bizTodoItemMapper.insertBizTodoItem(newItem);
counter++;
}
} else {
// 查询候选用户
String todoUserId = bizTodoItemMapper.selectTodoUserByTaskId(task.getId());
SysUser todoUser = userMapper.selectUserByLoginName(todoUserId);
newItem.setTodoUserId(todoUser.getUserName());
newItem.setTodoUserName(todoUser.getNickName());
newItem.setComment(comment);
bizTodoItemMapper.insertBizTodoItem(newItem);
counter++;
}
}
}
return counter;
}
@Override
public List<BizTodoItem> selectBizTodoItemList2(BizTodoItem bizTodoItem) {
return bizTodoItemMapper.selectBizTodoItemList2(bizTodoItem);
}
}
package com.zjsgfa.project.zjsgfa.service.impl;
import com.zjsgfa.common.utils.DateUtils;
import com.zjsgfa.common.utils.SecurityUtils;
import com.zjsgfa.common.utils.StringUtils;
import com.zjsgfa.project.zjsgfa.domain.BizTodoItem;
import com.zjsgfa.project.zjsgfa.service.IBizTodoItemService;
import com.zjsgfa.project.zjsgfa.service.ProcessService;
import org.activiti.engine.TaskService;
import org.apache.commons.lang3.BooleanUtils;
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;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
@Service
public class ProcessServiceImpl implements ProcessService {
protected final Logger logger = LoggerFactory.getLogger(ProcessServiceImpl.class);
@Autowired
private TaskService taskService;
@Autowired
private IBizTodoItemService bizTodoItemService;
@Override
public void complete(String taskId, String instanceId, String itemName, String itemContent, String module, Map<String, Object> variables, HttpServletRequest request,String comment) {
Enumeration<String> parameterNames = request.getParameterNames();
boolean agree = true;
// taskService.addComment(taskId, instanceId, comment);
// 被委派人处理完成任务
// p.s. 被委托的流程需要先 resolved 这个任务再提交。
// 所以在 complete 之前需要先 resolved
// resolveTask() 要在 claim() 之前,不然 act_hi_taskinst 表的 assignee 字段会为 null
taskService.resolveTask(taskId, variables);
// 只有签收任务,act_hi_taskinst 表的 assignee 字段才不为 null (经过测试这里有点慢)
taskService.claim(taskId, SecurityUtils.getUsername());
taskService.complete(taskId, variables);//慢
// 更新待办事项状态
BizTodoItem query = new BizTodoItem();
/* 2021/12/28 edit by wj 同一个节点多处理人时,task_id 是相同的,无法用来查询当前节点的其他待办,需要单独写查询条件。 start */
// query.setTaskId(taskId);
query.setSearchOtherTodoFlag(taskId);// 查询其他待办任务 flag 。有值时 表示:传入task_id查询当前节点的其他处理人的待办数据
query.setOrderBy("todo_time");// 查询其他待办任务 flag 。有值时 表示:传入task_id查询当前节点的其他处理人的待办数据
/* 2021/12/28 edit by wj 同一个节点多处理人时,task_id 是相同的,无法用来查询当前节点的其他待办,需要单独写查询条件。 end */
// 考虑到候选用户组,会有多个 todoitem 办理同个 task
List<BizTodoItem> updateList = CollectionUtils.isEmpty(bizTodoItemService.selectBizTodoItemList(query)) ? null : bizTodoItemService.selectBizTodoItemList(query);
for (BizTodoItem update: updateList) {
// 找到当前登录用户的 todoitem,置为已办
if (update.getTodoUserId().equals(SecurityUtils.getUsername())) {
update.setIsView("1");
update.setIsHandle("1");
update.setHandleUserId(SecurityUtils.getUsername());
update.setHandleUserName(SecurityUtils.getLoginUser().getUser().getNickName());
update.setHandleTime(DateUtils.getNowDate());
update.setComment(comment);
bizTodoItemService.updateBizTodoItem(update);
} else {
/* 2021/12/28 edit by wj 其他处理人不删除而是置位已办。 start */
// bizTodoItemService.deleteBizTodoItemById(update.getId()); // 删除候选用户组其他 todoitem
update.setIsHandle("1");
// update.setHandleUserId(ShiroUtils.getLoginName());
// update.setHandleUserName(ShiroUtils.getSysUser().getUserName());
bizTodoItemService.updateBizTodoItem(update);
/* 2021/12/28 edit by wj 其他处理人不删除而是置位已办。 end */
}
}
// 下一节点处理人待办事项
bizTodoItemService.insertTodoItem(instanceId, itemName, itemContent, module,null);
}
}
......@@ -329,8 +329,8 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
Gson gson = new GsonBuilder().setPrettyPrinting().create();
String json = gson.toJson(map);
//调用httpsPost请求获取数据
// String url = "https://10.68.249.59:12001/api/ljzjymd";
String url = "http://10.68.249.11:12001/api/ljzjymd";
String url = "http://10.68.202.238:12001/api/ljzjymd";
// String url = "http://10.68.249.11:5174/api/ljzjymd";
System.out.println(json);
String result = HttpRequest.post(url).body(json).execute().body();
System.out.println(result);
......
......@@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="handleUserName" column="handle_user_name" />
<result property="todoTime" column="todo_time" />
<result property="handleTime" column="handle_time" />
<result property="comment" column="comment" />
</resultMap>
<sql id="selectBizTodoItemVo">
select id, item_name, item_content, module, task_id, instance_id, task_name, node_name, is_view, is_handle, todo_user_id, todo_user_name, handle_user_id, handle_user_name, todo_time, handle_time from biz_todo_item
select id, item_name, item_content, module, task_id, instance_id, task_name, node_name, is_view, is_handle, todo_user_id, todo_user_name, handle_user_id, handle_user_name, todo_time, handle_time,comment from biz_todo_item
</sql>
<select id="selectBizTodoItemList" parameterType="BizTodoItem" resultMap="BizTodoItemResult">
......@@ -45,12 +46,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="handleUserName != null and handleUserName != ''"> and handle_user_name like concat('%', #{handleUserName}, '%')</if>
<if test="todoTime != null "> and todo_time = #{todoTime}</if>
<if test="handleTime != null "> and handle_time = #{handleTime}</if>
<if test="comment != null and comment!='' "> and comment = #{comment}</if>
<if test="searchOtherTodoFlag != null and searchOtherTodoFlag != ''">
and instance_id = ( select instance_id from biz_todo_item where task_id = #{searchOtherTodoFlag} )
and task_name = ( select task_name from biz_todo_item where task_id = #{searchOtherTodoFlag} )
and node_name = ( select node_name from biz_todo_item where task_id = #{searchOtherTodoFlag} )
</if>
</where>
order by ${orderBy} desc
</select>
<select id="selectBizTodoItemById" parameterType="Long" resultMap="BizTodoItemResult">
......@@ -68,6 +71,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTodoUserByTaskId" resultType="java.lang.String">
SELECT USER_ID_ FROM ACT_ID_MEMBERSHIP WHERE USER_ID_ = (SELECT USER_ID_ FROM ACT_RU_IDENTITYLINK WHERE TASK_ID_ = #{taskId})
</select>
<select id="selectBizTodoItemList2" resultType="com.zjsgfa.project.zjsgfa.domain.BizTodoItem">
<include refid="selectBizTodoItemVo"/>
<where>
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
<if test="itemContent != null and itemContent != ''"> and item_content like concat('%', #{itemContent}, '%')</if>
<if test="module != null and module != ''"> and module = #{module}</if>
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
<if test="isView != null and isView != ''"> and is_view = #{isView}</if>
<if test="isHandle != null and isHandle != ''"> and is_handle = #{isHandle}</if>
<if test="todoUserId != null and todoUserId != ''"> and todo_user_id = #{todoUserId}</if>
<if test="todoUserName != null and todoUserName != ''"> and todo_user_name like concat('%', #{todoUserName}, '%')</if>
<if test="handleUserId != null and handleUserId != ''"> and handle_user_id = #{handleUserId}</if>
<if test="handleUserName != null and handleUserName != ''"> and handle_user_name like concat('%', #{handleUserName}, '%')</if>
<if test="todoTime != null "> and todo_time = #{todoTime}</if>
<if test="handleTime != null "> and handle_time = #{handleTime}</if>
<if test="comment != null and comment!='' "> and comment = #{comment}</if>
<if test="searchOtherTodoFlag != null and searchOtherTodoFlag != ''">
and instance_id = ( select instance_id from biz_todo_item where task_id = #{searchOtherTodoFlag} )
and task_name = ( select task_name from biz_todo_item where task_id = #{searchOtherTodoFlag} )
and node_name = ( select node_name from biz_todo_item where task_id = #{searchOtherTodoFlag} )
</if>
</where>
ORDER BY handle_time IS NULL DESC, handle_time DESC
</select>
<insert id="insertBizTodoItem" parameterType="BizTodoItem" useGeneratedKeys="true" keyProperty="id">
insert into biz_todo_item
......@@ -87,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="handleUserName != null">handle_user_name,</if>
<if test="todoTime != null">todo_time,</if>
<if test="handleTime != null">handle_time,</if>
<if test="comment != null">comment,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemName != null">#{itemName},</if>
......@@ -104,6 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="handleUserName != null">#{handleUserName},</if>
<if test="todoTime != null">#{todoTime},</if>
<if test="handleTime != null">#{handleTime},</if>
<if test="comment != null">#{comment},</if>
</trim>
</insert>
......@@ -125,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="handleUserName != null">handle_user_name = #{handleUserName},</if>
<if test="todoTime != null">todo_time = #{todoTime},</if>
<if test="handleTime != null">handle_time = #{handleTime},</if>
<if test="comment != null">comment = #{comment},</if>
</trim>
where id = #{id}
</update>
......
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