parent
09d8da3c43
commit
33b9d1bb76
|
@ -11,7 +11,7 @@
|
|||
Target Server Version : 50725
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 26/04/2021 09:40:34
|
||||
Date: 26/04/2021 11:08:15
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
|
@ -7710,10 +7710,10 @@ CREATE TABLE `sys_role` (
|
|||
-- Records of sys_role
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_role` VALUES (100, '平台管理员', 100, '平台管理员', NULL, '2020-05-14 11:03:54', '路人甲', NULL, NULL, NULL);
|
||||
INSERT INTO `sys_role` VALUES (1000, '运营商管理员', 1000, '所有功能及数据', NULL, '2020-04-02 21:31:47', '路人甲', NULL, NULL, NULL);
|
||||
INSERT INTO `sys_role` VALUES (2000, '区域管理员', 2000, '管理指定区域及以下区域所有数据', NULL, '2020-04-02 21:11:16', '路人甲', NULL, NULL, NULL);
|
||||
INSERT INTO `sys_role` VALUES (3000, '小区主管', 3000, '管理指定小区数据', NULL, '2020-04-02 21:11:16', '路人甲', NULL, NULL, NULL);
|
||||
INSERT INTO `sys_role` VALUES (100, '平台管理员', 100, '平台管理员', NULL, '2020-05-14 11:03:54', 'admin', NULL, NULL, NULL);
|
||||
INSERT INTO `sys_role` VALUES (1000, '运营商管理员', 1000, '所有功能及数据', NULL, '2020-04-02 21:31:47', 'admin', NULL, NULL, NULL);
|
||||
INSERT INTO `sys_role` VALUES (2000, '区域管理员', 2000, '管理指定区域及以下区域所有数据', NULL, '2020-04-02 21:11:16', 'admin', NULL, NULL, NULL);
|
||||
INSERT INTO `sys_role` VALUES (3000, '小区主管', 3000, '管理指定小区数据', NULL, '2020-04-02 21:11:16', 'admin', NULL, NULL, NULL);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -7940,7 +7940,7 @@ CREATE TABLE `sys_user` (
|
|||
-- Records of sys_user
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_user` VALUES (1, 1, 'admin', 'js1hFvoKLUSRIfluuWO5', '424424a14ae460df93b3b734f1e46162c412c6eb1cf4ae5ce3bfac96836cdad7', '路人甲', NULL, NULL, '路人甲', '1@163.com', '15822222223', 1, NULL, 'admin', '2020-01-01 12:01:01', 'admin', '2020-01-01 12:01:01', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO `sys_user` VALUES (1, 1, 'admin', 'js1hFvoKLUSRIfluuWO5', '424424a14ae460df93b3b734f1e46162c412c6eb1cf4ae5ce3bfac96836cdad7', '路人甲', NULL, NULL, '平台超管', '1@163.com', '15822222223', 1, NULL, 'admin', '2020-01-01 12:01:01', 'admin', '2020-01-01 12:01:01', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -7959,7 +7959,7 @@ CREATE TABLE `sys_user_role` (
|
|||
-- Records of sys_user_role
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_user_role` VALUES (239, 1, 100, NULL);
|
||||
INSERT INTO `sys_user_role` VALUES (1, 1, 100, NULL);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
@ -7979,7 +7979,6 @@ CREATE TABLE `sys_user_token` (
|
|||
-- Records of sys_user_token
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
INSERT INTO `sys_user_token` VALUES (1, '3f737bbc960e1129d4d0f5420de212c4', '2021-04-26 17:07:25', '2021-04-25 17:07:25');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
|
|
|
@ -140,6 +140,14 @@ public class AppApiController {
|
|||
return R.error("姓名在此房间已存在");
|
||||
}
|
||||
|
||||
if(tenPerson.getIdCard()!=null){
|
||||
TenPersonEntity tenPersonIdcard = tenPersonService.findByIdCard(tenPerson.getIdCard(),
|
||||
tenPerson.getRoomId(),tenPerson.getCellId());
|
||||
if(tenPersonIdcard!=null){
|
||||
return R.error("身份证在此房间已存在");
|
||||
}
|
||||
}
|
||||
|
||||
int res = tenPersonService.save(tenPerson);
|
||||
if (res==2) {
|
||||
return R.error("照片未检测到人脸");
|
||||
|
@ -479,6 +487,14 @@ public class AppApiController {
|
|||
return R.error("姓名在此房间已存在");
|
||||
}
|
||||
|
||||
if(tenPerson.getIdCard()!=null){
|
||||
TenPersonEntity tenPersonIdcard = tenPersonService.findByIdCard(tenPerson.getIdCard(),
|
||||
tenPerson.getRoomId(),tenPerson.getCellId());
|
||||
if(tenPersonIdcard!=null){
|
||||
return R.error("身份证在此房间已存在");
|
||||
}
|
||||
}
|
||||
|
||||
long id = new SnowflakeIdWorker().nextId();
|
||||
tenPerson.setPersonId(id);
|
||||
tenPerson.setUuid(UUIDUtil.uuid());
|
||||
|
@ -544,6 +560,14 @@ public class AppApiController {
|
|||
return R.error("姓名在此房间已存在");
|
||||
}
|
||||
|
||||
if(tenPerson.getIdCard()!=null){
|
||||
TenPersonEntity tenPersonIdcard = tenPersonService.findByIdCard(tenPerson.getIdCard(),
|
||||
tenPerson.getRoomId(),tenPerson.getCellId());
|
||||
if(tenPersonIdcard!=null){
|
||||
return R.error("身份证在此房间已存在");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int res = tenPersonService.save(tenPerson);
|
||||
|
|
|
@ -326,7 +326,9 @@ public class CarOpenApi {
|
|||
int carType = bizContent.getIntValue("carType");
|
||||
String imgUrl = bizContent.getString("imgUrl");
|
||||
//去掉 amp;
|
||||
if(imgUrl!=null){
|
||||
imgUrl = imgUrl.replace("amp;", "");
|
||||
}
|
||||
|
||||
String fileName = "car/" + parkCode + "/" + UUIDUtil.uuid() + ".jpg";
|
||||
if (!StringUtils.isEmpty(imgUrl)) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.alibaba.excel.event.AnalysisEventListener;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.minio.PutObjectOptions;
|
||||
import lombok.Getter;
|
||||
import net.shapelight.common.utils.R;
|
||||
import net.shapelight.common.utils.UUIDUtil;
|
||||
import net.shapelight.commons.engine.sdk.PicSDK;
|
||||
import net.shapelight.modules.excel.model.PersonModel;
|
||||
|
@ -133,6 +134,15 @@ public class PersonExcelListener extends AnalysisEventListener<PersonModel> {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
TenPersonEntity tenPersonEntityIdCord = tenPersonService.findByIdCard(personModel.getIdCard(),
|
||||
tenRoomEntity.getRoomId(),cellEntity.getCellId());
|
||||
if(tenPersonEntityIdCord!=null){
|
||||
personModel.setMessage("身份证在此房间已存在");
|
||||
list.add(personModel);
|
||||
return;
|
||||
}
|
||||
|
||||
String gender = personModel.getGender();
|
||||
if(gender==null){
|
||||
personModel.setMessage("性别为空");
|
||||
|
|
|
@ -185,7 +185,7 @@ public class XaRealDataTask implements ITask {
|
|||
XaSYRK realPerson = new XaSYRK();
|
||||
TenRoomEntity roomEntity = tenRoomService.getById(person.getRoomId(), person.getCellId());
|
||||
TenAddressEntity addressEntity = tenAddressService.getById(roomEntity.getPId());
|
||||
|
||||
if(addressEntity!=null){
|
||||
String idcard = person.getIdCard();
|
||||
if (idcard.length() >= 18) {
|
||||
idcard = idcard.substring(0, 18);
|
||||
|
@ -222,7 +222,9 @@ public class XaRealDataTask implements ITask {
|
|||
count++;
|
||||
if (count >= 50)
|
||||
break;
|
||||
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(count == 0){
|
||||
return;
|
||||
|
@ -267,7 +269,7 @@ public class XaRealDataTask implements ITask {
|
|||
for (TenPersonEntity person : persons) {
|
||||
TenRoomEntity roomEntity = tenRoomService.getById(person.getRoomId(), person.getCellId());
|
||||
TenAddressEntity addressEntity = tenAddressService.getById(roomEntity.getPId());
|
||||
|
||||
if(addressEntity!=null){
|
||||
XaMJKXX realCard = new XaMJKXX();
|
||||
realCard.setLV_MJKLX("4");
|
||||
realCard.setLV_DJSJ(DateUtils.format(new Date(), "yyyyMMddHHmmss"));
|
||||
|
@ -284,6 +286,7 @@ public class XaRealDataTask implements ITask {
|
|||
if (count >= 50)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(count == 0){
|
||||
return;
|
||||
|
|
|
@ -349,6 +349,14 @@ public class TenPersonController extends AbstractController {
|
|||
}
|
||||
|
||||
|
||||
if(tenPerson.getIdCard()!=null){
|
||||
TenPersonEntity tenPersonIdcard = tenPersonService.findByIdCard(tenPerson.getIdCard(),
|
||||
tenPerson.getRoomId(),tenPerson.getCellId());
|
||||
if(tenPersonIdcard!=null){
|
||||
return R.error("身份证在此房间已存在");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
long id = new SnowflakeIdWorker().nextId();
|
||||
tenPerson.setPersonId(id);
|
||||
|
@ -388,6 +396,18 @@ public class TenPersonController extends AbstractController {
|
|||
}
|
||||
}
|
||||
|
||||
if(tenPerson.getIdCard()!=null){
|
||||
TenPersonEntity oldPerson = tenPersonService.getById(tenPerson.getPersonId(),tenPerson.getCellId());
|
||||
if(!tenPerson.getIdCard().equals(oldPerson.getIdCard())){
|
||||
TenPersonEntity tenPersonEntityIdCard = tenPersonService.findByIdCard(tenPerson.getIdCard(),
|
||||
oldPerson.getRoomId(),oldPerson.getCellId());
|
||||
if(tenPersonEntityIdCard!=null){
|
||||
return R.error("身份证在此房间已存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//验证卡号
|
||||
if(tenPerson.getDoorCardEntity()!=null){
|
||||
TenDoorCardEntity oldDoorCard = tenDoorCardService.getOne(new QueryWrapper<TenDoorCardEntity>()
|
||||
|
|
|
@ -77,6 +77,10 @@ public interface TenPersonDao {
|
|||
@Param("roomId")Long roomId,
|
||||
@Param("cellId")Long cellId);
|
||||
|
||||
TenPersonEntity findByIdCard(@Param("idCard")String idCard,
|
||||
@Param("roomId")Long roomId,
|
||||
@Param("cellId")Long cellId);
|
||||
|
||||
|
||||
List<TenPersonEntity> getAllExpireGuest();
|
||||
|
||||
|
|
|
@ -89,14 +89,16 @@ public interface TenPersonService {
|
|||
Long roomId,
|
||||
Long cellId);
|
||||
|
||||
TenPersonEntity findByIdCard(String idCard,
|
||||
Long roomId,
|
||||
Long cellId);
|
||||
|
||||
TenCellEntity findCellByCellName(String name, String tenantId);
|
||||
TenBuildEntity findBuildByNameAndUnit(String name, String unit, Long cellId);
|
||||
TenRoomEntity findRoomByRoomName(String roomName,
|
||||
Long buildId,
|
||||
Long cellId);
|
||||
|
||||
|
||||
|
||||
List<PersonModel> processUploadFile(Map<String,List<String>> fileMap, String tenantId);
|
||||
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ public class TenPackRecordEnterServiceImpl extends ServiceImpl<TenPackRecordEnte
|
|||
return this.list(new QueryWrapper<TenPackRecordEnterEntity>()
|
||||
.eq("cell_id",cellId)
|
||||
.eq("xa_sync",0)
|
||||
.isNotNull("image")
|
||||
.last(" and TO_DAYS(enter_time) = TO_DAYS(NOW())"));
|
||||
}
|
||||
@Override
|
||||
|
@ -74,6 +75,7 @@ public class TenPackRecordEnterServiceImpl extends ServiceImpl<TenPackRecordEnte
|
|||
return this.list(new QueryWrapper<TenPackRecordEnterEntity>()
|
||||
.eq("cell_id",cellId)
|
||||
.eq("xa_sync_image",0)
|
||||
.isNotNull("image")
|
||||
.eq("xa_sync",1)
|
||||
.last(" and TO_DAYS(enter_time) = TO_DAYS(NOW())"));
|
||||
}
|
||||
|
|
|
@ -1696,6 +1696,13 @@ public class TenPersonServiceImpl implements TenPersonService {
|
|||
return tenPersonDao.findByName(name, roomId, cellId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TenPersonEntity findByIdCard(String idCard,
|
||||
Long roomId,
|
||||
Long cellId){
|
||||
return tenPersonDao.findByIdCard(idCard, roomId, cellId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TenCellEntity findCellByCellName(String name, String tenantId) {
|
||||
return tenCellService.findByCellName(name, tenantId);
|
||||
|
|
|
@ -544,6 +544,14 @@
|
|||
and name = #{name} and (person_type = 5000 or person_type = 5001 or person_type = 5002)
|
||||
</select>
|
||||
|
||||
<select id="findByIdCard" resultType="net.shapelight.modules.ten.entity.TenPersonEntity">
|
||||
select * from ten_person
|
||||
where room_id = #{roomId} and delete_flag = 0
|
||||
and id_card = #{idCard} and (person_type = 5000 or person_type = 5001 or person_type = 5002)
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectByCellId" resultMap="BaseResultMap">
|
||||
select p.*,r.layer,r.room_name from ten_person p left join ten_room r
|
||||
on p.room_id = r.room_id where p.delete_flag = 0
|
||||
|
|
Loading…
Reference in New Issue