YpInvinfoDao.java 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. package thyyxxk.webserver.dao.his.medicine;
  2. import org.apache.ibatis.annotations.Delete;
  3. import org.apache.ibatis.annotations.Insert;
  4. import org.apache.ibatis.annotations.Param;
  5. import org.apache.ibatis.annotations.Select;
  6. import org.apache.ibatis.annotations.Update;
  7. import thyyxxk.webserver.entity.medicine.YpCodgUpload;
  8. import thyyxxk.webserver.entity.medicine.YpInvinfoModify;
  9. import java.util.List;
  10. public interface YpInvinfoDao {
  11. @Delete("<script> " +
  12. " delete from yp_invinfo_modify where fixmedins_bchno in " +
  13. " <foreach collection='list' item='item' open='(' separator=',' close=')'> " +
  14. " #{item.fixmedinsBchno} " +
  15. " </foreach> " +
  16. " </script>")
  17. void deleteYpInvinfoBatchByIds(List<YpInvinfoModify> list);
  18. @Delete("<script> " +
  19. " delete from yp_invinfo_modify where fixmedins_bchno in " +
  20. " <foreach collection='list' item='item' open='(' separator=',' close=')'> " +
  21. " #{item.fixmedinsBchno} " +
  22. " </foreach> " +
  23. " </script>")
  24. int deleteYpInvinfoBatchByCodes(List<YpCodgUpload> list);
  25. @Update("<script> " +
  26. " update yp_invinfo_modify set upload_flag = '-2' where fixmedins_bchno in " +
  27. " <foreach collection='list' item='item' open='(' separator=',' close=')'> " +
  28. " #{item.fixmedinsBchno} " +
  29. " </foreach> " +
  30. " </script>")
  31. int updateYpInvinfoBatchByCode(List<YpCodgUpload> list);
  32. @Insert("<script> " +
  33. " insert into yp_invinfo_modify (med_list_codg, inv_chg_type, fixmedins_hilist_id, fixmedins_hilist_name, fixmedins_bchno, pric, cnt, rx_flag, inv_chg_time, inv_chg_opter_name, memo, trdn_flag, charge_code, charge_name, serial, upload_flag, msg_err, docu_no, seri, group_no, group_no_out, manu_no, producing_date, eff_date, create_time, inv_chg_type_name, type) values " +
  34. " <foreach collection='list' item='item' separator=','> " +
  35. " (#{item.medListCodg},#{item.invChgType},#{item.fixmedinsHilistId},#{item.fixmedinsHilistName},#{item.fixmedinsBchno},#{item.pric},#{item.cnt},#{item.rxFlag},#{item.invChgTime},#{item.invChgOpterName},#{item.memo},#{item.trdnFlag},#{item.chargeCode},#{item.chargeName},#{item.serial},#{item.uploadFlag},#{item.msgErr},#{item.docuNo},#{item.seri},#{item.groupNo},#{item.groupNoOut},#{item.manuNo},#{item.producingDate},#{item.effDate},#{item.createTime},#{item.invChgTypeName},#{item.type}) " +
  36. " </foreach> " +
  37. "</script>")
  38. int saveYpInvinfoBatch(List<YpInvinfoModify> list);
  39. @Select("<script> " +
  40. " select mo.* from yp_invinfo_modify as mo " +
  41. " where mo.group_no = #{dto.groupNo} " +
  42. " <if test=\"dto.startTime != null and dto.startTime != ''\"> " +
  43. " and mo.inv_chg_time &gt;= #{dto.startTime} " +
  44. " </if> " +
  45. " <if test=\"dto.endTime != null and dto.endTime != ''\"> " +
  46. " and mo.inv_chg_time &lt;= #{dto.endTime} " +
  47. " </if> " +
  48. " <if test=\"dto.docuNo != null and dto.docuNo != ''\"> " +
  49. " and mo.docu_no = #{dto.docuNo} " +
  50. " </if> " +
  51. " <if test=\"dto.chargeCode != null and dto.chargeCode != ''\"> " +
  52. " and mo.charge_code = #{dto.chargeCode} " +
  53. " </if> " +
  54. " <if test=\"dto.uploadFlag != null and dto.uploadFlag != ''\"> " +
  55. " and mo.upload_flag = #{dto.uploadFlag} " +
  56. " </if> " +
  57. " <if test=\"dto.invChgType != null and dto.invChgType != ''\"> " +
  58. " and mo.inv_chg_type = #{dto.invChgType} " +
  59. " </if> " +
  60. " order by mo.docu_no, mo.seri " +
  61. "</script>")
  62. List<YpInvinfoModify> selectYpInvinfoResult(@Param("dto") YpCodgUpload dto);
  63. }