Parcourir la source

电话号码维护

cgp il y a 8 heures
Parent
commit
f8deb9551b

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/FsCompanyCustomerController.java

@@ -295,7 +295,7 @@ public class FsCompanyCustomerController extends BaseController {
         if (fsDoctorPatient.getPhone() != null) {
             fsDoctorPatient.setPhone(fsDoctorPatient.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
         }
-        return AjaxResult.success();
+        return AjaxResult.success(fsDoctorPatient);
     }
 
     /**

+ 10 - 1
fs-doctor-app/src/main/java/com/fs/app/controller/FsDoctorPatientController.java

@@ -78,6 +78,11 @@ public class FsDoctorPatientController extends AppBaseController {
         fsDoctorPatient.setDoctorId(Long.valueOf(doctorId));
         PageHelper.startPage(fsDoctorPatient.getPageNum(), fsDoctorPatient.getPageSize());
         List<FsDoctorPatient> list = fsDoctorPatientService.selectFsDoctorPatientList(fsDoctorPatient);
+        for (FsDoctorPatient item : list) {
+            if (item.getPhone() != null) {
+                item.setPhone(item.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+            }
+        }
         PageInfo<FsDoctorPatient> listPageInfo=new PageInfo<>(list);
         return AjaxResult.success(listPageInfo);
     }
@@ -105,7 +110,11 @@ public class FsDoctorPatientController extends AppBaseController {
     @ApiOperation("获取患者详情")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return AjaxResult.success(fsDoctorPatientService.selectFsDoctorPatientById(id));
+        FsDoctorPatient fsDoctorPatient = fsDoctorPatientService.selectFsDoctorPatientById(id);
+        if (fsDoctorPatient.getPhone() != null) {
+            fsDoctorPatient.setPhone(fsDoctorPatient.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+        }
+        return AjaxResult.success(fsDoctorPatient);
     }
 
     /**

+ 3 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsDoctorPatientServiceImpl.java

@@ -70,6 +70,9 @@ public class FsDoctorPatientServiceImpl implements IFsDoctorPatientService {
 
     @Override
     public int updateFsDoctorPatient(FsDoctorPatient fsDoctorPatient) {
+        if (fsDoctorPatient.getPhone()!=null&&fsDoctorPatient.getPhone().contains("*")){
+            fsDoctorPatient.setPhone(null);
+        }
         return fsDoctorPatientMapper.updateFsDoctorPatient(fsDoctorPatient);
     }