Browse Source

中药盘点厂商为NULL处理

WANGJIALIANG 2 years ago
parent
commit
ed5619fe70

+ 7 - 4
src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpOutDetlYfMapper.java

@@ -65,7 +65,10 @@ public interface YpOutDetlYfMapper {
             "  profit_lossprofit_money=-a.out_amt*a.pack_retprice," +
             "  py_code=b.py_code," +
             "  manufactoryName=m.name" +
-            " from yp_out_detl_yf a WITH(NOLOCK),yp_zd_dict b WITH(NOLOCK),yp_base_yf c WITH(NOLOCK),yp_zd_manufactory m WITH(NOLOCK) " +
+            " from yp_out_detl_yf a WITH(NOLOCK),yp_zd_dict b WITH(NOLOCK)" +
+            " left join" +
+            "  yp_zd_manufactory m WITH(NOLOCK) on b.manu_code = m.code" +
+            " ,yp_base_yf c WITH(NOLOCK) " +
             " where" +
             "    a.draw_no= #{drawNo} and" +
             "    a.charge_code = b.code and" +
@@ -73,7 +76,6 @@ public interface YpOutDetlYfMapper {
             "    a.charge_code = c.charge_code and" +
             "    a.serial= c.serial and" +
             "    a.group_no = c.group_no and" +
-            "    b.manu_code = m.code and" +
             "    out_type>=6 and" +
             "    out_type<=8 order by c.location" )
     List<YpBaseYfVo> selectYpInventoryData(@Param("drawNo") String drawNo);
@@ -139,7 +141,9 @@ public interface YpOutDetlYfMapper {
             "  b.drug_kind," +
             "  kind_name=k.name," +
             "  manufactory_name=m.name" +
-            " from yp_out_detl_yf a WITH(NOLOCK),yp_zd_dict b WITH(NOLOCK),yp_base_yf c WITH(NOLOCK) ,yp_zd_manufactory m WITH(NOLOCK) ,yp_zd_drug_kind k WITH(NOLOCK) " +
+            " from yp_out_detl_yf a WITH(NOLOCK)," +
+            "yp_zd_dict b WITH(NOLOCK) left join yp_zd_manufactory m WITH(NOLOCK) on b.manu_code = m.code" +
+            ",yp_base_yf c WITH(NOLOCK) ,yp_zd_drug_kind k WITH(NOLOCK) " +
             " where" +
             "    a.draw_no= #{drawNo} and" +
             "    a.charge_code = b.code and" +
@@ -148,7 +152,6 @@ public interface YpOutDetlYfMapper {
             "    a.serial= c.serial and" +
             "    a.group_no = c.group_no and" +
             "    b.drug_kind = k.code and" +
-            "    b.manu_code = m.code and" +
             "    out_type>=6 and" +
             "    out_type<=8 order by b.drug_kind asc,c.location asc" )
     List<YpBaseYfVo> selectYpInventoryPrintData(@Param("drawNo") String drawNo);

+ 1 - 1
src/main/resources/static/js/yf/yf_inventory.js

@@ -406,7 +406,7 @@ function getTbAddRecordPrintData(drawNo) {
                     html += '<td class="xtd" style="text-align: center;">' + data.currStockAmount + '</td>';
                     html += '<td class="xtd" style="text-align: center;">' + parseFloat(data.currStockAmount-data.stockAmount) + '</td>';
                     html += '<td class="xtd" style="text-align: center;">' + keepTwoDecimal(parseFloat((data.currStockAmount-data.stockAmount)*data.packRetprice)) + '</td>';
-                    html += '<td style="text-align: left;">' + data.manufactoryName + '</td>';
+                    html += '<td style="text-align: left;">' + (isEmpty(data.manufactoryName)?'':data.manufactoryName) + '</td>';
                     html += '</tr>';
                 }
                 lszje += xj_lszje;