| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="gdSupplyDemandAuditAttachmentVOResultMap" type="org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditAttachmentVO" extends="gdSupplyDemandAuditAttachmentResultMap"> |
| | | <result column="file_url" property="fileUrl"/> |
| | | <result column="file_size" property="fileSize"/> |
| | | <result column="file_original_name" property="fileOriginalName"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectGdSupplyDemandAuditAttachmentPage" resultMap="gdSupplyDemandAuditAttachmentResultMap"> |
| | | |
| | | <select id="selectGdSupplyDemandAuditAttachmentPage" resultMap="gdSupplyDemandAuditAttachmentVOResultMap"> |
| | | select * from ja_gd_supply_demand_audit_attachment where is_deleted = 0 |
| | | </select> |
| | | |
| | | <insert id="insertSupplyDemandAuditAttachments"> |
| | | insert into ja_gd_supply_demand_audit_attachment ( |
| | | demand_id, |
| | | attach_id, |
| | | area_code, |
| | | create_user, |
| | | create_dept |
| | | ) values |
| | | <foreach collection="attachments" item="item" separator=","> |
| | | ( |
| | | #{item.demandId}, |
| | | #{item.attachId}, |
| | | #{item.areaCode}, |
| | | #{item.createUser}, |
| | | #{item.createDept} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <select id="selectSupplyDemandAuditAttachmentList" resultMap="gdSupplyDemandAuditAttachmentVOResultMap"> |
| | | select |
| | | audit_attachment.*, |
| | | attach.link as file_url, |
| | | round(attach.attach_size / 1024 / 1024, 2) as file_size, |
| | | attach.original_name as file_original_name |
| | | from ja_gd_supply_demand_audit_attachment audit_attachment |
| | | left join blade_attach attach on attach.id::VARCHAR = audit_attachment.attach_id::VARCHAR and attach.is_deleted = 0 |
| | | <where> |
| | | audit_attachment.is_deleted = 0 |
| | | <if test="demandId != null"> |
| | | AND audit_attachment.demand_id = #{demandId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="exportGdSupplyDemandAuditAttachment" resultType="org.sxkj.gd.orderdata.excel.GdSupplyDemandAuditAttachmentExcel"> |
| | | SELECT * FROM ja_gd_supply_demand_audit_attachment ${ew.customSqlSegment} |