| | |
| | | <?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.gkhy.exam.system.mapper.ContractReviewMapper"> |
| | | <update id="updateByUserid"> |
| | | update contract_review set status = 1 ,suggest=#{suggest} where id = #{id} and legal_person = #{legalPerson} |
| | | </update> |
| | | |
| | | <select id="selectReviewList" resultType="com.gkhy.exam.system.domain.ContractReview"> |
| | | SELECT |
| | |
| | | cr.`create_by`, |
| | | cr.`create_time`, |
| | | cr.`update_by`, |
| | | cr.`update_time` |
| | | cr.`update_time`, |
| | | cr.`file_name`, |
| | | cr.`file_path`, |
| | | cr.`status` |
| | | FROM |
| | | `contract_review` cr |
| | | LEFT JOIN sys_company sc ON cr.company_id = sc.id |
| | |
| | | <if test="companyId!=null"> |
| | | and cr.company_id =#{companyId} |
| | | </if> |
| | | <if test="status !=null"> |
| | | and cr.status = #{status} |
| | | </if> |
| | | <if test="type!=null"> |
| | | and cr.type = #{type} |
| | | </if> |
| | | ORDER BY |
| | | cr.create_time DESC |
| | | </select> |
| | | <select id="selectByContractId" resultType="java.lang.Integer"> |
| | | select count(*) from contract_review where contract_id =#{contractId} and type = 1 |
| | | </select> |
| | | <select id="selectByUserId" resultType="com.gkhy.exam.system.domain.vo.ContractReviewVo"> |
| | | SELECT |
| | | cr.`id`, |
| | | cr.`type`, |
| | | cl.`contract_name`, |
| | | cr.`file_name`, |
| | | cr.`file_path` |
| | | FROM |
| | | `contract_review` cr |
| | | LEFT JOIN contract_ledger cl ON cr.contract_id = cl.id |
| | | LEFT JOIN contract_review_mess crm ON cr.id = crm.review_id |
| | | WHERE |
| | | cr.`status` = 0 |
| | | AND cr.del_flag = 1 |
| | | AND ( |
| | | crm.review_user = #{userId} |
| | | AND crm.`status` = 0) |
| | | </select> |
| | | <select id="selectByUserIdMain" resultType="com.gkhy.exam.system.domain.vo.ContractReviewVo"> |
| | | SELECT |
| | | cr.`id`, |
| | | cr.`type`, |
| | | cl.`contract_name`, |
| | | cr.`file_name`, |
| | | cr.`file_path` |
| | | FROM |
| | | `contract_review` cr |
| | | LEFT JOIN contract_ledger cl ON cr.contract_id = cl.id |
| | | LEFT JOIN contract_review_mess crm ON cr.id = crm.review_id |
| | | WHERE |
| | | cr.`status` = 0 |
| | | AND cr.del_flag = 1 |
| | | and cr.legal_person = #{userId} |
| | | </select> |
| | | </mapper> |