Browse Source

Merge branch 'master' into 'master'

临购药品申请优化

See merge request lighter/web-server!88
huangshuhua 1 year ago
parent
commit
031acd384a

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/highreport/HighReportDao.java

@@ -142,7 +142,7 @@ public interface HighReportDao {
             " (report_id, report_name, report_type, unit, level, gather_sql, base_sql, display_type, flag, " +
             "  menu_id, sort, report_sort, is_cw, is_yj, calc_child, calc_mom) values " +
             " (#{reportId},#{reportName},#{reportType},#{unit},#{level}, " +
-            " #{gatherSql},#{baseSql},#{displayType},#{flag},#{menuId} " +
+            " #{gatherSql},#{baseSql},#{displayType},#{flag},#{menuId}, " +
             " #{sort},#{reportSort},#{isCw},#{isYj},#{calcChild},#{calcMom} " +
             " ) " +
             "</script>")

+ 2 - 0
src/main/java/thyyxxk/webserver/dao/his/yp/YpDictDao.java

@@ -52,6 +52,7 @@ public interface YpDictDao extends BaseMapper<YpZdDict> {
             " zd.temp_purchase_flag as tempPurchaseFlag,  " +
             " rtrim(isnull(zd.jb_flag, '0')) as jbFlag,  " +
             " isnull(zd.del_flag, '0') as delFlag,  " +
+            " isnull(yc.name, '') as manuFactory, " +
             "<if test=\" groupNo != null and groupNo != '' \">" +
             " isnull(base.del_flag, '0') as ykFlag,  " +
             "</if>" +
@@ -62,6 +63,7 @@ public interface YpDictDao extends BaseMapper<YpZdDict> {
             " inner join (select distinct charge_code, serial, del_flag from yp_base where group_no = #{groupNo}) as base " +
             " on zd.code = base.charge_code and zd.serial = base.serial " +
             "</if>" +
+            " left join yp_zd_manufactory as yc on zd.manu_code = yc.code " +
             " where zd.code like '%${text}%' or zd.name like '%${text}%'  " +
             " or zd.py_code like ('%' + upper(#{text}) + '%') " +
             " or zd.d_code like ('%' + upper(#{text}) + '%') " +

+ 2 - 1
src/main/java/thyyxxk/webserver/dao/his/yp/YpTempPurchaseDao.java

@@ -14,8 +14,9 @@ import java.util.Map;
 @Mapper
 public interface YpTempPurchaseDao extends BaseMapper<YpTempPurchase> {
 
-    @Select(" select zd.code as chargeCode, zd.name as chargeName, zd.serial, zd.specification, zd.retprice " +
+    @Select(" select zd.code as chargeCode, zd.name as chargeName, zd.serial, zd.specification, zd.retprice, isnull(yc.name, '') as manuFactory " +
             " from yp_zd_dict as zd " +
+            " left join yp_zd_manufactory as yc on zd.manu_code = yc.code " +
             " where zd.temp_purchase_flag = '1' " +
             " and (zd.name like '%${text}%' " +
             " or zd.code like '%${text}%' " +

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/yp/YpTempPurchase.java

@@ -41,6 +41,7 @@ public class YpTempPurchase implements Serializable {
     private String auditDate; // 审核日期(接收日期)
     private String result; // 采购原因
     private String useResult; // 申请使用理由
+    private String manuFactory; // 生产厂家
     @TableField("exist = false")
     private String permissions; // 0: 修改权限; 1: 审核权限
 

+ 2 - 2
src/main/java/thyyxxk/webserver/service/highreport/HighReportService.java

@@ -136,7 +136,7 @@ public class HighReportService {
         Map<String, Object> map = new HashMap<>();
         ResultVo<ReportBaseInfo> resultVo = selectReportPortalMenu(dto);
         ReportBaseInfo report = resultVo.getData();
-        if(null == report || report.getDataList().size() == 0){
+        if(null == report || report.getDataList().isEmpty()){
             map.put("code", 1);
             map.put("massage", "查询数据为空,导出失败!");
             return ResultVoUtil.success(map);
@@ -145,7 +145,7 @@ public class HighReportService {
         // 数据
         List<Map<String, Object>> list = report.getDataList();
         // 合计
-        if(null != report.getTotal() && report.getTotal().size() != 0){
+        if(null != report.getTotal() && !report.getTotal().isEmpty()){
             Map<String, Object> total = report.getTotal();
             list.add(total);
         }