فهرست منبع

Merge remote-tracking branch 'origin/master'

yfh 5 روز پیش
والد
کامیت
0675f2a026

+ 133 - 75
fs-admin/src/main/java/com/fs/his/controller/FsPatientController.java

@@ -11,6 +11,7 @@ import com.fs.common.core.domain.R;
 import com.fs.common.exception.CustomException;
 import com.fs.common.utils.SecurityUtils;
 import com.fs.his.vo.FsPatientVO;
+import com.hc.openapi.tool.util.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -132,48 +133,75 @@ public class FsPatientController extends BaseController
     public AjaxResult add(@RequestBody FsPatient fsPatient)
     {
         String idCardNumber = fsPatient.getIdCard(); // 替换为要验证的身份证号码
-        if (idCardNumber == null || idCardNumber.length() != 18) {
-           throw new CustomException("身份证号码不合法");
-        }
-        String regex = "\\d{17}[0-9Xx]";
-        if (!Pattern.matches(regex, idCardNumber)) {
-            throw new CustomException("身份证号码不合法");
+//        if (idCardNumber == null || idCardNumber.length() != 18) {
+//           throw new CustomException("身份证号码不合法");
+//        }
+//        String regex = "\\d{17}[0-9Xx]";
+//        if (!Pattern.matches(regex, idCardNumber)) {
+//            throw new CustomException("身份证号码不合法");
+//        }
+        if (StringUtils.isNotBlank(idCardNumber)){
+            if (idCardNumber.length() != 18) {
+                throw new CustomException("身份证号码不合法");
+            }
+            String regex = "\\d{17}[0-9Xx]";
+            if (!Pattern.matches(regex, idCardNumber)) {
+                throw new CustomException("身份证号码不合法");
+            }
+            String birthDateString = idCardNumber.substring(6, 14);
+            LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
+            LocalDate currentDate = LocalDate.now();
+            int age = currentDate.getYear() - birthDate.getYear();
+            if (currentDate.getMonthValue() < birthDate.getMonthValue()
+                    || (currentDate.getMonthValue() == birthDate.getMonthValue()
+                    && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
+                age--;
+            }
+            if (age < 18) {
+                throw new CustomException("年龄必须大于18岁");
+            }
+            if (age > 200) {
+                throw new CustomException("年龄超过200岁");
+            }
         }
         if (fsPatient.getPatientName().length()<2||fsPatient.getPatientName().length()>30||!fsPatient.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
             throw new CustomException("就诊人名称不合法");
         }
-        String birthDateString = idCardNumber.substring(6, 14);
-        LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
-        LocalDate currentDate = LocalDate.now();
-        int age = currentDate.getYear() - birthDate.getYear();
-        if (currentDate.getMonthValue() < birthDate.getMonthValue()
-                || (currentDate.getMonthValue() == birthDate.getMonthValue()
-                && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
-            age--;
-        }
-        if (age < 18) {
-            throw new CustomException("年龄必须大于18岁");
-        }
-        if (age > 200) {
-            throw new CustomException("年龄超过200岁");
-        }
+//        String birthDateString = idCardNumber.substring(6, 14);
+//        LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
+//        LocalDate currentDate = LocalDate.now();
+//        int age = currentDate.getYear() - birthDate.getYear();
+//        if (currentDate.getMonthValue() < birthDate.getMonthValue()
+//                || (currentDate.getMonthValue() == birthDate.getMonthValue()
+//                && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
+//            age--;
+//        }
+//        if (age < 18) {
+//            throw new CustomException("年龄必须大于18岁");
+//        }
+//        if (age > 200) {
+//            throw new CustomException("年龄超过200岁");
+//        }
         Date birthday = fsPatient.getBirthday();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-        String formattedBirthday = sdf.format(birthday);
-        LocalDate da = LocalDate.parse(formattedBirthday, DateTimeFormatter.ofPattern("yyyyMMdd"));
-        LocalDate currentDate2 = LocalDate.now();
-        int age2 = currentDate2.getYear() - da.getYear();
-        if (currentDate2.getMonthValue() < da.getMonthValue()
-                || (currentDate2.getMonthValue() == da.getMonthValue()
-                && currentDate2.getDayOfMonth() < da.getDayOfMonth())) {
-            age2--;
-        }
-        if (age2 < 18) {
-            throw new CustomException("年龄必须大于18岁");
-        }
-        if (age2 > 200) {
-            throw new CustomException("年龄超过200岁");
+        if (birthday!=null){
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String formattedBirthday = sdf.format(birthday);
+            LocalDate da = LocalDate.parse(formattedBirthday, DateTimeFormatter.ofPattern("yyyyMMdd"));
+            LocalDate currentDate2 = LocalDate.now();
+            int age2 = currentDate2.getYear() - da.getYear();
+            if (currentDate2.getMonthValue() < da.getMonthValue()
+                    || (currentDate2.getMonthValue() == da.getMonthValue()
+                    && currentDate2.getDayOfMonth() < da.getDayOfMonth())) {
+                age2--;
+            }
+            if (age2 < 18) {
+                throw new CustomException("年龄必须大于18岁");
+            }
+            if (age2 > 200) {
+                throw new CustomException("年龄超过200岁");
+            }
         }
+
         return toAjax(fsPatientService.insertFsPatient(fsPatient));
     }
 
@@ -186,48 +214,78 @@ public class FsPatientController extends BaseController
     public AjaxResult edit(@RequestBody FsPatient fsPatient)
     {
         String idCardNumber = fsPatient.getIdCard();
-        if (idCardNumber == null || idCardNumber.length() != 18) {
-            throw new CustomException("身份证号码不合法");
-        }
-        String regex = "\\d{17}[0-9Xx]";
-        if (!Pattern.matches(regex, idCardNumber)) {
-            throw new CustomException("身份证号码不合法");
-        }
-        if (fsPatient.getPatientName().length()<2||fsPatient.getPatientName().length()>30||!fsPatient.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
-            throw new CustomException("就诊人名称不合法");
-        }
-        String birthDateString = idCardNumber.substring(6, 14);
-        LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
-        LocalDate currentDate = LocalDate.now();
-        int age = currentDate.getYear() - birthDate.getYear();
-        if (currentDate.getMonthValue() < birthDate.getMonthValue()
-                || (currentDate.getMonthValue() == birthDate.getMonthValue()
-                && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
-            age--;
-        }
-        if (age < 18) {
-            throw new CustomException("年龄必须大于18岁");
-        }
-        if (age > 200) {
-            throw new CustomException("年龄超过200岁");
+//        if (idCardNumber == null || idCardNumber.length() != 18) {
+//            throw new CustomException("身份证号码不合法");
+//        }
+//        String regex = "\\d{17}[0-9Xx]";
+//        if (!Pattern.matches(regex, idCardNumber)) {
+//            throw new CustomException("身份证号码不合法");
+//        }
+//        if (fsPatient.getPatientName().length()<2||fsPatient.getPatientName().length()>30||!fsPatient.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
+//            throw new CustomException("就诊人名称不合法");
+//        }
+//        String birthDateString = idCardNumber.substring(6, 14);
+//        LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
+//        LocalDate currentDate = LocalDate.now();
+//        int age = currentDate.getYear() - birthDate.getYear();
+//        if (currentDate.getMonthValue() < birthDate.getMonthValue()
+//                || (currentDate.getMonthValue() == birthDate.getMonthValue()
+//                && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
+//            age--;
+//        }
+//        if (age < 18) {
+//            throw new CustomException("年龄必须大于18岁");
+//        }
+//        if (age > 200) {
+//            throw new CustomException("年龄超过200岁");
+//        }
+        if (StringUtils.isNotBlank(idCardNumber)) {
+            if (idCardNumber.length() != 18) {
+                throw new CustomException("身份证号码不合法");
+            }
+            String regex = "\\d{17}[0-9Xx]";
+            if (!Pattern.matches(regex, idCardNumber)) {
+                throw new CustomException("身份证号码不合法");
+            }
+            if (fsPatient.getPatientName().length()<2||fsPatient.getPatientName().length()>30||!fsPatient.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
+                throw new CustomException("就诊人名称不合法");
+            }
+            String birthDateString = idCardNumber.substring(6, 14);
+            LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
+            LocalDate currentDate = LocalDate.now();
+            int age = currentDate.getYear() - birthDate.getYear();
+            if (currentDate.getMonthValue() < birthDate.getMonthValue()
+                    || (currentDate.getMonthValue() == birthDate.getMonthValue()
+                    && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
+                age--;
+            }
+            if (age < 18) {
+                throw new CustomException("年龄必须大于18岁");
+            }
+            if (age > 200) {
+                throw new CustomException("年龄超过200岁");
+            }
         }
         Date birthday = fsPatient.getBirthday();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-        String formattedBirthday = sdf.format(birthday);
-        LocalDate da = LocalDate.parse(formattedBirthday, DateTimeFormatter.ofPattern("yyyyMMdd"));
-        LocalDate currentDate2 = LocalDate.now();
-        int age2 = currentDate2.getYear() - da.getYear();
-        if (currentDate2.getMonthValue() < da.getMonthValue()
-                || (currentDate2.getMonthValue() == da.getMonthValue()
-                && currentDate2.getDayOfMonth() < da.getDayOfMonth())) {
-            age2--;
-        }
-        if (age2 < 18) {
-            throw new CustomException("年龄必须大于18岁");
-        }
-        if (age2 > 200) {
-            throw new CustomException("年龄超过200岁");
+        if (birthday!=null){
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String formattedBirthday = sdf.format(birthday);
+            LocalDate da = LocalDate.parse(formattedBirthday, DateTimeFormatter.ofPattern("yyyyMMdd"));
+            LocalDate currentDate2 = LocalDate.now();
+            int age2 = currentDate2.getYear() - da.getYear();
+            if (currentDate2.getMonthValue() < da.getMonthValue()
+                    || (currentDate2.getMonthValue() == da.getMonthValue()
+                    && currentDate2.getDayOfMonth() < da.getDayOfMonth())) {
+                age2--;
+            }
+            if (age2 < 18) {
+                throw new CustomException("年龄必须大于18岁");
+            }
+            if (age2 > 200) {
+                throw new CustomException("年龄超过200岁");
+            }
         }
+
         return toAjax(fsPatientService.updateFsPatient(fsPatient));
     }
 

+ 100 - 64
fs-company/src/main/java/com/fs/company/controller/store/FsPatientController.java

@@ -6,6 +6,7 @@ import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
 import com.fs.common.exception.CustomException;
+import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.framework.security.LoginUser;
 import com.fs.framework.security.SecurityUtils;
@@ -123,68 +124,33 @@ public class FsPatientController extends BaseController
     public AjaxResult add(@RequestBody FsPatient fsPatient)
     {
         String idCardNumber = fsPatient.getIdCard(); // 替换为要验证的身份证号码
-        if (idCardNumber == null || idCardNumber.length() != 18) {
-            throw new CustomException("身份证号码不合法");
-        }
-        String regex = "\\d{17}[0-9Xx]";
-        if (!Pattern.matches(regex, idCardNumber)) {
-            throw new CustomException("身份证号码不合法");
-        }
-        if (fsPatient.getPatientName().length()<2||fsPatient.getPatientName().length()>30||!fsPatient.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
-            throw new CustomException("就诊人名称不合法");
-        }
-        String birthDateString = idCardNumber.substring(6, 14);
-        LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
-        LocalDate currentDate = LocalDate.now();
-        int age = currentDate.getYear() - birthDate.getYear();
-        if (currentDate.getMonthValue() < birthDate.getMonthValue()
-                || (currentDate.getMonthValue() == birthDate.getMonthValue()
-                && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
-            age--;
-        }
-        if (age < 18) {
-            throw new CustomException("年龄必须大于18岁");
-        }
-        if (age > 200) {
-            throw new CustomException("年龄超过200岁");
-        }
-        Date birthday = fsPatient.getBirthday();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-        String formattedBirthday = sdf.format(birthday);
-        LocalDate da = LocalDate.parse(formattedBirthday, DateTimeFormatter.ofPattern("yyyyMMdd"));
-        LocalDate currentDate2 = LocalDate.now();
-        int age2 = currentDate2.getYear() - da.getYear();
-        if (currentDate2.getMonthValue() < da.getMonthValue()
-                || (currentDate2.getMonthValue() == da.getMonthValue()
-                && currentDate2.getDayOfMonth() < da.getDayOfMonth())) {
-            age2--;
-        }
-        if (age2 < 18) {
-            throw new CustomException("年龄必须大于18岁");
-        }
-        if (age2 > 200) {
-            throw new CustomException("年龄超过200岁");
-        }
-        return toAjax(fsPatientService.insertFsPatient(fsPatient));
-    }
-
-    /**
-     * 修改病人
-     */
-    @PreAuthorize("@ss.hasPermi('his:patient:edit')")
-    @Log(title = "病人", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody FsPatient fsPatient)
-    {
-
-        if (fsPatient.getMobile().contains("*")){
-            fsPatient.setMobile(null);
-        }
-        if (fsPatient.getIdCard().contains("*")){
-            fsPatient.setIdCard(null);
-        }else {
-            String idCardNumber = fsPatient.getIdCard();
-            if (idCardNumber == null || idCardNumber.length() != 18) {
+//        if (idCardNumber == null || idCardNumber.length() != 18) {
+//            throw new CustomException("身份证号码不合法");
+//        }
+//        String regex = "\\d{17}[0-9Xx]";
+//        if (!Pattern.matches(regex, idCardNumber)) {
+//            throw new CustomException("身份证号码不合法");
+//        }
+//        if (fsPatient.getPatientName().length()<2||fsPatient.getPatientName().length()>30||!fsPatient.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
+//            throw new CustomException("就诊人名称不合法");
+//        }
+//        String birthDateString = idCardNumber.substring(6, 14);
+//        LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
+//        LocalDate currentDate = LocalDate.now();
+//        int age = currentDate.getYear() - birthDate.getYear();
+//        if (currentDate.getMonthValue() < birthDate.getMonthValue()
+//                || (currentDate.getMonthValue() == birthDate.getMonthValue()
+//                && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
+//            age--;
+//        }
+//        if (age < 18) {
+//            throw new CustomException("年龄必须大于18岁");
+//        }
+//        if (age > 200) {
+//            throw new CustomException("年龄超过200岁");
+//        }
+        if (StringUtils.isNotBlank(idCardNumber)){
+            if ( idCardNumber.length() != 18) {
                 throw new CustomException("身份证号码不合法");
             }
             String regex = "\\d{17}[0-9Xx]";
@@ -209,8 +175,9 @@ public class FsPatientController extends BaseController
             if (age > 200) {
                 throw new CustomException("年龄超过200岁");
             }
-
-            Date birthday = fsPatient.getBirthday();
+        }
+        Date birthday = fsPatient.getBirthday();
+        if (birthday!=null){
             SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
             String formattedBirthday = sdf.format(birthday);
             LocalDate da = LocalDate.parse(formattedBirthday, DateTimeFormatter.ofPattern("yyyyMMdd"));
@@ -227,6 +194,75 @@ public class FsPatientController extends BaseController
             if (age2 > 200) {
                 throw new CustomException("年龄超过200岁");
             }
+        }
+
+        return toAjax(fsPatientService.insertFsPatient(fsPatient));
+    }
+
+    /**
+     * 修改病人
+     */
+    @PreAuthorize("@ss.hasPermi('his:patient:edit')")
+    @Log(title = "病人", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsPatient fsPatient)
+    {
+
+        if (fsPatient.getMobile()!=null && fsPatient.getMobile().contains("*")){
+            fsPatient.setMobile(null);
+        }
+        if (fsPatient.getIdCard()!=null && fsPatient.getIdCard().contains("*")){
+            fsPatient.setIdCard(null);
+        }else {
+            String idCardNumber = fsPatient.getIdCard();
+            if (StringUtils.isNotBlank(idCardNumber)){
+                if (idCardNumber.length() != 18) {
+                    throw new CustomException("身份证号码不合法");
+                }
+                String regex = "\\d{17}[0-9Xx]";
+                if (!Pattern.matches(regex, idCardNumber)) {
+                    throw new CustomException("身份证号码不合法");
+                }
+                if (fsPatient.getPatientName().length()<2||fsPatient.getPatientName().length()>30||!fsPatient.getPatientName().matches("^[\u4e00-\u9fa5]+$")) {
+                    throw new CustomException("就诊人名称不合法");
+                }
+                String birthDateString = idCardNumber.substring(6, 14);
+                LocalDate birthDate = LocalDate.parse(birthDateString, DateTimeFormatter.ofPattern("yyyyMMdd"));
+                LocalDate currentDate = LocalDate.now();
+                int age = currentDate.getYear() - birthDate.getYear();
+                if (currentDate.getMonthValue() < birthDate.getMonthValue()
+                        || (currentDate.getMonthValue() == birthDate.getMonthValue()
+                        && currentDate.getDayOfMonth() < birthDate.getDayOfMonth())) {
+                    age--;
+                }
+                if (age < 18) {
+                    throw new CustomException("年龄必须大于18岁");
+                }
+                if (age > 200) {
+                    throw new CustomException("年龄超过200岁");
+                }
+            }
+
+            Date birthday = fsPatient.getBirthday();
+            if (birthday!=null){
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+                String formattedBirthday = sdf.format(birthday);
+                LocalDate da = LocalDate.parse(formattedBirthday, DateTimeFormatter.ofPattern("yyyyMMdd"));
+                LocalDate currentDate2 = LocalDate.now();
+                int age2 = currentDate2.getYear() - da.getYear();
+                if (currentDate2.getMonthValue() < da.getMonthValue()
+                        || (currentDate2.getMonthValue() == da.getMonthValue()
+                        && currentDate2.getDayOfMonth() < da.getDayOfMonth())) {
+                    age2--;
+                }
+                if (age2 < 18) {
+                    throw new CustomException("年龄必须大于18岁");
+                }
+                if (age2 > 200) {
+                    throw new CustomException("年龄超过200岁");
+                }
+            }
+
 
 
         }

+ 28 - 4
fs-company/src/main/java/com/fs/user/FsUserAdminController.java

@@ -1,32 +1,36 @@
 package com.fs.user;
 
 import com.alibaba.fastjson.JSON;
+import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
 import com.fs.common.utils.ServletUtils;
 import com.fs.company.cache.ICompanyUserCacheService;
 import com.fs.framework.security.LoginUser;
 import com.fs.framework.service.TokenService;
 
+import com.fs.his.domain.FsUser;
 import com.fs.his.service.IFsUserService;
 import com.fs.qw.domain.CustomerTransferApproval;
 import com.fs.qw.dto.FsUserTransferParamDTO;
 import com.fs.qw.service.ICustomerTransferApprovalService;
 import com.fs.store.param.h5.FsUserPageListParam;
+import com.fs.store.vo.h5.FsUserPageListVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
 
+import static com.fs.his.utils.PhoneUtil.decryptAutoPhoneMk;
+
 @Api(tags = "会员管理接口")
 @RestController
 @Slf4j
@@ -99,5 +103,25 @@ public class FsUserAdminController extends BaseController {
         return R.ok("转移申请已经提交,等待转移成功!");
     }
 
+    /**
+     * 获取用户详细信息
+     */
+    @GetMapping(value = "/{userId}")
+    public AjaxResult getInfo(@PathVariable("userId") Long userId)
+    {
+        return AjaxResult.success(fsUserService.selectFsUserPageListVOByUserId(userId));
+    }
+
+    /**
+     * 修改用户
+     */
+    @PreAuthorize("@ss.hasPermi('user:fsUser:edit')")
+    @Log(title = "用户", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsUser fsUser)
+    {
+        return toAjax(fsUserService.updateFsUser(fsUser));
+    }
+
 
 }

+ 2 - 0
fs-service/src/main/java/com/fs/his/mapper/FsUserMapper.java

@@ -94,6 +94,8 @@ public interface FsUserMapper
             "            <if test=\"loginDevice != null  and loginDevice != ''\"> and f1.login_device = #{loginDevice}</if>\n" +
             "            <if test=\"sTime != null \">  and DATE(f1.create_time) &gt;= DATE(#{sTime})</if>\n" +
             "            <if test=\"eTime != null \">  and DATE(f1.create_time) &lt;= DATE(#{eTime})</if>\n" +
+            "            <if test=\"companyId != null \">and f1.company_id = #{companyId}</if>\n" +
+            "            <if test=\"companyUserId != null \">and f1.company_user_id = #{companyUserId}</if>\n" +
             "order by f1.user_id desc"+
             "</script>"})
     List<FsUserVO> selectFsUserListVO(FsUserParam fsUser);

+ 2 - 0
fs-service/src/main/java/com/fs/his/service/IFsUserService.java

@@ -171,4 +171,6 @@ public interface IFsUserService
     CompanyUserSummaryCountVO companyUserSummaryCount(Long userId, String companyUserId);
 
     ResponseResult<Boolean> becomeMember(@Valid FsUserCourseBeMemberParam param);
+
+    FsUserPageListVO selectFsUserPageListVOByUserId(Long userId);
 }

+ 5 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsPatientServiceImpl.java

@@ -2,6 +2,7 @@ package com.fs.his.service.impl;
 
 import java.util.List;
 import com.fs.common.utils.DateUtils;
+import com.fs.common.utils.StringUtils;
 import com.fs.his.param.FsPatientListDParam;
 import com.fs.his.vo.FsPatientListDVO;
 import com.fs.his.vo.FsPatientVO;
@@ -59,7 +60,10 @@ public class FsPatientServiceImpl implements IFsPatientService
     public int insertFsPatient(FsPatient fsPatient)
     {
         fsPatient.setCreateTime(DateUtils.getNowDate());
-        fsPatient.setMobile(encryptPhone(fsPatient.getMobile()));
+        String mobile = fsPatient.getMobile();
+        if (StringUtils.isNotBlank(mobile)){
+            fsPatient.setMobile(encryptPhone(mobile));
+        }
         return fsPatientMapper.insertFsPatient(fsPatient);
     }
 

+ 39 - 2
fs-service/src/main/java/com/fs/his/service/impl/FsUserServiceImpl.java

@@ -646,8 +646,12 @@ public class FsUserServiceImpl implements IFsUserService
                     item.setStopWatchDays(byUserId.getStopWatchDays());
                     item.setCompleteWatchDate(byUserId.getCompleteWatchDate());
                 }
-                String userTagByUserId = companyTagCacheService
-                        .findUserTagByUserId(item.getUserId(),item.getCompanyUserId());
+                String userTagByUserId = null;
+                if (item.getUserId()!=null && item.getCompanyUserId() != null){
+                    userTagByUserId = companyTagCacheService
+                            .findUserTagByUserId(item.getUserId(),item.getCompanyUserId());
+                }
+
                 if(StringUtils.isNotEmpty(userTagByUserId)) {
                     String[] split = userTagByUserId.split(",");
                     Set<String> tagNames = new HashSet<>();
@@ -986,6 +990,39 @@ public class FsUserServiceImpl implements IFsUserService
         return ResponseResult.ok(Boolean.TRUE);
     }
 
+    @Override
+    public FsUserPageListVO selectFsUserPageListVOByUserId(Long userId) {
+        FsUser fsUser = fsUserMapper.selectFsUserByUserId(userId);
+        FsUserPageListVO item = new FsUserPageListVO();
+        BeanUtils.copyProperties(fsUser, item);
+        item.setNickname(fsUser.getNickName());
+        Map<Long, CompanyTag> tagMap = companyTagCacheService.queryAllTagMap();
+        if(item.getPhone() != null) {
+            item.setPhone(ParseUtils.parsePhone(item.getPhone()));
+        }
+        String userTagByUserId = null;
+        if (item.getUserId()!=null && item.getCompanyUserId() != null){
+            userTagByUserId = companyTagCacheService
+                    .findUserTagByUserId(item.getUserId(),item.getCompanyUserId());
+        }
+        if(StringUtils.isNotEmpty(userTagByUserId)) {
+            String[] split = userTagByUserId.split(",");
+            Set<String> tagNames = new HashSet<>();
+            for (String tag : split) {
+                if(StringUtils.isNotBlank(tag)) {
+                    Long tagL = Long.parseLong(tag);
+                    CompanyTag companyTag = tagMap.get(tagL);
+                    if(companyTag != null) {
+                        tagNames.add(companyTag.getTag());
+                    }
+                }
+            }
+            item.setTagIds(userTagByUserId);
+            item.setTag(String.join(",",tagNames));
+        }
+        return item;
+    }
+
 
     private FsUserStatisticsVO getUserStatistics(UserStatisticsCommonParam param) {
         FsUserStatisticsVO fsUserStatisticsVO = new FsUserStatisticsVO();

+ 1 - 1
fs-service/src/main/java/com/fs/sop/params/SendSopParamDetailsC.java

@@ -22,6 +22,6 @@ public class SendSopParamDetailsC {
     /**
      * 是否使用插件
      */
-    private Integer isAuto;
+    private String isAuto;
 
 }

+ 2 - 1
fs-service/src/main/java/com/fs/sop/service/impl/QwSopLogsServiceImpl.java

@@ -743,7 +743,7 @@ public class QwSopLogsServiceImpl implements IQwSopLogsService
 
         // 封装消息体
         SendSopParamDetailsC sopParamDetailsC = new SendSopParamDetailsC();
-        sendDelayTime(sopParamDetailsC,param);
+//        sendDelayTime(sopParamDetailsC,param);
         // 使用线程安全的集合
         List<QwSopLogsDoSendListTVO> sendJsApiList = Collections.synchronizedList(new ArrayList<>());
         try {
@@ -796,6 +796,7 @@ public class QwSopLogsServiceImpl implements IQwSopLogsService
             Long qwId=qwUser.getId();
 
             sopParamDetailsC.setAppKey(qwUser.getAppKey());
+            sopParamDetailsC.setIsAuto(qwUser.getIsAuto());
 
             // 客户的信息
             QwExternalContactHParam contactHParam = new QwExternalContactHParam();

+ 6 - 0
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -338,6 +338,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null and phone != ''">
                 AND fs_user.phone = #{phone}
             </if>
+            <if test="companyId != null">
+                AND fs_user.company_id = #{companyId}
+            </if>
         </where>
         limit ${(pageNum-1)*pageSize},${pageSize}
     </select>
@@ -367,6 +370,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="phone != null and phone!=''">
                 AND fs_user.phone = #{phone}
             </if>
+            <if test="companyId != null">
+                AND fs_user.company_id = #{companyId}
+            </if>
         </where>
     </select>
     <update id="transferCompanyUser">