lihong 2 rokov pred
rodič
commit
ca54c35e87

+ 9 - 6
src/main/java/cn/hnthyy/thmz/controller/mz/MzyReqrecController.java

@@ -716,12 +716,15 @@ public class MzyReqrecController {
                 resultMap.put("message", "当前挂号信息已经打印过发票,请勿重复操作");
                 return resultMap;
             }
-            if (Constants.BYJZ.equals(mzyReqrec.getPaymode())) {
-                //当前病人没有实际缴费,暂时不打印发票
-                resultMap.put("code", -2);
-                resultMap.put("message", "挂号成功,记账不打发票");
-                log.info("当前病人没有实际缴费,暂时不打印发票,patientId={},time={}", patientId, times);
-                return resultMap;
+            if(StrUtil.isNotBlank(mzyReqrec.getPaymode())){
+                ZdChequeType zdChequeType = zdChequeTypeService.queryChequeTypeByCode(mzyReqrec.getPaymode());
+                if (zdChequeType != null && (zdChequeType.getPrintFlag() == null || zdChequeType.getPrintFlag() == 0)) {
+                    //当前病人没有实际缴费,暂时不打印发票
+                    resultMap.put("code", -2);
+                    resultMap.put("message", "挂号成功," + zdChequeType.getName() + "不打发票");
+                    log.info("当前病人没有实际缴费,暂时不打印发票,patientId={},time={}", patientId, times);
+                    return resultMap;
+                }
             }
             ZdUnitCode zdUnitCode = zdUnitCodeService.queryByCode(mzyReqrec.getUnitCode());
             if (zdUnitCode != null) {

+ 2 - 0
src/main/java/cn/hnthyy/thmz/entity/his/zd/ZdChequeType.java

@@ -15,4 +15,6 @@ public class ZdChequeType {
     private Integer mzFlag;
     //住院删除标志  1 删除 0使用
     private Integer zyFlag;
+    //打印发票标识  0 不打  1 打印
+    private Integer printFlag;
 }

+ 4 - 4
src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdChequeTypeMapper.java

@@ -11,14 +11,14 @@ public interface ZdChequeTypeMapper {
      * 查询所有门诊可用的付款方式
      * @return
      */
-    @Select("select rtrim(code) code,rtrim(name) name,mz_flag,zy_flag from zd_cheque_type WITH(NOLOCK)   where mz_flag =0 or mz_flag is null order by  code")
+    @Select("select rtrim(code) code,rtrim(name) name,mz_flag,zy_flag,print_flag from zd_cheque_type WITH(NOLOCK)   where mz_flag =0 or mz_flag is null order by  code")
     List<ZdChequeType> selectAllZdChequeTypeForMz();
 
     /**
      * 查询所有住院可用的付款方式
      * @return
      */
-    @Select("select rtrim(code) code,rtrim(name) name,mz_flag,zy_flag from zd_cheque_type WITH(NOLOCK)   where zy_flag =0 or zy_flag is null order by  code")
+    @Select("select rtrim(code) code,rtrim(name) name,mz_flag,zy_flag,print_flag from zd_cheque_type WITH(NOLOCK)   where zy_flag =0 or zy_flag is null order by  code")
     List<ZdChequeType> selectAllZdChequeTypeForZy();
 
     /**
@@ -26,13 +26,13 @@ public interface ZdChequeTypeMapper {
      * @param code
      * @return
      */
-    @Select("select rtrim(code) code,rtrim(name) name,mz_flag,zy_flag from zd_cheque_type WITH(NOLOCK)   where code =#{code}")
+    @Select("select rtrim(code) code,rtrim(name) name,mz_flag,zy_flag,print_flag from zd_cheque_type WITH(NOLOCK)   where code =#{code}")
     ZdChequeType selectChequeTypeByCode(@Param("code") String code);
 
     /**
      * 查询所有付款方式 用于历史数据查询和映射
      * @return
      */
-    @Select("select rtrim(code) code,rtrim(name) name,mz_flag,zy_flag from zd_cheque_type WITH(NOLOCK)  ")
+    @Select("select rtrim(code) code,rtrim(name) name,mz_flag,zy_flag,print_flag from zd_cheque_type WITH(NOLOCK)  ")
     List<ZdChequeType> selectAllZdChequeType();
 }