|
@@ -16,15 +16,15 @@ import java.util.List;
|
|
|
public interface YpBaseYfMapper {
|
|
|
/**
|
|
|
* 减虚拟库存
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@Update("update yp_base_yf set stock_amount_virtual =stock_amount_virtual - #{amountVirtual,jdbcType=DECIMAL} where charge_code =#{chargeCode,jdbcType=CHAR} and serial =#{serial,jdbcType=CHAR} and group_no =#{groupNo,jdbcType=CHAR} ")
|
|
|
int updateStockAmountVirtual(@Param("chargeCode") String chargeCode, @Param("serial") String serial, @Param("groupNo") String groupNo, @Param("amountVirtual") BigDecimal amountVirtual);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 增加虚拟库存
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@Update("update yp_base_yf set stock_amount_virtual =stock_amount_virtual + #{amountVirtual,jdbcType=DECIMAL} where charge_code =#{chargeCode,jdbcType=CHAR} and serial =#{serial,jdbcType=CHAR} and group_no =#{groupNo,jdbcType=CHAR} ")
|
|
@@ -32,6 +32,7 @@ public interface YpBaseYfMapper {
|
|
|
|
|
|
/**
|
|
|
* 平虚库存
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@Update("update yp_base_yf set stock_amount_virtual =stock_amount where charge_code =#{chargeCode,jdbcType=CHAR} and serial =#{serial,jdbcType=CHAR} and group_no =#{groupNo,jdbcType=CHAR} ")
|
|
@@ -39,16 +40,20 @@ public interface YpBaseYfMapper {
|
|
|
|
|
|
/**
|
|
|
* 更新药房库存信息
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@Update({"<script>",
|
|
|
"update yp_base_yf ",
|
|
|
"<trim prefix='set' prefixOverrides=',' suffix=' where charge_code = #{chargeCode} and serial=#{serial} and group_no=#{groupNo} ' >",
|
|
|
"<when test='groupNo!=null'>",
|
|
|
- "group_no =#{groupNo,jdbcType=VARCHAR}",
|
|
|
+ ",group_no =#{groupNo,jdbcType=VARCHAR}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='location!=null'>",
|
|
|
+ ",location =#{location,jdbcType=VARCHAR}",
|
|
|
"</when>",
|
|
|
"<when test='maxStockAmount!=null'>",
|
|
|
- "max_stock_amount =#{maxStockAmount,jdbcType=FLOAT}",
|
|
|
+ ",max_stock_amount =#{maxStockAmount,jdbcType=FLOAT}",
|
|
|
"</when>",
|
|
|
"<when test='miniStockAmount!=null'>",
|
|
|
",mini_stock_amount =#{miniStockAmount,jdbcType=FLOAT}",
|
|
@@ -80,6 +85,7 @@ public interface YpBaseYfMapper {
|
|
|
|
|
|
/**
|
|
|
* 查询药房库存信息
|
|
|
+ *
|
|
|
* @param chargeCode
|
|
|
* @param serial
|
|
|
* @param groupNo
|
|
@@ -87,25 +93,27 @@ public interface YpBaseYfMapper {
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
"select charge_code,serial,stock_amount,stock_value,group_no,location,visible_flag_mz,visible_flag_zy," +
|
|
|
- " visible_flag_stop,stock_amount_virtual,stock_amount_virtual2,open_virtual2 " +
|
|
|
- "from yp_base_yf WITH(NOLOCK) where charge_code=#{chargeCode} and serial=#{serial} and group_no=#{groupNo} ",
|
|
|
+ " visible_flag_stop,stock_amount_virtual,stock_amount_virtual2,open_virtual2 " +
|
|
|
+ "from yp_base_yf WITH(NOLOCK) where charge_code=#{chargeCode} and serial=#{serial} and group_no=#{groupNo} ",
|
|
|
"<when test='visibleFlagMz!=null'>",
|
|
|
" and visible_flag_mz =#{visibleFlagMz}",
|
|
|
"</when>",
|
|
|
"</script>"})
|
|
|
- YpBaseYf selectYpBaseYf(@Param("chargeCode") String chargeCode, @Param("serial") String serial,@Param("groupNo") String groupNo,@Param("visibleFlagMz") String visibleFlagMz);
|
|
|
+ YpBaseYf selectYpBaseYf(@Param("chargeCode") String chargeCode, @Param("serial") String serial, @Param("groupNo") String groupNo, @Param("visibleFlagMz") String visibleFlagMz);
|
|
|
|
|
|
/**
|
|
|
* 查询药品药房最大拆零比例
|
|
|
+ *
|
|
|
* @param chargeCode
|
|
|
* @param groupNo
|
|
|
* @return
|
|
|
*/
|
|
|
@Select("select split_percent = isnull(max(split_percent),0) from yp_base_yf WITH(NOLOCK) where group_no = #{groupNo} and charge_code =#{chargeCode} group by charge_code,group_no")
|
|
|
- Double selectSplitPercent(@Param("chargeCode") String chargeCode,@Param("groupNo") String groupNo);
|
|
|
+ Double selectSplitPercent(@Param("chargeCode") String chargeCode, @Param("groupNo") String groupNo);
|
|
|
|
|
|
/**
|
|
|
* 新药品入库
|
|
|
+ *
|
|
|
* @param ypBaseYf
|
|
|
* @return
|
|
|
*/
|
|
@@ -114,7 +122,8 @@ public interface YpBaseYfMapper {
|
|
|
int insertYpBaseYf(YpBaseYf ypBaseYf);
|
|
|
|
|
|
/**
|
|
|
- * 更新库存
|
|
|
+ * 更新库存
|
|
|
+ *
|
|
|
* @param chargeCode
|
|
|
* @param serial
|
|
|
* @param groupNo
|
|
@@ -126,7 +135,8 @@ public interface YpBaseYfMapper {
|
|
|
int updateStockAmount(@Param("chargeCode") String chargeCode, @Param("serial") String serial, @Param("groupNo") String groupNo, @Param("stockAmount") Double stockAmount, @Param("stockValue") BigDecimal stockValue);
|
|
|
|
|
|
/**
|
|
|
- * 模糊查询药品信息
|
|
|
+ * 模糊查询药品信息
|
|
|
+ *
|
|
|
* @param searchText
|
|
|
* @param groupNo
|
|
|
* @return
|
|
@@ -149,11 +159,12 @@ public interface YpBaseYfMapper {
|
|
|
" a.charge_code like '${searchText}%' or" +
|
|
|
" b.name like '${searchText}%') and" +
|
|
|
" a.group_no = #{groupNo} and " +
|
|
|
- " a.stock_amount > 0" )
|
|
|
+ " a.stock_amount > 0")
|
|
|
List<YpBaseYfVo> selectYpBaseYfLike(@Param("searchText") String searchText, @Param("groupNo") String groupNo);
|
|
|
|
|
|
/**
|
|
|
- * 根据编码查询药房药品信息
|
|
|
+ * 根据编码查询药房药品信息
|
|
|
+ *
|
|
|
* @param chargeCode
|
|
|
* @return
|
|
|
*/
|
|
@@ -171,11 +182,12 @@ public interface YpBaseYfMapper {
|
|
|
" WHERE ( a.serial = b.serial ) and" +
|
|
|
" a.charge_code = b.code and" +
|
|
|
" a.charge_code = #{chargeCode} and" +
|
|
|
- " a.group_no = #{groupNo}" )
|
|
|
- List<YpBaseYfVo> selectYpByChargeCodeAndGroupNo(@Param("chargeCode") String chargeCode,@Param("groupNo") String groupNo);
|
|
|
+ " a.group_no = #{groupNo}")
|
|
|
+ List<YpBaseYfVo> selectYpByChargeCodeAndGroupNo(@Param("chargeCode") String chargeCode, @Param("groupNo") String groupNo);
|
|
|
|
|
|
/**
|
|
|
* 查询盘点药品信息
|
|
|
+ *
|
|
|
* @param groupNo
|
|
|
* @param infusionFlag
|
|
|
* @return
|
|
@@ -201,11 +213,12 @@ public interface YpBaseYfMapper {
|
|
|
" a.manu_code = m.code and" +
|
|
|
" b.group_no=#{groupNo} and" +
|
|
|
" isnull(a.infusion_flag,'0') like '${infusionFlag}%')ab " +
|
|
|
- " where visible_flag like '${visibleFlag}%' order by location" )
|
|
|
- List<YpBaseYfVo> selectYpInventoryData(@Param("groupNo") String groupNo,@Param("infusionFlag") String infusionFlag,@Param("visibleFlag") String visibleFlag);
|
|
|
+ " where visible_flag like '${visibleFlag}%' order by location")
|
|
|
+ List<YpBaseYfVo> selectYpInventoryData(@Param("groupNo") String groupNo, @Param("infusionFlag") String infusionFlag, @Param("visibleFlag") String visibleFlag);
|
|
|
|
|
|
/**
|
|
|
* 查询药房药品库存合计(大规格)
|
|
|
+ *
|
|
|
* @param chargeCode
|
|
|
* @param groupNo
|
|
|
* @return
|
|
@@ -219,5 +232,5 @@ public interface YpBaseYfMapper {
|
|
|
"where z.code=x.charge_code and" +
|
|
|
" x.charge_code=#{chargeCode} and" +
|
|
|
" x.group_no =#{groupNo}")
|
|
|
- Double selectLargeStockAmount(@Param("chargeCode") String chargeCode,@Param("groupNo") String groupNo);
|
|
|
+ Double selectLargeStockAmount(@Param("chargeCode") String chargeCode, @Param("groupNo") String groupNo);
|
|
|
}
|