Merge remote-tracking branch 'origin/dev_xd' into dev_xd
commit
c48a9130d7
|
@ -24,6 +24,7 @@ import com.yanzhu.system.api.model.LoginUser;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 登录校验方法
|
||||
|
@ -33,6 +34,10 @@ import java.util.Objects;
|
|||
@Component
|
||||
public class SysLoginService
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
private RemoteProService remoteProService;
|
||||
|
||||
|
@ -45,9 +50,6 @@ public class SysLoginService
|
|||
@Autowired
|
||||
private SysRecordLogService recordLogService;
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
|
@ -210,15 +212,7 @@ public class SysLoginService
|
|||
if(Objects.isNull(userResult.getData())){
|
||||
throw new ServiceException("登录失败,当前手机号未获取项目授权...");
|
||||
}
|
||||
R<SysUserUniopen> uniResult = remoteUserService.findByMaOpenId(loginBody.getOpenId(),SecurityConstants.INNER);
|
||||
if(Objects.isNull(uniResult) || Objects.isNull(uniResult.getData())){
|
||||
SysUserUniopen uniopen = new SysUserUniopen();
|
||||
uniopen.setUserId(userInfo.getUserid());
|
||||
uniopen.setUserName(userInfo.getUsername());
|
||||
uniopen.setUserNick(userInfo.getSysUser().getNickName());
|
||||
uniopen.setMaOpenId(loginBody.getOpenId());
|
||||
remoteUserService.addSysUserUniopen(uniopen,SecurityConstants.INNER);
|
||||
}
|
||||
redisService.setCacheObject("SysUserUniopen::"+phoneResult.get("phoneNumber"),loginBody.getOpenId(),12L, TimeUnit.HOURS);
|
||||
}else{
|
||||
throw new ServiceException("获取授权手机号失败...");
|
||||
}
|
||||
|
|
|
@ -50,10 +50,10 @@
|
|||
<select id="selectMyAwaitFlowTask" parameterType="FlowTaskEntity" resultType="Map">
|
||||
select fa.*
|
||||
<if test='activeTags == "depts"'>, sud.business_license_path as businessImg, bus.sub_dept_name as businessMk1, sdd.dict_label as businessMk2, sud.sub_dept_code as businessMk3</if>
|
||||
<if test='activeTags == "users"'>, sus.user_picture as businessImg, sus.card_code as businessMk1, sdd.dict_label as businessMk2, bus.sub_dept_name as businessMk3</if>
|
||||
<if test='activeTags == "users"'>, bus.user_picture as businessImg, bus.card_code as businessMk1, sdd.dict_label as businessMk2, bus.sub_dept_name as businessMk3</if>
|
||||
from vw_flow_await fa
|
||||
<if test='activeTags == "depts"'> left join pro_project_info_subdepts_users bus on bus.id = fa.businessKey left join pro_project_info_subdepts sud on sud.id = bus.sub_dept_id left join sys_dict_data sdd on sdd.dict_value = bus.sub_dept_type and sdd.dict_type='sub_dept_type' </if>
|
||||
<if test='activeTags == "users"'> left join pro_project_info_subdepts_users bus on bus.id = fa.businessKey left join sys_dict_data sdd on sdd.dict_value = bus.craft_post and sdd.dict_type='pro_craft_post' left join sys_user sus on sus.user_id = bus.user_id</if>
|
||||
<if test='activeTags == "users"'> left join pro_project_info_subdepts_users bus on bus.id = fa.businessKey left join sys_dict_data sdd on sdd.dict_value = bus.craft_post and sdd.dict_type='pro_craft_post'</if>
|
||||
where
|
||||
fa.taskName != '申请人提交'
|
||||
<if test="procDefName != null and procDefName != ''"> and fa.procDefName like concat('%', #{procDefName}, '%')</if>
|
||||
|
@ -125,10 +125,10 @@
|
|||
<select id="selectMyFinishedFlowTask" parameterType="FlowTaskEntity" resultType="Map">
|
||||
select fa.*
|
||||
<if test='activeTags == "depts"'>, sud.business_license_path as businessImg, bus.sub_dept_name as businessMk1, sdd.dict_label as businessMk2, sud.sub_dept_code as businessMk3</if>
|
||||
<if test='activeTags == "users"'>, sus.user_picture as businessImg, sus.card_code as businessMk1, sdd.dict_label as businessMk2, bus.sub_dept_name as businessMk3</if>
|
||||
<if test='activeTags == "users"'>, bus.user_picture as businessImg, bus.card_code as businessMk1, sdd.dict_label as businessMk2, bus.sub_dept_name as businessMk3</if>
|
||||
from vw_flow_finished fa
|
||||
<if test='activeTags == "depts"'> left join pro_project_info_subdepts_users bus on bus.id = fa.businessKey left join pro_project_info_subdepts sud on sud.id = bus.sub_dept_id left join sys_dict_data sdd on sdd.dict_value = bus.sub_dept_type and sdd.dict_type='sub_dept_type' </if>
|
||||
<if test='activeTags == "users"'> left join pro_project_info_subdepts_users bus on bus.id = fa.businessKey left join sys_dict_data sdd on sdd.dict_value = bus.craft_post and sdd.dict_type='pro_craft_post' left join sys_user sus on sus.user_id = bus.user_id</if>
|
||||
<if test='activeTags == "users"'> left join pro_project_info_subdepts_users bus on bus.id = fa.businessKey left join sys_dict_data sdd on sdd.dict_value = bus.craft_post and sdd.dict_type='pro_craft_post'</if>
|
||||
where
|
||||
fa.ASSIGNEE_=#{assigneeId}
|
||||
<if test="procDefName != null and procDefName != ''"> and fa.procDefName like concat('%', #{procDefName}, '%')</if>
|
||||
|
|
|
@ -51,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectBusExamInfoList" parameterType="BusExamInfo" resultMap="BusExamInfoResult">
|
||||
<include refid="selectBusExamInfoVo"/>
|
||||
<where>
|
||||
bei.is_del != 2
|
||||
<if test="comId != null "> and (bei.com_id = #{comId} or bei.com_id is null)</if>
|
||||
<if test="projectId != null "> and (bei.project_id = #{projectId} or bei.project_id is null)</if>
|
||||
<if test="activeComId != null "> and (bei.com_id = #{activeComId} or bei.com_id is null)</if>
|
||||
|
@ -60,8 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="examTitle != null and examTitle != ''"> and bei.exam_title = #{examTitle}</if>
|
||||
<if test="examType != null and examType != ''"> and bei.exam_type = #{examType}</if>
|
||||
<if test="craftType != null and craftType != ''"> and bei.craft_type = #{craftType}</if>
|
||||
<if test="craftPost != null and craftPost != ''"> and bei.craft_post = #{craftPost}</if>
|
||||
<if test="craftPost != null and craftPost != ''"> and find_in_set(#{craftPost},bei.craft_post)</if>
|
||||
<if test="isDel != null "> and bei.is_del = #{isDel}</if>
|
||||
and bei.is_del != 2
|
||||
</where>
|
||||
order by bei.id desc
|
||||
</select>
|
||||
|
|
|
@ -48,6 +48,7 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
|||
public TableDataInfo list(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||
{
|
||||
startPage();
|
||||
proProjectInfoSubdeptsUsers.setActiveTags("finished");
|
||||
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
|
@ -216,6 +216,9 @@ public class BusExamUserServiceImpl implements IBusExamUserService
|
|||
findExamInfo = examInfoList.get(randomIntBound);
|
||||
}
|
||||
|
||||
findExamInfo.setComId(userEntity.getComId());
|
||||
findExamInfo.setProjectId(userEntity.getProjectId());
|
||||
|
||||
// 获取试卷试题
|
||||
List<BusExamQuestion> questions = extractExamQuestion(findExamInfo,Objects.equals(CraftTypeEnums.GLRY.getCode(),examQuery.getCraftType())?null:userEntity.getCraftPost());
|
||||
// 试题重新排序
|
||||
|
|
|
@ -8,16 +8,17 @@ import com.yanzhu.common.core.constant.SecurityConstants;
|
|||
import com.yanzhu.common.core.domain.R;
|
||||
import com.yanzhu.common.core.enums.ShiFouEnums;
|
||||
import com.yanzhu.common.core.enums.UserTypeEnums;
|
||||
import com.yanzhu.common.core.text.Convert;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||
import com.yanzhu.common.redis.service.RedisService;
|
||||
import com.yanzhu.common.security.service.TokenService;
|
||||
import com.yanzhu.manage.domain.ProProjectInfo;
|
||||
import com.yanzhu.manage.mapper.ProProjectInfoMapper;
|
||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
||||
import com.yanzhu.system.api.RemoteProService;
|
||||
import com.yanzhu.system.api.RemoteUserService;
|
||||
import com.yanzhu.system.api.domain.SysDept;
|
||||
import com.yanzhu.system.api.domain.SysRoleDept;
|
||||
import com.yanzhu.system.api.domain.*;
|
||||
import com.yanzhu.system.api.model.LoginUser;
|
||||
import com.yanzhu.system.domain.*;
|
||||
import com.yanzhu.system.mapper.*;
|
||||
|
@ -39,8 +40,6 @@ import com.yanzhu.common.core.utils.StringUtils;
|
|||
import com.yanzhu.common.core.utils.bean.BeanValidators;
|
||||
import com.yanzhu.common.datascope.annotation.DataScope;
|
||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||
import com.yanzhu.system.api.domain.SysRole;
|
||||
import com.yanzhu.system.api.domain.SysUser;
|
||||
import com.yanzhu.system.service.ISysConfigService;
|
||||
import com.yanzhu.system.service.ISysUserService;
|
||||
|
||||
|
@ -54,6 +53,9 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
private SysDeptMapper deptMapper;
|
||||
|
||||
|
@ -94,6 +96,10 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
|
||||
@Autowired
|
||||
private ProProjectInfoMapper proProjectInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private SysUserUniopenMapper sysUserUniopenMapper;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
*
|
||||
|
@ -462,6 +468,20 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
user.setCreateTime(user.getUpdateTime());
|
||||
user.setUserType("99");
|
||||
userMapper.insertUser(user);
|
||||
try {
|
||||
String maOpenId = Convert.toStr(redisService.getCacheObject("SysUserUniopen::"+user.getPhonenumber()),null);
|
||||
if(StringUtils.isNotEmpty(maOpenId)){
|
||||
// 保存扫码记录
|
||||
SysUserUniopen uniopen = new SysUserUniopen();
|
||||
uniopen.setUserId(user.getUserId());
|
||||
uniopen.setUserName(user.getUserName());
|
||||
uniopen.setUserNick(user.getNickName());
|
||||
uniopen.setMaOpenId(maOpenId);
|
||||
sysUserUniopenMapper.insertSysUserUniopen(uniopen);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
List<SysUser> userComs=userMapper.selectUserComs(user.getUserId());
|
||||
if(userComs.size()==0){
|
||||
user.setIsActive(1l);
|
||||
|
|
|
@ -669,7 +669,7 @@ Page({
|
|||
_fileForm.fPost = "委托人";
|
||||
_fileForm.fDate = currDate[0] + "年" + currDate[1] + "月" + currDate[2] + "日";
|
||||
} else {
|
||||
_fileForm.fName = this.data.form.nickName;
|
||||
_fileForm.fName = this.data.form.userName;
|
||||
_fileForm.fCardId = this.data.form.cardCode;
|
||||
_fileForm.fSex = this.getGenderFromIdCard(this.data.form.cardCode);
|
||||
this.data.craftPostAllOrginList.forEach(item => {
|
||||
|
@ -1336,6 +1336,12 @@ Page({
|
|||
if (!form.subDeptLeaderCode) {
|
||||
app.toast("请填写委托人身份证号!");
|
||||
return false;
|
||||
}else{
|
||||
const cardCodePattern = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
|
||||
if(!cardCodePattern.test(form.subDeptLeaderCode)){
|
||||
app.toast("身份证号码不正确!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!form.subDeptLeaderPhone) {
|
||||
app.toast("请填写委托人联系电话!");
|
||||
|
@ -1518,7 +1524,14 @@ Page({
|
|||
if (!form.cardCode) {
|
||||
app.toast("请填写身份证号!");
|
||||
return false;
|
||||
}else{
|
||||
const cardCodePattern = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
|
||||
if(!cardCodePattern.test(form.cardCode)){
|
||||
app.toast("身份证号码不正确!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!form.userPhone) {
|
||||
app.toast("请填写联系电话!");
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue