Browse Source

Merge branch 'dev-1.1.4' into 'dev-1.1.4'

药品分装组合优化

See merge request hurugang/thmz_system!2
huangshuhua 2 years ago
parent
commit
8521cb6969

+ 10 - 10
src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpInDetlYfMapper.java

@@ -45,34 +45,34 @@ public interface YpInDetlYfMapper {
             "       sys_date,rtrim(charge_code)charge_code,serial,pack_retprice,buy_price,buy_amt,stock_amount,eff_date,manu_code,manu_no," +
             "       current_stock,fp_date,kl,in_comment,license_no,in_seri,in_type,plan_no" +
             " FROM yp_in_detl_yf a WITH(NOLOCK) where 1=1 " +
-            "<when test='ypInDetlYf.beginTime != null'>" +
+            "<when test='ypInDetlYf.beginTime != null and ypInDetlYf.beginTime != \"\" '>" +
             " and in_date <![CDATA[>=]]> #{ypInDetlYf.beginTime}" +
             "</when>" +
-            "<when test='ypInDetlYf.endTime != null'>" +
+            "<when test='ypInDetlYf.endTime != null and ypInDetlYf.endTime != \"\"'>" +
             " and in_date <![CDATA[<=]]> #{ypInDetlYf.endTime}" +
             "</when>" +
-            "<when test='ypInDetlYf.inDocuNo != null'>" +
+            "<when test='ypInDetlYf.inDocuNo != null and ypInDetlYf.inDocuNo != \"\"'>" +
             " and in_docu_no = #{ypInDetlYf.inDocuNo}" +
             "</when>" +
-            "<when test='ypInDetlYf.planNo != null'>" +
+            "<when test='ypInDetlYf.planNo != null and ypInDetlYf.planNo != \"\"'>" +
             " and plan_no = #{ypInDetlYf.planNo}" +
             "</when>" +
-            "<when test='ypInDetlYf.manuCode != null'>" +
+            "<when test='ypInDetlYf.manuCode != null and ypInDetlYf.manuCode != \"\"'>" +
             " and manu_code = #{ypInDetlYf.manuCode}" +
             "</when>" +
-            "<when test='ypInDetlYf.supplyCode != null'>" +
+            "<when test='ypInDetlYf.supplyCode != null and ypInDetlYf.supplyCode != \"\" '>" +
             " and supply_code = #{ypInDetlYf.supplyCode}" +
             "</when>" +
-            "<when test='ypInDetlYf.inputId != null'>" +
+            "<when test='ypInDetlYf.inputId != null and ypInDetlYf.inputId != \"\"'>" +
             " and input_id = #{ypInDetlYf.inputId}" +
             "</when>" +
-            "<when test='ypInDetlYf.chargeCode != null'>" +
+            "<when test='ypInDetlYf.chargeCode != null and ypInDetlYf.chargeCode != \"\"'>" +
             " and charge_code = #{ypInDetlYf.chargeCode}" +
             "</when>" +
-            "<when test='ypInDetlYf.inType != null'>" +
+            "<when test='ypInDetlYf.inType != null and ypInDetlYf.inType != \"\"'>" +
             " and in_type = #{ypInDetlYf.inType}" +
             "</when>" +
-            "<when test='ypInDetlYf.groupNo != null'>" +
+            "<when test='ypInDetlYf.groupNo != null and ypInDetlYf.groupNo != \"\"'>" +
             " and group_no = #{ypInDetlYf.groupNo}" +
             "</when>)AS A WHERE RowNumber >${rows}*${page-1} order by RowNumber asc" +
             "</script>")

+ 1 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/yf/YfDivideServiceImpl.java

@@ -104,7 +104,7 @@ public class YfDivideServiceImpl implements YfDivideService {
             ypInDetlYf.setAcctType("1");
             ypInDetlYf.setGroupOut(ypBaseYfVo.getGroupNo());
             ypInDetlYf.setGroupNo(ypBaseYfVo.getGroupNo());
-            ypInDetlYf.setCurrentStock(ypBaseYfVo.getAmount());
+            ypInDetlYf.setCurrentStock(ypBaseYfVo.getAmount()+ypBaseYf.getStockAmount());
             ypInDetlYf.setStockAmount(ypBaseYf.getStockAmount());
             ypInDetlYf.setSysDate(new Date());
             ypInDetlYfMapper.insertYpInDetlYf(ypInDetlYf);