Commit 4e1c0f5a authored by gaoyingwei's avatar gaoyingwei

修改查询万傲用户信息

parent ba959d4f
...@@ -261,53 +261,6 @@ public class ZKTecoServiceImpl implements IZKTecoService { ...@@ -261,53 +261,6 @@ public class ZKTecoServiceImpl implements IZKTecoService {
} }
} }
/**
* 生成
*
* @param userData
* @param certArray
* @return
*/
private JSONArray createUserDelCertData(SysUser userData, JSONArray certArray) {
JSONArray pushArrayData = new JSONArray();
for (int certIndex = 0; certIndex < certArray.size(); certIndex++) {
JSONObject certObj = certArray.getJSONObject(certIndex);
JSONObject cardService = new JSONObject();
cardService.put("itemId", UUID.randomUUID().toString());//凭证ID
//设备
JSONArray devicesArray = new JSONArray();
// deviceGuidAllArray.forEach(deviceMap -> {
// JSONObject device = new JSONObject();
// device.put("deviceGuid", deviceMap.get("deviceApGuid"));
// device.put("isDeleted", 1);
// devicesArray.add(device);
// });
cardService.put("deviceList", devicesArray);
//开通状态
cardService.put("isDeleted", 0);
//凭证类型
cardService.put("credentialType", certObj.getIntValue("voucherType"));
//凭证卡号
cardService.put("credentialNo", certObj.getString("voucherNo"));
//凭证状态 开通
cardService.put("credentialStatus", "BACKED");
//人员ID
cardService.put("personId", userData.getPersonId());
//有效日期
Date now = new Date();
DateTime startTime = DateUtil.beginOfYear(now);
cardService.put("serviceStartDate", DateUtil.format(startTime, "yyyy-MM-dd"));
//结束日期
DateTime endTime = DateUtil.offset(startTime, DateField.DAY_OF_YEAR, 8);
cardService.put("serviceEndDate", DateUtil.format(endTime, "yyyy-MM-dd"));
//有效星期
cardService.put("week", "1111111");
cardService.put("cardKey", RandomUtil.randomString("123456789", 4));
pushArrayData.add(cardService);
}
return pushArrayData;
}
/** /**
* 用户对象转换 * 用户对象转换
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<id column="record_id" jdbcType="VARCHAR" property="recordId"/> <id column="record_id" jdbcType="VARCHAR" property="recordId"/>
<result column="user_id" jdbcType="INTEGER" property="userId"/> <result column="user_id" jdbcType="INTEGER" property="userId"/>
<result column="person_id" jdbcType="VARCHAR" property="personId"/> <result column="person_id" jdbcType="VARCHAR" property="personId"/>
<result column="pin" jdbcType="VARCHAR" property="pin"/>
<result column="mobile" jdbcType="VARCHAR" property="mobile"/> <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
<result column="tenement_type" jdbcType="VARCHAR" property="tenementType"/> <result column="tenement_type" jdbcType="VARCHAR" property="tenementType"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/> <result column="remark" jdbcType="VARCHAR" property="remark"/>
...@@ -227,7 +228,7 @@ ...@@ -227,7 +228,7 @@
dr.device_type, dr.device_type,
dr.record_id, dr.record_id,
-- dr.user_id, -- dr.user_id,
dr.person_id, dr.person_id,dr.pin,
dr.mobile, dr.mobile,
dr.cross_time, dr.cross_time,
dr.flag, dr.flag,
...@@ -241,8 +242,8 @@ ...@@ -241,8 +242,8 @@
dr.device_id, dr.device_id,
dr.device_name dr.device_name
FROM door_record dr FROM door_record dr
-- left JOIN sys_user su ON dr.user_id = su.business_id left JOIN sys_user su ON dr.user_id = su.business_id
left join sys_user su ON dr.person_id = su.person_id -- left join sys_user su ON dr.person_id = su.person_id
Left join sys_dept d on su.dept_id = d.business_id Left join sys_dept d on su.dept_id = d.business_id
where dr.del_flag = '0' where dr.del_flag = '0'
and dr.tenement_type = '0' and dr.tenement_type = '0'
......
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
person_id, person_id,
nlt_bz, nlt_bz,
flag, flag,
sort sort,pin
from sys_user from sys_user
where del_flag = 0 where del_flag = 0
and business_id = #{businessId} and business_id = #{businessId}
...@@ -396,7 +396,7 @@ ...@@ -396,7 +396,7 @@
nlt_bz, nlt_bz,
flag, flag,
first_date, first_date,
last_date last_date,pin
from sys_user from sys_user
where del_flag = 0 where del_flag = 0
and business_id = (select distinct user_id from visit_user v where v.person_id = #{personId}) and business_id = (select distinct user_id from visit_user v where v.person_id = #{personId})
......
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