diff --git a/pom.xml b/pom.xml index 810ba83a..a30f192f 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,7 @@ 4.0.6.B 4.0.6.B 2.14.2 + 5.8.20 diff --git a/yanzhu-common/yanzhu-common-core/pom.xml b/yanzhu-common/yanzhu-common-core/pom.xml index 0d5885d0..474002f4 100644 --- a/yanzhu-common/yanzhu-common-core/pom.xml +++ b/yanzhu-common/yanzhu-common-core/pom.xml @@ -136,5 +136,12 @@ weixin-java-miniapp + + + cn.hutool + hutool-core + ${hutool.version} + + diff --git a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/ApproveStatus.java b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/ApproveStatus.java index 392113d7..4bfeb749 100644 --- a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/ApproveStatus.java +++ b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/ApproveStatus.java @@ -5,6 +5,7 @@ package com.yanzhu.common.core.enums; */ public enum ApproveStatus { + await(0L, "待提交"), check(10L, "审核中"), refuse(11L, "审核驳回"), exempt(100L, "审核通过"), diff --git a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/DataSourceEnuns.java b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/DataSourceEnuns.java new file mode 100644 index 00000000..0d5e8993 --- /dev/null +++ b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/DataSourceEnuns.java @@ -0,0 +1,30 @@ +package com.yanzhu.common.core.enums; + +/** + * 数据来源 + */ +public enum DataSourceEnuns { + + APP("1", "小程序数据"), + WEB("2", "客户端数据"); + + private final String code; + private final String info; + + DataSourceEnuns(String code, String info) + { + this.code = code; + this.info = info; + } + + public String getCode() + { + return code; + } + + public String getInfo() + { + return info; + } + +} diff --git a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/ShiFouEnums.java b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/ShiFouEnums.java new file mode 100644 index 00000000..95dfb544 --- /dev/null +++ b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/ShiFouEnums.java @@ -0,0 +1,37 @@ +package com.yanzhu.common.core.enums; + +/** + * 是否枚举... + */ +public enum ShiFouEnums { + + FOU(0L, "0", "否"), + SHI(1L, "1", "是"); + + private final Long code; + private final String codeStr; + private final String info; + + ShiFouEnums(Long code, String codeStr, String info) + { + this.code = code; + this.codeStr = codeStr; + this.info = info; + } + + public Long getCode() + { + return code; + } + + public String getCodeStr() + { + return codeStr; + } + + public String getInfo() + { + return info; + } + +} diff --git a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/utils/file/FileUtils.java b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/utils/file/FileUtils.java index ef00c7db..dc292e2b 100644 --- a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/utils/file/FileUtils.java +++ b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/utils/file/FileUtils.java @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.yanzhu.common.core.utils.StringUtils; +import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.ArrayUtils; /** @@ -247,6 +248,15 @@ public class FileUtils response.setHeader("download-filename", percentEncodedFileName); } + /** + * 获取图谱真实映射路径 + * @param fileName + * @return + */ + public static String getFileExt(String fileName){ + return FilenameUtils.getExtension(fileName); + } + /** * 百分号编码工具方法 * diff --git a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/web/domain/BaseEntity.java b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/web/domain/BaseEntity.java index 4683bd09..710bbf43 100644 --- a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/web/domain/BaseEntity.java +++ b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/web/domain/BaseEntity.java @@ -4,9 +4,12 @@ import java.io.Serializable; import java.util.Date; import java.util.HashMap; import java.util.Map; +import java.util.Objects; + import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; +import com.yanzhu.common.core.enums.DataSourceEnuns; /** * Entity基类 @@ -56,6 +59,9 @@ public class BaseEntity implements Serializable /** 选中页签 */ private Long currentUserId; + /** 数据来源 */ + private String dataSource; + /** 请求参数 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) private Map params; @@ -181,4 +187,12 @@ public class BaseEntity implements Serializable public void setActiveProjectName(String activeProjectName) { this.activeProjectName = activeProjectName; } + + public String getDataSource() { + return Objects.isNull(dataSource)? DataSourceEnuns.WEB.getCode():dataSource; + } + + public void setDataSource(String dataSource) { + this.dataSource = dataSource; + } } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusExamUser.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusExamUser.java index 42b6d9c2..292efd38 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusExamUser.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusExamUser.java @@ -75,6 +75,14 @@ public class BusExamUser extends BaseEntity @Excel(name = "判断题数量") private String estimateNum; + /** 用户分数 */ + @Excel(name = "用户分数") + private Long fullMark; + + /** 用户分数 */ + @Excel(name = "用户分数") + private Long passMark; + /** 用户分数 */ @Excel(name = "用户分数") private Long userMark; @@ -227,7 +235,24 @@ public class BusExamUser extends BaseEntity { return estimateNum; } - public void setUserMark(Long userMark) + + public Long getFullMark() { + return fullMark; + } + + public void setFullMark(Long fullMark) { + this.fullMark = fullMark; + } + + public Long getPassMark() { + return passMark; + } + + public void setPassMark(Long passMark) { + this.passMark = passMark; + } + + public void setUserMark(Long userMark) { this.userMark = userMark; } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusExamUserResult.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusExamUserResult.java index a2fd8c53..cf5e5cac 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusExamUserResult.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusExamUserResult.java @@ -49,6 +49,10 @@ public class BusExamUserResult extends BaseEntity @Excel(name = "答题结果") private String useRes; + /** 问题分数 */ + @Excel(name = "问题分数") + private String mark; + /** 答题得分 */ @Excel(name = "答题得分") private String useMark; @@ -133,7 +137,16 @@ public class BusExamUserResult extends BaseEntity { return useRes; } - public void setUseMark(String useMark) + + public String getMark() { + return mark; + } + + public void setMark(String mark) { + this.mark = mark; + } + + public void setUseMark(String useMark) { this.useMark = useMark; } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideoUser.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideoUser.java index 7cc0d8a6..7990d188 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideoUser.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/BusTrainingVideoUser.java @@ -1,10 +1,13 @@ package com.yanzhu.manage.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import com.yanzhu.common.core.annotation.Excel; import com.yanzhu.common.core.web.domain.BaseEntity; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import java.util.Date; + /** * 用户培训视频对象 bus_training_video_user * @@ -48,10 +51,19 @@ public class BusTrainingVideoUser extends BaseEntity @Excel(name = "视频主键") private Long videoId; + /** 播放时长 */ + @Excel(name = "播放时长") + private String playTimes; + /** 播放状态 */ @Excel(name = "播放状态") private Long playStatus; + /** 播放时间 */ + @Excel(name = "播放时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date playDates; + /** 排序 */ @Excel(name = "排序") private Long sortBy; @@ -225,6 +237,22 @@ public class BusTrainingVideoUser extends BaseEntity this.trainFileImage = trainFileImage; } + public String getPlayTimes() { + return playTimes; + } + + public void setPlayTimes(String playTimes) { + this.playTimes = playTimes; + } + + public Date getPlayDates() { + return playDates; + } + + public void setPlayDates(Date playDates) { + this.playDates = playDates; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSubdepts.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSubdepts.java index ac11d50a..8d785c57 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSubdepts.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSubdepts.java @@ -83,6 +83,16 @@ public class ProProjectInfoSubdepts extends BaseEntity @Excel(name = "进场时间") private Date useDates; + /** 进场时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "进场时间") + private Date startWorkDates; + + /** 进场时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "进场时间") + private Date endWorkDates; + /** 进场状态 */ @Excel(name = "进场状态") private String useStatus; @@ -106,6 +116,11 @@ public class ProProjectInfoSubdepts extends BaseEntity /** 委托人半身照片 */ private String leaderUserPicture; + /** + * 用户信息 + */ + private ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers; + public void setId(Long id) { this.id = id; @@ -315,6 +330,30 @@ public class ProProjectInfoSubdepts extends BaseEntity this.leaderUserPicture = leaderUserPicture; } + public Date getStartWorkDates() { + return startWorkDates; + } + + public void setStartWorkDates(Date startWorkDates) { + this.startWorkDates = startWorkDates; + } + + public Date getEndWorkDates() { + return endWorkDates; + } + + public void setEndWorkDates(Date endWorkDates) { + this.endWorkDates = endWorkDates; + } + + public ProProjectInfoSubdeptsUsers getProProjectInfoSubdeptsUsers() { + return proProjectInfoSubdeptsUsers; + } + + public void setProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers) { + this.proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsers; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSubdeptsUsers.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSubdeptsUsers.java index a1dde3ee..3ea2d53f 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSubdeptsUsers.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProProjectInfoSubdeptsUsers.java @@ -19,7 +19,6 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity { private static final long serialVersionUID = 1L; - @Excel(name = "所属项目") private String projectName; /** 分包单位名称 */ @@ -56,8 +55,6 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity private String subDeptType; - - /** 用户主键 */ private Long userId; @@ -81,6 +78,10 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity @Excel(name = "工种岗位") private String craftPostName; + /** 委托书 */ + @Excel(name = "委托书") + private String subDeptPowerPath; + @Excel(name = "状态") private String enterState; /** 学习状态 */ @@ -130,6 +131,11 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity private Long supIllnessStatus; + private String phoneNumber; + + /** 劳务人员学历 */ + private String degreeGrade; + public String getEnterState() { return enterState; } @@ -416,6 +422,30 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity this.projectName = projectName; } + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public String getDegreeGrade() { + return degreeGrade; + } + + public void setDegreeGrade(String degreeGrade) { + this.degreeGrade = degreeGrade; + } + + public String getSubDeptPowerPath() { + return subDeptPowerPath; + } + + public void setSubDeptPowerPath(String subDeptPowerPath) { + this.subDeptPowerPath = subDeptPowerPath; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamUserMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamUserMapper.java index 3ef481e2..e81c8cab 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamUserMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusExamUserMapper.java @@ -77,6 +77,13 @@ public interface BusExamUserMapper */ public int batchBusExamUserResult(List busExamUserResultList); + /** + * 批量新增用户试卷结果 + * + * @param examUserId 用户试卷主键 + * @return 结果 + */ + public List selectBusExamUserResultByExamUserId(Long examUserId); /** * 通过用户试卷主键删除用户试卷结果信息 @@ -85,4 +92,11 @@ public interface BusExamUserMapper * @return 结果 */ public int deleteBusExamUserResultByExamUserId(Long id); + + /** + * 修改用户答题结果 + * @param busExamUserResult + * @return + */ + public int updateBusExamUserResult(BusExamUserResult busExamUserResult); } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoMapper.java index 2333026f..ca247ccb 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoMapper.java @@ -29,6 +29,14 @@ public interface BusTrainingVideoMapper */ public List selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo); + /** + * 查询培训视频列表 + * + * @param busTrainingVideo 培训视频 + * @return 培训视频集合 + */ + public List> selectBusTrainingVideoListGroup(BusTrainingVideo busTrainingVideo); + /** * 统计培训视频列表 * diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoUserMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoUserMapper.java index c0a0409d..2a6b189c 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoUserMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/BusTrainingVideoUserMapper.java @@ -1,6 +1,7 @@ package com.yanzhu.manage.mapper; import com.yanzhu.manage.domain.BusTrainingVideoUser; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -52,6 +53,15 @@ public interface BusTrainingVideoUserMapper */ public int deleteBusTrainingVideoUserById(Long id); + /** + * 删除用户培训视频 + * + * @param proId 项目主键 + * @param userId 用户主键 + * @return 结果 + */ + public int deleteBusTrainingVideoUserByParams(@Param("proId")Long proId, @Param("userId")Long userId); + /** * 批量删除用户培训视频 * @@ -59,4 +69,12 @@ public interface BusTrainingVideoUserMapper * @return 结果 */ public int deleteBusTrainingVideoUserByIds(Long[] ids); + + /** + * 批量新增用户培训视频 + * + * @param busTrainingVideoUserList 培训视频列表 + * @return 结果 + */ + public int batchBusTrainingVideoUser(List busTrainingVideoUserList); } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java index fa65c709..9be759bd 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java @@ -2,6 +2,7 @@ package com.yanzhu.manage.mapper; import java.util.List; import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; +import org.apache.ibatis.annotations.Param; /** * 分包单位工人Mapper接口 @@ -19,6 +20,15 @@ public interface ProProjectInfoSubdeptsUsersMapper */ public ProProjectInfoSubdeptsUsers selectProProjectInfoSubdeptsUsersById(Long id); + /** + * 查询分包单位工人 + * + * @param proId 项目主键 + * @param userId 工人主键 + * @return 分包单位工人 + */ + public ProProjectInfoSubdeptsUsers selectProProjectInfoSubdeptsUsersByParamId(@Param("proId")Long proId, @Param("userId")Long userId); + /** * 查询分包单位工人列表 * diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserMapper.xml index 6b81e86d..36c4f0a7 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusExamUserMapper.xml @@ -20,6 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -35,6 +37,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + + + + + + @@ -45,11 +61,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - select beu.id, beu.com_id, sd.dept_name as com_name, beu.project_id, pi.project_name, beu.user_id, su.nick_name as user_nick, su.user_name, beu.exam_title, beu.exam_type, beu.craft_type, beu.craft_post, beu.single_num, beu.multiple_num, beu.estimate_num, beu.user_mark, beu.res_status, beu.use_times, beu.is_del, beu.create_by, beu.create_time, beu.update_by, beu.update_time, beu.remark from bus_exam_user beu + select beu.id, beu.com_id, sd.dept_name as com_name, beu.project_id, pi.project_name, beu.user_id, su.nick_name as user_nick, su.user_name, beu.exam_title, beu.exam_type, beu.craft_type, beu.craft_post, beu.single_num, beu.multiple_num, beu.estimate_num, beu.full_mark, beu.pass_mark, beu.user_mark, beu.res_status, beu.use_times, beu.is_del, beu.create_by, beu.create_time, beu.update_by, beu.update_time, beu.remark from bus_exam_user beu left join pro_project_info pi on pi.id = beu.project_id left join sys_dept sd on sd.dept_id = pi.com_id left join sys_user su on su.user_id = beu.user_id @@ -78,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + select * from bus_exam_user_result where exam_user_id = #{examUserId} + + + + update bus_exam_user_result + + user_answer = #{userAnswer}, + use_res = #{useRes}, + use_mark = #{useMark}, + + where id = #{id} + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoMapper.xml index d6d93a5f..69ee173c 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/BusTrainingVideoMapper.xml @@ -55,6 +55,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by btv.id desc + + @@ -67,7 +68,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" project_id, user_id, video_id, + play_times, play_status, + play_dates, sort_by, is_del, create_by, @@ -81,7 +84,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{projectId}, #{userId}, #{videoId}, + #{playTimes}, #{playStatus}, + #{playDates}, #{sortBy}, #{isDel}, #{createBy}, @@ -99,7 +104,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" project_id = #{projectId}, user_id = #{userId}, video_id = #{videoId}, + play_times = #{playTimes}, play_status = #{playStatus}, + play_dates = #{playDates}, sort_by = #{sortBy}, is_del = #{isDel}, create_by = #{createBy}, @@ -115,10 +122,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update bus_training_video_user set is_del=2 where id = #{id} + + delete from bus_training_video_user where project_id = #{proId} and user_id = #{userId} + + update bus_training_video_user set is_del=2 where id in #{id} + + + insert into bus_training_video_user( id, com_id, project_id, user_id, video_id, play_times, play_status, play_dates, sort_by, is_del, create_by, create_time, update_by, update_time, remark) values + + ( #{item.id}, #{item.comId}, #{item.projectId}, #{item.userId}, #{item.videoId}, #{item.playTimes}, #{item.playStatus}, #{item.playDates}, #{item.sortBy}, #{item.isDel}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}) + + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsMapper.xml index 1dc044b3..3950f568 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsMapper.xml @@ -17,11 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + @@ -34,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select ps.id, ps.com_id, sd.dept_name as com_name, ps.project_id, pi.project_name, ps.sub_dept_type, ps.sub_dept_name, ps.sub_dept_code, ps.sub_dept_leader_id, ps.sub_dept_leader_name, ps.sub_dept_leader_code, ps.sub_dept_leader_phone, ps.sub_dept_leader_power_path, ps.business_license_path, ps.sub_dept_infos, ps.contract_infos, ps.use_dates, ps.use_status, ps.approve_status, ps.qr_code, ps.is_del, ps.create_by, ps.create_time, ps.update_by, ps.update_time, ps.remark from pro_project_info_subdepts ps + select ps.id, ps.com_id, sd.dept_name as com_name, ps.project_id, pi.project_name, ps.sub_dept_type, ps.sub_dept_name, ps.sub_dept_code, ps.sub_dept_leader_id, ps.sub_dept_leader_name, ps.sub_dept_leader_code, ps.sub_dept_leader_phone, ps.business_license_path, ps.sub_dept_infos, ps.contract_infos, ps.use_dates, ps.start_work_dates, ps.end_work_dates, ps.use_status, ps.approve_status, ps.qr_code, ps.is_del, ps.create_by, ps.create_time, ps.update_by, ps.update_time, ps.remark from pro_project_info_subdepts ps left join pro_project_info pi on pi.id = ps.project_id left join sys_dept sd on sd.dept_id = pi.com_id @@ -53,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ps.sub_dept_code = #{subDeptCode} and ps.use_status = #{useStatus} and ps.approve_status = #{approveStatus} + and ps.sub_dept_leader_phone = #{subDeptLeaderPhone} order by ps.id desc @@ -74,11 +76,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sub_dept_leader_name, sub_dept_leader_code, sub_dept_leader_phone, - sub_dept_leader_power_path, business_license_path, sub_dept_infos, contract_infos, use_dates, + start_work_dates, + end_work_dates, use_status, approve_status, qr_code, @@ -99,11 +102,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{subDeptLeaderName}, #{subDeptLeaderCode}, #{subDeptLeaderPhone}, - #{subDeptLeaderPowerPath}, #{businessLicensePath}, #{subDeptInfos}, #{contractInfos}, #{useDates}, + #{startWorkDates}, + #{endWorkDates}, #{useStatus}, #{approveStatus}, #{qrCode}, @@ -128,11 +132,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sub_dept_leader_name = #{subDeptLeaderName}, sub_dept_leader_code = #{subDeptLeaderCode}, sub_dept_leader_phone = #{subDeptLeaderPhone}, - sub_dept_leader_power_path = #{subDeptLeaderPowerPath}, business_license_path = #{businessLicensePath}, sub_dept_infos = #{subDeptInfos}, contract_infos = #{contractInfos}, use_dates = #{useDates}, + start_work_dates = #{startWorkDates}, + end_work_dates = #{endWorkDates}, use_status = #{useStatus}, approve_status = #{approveStatus}, qr_code = #{qrCode}, diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml index 451add76..211a6b1a 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml @@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -37,8 +38,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -61,19 +64,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - SELECT pi.project_name, psu.id, psu.com_id, psu.project_id, psu.sub_dept_id, psu.sub_dept_type, psu.sub_dept_name, psu.user_id, psu.sub_dept_group, + SELECT pi.project_name, psu.id, psu.com_id, psu.project_id, psu.sub_dept_id, psu.sub_dept_type, psu.sub_dept_name, psu.sub_dept_power_path, psu.user_id, psu.sub_dept_group, psu.sub_dept_group_name, psu.craft_type, psu.craft_post, psu.edu_status, psu.edu_file_path, psu.edu_sign_path, psu.edu_date, psu.approve_status, psu.use_status, psu.sub_step, psu.illness_status, psu.sup_illness_status, psu.is_del, psu.create_by, psu.create_time, psu.update_by, psu.update_time, - psu.remark,su.`user_name`,su.`nick_name`,su.`user_type`,su.`card_type`,su.`card_code`,su.admitGuid,su.admitGuid usAdmitGuid, + psu.remark, psu.degree_grade, su.`user_name`,su.`nick_name`,su.`user_type`,su.`card_type`,su.`card_code`,su.admitGuid,su.admitGuid usAdmitGuid, dic1.dict_label craft_type_name,dic2.dict_label craft_post_name,psu.enter_state,sd.dept_name comName, su.`user_picture`, su.`card_img_inv`,su.`card_img_pos`,su.`user_infos`,su.`email`,su.`phonenumber`,su.`sex`,su.`avatar`,su.`login_ip`,su.`login_date` FROM pro_project_info_subdepts_users psu LEFT JOIN sys_user su ON psu.user_id=su.user_id - LEFT JOIN pro_project_info PI ON pi.id = psu.project_id + LEFT JOIN pro_project_info pi ON pi.id = psu.project_id LEFT JOIN sys_dept sd ON sd.dept_id = pi.com_id LEFT JOIN sys_dict_data dic1 ON psu.`craft_type`=dic1.`dict_value` AND dic1.`dict_type`='pro_craft_type' LEFT JOIN sys_dict_data dic2 ON psu.`craft_post`=dic2.`dict_value` AND dic2.`dict_type`='pro_craft_post' - - + + + insert into pro_project_info_subdepts_users @@ -118,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sub_dept_id, sub_dept_type, sub_dept_name, + sub_dept_power_path, user_id, sub_dept_group, sub_dept_group_name, @@ -139,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by, update_time, remark, + degree_grade, #{comId}, @@ -146,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{subDeptId}, #{subDeptType}, #{subDeptName}, + #{subDeptPowerPath}, #{userId}, #{subDeptGroup}, #{subDeptGroupName}, @@ -167,6 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateBy}, #{updateTime}, #{remark}, + #{degreeGrade}, @@ -178,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sub_dept_id = #{subDeptId}, sub_dept_type = #{subDeptType}, sub_dept_name = #{subDeptName}, + sub_dept_power_path = #{subDeptPowerPath}, user_id = #{userId}, sub_dept_group = #{subDeptGroup}, sub_dept_group_name = #{subDeptGroupName}, @@ -199,6 +213,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, + degree_grade = #{degreeGrade}, where id = #{id} diff --git a/yanzhu-gateway/src/main/java/com/yanzhu/gateway/handler/GatewayExceptionHandler.java b/yanzhu-gateway/src/main/java/com/yanzhu/gateway/handler/GatewayExceptionHandler.java index 9414062d..a72a213e 100644 --- a/yanzhu-gateway/src/main/java/com/yanzhu/gateway/handler/GatewayExceptionHandler.java +++ b/yanzhu-gateway/src/main/java/com/yanzhu/gateway/handler/GatewayExceptionHandler.java @@ -26,6 +26,8 @@ public class GatewayExceptionHandler implements ErrorWebExceptionHandler @Override public Mono handle(ServerWebExchange exchange, Throwable ex) { + log.info("[网关处理]请求路径:{}",exchange.getRequest().getPath()); + ServerHttpResponse response = exchange.getResponse(); if (exchange.getResponse().isCommitted()) diff --git a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/controller/SysFileController.java b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/controller/SysFileController.java index 6f66c6bd..33727d4a 100644 --- a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/controller/SysFileController.java +++ b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/controller/SysFileController.java @@ -46,6 +46,28 @@ public class SysFileController } } + /** + * 文件上传请求 + */ + @PostMapping("/NoSecurity/upload") + public R noSecurityUpload(MultipartFile file) + { + try + { + // 上传并返回访问地址 + String url = sysFileService.uploadFile(file); + SysFile sysFile = new SysFile(); + sysFile.setName(FileUtils.getName(url)); + sysFile.setUrl(url); + return R.ok(sysFile); + } + catch (Exception e) + { + log.error("上传文件失败", e); + return R.fail(e.getMessage()); + } + } + /** * 文件上传请求 */ diff --git a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/utils/FileUploadUtils.java b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/utils/FileUploadUtils.java index 0dd1649e..c00610e5 100644 --- a/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/utils/FileUploadUtils.java +++ b/yanzhu-modules/yanzhu-file/src/main/java/com/yanzhu/file/utils/FileUploadUtils.java @@ -3,8 +3,12 @@ package com.yanzhu.file.utils; import java.io.File; import java.io.IOException; import java.nio.file.Paths; +import java.util.Arrays; import java.util.Objects; +import cn.hutool.core.img.ImgUtil; +import cn.hutool.core.io.FileUtil; +import com.yanzhu.common.core.utils.file.FileUtils; import com.yanzhu.common.core.utils.file.ImageUtils; import org.apache.commons.io.FilenameUtils; import org.springframework.web.multipart.MultipartFile; @@ -82,10 +86,35 @@ public class FileUploadUtils String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath(); file.transferTo(Paths.get(absPath)); - + // 压缩图片 + makeMiniImage(absPath); return getPathFileName(fileName); } + /** + * 图谱压缩 xx.min.jpg + * @param absPath + */ + private static void makeMiniImage(String absPath) { + try { + String ext = FileUtils.getFileExt(absPath).toLowerCase(); + String exts = Arrays.toString(new String[]{"jpg", "jpeg", "png", "bmp"}); + if (exts.contains(ext)) { + if (new File(absPath).exists()) { + int w = ImgUtil.read(FileUtil.file(absPath)).getWidth(); + if(w>2000) { + ImgUtil.scale(FileUtil.file(absPath), + FileUtil.file(absPath), (float) (2000.0 / w)); + } + ImgUtil.scale(FileUtil.file(absPath), + FileUtil.file(absPath + ".min.jpg"), (float) (300.0 / w)); + } + } + }catch (Exception ex){ + ex.printStackTrace(); + } + } + /** * 编码文件名 */ diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoController.java index 557d128f..f57f2dc9 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoController.java @@ -126,4 +126,5 @@ public class ProProjectInfoController extends BaseController List list = proProjectInfoService.selectProProjectInfoList(proProjectInfo); return getDataTable(list); } + } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java new file mode 100644 index 00000000..3f5a0c40 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/wechat/WxController.java @@ -0,0 +1,159 @@ +package com.yanzhu.manage.controller.wechat; + +import com.yanzhu.common.core.web.controller.BaseController; +import com.yanzhu.common.core.web.domain.AjaxResult; +import com.yanzhu.manage.domain.BusExamUser; +import com.yanzhu.manage.domain.ProProjectInfoSubdepts; +import com.yanzhu.manage.domain.SignetFileVo; +import com.yanzhu.manage.service.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Objects; + +/** + * 项目信息Controller + * + * @author JiangYuQi + * @date 2024-08-25 + */ +@RestController +@RequestMapping("/wxApi") +public class WxController extends BaseController { + + @Autowired + private IBusExamUserService busExamUserService; + + @Autowired + private IBusTrainingVideoService busTrainingVideoService; + + @Autowired + private IBusTrainingVideoUserService busTrainingVideoUserService; + + @Autowired + private IProProjectInfoService proProjectInfoService; + + @Autowired + private IProProjectInfoSubdeptsService proProjectInfoSubdeptsService; + + @Autowired + private IProProjectInfoSubdeptsUsersService proProjectInfoSubdeptsUsersService; + + /** + * 获取我的项目列表 + */ + @GetMapping("/findProject/{id}") + public AjaxResult findProject(@PathVariable("id") Long id) + { + return success(proProjectInfoService.selectProProjectInfoById(id)); + } + + /** + * 新增分包单位 + */ + @PostMapping("/registerSubDepts") + public AjaxResult registerSubDepts(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts) + { + int res; + if(Objects.isNull(proProjectInfoSubdepts.getId())){ + res = proProjectInfoSubdeptsService.insertProProjectInfoSubdepts(proProjectInfoSubdepts); + }else{ + res = proProjectInfoSubdeptsService.updateProProjectInfoSubdepts(proProjectInfoSubdepts); + } + return toAjax(res); + } + + /** + * 查询分包单位信息 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + */ + @GetMapping("/findProSubDeptsInfo") + public AjaxResult findProSubDeptsInfo(Long proId, String phoneNumber) + { + return success(proProjectInfoSubdeptsService.findProSubDeptsInfo(proId,phoneNumber)); + } + + /** + * 查询分包人员信息 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + */ + @GetMapping("/findProSubDeptsUser") + public AjaxResult findProSubDeptsUser(Long proId, String phoneNumber) + { + return success(proProjectInfoSubdeptsUsersService.findProSubDeptsUser(proId,phoneNumber)); + } + + /** + * 查询业务学习视频列表 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + */ + @GetMapping("/findBusTrainingVideos") + public AjaxResult findBusTrainingVideos(Long proId, String phoneNumber) + { + return success(busTrainingVideoService.findBusTrainingVideos(proId,phoneNumber)); + } + + /** + * 开始播放用户培训视频 + */ + @GetMapping("/startPlayUserEduVideo/{id}") + public AjaxResult startPlayUserEduVideo(@PathVariable("id")Long id) + { + busTrainingVideoUserService.startPlayUserEduVideo(id); + return success(); + } + + /** + * 结束播放用户培训视频 + */ + @GetMapping("/endPlayUserEduVideo/{id}") + public AjaxResult endPlayUserEduVideo(@PathVariable("id")Long id) + { + busTrainingVideoUserService.endPlayUserEduVideo(id); + return success(); + } + + /** + * 用户完成学习视频 + */ + @GetMapping("/finishEduVideo/{id}") + public AjaxResult finishEduVideo(@PathVariable("id")Long id) + { + busTrainingVideoUserService.finishEduVideo(id); + return success(); + } + + /** + * 查询业务考试试卷列表 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + */ + @GetMapping("/findBusExamInfos") + public AjaxResult findBusExamInfos(Long proId, String phoneNumber) + { + return success(busExamUserService.insertBusExamUser(proId,phoneNumber)); + } + + /** + * 提交试卷 + * @param busExamUser 项目信息 + */ + @PostMapping("/submitBusExamUser") + public AjaxResult submitBusExamUser(@RequestBody BusExamUser busExamUser) + { + return success(busExamUserService.submitBusExamUser(busExamUser)); + } + + /** + * 确认签署承诺书 + * @param signetFileVo 签署信息 + */ + @PostMapping("/submitUserSignets") + public AjaxResult submitUserSignets(@RequestBody SignetFileVo signetFileVo) + { + return success(proProjectInfoSubdeptsUsersService.submitUserSignets(signetFileVo)); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/SignetFileVo.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/SignetFileVo.java new file mode 100644 index 00000000..1c41da1d --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/SignetFileVo.java @@ -0,0 +1,31 @@ +package com.yanzhu.manage.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * 签署文件对象 + */ +@ApiModel(description = "签署文件") +@Data +public class SignetFileVo { + + @ApiModelProperty("项目主键") + @NotNull(message = "项目主键不能为空") + private Long proId; + + @ApiModelProperty("联系电话") + @NotNull(message = "联系电话不能为空") + private String userPhone; + + @ApiModelProperty("图片") + private String imgBase64; + + @ApiModelProperty("图片地址") + @NotBlank(message = "图片地址不能为空") + private String imgPath; +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/VideoMenuVo.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/VideoMenuVo.java new file mode 100644 index 00000000..c4d36799 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/domain/VideoMenuVo.java @@ -0,0 +1,27 @@ +package com.yanzhu.manage.domain; + +import lombok.Data; + +import java.util.List; + +/** + * 视频菜单 + */ +@Data +public class VideoMenuVo { + + /** + * 菜单编号 + */ + private String menuId; + + /** + * 菜单名称 + */ + private String menuName; + + /** + * 所属视频 + */ + private List busTrainingVideos; +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/CraftTypeEnums.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/CraftTypeEnums.java new file mode 100644 index 00000000..1b5e6a9f --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/CraftTypeEnums.java @@ -0,0 +1,31 @@ +package com.yanzhu.manage.enums; + +/** + * 工种类型 + */ +public enum CraftTypeEnums { + + PYGZ("1", "普通工种"), + TSGZ("2", "特殊工种"), + GLRY("3", "管理人员"); + + private final String code; + private final String info; + + CraftTypeEnums(String code, String info) + { + this.code = code; + this.info = info; + } + + public String getCode() + { + return code; + } + + public String getInfo() + { + return info; + } + +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/SubDeptsEnums.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/SubDeptsEnums.java new file mode 100644 index 00000000..07692914 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/SubDeptsEnums.java @@ -0,0 +1,38 @@ +package com.yanzhu.manage.enums; + +/** + * 单位类型枚举 + */ +public enum SubDeptsEnums { + + JSDW("1", "建设单位"), + JLDW("2", "监理单位"), + SGDW("3", "施工单位"), + ZYFB("4", "专业分包"), + LWFB("5", "劳务分包"), + CLFB("6", "材料分包"), + HQFB("7", "后勤分包"), + TSSB("8", "特殊设备"), + KTDW("9", "勘探单位"), + SJDW("10", "设计单位"), + QTDW("99", "其它单位"); + + private final String code; + private final String info; + + SubDeptsEnums(String code, String info) + { + this.code = code; + this.info = info; + } + + public String getCode() + { + return code; + } + + public String getInfo() + { + return info; + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/craftPostEnums.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/craftPostEnums.java new file mode 100644 index 00000000..08bc9542 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/enums/craftPostEnums.java @@ -0,0 +1,28 @@ +package com.yanzhu.manage.enums; + +/** + * 工种岗位枚举 + */ +public enum craftPostEnums { + + WTDLR("22", "委托代理人"); + + private final String code; + private final String info; + + craftPostEnums(String code, String info) + { + this.code = code; + this.info = info; + } + + public String getCode() + { + return code; + } + + public String getInfo() + { + return info; + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamUserService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamUserService.java index 33b2ef89..eccf855b 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamUserService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusExamUserService.java @@ -1,8 +1,9 @@ package com.yanzhu.manage.service; -import java.util.List; import com.yanzhu.manage.domain.BusExamUser; +import java.util.List; + /** * 用户试卷Service接口 * @@ -34,6 +35,14 @@ public interface IBusExamUserService */ public BusExamUser insertBusExamUser(); + /** + * 新增用户试卷 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + * @return 结果 + */ + public BusExamUser insertBusExamUser(Long proId, String phoneNumber); + /** * 修改用户试卷 * @@ -57,4 +66,11 @@ public interface IBusExamUserService * @return 结果 */ public int deleteBusExamUserById(Long id); + + /** + * 提交用户试卷 + * @param busExamUser + * @return + */ + public BusExamUser submitBusExamUser(BusExamUser busExamUser); } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoService.java index 4c15424f..dd158767 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoService.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Map; import com.yanzhu.manage.domain.BusTrainingVideo; +import com.yanzhu.manage.domain.VideoMenuVo; /** * 培训视频Service接口 @@ -68,4 +69,13 @@ public interface IBusTrainingVideoService * @return 结果 */ public int deleteBusTrainingVideoById(Long id); + + /** + * 用户完成学习视频 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + * @return + */ + public List findBusTrainingVideos(Long proId, String phoneNumber); + } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoUserService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoUserService.java index 48b00d23..3adc44c0 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoUserService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IBusTrainingVideoUserService.java @@ -59,4 +59,22 @@ public interface IBusTrainingVideoUserService * @return 结果 */ public int deleteBusTrainingVideoUserById(Long id); + + /** + * 开始播放用户视频 + * @param id 用户培训视频主键 + */ + public void startPlayUserEduVideo(Long id); + + /** + * 结束播放用户视频 + * @param id 用户培训视频主键 + */ + public void endPlayUserEduVideo(Long id); + + /** + * 用户完成学习视频 + * @param id 用户培训视频主键 + */ + public int finishEduVideo(Long id); } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsService.java index 999452a2..d69d9c8c 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsService.java @@ -1,6 +1,8 @@ package com.yanzhu.manage.service; import java.util.List; +import java.util.Map; + import com.yanzhu.manage.domain.ProProjectInfoSubdepts; /** @@ -66,4 +68,13 @@ public interface IProProjectInfoSubdeptsService * @return 结果 */ public int deleteProProjectInfoSubdeptsById(Long id); + + /** + * 查询用户在项目中的信息 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + * @return + */ + public ProProjectInfoSubdepts findProSubDeptsInfo(Long proId, String phoneNumber); + } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java index 6a786c98..fc984050 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java @@ -1,7 +1,10 @@ package com.yanzhu.manage.service; import java.util.List; +import java.util.Map; + import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; +import com.yanzhu.manage.domain.SignetFileVo; /** * 分包单位工人Service接口 @@ -59,5 +62,17 @@ public interface IProProjectInfoSubdeptsUsersService */ public int deleteProProjectInfoSubdeptsUsersById(Long id); + /** + * 查询用户在项目中的信息 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + * @return + */ + public ProProjectInfoSubdeptsUsers findProSubDeptsUser(Long proId, String phoneNumber); + /** + * 提交文件签署 + * @param signetFileVo + */ + public void submitUserSignets(SignetFileVo signetFileVo); } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamUserServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamUserServiceImpl.java index f22edeea..fdb6ac29 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamUserServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusExamUserServiceImpl.java @@ -4,9 +4,7 @@ import java.util.*; import java.util.stream.Collectors; import com.alibaba.fastjson2.JSON; -import com.yanzhu.common.core.enums.CraftType; -import com.yanzhu.common.core.enums.IsDelEnums; -import com.yanzhu.common.core.enums.UseStateEnums; +import com.yanzhu.common.core.enums.*; import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.text.Convert; import com.yanzhu.common.core.utils.DateUtils; @@ -146,6 +144,111 @@ public class BusExamUserServiceImpl implements IBusExamUserService entity.setQuestionType(examQuestion.getQuestionType()); entity.setQuestionOption(JSON.toJSONString(question.getBusExamQuestionResultList())); entity.setAnswer(question.getQuestionAnswer()); + // 根据问题类型设置问题分数 + if(examQuestion.getQuestionType()==1L){ + entity.setMark(findExamInfo.getSingleMark()); + }else if(examQuestion.getQuestionType()==2L){ + entity.setMark(findExamInfo.getMultipleMark()); + }else if(examQuestion.getQuestionType()==3L){ + entity.setMark(findExamInfo.getEstimateMark()); + } + busExamUserResultList.add(entity); + } + busExamUser.setBusExamUserResultList(busExamUserResultList); + busExamUserMapper.batchBusExamUserResult(busExamUserResultList); + + // 修改试卷使用次数 + busExamInfoMapper.updateExamUseNumber(findExamInfo.getId()); + }else{ + throw new ServiceException("当前项目未配置试卷信息,请联系管理员配置..."); + } + return busExamUser; + } + + /** + * 新增用户试卷 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + * @return 结果 + */ + @Override + @Transactional + public BusExamUser insertBusExamUser(Long proId, String phoneNumber){ + BusExamUser busExamUser = new BusExamUser(); + ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); + query.setProjectId(proId); + query.setPhoneNumber(phoneNumber); + List userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); + if(StringUtils.isEmpty(userList)){ + throw new ServiceException("用户信息异常...不能抽取试题..."); + } + + ProProjectInfoSubdeptsUsers userEntity = userList.get(0); + + // 查询试卷列表 + BusExamInfo examQuery = new BusExamInfo(); + examQuery.setProjectId(userEntity.getProjectId()); + examQuery.setCraftType(userEntity.getCraftType()); + // 管理人员获取所有管理类试卷 + if(!Objects.equals(CraftType.GLRY.getCode(),examQuery.getCraftType())){ + examQuery.setCraftPost(userEntity.getCraftPost()); + } + examQuery.setIsDel(IsDelEnums.NO.getCode()); + List examInfoList = busExamInfoMapper.selectBusExamInfoList(examQuery); + if(StringUtils.isNotEmpty(examInfoList)){ + // 优先从项目试卷中获取试卷、未找到项目试卷则从所有试卷中筛选 + List _projectExamInfolist = examInfoList.stream().filter(examInfo -> examInfo.getProjectId() != null) + .collect(Collectors.toList()); + Random random = new Random(); + BusExamInfo findExamInfo; + if(StringUtils.isNotEmpty(_projectExamInfolist)){ + int randomIntBound = random.nextInt(_projectExamInfolist.size()); + findExamInfo = _projectExamInfolist.get(randomIntBound); + }else{ + int randomIntBound = random.nextInt(examInfoList.size()); + findExamInfo = examInfoList.get(randomIntBound); + } + + // 获取试卷试题 + List questions = extractExamQuestion(findExamInfo,Objects.equals(CraftType.GLRY.getCode(),examQuery.getCraftType())?null:userEntity.getCraftPost()); + // 试题重新排序 + Collections.shuffle(questions); + + busExamUser.setComId(userEntity.getComId()); + busExamUser.setProjectId(userEntity.getProjectId()); + busExamUser.setUserId(userEntity.getUserId()); + busExamUser.setExamTitle(findExamInfo.getExamTitle()); + busExamUser.setExamType(findExamInfo.getExamType()); + busExamUser.setCraftType(userEntity.getCraftType()); + busExamUser.setCraftPost(userEntity.getCraftPost()); + busExamUser.setSingleNum(findExamInfo.getSingleNum()); + busExamUser.setMultipleNum(findExamInfo.getMultipleNum()); + busExamUser.setEstimateNum(findExamInfo.getEstimateNum()); + busExamUser.setCreateBy(DataSourceEnuns.APP.getInfo()); + busExamUser.setCreateTime(DateUtils.getNowDate()); + busExamUser.setFullMark(findExamInfo.getFullMark()); + busExamUser.setPassMark(findExamInfo.getPassMark()); + busExamUser.setUseTimes(DateUtils.getTime()); + busExamUserMapper.insertBusExamUser(busExamUser); + + List busExamUserResultList = new ArrayList<>(); + for(BusExamQuestion examQuestion:questions){ + BusExamQuestion question = busExamQuestionMapper.selectBusExamQuestionById(examQuestion.getId()); + BusExamUserResult entity = new BusExamUserResult(); + entity.setExamUserId(busExamUser.getId()); + entity.setQuestionId(examQuestion.getId()); + entity.setQuestionTitle(examQuestion.getQuestionDesc()); + entity.setQuestionType(examQuestion.getQuestionType()); + entity.setQuestionOption(JSON.toJSONString(question.getBusExamQuestionResultList())); + entity.setAnswer(question.getQuestionAnswer()); + // 根据问题类型设置问题分数 + if(examQuestion.getQuestionType()==1L){ + entity.setMark(findExamInfo.getSingleMark()); + }else if(examQuestion.getQuestionType()==2L){ + entity.setMark(findExamInfo.getMultipleMark()); + }else if(examQuestion.getQuestionType()==3L){ + entity.setMark(findExamInfo.getEstimateMark()); + } busExamUserResultList.add(entity); } busExamUser.setBusExamUserResultList(busExamUserResultList); @@ -167,9 +270,10 @@ public class BusExamUserServiceImpl implements IBusExamUserService */ private List extractExamQuestion(BusExamInfo findExamInfo,String craftPost){ BusExamQuestion questionQuery = new BusExamQuestion(); - questionQuery.setActiveComId(findExamInfo.getComId()); questionQuery.setActiveProjectId(findExamInfo.getProjectId()); - questionQuery.setCraftPost(craftPost); + if(Objects.nonNull(craftPost)){ + questionQuery.setCraftPost(craftPost); + } questionQuery.setIsDel(IsDelEnums.NO.getCode()); List list = new ArrayList<>(); List allQuestionList = busExamQuestionMapper.selectBusExamQuestionList(questionQuery); @@ -294,4 +398,56 @@ public class BusExamUserServiceImpl implements IBusExamUserService } } } + + /** + * 提交用户试卷 + * @param busExamUser + * @return + */ + @Override + public BusExamUser submitBusExamUser(BusExamUser busExamUser){ + ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); + query.setProjectId(busExamUser.getProjectId()); + query.setUserId(busExamUser.getUserId()); + List userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); + if(StringUtils.isEmpty(userList)){ + throw new ServiceException("用户信息异常...不能提交试卷..."); + } + Long mark = Long.valueOf(0); + List list = busExamUserMapper.selectBusExamUserResultByExamUserId(busExamUser.getId()); + if(StringUtils.isNotEmpty(list)){ + for(BusExamUserResult result:list){ + for(BusExamUserResult _pageResult:busExamUser.getBusExamUserResultList()){ + if(Objects.equals(result.getQuestionId(),_pageResult.getQuestionId())){ + result.setUserAnswer(_pageResult.getUserAnswer()); + if(Objects.equals(result.getAnswer(),result.getUserAnswer())){ + mark += Convert.toInt(result.getMark()); + result.setUseRes(ShiFouEnums.SHI.getCodeStr()); + result.setUseMark(result.getMark()); + }else{ + result.setUseRes(ShiFouEnums.FOU.getCodeStr()); + // 错误则设置为0分 + result.setUseMark("0"); + } + busExamUserMapper.updateBusExamUserResult(result); + } + } + } + } + busExamUser.setUserMark(mark); + if(busExamUser.getPassMark()>mark){ + busExamUser.setResStatus(ShiFouEnums.FOU.getCode()); + }else{ + busExamUser.setResStatus(ShiFouEnums.SHI.getCode()); + //通过后修改用户状态 + ProProjectInfoSubdeptsUsers proSubdeptsUsers = userList.get(0); + if(Objects.isNull(proSubdeptsUsers.getSubStep()) || proSubdeptsUsers.getSubStep()<3){ + proSubdeptsUsers.setSubStep(3L); + } + proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proSubdeptsUsers); + } + busExamUser.setUpdateTime(DateUtils.getNowDate()); + busExamUserMapper.updateBusExamUser(busExamUser); + return busExamUser; + } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoServiceImpl.java index 88a88547..b51fc635 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoServiceImpl.java @@ -1,11 +1,24 @@ package com.yanzhu.manage.service.impl; +import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; import com.yanzhu.common.core.context.SecurityContextHolder; +import com.yanzhu.common.core.enums.DataSourceEnuns; +import com.yanzhu.common.core.enums.ShiFouEnums; +import com.yanzhu.common.core.exception.ServiceException; +import com.yanzhu.common.core.text.Convert; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.security.utils.SecurityUtils; +import com.yanzhu.manage.domain.BusTrainingVideoUser; +import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; +import com.yanzhu.manage.domain.VideoMenuVo; +import com.yanzhu.manage.mapper.BusTrainingVideoUserMapper; +import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.yanzhu.manage.mapper.BusTrainingVideoMapper; @@ -24,6 +37,12 @@ public class BusTrainingVideoServiceImpl implements IBusTrainingVideoService @Autowired private BusTrainingVideoMapper busTrainingVideoMapper; + @Autowired + private BusTrainingVideoUserMapper busTrainingVideoUserMapper; + + @Autowired + private ProProjectInfoSubdeptsUsersMapper proProjectInfoSubdeptsUsersMapper; + /** * 查询培训视频 * @@ -114,4 +133,62 @@ public class BusTrainingVideoServiceImpl implements IBusTrainingVideoService { return busTrainingVideoMapper.deleteBusTrainingVideoById(id); } + + /** + * 查询业务学习视频列表 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + * @return + */ + @Override + public List findBusTrainingVideos(Long proId, String phoneNumber){ + List menuVos = new ArrayList<>(); + ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); + query.setProjectId(proId); + query.setPhoneNumber(phoneNumber); + List userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); + if(StringUtils.isEmpty(userList)){ + throw new ServiceException("用户信息异常..."); + } + BusTrainingVideo busVideoQuery = new BusTrainingVideo(); + busVideoQuery.setComId(userList.get(0).getComId()); + busVideoQuery.setProjectId(userList.get(0).getProjectId()); + busVideoQuery.setCraftType(userList.get(0).getCraftType()); + busVideoQuery.setCraftPost(userList.get(0).getCraftPost()); + busVideoQuery.setIsDel(ShiFouEnums.FOU.getCode()); + List dataList = busTrainingVideoMapper.selectBusTrainingVideoList(busVideoQuery); + // 新增用户培训视频 + if(StringUtils.isNotEmpty(dataList)){ + Long sortBy = 0L; + //List busTrainingVideoUserList = new ArrayList<>(); + for(BusTrainingVideo video:dataList){ + BusTrainingVideoUser entity = new BusTrainingVideoUser(); + entity.setComId(userList.get(0).getComId()); + entity.setProjectId(userList.get(0).getProjectId()); + entity.setUserId(userList.get(0).getUserId()); + entity.setVideoId(video.getId()); + entity.setSortBy(sortBy++); + entity.setCreateBy(DataSourceEnuns.APP.getInfo()); + entity.setCreateTime(DateUtils.getNowDate()); + busTrainingVideoUserMapper.insertBusTrainingVideoUser(entity); + video.setRemark(Convert.toStr(entity.getId())); + //busTrainingVideoUserList.add(entity); + } + //busTrainingVideoUserMapper.batchBusTrainingVideoUser(busTrainingVideoUserList); + } + List> menuList = busTrainingVideoMapper.selectBusTrainingVideoListGroup(busVideoQuery); + if(StringUtils.isNotEmpty(menuList) && StringUtils.isNotEmpty(dataList)){ + for(Map menu:menuList){ + if(Convert.toInt(menu.get("total"))>0){ + VideoMenuVo menuVo = new VideoMenuVo(); + menuVo.setMenuId(Convert.toStr(menu.get("lvId"))); + menuVo.setMenuName(Convert.toStr(menu.get("lvName"))); + List _dataList = dataList.stream().filter(column -> Objects.equals(menuVo.getMenuId(),column.getTrainLevel())).collect(Collectors.toList()); + menuVo.setBusTrainingVideos(_dataList); + menuVos.add(menuVo); + } + } + } + return menuVos; + } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoUserServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoUserServiceImpl.java index 3e9cdd54..58575b6a 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoUserServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/BusTrainingVideoUserServiceImpl.java @@ -1,15 +1,24 @@ package com.yanzhu.manage.service.impl; import com.yanzhu.common.core.context.SecurityContextHolder; +import com.yanzhu.common.core.enums.ShiFouEnums; +import com.yanzhu.common.core.exception.ServiceException; +import com.yanzhu.common.core.text.Convert; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.manage.domain.BusTrainingVideoUser; +import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; import com.yanzhu.manage.mapper.BusTrainingVideoUserMapper; +import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper; import com.yanzhu.manage.service.IBusTrainingVideoUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import java.time.Duration; import java.util.List; +import java.util.Objects; /** * 用户培训视频Service业务层处理 @@ -23,6 +32,9 @@ public class BusTrainingVideoUserServiceImpl implements IBusTrainingVideoUserSer @Autowired private BusTrainingVideoUserMapper busTrainingVideoUserMapper; + @Autowired + private ProProjectInfoSubdeptsUsersMapper proProjectInfoSubdeptsUsersMapper; + /** * 查询用户培训视频 * @@ -100,4 +112,84 @@ public class BusTrainingVideoUserServiceImpl implements IBusTrainingVideoUserSer { return busTrainingVideoUserMapper.deleteBusTrainingVideoUserById(id); } + + /** + * 开始播放用户视频 + * @param id 用户培训视频主键 + */ + @Override + @Transactional + public void startPlayUserEduVideo(Long id){ + BusTrainingVideoUser entity = busTrainingVideoUserMapper.selectBusTrainingVideoUserById(id); + if(Objects.isNull(entity.getPlayDates())){ + entity.setPlayDates(DateUtils.getNowDate()); + busTrainingVideoUserMapper.updateBusTrainingVideoUser(entity); + } + } + + /** + * 结束播放用户视频 + * @param id 用户培训视频主键 + */ + @Override + @Transactional + public void endPlayUserEduVideo(Long id){ + BusTrainingVideoUser entity = busTrainingVideoUserMapper.selectBusTrainingVideoUserById(id); + try{ + long stimes = entity.getPlayDates().getTime(); + long etimes = DateUtils.getNowDate().getTime(); + if(Objects.nonNull(entity.getPlayTimes())){ + long time = (etimes-stimes)/2; + entity.setPlayTimes(Convert.toStr(time+Convert.toLong(entity.getPlayTimes()))); + }else{ + entity.setPlayTimes(Convert.toStr(etimes-stimes)); + } + entity.setPlayStatus(ShiFouEnums.SHI.getCode()); + busTrainingVideoUserMapper.updateBusTrainingVideoUser(entity); + }catch (Exception e){ + e.printStackTrace(); + } + } + + public static void main(String[] args) { + long sd = 3L; + System.out.println(sd/2); + } + + /** + * 用户完成学习视频 + * @param id 用户培训视频主键 + */ + @Override + @Transactional + public int finishEduVideo(Long id){ + BusTrainingVideoUser entity = busTrainingVideoUserMapper.selectBusTrainingVideoUserById(id); + try{ + long stimes = entity.getPlayDates().getTime(); + long etimes = DateUtils.getNowDate().getTime(); + if(Objects.nonNull(entity.getPlayTimes())){ + long time = (etimes-stimes)/2; + entity.setPlayTimes(Convert.toStr(time+Convert.toLong(entity.getPlayTimes()))); + }else{ + entity.setPlayTimes(Convert.toStr(etimes-stimes)); + } + entity.setPlayStatus(ShiFouEnums.SHI.getCode()); + busTrainingVideoUserMapper.updateBusTrainingVideoUser(entity); + }catch (Exception e){ + e.printStackTrace(); + } + ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); + query.setProjectId(entity.getProjectId()); + query.setUserId(entity.getUserId()); + List dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); + if(StringUtils.isNotEmpty(dataList)){ + ProProjectInfoSubdeptsUsers projectInfoSubdeptsUsers = dataList.get(0); + if(Objects.isNull(projectInfoSubdeptsUsers.getSubStep()) || projectInfoSubdeptsUsers.getSubStep()<2){ + projectInfoSubdeptsUsers.setSubStep(2L); + } + return proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(projectInfoSubdeptsUsers); + }else{ + throw new ServiceException("查询用户信息异常"); + } + } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoServiceImpl.java index dba6a74b..1d85efec 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoServiceImpl.java @@ -1,5 +1,6 @@ package com.yanzhu.manage.service.impl; +import cn.binarywang.wx.miniapp.api.WxMaService; import com.yanzhu.common.core.constant.CacheConstants; import com.yanzhu.common.core.constant.SecurityConstants; import com.yanzhu.common.core.context.SecurityContextHolder; @@ -9,6 +10,7 @@ import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.redis.service.RedisService; import com.yanzhu.common.security.utils.SecurityUtils; +import com.yanzhu.manage.config.ProfileConfig; import com.yanzhu.manage.domain.ProDept; import com.yanzhu.manage.domain.ProProjectInfo; import com.yanzhu.manage.domain.ProProjectInfoDepts; @@ -17,12 +19,16 @@ import com.yanzhu.manage.mapper.ProProjectInfoDeptsMapper; import com.yanzhu.manage.mapper.ProProjectInfoMapper; import com.yanzhu.manage.mapper.ProProjectInfoSettingMapper; import com.yanzhu.manage.service.IProProjectInfoService; +import com.yanzhu.manage.utils.WxQrCodeUtils; import com.yanzhu.system.api.RemoteDeptService; import com.yanzhu.system.api.domain.SysDept; import com.yanzhu.system.api.domain.SysUser; +import me.chanjar.weixin.mp.api.WxMpService; import net.sourceforge.pinyin4j.PinyinHelper; import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -38,9 +44,15 @@ import java.util.List; @Service public class ProProjectInfoServiceImpl implements IProProjectInfoService { + @Autowired + private WxMaService wxMaService; + @Autowired private RedisService redisService; + @Autowired + private ProfileConfig profileConfig; + @Autowired private ProProjectInfoDeptsMapper deptsMapper; @@ -53,6 +65,8 @@ public class ProProjectInfoServiceImpl implements IProProjectInfoService @Autowired private RemoteDeptService remoteDeptService; + private static final Logger log = LoggerFactory.getLogger(ProProjectInfoServiceImpl.class); + /** * 项目启动时,初始化参数到缓存 */ @@ -127,6 +141,16 @@ public class ProProjectInfoServiceImpl implements IProProjectInfoService proDept.setLeader(proProjectInfo.getProjectPerson()); proDept.setPhone(proProjectInfo.getProjectPersonPhone()); proDept.setCreateBy(SecurityUtils.getUsername()); + try { + String accessToken = wxMaService.getAccessToken(); + String imgPath = profileConfig.getPath()+"/"+System.currentTimeMillis()+".png"; + log.info("accessToken...{}",accessToken); + WxQrCodeUtils.generateQrCode(imgPath, "pages/index/index", "aa=108&bb=2&cc=3", accessToken); + // TODO:生成二维码 + proProjectInfo.setProjectQrCode(imgPath); + }catch (Exception e){ + log.error(e.getMessage()); + } int res = proProjectInfoMapper.insertDept(proDept); if(res>0){ proProjectInfo.setId(proDept.getDeptId()); @@ -150,6 +174,17 @@ public class ProProjectInfoServiceImpl implements IProProjectInfoService @Override public int updateProProjectInfo(ProProjectInfo proProjectInfo) { + try { + String accessToken = wxMaService.getAccessToken(); + String imgPath = profileConfig.getPath()+"/"+System.currentTimeMillis()+".png"; + log.info("accessToken...{}",accessToken); + String scene = "QRPID="+proProjectInfo.getId()+"&signType=1"; + WxQrCodeUtils.generateQrCode(imgPath, "pages/project_qr/index", scene, accessToken); + // TODO:生成二维码 + proProjectInfo.setProjectQrCode(imgPath); + }catch (Exception e){ + log.error(e.getMessage()); + } proProjectInfo.setUpdateTime(DateUtils.getNowDate()); proProjectInfo.setUpdateBy(SecurityContextHolder.getUserName()); List depts = proProjectInfo.getProjectDeptsList(); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java index dcd2d6ec..592551f7 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java @@ -3,8 +3,8 @@ package com.yanzhu.manage.service.impl; import com.yanzhu.common.core.constant.CacheConstants; import com.yanzhu.common.core.constant.SecurityConstants; import com.yanzhu.common.core.domain.R; -import com.yanzhu.common.core.enums.CardTypeEnums; -import com.yanzhu.common.core.enums.UserTypeEnums; +import com.yanzhu.common.core.enums.*; +import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.redis.service.RedisService; @@ -12,9 +12,13 @@ import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.manage.config.ProfileConfig; import com.yanzhu.manage.domain.ProProjectInfo; import com.yanzhu.manage.domain.ProProjectInfoSubdepts; +import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; +import com.yanzhu.manage.enums.CraftTypeEnums; +import com.yanzhu.manage.enums.SubDeptsEnums; +import com.yanzhu.manage.enums.craftPostEnums; import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper; +import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper; import com.yanzhu.manage.service.IProProjectInfoSubdeptsService; -import com.yanzhu.manage.utils.WxQrCodeUtils; import com.yanzhu.system.api.RemoteUserService; import com.yanzhu.system.api.domain.SysUser; import me.chanjar.weixin.mp.api.WxMpService; @@ -51,6 +55,9 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept @Autowired private ProProjectInfoSubdeptsMapper proProjectInfoSubdeptsMapper; + @Autowired + private ProProjectInfoSubdeptsUsersMapper proProjectInfoSubdeptsUsersMapper; + private static final Logger log = LoggerFactory.getLogger(ProProjectInfoSubdeptsServiceImpl.class); /** @@ -90,31 +97,29 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept public int insertProProjectInfoSubdepts(ProProjectInfoSubdepts proProjectInfoSubdepts) { ProProjectInfo info = redisService.getCacheObject(CacheConstants.PRO_PROJECT+proProjectInfoSubdepts.getProjectId()); + if(Objects.isNull(info)){ + throw new ServiceException("项目信息异常..."); + } proProjectInfoSubdepts.setComId(info.getComId()); - if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(),"4") || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),"4")){ - try { - String accessToken = wxMpService.getAccessToken(); - String imgPath = profileConfig.getPath()+"/"+System.currentTimeMillis()+".png"; - log.info("accessToken...{}",accessToken); - WxQrCodeUtils.generateQrCode(imgPath, "pages/index/index", "aa=108&bb=2&cc=3", accessToken); - // TODO:生成二维码 - //proProjectInfoSubdepts.setQrCode(); - }catch (Exception e){ - log.error(e.getMessage()); - } + if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode())){ // 单位委托人信息 if(StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderPhone())){ SysUser sysUser = new SysUser(); sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone()); sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName()); sysUser.setUserType(UserTypeEnums.FBDL.getCode()); + sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone()); sysUser.setCardType(CardTypeEnums.SFZ.getCode()); sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode()); sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture()); sysUser.setCardImgPos(proProjectInfoSubdepts.getLeaderCardImgPos()); sysUser.setCardImgInv(proProjectInfoSubdepts.getLeaderCardImgInv()); sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode())); - sysUser.setCreateBy(SecurityUtils.getUsername()); + if(Objects.equals(DataSourceEnuns.WEB.getCode(),proProjectInfoSubdepts.getDataSource())){ + sysUser.setCreateBy(SecurityUtils.getUsername()); + }else{ + sysUser.setCreateBy(DataSourceEnuns.APP.getInfo()); + } sysUser.setCreateTime(DateUtils.getNowDate()); sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); try { @@ -122,14 +127,49 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData()); }catch (Exception e){ // 已注册账号!!忽略异常... + e.printStackTrace(); } - - // TODO:实名制接入 } } - proProjectInfoSubdepts.setCreateBy(SecurityUtils.getUsername()); + if(Objects.equals(DataSourceEnuns.WEB.getCode(),proProjectInfoSubdepts.getDataSource())){ + proProjectInfoSubdepts.setCreateBy(SecurityUtils.getUsername()); + proProjectInfoSubdepts.setApproveStatus(ApproveStatus.passed.getCode()); + }else{ + proProjectInfoSubdepts.setCreateBy(DataSourceEnuns.APP.getInfo()); + proProjectInfoSubdepts.setApproveStatus(ApproveStatus.await.getCode()); + } proProjectInfoSubdepts.setCreateTime(DateUtils.getNowDate()); - return proProjectInfoSubdeptsMapper.insertProProjectInfoSubdepts(proProjectInfoSubdepts); + int res = proProjectInfoSubdeptsMapper.insertProProjectInfoSubdepts(proProjectInfoSubdepts); + // 将人员信息同步至单位人员表 + if(res>0 && (Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode()))){ + // 保存单位人员信息 + ProProjectInfoSubdeptsUsers subdeptsUser = new ProProjectInfoSubdeptsUsers(); + subdeptsUser.setComId(info.getComId()); + subdeptsUser.setProjectId(info.getId()); + subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId()); + subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName()); + subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType()); + subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath()); + subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId()); + subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); + subdeptsUser.setCraftPost(craftPostEnums.WTDLR.getCode()); + subdeptsUser.setDegreeGrade(""); + subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); + subdeptsUser.setApproveStatus(ApproveStatus.await.getCode()); + if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){ + subdeptsUser.setSubStep(1L); + } + if(Objects.equals(DataSourceEnuns.WEB.getCode(),proProjectInfoSubdepts.getDataSource())){ + subdeptsUser.setCreateBy(SecurityUtils.getUsername()); + subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode()); + }else{ + subdeptsUser.setCreateBy(DataSourceEnuns.APP.getInfo()); + subdeptsUser.setApproveStatus(ApproveStatus.await.getCode()); + } + subdeptsUser.setCreateTime(DateUtils.getNowDate()); + proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(subdeptsUser); + } + return res; } /** @@ -142,39 +182,84 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept @Transactional public int updateProProjectInfoSubdepts(ProProjectInfoSubdepts proProjectInfoSubdepts) { - if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(),"4") || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),"4")){ - if(StringUtils.isEmpty(proProjectInfoSubdepts.getQrCode())){ - // TODO:生成二维码 - - // 单位委托人信息 - if(StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderPhone())){ - SysUser sysUser = new SysUser(); - sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone()); - sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName()); - sysUser.setUserType(UserTypeEnums.FBDL.getCode()); - sysUser.setCardType(CardTypeEnums.SFZ.getCode()); - sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode()); - sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture()); - sysUser.setCardImgPos(proProjectInfoSubdepts.getLeaderCardImgPos()); - sysUser.setCardImgInv(proProjectInfoSubdepts.getLeaderCardImgInv()); - sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode())); - sysUser.setCreateBy(SecurityUtils.getUsername()); - sysUser.setCreateTime(DateUtils.getNowDate()); - sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); - try { - R userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); - proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData()); - }catch (Exception e){ - // 已注册账号!!忽略异常... - } - - // TODO:实名制接入 + ProProjectInfo info = redisService.getCacheObject(CacheConstants.PRO_PROJECT+proProjectInfoSubdepts.getProjectId()); + if(Objects.isNull(info)){ + throw new ServiceException("项目信息异常..."); + } + if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.LWFB.getCode())){ + // 单位委托人信息 + if(StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderPhone())){ + SysUser sysUser = new SysUser(); + sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone()); + sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName()); + sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone()); + sysUser.setUserType(UserTypeEnums.FBDL.getCode()); + sysUser.setCardType(CardTypeEnums.SFZ.getCode()); + sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode()); + sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture()); + sysUser.setCardImgPos(proProjectInfoSubdepts.getLeaderCardImgPos()); + sysUser.setCardImgInv(proProjectInfoSubdepts.getLeaderCardImgInv()); + sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode())); + if(Objects.equals(DataSourceEnuns.WEB.getCode(),proProjectInfoSubdepts.getDataSource())){ + sysUser.setUpdateBy(SecurityUtils.getUsername()); + }else{ + sysUser.setUpdateBy(DataSourceEnuns.APP.getInfo()); } + sysUser.setUpdateTime(DateUtils.getNowDate()); + sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); + try { + R userResult = remoteUserService.updateUserInfo(sysUser, SecurityConstants.INNER); + proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData()); + }catch (Exception e){ + // 已注册账号!!忽略异常... + e.printStackTrace(); + } + + // TODO:实名制接入 } } - proProjectInfoSubdepts.setUpdateBy(SecurityUtils.getUsername()); + if(Objects.equals(DataSourceEnuns.WEB.getCode(),proProjectInfoSubdepts.getDataSource())){ + proProjectInfoSubdepts.setUpdateBy(SecurityUtils.getUsername()); + }else{ + proProjectInfoSubdepts.setUpdateBy(DataSourceEnuns.APP.getInfo()); + } proProjectInfoSubdepts.setUpdateTime(DateUtils.getNowDate()); - return proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts); + int res = proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts); + // 将人员信息同步至单位人员表 + if(res>0 && (Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode()))){ + // 保存单位人员信息 + ProProjectInfoSubdeptsUsers subdeptsUser = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersByParamId(proProjectInfoSubdepts.getProjectId(),proProjectInfoSubdepts.getSubDeptLeaderId()); + if(Objects.isNull(subdeptsUser)){ + subdeptsUser = new ProProjectInfoSubdeptsUsers(); + subdeptsUser.setComId(info.getComId()); + subdeptsUser.setProjectId(info.getId()); + subdeptsUser.setSubDeptId(proProjectInfoSubdepts.getId()); + } + subdeptsUser.setSubDeptName(proProjectInfoSubdepts.getSubDeptName()); + subdeptsUser.setSubDeptType(proProjectInfoSubdepts.getSubDeptType()); + subdeptsUser.setSubDeptPowerPath(proProjectInfoSubdepts.getSubDeptLeaderPowerPath()); + subdeptsUser.setUserId(proProjectInfoSubdepts.getSubDeptLeaderId()); + subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); + subdeptsUser.setCraftPost(craftPostEnums.WTDLR.getCode()); + subdeptsUser.setDegreeGrade(""); + subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); + subdeptsUser.setApproveStatus(ApproveStatus.await.getCode()); + if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){ + subdeptsUser.setSubStep(1L); + } + if(Objects.equals(DataSourceEnuns.WEB.getCode(),proProjectInfoSubdepts.getDataSource())){ + subdeptsUser.setCreateBy(SecurityUtils.getUsername()); + }else{ + subdeptsUser.setCreateBy(DataSourceEnuns.APP.getInfo()); + } + subdeptsUser.setCreateTime(DateUtils.getNowDate()); + if(Objects.isNull(subdeptsUser.getId())){ + proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(subdeptsUser); + }else{ + proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser); + } + } + return res; } /** @@ -213,4 +298,31 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept { return proProjectInfoSubdeptsMapper.deleteProProjectInfoSubdeptsById(id); } + + /** + * 查询用户在项目中的信息 + * @param proId + * @param phoneNumber 联系电话 + * @return + */ + @Override + public ProProjectInfoSubdepts findProSubDeptsInfo(Long proId, String phoneNumber){ + ProProjectInfoSubdepts query = new ProProjectInfoSubdepts(); + query.setProjectId(proId); + query.setSubDeptLeaderPhone(phoneNumber); + List dataList = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsList(query); + if(StringUtils.isNotEmpty(dataList)){ + ProProjectInfoSubdepts data = dataList.get(0); + ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers(); + userQuery.setProjectId(proId); + userQuery.setPhoneNumber(phoneNumber); + List userList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery); + if(StringUtils.isNotEmpty(userList)){ + data.setProProjectInfoSubdeptsUsers(userList.get(0)); + } + return data; + } + return null; + } + } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java index 18c391bb..17ce080f 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java @@ -2,8 +2,11 @@ package com.yanzhu.manage.service.impl; import com.yanzhu.common.core.constant.SecurityConstants; import com.yanzhu.common.core.context.SecurityContextHolder; +import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers; +import com.yanzhu.manage.domain.SignetFileVo; import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper; import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService; import com.yanzhu.manage.service.IUniService; @@ -11,6 +14,7 @@ import com.yanzhu.system.api.RemoteUserService; import com.yanzhu.system.api.domain.SysUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -131,4 +135,41 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu uniService.syncUserRevoke(id); return proProjectInfoSubdeptsUsersMapper.deleteProProjectInfoSubdeptsUsersById(id); } + + /** + * 查询用户在项目中的信息 + * @param proId 项目主键 + * @param phoneNumber 联系电话 + * @return + */ + @Override + public ProProjectInfoSubdeptsUsers findProSubDeptsUser(Long proId, String phoneNumber){ + ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); + query.setProjectId(proId); + query.setPhoneNumber(phoneNumber); + List dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); + if(StringUtils.isNotEmpty(dataList)){ + return dataList.get(0); + } + return null; + } + + /** + * 提交文件签署 + * @param signetFileVo + */ + @Override + @Transactional + public void submitUserSignets(SignetFileVo signetFileVo){ + ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers(); + query.setProjectId(signetFileVo.getProId()); + query.setPhoneNumber(signetFileVo.getUserPhone()); + List dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query); + if(StringUtils.isEmpty(dataList)){ + throw new ServiceException("用户信息异常..."); + } + ProProjectInfoSubdeptsUsers proSubdeptsUser = dataList.get(0); + proSubdeptsUser.setSubStep(100L); + proSubdeptsUser.setEduSignPath(signetFileVo.getImgPath()); + } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/resources/bootstrap.yml b/yanzhu-modules/yanzhu-manage/src/main/resources/bootstrap.yml index e096f77d..c38ffba5 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/resources/bootstrap.yml +++ b/yanzhu-modules/yanzhu-manage/src/main/resources/bootstrap.yml @@ -25,3 +25,7 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + +logging: + level: + com.ycx.manage.mapper: DEBUG \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/api/busEdu.js b/yanzhu-ui-app/miniprogram/api/busEdu.js new file mode 100644 index 00000000..5a5d4548 --- /dev/null +++ b/yanzhu-ui-app/miniprogram/api/busEdu.js @@ -0,0 +1,61 @@ +import { + request +} from '../utils/request' + +// 查询项目培训视频信息 +export function findBusTrainingVideos(proId, phoneNumber) { + return request({ + url: '/manage/wxApi/findBusTrainingVideos?proId=' + proId + '&phoneNumber=' + phoneNumber, + method: 'get' + }) +} + +// 开始播放用户培训视频 +export function startPlayUserEduVideo(id) { + return request({ + url: '/manage/wxApi/startPlayUserEduVideo/' + id, + method: 'get' + }) +} + +// 结束播放用户培训视频 +export function endPlayUserEduVideo(id) { + return request({ + url: '/manage/wxApi/endPlayUserEduVideo/' + id, + method: 'get' + }) +} + +// 用户完成学习视频 +export function finishEduVideo(id) { + return request({ + url: '/manage/wxApi/finishEduVideo/' + id, + method: 'get' + }) +} + +// 查询项目考试试卷信息 +export function findBusExamInfos(proId, phoneNumber) { + return request({ + url: '/manage/wxApi/findBusExamInfos?proId=' + proId + '&phoneNumber=' + phoneNumber, + method: 'get' + }) +} + +// 提交试卷试卷信息 +export function submitBusExamUser(data) { + return request({ + url: '/manage/wxApi/submitBusExamUser', + method: 'post', + data: data + }) +} + +// 确认并提交签署信息 +export function submitUserSignets(data) { + return request({ + url: '/manage/wxApi/submitUserSignets', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/api/login.js b/yanzhu-ui-app/miniprogram/api/login.js index 37ae0aad..3aaea177 100644 --- a/yanzhu-ui-app/miniprogram/api/login.js +++ b/yanzhu-ui-app/miniprogram/api/login.js @@ -52,7 +52,7 @@ export function loginOut() { }) } -// 刷线用户信息 +// 刷新用户信息 export function refreshMobileToken() { return request({ 'url': '/auth/refreshMobile', @@ -60,3 +60,12 @@ export function refreshMobileToken() { }) } +// 获取用户手机号码 +export function getMaPhoneNumber(data) { + return request({ + 'url': '/auth/getMaPhoneNumber', + 'method': 'post', + 'data': data, + }) +} + diff --git a/yanzhu-ui-app/miniprogram/api/project.js b/yanzhu-ui-app/miniprogram/api/project.js index 5d5610a2..ac2de4c9 100644 --- a/yanzhu-ui-app/miniprogram/api/project.js +++ b/yanzhu-ui-app/miniprogram/api/project.js @@ -1,60 +1,36 @@ -import {request} from '../utils/request' +import { + request +} from '../utils/request' -// 获取项目编号 -export function getProjectNo() { +// 查询项目信息详细 +export function getProjectInfo(id) { return request({ - url: '/project/projectInfo/findMyDeptProjectNo', + url: '/manage/wxApi/findProject/' + id, method: 'get' }) } -// 查询项目信息列表 -export function listProjectInfo(query) { +// 新增项目参建单位信息 +export function registerSubDepts(data) { return request({ - url: '/project/projectInfo/list', - method: 'get', - params: query + url: '/manage/wxApi/registerSubDepts', + method: 'post', + data: data }) - } - - // 查询项目信息详细 - export function getProjectInfo(id) { +} + +// 查询项目参建单位信息 +export function findProSubDeptsInfo(proId, phoneNumber) { return request({ - url: '/project/projectInfo/' + id, - method: 'get' + url: '/manage/wxApi/findProSubDeptsInfo?proId=' + proId + '&phoneNumber=' + phoneNumber, + method: 'get' }) - } - - // 新增项目信息 - export function addProjectInfo(data) { +} + +// 查询项目参建人员信息 +export function findProSubDeptsUser(proId, phoneNumber) { return request({ - url: '/project/projectInfo', - method: 'post', - data: data + url: '/manage/wxApi/findProSubDeptsUser?proId=' + proId + '&phoneNumber=' + phoneNumber, + method: 'get' }) - } - - // 修改项目信息 - export function updateProjectInfo(data) { - return request({ - url: '/project/projectInfo', - method: 'put', - data: data - }) - } - - // 删除项目信息 - export function delProjectInfo(id) { - return request({ - url: '/project/projectInfo/' + id, - method: 'delete' - }) - } - - // 我的部门项目 - export function findMyDeptProject() { - return request({ - url: '/project/projectInfo/findMyDeptProject', - method: 'get' - }) - } \ No newline at end of file +} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/app.js b/yanzhu-ui-app/miniprogram/app.js index d5e89de4..e75f539e 100644 --- a/yanzhu-ui-app/miniprogram/app.js +++ b/yanzhu-ui-app/miniprogram/app.js @@ -52,10 +52,16 @@ App({ }) } this.autoUpdate(); + + //防卡死定时器 + setInterval(() => { + wx.hideLoading(); + }, 30000); + /** * 初始化页面未登录时跳转到登录页 */ - if(options && options.query && options.query.proId){ + if(options && options.query && options.query.QRPID){ //扫码进入时不效验登录...跳转授权登录页 console.log("扫码进入时不效验登录...跳转授权登录页"); }else{ @@ -66,7 +72,6 @@ App({ wx.redirectTo({ url: '/pages/login/index', }); - return false; } } }, diff --git a/yanzhu-ui-app/miniprogram/app.json b/yanzhu-ui-app/miniprogram/app.json index 88cac693..d9288eaa 100644 --- a/yanzhu-ui-app/miniprogram/app.json +++ b/yanzhu-ui-app/miniprogram/app.json @@ -1,7 +1,6 @@ { "pages": [ "pages/login/login", - "pages/index/index", "pages/updatePwd/index", "pages/project_flowable/initTask/index", "pages/project_flowable/myFlowDefinition/index", @@ -60,6 +59,7 @@ "safety-number": "./components/number/index", "select-person": "./components/select-person/index", "select-group-person": "./components/select-group-person/index", + "select-group-position": "./components/select-group-position/index", "van-dropdown-menu": "@vant/weapp/dropdown-menu/index", "van-dropdown-item": "@vant/weapp/dropdown-item/index", "curve-echarts": "pages/components/curve-echarts/index" diff --git a/yanzhu-ui-app/miniprogram/app.wxss b/yanzhu-ui-app/miniprogram/app.wxss index 1797ce22..942e91d3 100644 --- a/yanzhu-ui-app/miniprogram/app.wxss +++ b/yanzhu-ui-app/miniprogram/app.wxss @@ -58,7 +58,7 @@ page { /* 中间内容用含有max_content 的 view 包起来 */ .max_content { - padding: 166rpx 0 180rpx; + padding: 166rpx 0 90rpx; } .max_content_scroll { @@ -981,6 +981,13 @@ page { background: url("http://fileimg.makalu.cc/WEB_F9046A91C12646ECAEB6024455C35F15.png") no-repeat left/15rpx 30rpx; } +.safety_inspect_title_2 { + color: #e9fbf9; + font-size: 26rpx; + padding: 20rpx; + background: url("http://fileimg.makalu.cc/WEB_F9046A91C12646ECAEB6024455C35F15.png") no-repeat left/15rpx 30rpx; +} + .safety_prop { display: flex; align-items: center; @@ -1686,6 +1693,15 @@ swiper-item video { background: #66d6f1; } +.problem_submit_to_back { + border-bottom: 1px solid #999999; + background-color: #999999; +} + +.problem_submit_to_back:active { + background: #cccccc; +} + .problem_submit_to_eq { border-bottom: 1px solid #3f76eb; background-color: #3f76eb; @@ -1923,11 +1939,26 @@ swiper-item video { color: #FFFFFF; } +.code_label_blue { + background: #1890ff; + color: #FFFFFF; +} + .code_label_blueviolet { background: blueviolet; color: #FFFFFF; } +.code_label_4 { + font-size: 0.8rem; + width: 200rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; + padding: 0.1rem; + border-radius: 0.5rem 0 0.5rem 0; +} + .code_label_yellow { background: #ff9800; color: #FFFFFF; @@ -1997,4 +2028,4 @@ swiper-item video { width: 180rpx; height: 180rpx; padding-right: 15rpx; -} \ No newline at end of file +} diff --git a/yanzhu-ui-app/miniprogram/components/select-group-position/index.js b/yanzhu-ui-app/miniprogram/components/select-group-position/index.js new file mode 100644 index 00000000..cdf70fd9 --- /dev/null +++ b/yanzhu-ui-app/miniprogram/components/select-group-position/index.js @@ -0,0 +1,122 @@ +// newComponents/select-group-person/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + title:{ + type:String + }, + index:{ + type:String + }, + choose:{ + type:String + }, + multiple:{ + type:Boolean, + value:true + }, + rectifierData:{ + type:Array, + value:[] + } + }, + observers: { + + }, + lifetimes: { + created: function(){ + //在组件实例刚刚被创建时执行,注意此时不能调用 setData + }, + attached: function () { + //在组件实例进入页面节点树时执行 + }, + ready: function () { + // 在组件在视图层布局完成后执行 + }, + detached: function () { + // 在组件实例被从页面节点树移除时执行 + }, + }, + + /** + * 组件的初始数据 + */ + data: { + show:false, + gridData:[], + selectedIndex:[] + }, + + /** + * 组件的方法列表 + */ + methods: { + onAddResponsible(){ + this.setData({ + show:true + }) + }, + onClose(){ + this.setData({ + show:false + }) + }, + onSelected(e){ + var data = this.data.rectifierData; + let ei = e.currentTarget.dataset.index; + let index = ei.split('_'); + let userdata = data[index[0]].userinfoList[index[1]]; + let of = this.data.selectedIndex.indexOf(ei); + if(of>-1){ + this.data.selectedIndex.splice(of, 1); + userdata.state = false; + }else{ + this.data.selectedIndex.push(ei); + userdata.state = true; + } + if(!this.data.multiple && this.data.selectedIndex.length>0){ + if(this.data.selectedIndex.length>1){ + this.data.selectedIndex.forEach((item) =>{ + let _indexs = item.split('_'); + data[_indexs[0]].userinfoList[_indexs[1]].state = false; + }); + userdata.state = true; + this.data.selectedIndex=[]; + this.data.selectedIndex.push(ei); + } + let _gridData=[{userName:userdata.nickName+" ["+userdata.jobTypeName+"]",phoneNumber:userdata.phonenumber}]; + this.triggerEvent('selected',_gridData) + this.setData({ + choose:_gridData[0].userName, + rectifierData:data, + show:false + }) + }else{ + this.setData({ + rectifierData : data + }) + } + }, + onConfirm(){ + var data = this.data.rectifierData; + let _gridData=[]; + let chooses=""; + if(this.data.selectedIndex.length>0){ + this.data.selectedIndex.forEach((item) =>{ + let _indexs = item.split('_'); + let name = data[_indexs[0]].userinfoList[_indexs[1]].nickName+" ["+data[_indexs[0]].userinfoList[_indexs[1]].jobTypeName+"]"; + _gridData.push({userName:name,phoneNumber:data[_indexs[0]].userinfoList[_indexs[1]].phonenumber}); + chooses+=","+name; + }); + } + this.triggerEvent('selected',_gridData) + this.setData({ + choose:chooses.substring(1), + show:false + }) + } + + } +}) diff --git a/yanzhu-ui-app/miniprogram/components/select-group-position/index.json b/yanzhu-ui-app/miniprogram/components/select-group-position/index.json new file mode 100644 index 00000000..7e37c035 --- /dev/null +++ b/yanzhu-ui-app/miniprogram/components/select-group-position/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/components/select-group-position/index.wxml b/yanzhu-ui-app/miniprogram/components/select-group-position/index.wxml new file mode 100644 index 00000000..ae6e349a --- /dev/null +++ b/yanzhu-ui-app/miniprogram/components/select-group-position/index.wxml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + {{title}} + + + + + + [{{item.unitTypeName}}] {{item.unitName}} + + + + + + + {{items.phonenumber}} + {{items.nickName}} [{{items.jobTypeName}}] + + + + + + 取消 + 确认 + + + \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/components/select-group-position/index.wxss b/yanzhu-ui-app/miniprogram/components/select-group-position/index.wxss new file mode 100644 index 00000000..3c4d8af0 --- /dev/null +++ b/yanzhu-ui-app/miniprogram/components/select-group-position/index.wxss @@ -0,0 +1,129 @@ +/* newComponents/select-person/index.wxss */ +page{ + height:100% +} +.rectifier_add_to{ + width: 100rpx; + height: 100rpx; + margin: auto; + background: #252d41; + text-align: center; + line-height: 110rpx; + font-size: 50rpx; + color: #57668f; + font-weight: bold; + border-radius: 5rpx; +} +.rectifier_max{ + width: 100%; + background: #232a44; + border-radius: 15rpx; + position: relative; + height: 100%; +} +.rectifier_title{ + position: relative; + background: #27304f; + border-radius: 15rpx; + text-align: center; + padding:20rpx 15rpx; +} +.rectifier_close{ + position: absolute; + width: 50rpx; + height: 50rpx; + right: 20rpx; + top: 12rpx; + line-height: 60rpx; + text-align: center; +} +.rectifier_list{ + padding:20rpx 40rpx; +} +.rectifier_list_height{ + height: 990rpx; + overflow: auto; +} +.rectifier_list_for{ + display: flex; + align-items: center; + padding: 18rpx 15rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.rectifier_list_radio{ + width: 70rpx; +} +.rectifier_list_radio_circle{ + width: 30rpx; + height: 30rpx; + border-radius: 50%; + border: 1px solid #6576a2; +} +.rectifier_list_radio_circle.active{ + background: #8262f3; + border: 1px solid #8262f3; +} +.rectifier_list_name{ + padding-left: 10rpx; + color: #6576a2; +} +.rectifier_list_name.active{ + color: #ffffff; +} +.rectifier_btn{ + display: flex; + align-items: center; + background: #27304f; + border-radius: 0 0 15rpx 15rpx; +} +.rectifier_btn view{ + width: 50%; + text-align: center; + height: 80rpx; + line-height: 80rpx; + color:#6874a4; +} +.rectifier_btn view:last-child{ + border-left: 1px solid #6874a4; + color: #ffffff; +} +.rectifier_list-group_for{ + height: 65rpx; + background-color: #879ff97d; + line-height: 65rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.inspect_input_fill_in { + height: 90rpx; + background: #212737; + border-radius: 10rpx; + padding: 0 30rpx; +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/yanzhu-ui-app/miniprogram/config.js b/yanzhu-ui-app/miniprogram/config.js index 62dcab21..aa17fc72 100644 --- a/yanzhu-ui-app/miniprogram/config.js +++ b/yanzhu-ui-app/miniprogram/config.js @@ -3,5 +3,6 @@ module.exports = { timeout: 60000, appId: "wx2350a5efb3f28e66", baseUrl: 'http://127.0.0.1:8080', + baseImgUrl: 'http://127.0.0.1:9300', noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin'] }; \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/images/exam-icon.png b/yanzhu-ui-app/miniprogram/images/exam-icon.png new file mode 100644 index 00000000..bf2b3a02 Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/exam-icon.png differ diff --git a/yanzhu-ui-app/miniprogram/images/loading_i.gif b/yanzhu-ui-app/miniprogram/images/loading_i.gif new file mode 100644 index 00000000..5366f352 Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/loading_i.gif differ diff --git a/yanzhu-ui-app/miniprogram/images/radio-selected.png b/yanzhu-ui-app/miniprogram/images/radio-selected.png new file mode 100644 index 00000000..c767d7a7 Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/radio-selected.png differ diff --git a/yanzhu-ui-app/miniprogram/images/radio.png b/yanzhu-ui-app/miniprogram/images/radio.png new file mode 100644 index 00000000..145db8ac Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/radio.png differ diff --git a/yanzhu-ui-app/miniprogram/images/todaySubmit2.png b/yanzhu-ui-app/miniprogram/images/todaySubmit2.png new file mode 100644 index 00000000..d3c00df7 Binary files /dev/null and b/yanzhu-ui-app/miniprogram/images/todaySubmit2.png differ diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss index afaf37be..a1726496 100644 --- a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss +++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0} \ No newline at end of file +@import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;font-weight:500;margin-bottom:10rpx;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#cccccc;color:var(--checkbox-label-color,#cccccc)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss index 96c81f0f..c35641dc 100644 --- a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss +++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;margin-left:10px;margin-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0} \ No newline at end of file +@import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;font-weight:500;margin-bottom:10rpx;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;margin-left:10px;margin-left:var(--radio-label-margin,10px);color:#cccccc;color:var(--radio-label-color,#cccccc);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js index c41e5ade..e813ce13 100644 --- a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js +++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js @@ -8,6 +8,10 @@ component_1.VantComponent({ icon: String, steps: Array, active: Number, + rejectNode:{ + type: Number, + value: 100, + }, direction: { type: String, value: 'horizontal', diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml index 29f1bfd0..376ffa58 100644 --- a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml +++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml @@ -5,7 +5,7 @@ {{ item.text }} - {{ item.desc }} + {{ item.desc }} @@ -32,7 +32,6 @@ } else if (index === active) { return 'process'; } - return 'inactive'; } module.exports = get; diff --git a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss index 9b94a646..69565bfa 100644 --- a/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss +++ b/yanzhu-ui-app/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:2px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step__title{padding-bottom: 10rpx;}.van-step__title .desc-class{color: #FFF;} \ No newline at end of file +@import '../common/index.wxss';.van-steps{overflow:hidden;background-color:#fff;background-color:var(--steps-background-color,#fff)}.van-steps--horizontal{padding:10px}.van-steps--horizontal .van-step__wrapper{position:relative;display:-webkit-flex;display:flex;overflow:hidden}.van-steps--vertical{padding-left:10px}.van-steps--vertical .van-step__wrapper{padding:0 0 0 20px}.van-step{position:relative;-webkit-flex:1;flex:1;font-size:14px;font-size:var(--step-font-size,14px);color:#969799;color:var(--step-text-color,#969799)}.van-step--finish{color:#323233;color:var(--step-finish-text-color,#323233)}.van-step__circle{border-radius:50%;width:5px;width:var(--step-circle-size,5px);height:5px;height:var(--step-circle-size,5px);background-color:#969799;background-color:var(--step-circle-color,#969799)}.van-step--horizontal{padding-bottom:14px}.van-step--horizontal:first-child .van-step__title{-webkit-transform:none;transform:none}.van-step--horizontal:first-child .van-step__circle-container{padding:0 8px 0 0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal:last-child{position:absolute;right:0;width:auto}.van-step--horizontal:last-child .van-step__title{text-align:right;-webkit-transform:none;transform:none}.van-step--horizontal:last-child .van-step__circle-container{right:0;padding:0 0 0 8px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}.van-step--horizontal .van-step__circle-container{position:absolute;bottom:6px;z-index:1;-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0);background-color:#fff;background-color:var(--white,#fff);padding:0 8px;padding:0 var(--padding-xs,8px)}.van-step--horizontal .van-step__title{display:inline-block;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);font-size:12px;font-size:var(--step-horizontal-title-font-size,12px)}.van-step--horizontal .van-step__line{position:absolute;right:0;bottom:6px;left:0;height:2px;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step--horizontal.van-step--process{color:#323233;color:var(--step-process-text-color,#323233)}.van-step--horizontal.van-step--process .van-step__icon{display:block;line-height:1;}.van-step--vertical{padding:10px 10px 10px 0;line-height:18px}.van-step--vertical:after{border-bottom-width:1px}.van-step--vertical:last-child:after{border-bottom-width:none}.van-step--vertical:first-child:before{position:absolute;top:0;left:-15px;z-index:1;width:1px;height:20px;content:"";background-color:#fff;background-color:var(--white,#fff)}.van-step--vertical .van-step__circle,.van-step--vertical .van-step__icon,.van-step--vertical .van-step__line{position:absolute;top:19px;left:-14px;z-index:2;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.van-step--vertical .van-step__icon{line-height:1;font-size:12px;font-size:var(--step-icon-size,12px)}.van-step--vertical .van-step__line{z-index:1;width:1px;height:100%;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0);background-color:#ebedf0;background-color:var(--step-line-color,#ebedf0)}.van-step__title{padding-bottom: 10rpx;} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.js b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.js index 57502cee..f462ae9a 100644 --- a/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.js +++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.js @@ -12,6 +12,10 @@ Component({ fileUrlArray:{ type:Array }, + iconClass:{ + type:String, + value:"in-add-click" + } }, /**数据监听 */ diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxml b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxml index 1f4c6015..c3d18e22 100644 --- a/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxml +++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxml @@ -8,7 +8,7 @@ - + diff --git a/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxss b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxss index 2db5ce3e..9d55434d 100644 --- a/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxss +++ b/yanzhu-ui-app/miniprogram/pages/components/file-uploader/index.wxss @@ -52,6 +52,23 @@ border-radius: 10rpx; background: #28345a url("http://fileimg.makalu.cc/WEB_162F576788AE44F08ADDFFC06CD5923F.png") no-repeat center/70%; } + + .in-zcard-click{ + width: 180rpx; + height:180rpx; + border: 1px dashed #28345a; + border-radius: 10rpx; + background: #28345a url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/xmgl/static/z_card.png") no-repeat center/100%; + } + + .in-fcard-click{ + width: 180rpx; + height:180rpx; + border: 1px dashed #28345a; + border-radius: 10rpx; + background: #28345a url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/xmgl/static/f_card.png") no-repeat center/100%; + } + .in-img-div image{ width: 180rpx; height: 180rpx; diff --git a/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxml b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxml index 5e818ec3..25cee3a7 100644 --- a/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxml +++ b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxml @@ -1,7 +1,7 @@ - + 点击签名 @@ -18,7 +18,8 @@ - + + 关闭 @@ -33,6 +34,7 @@ 确定 + diff --git a/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxss b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxss index 6455111f..522c7a6a 100644 --- a/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxss +++ b/yanzhu-ui-app/miniprogram/pages/components/sign/sign.wxss @@ -94,5 +94,9 @@ height: 150rpx; width: 280rpx; position: relative; +} +.ps{ + padding: 15rpx 0rpx; + border-radius: 10rpx; } \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/index/index.js b/yanzhu-ui-app/miniprogram/pages/index/index.js deleted file mode 100644 index e825fbc5..00000000 --- a/yanzhu-ui-app/miniprogram/pages/index/index.js +++ /dev/null @@ -1,211 +0,0 @@ -import { - findMyTask, - getUserInfo, - findMyProjectList, - selectRoleMenuList -} from '../../api/publics' -import { - loginOut -} from '../../api/login' -import { - removeToken -} from '../../utils/auth' -import { - checkApplyList - } from '../../api/projectApply' -const app = getApp(); -Page({ - - /** - * 页面的初始数据 - */ - data: { - userData: null, - menuList: [], - show: false, - todoDB: 0, - chckDB: 0, - isCheckRole: false - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - this.initMenuList(); - this.loadInfo(); - this.initMyTask(); - this.initMyProject(); - }, - - /** - * 加载用户信息 - */ - loadInfo() { - getUserInfo().then(res => { - if (res.code == 200) { - app.globalData.userData = res.data; - this.setData({ - userData: res.data - }) - let roles = res.data.roles; - if(roles!=null && roles.length>0){ - roles.forEach(role =>{ - if(role.roleId==88){ - this.setData({ - isCheckRole: true, - }) - let params = "activeName=dys&pageNum=1&pageSize=1000"; - checkApplyList(params).then(dbo =>{ - this.setData({ - chckDB: dbo.total, - }) - }) - } - }); - } - } - }); - }, - - initMenuList: function () { - var that = this; - selectRoleMenuList({}).then(res => { - if (res.code == 200) { - that.setData({ - menuList: res.data - }) - } - }); - }, - - initMyTask: function () { - findMyTask({}).then(res => { - this.setData({ - todoDB: res.data.todo - }) - }); - }, - - initMyProject: function () { - findMyProjectList().then(res => { - if (res.data.length > 0) { - let list = []; - let activeProject = false; - res.data.forEach(item => { - //判断选中项目是否在建中... - if (item.id == app.globalData.useProjectId) { - activeProject = true; - } - list.push({ - "id": item.id, - "text": item.name - }); - }); - app.globalData.projectInfoList = list; - if (!activeProject) { - //没有选中项目默认选中最新项目 - app.globalData.useProjectId = res.data[0].id; - app.globalData.useProjectName = res.data[0].name; - } - } - }); - }, - - /** - * 路由跳转 - */ - goMenu: function (event) { - wx.redirectTo({ - url: event.currentTarget.dataset.url - }) - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 左侧抽屉显示 - */ - showPopup() { - this.setData({ - show: true - }); - }, - - /** - * 左侧抽屉隐藏 - */ - onClosePopup() { - this.setData({ - show: false - }); - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - }, - - /** - * 修改密码 - */ - XGMM: function () { - wx.redirectTo({ - url: '../updatePwd/updatePwd' - }) - }, - - /** - * 退出登录 - */ - TCDL: function () { - loginOut().then(response => { - removeToken(); - wx.redirectTo({ - url: '../login/login', - }); - }); - } -}) \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/index/index.json b/yanzhu-ui-app/miniprogram/pages/index/index.json deleted file mode 100644 index ba2821f5..00000000 --- a/yanzhu-ui-app/miniprogram/pages/index/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "usingComponents": {}, - "navigationStyle":"custom" -} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/index/index.wxml b/yanzhu-ui-app/miniprogram/pages/index/index.wxml deleted file mode 100644 index 62f3022e..00000000 --- a/yanzhu-ui-app/miniprogram/pages/index/index.wxml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - 临建管家系统 - - - - - - - - - - - - {{userData.parDeptName}} - - - - - - - - - {{userData.nickName}} - - - - - - - 修改密码 - - - - - - - 退出登录 - - - - - - - - - - - {{userData.nickName}} - - - {{userData.dept.deptName}} - - - {{userData.parDeptName}} - - - - - - - - - - - {{todoDB}} - {{chckDB}} - - {{item.menuName}} - - - - - \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/index/index.wxss b/yanzhu-ui-app/miniprogram/pages/index/index.wxss deleted file mode 100644 index f29d951b..00000000 --- a/yanzhu-ui-app/miniprogram/pages/index/index.wxss +++ /dev/null @@ -1,64 +0,0 @@ -page { - background: #191d28 url("http://fileimg.makalu.cc/CORE_40247DD946964A15AA0D4000E1031E19.png") no-repeat bottom/100%; - } -.pro_user { - background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/login_name.png") no-repeat left/40rpx; - height: 80rpx; - line-height: 80rpx; - padding-left: 50rpx; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - word-break: break-all; -} - -.pro_dept { - background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/dept.png") no-repeat left/40rpx; - height: 80rpx; - line-height: 80rpx; - padding-left: 50rpx; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - word-break: break-all; -} - -.pro_project { - background: url("https://guangzhou.sxyanzhu.com/YZLJXM/profile/static/project.png") no-repeat left/40rpx; - height: 80rpx; - line-height: 80rpx; - padding-left: 50rpx; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - word-break: break-all; -} - -.pro_herads { - text-align: right; - margin-top: -280rpx; -} - -.pro_herads image { - width: 280rpx; - height: 280rpx; -} - -.menu_max { - padding: 10rpx 50rpx 0; -} - -.menu_min { - padding: 30rpx 0; - text-align: center; -} - -.menu_min image { - width: 150rpx; - height: 150rpx; -} - -.menu_min view { - padding: 10rpx; - color: #89a4eb; -} \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/login/login.js b/yanzhu-ui-app/miniprogram/pages/login/login.js index b1bb4f65..af58fe2b 100644 --- a/yanzhu-ui-app/miniprogram/pages/login/login.js +++ b/yanzhu-ui-app/miniprogram/pages/login/login.js @@ -26,7 +26,7 @@ Page({ code: '', uuid: '', codeUrl: '', - checked: true + checked: true, }, //获取填写的账号信息 diff --git a/yanzhu-ui-app/miniprogram/pages/login/login.json b/yanzhu-ui-app/miniprogram/pages/login/login.json index f8186c56..a59e8a09 100644 --- a/yanzhu-ui-app/miniprogram/pages/login/login.json +++ b/yanzhu-ui-app/miniprogram/pages/login/login.json @@ -3,5 +3,6 @@ "van-image": "@vant/weapp/image/index", "van-checkbox": "@vant/weapp/checkbox/index", "van-checkbox-group": "@vant/weapp/checkbox-group/index" - } + }, + "navigationStyle":"custom" } \ No newline at end of file diff --git a/yanzhu-ui-app/miniprogram/pages/login/login.wxml b/yanzhu-ui-app/miniprogram/pages/login/login.wxml index bfda00e3..3c4f0dee 100644 --- a/yanzhu-ui-app/miniprogram/pages/login/login.wxml +++ b/yanzhu-ui-app/miniprogram/pages/login/login.wxml @@ -5,6 +5,9 @@ + + +