瀏覽代碼

优化medtype的更新

lighter 2 年之前
父節點
當前提交
474db18f8b

+ 4 - 1
src/main/java/thyyxxk/simzfeeoprnsystm/dao/SiMzDao.java

@@ -57,10 +57,13 @@ public interface SiMzDao {
                         @Param("ledgerSn") int ledgerSn);
 
     @Update("update t_si_pat_info set insuplc_admdvs=#{insuplcAdmdvs},psn_type=#{psnType},emp_name=#{empName}," +
-            "mdtrt_id=#{mdtrtId},insutype=#{insutype},visit_datetime=#{visitDate},balc=#{balc},med_type=#{medType} " +
+            "mdtrt_id=#{mdtrtId},insutype=#{insutype},visit_datetime=#{visitDate},balc=#{balc} " +
             "where pat_no=#{patNo} and times=#{times} ")
     void afterRegistrtn(MzPatientInfo p);
 
+    @Update("update t_si_pat_info set med_type=#{medtype} where pat_no=#{patNo} and times=#{times}")
+    void updateMedtype(@Param("medtype") String medtype, @Param("patNo") String patNo, @Param("times") int times);
+
     @Select("select feedetlSn=(patient_id + '_' + cast(times as varchar) + '_' + cast(receipt_no as varchar) + '_' + " +
             "cast(order_no as varchar) + '_' + cast(item_no as varchar)), " +
             "receipt_no as rxno, input_date as feeOcurTime, " +

+ 3 - 0
src/main/java/thyyxxk/simzfeeoprnsystm/service/SiMzFeeService.java

@@ -63,6 +63,9 @@ public class SiMzFeeService {
         if (readCardBizType != ReadCardBizType.REGISTRATION && !p.getInsuplcAdmdvs().startsWith("43")) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "省外异地的患者请读社保卡或医保电子凭证登记!");
         }
+        if (StringUtil.notBlank(p.getMedType())) {
+            mzDao.updateMedtype(p.getMedType(), p.getPatNo(), p.getTimes());
+        }
         if (readCardBizType == ReadCardBizType.REGISTRATION) {
             MdtrtCertType mdtrtCertType = MdtrtCertType.getByLabel(p.getMdtrtCertType());
             regstrtn.setMdtrtCertType(mdtrtCertType.getCode());