Explorar o código

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Min hai 1 ano
pai
achega
8c2e16481f

+ 10 - 3
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -2258,7 +2258,8 @@ public class WeiXinCorpController {
                             //跳过非激活状态的员工
                             if (userInfoOb.getInteger("status") != 1) continue;
                             String userName = String.valueOf(userInfoOb.get("name"));
-                                String phone = String.valueOf(userInfoOb.get("phone"));
+                            String phone = String.valueOf(userInfoOb.get("phone"));
+
                             String openUserid = userInfoOb.getString("open_userid");
                             List<Integer> departments = (List<Integer>) userInfoOb.get("department");
                             Integer deptId = departments.get(0);
@@ -2423,6 +2424,8 @@ public class WeiXinCorpController {
                             String curUserid = userJson.getString("userid");
                             String openUserid = userJson.getString("open_userid");
                             int status = userJson.getIntValue("status");
+                            String gender = userJson.getString("gender");
+                            String mobile = userJson.getString("mobile");
                             if(status!=1){
                                 continue;
                             }
@@ -2440,6 +2443,8 @@ public class WeiXinCorpController {
                                     .setCorpwxRealUserid(curUserid)
                                     .setColor(ColorUtil.randomColor())
                                     .setJobNumber(curUserid)
+                                    .setGender(gender)
+                                    .setPhone(mobile)
                                     .setPassword(MD5Util.getPassword("000000"))
                                     .setCorpwxDeptid(departmentWx.getWxDeptid());
                             Integer max = Collections.max(departments);
@@ -2483,8 +2488,9 @@ public class WeiXinCorpController {
                                 //跳过非激活状态的员工
                                 if (userInfoOb.getInteger("status") != 1) continue;
                                 String userName = String.valueOf(userInfoOb.get("name"));
-//                                String phone = String.valueOf(userInfoOb.get("phone"));
+                                String mobile = userInfoOb.getString("mobile");
                                 String openUserid = userInfoOb.getString("open_userid");
+                                String gender = userInfoOb.getString("gender");
                                 List<Integer> departments = (List<Integer>) userInfoOb.get("department");
                                 Integer deptId = departments.get(0);
                                 User user=new User();
@@ -2506,7 +2512,8 @@ public class WeiXinCorpController {
                                     .setName(userName)
                                     .setRoleName(role.getRolename())
                                     .setRoleId(role.getId())
-//                                    .setPhone(phone)
+                                    .setGender(gender)
+                                    .setPhone(mobile)
                                     .setCorpwxRealUserid(corpWxuserid)
                                     .setColor(ColorUtil.randomColor())
                                     .setPassword(MD5Util.getPassword("000000"))

+ 1 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/SysRoleServiceImpl.java

@@ -100,7 +100,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
 
         List<SysModule> modules = sysModuleMapper.selectList(queryWrapper);
         if (modules.size() == 0) {
-            System.err.println("请先初始化sys_module和sys_function表");
+            System.err.println("ERROR: 请先初始化sys_module和sys_function表");
             return null;
         }
         QueryWrapper<SysFunction> functionQueryWrapper = new QueryWrapper<SysFunction>();

+ 3 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/resources/application-privatelew.yml

@@ -83,7 +83,7 @@ upload:
   path: /www/staticproject/leworkshop/upload/
 
 #私有化的企业微信corpId
-corpId: wwf11426cf618e1703
+corpId: wwf295c4f04cba0076
 
 ##actuator健康检查配置
 management:
@@ -101,6 +101,8 @@ management:
       enabled: false
 referer:
   refererDomain:
+    - localhost
+    - 192.168.1.218
     - workshop.njlew.com.cn
     - mobworkshop.njlew.com.cn
     - workshop.njlew.com.cn:16080

+ 6 - 2
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/login/index.vue

@@ -93,8 +93,12 @@
                 //     url = "http://worktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
                 // } 
 
-                var appId = "wwf11426cf618e1703";//私有化部署的企业CORPID
-                var url = "http://devworkshop.ttkuaiban.com/api/corpInsideWXAuth";//授权回调页面
+                // var appId = "wwf11426cf618e1703";//私有化部署的企业CORPID
+                // var url = "http://devworkshop.ttkuaiban.com/api/corpInsideWXAuth";//授权回调页面
+
+                //雷尔伟
+                var appId = "wwf295c4f04cba0076";//私有化部署的企业CORPID
+                var url = "http://workshop.njlew.com.cn:16080/api/corpInsideWXAuth";//授权回调页面
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=0#wechat_redirect";
                 window.location.href = weixinUrl;
             },

+ 13 - 43
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/Login.vue

@@ -17,14 +17,7 @@
                     <el-form-item class="login-button" style="width:100%;">
                         <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{ $t('login') }}</el-button>
                     </el-form-item>
-                    <div class="additional" v-if="wxHrefFlg">
-                        <el-divider content-position="center">或</el-divider>
-                    </div>
-                    <div class="externalLanding" v-if="wxHrefFlg">
-                        <div class="externalLanding_img" @click="wxworkCli()">
-                            <img src="../assets/image/qiyeweix.png" alt="">
-                        </div>
-                    </div>
+                    
                     <div class="toRegister">
                         <el-link type="primary" class="btn" style="float:left;" :underline="false">{{ $t('lian-xi-ke-fu') }}
                             <div class="service">
@@ -88,8 +81,6 @@
                 },
                 wxworkFlg: false,
                 bindingqywx: false,
-
-                wxHrefFlg: false,
                 appName: localStorage.appName,
                 appLogo: localStorage.appLogo,
             };
@@ -131,7 +122,6 @@
                 this.isCorpWX = true;
             } 
             let href = window.location.href;
-            this.wxHrefFlg = href.indexOf('//devworkshop.ttkuaiban.com') != '-1'
             if (this.isCorpWX) {
                 //企业微信环境下,尝试自动登录
                 //判断企业微信,是否存在授权
@@ -155,13 +145,8 @@
                 } else {
                     if (localStorage.userInfo != null) {
                         var user = JSON.parse(localStorage.userInfo);
-                        if (user.company.packageSimple == 1) {
-                            //简易模式,直接进入工时统计表
-                            this.$router.push({ path: '/simple' });
-                        } else {
-                            if(user.moduleList.length > 0) {
-                                this.$router.push({ path: user.moduleList[0].path })
-                            }
+                        if(user.moduleList.length > 0) {
+                            this.$router.push({ path: user.moduleList[0].path })
                         }
                     } else if (href.indexOf('errorMsg=') > 0) {
                         var errorMsg = href.split('errorMsg=')[1].split('#')[0];
@@ -187,13 +172,8 @@
                     this.loginByUserId(loginUserId, path);
                 } else if (localStorage.userInfo != null) {
                     var user = JSON.parse(localStorage.userInfo);
-                    if (user.company.packageSimple == 1) {
-                        //简易模式,直接进入工时统计表
-                        this.$router.push({ path: '/simple' });
-                    } else {
-                        if(user.moduleList.length > 0) {
-                            this.$router.push({ path: user.moduleList[0].path })
-                        }
+                    if(user.moduleList.length > 0) {
+                        this.$router.push({ path: user.moduleList[0].path })
                     }
                 } else {
                     if(href.indexOf("corpid") > 0) {
@@ -203,7 +183,6 @@
                         var jumpkey = '&jumpto=';
                         var url = location.href;
                         console.log('jumpto',location);
-                        // var url = "https://devworkshop.ttkuaiban.com/?corpid=$CORPID$&jumpto=/info/21#/index"
                         var that = this;
                         if (url.indexOf(key) > 0) {
                             var corpId = ''
@@ -267,21 +246,7 @@
                     });
                 });
             },
-            wxworkCli() {
-                // this.wxworkFlg = true
-                // this.$nextTick(()=>{
-                //     var obj = new WxLogin({
-                //         id: 'wxcode', // 登录页面显示二维码的容器id
-                //         appid: 'wwf11426cf618e1703', // 企业微信的CorpID,在企业微信管理端查看
-                //         redirect_uri: encodeURIComponent('http://localhost:10086/#/login'), // 重定向的地址,需要进行encode
-                //         usertype: 'member'
-                //     })
-                // })
-                var appId = "wwf11426cf618e1703";//企业微信第三方的SUIT ID
-                var url = "https://devworkshop.ttkuaiban.com/api/corpWXScanningAuth";//授权回调页面
-                var weixinUrl=`https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?appid=${appId}&redirect_uri=${url}&state=0&usertype=member`;
-                window.location.href = weixinUrl;
-            },
+            
             getStaffInfo() {
                 console.log('执行了没')
             },
@@ -311,8 +276,13 @@
             },
             
             tryAutoLogin() {
-                var appId = "wwf11426cf618e1703";//私有化部署的企业CORPID
-                var url = "http://devworkshop.ttkuaiban.com/api/corpInsideWXAuth";//授权回调页面
+                // var appId = "wwf11426cf618e1703";//私有化部署的企业CORPID
+                // var url = "http://devworkshop.ttkuaiban.com/api/corpInsideWXAuth";//授权回调页面
+
+                //雷尔伟的企业配置
+                var appId = "wwf295c4f04cba0076";//私有化部署的企业CORPID
+                var url = "http://workshop.njlew.com.cn:16080/api/corpInsideWXAuth";//授权回调页面
+
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
                 window.location.href = weixinUrl;
             },