Prechádzať zdrojové kódy

fix 新增判断身份证号码,提取性别和生日

Administrator 3 rokov pred
rodič
commit
f2699fb97d

+ 13 - 0
boman-web-core/src/main/java/com/boman/web/core/domain/VaccineInfoOperation.java

@@ -110,6 +110,11 @@ public class VaccineInfoOperation extends BaseEntity {
     @Excel(name = "疫苗名称")
     private String vaccineName;
 
+    /**
+     * 疫苗名称的字典值
+     */
+    private String dictValue;
+
     /**
      * 剂次(1/2/3/加强针)
      */
@@ -212,6 +217,14 @@ public class VaccineInfoOperation extends BaseEntity {
      */
     private String url;
 
+    public String getDictValue() {
+        return dictValue;
+    }
+
+    public void setDictValue(String dictValue) {
+        this.dictValue = dictValue;
+    }
+
     public String getUrl() {
         return url;
     }

+ 8 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/VaccineInfoMapper.java

@@ -68,4 +68,12 @@ public interface VaccineInfoMapper
      * @return
      */
     public VaccineInfoOperation findHjInfo(VaccineInfoOperation vaccineInfo);
+
+
+    /**
+     * 根据dict_label 查询 dict_value
+     * @param vaccineName
+     * @return
+     */
+    public String selectSysDictDataByDictLabel(String vaccineName);
 }

+ 8 - 1
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/impl/VaccineInfoServiceImpl.java

@@ -7,6 +7,7 @@ import java.util.List;
 import com.boman.common.core.utils.DateUtils;
 import com.boman.common.core.utils.SecurityUtils;
 import com.boman.common.core.utils.StringUtils;
+import com.boman.domain.SysDictData;
 import com.boman.web.core.domain.VaccineInfoOperation;
 import com.boman.web.core.mapper.VaccineInfoOperationMapper;
 import com.boman.web.core.service.vaccineInfo.IVaccineInfoService;
@@ -44,7 +45,13 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
      */
     @Override
     public VaccineInfoOperation selectVaccineInfoById(Long id) {
-        return vaccineInfoMapper.selectVaccineInfoById(id);
+        VaccineInfoOperation vaccineInfoOperation = vaccineInfoMapper.selectVaccineInfoById(id);
+        String vaccineName = vaccineInfoOperation.getVaccineName();
+        if (StringUtils.isNotBlank(vaccineName)){
+            String dictValue = vaccineInfoMapper.selectSysDictDataByDictLabel(vaccineName);
+            vaccineInfoOperation.setDictValue(dictValue);
+        }
+        return vaccineInfoOperation;
     }
 
     /**

+ 6 - 0
boman-web-core/src/main/resources/mapper/VaccineInfoMapper.xml

@@ -256,5 +256,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
          <if test="idCard != null and idCard != '' ">zjhm = #{idCard}</if>
         </where>
+        limit 1
     </select>
+
+    <select id="selectSysDictDataByDictLabel" parameterType="string" resultType="String">
+        select dict_value  from sys_dict_data where dict_label = #{vaccineName} and  status = '0'
+    </select>
+
 </mapper>