Browse Source

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

cs 2 years ago
parent
commit
281c625aca

+ 5 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserController.java

@@ -228,5 +228,10 @@ public class UserController {
         return userService.skipGuidance(request);
     }
 
+    @RequestMapping("/mobSkipGuidance")
+    public HttpRespMsg mobSkipGuidance(HttpServletRequest request){
+        return userService.mobSkipGuidance(request);
+    }
+
 }
 

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/User.java

@@ -21,7 +21,7 @@ import org.springframework.format.annotation.DateTimeFormat;
  * </p>
  *
  * @author Seyason
- * @since 2023-01-05
+ * @since 2023-01-16
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -264,6 +264,12 @@ public class User extends Model<User> {
     @TableField("is_first_login")
     private Integer isFirstLogin;
 
+    /**
+     * 0-否 1-是
+     */
+    @TableField("is_mob_first_login")
+    private Integer isMobFirstLogin;
+
 
     @Override
     protected Serializable pkVal() {

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/UserService.java

@@ -79,4 +79,6 @@ public interface UserService extends IService<User> {
     HttpRespMsg isManager(HttpServletRequest request) throws Exception;
 
     HttpRespMsg skipGuidance(HttpServletRequest request);
+
+    HttpRespMsg mobSkipGuidance(HttpServletRequest request);
 }

+ 6 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1830,7 +1830,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         } catch (Exception e) {
             e.printStackTrace();
         }
-        httpRespMsg.data =  pathPrefix + fileName+".xls";
+        httpRespMsg.data =  pathPrefix + fileName+".xlsx";
         return httpRespMsg;
     }
 
@@ -1941,7 +1941,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         } catch (Exception e) {
             e.printStackTrace();
         }
-        httpRespMsg.data =  pathPrefix + fileName+".xls";
+        httpRespMsg.data =  pathPrefix + fileName+".xlsx";
         return httpRespMsg;
     }
 
@@ -2033,7 +2033,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         } catch (Exception e) {
             e.printStackTrace();
         }
-        httpRespMsg.data =  pathPrefix + fileName+".xls";
+        httpRespMsg.data =  pathPrefix + fileName+".xlsx";
         return httpRespMsg;
     }
 
@@ -2154,7 +2154,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         } catch (Exception e) {
             e.printStackTrace();
         }
-        httpRespMsg.data =  pathPrefix + fileName+".xls";
+        httpRespMsg.data =  pathPrefix + fileName+".xlsx";
         return httpRespMsg;
     }
 
@@ -2227,7 +2227,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         } catch (Exception e) {
             e.printStackTrace();
         }
-        httpRespMsg.data =  pathPrefix + fileName+".xls";
+        httpRespMsg.data =  pathPrefix + fileName+".xlsx";
         return httpRespMsg;
     }
 
@@ -5612,7 +5612,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         } catch (Exception e) {
             e.printStackTrace();
         }
-        httpRespMsg.data =  pathPrefix + fileName+".xls";
+        httpRespMsg.data =  pathPrefix + fileName+".xlsx";
         return httpRespMsg;
     }
 

+ 12 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -465,6 +465,18 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         return msg;
     }
 
+    @Override
+    public HttpRespMsg mobSkipGuidance(HttpServletRequest request) {
+        HttpRespMsg msg=new HttpRespMsg();
+        User user= userMapper.selectById(request.getHeader("token"));
+        user.setIsMobFirstLogin(0);
+        if(userMapper.updateById(user)>0){
+            return msg;
+        }
+        msg.setError("验证失败");
+        return msg;
+    }
+
 
     public void setUserRoleMenu(UserVO user) {
         Integer roleId = user.getRoleId();

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserMapper.xml

@@ -42,6 +42,7 @@
         <result column="corpwx_deptid" property="corpwxDeptid" />
         <result column="corpwx_real_userid" property="corpwxRealUserid" />
         <result column="is_first_login" property="isFirstLogin" />
+        <result column="is_mob_first_login" property="isMobFirstLogin" />
     </resultMap>
     <resultMap id="BaseResultMap2" type="com.management.platform.entity.User">
         <id column="id" property="id" />
@@ -51,7 +52,7 @@
     </resultMap>
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost, month_cost, salary_type, manage_dept_id, color, is_active, wx_openid, role_id, role_name, cost_apply_date, dingding_userid, dingding_unionid, corpwx_userid, induction_date, inactive_date, position, report_status, superior_id, plate1, plate2, plate3, plate4, plate5, is_ops, job_number, corpwx_deptid, corpwx_real_userid, is_first_login
+        id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost, month_cost, salary_type, manage_dept_id, color, is_active, wx_openid, role_id, role_name, cost_apply_date, dingding_userid, dingding_unionid, corpwx_userid, induction_date, inactive_date, position, report_status, superior_id, plate1, plate2, plate3, plate4, plate5, is_ops, job_number, corpwx_deptid, corpwx_real_userid, is_first_login, is_mob_first_login
     </sql>
     <!--单独分页获取人员-->
     <select id="getUserByDepartment" resultType="java.util.Map">

+ 42 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -3,7 +3,7 @@
         <van-swipe class="my-swipe" :autoplay="3000" :height="200" indicator-color="white">
             <van-swipe-item v-for="(item, index) in images" :key="index" class="swipe-img">
                 <img :src="item"/>
-            </van-swipe-item>
+            </van-swipe-item> 
         </van-swipe>
         <van-grid :column-num="3">
             <van-grid-item v-for="(item,index) in routers" :key="index" :icon="item.icon" :text="item.name" 
@@ -25,6 +25,9 @@
 </template>
 <script>
     import Footer from "@/components/Footer";
+    import Vue from "vue";
+    import { ImagePreview } from "vant";
+    Vue.use(ImagePreview);
     export default {
         data() {
             return {
@@ -86,11 +89,47 @@
                     that.getAccountInfo(that.user.id);
                 }
             }
+            let userss = JSON.parse(localStorage.userInfo)
+            if(userss.isMobFirstLogin == 1 && userss.createTime[0] > '2022' && userss.roleName == '超级管理员') {
+                // 第一次登陆显示
+                this.previewPicture()
+            }
         },
         components: {
             Footer
         },
         methods: {
+            // 图片预览
+            previewPicture() {
+                let that = this
+                let arr = [
+                    'https://mobworktime.ttkuaiban.com/upload/b9cf863819924106a65255ccffae446d.png',
+                    'https://mobworktime.ttkuaiban.com/upload/65afcaed7ad84c51a309db69c888fe6c.png',
+                    'https://mobworktime.ttkuaiban.com/upload/3452d33a68bb4092b04147e5482fd0e9.png',
+                    'https://mobworktime.ttkuaiban.com/upload/af5b430f48b24b2683fb48a43deab98c.png'
+                ]
+                ImagePreview({
+                    images: arr,
+                    startPosition: 0,
+                    showIndicators: true,
+                    closeable: true,
+                    onClose() {
+                        that.previewPictureClose()
+                    },
+                });
+            },
+            // 处理关闭事件
+            previewPictureClose() {
+                this.$axios.post("/user/mobSkipGuidance", {
+                })
+                .then(res => {
+                    if(res.code == "ok") {
+                       let userss = JSON.parse(localStorage.userInfo)
+                       userss.isMobFirstLogin = 0
+                       localStorage.userInfo = JSON.stringify(userss);
+                    } 
+                }).catch(err=> {this.$toast.clear();});
+            },
             tokefu(){
                 wx.invoke('openThirdAppServiceChat', {
                     }, function(res) {
@@ -358,7 +397,8 @@
         },
         activated(){
             this.getMessage()
-        }
+        },
+        
     };
 </script>