|
@@ -20,31 +20,56 @@
|
|
|
<result column="status" property="status"/>
|
|
|
<result column="type" property="type"/>
|
|
|
<result column="totalFee" property="totalFee"/>
|
|
|
+ <result column="proceOrderNo" property="proceOrderNo"/>
|
|
|
<result column="payStatus" property="payStatus"/>
|
|
|
+ <collection property="invoice" ofType="com.bosshand.virgo.api.workark.model.Invoice" resultMap="com.bosshand.virgo.api.workark.dao.InvoiceDao.result" columnPrefix="invoice_"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <sql id="query">
|
|
|
+ select a.*,
|
|
|
+ b.id as invoice_id,
|
|
|
+ b.invoiceModelId as invoice_invoiceModelId,
|
|
|
+ b.organizationId as invoice_organizationId,
|
|
|
+ b.userId as invoice_userId,
|
|
|
+ b.createTime as invoice_createTime,
|
|
|
+ b.updateTime as invoice_updateTime,
|
|
|
+ b.orderNo as invoice_orderNo,
|
|
|
+ b.type as invoice_type,
|
|
|
+ b.name as invoice_name,
|
|
|
+ b.taxpayerIdentificationNumber as invoice_taxpayerIdentificationNumber,
|
|
|
+ b.address as invoice_address,
|
|
|
+ b.phone as invoice_phone,
|
|
|
+ b.bankAccount as invoice_bankAccount,
|
|
|
+ b.bankAccountNumber as invoice_bankAccountNumber,
|
|
|
+ b.content as invoice_content,
|
|
|
+ b.amount as invoice_amount,
|
|
|
+ b.file as invoice_file,
|
|
|
+ b.state as invoice_state
|
|
|
+ from workark_proce a left join workark_invoice b on a.proceOrderNo = b.orderNo
|
|
|
+ </sql>
|
|
|
+
|
|
|
<select id="get" resultMap="result">
|
|
|
- select * from workark_proce where id = #{id}
|
|
|
+ <include refid="query" /> where a.id = #{id}
|
|
|
</select>
|
|
|
|
|
|
<select id="getParentId" resultMap="result">
|
|
|
- select * from workark_proce where parentId = #{parentId} order by sequence
|
|
|
+ <include refid="query" /> where a.parentId = #{parentId} order by a.sequence
|
|
|
</select>
|
|
|
|
|
|
<select id="getList" resultMap="result">
|
|
|
- select * from workark_proce where orderId = #{orderId} order by sequence
|
|
|
+ <include refid="query" /> where a.orderId = #{orderId} order by a.sequence
|
|
|
</select>
|
|
|
|
|
|
<select id="getRoot" resultMap="result">
|
|
|
- select * from workark_proce where parentId = -1 and orderId = #{orderId} order by sequence
|
|
|
+ <include refid="query" /> where a.parentId = -1 and a.orderId = #{orderId} order by a.sequence
|
|
|
</select>
|
|
|
|
|
|
- <insert id="save" parameterType="com.bosshand.virgo.api.workark.model.ProceModel" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ <insert id="save" parameterType="com.bosshand.virgo.api.workark.model.Proce" useGeneratedKeys="true" keyProperty="id">
|
|
|
INSERT into workark_proce(name, parentId, orderId, productId, productLevelId, sequence, attachment, attachmentNumber, attachmentContent, roleId, remark, type, totalFee)
|
|
|
values(#{name}, #{parentId}, #{orderId}, #{productId}, #{productLevelId}, #{sequence}, #{attachment}, #{attachmentNumber}, #{attachmentContent}, #{roleId}, #{remark}, #{type}, #{totalFee})
|
|
|
</insert>
|
|
|
|
|
|
- <update id="update" parameterType="com.bosshand.virgo.api.workark.model.ProceModel">
|
|
|
+ <update id="update" parameterType="com.bosshand.virgo.api.workark.model.Proce">
|
|
|
UPDATE workark_proce
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
<if test="name!=null">name=#{name},</if>
|
|
@@ -64,15 +89,15 @@
|
|
|
WHERE id=#{id}
|
|
|
</update>
|
|
|
|
|
|
- <update id="updateStatus" parameterType="com.bosshand.virgo.api.workark.model.ProceModel">
|
|
|
+ <update id="updateStatus" parameterType="com.bosshand.virgo.api.workark.model.Proce">
|
|
|
UPDATE workark_proce set status = #{status} WHERE id in
|
|
|
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|
|
|
- <update id="updatePayStatus" parameterType="com.bosshand.virgo.api.workark.model.ProceModel">
|
|
|
- UPDATE workark_proce set payStatus = #{payStatus} WHERE id = #{id}
|
|
|
+ <update id="updatePayStatus" parameterType="com.bosshand.virgo.api.workark.model.Proce">
|
|
|
+ UPDATE workark_proce set proceOrderNo = #{proceOrderNo}, payStatus = #{payStatus} WHERE id = #{id}
|
|
|
</update>
|
|
|
|
|
|
<delete id="delete">
|