From ff19b041742602a588fe023dcf296024e0912a1a Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期一, 12 一月 2026 15:48:34 +0800
Subject: [PATCH] 修改发票新增
---
service/src/main/resources/mapper/cwgl/InvoiceBillDetailMapper.xml | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/service/src/main/resources/mapper/cwgl/InvoiceBillDetailMapper.xml b/service/src/main/resources/mapper/cwgl/InvoiceBillDetailMapper.xml
index 4c6d7e9..f9973e4 100644
--- a/service/src/main/resources/mapper/cwgl/InvoiceBillDetailMapper.xml
+++ b/service/src/main/resources/mapper/cwgl/InvoiceBillDetailMapper.xml
@@ -8,6 +8,7 @@
<result property="id" column="id" />
<result property="invoiceManageId" column="invoice_manage_id" />
<result property="goodsName" column="goods_name" />
+ <result property="goodsCode" column="goods_code" />
<result property="price" column="price" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
@@ -16,7 +17,7 @@
</resultMap>
<sql id="selectInvoiceBillDetailVo">
- select thisTab.id, thisTab.invoice_manage_id, thisTab.goods_name, thisTab.price, thisTab.status, thisTab.create_time, thisTab.update_time, thisTab.with_tax_flag from invoice_bill_detail AS thisTab
+ select thisTab.id, thisTab.invoice_manage_id, thisTab.goods_name,thisTab.goods_code, thisTab.price, thisTab.status, thisTab.create_time, thisTab.update_time, thisTab.with_tax_flag from invoice_bill_detail AS thisTab
</sql>
<sql id="selectInvoiceBillDetailVoCount">
select count(0) from invoice_bill_detail as thisTab
@@ -25,6 +26,7 @@
<sql id="whereCondition">
<if test="invoiceManageId != null "> and thisTab.invoice_manage_id = #{invoiceManageId}</if>
<if test="goodsName != null and goodsName != ''"> and thisTab.goods_name like concat('%', #{goodsName}, '%')</if>
+ <if test="goodsCode != null and goodsCode != ''"> and thisTab.goods_name = #{goods_code}</if>
<if test="price != null "> and thisTab.price = #{price}</if>
<if test="status != null "> and thisTab.status = #{status}</if>
<if test="withTaxFlag != null "> and thisTab.with_tax_flag = #{withTaxFlag}</if>
@@ -57,6 +59,7 @@
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="invoiceManageId != null">invoice_manage_id,</if>
<if test="goodsName != null">goods_name,</if>
+ <if test="goodsCode != null">goods_code,</if>
<if test="price != null">price,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
@@ -66,6 +69,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="invoiceManageId != null">#{invoiceManageId},</if>
<if test="goodsName != null">#{goodsName},</if>
+ <if test="goodsCode != null">#{goodsCode},</if>
<if test="price != null">#{price},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
@@ -77,11 +81,11 @@
<insert id="insertInvoiceBillDetailBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
insert into invoice_bill_detail
<trim prefix="(" suffix=") values" suffixOverrides=",">
- invoice_manage_id,goods_name,price,status,create_time,update_time,with_tax_flag,
+ invoice_manage_id,goods_name,goods_code,price,status,create_time,update_time,with_tax_flag,
</trim>
<foreach item="item" index="index" collection="list" separator=",">
<trim prefix="(" suffix=") " suffixOverrides=",">
- #{item.invoiceManageId},#{item.goodsName},#{item.price},#{item.status},#{item.createTime},#{item.updateTime},#{item.withTaxFlag},
+ #{item.invoiceManageId},#{item.goodsName},#{item.goodsCode},#{item.price},#{item.status},#{item.createTime},#{item.updateTime},#{item.withTaxFlag},
</trim>
</foreach>
</insert>
@@ -92,6 +96,7 @@
<trim prefix="SET" suffixOverrides=",">
<if test="invoiceManageId != null">invoice_manage_id = #{invoiceManageId},</if>
<if test="goodsName != null">goods_name = #{goodsName},</if>
+ <if test="goodsCode != null">goods_name = #{goodsCode},</if>
<if test="price != null">price = #{price},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@@ -107,6 +112,7 @@
<trim prefix="SET" suffixOverrides=",">
<if test="item.invoiceManageId != null">invoice_manage_id = #{item.invoiceManageId},</if>
<if test="item.goodsName != null">goods_name = #{item.goodsName},</if>
+ <if test="item.goodsCode != null">goods_code = #{item.goodsCode},</if>
<if test="item.price != null">price = #{item.price},</if>
<if test="item.status != null">status = #{item.status},</if>
<if test="item.createTime != null">create_time = #{item.createTime},</if>
--
Gitblit v1.8.0