单据的创建人处理
This commit is contained in:
111
ktg-system/src/main/java/com/ktg/system/domain/UserTask.java
Normal file
111
ktg-system/src/main/java/com/ktg/system/domain/UserTask.java
Normal file
@@ -0,0 +1,111 @@
|
||||
package com.ktg.system.domain;
|
||||
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 所有用户相关的业务单据
|
||||
* 用于移动端展示待处理单据和已处理单据
|
||||
*/
|
||||
public class UserTask extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 单据类型
|
||||
*/
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 单据的ID
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 单据编码
|
||||
*/
|
||||
private String taskCode;
|
||||
|
||||
/**
|
||||
* 单据名称
|
||||
*/
|
||||
private String taskName;
|
||||
|
||||
|
||||
/**
|
||||
* 单据的状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
private String nickName;
|
||||
|
||||
private String userName;
|
||||
|
||||
public String getTaskType() {
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType) {
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getTaskCode() {
|
||||
return taskCode;
|
||||
}
|
||||
|
||||
public void setTaskCode(String taskCode) {
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
}
|
||||
|
||||
public void setTaskName(String taskName) {
|
||||
this.taskName = taskName;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserTask{" +
|
||||
"taskType='" + taskType + '\'' +
|
||||
", taskId='" + taskId + '\'' +
|
||||
", taskCode='" + taskCode + '\'' +
|
||||
", taskName='" + taskName + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", nickName='" + nickName + '\'' +
|
||||
", userName='" + userName + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ktg.system.mapper;
|
||||
|
||||
import com.ktg.system.domain.UserTask;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserTaskMapper {
|
||||
|
||||
public List<UserTask> listTodoList(Long userId);
|
||||
|
||||
public List<UserTask> listFinishedList(Long userId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ktg.system.service;
|
||||
|
||||
import com.ktg.system.domain.UserTask;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IUserTaskService {
|
||||
|
||||
public List<UserTask> listTodoList(Long userId);
|
||||
|
||||
public List<UserTask> listFinishedList(Long userId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ktg.system.service.impl;
|
||||
|
||||
import com.ktg.system.domain.UserTask;
|
||||
import com.ktg.system.mapper.UserTaskMapper;
|
||||
import com.ktg.system.service.IUserTaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class UserTaskServiceImpl implements IUserTaskService {
|
||||
|
||||
@Autowired
|
||||
private UserTaskMapper userTaskMapper;
|
||||
|
||||
@Override
|
||||
public List<UserTask> listTodoList(Long userId) {
|
||||
return userTaskMapper.listTodoList(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserTask> listFinishedList(Long userId) {
|
||||
return userTaskMapper.listFinishedList(userId);
|
||||
}
|
||||
}
|
||||
132
ktg-system/src/main/resources/mapper/system/UserTaskMapper.xml
Normal file
132
ktg-system/src/main/resources/mapper/system/UserTaskMapper.xml
Normal file
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ktg.system.mapper.UserTaskMapper">
|
||||
|
||||
<resultMap type="UserTask" id="UserTaskResult">
|
||||
<id property="taskId" column="task_id" />
|
||||
<result property="taskCode" column="task_code" />
|
||||
<result property="taskName" column="task_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="taskType" column="taskType" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<select id="listTodoList" parameterType="Long" resultMap="UserTaskResult">
|
||||
select *
|
||||
from (
|
||||
select 'ITEMRECPT' as task_type, recpt_id as task_id,recpt_code as task_code,recpt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_item_recpt wir
|
||||
where wir.`status` = 'PREPARE'
|
||||
and wir.create_by = #{userId}
|
||||
union
|
||||
select 'WM_RTVENDOR' as task_type, wrv.rt_id as task_id,rt_code as task_code, rt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_rt_vendor wrv
|
||||
where wrv.`status` ='PREPARE'
|
||||
and wrv.create_by = #{userId}
|
||||
union
|
||||
select 'ISSUE' as task_type, issue_id as task_id,issue_code as issue_code, issue_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_issue_header wih
|
||||
where wih.`status` ='PREPARE'
|
||||
and wih.create_by = #{userId}
|
||||
union
|
||||
select 'RTISSUE' as task_type, rt_id as task_id,rt_code as task_code, rt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_rt_issue wri
|
||||
where wri.`status` ='PREPARE'
|
||||
AND wri.create_by = #{userId}
|
||||
union
|
||||
select 'PRODUCTRECPT' as task_type, wpr.recpt_id as task_id,recpt_code as task_code, recpt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_product_recpt wpr
|
||||
where wpr.`status` ='PREPARE'
|
||||
and wpr.create_by = #{userId}
|
||||
union
|
||||
select 'PRODUCTSALSE' as task_type, wps.salse_id as task_id,salse_code as task_code, salse_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_product_salse wps
|
||||
where wps.`status` ='PREPARE'
|
||||
and wps.create_by = #{userId}
|
||||
union
|
||||
select 'RTSALSE' as task_type,wrs.rt_id as task_id,rt_code as task_code, rt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_rt_salse wrs
|
||||
where wrs.`status` ='PREPARE'
|
||||
and wrs.create_by = #{userId}
|
||||
union
|
||||
select 'TRANSFER' as task_type,wt.transfer_id as task_id,wt.transfer_code as task_code, wt.transfer_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_transfer wt
|
||||
where wt.`status` ='PREPARE'
|
||||
and wt.create_by = #{userId}
|
||||
union
|
||||
select 'STOCKTAKING' as task_type,wst.taking_id as task_id,wst.taking_code as task_code,wst.taking_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_stock_taking wst
|
||||
where wst.`status` ='PREPARE'
|
||||
and wst.create_by = #{userId}
|
||||
union
|
||||
select 'FEEDBACK' as task_type,pf.record_id as task_id,feedback_code as task_code,'报工单' as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from pro_feedback pf
|
||||
where pf.`status`='PREPARE'
|
||||
and pf.create_by = #{userId}
|
||||
) t
|
||||
order by create_time, desc
|
||||
|
||||
</select>
|
||||
|
||||
<select id="listFinishedList" parameterType="Long" resultMap="UserTaskResult">
|
||||
select *
|
||||
from (
|
||||
select 'ITEMRECPT' as task_type, recpt_id as task_id,recpt_code as task_code,recpt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_item_recpt wir
|
||||
where wir.`status` != 'PREPARE'
|
||||
and wir.create_by = #{userId}
|
||||
union
|
||||
select 'WM_RTVENDOR' as task_type, wrv.rt_id as task_id,rt_code as task_code, rt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_rt_vendor wrv
|
||||
where wrv.`status` !='PREPARE'
|
||||
and wrv.create_by = #{userId}
|
||||
union
|
||||
select 'ISSUE' as task_type, issue_id as task_id,issue_code as issue_code, issue_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_issue_header wih
|
||||
where wih.`status` !='PREPARE'
|
||||
and wih.create_by = #{userId}
|
||||
union
|
||||
select 'RTISSUE' as task_type, rt_id as task_id,rt_code as task_code, rt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_rt_issue wri
|
||||
where wri.`status` !='PREPARE'
|
||||
AND wri.create_by = #{userId}
|
||||
union
|
||||
select 'PRODUCTRECPT' as task_type, wpr.recpt_id as task_id,recpt_code as task_code, recpt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_product_recpt wpr
|
||||
where wpr.`status` !='PREPARE'
|
||||
and wpr.create_by = #{userId}
|
||||
union
|
||||
select 'PRODUCTSALSE' as task_type, wps.salse_id as task_id,salse_code as task_code, salse_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_product_salse wps
|
||||
where wps.`status` !='PREPARE'
|
||||
and wps.create_by = #{userId}
|
||||
union
|
||||
select 'RTSALSE' as task_type,wrs.rt_id as task_id,rt_code as task_code, rt_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_rt_salse wrs
|
||||
where wrs.`status` !='PREPARE'
|
||||
and wrs.create_by = #{userId}
|
||||
union
|
||||
select 'TRANSFER' as task_type,wt.transfer_id as task_id,wt.transfer_code as task_code, wt.transfer_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_transfer wt
|
||||
where wt.`status` !='PREPARE'
|
||||
and wt.create_by = #{userId}
|
||||
union
|
||||
select 'STOCKTAKING' as task_type,wst.taking_id as task_id,wst.taking_code as task_code,wst.taking_name as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from wm_stock_taking wst
|
||||
where wst.`status` !='PREPARE'
|
||||
and wst.create_by = #{userId}
|
||||
union
|
||||
select 'FEEDBACK' as task_type,pf.record_id as task_id,feedback_code as task_code,'报工单' as task_name,`status`,create_by,create_time,update_by,update_time
|
||||
from pro_feedback pf
|
||||
where pf.`status` !='PREPARE'
|
||||
and pf.create_by = #{userId}
|
||||
) t
|
||||
order by create_time, desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user