临时菜小票打印

This commit is contained in:
谭凯凯 2024-11-26 14:45:02 +08:00 committed by Tankaikai
parent 94285f68d0
commit 04dc7091e2
3 changed files with 7 additions and 2 deletions

View File

@ -51,5 +51,5 @@ public class TbOrderDetail implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Integer isMember; private Integer isMember;
private Integer isTemporary;
} }

View File

@ -134,6 +134,10 @@ public abstract class PrinterHandler {
if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) { if (ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs) && ObjectUtil.isNotEmpty(tbProductSkuWithBLOBs.getSpecSnap())) {
remark = tbProductSkuWithBLOBs.getSpecSnap(); remark = tbProductSkuWithBLOBs.getSpecSnap();
} }
Integer isTemporary = ObjectUtil.defaultIfNull(it.getIsTemporary(), 0);
if(isTemporary == 1) {
it.setProductName("【临时菜】"+it.getProductName());
}
OrderDetailPO.Detail detail = new OrderDetailPO.Detail(it.getProductName(), it.getNum().toString(), NumberUtil.mul(it.getNum(),it.getPrice()).toPlainString(), remark); OrderDetailPO.Detail detail = new OrderDetailPO.Detail(it.getProductName(), it.getNum().toString(), NumberUtil.mul(it.getNum(),it.getPrice()).toPlainString(), remark);
detailList.add(detail); detailList.add(detail);

View File

@ -18,10 +18,11 @@
<result column="price" jdbcType="DECIMAL" property="price"/> <result column="price" jdbcType="DECIMAL" property="price"/>
<result column="price_amount" jdbcType="DECIMAL" property="priceAmount"/> <result column="price_amount" jdbcType="DECIMAL" property="priceAmount"/>
<result column="pack_amount" jdbcType="DECIMAL" property="packAmount"/> <result column="pack_amount" jdbcType="DECIMAL" property="packAmount"/>
<result column="is_temporary" jdbcType="INTEGER" property="isTemporary"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, order_id, shop_id, product_id, product_sku_id, num, product_name, product_sku_name, id, order_id, shop_id, product_id, product_sku_id, num, product_name, product_sku_name,
product_img, create_time, update_time, price, price_amount,status,pack_amount,return_num product_img, create_time, update_time, price, price_amount,status,pack_amount,return_num,is_temporary
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select