|
|
@@ -191,6 +191,49 @@ public interface YpInDetlYfMapper {
|
|
|
"</script>")
|
|
|
List<YpEffDateVo> selectYpInDetlYfEffDate(@Param("groupNo") String groupNo, @Param("chargeCode") String chargeCode, @Param("effMonth") Integer effMonth);
|
|
|
|
|
|
+ /**
|
|
|
+ * 药库药品效期查询
|
|
|
+ * @param groupNo
|
|
|
+ * @param chargeCode
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Select("<script>" +
|
|
|
+ "SELECT\n" +
|
|
|
+ " a.in_date,\n" +
|
|
|
+ " a.charge_code,\n" +
|
|
|
+ " a.serial,\n" +
|
|
|
+ " a.in_seri,\n" +
|
|
|
+ " a.current_stock,\n" +
|
|
|
+ " a.manu_code,\n" +
|
|
|
+ " a.in_docu_no,\n" +
|
|
|
+ " a.eff_date,\n" +
|
|
|
+ " a.license_no,\n" +
|
|
|
+ " a.eff_del_flag,\n" +
|
|
|
+ " b.name,\n" +
|
|
|
+ " specification = b.specification,\n" +
|
|
|
+ " manufactory_name = c.name,\n" +
|
|
|
+ " xq=datediff(month,getdate(),a.eff_date),\n" +
|
|
|
+ " b.py_code,\n" +
|
|
|
+ " b.d_code\n" +
|
|
|
+ "FROM yp_in_detl a,yp_zd_dict b\n" +
|
|
|
+ " left join yp_zd_manufactory c on b.manu_code=c.code,\n" +
|
|
|
+ " (select charge_code,stock_amount=sum(stock_amount) from yp_base where group_no = #{groupNo} group by charge_code) d\n" +
|
|
|
+ " where a.charge_code=b.code and\n" +
|
|
|
+ " a.serial=b.serial and\n" +
|
|
|
+ " datediff(month,getdate(),a.eff_date)<![CDATA[<=]]>#{effMonth} and\n" +
|
|
|
+ " a.group_no = #{groupNo} and\n" +
|
|
|
+ "<when test='chargeCode != null and chargeCode != \"\"'>" +
|
|
|
+ " a.charge_code = #{chargeCode} and" +
|
|
|
+ "</when>" +
|
|
|
+ " a.charge_code = d.charge_code and\n" +
|
|
|
+ " a.current_stock <![CDATA[>]]> 0 and\n" +
|
|
|
+ " isnull(a.eff_del_flag,'0')='0' and\n" +
|
|
|
+ " isnull(b.visible_flag,'0')<![CDATA[<>]]>'1' and\n" +
|
|
|
+ " isnull(b.del_flag,'0')<![CDATA[<>]]>'1'\n" +
|
|
|
+ " order by xq,a.charge_code" +
|
|
|
+ "</script>")
|
|
|
+ List<YpEffDateVo> selectYpInDetlYkEffDate(@Param("groupNo") String groupNo, @Param("chargeCode") String chargeCode, @Param("effMonth") Integer effMonth);
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 更新有效期显示状态
|