|
@@ -7,7 +7,7 @@
|
|
|
<select id="RecipeRegisterList" parameterType="pd" resultType="pd">
|
|
|
select id, orderId, saleOrderNumber, genericName, productName, specification, quantity, manufacturer, mdmCode,
|
|
|
posMemberName, posMemberPhone, prescriptionType, orderTime, prescriptionNumber, hospital, department,
|
|
|
- doctor, patientName, patientPhone, storeName, registrar, completionTime, deliveryMethod, paymentCode,
|
|
|
+ doctor, patientName, patientPhone, storeName, registrar, completionTime,lastUpdated, deliveryMethod, paymentCode,
|
|
|
paymentMethod, status ,create_time as createTime from s_dtp_cfdj_prescription
|
|
|
<where>
|
|
|
<if test="id != null">AND id = #{id}</if>
|
|
@@ -74,6 +74,7 @@
|
|
|
<if test="paymentCode != null and paymentCode!=''">paymentCode,</if>
|
|
|
<if test="paymentMethod != null and paymentMethod!=''">paymentMethod,</if>
|
|
|
<if test="status != null and status!=''">status},</if>
|
|
|
+ <if test="lastUpdated != null and lastUpdated!=''">lastUpdated,</if>
|
|
|
<if test="createTime != null and createTime!=''">create_time,</if>
|
|
|
</trim>
|
|
|
<trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
|
|
@@ -102,6 +103,7 @@
|
|
|
<if test="paymentCode != null and paymentCode!=''">#{paymentCode},</if>
|
|
|
<if test="paymentMethod != null and paymentMethod!=''">#{paymentMethod},</if>
|
|
|
<if test="status != null and status!=''">#{status},</if>
|
|
|
+ <if test="lastUpdated != null and lastUpdated!=''">#{lastUpdated},</if>
|
|
|
<if test="createTime != null and createTime!=''">#{createTime},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
@@ -142,6 +144,7 @@
|
|
|
<if test="paymentCode != null and paymentCode!=''">paymentCode=#{paymentCode},</if>
|
|
|
<if test="paymentMethod != null and paymentMethod!=''">paymentMethod=#{paymentMethod},</if>
|
|
|
<if test="status != null and status!=''">status=#{status},</if>
|
|
|
+ <if test="lastUpdated != null and lastUpdated!=''">lastUpdated=#{lastUpdated},</if>
|
|
|
<if test="createTime != null and createTime!=''">create_time=#{createTime},</if>
|
|
|
</trim>
|
|
|
where id=#{id}
|
|
@@ -152,7 +155,7 @@
|
|
|
<select id="selectOne" parameterType="pd" resultType="pd">
|
|
|
select id, orderId, saleOrderNumber, genericName, productName, specification, quantity, manufacturer, mdmCode,
|
|
|
posMemberName, posMemberPhone, prescriptionType, orderTime, prescriptionNumber, hospital, department,
|
|
|
- doctor, patientName, patientPhone, storeName, registrar, completionTime, deliveryMethod, paymentCode,
|
|
|
+ doctor, patientName, patientPhone, storeName, registrar, completionTime, lastUpdated,deliveryMethod, paymentCode,
|
|
|
paymentMethod, status ,create_time as createTime from s_dtp_cfdj_prescription where id=#{id}
|
|
|
</select>
|
|
|
|
|
@@ -282,17 +285,15 @@
|
|
|
|
|
|
|
|
|
<update id="softDeleteColdOrder" parameterType="pd">
|
|
|
- <if test="ids != null and ids.size() > 0">
|
|
|
update s_dtp_llps_distribution_order
|
|
|
set del_flag = 1
|
|
|
- where id in
|
|
|
- <foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
+ where where
|
|
|
+ <if test="ids != null and ids!=''">
|
|
|
+ id in(${ids})
|
|
|
+ </if>
|
|
|
</update>
|
|
|
<!--配送单据打印模块-->
|
|
|
- <select id="listPrint" resultType="pd">
|
|
|
+ <select id="listPrintEntity" parameterType="pd" resultType="com.bzd.common.core.domain.entity.DtpDeliveryPrint">
|
|
|
select id,
|
|
|
businessId,
|
|
|
orderId,
|
|
@@ -303,16 +304,53 @@
|
|
|
printRequestTime,
|
|
|
createdBy,
|
|
|
orderData,
|
|
|
+ del_flag as delFlag,
|
|
|
gmtCreate,
|
|
|
updateBy updatedTime,
|
|
|
create_time as createTime
|
|
|
from s_dtp_llps_distribution_print
|
|
|
<where>
|
|
|
- <if test="id != null">and id = #{id}</if>
|
|
|
- <if test="businessId != null">and businessId = #{businessId}</if>
|
|
|
- <if test="orderId != null">and orderId = #{orderId}</if>
|
|
|
- <if test="storeId != null">and storeId = #{storeId}</if>
|
|
|
- <if test="status != null">and status = #{status}</if>
|
|
|
+ <if test="id != null and id != ''">and id = #{id}</if>
|
|
|
+ <if test="businessId != null and businessId != ''">and businessId = #{businessId}</if>
|
|
|
+ <if test="orderId != null and orderId != ''">and orderId = #{orderId}</if>
|
|
|
+ <if test="storeId != null and storeId != ''">and storeId = #{storeId}</if>
|
|
|
+ <if test="status != null and status != ''">and status = #{status}</if>
|
|
|
+ <if test="deliverer != null and deliverer != ''">and deliverer = #{deliverer}</if>
|
|
|
+ <if test="deliveryTimeStart != null and deliveryTimeStart!='' and deliveryTimeEnd != null and deliveryTimeEnd!=''">
|
|
|
+ and deliveryTime between #{deliveryTimeStart} and #{deliveryTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="printRequestTimeStart != null and printRequestTimeStart!='' and printRequestTimeEnd != null and printRequestTimeEnd!=''">
|
|
|
+ and printRequestTime between #{printRequestTimeStart} and #{printRequestTimeEnd}
|
|
|
+ </if>
|
|
|
+ <if test="createdBy != null and createdBy != ''">and createdBy = #{createdBy}</if>
|
|
|
+ <if test="createBy != null and createBy != ''">and createBy = #{createBy}</if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">and updateBy = #{updateBy}</if>
|
|
|
+ and del_flag = '0'
|
|
|
+ </where>
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+ <select id="listPrintPd" parameterType="pd" resultType="pd">
|
|
|
+ select id,
|
|
|
+ businessId,
|
|
|
+ orderId,
|
|
|
+ storeId,
|
|
|
+ status,
|
|
|
+ deliverer,
|
|
|
+ deliveryTime,
|
|
|
+ printRequestTime,
|
|
|
+ createdBy,
|
|
|
+ orderData,
|
|
|
+ del_flag as delFlag,
|
|
|
+ gmtCreate,
|
|
|
+ updateBy updatedTime,
|
|
|
+ create_time as createTime
|
|
|
+ from s_dtp_llps_distribution_print
|
|
|
+ <where>
|
|
|
+ <if test="id != null and id != ''">and id = #{id}</if>
|
|
|
+ <if test="businessId != null and businessId != ''">and businessId = #{businessId}</if>
|
|
|
+ <if test="orderId != null and orderId != ''">and orderId = #{orderId}</if>
|
|
|
+ <if test="storeId != null and storeId != ''">and storeId = #{storeId}</if>
|
|
|
+ <if test="status != null and status != ''">and status = #{status}</if>
|
|
|
<if test="deliverer != null and deliverer != ''">and deliverer = #{deliverer}</if>
|
|
|
<if test="deliveryTimeStart != null and deliveryTimeStart!='' and deliveryTimeEnd != null and deliveryTimeEnd!=''">
|
|
|
and deliveryTime between #{deliveryTimeStart} and #{deliveryTimeEnd}
|
|
@@ -327,27 +365,26 @@
|
|
|
</where>
|
|
|
order by create_time desc
|
|
|
</select>
|
|
|
-
|
|
|
|
|
|
<insert id="savePrint" parameterType="pd">
|
|
|
insert into s_dtp_llps_distribution_print
|
|
|
<trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
|
|
|
<if test="createdBy != null and createdBy != ''">createdBy,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
- <if test="businessId != null">businessId,</if>
|
|
|
- <if test="deliveryTime != null">deliveryTime,</if>
|
|
|
- <if test="printRequestTime != null">printRequestTime,</if>
|
|
|
+ <if test="createTime != null and createTime != ''">create_time,</if>
|
|
|
+ <if test="businessId != null and businessId != ''">businessId,</if>
|
|
|
+ <if test="deliveryTime != null and deliveryTime != ''">deliveryTime,</if>
|
|
|
+ <if test="printRequestTime != null and printRequestTime != ''">printRequestTime,</if>
|
|
|
<if test="deliverer != null and deliverer != ''">deliverer,</if>
|
|
|
<if test="createBy != null and createBy != ''">createBy,</if>
|
|
|
- <if test="extend != null">extend,</if>
|
|
|
- <if test="gmtCreate != null">gmtCreate,</if>
|
|
|
- <if test="gmtUpdate != null">gmtUpdate,</if>
|
|
|
- <if test="orderId != null">orderId,</if>
|
|
|
- <if test="orderData != null">orderData,</if>
|
|
|
- <if test="status != null">status,</if>
|
|
|
- <if test="storeId != null">storeId,</if>
|
|
|
+ <if test="extend != null and extend != ''">extend,</if>
|
|
|
+ <if test="gmtCreate != null and gmtCreate != ''">gmtCreate,</if>
|
|
|
+ <if test="gmtUpdate != null and gmtUpdate != ''">gmtUpdate,</if>
|
|
|
+ <if test="orderId != null and orderId != ''">orderId,</if>
|
|
|
+ <if test="orderData != null and orderData != ''">orderData,</if>
|
|
|
+ <if test="status != null and status != ''">status,</if>
|
|
|
+ <if test="storeId != null and storeId != ''">storeId,</if>
|
|
|
<if test="updateBy != null and updateBy != ''">updateBy,</if>
|
|
|
- <if test="version != null">version,</if>
|
|
|
+ <if test="version != null and version != ''">version,</if>
|
|
|
</trim>
|
|
|
<trim prefix="VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
|
|
|
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
|
|
@@ -373,35 +410,33 @@
|
|
|
update s_dtp_llps_distribution_print
|
|
|
<set>
|
|
|
<if test="createdBy != null and createdBy != ''">createdBy = #{createdBy},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="businessId != null">businessId = #{businessId},</if>
|
|
|
- <if test="deliveryTime != null">deliveryTime = #{deliveryTime},</if>
|
|
|
- <if test="printRequestTime != null">printRequestTime = #{printRequestTime},</if>
|
|
|
+ <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
|
|
|
+ <if test="businessId != null and businessId != ''">businessId = #{businessId},</if>
|
|
|
+ <if test="deliveryTime != null and deliveryTime != ''">deliveryTime = #{deliveryTime},</if>
|
|
|
+ <if test="printRequestTime != null and printRequestTime != ''">printRequestTime = #{printRequestTime},</if>
|
|
|
<if test="deliverer != null and deliverer != ''">deliverer = #{deliverer},</if>
|
|
|
<if test="createBy != null and createBy != ''">createBy = #{createBy},</if>
|
|
|
- <if test="extend != null">extend = #{extend},</if>
|
|
|
- <if test="gmtCreate != null">gmtCreate = #{gmtCreate},</if>
|
|
|
- <if test="gmtUpdate != null">gmtUpdate = #{gmtUpdate},</if>
|
|
|
- <if test="orderId != null">orderId = #{orderId},</if>
|
|
|
- <if test="orderData != null">orderData = #{orderData},</if>
|
|
|
- <if test="status != null">status = #{status},</if>
|
|
|
- <if test="storeId != null">storeId = #{storeId},</if>
|
|
|
+ <if test="extend != null and extend != ''">extend = #{extend},</if>
|
|
|
+ <if test="gmtCreate != null and gmtCreate != ''">gmtCreate = #{gmtCreate},</if>
|
|
|
+ <if test="gmtUpdate != null and gmtUpdate != ''">gmtUpdate = #{gmtUpdate},</if>
|
|
|
+ <if test="orderId != null and orderId != ''">orderId = #{orderId},</if>
|
|
|
+ <if test="orderData != null and orderData != ''">orderData = #{orderData},</if>
|
|
|
+ <if test="status != null and status != ''">status = #{status},</if>
|
|
|
+ <if test="storeId != null and storeId != ''">storeId = #{storeId},</if>
|
|
|
<if test="updateBy != null and updateBy != ''">updateBy = #{updateBy},</if>
|
|
|
- <if test="version != null">version = #{version},</if>
|
|
|
+ <if test="version != null and version != ''">version = #{version},</if>
|
|
|
</set>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
<!--配送单据打印模块 软删除-->
|
|
|
<update id="DelPrint" parameterType="pd">
|
|
|
- <if test="ids != null and ids.size() > 0">
|
|
|
update s_dtp_llps_distribution_print
|
|
|
set del_flag = 1
|
|
|
- where id in
|
|
|
- <foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
+ where
|
|
|
+ <if test="ids != null and ids!=''">
|
|
|
+ id in(${ids})
|
|
|
+ </if>
|
|
|
</update>
|
|
|
|
|
|
</mapper>
|