<?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.changhong.epc.form.mapper.tenant.bill.BillInfoMapper">
|
|
<resultMap id="billInfoMapperResultMap" type="com.changhong.epc.bean.parsing.BillInfo">
|
<result property="orderCode" column="order_code"/>
|
<result property="formId" column="form_id"/><!-- 表单Id -->
|
<result property="formDataId" column="form_data_id"/><!-- 表单数据Id -->
|
<result property="info" column="info"/><!-- 原始数据 -->
|
<result property="infoLast" column="info_last"/><!-- 转换后数据 -->
|
<result property="verify" column="verify"/><!-- 主数据是否缺失 2:不缺失 1:缺失 -->
|
<result property="msg" column="msg"/>
|
<result property="info" column="info"/>
|
<result property="infoLast" column="info_last"/>
|
</resultMap>
|
|
<select id="selectBillByOrderCode" resultType="java.lang.Integer">
|
select count(1) from epc_bill_info_{rule}
|
WHERE
|
order_code = #{orderCode}
|
</select>
|
|
<update id="updateBill" >
|
UPDATE epc_bill_info_{rule}
|
SET form_id = #{formId},
|
form_data_id = #{formDataId}
|
WHERE
|
order_code = #{orderCode}
|
</update>
|
|
|
<!-- <insert id="addBill" parameterType="com.changhong.epc.bean.parsing.BillInfo">
|
INSERT INTO
|
epc_bill_info_{rule}
|
(
|
data_start
|
,order_code
|
,info
|
,info_last
|
)
|
VALUES (
|
#{dataStart}
|
,#{orderCode}
|
,#{info}
|
,#{infoLast}
|
)
|
</insert> -->
|
|
<select id="queryBillInfoByForm" resultType="com.changhong.epc.bean.parsing.BillInfo">
|
SELECT
|
`info`,
|
`info_last` infoLast
|
FROM
|
`epc_bill_info_{rule}`
|
WHERE
|
`data_start` != 99
|
AND `order_code` = #{orgerCode}
|
AND `form_id` = #{formId}
|
AND `form_data_id` = #{dataRowNum}
|
</select>
|
|
<update id="updateJourney" >
|
|
UPDATE epc_bill_data_{rule}
|
SET j_id = #{reJid}
|
WHERE
|
order_code = #{orderCode}
|
and
|
j_id = #{jId}
|
|
</update>
|
</mapper>
|