소스 검색

销售端-客户电话号码维护

cgp 8 시간 전
부모
커밋
3af49ad839

+ 5 - 0
fs-company/src/main/java/com/fs/company/controller/handwrite/HandwriteCollectionController.java

@@ -59,6 +59,11 @@ public class HandwriteCollectionController extends BaseController
     @PostMapping("/export")
     public void export(HttpServletResponse response, @RequestBody HandwriteCollection handwriteCollection) throws IOException {
         List<HandwriteCollection> list = handwriteCollectionService.selectHandwriteCollectionList(handwriteCollection);
+        for (HandwriteCollection item : list) {
+            if (item.getPatientPhone() != null) {
+                item.setPatientPhone(item.getPatientPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+            }
+        }
         ExcelUtil<HandwriteCollection> util = new ExcelUtil<HandwriteCollection>(HandwriteCollection.class);
         util.exportExcel(response, list, "手写信息采集表数据");
     }

+ 16 - 1
fs-company/src/main/java/com/fs/company/controller/handwrite/HandwritePatientFormController.java

@@ -4,6 +4,7 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
 import com.fs.framework.security.SecurityUtils;
+import com.fs.handwrite.domain.HandwriteCollection;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import com.fs.common.core.controller.BaseController;
@@ -34,6 +35,11 @@ public class HandwritePatientFormController extends BaseController
     {
         startPage();
         List<HandwritePatientForm> list = handwritePatientFormService.selectHandwritePatientFormList(handwritePatientForm);
+        for (HandwritePatientForm item : list) {
+            if (item.getPatientPhone() != null) {
+                item.setPatientPhone(item.getPatientPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+            }
+        }
         return getDataTable(list);
     }
 
@@ -44,6 +50,11 @@ public class HandwritePatientFormController extends BaseController
     public AjaxResult export(HttpServletResponse response, HandwritePatientForm handwritePatientForm)
     {
         List<HandwritePatientForm> list = handwritePatientFormService.selectHandwritePatientFormList(handwritePatientForm);
+        for (HandwritePatientForm item : list) {
+            if (item.getPatientPhone() != null) {
+                item.setPatientPhone(item.getPatientPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+            }
+        }
         ExcelUtil<HandwritePatientForm> util = new ExcelUtil<HandwritePatientForm>(HandwritePatientForm.class);
         return util.exportExcel(list, "手写信息初诊单数据");
     }
@@ -54,7 +65,11 @@ public class HandwritePatientFormController extends BaseController
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Integer id)
     {
-        return AjaxResult.success(handwritePatientFormService.selectHandwritePatientFormById(id));
+        HandwritePatientForm handwritePatientForm = handwritePatientFormService.selectHandwritePatientFormById(id);
+        if (handwritePatientForm.getPatientPhone() != null) {
+            handwritePatientForm.setPatientPhone(handwritePatientForm.getPatientPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+        }
+        return AjaxResult.success(handwritePatientForm);
     }
 
     /**

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

@@ -130,6 +130,9 @@ public class FsCompanyCustomerController extends BaseController {
     @PostMapping("/export")
     public void export(HttpServletResponse response, FsCompanyCustomer fsCompanyCustomer) {
         List<FsCompanyCustomer> list = fsCompanyCustomerService.selectFsCompanyCustomerList(fsCompanyCustomer);
+        list.forEach(customer -> {
+            customer.setPhone(maskPhoneMiddleFive(customer.getPhone()));
+        });
         ExcelUtil<FsCompanyCustomer> util = new ExcelUtil<>(FsCompanyCustomer.class);
         try {
             util.exportExcel(response, list, "客户信息数据");

+ 3 - 0
fs-service/src/main/java/com/fs/handwrite/service/impl/HandwritePatientFormServiceImpl.java

@@ -45,6 +45,9 @@ public class HandwritePatientFormServiceImpl implements IHandwritePatientFormSer
     @Override
     public int updateHandwritePatientForm(HandwritePatientForm handwritePatientForm)
     {
+        if (handwritePatientForm.getPatientPhone()!=null&&handwritePatientForm.getPatientPhone().contains("*")){
+            handwritePatientForm.setPatientPhone(null);
+        }
         handwritePatientForm.setUpdateTime(new Date());
         return handwritePatientFormMapper.updateHandwritePatientForm(handwritePatientForm);
     }