|
|
@@ -0,0 +1,136 @@
|
|
|
+<?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.jyxt.thridparty.dao.mysql.ReagentDao">
|
|
|
+
|
|
|
+ <insert id="insertBatch" parameterType="java.util.List">
|
|
|
+ INSERT IGNORE INTO t_sjhccrklsysb (
|
|
|
+ id_, s_id, create_time_, update_time_, product_code, product_name,
|
|
|
+ process_quantity, process_time, transaction_type, batch_number,
|
|
|
+ expiration_date, status
|
|
|
+ ) VALUES
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
+ (
|
|
|
+ #{item.id}, #{item.sid}, #{item.createTime}, NOW(), #{item.productCode}, #{item.productName},
|
|
|
+ #{item.processQuantity}, #{item.processTime}, #{item.transactionType}, #{item.batchNumber},
|
|
|
+ #{item.expirationDate}, 0
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="selectFilteredData" resultType="com.jyxt.thridparty.entity.ReagentConsumableData">
|
|
|
+ SELECT
|
|
|
+ t1.s_id as id,
|
|
|
+ t2.tenant_id_ as tenantId,
|
|
|
+ t2.ip_ as ip,
|
|
|
+ t2.create_by_ as createBy,
|
|
|
+ t2.create_time_ as createTime,
|
|
|
+ t2.update_by_ as updateBy,
|
|
|
+ t2.update_time_ as updateTime,
|
|
|
+ t2.shi_fou_guo_shen_ as shiFouGuoShen,
|
|
|
+ t2.di_dian_ as diDian,
|
|
|
+ t2.bian_zhi_ren_ as bianZhiRen,
|
|
|
+ t2.bian_zhi_bu_men_ as bianZhiBuMen,
|
|
|
+ t2.bian_zhi_shi_jian as bianZhiShiJian,
|
|
|
+ t2.kuai_zhao_ as kuaiZhao,
|
|
|
+ t2.ming_cheng_ as mingCheng,
|
|
|
+ t2.pi_ci_hao_ as piCiHao,
|
|
|
+ t2.bao_zhuang_gui_ge as baoZhuangGuiGe,
|
|
|
+ t2.zui_xiao_gui_ge_ as zuiXiaoGuiGe,
|
|
|
+ t2.dan_wei_ as danWei,
|
|
|
+ t2.chang_jia_ as changJia,
|
|
|
+ t2.you_xiao_qi_ as youXiaoQi,
|
|
|
+ t2.cun_chu_tiao_jian as cunChuTiaoJian,
|
|
|
+ t2.bei_zhu_ as beiZhu,
|
|
|
+ t2.lei_bie_ as leiBie,
|
|
|
+ t2.kai_ping_xiao_qi_ as kaiPingXiaoQi,
|
|
|
+ t2.dan_jia_ as danJia,
|
|
|
+ t2.bian_ma_ as bianMa,
|
|
|
+ t2.chan_pin_pi_hao_ as chanPinPiHao,
|
|
|
+ t2.fu_jian_ as fuJian,
|
|
|
+ t2.gong_ying_shang_ as gongYingShang,
|
|
|
+ t2.fen_lei_ as fenLei,
|
|
|
+ t2.zhu_ce_zheng_hao_ as zhuCeZhengHao,
|
|
|
+ t2.yi_qi_she_bei_ as yiQiSheBei,
|
|
|
+ t2.she_bei_ming_chen as sheBeiMingChen,
|
|
|
+ t2.she_bei_bian_hao_ as sheBeiBianHao,
|
|
|
+ t2.huo_hao_ as huoHao,
|
|
|
+ t2.cun_fang_wei_zhi_ as cunFangWeiZhi,
|
|
|
+ t2.zui_di_yu_cun_ as zuiDiYuCun,
|
|
|
+ t2.ku_cun_liang_ as kuCunLiang,
|
|
|
+ t1.batch_number as piHao,
|
|
|
+ t2.zhu_ce_zheng_you_ as zhuCeZhengYou,
|
|
|
+ t1.process_quantity as shuLiang,
|
|
|
+ t1.expiration_date as youXiaoQiZhi,
|
|
|
+ t1.process_time as daoHuoRiQi,
|
|
|
+ t1.status as zhuangTai,
|
|
|
+ t1.transaction_type as transactionType
|
|
|
+ FROM t_sjhccrklsysb t1
|
|
|
+ INNER JOIN t_sjhcjcsjpz t2 ON t1.product_code = t2.bian_ma_
|
|
|
+ WHERE t1.status = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertInboundBatch" parameterType="java.util.List">
|
|
|
+ INSERT IGNORE INTO t_sjhcrkls (
|
|
|
+ id_, tenant_id_, ip_, create_by_, create_time_, update_by_, update_time_,
|
|
|
+ shi_fou_guo_shen_, di_dian_, bian_zhi_ren_, bian_zhi_bu_men_, bian_zhi_shi_jian,
|
|
|
+ kuai_zhao_, ming_cheng_, pi_ci_hao_, bao_zhuang_gui_ge, zui_xiao_gui_ge_,
|
|
|
+ dan_wei_, chang_jia_, you_xiao_qi_, cun_chu_tiao_jian, bei_zhu_, lei_bie_,
|
|
|
+ kai_ping_xiao_qi_, dan_jia_, bian_ma_, chan_pin_pi_hao_, fu_jian_,
|
|
|
+ gong_ying_shang_, fen_lei_, zhu_ce_zheng_hao_, yi_qi_she_bei_, she_bei_ming_chen,
|
|
|
+ she_bei_bian_hao_, huo_hao_, cun_fang_wei_zhi_, zui_di_yu_cun_, ku_cun_liang_,
|
|
|
+ pi_hao_, zhu_ce_zheng_you_, shu_liang_, you_xiao_qi_zhi_, dao_huo_ri_qi_, zhuang_tai_
|
|
|
+ ) VALUES
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
+ (
|
|
|
+ #{item.id}, #{item.tenantId}, #{item.ip}, #{item.createBy}, #{item.createTime},
|
|
|
+ #{item.updateBy}, #{item.updateTime}, #{item.shiFouGuoShen}, #{item.diDian},
|
|
|
+ #{item.bianZhiRen}, #{item.bianZhiBuMen}, #{item.bianZhiShiJian}, #{item.kuaiZhao},
|
|
|
+ #{item.mingCheng}, #{item.piCiHao}, #{item.baoZhuangGuiGe}, #{item.zuiXiaoGuiGe},
|
|
|
+ #{item.danWei}, #{item.changJia}, #{item.youXiaoQi}, #{item.cunChuTiaoJian},
|
|
|
+ #{item.beiZhu}, #{item.leiBie}, #{item.kaiPingXiaoQi}, #{item.danJia},
|
|
|
+ #{item.bianMa}, #{item.chanPinPiHao}, #{item.fuJian}, #{item.gongYingShang},
|
|
|
+ #{item.fenLei}, #{item.zhuCeZhengHao}, #{item.yiQiSheBei}, #{item.sheBeiMingChen},
|
|
|
+ #{item.sheBeiBianHao}, #{item.huoHao}, #{item.cunFangWeiZhi}, #{item.zuiDiYuCun},
|
|
|
+ #{item.kuCunLiang}, #{item.piHao}, #{item.zhuCeZhengYou}, #{item.shuLiang},
|
|
|
+ #{item.youXiaoQiZhi}, #{item.daoHuoRiQi}, #{item.zhuangTai}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertOutboundBatch" parameterType="java.util.List">
|
|
|
+ INSERT IGNORE INTO t_sjhccklsb (
|
|
|
+ id_, tenant_id_, ip_, create_by_, create_time_, update_by_, update_time_,
|
|
|
+ shi_fou_guo_shen_, di_dian_, bian_zhi_ren_, bian_zhi_bu_men_, bian_zhi_shi_jian,
|
|
|
+ kuai_zhao_, ming_cheng_, pi_ci_hao_, bao_zhuang_gui_ge, zui_xiao_gui_ge_,
|
|
|
+ dan_wei_, chang_jia_, you_xiao_qi_, cun_chu_tiao_jian, bei_zhu_, lei_bie_,
|
|
|
+ kai_ping_xiao_qi_, dan_jia_, bian_ma_, chan_pin_pi_hao_, fu_jian_,
|
|
|
+ gong_ying_shang_, fen_lei_, zhu_ce_zheng_hao_, yi_qi_she_bei_, she_bei_ming_chen,
|
|
|
+ she_bei_bian_hao_, huo_hao_, cun_fang_wei_zhi_, zui_di_yu_cun_, ku_cun_liang_,
|
|
|
+ pi_hao_, zhu_ce_zheng_you_, shu_liang_, you_xiao_qi_zhi_, dao_huo_ri_qi_, zhuang_tai_
|
|
|
+ ) VALUES
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
+ (
|
|
|
+ #{item.id}, #{item.tenantId}, #{item.ip}, #{item.createBy}, #{item.createTime},
|
|
|
+ #{item.updateBy}, #{item.updateTime}, #{item.shiFouGuoShen}, #{item.diDian},
|
|
|
+ #{item.bianZhiRen}, #{item.bianZhiBuMen}, #{item.bianZhiShiJian}, #{item.kuaiZhao},
|
|
|
+ #{item.mingCheng}, #{item.piCiHao}, #{item.baoZhuangGuiGe}, #{item.zuiXiaoGuiGe},
|
|
|
+ #{item.danWei}, #{item.changJia}, #{item.youXiaoQi}, #{item.cunChuTiaoJian},
|
|
|
+ #{item.beiZhu}, #{item.leiBie}, #{item.kaiPingXiaoQi}, #{item.danJia},
|
|
|
+ #{item.bianMa}, #{item.chanPinPiHao}, #{item.fuJian}, #{item.gongYingShang},
|
|
|
+ #{item.fenLei}, #{item.zhuCeZhengHao}, #{item.yiQiSheBei}, #{item.sheBeiMingChen},
|
|
|
+ #{item.sheBeiBianHao}, #{item.huoHao}, #{item.cunFangWeiZhi}, #{item.zuiDiYuCun},
|
|
|
+ #{item.kuCunLiang}, #{item.piHao}, #{item.zhuCeZhengYou}, #{item.shuLiang},
|
|
|
+ #{item.youXiaoQiZhi}, #{item.daoHuoRiQi}, #{item.zhuangTai}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateStatusBySids" parameterType="java.util.List">
|
|
|
+ UPDATE t_sjhccrklsysb SET status = 1 WHERE s_id IN
|
|
|
+ <foreach collection="list" item="sid" open="(" separator="," close=")">
|
|
|
+ #{sid}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|