You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
4.1 KiB
99 lines
4.1 KiB
<?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.zilber.boot.intelligencesite.mapper.IProductionPlanMapper">
|
|
|
|
<resultMap id="IProductionPlanResult" type="com.zilber.boot.intelligencesite.entity.IProductionPlan">
|
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
|
<result property="planName" column="plan_name" jdbcType="VARCHAR"/>
|
|
<result property="projectStage" column="project_stage" jdbcType="VARCHAR"/>
|
|
<result property="description" column="description" jdbcType="VARCHAR"/>
|
|
<result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
|
|
<result property="endTime" column="end_time" jdbcType="TIMESTAMP"/>
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
<result property="creator" column="creator" jdbcType="VARCHAR"/>
|
|
<result property="duration" column="duration" jdbcType="INTEGER"/>
|
|
<result property="keystageTime" column="keystage_time" jdbcType="TIMESTAMP"/>
|
|
<result property="principal" column="principal" jdbcType="VARCHAR"/>
|
|
<result property="parentId" column="parent_id" jdbcType="INTEGER"/>
|
|
<result property="accumulativeProgress" column="accumulative_progress" jdbcType="INTEGER"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectIProductionPlanVo">
|
|
select
|
|
id, plan_name, project_stage, description, start_time, end_time, create_time, creator, duration,
|
|
keystage_time, principal,parent_id from i_production_plan
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="queryList" parameterType="com.zilber.boot.intelligencesite.entity.IProductionPlan" resultMap="IProductionPlanResult">
|
|
<include refid="selectIProductionPlanVo"/>
|
|
<where>
|
|
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
|
|
<if test="projectStage != null and projectStage != ''"> and project_stage like concat('%', #{projectStage}, '%')</if>
|
|
<if test="description != null and description != ''"> and description like concat('%', #{description}, '%')</if>
|
|
<if test="startTime != null"> and start_time=#{startTime}</if>
|
|
<if test="endTime != null"> and end_time=#{endTime}</if>
|
|
<if test="createTime != null"> and create_time=#{createTime}</if>
|
|
<if test="creator != null and creator != ''"> and creator=#{creator}</if>
|
|
<if test="duration != null"> and duration like concat('%', #{duration}, '%')</if>
|
|
<if test="keystageTime != null"> and keystage_time =#{keystageTime}</if>
|
|
<if test="principal != null and principal != ''"> and principal like concat('%', #{principal}, '%')</if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
<select id="querywarn" resultMap="IProductionPlanResult">
|
|
SELECT
|
|
ipn.id,
|
|
ipn.plan_name,
|
|
ipn.project_stage,
|
|
ipn.description,
|
|
ipn.start_time,
|
|
ipn.end_time,
|
|
ipn.create_time,
|
|
ipn.creator,
|
|
ipn.duration,
|
|
ipn.keystage_time,
|
|
ipn.principal,
|
|
ipn.parent_id,
|
|
ip.day_progress,
|
|
ip.accumulative_progress
|
|
FROM
|
|
i_production_plan ipn left join i_progress ip on ipn.id=ip.plan_id
|
|
</select>
|
|
<select id="queryTotal" resultType="integer">
|
|
select sum(duration) from i_production_plan where parent_id=0
|
|
</select>
|
|
<select id="queryGl" resultType="integer">
|
|
select count(*) from i_production_plan where principal is not null
|
|
</select>
|
|
<select id="bigscreenProgress" resultMap="IProductionPlanResult">
|
|
SELECT
|
|
ipn.id,
|
|
ipn.plan_name,
|
|
ipn.project_stage,
|
|
ipn.description,
|
|
ipn.start_time,
|
|
ipn.end_time,
|
|
ipn.create_time,
|
|
ipn.creator,
|
|
ipn.duration,
|
|
ipn.keystage_time,
|
|
ipn.principal,
|
|
ipn.parent_id,
|
|
ip.accumulative_progress
|
|
FROM
|
|
i_production_plan ipn left join i_progress ip on ipn.id=ip.plan_id where ipn.parent_id =0
|
|
</select>
|
|
<select id="statistics" resultMap="IProductionPlanResult">
|
|
select * from i_production_plan where parent_id =0
|
|
</select>
|
|
<select id="statisticsByDateAndName" resultType="com.zilber.boot.intelligencesite.entity.IProductionPlan">
|
|
select * from i_production_plan where parent_id =0 and DATE_FORMAT(create_time, '%Y-%m-%d')=#{date} and id=#{id}
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
|