You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
183 lines
12 KiB
XML
183 lines
12 KiB
XML
<?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.glxp.udidl.admin.dao.udplat.UdplatGoodsMapper">
|
|
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udplat.UdplatGoods">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="uuid" jdbcType="VARCHAR" property="uuid" />
|
|
<result column="deliveryGoodsId" jdbcType="VARCHAR" property="deliveryGoodsId" />
|
|
<result column="projectGoodsCode" jdbcType="VARCHAR" property="projectGoodsCode" />
|
|
<result column="deliveryGoodsCode" jdbcType="VARCHAR" property="deliveryGoodsCode" />
|
|
<result column="manufactureId" jdbcType="BIGINT" property="manufactureId" />
|
|
<result column="manufactureName" jdbcType="VARCHAR" property="manufactureName" />
|
|
<result column="distributorId" jdbcType="BIGINT" property="distributorId" />
|
|
<result column="distributorName" jdbcType="VARCHAR" property="distributorName" />
|
|
<result column="productName" jdbcType="VARCHAR" property="productName" />
|
|
<result column="compId" jdbcType="BIGINT" property="compId" />
|
|
<result column="model" jdbcType="VARCHAR" property="model" />
|
|
<result column="spec" jdbcType="VARCHAR" property="spec" />
|
|
<result column="prodMaterial" jdbcType="VARCHAR" property="prodMaterial" />
|
|
<result column="packMaterial" jdbcType="VARCHAR" property="packMaterial" />
|
|
<result column="regNum" jdbcType="VARCHAR" property="regNum" />
|
|
<result column="regName" jdbcType="VARCHAR" property="regName" />
|
|
<result column="regValidTo" jdbcType="VARCHAR" property="regValidTo" />
|
|
<result column="unionProjectId" jdbcType="BIGINT" property="unionProjectId" />
|
|
<result column="unionProjectName" jdbcType="VARCHAR" property="unionProjectName" />
|
|
<result column="salePrice" jdbcType="DECIMAL" property="salePrice" />
|
|
<result column="priceUnitText" jdbcType="VARCHAR" property="priceUnitText" />
|
|
<result column="topSalePrice" jdbcType="DECIMAL" property="topSalePrice" />
|
|
<result column="settlePayPrice" jdbcType="DECIMAL" property="settlePayPrice" />
|
|
<result column="goodsSource" jdbcType="INTEGER" property="goodsSource" />
|
|
<result column="stockStatus" jdbcType="INTEGER" property="stockStatus" />
|
|
<result column="changedContent" jdbcType="VARCHAR" property="changedContent" />
|
|
<result column="changedTime" jdbcType="TIMESTAMP" property="changedTime" />
|
|
<result column="proxyName" jdbcType="VARCHAR" property="proxyName" />
|
|
<result column="onlineStatus" jdbcType="INTEGER" property="onlineStatus" />
|
|
<result column="medicalCode" jdbcType="VARCHAR" property="medicalCode" />
|
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
|
</resultMap>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from udplat_goods
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatGoods">
|
|
insert into udplat_goods ( uuid, deliveryGoodsId,
|
|
projectGoodsCode, deliveryGoodsCode, manufactureId,
|
|
manufactureName, distributorId, distributorName,
|
|
productName, compId, model,
|
|
spec, prodMaterial, packMaterial,
|
|
regNum, regName, regValidTo,
|
|
unionProjectId, unionProjectName, salePrice,
|
|
priceUnitText, topSalePrice, settlePayPrice,
|
|
goodsSource, stockStatus, changedContent,
|
|
changedTime, proxyName, onlineStatus,
|
|
medicalCode, createTime
|
|
)
|
|
values (#{uuid,jdbcType=VARCHAR}, #{deliveryGoodsId,jdbcType=VARCHAR},
|
|
#{projectGoodsCode,jdbcType=VARCHAR}, #{deliveryGoodsCode,jdbcType=VARCHAR}, #{manufactureId,jdbcType=BIGINT},
|
|
#{manufactureName,jdbcType=VARCHAR}, #{distributorId,jdbcType=BIGINT}, #{distributorName,jdbcType=VARCHAR},
|
|
#{productName,jdbcType=VARCHAR}, #{compId,jdbcType=BIGINT}, #{model,jdbcType=VARCHAR},
|
|
#{spec,jdbcType=VARCHAR}, #{prodMaterial,jdbcType=VARCHAR}, #{packMaterial,jdbcType=VARCHAR},
|
|
#{regNum,jdbcType=VARCHAR}, #{regName,jdbcType=VARCHAR}, #{regValidTo,jdbcType=VARCHAR},
|
|
#{unionProjectId,jdbcType=BIGINT}, #{unionProjectName,jdbcType=VARCHAR}, #{salePrice,jdbcType=DECIMAL},
|
|
#{priceUnitText,jdbcType=VARCHAR}, #{topSalePrice,jdbcType=DECIMAL}, #{settlePayPrice,jdbcType=DECIMAL},
|
|
#{goodsSource,jdbcType=INTEGER}, #{stockStatus,jdbcType=VARCHAR}, #{changedContent,jdbcType=VARCHAR},
|
|
#{changedTime,jdbcType=TIMESTAMP}, #{proxyName,jdbcType=VARCHAR}, #{onlineStatus,jdbcType=INTEGER},
|
|
#{medicalCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
|
|
)
|
|
</insert>
|
|
<update id="update" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatGoods">
|
|
update udplat_goods
|
|
set
|
|
deliveryGoodsId = #{deliveryGoodsId,jdbcType=VARCHAR},
|
|
projectGoodsCode = #{projectGoodsCode,jdbcType=VARCHAR},
|
|
deliveryGoodsCode = #{deliveryGoodsCode,jdbcType=VARCHAR},
|
|
manufactureId = #{manufactureId,jdbcType=BIGINT},
|
|
manufactureName = #{manufactureName,jdbcType=VARCHAR},
|
|
distributorId = #{distributorId,jdbcType=BIGINT},
|
|
distributorName = #{distributorName,jdbcType=VARCHAR},
|
|
productName = #{productName,jdbcType=VARCHAR},
|
|
compId = #{compId,jdbcType=BIGINT},
|
|
model = #{model,jdbcType=VARCHAR},
|
|
spec = #{spec,jdbcType=VARCHAR},
|
|
prodMaterial = #{prodMaterial,jdbcType=VARCHAR},
|
|
packMaterial = #{packMaterial,jdbcType=VARCHAR},
|
|
regNum = #{regNum,jdbcType=VARCHAR},
|
|
regName = #{regName,jdbcType=VARCHAR},
|
|
regValidTo = #{regValidTo,jdbcType=VARCHAR},
|
|
unionProjectId = #{unionProjectId,jdbcType=BIGINT},
|
|
unionProjectName = #{unionProjectName,jdbcType=VARCHAR},
|
|
salePrice = #{salePrice,jdbcType=DECIMAL},
|
|
priceUnitText = #{priceUnitText,jdbcType=VARCHAR},
|
|
topSalePrice = #{topSalePrice,jdbcType=DECIMAL},
|
|
settlePayPrice = #{settlePayPrice,jdbcType=DECIMAL},
|
|
goodsSource = #{goodsSource,jdbcType=INTEGER},
|
|
stockStatus = #{stockStatus,jdbcType=VARCHAR},
|
|
changedContent = #{changedContent,jdbcType=VARCHAR},
|
|
changedTime = #{changedTime,jdbcType=TIMESTAMP},
|
|
proxyName = #{proxyName,jdbcType=VARCHAR},
|
|
onlineStatus = #{onlineStatus,jdbcType=INTEGER},
|
|
medicalCode = #{medicalCode,jdbcType=VARCHAR},
|
|
updateTime = #{updateTime,jdbcType=TIMESTAMP}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<select id="selectByGoodsId" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select id, uuid, deliveryGoodsId, projectGoodsCode, deliveryGoodsCode, manufactureId,
|
|
manufactureName, distributorId, distributorName, productName, compId, model, spec,
|
|
prodMaterial, packMaterial, regNum, regName, regValidTo, unionProjectId, unionProjectName,
|
|
salePrice, priceUnitText, topSalePrice, settlePayPrice, goodsSource, stockStatus,
|
|
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
|
|
from udplat_goods
|
|
where deliveryGoodsId = #{deliveryGoodsId}
|
|
</select>
|
|
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
select * from udplat_goods where id=#{id}
|
|
</select>
|
|
<select id="selectByProjectGoodsCode" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select id, uuid, deliveryGoodsId, projectGoodsCode, deliveryGoodsCode, manufactureId,
|
|
manufactureName, distributorId, distributorName, productName, compId, model, spec,
|
|
prodMaterial, packMaterial, regNum, regName, regValidTo, unionProjectId, unionProjectName,
|
|
salePrice, priceUnitText, topSalePrice, settlePayPrice, goodsSource, stockStatus,
|
|
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
|
|
from udplat_goods
|
|
where projectGoodsCode = #{projectGoodsCode}
|
|
</select>
|
|
<select id="selectAll" resultMap="BaseResultMap">
|
|
select id, uuid, deliveryGoodsId, projectGoodsCode, deliveryGoodsCode, manufactureId,
|
|
manufactureName, distributorId, distributorName, productName, compId, model, spec,
|
|
prodMaterial, packMaterial, regNum, regName, regValidTo, unionProjectId, unionProjectName,
|
|
salePrice, priceUnitText, topSalePrice, settlePayPrice, goodsSource, stockStatus,
|
|
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
|
|
from udplat_goods
|
|
</select>
|
|
<select id="list" resultMap="BaseResultMap" parameterType="com.glxp.udidl.admin.dto.udplat.UdplatGoodsParam">
|
|
select id, uuid, deliveryGoodsId, projectGoodsCode, deliveryGoodsCode, manufactureId,
|
|
manufactureName, distributorId, distributorName, productName, compId,model,spec,
|
|
prodMaterial, packMaterial, regNum, regName, regValidTo, unionProjectId, unionProjectName,
|
|
salePrice, priceUnitText, topSalePrice, settlePayPrice, goodsSource, stockStatus,
|
|
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
|
|
from udplat_goods
|
|
<where>
|
|
<if test="manufactureName != null and manufactureName !='' ">
|
|
and manufactureName like concat('%',#{manufactureName},'%')
|
|
</if>
|
|
<if test="distributorName != null and distributorName !='' ">
|
|
and distributorName like concat('%',#{distributorName},'%')
|
|
</if>
|
|
|
|
<if test="regNum != null and regNum !='' ">
|
|
and regNum like concat('%',#{regNum},'%')
|
|
</if>
|
|
<if test="model != null and model !='' ">
|
|
and model like concat('%',#{model},'%')
|
|
</if>
|
|
<if test="spec != null and spec !='' ">
|
|
and spec like concat('%',#{spec},'%')
|
|
</if>
|
|
<if test="name != '' and name != null">
|
|
and productName like concat('%',#{name},'%')
|
|
</if>
|
|
|
|
<if test="startDate != '' and startDate != null">
|
|
and updateTime >= #{startDate}
|
|
</if>
|
|
<if test="endDate != '' and endDate != null">
|
|
and updateTime <= #{endDate}
|
|
</if>
|
|
</where>
|
|
/* order by if(ISNULL(updateTime),createTime,updateTime) DESC*/
|
|
</select>
|
|
<select id="getProducts" parameterType="com.glxp.udidl.admin.dto.udplat.ProductParam"
|
|
resultType="com.glxp.udidl.admin.dto.udplat.ProductListModel">
|
|
select deliveryGoodsId as code,productName as name,priceUnitText as measname,model,spec,regNum as registerNo,
|
|
manufactureId,manufactureName as manufactory from udplat_goods
|
|
<where>
|
|
<if test="code != null and code != ''">
|
|
and deliveryGoodsId=#{code}
|
|
</if>
|
|
<if test="name != null and name != '' ">
|
|
and productName like concat('%',#{name},'%')
|
|
</if>
|
|
</where>
|
|
</select>
|
|
</mapper> |