|
@@ -1,5 +1,52 @@
|
|
|
<?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="org.jeecg.modules.kyTaskInfo.mapper.KyTaskInfoMapper">
|
|
|
+ <!--根据部门和实际完成时间 当年-->
|
|
|
+ <select id="getKyTaskNoByNameCurrYear" parameterType="String" resultType="String">
|
|
|
+ select taskno from ky_task_info
|
|
|
+ <where>
|
|
|
+ <if test="depName!=null and depName!=''">
|
|
|
+ and (zrbm=#{depName} or jycs=#{depName}) and (DATE(sjwcsj) BETWEEN CONCAT(YEAR(NOW()), '-01-01') AND NOW())
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <!--根据部门和实际完成时间 上一年-->
|
|
|
+ <select id="getKyTaskNoByNameLastYear" parameterType="String" resultType="String">
|
|
|
+ select taskno from ky_task_info
|
|
|
+ <where>
|
|
|
+ <if test="depName!=null and depName!=''">
|
|
|
+ and (zrbm=#{depName} or jycs=#{depName}) and (DATE(sjwcsj) BETWEEN CONCAT(YEAR(DATE_SUB(NOW(), INTERVAL 1 YEAR)), '-01-01') AND DATE_SUB(NOW(), INTERVAL 1 YEAR))
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <!--根据部门和实际完成时间 当月-->
|
|
|
+ <select id="getKyTaskNoByNameCurrMonth" parameterType="String" resultType="String">
|
|
|
+ select taskno from ky_task_info
|
|
|
+ <where>
|
|
|
+ <if test="depName!=null and depName!=''">
|
|
|
+ and (zrbm=#{depName} or jycs=#{depName}) and (DATE(sjwcsj) BETWEEN CONCAT(YEAR(NOW()), '-', Month(NOW()), '-01') AND NOW())
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <!--根据部门和实际完成时间 上个月-->
|
|
|
+ <select id="getKyTaskNoByNameLastMonth" parameterType="String" resultType="String">
|
|
|
+ select taskno from ky_task_info
|
|
|
+ <where>
|
|
|
+ <if test="depName!=null and depName!=''">
|
|
|
+ and (zrbm=#{depName} or jycs=#{depName}) and (DATE(sjwcsj) BETWEEN CONCAT(YEAR(NOW()), '-', Month(NOW())-1, '-01') AND DATE_SUB(NOW(), INTERVAL 1 MONTH))
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <!--根据部门和实际完成时间 去年同期月份-->
|
|
|
+ <select id="getKyTaskNoByNameTqMonth" parameterType="String" resultType="String">
|
|
|
+ select taskno from ky_task_info
|
|
|
+ <where>
|
|
|
+ <if test="depName!=null and depName!=''">
|
|
|
+ and (zrbm=#{depName} or jycs=#{depName}) and (DATE(sjwcsj) BETWEEN CONCAT(YEAR(NOW())-1, '-', Month(NOW()), '-01') AND DATE_SUB(NOW(), INTERVAL 1 YEAR))
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</mapper>
|