330任务完成
This commit is contained in:
54
ruoyi-oa/src/main/resources/mapper/oa/OaFeedbackMapper.xml
Normal file
54
ruoyi-oa/src/main/resources/mapper/oa/OaFeedbackMapper.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?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.ruoyi.oa.mapper.OaFeedbackMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.OaFeedback" id="OaFeedbackResult">
|
||||
<result property="feedbackId" column="feedback_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
<insert id="insertItem">
|
||||
|
||||
INSERT INTO oa_feedback_item (
|
||||
feedback_id,
|
||||
user_id
|
||||
)
|
||||
SELECT
|
||||
#{feedbackId},
|
||||
su.user_id
|
||||
FROM sys_user su
|
||||
WHERE su.del_flag = 0
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateToRead">
|
||||
update oa_feedback_item set status = 1 where feedback_id =#{feedbackId} and user_id = #{userId}
|
||||
</update>
|
||||
<delete id="delItem">
|
||||
delete from oa_feedback_item where feedback_id =#{feedbackId} and user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectVoPageAndStatus" resultType="com.ruoyi.oa.domain.vo.OaFeedbackVo">
|
||||
|
||||
select
|
||||
oaf.feedback_id,
|
||||
oaf.content,
|
||||
oaf.status,
|
||||
oaf.title,
|
||||
ofi.status as state
|
||||
from oa_feedback oaf
|
||||
left join oa_feedback_item ofi on oaf.feedback_id = ofi.feedback_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -261,6 +261,42 @@
|
||||
WHERE p.project_id = #{projectId}
|
||||
|
||||
</select>
|
||||
<select id="selectVoPlus" resultType="com.ruoyi.oa.domain.vo.SysOaProjectVo">
|
||||
SELECT
|
||||
p.project_id,
|
||||
p.project_name,
|
||||
p.project_num,
|
||||
p.project_type,
|
||||
p.address,
|
||||
p.funds,
|
||||
p.functionary,
|
||||
p.begin_time,
|
||||
p.finish_time,
|
||||
p.delivery,
|
||||
p.guarantee,
|
||||
p.introduction,
|
||||
p.project_grade,
|
||||
p.project_status,
|
||||
p.contract_id,
|
||||
p.invoice_name,
|
||||
p.invoice_number,
|
||||
p.invoice_address,
|
||||
p.invoice_bank,
|
||||
p.accessory,
|
||||
p.bail,
|
||||
p.remark,
|
||||
p.create_by,
|
||||
p.create_time,
|
||||
p.update_by,
|
||||
p.update_time,
|
||||
p.is_postpone,
|
||||
p.postpone_reason,
|
||||
p.postpone_time,
|
||||
p.color,
|
||||
TIMESTAMPDIFF(DAY, NOW(), p.postpone_time) AS remainTime
|
||||
FROM sys_oa_project p
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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.ruoyi.oa.mapper.SysOaTaskItemMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.SysOaTaskItem" id="SysOaTaskItemResult">
|
||||
<result property="itemId" column="item_id"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="files" column="files"/>
|
||||
<result property="signTime" column="sign_time"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="beginTime" column="begin_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="originEndTime" column="origin_end_time"/>
|
||||
<result property="tempTime" column="temp_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="completedTime" column="completed_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.oa.mapper.SysOaTaskMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.SysOaTask" id="SysOaTaskResult">
|
||||
<resultMap type="com.ruoyi.oa.domain.vo.SysOaTaskVo" id="SysOaTaskResult">
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="taskTitle" column="task_title"/>
|
||||
@@ -16,10 +16,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="content" column="content"/>
|
||||
<result property="accessory" column="accessory"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="state" column="state"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="completedTime" column="completed_time"/>
|
||||
<result property="createUserNickName" column="createUserNickName"/>
|
||||
<result property="workerNickName" column="workerNickName"/>
|
||||
<result property="postponements" column="postponements"/>
|
||||
<collection property="taskItemVoList" ofType="com.ruoyi.oa.domain.vo.SysOaTaskItemVo" javaType="list">
|
||||
<result property="itemId" column="item_id"/>
|
||||
<result property="content" column="itemContent"/>
|
||||
<result property="files" column="files"/>
|
||||
<result property="signTime" column="sign_time"/>
|
||||
<result property="status" column="itemStatus"/>
|
||||
<result property="beginTime" column="itemBeginTime"/>
|
||||
<result property="endTime" column="itemEndTime"/>
|
||||
<result property="remark" column="itemRemark"/>
|
||||
<result property="completedTime" column="itemCompletedTime"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
|
||||
@@ -40,13 +54,105 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
sot.task_type,
|
||||
sot.task_grade,
|
||||
sot.collaborator,
|
||||
COALESCE(sot.finish_time, soti.end_time) AS finish_time,
|
||||
COALESCE(sot.temp_time, soti.temp_time) AS temp_time,
|
||||
sot.begin_time,
|
||||
sot.finish_time,
|
||||
sot.origin_finish_time,
|
||||
sot.postponements,
|
||||
sot.completed_time,
|
||||
sot.content,
|
||||
sot.accessory,
|
||||
(
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
||||
) AS accessory,
|
||||
|
||||
sot.rank_number,
|
||||
sot.remark,
|
||||
sot.task_rank,
|
||||
sot.state,
|
||||
sot.time_gap,
|
||||
sot.status,
|
||||
sot.create_by,
|
||||
sot.create_time,
|
||||
sot.update_by,
|
||||
sot.update_time,
|
||||
sot.del_flag,
|
||||
sot.own_rank,
|
||||
sop.project_name,
|
||||
soti.item_id,
|
||||
sop.project_num,
|
||||
su1.nick_name AS createUserNickName,
|
||||
su2.nick_name AS workerNickName,
|
||||
CASE
|
||||
WHEN sot.completed_time IS NULL
|
||||
THEN DATEDIFF(NOW(), COALESCE(sot.finish_time, soti.end_time))
|
||||
ELSE 0
|
||||
END AS overDays,
|
||||
(
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
||||
) AS files
|
||||
|
||||
FROM sys_oa_task sot
|
||||
LEFT JOIN sys_user su1 ON su1.user_id = sot.create_user_id
|
||||
LEFT JOIN sys_user su2 ON su2.user_id = sot.worker_id
|
||||
LEFT JOIN sys_oa_project sop ON sop.project_id = sot.project_id
|
||||
LEFT JOIN sys_oa_task_item soti
|
||||
ON soti.task_id = sot.task_id
|
||||
AND soti.completed_time IS NULL
|
||||
|
||||
${ew.getCustomSqlSegment}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDetailVoById" resultMap="SysOaTaskResult">
|
||||
SELECT
|
||||
sot.task_id,
|
||||
sot.project_id,
|
||||
sot.create_user_id,
|
||||
sot.worker_id,
|
||||
sot.task_title,
|
||||
sot.task_type,
|
||||
sot.task_grade,
|
||||
|
||||
COALESCE(
|
||||
sot.finish_time,
|
||||
(
|
||||
SELECT a.end_time
|
||||
FROM sys_oa_task_item a
|
||||
WHERE a.task_id = sot.task_id
|
||||
AND a.completed_time IS NULL
|
||||
LIMIT 1
|
||||
)
|
||||
) AS finish_time,
|
||||
COALESCE(
|
||||
sot.temp_time,
|
||||
(
|
||||
SELECT a.temp_time
|
||||
FROM sys_oa_task_item a
|
||||
WHERE a.task_id = sot.task_id
|
||||
AND a.completed_time IS NULL
|
||||
LIMIT 1
|
||||
)
|
||||
) AS temp_time,
|
||||
|
||||
sot.begin_time,
|
||||
sot.origin_finish_time,
|
||||
sot.postponements,
|
||||
sot.completed_time,
|
||||
sot.content,
|
||||
su1.nick_name AS createUserNickName,
|
||||
su2.nick_name AS workerNickName,
|
||||
|
||||
(
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
||||
) AS accessory,
|
||||
|
||||
sot.rank_number,
|
||||
sot.remark,
|
||||
sot.task_rank,
|
||||
@@ -61,18 +167,248 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
sot.own_rank,
|
||||
sop.project_name,
|
||||
sop.project_num,
|
||||
|
||||
soti.item_id,
|
||||
soti.content AS itemContent,
|
||||
soti.sign_time,
|
||||
soti.status AS itemStatus,
|
||||
soti.begin_time AS itemBeginTime,
|
||||
soti.completed_time AS itemCompletedTime,
|
||||
soti.end_time AS itemEndTime,
|
||||
soti.remark AS itemRemark,
|
||||
(
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
||||
) AS files,
|
||||
CASE
|
||||
WHEN sot.completed_time IS NULL
|
||||
THEN DATEDIFF(
|
||||
NOW(),
|
||||
COALESCE(
|
||||
sot.finish_time,
|
||||
(
|
||||
SELECT a.end_time
|
||||
FROM sys_oa_task_item a
|
||||
WHERE a.task_id = sot.task_id
|
||||
AND a.completed_time IS NULL
|
||||
LIMIT 1
|
||||
)
|
||||
)
|
||||
)
|
||||
ELSE 0
|
||||
END AS overDays
|
||||
|
||||
FROM sys_oa_task sot
|
||||
LEFT JOIN sys_user su1 ON su1.user_id = sot.create_user_id
|
||||
LEFT JOIN sys_user su2 ON su2.user_id = sot.worker_id
|
||||
LEFT JOIN sys_oa_project sop ON sop.project_id = sot.project_id
|
||||
|
||||
|
||||
LEFT JOIN sys_oa_task_item soti
|
||||
ON soti.task_id = sot.task_id
|
||||
|
||||
WHERE
|
||||
sot.task_id = #{taskId}
|
||||
AND sot.del_flag = '0'
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getMonthlyData"
|
||||
parameterType="java.lang.String"
|
||||
resultType="com.ruoyi.oa.domain.UserMonthlyData">
|
||||
|
||||
SELECT
|
||||
-- 员工昵称
|
||||
su.nick_name AS nickName,
|
||||
|
||||
-- 拼接多个项目名称
|
||||
GROUP_CONCAT(DISTINCT sop.project_name SEPARATOR ',') AS projectName,
|
||||
|
||||
-- 计算 totalTasks
|
||||
(
|
||||
-- 1) status=0 属于当月 => 加1
|
||||
SUM(
|
||||
CASE
|
||||
WHEN sot.status = 0
|
||||
AND DATE_FORMAT(sot.begin_time, '%Y-%m') = #{month}
|
||||
THEN 1
|
||||
ELSE 0
|
||||
END
|
||||
)
|
||||
+
|
||||
-- 2) status=1 => 统计符合当月的子记录数量
|
||||
COUNT(
|
||||
CASE
|
||||
WHEN sot.status = 1
|
||||
AND DATE_FORMAT(soti.begin_time, '%Y-%m') = #{month}
|
||||
THEN soti.item_id
|
||||
END
|
||||
)
|
||||
) AS totalTasks,
|
||||
|
||||
-- 计算 completedTasks
|
||||
(
|
||||
-- status=0 当月 completed_time非空 => +1
|
||||
SUM(
|
||||
CASE
|
||||
WHEN sot.status = 0
|
||||
AND DATE_FORMAT(sot.begin_time, '%Y-%m') = #{month}
|
||||
AND sot.completed_time IS NOT NULL
|
||||
THEN 1
|
||||
ELSE 0
|
||||
END
|
||||
)
|
||||
+
|
||||
-- status=1 => 统计子记录当月 且 sign_time非空
|
||||
COUNT(
|
||||
CASE
|
||||
WHEN sot.status = 1
|
||||
AND DATE_FORMAT(soti.begin_time, '%Y-%m') = #{month}
|
||||
AND soti.sign_time IS NOT NULL
|
||||
THEN soti.item_id
|
||||
END
|
||||
)
|
||||
) AS completedTasks,
|
||||
|
||||
-- 计算 delayedTimes
|
||||
(
|
||||
-- status=0 当月 => 累加 sot.postponements
|
||||
SUM(
|
||||
CASE
|
||||
WHEN sot.status = 0
|
||||
AND DATE_FORMAT(sot.begin_time, '%Y-%m') = #{month}
|
||||
THEN sot.postponements
|
||||
ELSE 0
|
||||
END
|
||||
)
|
||||
+
|
||||
-- status=1 当月(子记录) => 同样加上 sot.postponements
|
||||
SUM(
|
||||
CASE
|
||||
WHEN sot.status = 1
|
||||
AND DATE_FORMAT(soti.begin_time, '%Y-%m') = #{month}
|
||||
THEN sot.postponements
|
||||
ELSE 0
|
||||
END
|
||||
)
|
||||
) AS delayedTimes
|
||||
|
||||
FROM sys_oa_task sot
|
||||
LEFT JOIN sys_oa_task_item soti
|
||||
ON soti.task_id = sot.task_id
|
||||
LEFT JOIN sys_user su
|
||||
ON su.user_id = sot.worker_id
|
||||
LEFT JOIN sys_oa_project sop
|
||||
ON sop.project_id = sot.project_id
|
||||
|
||||
-- 只按用户分组 => 每个nickName合并为一行
|
||||
GROUP BY su.user_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryPageListDocument" resultType="com.ruoyi.oa.domain.vo.SysOaTaskVo">
|
||||
SELECT
|
||||
sot.task_id,
|
||||
sot.project_id,
|
||||
sot.create_user_id,
|
||||
sot.worker_id,
|
||||
sot.task_title,
|
||||
sot.task_type,
|
||||
sot.task_grade,
|
||||
sot.collaborator,
|
||||
COALESCE(sot.finish_time, soti.end_time) AS finish_time,
|
||||
COALESCE(sot.temp_time, soti.temp_time) AS temp_time,
|
||||
sot.begin_time,
|
||||
sot.origin_finish_time,
|
||||
sot.postponements,
|
||||
sot.completed_time,
|
||||
sot.content,
|
||||
(
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
||||
) AS accessory,
|
||||
|
||||
sot.rank_number,
|
||||
sot.remark,
|
||||
sot.task_rank,
|
||||
sot.state,
|
||||
sot.time_gap,
|
||||
sot.status,
|
||||
sot.create_by,
|
||||
sot.create_time,
|
||||
sot.update_by,
|
||||
sot.update_time,
|
||||
sot.del_flag,
|
||||
sot.own_rank,
|
||||
sop.project_name,
|
||||
soti.item_id,
|
||||
sop.project_num,
|
||||
su1.nick_name AS createUserNickName,
|
||||
su2.nick_name AS workerNickName,
|
||||
CASE
|
||||
WHEN sot.completed_time IS NULL
|
||||
THEN DATEDIFF(NOW(), sot.finish_time)
|
||||
THEN DATEDIFF(NOW(), COALESCE(sot.finish_time, soti.end_time))
|
||||
ELSE 0
|
||||
END AS overDays
|
||||
END AS overDays,
|
||||
(
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
||||
) AS files
|
||||
|
||||
FROM sys_oa_task_user sotu
|
||||
left join sys_oa_task sot on sot.task_id = sotu.task_id
|
||||
LEFT JOIN sys_user su1 ON su1.user_id = sot.create_user_id
|
||||
LEFT JOIN sys_user su2 ON su2.user_id = sot.worker_id
|
||||
LEFT JOIN sys_oa_project sop ON sop.project_id = sot.project_id
|
||||
|
||||
LEFT JOIN sys_oa_task_item soti
|
||||
ON soti.task_id = sot.task_id
|
||||
AND soti.completed_time IS NULL
|
||||
|
||||
${ew.getCustomSqlSegment}
|
||||
|
||||
|
||||
</select>
|
||||
<select id="listDocumentProject" resultType="com.ruoyi.oa.domain.vo.SysOaTaskVo">
|
||||
|
||||
SELECT
|
||||
sot.create_user_id,
|
||||
sot.worker_id,
|
||||
(
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
||||
) AS accessory,
|
||||
su1.nick_name AS createUserNickName,
|
||||
su2.nick_name AS workerNickName,
|
||||
(
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
||||
) AS files
|
||||
FROM sys_oa_task sot
|
||||
LEFT JOIN sys_user su1 ON su1.user_id = sot.create_user_id
|
||||
LEFT JOIN sys_user su2 ON su2.user_id = sot.worker_id
|
||||
LEFT JOIN sys_oa_project sop ON sop.project_id = sot.project_id
|
||||
${ew.getCustomSqlSegment}
|
||||
LEFT JOIN sys_oa_task_item soti ON soti.task_id = sot.task_id
|
||||
WHERE
|
||||
sot.project_id = #{projectId}
|
||||
AND sot.del_flag = '0'
|
||||
AND (
|
||||
IFNULL((
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, sot.accessory) > 0
|
||||
), '') != ''
|
||||
OR IFNULL((
|
||||
SELECT GROUP_CONCAT(sof.file_url SEPARATOR ',')
|
||||
FROM sys_oa_file sof
|
||||
WHERE FIND_IN_SET(sof.file_id, soti.files) > 0
|
||||
), '') != ''
|
||||
)
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.ruoyi.oa.mapper.SysOaTaskUserMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.SysOaTaskUser" id="SysOaTaskUserResult">
|
||||
<result property="taskUserId" column="task_user_id"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="itemId" column="item_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -28,4 +28,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectVoPageThreshold" resultType="com.ruoyi.oa.domain.vo.SysOaWarehouseVo">
|
||||
select id,
|
||||
inventory,
|
||||
model,
|
||||
unit,
|
||||
name,
|
||||
brand,
|
||||
specifications,
|
||||
remark,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
del_flag
|
||||
from sys_oa_warehouse
|
||||
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
<select id="selectListVoPage" resultType="com.ruoyi.oa.domain.vo.SysOaWarehouseVo">
|
||||
select
|
||||
sow.id,
|
||||
sow.inventory,
|
||||
sow.model,
|
||||
sow.unit,
|
||||
sow.name,
|
||||
sow.brand,
|
||||
sow.specifications,
|
||||
sow.remark,
|
||||
sow.create_time,
|
||||
sow.create_by,
|
||||
sow.update_time,
|
||||
sow.update_by,
|
||||
sow.del_flag,
|
||||
sow.price,
|
||||
sow.threshold,
|
||||
(
|
||||
select sum(sowt.task_inventory)
|
||||
from sys_oa_warehouse_task sowt
|
||||
left join sys_oa_warehouse_master sowm on sowm.master_id = sowt.master_id
|
||||
where sowt.warehouse_id = sow.id
|
||||
and sowm.type = 2
|
||||
and sowm.status = 0
|
||||
) as task_inventory
|
||||
from sys_oa_warehouse sow
|
||||
${ew.getCustomSqlSegment}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<result property="signUser" column="sign_user"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<result property="status" column="status"/>
|
||||
<collection property="warehouseList" ofType="com.ruoyi.oa.domain.vo.SysOaWarehouseDetailVo" javaType="list">
|
||||
<result property="signPrice" column="sign_price"/>
|
||||
<result property="id" column="outId"/>
|
||||
@@ -23,26 +24,46 @@
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="warehouseName" column="warehouseName"/>
|
||||
</collection>
|
||||
<collection property="warehouseTaskList" resultMap="SysOaWarehouseTaskResult" javaType="list"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.SysOaWarehouseTask" id="SysOaWarehouseTaskResult">
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="masterId" column="master_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="taskInventory" column="task_inventory"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="specifications" column="specifications"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<select id="selectVoPagePlus" resultMap="SysOaWarehouseMasterResult">
|
||||
select sowm.master_id,
|
||||
sowm.sign_time,
|
||||
sowm.sign_user,
|
||||
sowd.sign_price,
|
||||
sowm.master_num,
|
||||
sowm.type,
|
||||
sowd.amount,
|
||||
sow.name as warehouseName,
|
||||
sow.model,
|
||||
sowm.remark,
|
||||
sow.specifications,
|
||||
sop.project_id,
|
||||
sop.project_name,
|
||||
sowd.id as outId
|
||||
sowm.status,
|
||||
sowd.id as outId,
|
||||
task_id,
|
||||
sowt.name,
|
||||
COALESCE(sow.model,sowt.model) as model,
|
||||
task_inventory,
|
||||
COALESCE(sow.brand,sowt.brand) as brand,
|
||||
COALESCE(sow.specifications,sowt.specifications) as specifications
|
||||
from sys_oa_warehouse_master sowm
|
||||
left join sys_oa_warehouse_detail sowd on sowd.master_id = sowm.master_id and sowd.del_flag='0'
|
||||
left join sys_oa_warehouse sow on sow.id = sowd.warehouse_id
|
||||
left join sys_oa_warehouse_task sowt on sowm.master_id = sowt.master_id
|
||||
left join sys_oa_project sop on sowm.project_id = sop.project_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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.ruoyi.oa.mapper.SysOaWarehouseTaskMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.oa.domain.SysOaWarehouseTask" id="SysOaWarehouseTaskResult">
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="masterId" column="master_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="taskInventory" column="task_inventory"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="specifications" column="specifications"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="warehouseId" column="warehouse_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user