zhangyuewww 3 yıl önce
ebeveyn
işleme
c41824ae30

+ 12 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/OpenServiceInfoController.java

@@ -2,11 +2,14 @@ package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
 import com.baomidou.mybatisplus.plugins.Page;
+import com.winsea.svc.base.base.entity.CommonCompany;
 import com.yh.saas.plugin.yiliangyiyun.entity.OpenServiceInfo;
 import com.yh.saas.plugin.yiliangyiyun.service.IOpenServiceInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 /**
  * <p>
  * 开通业务表 前端控制器
@@ -38,6 +41,14 @@ public class OpenServiceInfoController {
     public String addInfo(@RequestBody OpenServiceInfo openServiceInfo) {
         return iOpenServiceInfoService.addInfo(openServiceInfo);
     }
-
+    /**
+     * 查询当前人的公司
+     * @param phone
+     * @return
+     */
+    @GetMapping("/selectCommonCompany")
+    public List<CommonCompany> selectCommonCompany(String phone) {
+        return iOpenServiceInfoService.selectCommonCompany(phone);
+    }
 }
 

+ 9 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IOpenServiceInfoService.java

@@ -1,9 +1,12 @@
 package com.yh.saas.plugin.yiliangyiyun.service;
 
 import com.baomidou.mybatisplus.plugins.Page;
+import com.winsea.svc.base.base.entity.CommonCompany;
 import com.yh.saas.plugin.yiliangyiyun.entity.OpenServiceInfo;
 import com.baomidou.mybatisplus.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 开通业务表 服务类
@@ -24,5 +27,11 @@ public interface IOpenServiceInfoService extends IService<OpenServiceInfo> {
      * @param openServiceInfo
      */
     String addInfo(OpenServiceInfo openServiceInfo);
+    /**
+     * 查询当前人的公司
+     *
+     * @param phone
+     */
+    List<CommonCompany> selectCommonCompany(String phone);
 
 }

+ 26 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/OpenServiceInfoServiceImpl.java

@@ -2,13 +2,20 @@ package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.plugins.Page;
+import com.winsea.svc.base.base.entity.CommonCompany;
+import com.winsea.svc.base.base.entity.CommonStaff;
+import com.winsea.svc.base.base.service.ICommonCompanyService;
+import com.winsea.svc.base.base.service.ICommonStaffService;
 import com.yh.saas.common.support.util.IdGenerator;
 import com.yh.saas.plugin.yiliangyiyun.entity.OpenServiceInfo;
 import com.yh.saas.plugin.yiliangyiyun.mapper.OpenServiceInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IOpenServiceInfoService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -21,7 +28,10 @@ import java.util.List;
  */
 @Service
 public class OpenServiceInfoServiceImpl extends ServiceImpl<OpenServiceInfoMapper, OpenServiceInfo> implements IOpenServiceInfoService {
-
+    @Autowired
+    private ICommonStaffService commonStaffService;
+    @Autowired
+    private ICommonCompanyService commonCompanyService;
     /**
      * 开通业务列表
      * @param openServiceInfo
@@ -51,4 +61,19 @@ public class OpenServiceInfoServiceImpl extends ServiceImpl<OpenServiceInfoMappe
             return "NG";
         }
     }
+
+    @Override
+    public List<CommonCompany> selectCommonCompany(String phone) {
+        List temp=new ArrayList();
+        List<CommonStaff> commonStaffList=commonStaffService.selectList(new EntityWrapper<CommonStaff>()
+        .eq("staff_mobile_phone",phone));
+        if (CollectionUtils.isNotEmpty(commonStaffList)){
+            for (CommonStaff commonStaff:commonStaffList){
+                List<CommonCompany> commonCompanyList=commonCompanyService.selectList(new EntityWrapper<CommonCompany>()
+                        .eq("comp_id",commonStaff.getCompId()));
+                temp=commonCompanyList;
+            }
+        }
+        return temp;
+    }
 }

+ 3 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/IdentityAuthenticationInfoMapper.xml

@@ -14,7 +14,9 @@
         a.payee_name as payeeName,
         a.payee_number_card as payeeNumberCard,
         a.authentication_status_key as authenticationStatusKey,
-        case when a.delete_flag = '1' then '已删除' else a.authentication_status end as authenticationStatus,
+        case when a.delete_flag = '1' then '已删除'
+        when a.cover = '1' then '已覆盖'
+        else a.authentication_status end as authenticationStatus,
         a.cover ,
         a.customer_number_card as customerNumberCard,
         a.payee_address_url as payeeAddressUrl,