<?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.jeeplus.pubmodules.contract.mapper.ContractMapper">
	<update id="updateStatusById">
		UPDATE material_management_contract SET status = #{type}
		WHERE id = #{id}
	</update>
	<select id="findList"
            resultType="com.jeeplus.pubmodules.contract.service.dto.ContractInfoDto">
        SELECT
        	DISTINCT
			a.id,
			a.create_by,
			a.create_date,
			a.proc_ins_id,
			a.status,
			a.process_definition_id,
			a.usc_code,
			a.address,
			a.company_address,
			a.mobile,
			a.contract_name,
			a.signing_date,
			a.effective_date,
			a.end_time,
			a.name,
			a.contract_no
		FROM
			material_management_contract a
			${ew.customSqlSegment}
		ORDER BY a.update_date DESC
    </select>
</mapper>
