12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?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.zhgd.scs.mapper.WorkInspectionApplicationMapper">
- <resultMap id="BaseResultMap" type="com.zhgd.scs.domain.WorkInspectionApplication">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="project" column="project" jdbcType="VARCHAR"/>
- <result property="contractNo" column="contract_no" jdbcType="VARCHAR"/>
- <result property="contractor" column="contractor" jdbcType="VARCHAR"/>
- <result property="sketchNo" column="sketch_no" jdbcType="VARCHAR"/>
- <result property="serialNo" column="serial_no" jdbcType="VARCHAR"/>
- <result property="designation" column="designation" jdbcType="VARCHAR"/>
- <result property="clerks" column="clerks" jdbcType="VARCHAR"/>
- <result property="approverId" column="approver_id" jdbcType="BIGINT"/>
- <result property="approver" column="approver" jdbcType="VARCHAR"/>
- <result property="location" column="location" jdbcType="VARCHAR"/>
- <result property="description" column="description" jdbcType="VARCHAR"/>
- <result property="proposed" column="proposed" jdbcType="VARCHAR"/>
- <result property="workIsFound" column="work_is_found" jdbcType="INTEGER"/>
- <result property="isPermission" column="is_permission" jdbcType="INTEGER"/>
- <result property="reasons" column="reasons" jdbcType="VARCHAR"/>
- <result property="state" column="state" jdbcType="INTEGER"/>
- </resultMap>
- <select id="unResolvedpage" resultType="com.zhgd.scs.domain.WorkInspectionApplication">
- SELECT a.*
- FROM work_inspection_application a
- <if test="type == 5">
- LEFT JOIN work_inspection_application_user_ref u on u.user_id = #{inspectorId}
- </if>
- <if test="type == 6">
- LEFT JOIN work_inspection_application_user_ref u on u.user_id = #{approverId}
- </if>
- Where a.project_id = #{projectId}
- <if test="type == 5">
- and a.inspector_id is null
- </if>
- <if test="type == 6">
- and a.approver_id is null
- </if>
- <if test="startDate!=null and endDate!=null and startDate != '' and endDate != ''">
- AND a.applicant_date BETWEEN #{startDate} AND #{endDate}
- </if>
- <if test="readId!=null">
- AND a.id < #{readId}
- </if>
- GROUP BY a.id
- order by a.id desc
- </select>
- <select id="getMyWoklistPage" resultType="com.zhgd.scs.domain.WorkInspectionApplication">
- SELECT a.*
- FROM work_inspection_application a
- LEFT JOIN work_inspection_application_user_ref u on u.user_id = #{userId}
- Where a.project_id = #{projectId}
- <if test="isOver!=null">
- and a.is_over=#{isOver}
- </if>
- <if test="startDate!=null and endDate!=null and startDate != '' and endDate != ''">
- AND a.applicant_date BETWEEN #{startDate} AND #{endDate}
- </if>
- <if test="readId!=null">
- AND a.id < #{readId}
- </if>
- GROUP BY a.id
- order by a.id desc
- </select>
- </mapper>
|