Commit 29840916 authored by 罗可心's avatar 罗可心 😕

Merge remote-tracking branch 'origin/dev' into dev

parents f84729a3 7103ea63
...@@ -53,7 +53,6 @@ public class JieLinkInterController { ...@@ -53,7 +53,6 @@ public class JieLinkInterController {
} }
@CyOpeLogAnno(title = "jieLinkInter-同步设备信息", businessType = CyLogTypeEnum.INSERT)
@ApiOperation(value="捷顺对接集成", notes="同步设备信息") @ApiOperation(value="捷顺对接集成", notes="同步设备信息")
@GetMapping(value = "/syncDeviceData") @GetMapping(value = "/syncDeviceData")
public JieLinkResultDto syncDeviceData() { public JieLinkResultDto syncDeviceData() {
......
...@@ -14,7 +14,7 @@ import org.rcisoft.core.operlog.enums.CyLogTypeEnum; ...@@ -14,7 +14,7 @@ import org.rcisoft.core.operlog.enums.CyLogTypeEnum;
import org.rcisoft.core.result.enums.CyReSysExcEnum; import org.rcisoft.core.result.enums.CyReSysExcEnum;
import org.rcisoft.core.util.CyEpExcelUtil; import org.rcisoft.core.util.CyEpExcelUtil;
import org.rcisoft.core.util.CyQrCodeUtil; import org.rcisoft.core.util.CyQrCodeUtil;
import org.rcisoft.sys.sysuser.dao.SysUserRepositorys; import org.rcisoft.integration.jieLink.service.IJieLinkService;
import org.rcisoft.sys.sysuser.dto.ExportUserDTO; import org.rcisoft.sys.sysuser.dto.ExportUserDTO;
import org.rcisoft.sys.sysuser.entity.SysUser; import org.rcisoft.sys.sysuser.entity.SysUser;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
...@@ -36,9 +36,6 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -36,9 +36,6 @@ import org.springframework.web.multipart.MultipartFile;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -52,6 +49,9 @@ public class SysUserController extends CyPaginationController<SysUser> { ...@@ -52,6 +49,9 @@ public class SysUserController extends CyPaginationController<SysUser> {
@Autowired @Autowired
private SysUserService sysUserServiceImpl; private SysUserService sysUserServiceImpl;
@Autowired
private IJieLinkService jieLinkServiceImpl;
//@PreAuthorize("@cyPerm.hasPerm('sys:user:add')") //@PreAuthorize("@cyPerm.hasPerm('sys:user:add')")
@CyOpeLogAnno(title = "system-用户表管理-新增用户表", businessType = CyLogTypeEnum.INSERT) @CyOpeLogAnno(title = "system-用户表管理-新增用户表", businessType = CyLogTypeEnum.INSERT)
@ApiOperation(value = "添加用户表", notes = "添加用户表") @ApiOperation(value = "添加用户表", notes = "添加用户表")
...@@ -150,6 +150,15 @@ public class SysUserController extends CyPaginationController<SysUser> { ...@@ -150,6 +150,15 @@ public class SysUserController extends CyPaginationController<SysUser> {
sysUserServiceImpl.findAllByData(sysUser)); sysUserServiceImpl.findAllByData(sysUser));
} }
//查询所有数据字典
@GetMapping(value = "/queryDataAll/{dictType:\\w+}")
public CyResult queryDataAll(SysUser sysUser) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
sysUserServiceImpl.findAllByDataAll(sysUser));
}
//查询部门 //查询部门
@GetMapping(value = "/queryDept") @GetMapping(value = "/queryDept")
public CyResult queryDept(SysUser sysUser) { public CyResult queryDept(SysUser sysUser) {
...@@ -221,14 +230,16 @@ public class SysUserController extends CyPaginationController<SysUser> { ...@@ -221,14 +230,16 @@ public class SysUserController extends CyPaginationController<SysUser> {
* 获取 二维码接口地址 * 获取 二维码接口地址
* 配置文件需要 配置 前缀 * 配置文件需要 配置 前缀
* *
* @param businessId * @param personId
* @return * @return
* @deprecated 前端生成 二维码 * @deprecated 前端生成 二维码
* 后端返回 base64 * 后端返回 base64
*/ */
@GetMapping("/getTradeScan/{businessId:\\w+}") @GetMapping("/getTradeScan/{personId:\\w+}")
@ResponseBody @ResponseBody
public CyResult getTradeScan(@PathVariable Integer businessId) { public CyResult getTradeScan(@PathVariable String personId) {
// 根据用户id获取personId
// String codeUrl = jieLinkServiceImpl.pullVisitUserQrCode(personId);
String codeUrl = "sysUserServiceImpl.findById(businessId).toString()"; String codeUrl = "sysUserServiceImpl.findById(businessId).toString()";
String png_base64 = null; String png_base64 = null;
//返回二维码 并且构造支付包web支付对象 //返回二维码 并且构造支付包web支付对象
......
...@@ -30,6 +30,8 @@ public interface SysDictDataRepositorys extends CyBaseMapper<SysDictData> { ...@@ -30,6 +30,8 @@ public interface SysDictDataRepositorys extends CyBaseMapper<SysDictData> {
//查询字典 //查询字典
List<SysUser> queryData(SysUser sysUser); List<SysUser> queryData(SysUser sysUser);
//查询全部字典
List<SysUser> queryDataAll(SysUser sysUser);
//根据职位id查询职位字典 //根据职位id查询职位字典
List<SysDictData> queryDataByPosition(String position); List<SysDictData> queryDataByPosition(String position);
......
...@@ -44,6 +44,8 @@ public interface SysUserRepositorys extends CyBaseMapper<SysUser> { ...@@ -44,6 +44,8 @@ public interface SysUserRepositorys extends CyBaseMapper<SysUser> {
List<SysUser> querySysUsersByPhone(String phone); List<SysUser> querySysUsersByPhone(String phone);
List<SysUser> querySysUsersByPhoneOUt(@Param("phone") String phone,@Param("userId")Integer userId);
List<SysUser> querySysUsersByUserName(String username); List<SysUser> querySysUsersByUserName(String username);
List<SysUser> querySysUsersByDId(Integer businessId); List<SysUser> querySysUsersByDId(Integer businessId);
......
...@@ -322,6 +322,9 @@ public class SysUser extends CyIdIncreEntity<SysUser> { ...@@ -322,6 +322,9 @@ public class SysUser extends CyIdIncreEntity<SysUser> {
// @Excel(name = "人脸信息", orderNum = "23", width = 20) // @Excel(name = "人脸信息", orderNum = "23", width = 20)
private String faceAddress; private String faceAddress;
// 管理员状态(0停,1起)
private String glFlag;
/** /**
* @desc 黑名单状态(0不存在1存在) * @desc 黑名单状态(0不存在1存在)
* @column blacklist_flag * @column blacklist_flag
......
...@@ -76,6 +76,8 @@ public interface SysUserService { ...@@ -76,6 +76,8 @@ public interface SysUserService {
//查询字典 //查询字典
List<SysUser> findAllByData(SysUser sysUser); List<SysUser> findAllByData(SysUser sysUser);
List<SysUser> findAllByDataAll(SysUser sysUser);
//查询部门 //查询部门
List<SysUser> findAllByDept(SysUser sysUser); List<SysUser> findAllByDept(SysUser sysUser);
......
...@@ -101,9 +101,9 @@ public class CheckUtil { ...@@ -101,9 +101,9 @@ public class CheckUtil {
if (StringUtils.isEmpty(visitInfoDto.getVisitPhone())) if (StringUtils.isEmpty(visitInfoDto.getVisitPhone()))
notTrue.add("访客手机号不能为空"); notTrue.add("访客手机号不能为空");
// 判断访客姓名和手机号是否数量匹配 // 判断访客姓名和手机号是否数量匹配
List<String> userName = Arrays.asList(visitInfoDto.getVisitName().split(",")).stream() List<String> userName = Arrays.asList(visitInfoDto.getVisitName().split(",|,")).stream()
.filter(u -> StringUtils.isNotEmpty(u)).collect(Collectors.toList()); .filter(u -> StringUtils.isNotEmpty(u)).collect(Collectors.toList());
List<String> phone = Arrays.asList(visitInfoDto.getVisitPhone().split(",")).stream() List<String> phone = Arrays.asList(visitInfoDto.getVisitPhone().split(",|,")).stream()
.filter(p -> StringUtils.isNotEmpty(p)).distinct() .filter(p -> StringUtils.isNotEmpty(p)).distinct()
.collect(Collectors.toList()); .collect(Collectors.toList());
if (userName.size() != phone.size()) if (userName.size() != phone.size())
......
...@@ -183,7 +183,10 @@ public class VisitInfomationServiceImpl extends ServiceImpl<VisitInfomationRepos ...@@ -183,7 +183,10 @@ public class VisitInfomationServiceImpl extends ServiceImpl<VisitInfomationRepos
*/ */
public CyPersistModel forbidden(VisitInfoMation visitInfomation){ public CyPersistModel forbidden(VisitInfoMation visitInfomation){
visitInfomation.setVisitStatus("2"); visitInfomation.setVisitStatus("2");
// 禁用邀访信息
int line = baseMapper.updateById(visitInfomation); int line = baseMapper.updateById(visitInfomation);
// 撤销邀访
//jieLinkService.cancelVisitorData(null, visitInfomation.getItemId());
return new CyPersistModel(line); return new CyPersistModel(line);
} }
...@@ -671,7 +674,7 @@ public class VisitInfomationServiceImpl extends ServiceImpl<VisitInfomationRepos ...@@ -671,7 +674,7 @@ public class VisitInfomationServiceImpl extends ServiceImpl<VisitInfomationRepos
} }
// 设置邀访信息访问区域 // 设置邀访信息访问区域
if (visitInfoDto.getVisitRegion().length() > 0) { if (visitInfoDto.getVisitRegion().length() > 0) {
String[] regions = visitInfoDto.getVisitRegion().split(","); String[] regions = visitInfoDto.getVisitRegion().split(",|,");
visitInfoMation.setVisitRegion(visitInfoDto.getVisitRegion()); visitInfoMation.setVisitRegion(visitInfoDto.getVisitRegion());
String regionCode = ""; String regionCode = "";
for (String region : regions) { for (String region : regions) {
...@@ -695,9 +698,9 @@ public class VisitInfomationServiceImpl extends ServiceImpl<VisitInfomationRepos ...@@ -695,9 +698,9 @@ public class VisitInfomationServiceImpl extends ServiceImpl<VisitInfomationRepos
visitInfoMation.setVisitRealTime(dateFormat.parse(time)); visitInfoMation.setVisitRealTime(dateFormat.parse(time));
List<VisitUser> userList = new ArrayList<>(); List<VisitUser> userList = new ArrayList<>();
// 判断访客姓名和手机号是否数量匹配 // 判断访客姓名和手机号是否数量匹配
List<String> visitName = Arrays.asList(visitInfoDto.getVisitName().split(",")).stream() List<String> visitName = Arrays.asList(visitInfoDto.getVisitName().split(",|,")).stream()
.filter(u -> StringUtils.isNotEmpty(u)).collect(Collectors.toList()); .filter(u -> StringUtils.isNotEmpty(u)).collect(Collectors.toList());
List<String> visitPhone = Arrays.asList(visitInfoDto.getVisitPhone().split(",")).stream() List<String> visitPhone = Arrays.asList(visitInfoDto.getVisitPhone().split(",|,")).stream()
.filter(p -> StringUtils.isNotEmpty(p)).distinct() .filter(p -> StringUtils.isNotEmpty(p)).distinct()
.collect(Collectors.toList()); .collect(Collectors.toList());
for (int i = 0; i < visitName.size(); i++) { for (int i = 0; i < visitName.size(); i++) {
......
...@@ -11,7 +11,8 @@ public class UserDto extends SysUserRbac { ...@@ -11,7 +11,8 @@ public class UserDto extends SysUserRbac {
private String positionLabel; private String positionLabel;
@Transient @Transient
private String position; private String position;
@Transient
private String personId;
//黑名单状态(0不存在1存在) //黑名单状态(0不存在1存在)
@Transient @Transient
private String blacklistFlag; private String blacklistFlag;
......
...@@ -90,7 +90,8 @@ wx: ...@@ -90,7 +90,8 @@ wx:
appId: wx16cfb2d12e4ab57c appId: wx16cfb2d12e4ab57c
secret: 37556072ad536b8d9d6cf5fb638fec88 secret: 37556072ad536b8d9d6cf5fb638fec88
timeOut: 3600 timeOut: 3600
jieLink: jieLink:
apiUrl: http://192.168.18.192:8091 apiUrl: http://192.168.18.192:8091
account: 9999 account: 9999
pwd: 123456 pwd: 123456
\ No newline at end of file
...@@ -93,3 +93,8 @@ wx: ...@@ -93,3 +93,8 @@ wx:
appId: wxeaf4e41658aad634 appId: wxeaf4e41658aad634
secret: 1e7727cec4a9a85fe009a2ee6ee5aaf7 secret: 1e7727cec4a9a85fe009a2ee6ee5aaf7
timeOut: 3600 timeOut: 3600
jieLink:
apiUrl: http://192.168.18.192:8091
account: 9999
pwd: 123456
...@@ -55,6 +55,13 @@ ...@@ -55,6 +55,13 @@
and del_flag = 0 and del_flag = 0
</select> </select>
<select id="queryDataAll" resultMap="BaseResultMap">
SELECT *
FROM sys_dict_data
WHERE dict_type = #{dictType}
and del_flag = 0
</select>
<select id="queryDataByPosition" resultMap="BaseResultMap"> <select id="queryDataByPosition" resultMap="BaseResultMap">
SELECT * SELECT *
FROM sys_dict_data FROM sys_dict_data
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<result column="person_id" jdbcType="VARCHAR" property="personId"/> <result column="person_id" jdbcType="VARCHAR" property="personId"/>
<result column="nick_name" jdbcType="VARCHAR" property="nickName"/> <result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
<result column="user_type" jdbcType="VARCHAR" property="userType"/> <result column="user_type" jdbcType="VARCHAR" property="userType"/>
<result column="person_id" jdbcType="VARCHAR" property="personId"/>
<result column="name" jdbcType="VARCHAR" property="name"/> <result column="name" jdbcType="VARCHAR" property="name"/>
<result column="email" jdbcType="VARCHAR" property="email"/> <result column="email" jdbcType="VARCHAR" property="email"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/> <result column="phone" jdbcType="VARCHAR" property="phone"/>
...@@ -45,6 +44,7 @@ ...@@ -45,6 +44,7 @@
<result column="position" jdbcType="VARCHAR" property="position"/> <result column="position" jdbcType="VARCHAR" property="position"/>
<result column="position_label" jdbcType="VARCHAR" property="positionLabel"/> <result column="position_label" jdbcType="VARCHAR" property="positionLabel"/>
<result column="username" jdbcType="VARCHAR" property="username"/> <result column="username" jdbcType="VARCHAR" property="username"/>
<result column="person_id" jdbcType="VARCHAR" property="personId"/>
<result column="password" jdbcType="VARCHAR" property="password"/> <result column="password" jdbcType="VARCHAR" property="password"/>
<result column="nick_name" jdbcType="VARCHAR" property="nickName"/> <result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
<result column="user_type" jdbcType="VARCHAR" property="userType"/> <result column="user_type" jdbcType="VARCHAR" property="userType"/>
...@@ -73,12 +73,13 @@ ...@@ -73,12 +73,13 @@
<result column="blacklist_flag" jdbcType="TIMESTAMP" property="blacklistFlag"/> <result column="blacklist_flag" jdbcType="TIMESTAMP" property="blacklistFlag"/>
</resultMap> </resultMap>
<!-- wx小程序查询使用--> <!-- wx小程序查询使用-->
<resultMap id="UserDtoMap" type="org.rcisoft.tencent.dto.UserDto"> <resultMap id="UserDtoMap" type="org.rcisoft.tencent.dto.UserDto">
<id column="business_id" jdbcType="INTEGER" property="businessId"/> <id column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="position" jdbcType="VARCHAR" property="position"/> <result column="position" jdbcType="VARCHAR" property="position"/>
<result column="position_label" jdbcType="VARCHAR" property="positionLabel"/> <result column="position_label" jdbcType="VARCHAR" property="positionLabel"/>
<result column="username" jdbcType="VARCHAR" property="username"/> <result column="username" jdbcType="VARCHAR" property="username"/>
<result column="person_id" jdbcType="VARCHAR" property="personId"/>
<result column="password" jdbcType="VARCHAR" property="password"/> <result column="password" jdbcType="VARCHAR" property="password"/>
<result column="nick_name" jdbcType="VARCHAR" property="nickName"/> <result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
<result column="user_type" jdbcType="VARCHAR" property="userType"/> <result column="user_type" jdbcType="VARCHAR" property="userType"/>
...@@ -216,6 +217,7 @@ ...@@ -216,6 +217,7 @@
create_date , create_date ,
update_date , update_date ,
password , password ,
gl_flag,
<if test="addressLabel != null">address_label ,</if> <if test="addressLabel != null">address_label ,</if>
<if test="positionLabel != null">position_label ,</if> <if test="positionLabel != null">position_label ,</if>
<if test="nltBzLabel != null">nlt_bz_label ,</if> <if test="nltBzLabel != null">nlt_bz_label ,</if>
...@@ -236,6 +238,7 @@ ...@@ -236,6 +238,7 @@
#{createDate}, #{createDate},
#{updateDate}, #{updateDate},
#{password}, #{password},
'1',
<if test="addressLabel != null">#{addressLabel},</if> <if test="addressLabel != null">#{addressLabel},</if>
<if test="positionLabel != null">#{positionLabel},</if> <if test="positionLabel != null">#{positionLabel},</if>
<if test="nltBzLabel != null">#{nltBzLabel},</if> <if test="nltBzLabel != null">#{nltBzLabel},</if>
...@@ -265,6 +268,7 @@ ...@@ -265,6 +268,7 @@
<if test="entity.identity != null">identity = #{entity.identity},</if> <if test="entity.identity != null">identity = #{entity.identity},</if>
<if test="entity.nltBzLabel != null">nlt_bz_label = #{entity.nltBzLabel},</if> <if test="entity.nltBzLabel != null">nlt_bz_label = #{entity.nltBzLabel},</if>
<if test="entity.password != null">password = #{entity.password},</if> <if test="entity.password != null">password = #{entity.password},</if>
<if test="entity.glFlag != null">gl_flag = #{entity.glFlag},</if>
</trim> </trim>
where business_id = #{entity.businessId} where business_id = #{entity.businessId}
</update> </update>
...@@ -403,9 +407,9 @@ ...@@ -403,9 +407,9 @@
</select> </select>
<select id="selectByOpenidWx" resultMap="UserDtoMap"> <select id="selectByOpenidWx" resultMap="UserDtoMap">
select su.* ,sd.dept_name dept_name select su.*, sd.dept_name dept_name
from sys_user su from sys_user su
left join sys_dept sd on su.dept_id = sd.business_id left join sys_dept sd on su.dept_id = sd.business_id
where su.wx_openid = #{openid} where su.wx_openid = #{openid}
and su.del_flag = 0 and su.del_flag = 0
</select> </select>
...@@ -417,18 +421,25 @@ ...@@ -417,18 +421,25 @@
</select> </select>
<select id="selectByPhoneWx" resultMap="UserDtoMap"> <select id="selectByPhoneWx" resultMap="UserDtoMap">
select su.* ,sd.dept_name dept_name select su.*, sd.dept_name dept_name
from sys_user su from sys_user su
left join sys_dept sd on su.dept_id = sd.business_id left join sys_dept sd on su.dept_id = sd.business_id
where su.phone = #{phone} where su.phone = #{phone}
and su.del_flag = 0 and su.del_flag = 0
</select> </select>
<select id="selectByUserId" resultMap="UserDtoMap"> <select id="selectByUserId" resultMap="UserDtoMap">
select su.* ,sd.dept_name dept_name select su.*, sd.dept_name dept_name
from sys_user su from sys_user su
left join sys_dept sd on su.dept_id = sd.business_id left join sys_dept sd on su.dept_id = sd.business_id
where su.business_id = #{businessId} where su.business_id = #{businessId}
and su.del_flag = 0 and su.del_flag = 0
</select> </select>
<select id="querySysUsersByPhoneOUt" resultType="org.rcisoft.sys.sysuser.entity.SysUser">
select *
from sys_user
where phone = #{phone}
and business_id !=#{userId}
and del_flag = 0
</select>
</mapper> </mapper>
...@@ -139,14 +139,14 @@ ...@@ -139,14 +139,14 @@
and date_format(su.last_date,'%Y-%m-%d') &lt;= date_format(#{entity.lastDateQueryEnd},'%Y-%m-%d') and date_format(su.last_date,'%Y-%m-%d') &lt;= date_format(#{entity.lastDateQueryEnd},'%Y-%m-%d')
</if> </if>
<if test="entity.sort == '1'.toString() "><!-- 排序--> <if test="entity.sort == '1'.toString() "><!-- 排序-->
order BY su.first_date,su.create_time desc order BY su.first_date,su.create_date desc
</if> </if>
<if test="entity.sort == '2'.toString() "><!-- 排序--> <if test="entity.sort == '2'.toString() "><!-- 排序-->
-- order BY su.name desc -- order BY su.name desc
order BY F_GET_PYJM(su.name) order BY F_GET_PYJM(su.name)
</if> </if>
<if test="entity.sort == '3'.toString() "><!-- 排序--> <if test="entity.sort == '3'.toString() "><!-- 排序-->
order BY su.last_date,su.create_time desc order BY su.last_date,su.create_date desc
</if> </if>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment