修改现有问题
This commit is contained in:
parent
eccf6f1406
commit
bada89d4c6
|
@ -14,7 +14,7 @@ ADD target/shapelight-admin.jar app.jar
|
||||||
EXPOSE 8018
|
EXPOSE 8018
|
||||||
|
|
||||||
# 定义环境变量
|
# 定义环境变量
|
||||||
ENV JAVA_OPTS=""
|
ENV JAVA_OPTS="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8095"
|
||||||
|
|
||||||
# 在容器启动时运行jar包
|
# 在容器启动时运行jar包
|
||||||
ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./cell -jar /app.jar
|
ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./cell -jar /app.jar
|
|
@ -83,7 +83,7 @@ public class FaceEngineAutoRun extends AbstractController implements Application
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
List<TenCellEntity> cellList = tenCellService.list(new QueryWrapper<TenCellEntity>()
|
/*List<TenCellEntity> cellList = tenCellService.list(new QueryWrapper<TenCellEntity>()
|
||||||
.eq("tenant_id","1298283126102949890")
|
.eq("tenant_id","1298283126102949890")
|
||||||
.eq("delete_flag",0));
|
.eq("delete_flag",0));
|
||||||
for(TenCellEntity cellEntity: cellList){
|
for(TenCellEntity cellEntity: cellList){
|
||||||
|
@ -112,6 +112,6 @@ public class FaceEngineAutoRun extends AbstractController implements Application
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.debug(cellEntity.getName()+":初始化人脸库完成,共 "+faceCount+" 人");
|
log.debug(cellEntity.getName()+":初始化人脸库完成,共 "+faceCount+" 人");
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class PersonProcessTask implements ITask {
|
||||||
//修改人员表
|
//修改人员表
|
||||||
tenPersonService.updateStatusById(guest);
|
tenPersonService.updateStatusById(guest);
|
||||||
//特征保存到内存
|
//特征保存到内存
|
||||||
UserRamGroup.removeUser(guest.getPersonId()+"",guest.getCellId()+"");
|
//UserRamGroup.removeUser(guest.getPersonId()+"",guest.getCellId()+"");
|
||||||
// UserRamCache.removeUser(guest.getPersonId()+"");
|
// UserRamCache.removeUser(guest.getPersonId()+"");
|
||||||
log.debug("内存删除人员:"+guest.getPersonId()+" 姓名:"+guest.getName());
|
log.debug("内存删除人员:"+guest.getPersonId()+" 姓名:"+guest.getName());
|
||||||
//修改同步表
|
//修改同步表
|
||||||
|
|
|
@ -215,7 +215,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
|
||||||
userScopeEntity.setUserId(user.getUserId());
|
userScopeEntity.setUserId(user.getUserId());
|
||||||
|
|
||||||
|
|
||||||
//小区管理员
|
/* //小区管理员
|
||||||
if (user.getRoleIdList().get(0).longValue() == Constant.ROLE_TEN_CELL) {
|
if (user.getRoleIdList().get(0).longValue() == Constant.ROLE_TEN_CELL) {
|
||||||
TenCellEntity cell = tenCellService.getById(user.getCellId());
|
TenCellEntity cell = tenCellService.getById(user.getCellId());
|
||||||
userScopeEntity.setAreaId(cell.getAreaId());
|
userScopeEntity.setAreaId(cell.getAreaId());
|
||||||
|
@ -251,7 +251,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
|
||||||
|
|
||||||
appUser.setCurrentScopeId(appScope.getUserScopeId());
|
appUser.setCurrentScopeId(appScope.getUserScopeId());
|
||||||
appUserService.updateById(appUser);
|
appUserService.updateById(appUser);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class TenParentController {
|
||||||
appUserService.removeById(tenParent.getUserId());
|
appUserService.removeById(tenParent.getUserId());
|
||||||
appUserScopeService.remove(new LambdaQueryWrapper<AppUserScopeEntity>()
|
appUserScopeService.remove(new LambdaQueryWrapper<AppUserScopeEntity>()
|
||||||
.eq(AppUserScopeEntity::getUserId,tenParent.getUserId()));
|
.eq(AppUserScopeEntity::getUserId,tenParent.getUserId()));
|
||||||
relationService.remove(new LambdaQueryWrapper<TenRelation>().eq(TenRelation::getParentId,item.get("id")));
|
relationService.remove(new LambdaQueryWrapper<TenRelation>().eq(TenRelation::getParentId,tenParent.getUserId()));
|
||||||
});
|
});
|
||||||
opParams.put("dataInfo",dataInfo);
|
opParams.put("dataInfo",dataInfo);
|
||||||
JSONObject jsonObject = opFeignClient.submitData(opParams);
|
JSONObject jsonObject = opFeignClient.submitData(opParams);
|
||||||
|
|
|
@ -397,22 +397,23 @@ public class TenPersonController extends AbstractController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TenPersonEntity tenPersonEntity = tenPersonService.findByName(tenPerson.getName(),
|
/*TenPersonEntity tenPersonEntity = tenPersonService.findByName(tenPerson.getName(),
|
||||||
tenPerson.getRoomId(),tenPerson.getCellId());
|
tenPerson.getRoomId(),tenPerson.getCellId());*/
|
||||||
if(tenPersonEntity!=null){
|
Integer count = tenPersonService.findByRyId(tenPerson.getRyid());
|
||||||
return R.error("当前学生已存在");
|
if(count!=null&&count>=1){
|
||||||
|
return R.error("当前学号已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(tenPerson.getIdCard()!=null){
|
if(tenPerson.getIdCard()!=null){
|
||||||
// TenPersonEntity tenPersonIdcard = tenPersonService.findByIdCard(tenPerson.getIdCard(),
|
/* TenPersonEntity tenPersonIdcard = tenPersonService.findByIdCard(tenPerson.getIdCard(),
|
||||||
// tenPerson.getRoomId(),tenPerson.getCellId());
|
tenPerson.getRoomId(),tenPerson.getCellId());
|
||||||
// if(tenPersonIdcard!=null){
|
if(tenPersonIdcard!=null){
|
||||||
// return R.error("身份证在此房间已存在");
|
return R.error("身份证在此班级已存在");
|
||||||
// }
|
}*/
|
||||||
List<TenPersonEntity> list = tenPersonService.findByIdCardAndDept(tenPerson.getIdCard(),tenPerson.getDeptId());
|
List<TenPersonEntity> list = tenPersonService.findByIdCardAndDept(tenPerson.getIdCard(),tenPerson.getDeptId());
|
||||||
if(list.size()>0){
|
if(list.size()>0){
|
||||||
return R.error("身份证在此组织已存在");
|
return R.error("身份证已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -449,6 +450,10 @@ public class TenPersonController extends AbstractController {
|
||||||
tenPerson.setLastUpdateBy(getUser().getUsername());
|
tenPerson.setLastUpdateBy(getUser().getUsername());
|
||||||
tenPerson.setLastUpdateTime(new Date());
|
tenPerson.setLastUpdateTime(new Date());
|
||||||
tenPerson.setFaceFailure(Constant.FACE_FAILURE_OK);
|
tenPerson.setFaceFailure(Constant.FACE_FAILURE_OK);
|
||||||
|
Integer count = tenPersonService.findByRyId(tenPerson.getRyid());
|
||||||
|
if(count!=null&&count>=2){
|
||||||
|
return R.error("当前学号已存在");
|
||||||
|
}
|
||||||
|
|
||||||
if(tenPerson.getIdCard()!=null){
|
if(tenPerson.getIdCard()!=null){
|
||||||
if(tenPerson.getIdCard().length() == 15){
|
if(tenPerson.getIdCard().length() == 15){
|
||||||
|
@ -690,8 +695,21 @@ public class TenPersonController extends AbstractController {
|
||||||
if(params.size()>20){
|
if(params.size()>20){
|
||||||
return R.error("最多选择20条数据");
|
return R.error("最多选择20条数据");
|
||||||
}
|
}
|
||||||
tenPersonService.removeByIdList(params);
|
List<Map<String, String>> list = new ArrayList<>();
|
||||||
return R.ok();
|
//params.stream().filter(item -> !relationService.list(new LambdaQueryWrapper<TenRelation>().eq(TenRelation::getStudentId,item.get("personId"))).isEmpty()).collect(Collectors.toList());
|
||||||
|
Iterator<Map<String,String>> iterator = params.iterator();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
Map<String,String> item = iterator.next();
|
||||||
|
List<TenRelation> tenRelations = relationService.list(new LambdaQueryWrapper<TenRelation>().eq(TenRelation::getStudentId,item.get("personId")).ne(TenRelation::getStatus,0));
|
||||||
|
if(!tenRelations.isEmpty()) {
|
||||||
|
iterator.remove();
|
||||||
|
list.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!params.isEmpty()) {
|
||||||
|
tenPersonService.removeByIdList(params);
|
||||||
|
}
|
||||||
|
return R.ok().put("data",list);
|
||||||
}
|
}
|
||||||
// public R delete(@RequestBody Map<String, String> params){
|
// public R delete(@RequestBody Map<String, String> params){
|
||||||
// //tenRoomService.removeByIds(Arrays.asList(roomIds));
|
// //tenRoomService.removeByIds(Arrays.asList(roomIds));
|
||||||
|
|
|
@ -64,28 +64,38 @@ public class TenRelationController extends AbstractController {
|
||||||
tenRelation.setApprovalTime(new Date());
|
tenRelation.setApprovalTime(new Date());
|
||||||
tenRelation.setApproval(getUser().getRealName());
|
tenRelation.setApproval(getUser().getRealName());
|
||||||
AppUserEntity appUser = appUserService.getById(tenRelation.getParentId());
|
AppUserEntity appUser = appUserService.getById(tenRelation.getParentId());
|
||||||
Map<String,Object> opParams = new HashMap<>();
|
if(tenRelation.getStatus().equals(1)) {
|
||||||
opParams.put("operation","editUserContactData");
|
Map<String,Object> opParams = new HashMap<>();
|
||||||
opParams.put("accountNumber",globalValue.accountNumber);
|
opParams.put("operation","editUserContactData");
|
||||||
opParams.put("passKey", KeysEntity.passKey);
|
opParams.put("accountNumber",globalValue.accountNumber);
|
||||||
opParams.put("empowerText",KeysEntity.empowerText);
|
opParams.put("passKey", KeysEntity.passKey);
|
||||||
List<Map<String,Object>> dataInfo = new ArrayList<>();
|
opParams.put("empowerText",KeysEntity.empowerText);
|
||||||
Map<String,Object> info = new HashMap<>();
|
List<Map<String,Object>> dataInfo = new ArrayList<>();
|
||||||
info.put("objectUuid",tenRelation.getParentId().toString());
|
Map<String,Object> info = new HashMap<>();
|
||||||
info.put("userUuid",tenRelation.getStudentId().toString());
|
info.put("objectUuid",tenRelation.getParentId().toString());
|
||||||
info.put("salutation",tenRelation.getRelation());
|
info.put("userUuid",tenRelation.getStudentId().toString());
|
||||||
info.put("phoneNumber",appUser.getMobile());
|
info.put("salutation",tenRelation.getRelation());
|
||||||
info.put("orderNumber",1);
|
info.put("phoneNumber",appUser.getMobile());
|
||||||
dataInfo.add(info);
|
info.put("orderNumber",1);
|
||||||
opParams.put("dataInfo",dataInfo);
|
dataInfo.add(info);
|
||||||
JSONObject jsonObject = opFeignClient.submitData(opParams);
|
opParams.put("dataInfo",dataInfo);
|
||||||
if(jsonObject.getString("shrgStatus").equals("S")) {
|
JSONObject jsonObject = opFeignClient.submitData(opParams);
|
||||||
if(jsonObject.getJSONArray("errInfo").isEmpty()) {
|
if(jsonObject.getString("shrgStatus").equals("S")) {
|
||||||
relationService.updateById(tenRelation);
|
if(jsonObject.getJSONArray("errInfo").isEmpty()) {
|
||||||
|
relationService.updateById(tenRelation);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
errMsg.add(item.get("id").toString());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
relationService.updateById(tenRelation);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (errMsg.isEmpty()) {
|
||||||
|
return R.ok();
|
||||||
|
} else {
|
||||||
|
return R.error(errMsg.toString()+"不存在");
|
||||||
|
}
|
||||||
|
|
||||||
return R.ok();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,8 @@ public interface TenPersonDao {
|
||||||
|
|
||||||
TenPersonEntity findByRyId(@Param("ryId")String ryId, @Param("cellId")Long cellId,@Param("idCard") String idCard);
|
TenPersonEntity findByRyId(@Param("ryId")String ryId, @Param("cellId")Long cellId,@Param("idCard") String idCard);
|
||||||
|
|
||||||
|
Integer getCountByRyId(String ryId);
|
||||||
|
|
||||||
IPage<TenPersonEntity> getByPersonIds(Page page,@Param("personIds")List<Long> personIds, @Param("cellId")Long cellId);
|
IPage<TenPersonEntity> getByPersonIds(Page page,@Param("personIds")List<Long> personIds, @Param("cellId")Long cellId);
|
||||||
|
|
||||||
List<TenPersonEntity> listPage(@Param("start")int start, @Param("count")int count, @Param("cellId")String cellId);
|
List<TenPersonEntity> listPage(@Param("start")int start, @Param("count")int count, @Param("cellId")String cellId);
|
||||||
|
|
|
@ -156,5 +156,7 @@ public interface TenPersonService {
|
||||||
|
|
||||||
List<TenPersonEntity> listPage(int start, int count, String cellId);
|
List<TenPersonEntity> listPage(int start, int count, String cellId);
|
||||||
|
|
||||||
|
Integer findByRyId(String ryId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.arcsoft.face.FaceInfo;
|
||||||
import com.arcsoft.face.enums.ExtractType;
|
import com.arcsoft.face.enums.ExtractType;
|
||||||
import com.arcsoft.face.toolkit.ImageFactory;
|
import com.arcsoft.face.toolkit.ImageFactory;
|
||||||
import com.arcsoft.face.toolkit.ImageInfo;
|
import com.arcsoft.face.toolkit.ImageInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.minio.MinioClient;
|
import io.minio.MinioClient;
|
||||||
import io.minio.PutObjectOptions;
|
import io.minio.PutObjectOptions;
|
||||||
|
@ -32,6 +33,7 @@ import net.shapelight.modules.job.entity.KeysEntity;
|
||||||
import net.shapelight.modules.nettyapi.service.ServerApiService;
|
import net.shapelight.modules.nettyapi.service.ServerApiService;
|
||||||
import net.shapelight.modules.sys.entity.SysDictEntity;
|
import net.shapelight.modules.sys.entity.SysDictEntity;
|
||||||
import net.shapelight.modules.sys.service.impl.SysDictServiceImpl;
|
import net.shapelight.modules.sys.service.impl.SysDictServiceImpl;
|
||||||
|
import net.shapelight.modules.ten.dao.TenRelationMapper;
|
||||||
import net.shapelight.modules.ten.entity.*;
|
import net.shapelight.modules.ten.entity.*;
|
||||||
import net.shapelight.modules.ten.service.*;
|
import net.shapelight.modules.ten.service.*;
|
||||||
import net.shapelight.modules.tripartitePlatform.operatorPlatform.OpFeignClient;
|
import net.shapelight.modules.tripartitePlatform.operatorPlatform.OpFeignClient;
|
||||||
|
@ -115,6 +117,8 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
private String bucketName;
|
private String bucketName;
|
||||||
@Autowired
|
@Autowired
|
||||||
private FaceEngineService faceEngineService;
|
private FaceEngineService faceEngineService;
|
||||||
|
@Autowired
|
||||||
|
private TenRelationMapper tenRelationMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -474,7 +478,7 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
appUserService.updateById(appUser);
|
appUserService.updateById(appUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*//发送设备通知
|
//发送设备通知
|
||||||
List<TenDeviceVo> devList = tenDeviceService.findByCellId(entity.getCellId());
|
List<TenDeviceVo> devList = tenDeviceService.findByCellId(entity.getCellId());
|
||||||
//状态是0正常,发送推送
|
//状态是0正常,发送推送
|
||||||
if (entity.getStatus().intValue() == Constant.PESON_SUATUS_NOMOR) {
|
if (entity.getStatus().intValue() == Constant.PESON_SUATUS_NOMOR) {
|
||||||
|
@ -489,17 +493,17 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
syncEntity.setLastUpdateTime(entity.getLastUpdateTime());
|
syncEntity.setLastUpdateTime(entity.getLastUpdateTime());
|
||||||
tenPersonSyncService.insert(syncEntity);
|
tenPersonSyncService.insert(syncEntity);
|
||||||
|
|
||||||
//下发通知
|
/* //下发通知
|
||||||
List<TenPersonOperationVo> list = new ArrayList<>();
|
List<TenPersonOperationVo> list = new ArrayList<>();
|
||||||
TenPersonOperationVo vo = new TenPersonOperationVo();
|
TenPersonOperationVo vo = new TenPersonOperationVo();
|
||||||
vo.setUid(syncEntity.getPersonId());
|
vo.setUid(syncEntity.getPersonId());
|
||||||
vo.setOperation(1);
|
vo.setOperation(1);
|
||||||
vo.setLast_update_stamp(syncEntity.getLastUpdateTime());
|
vo.setLast_update_stamp(syncEntity.getLastUpdateTime());
|
||||||
list.add(vo);
|
list.add(vo);
|
||||||
serverApiService.personOperation(dev.getSn(), list);
|
serverApiService.personOperation(dev.getSn(), list);*/
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
if(entity.getPersonType()!=Constant.PERSON_TYPE_GUEST) {
|
if(entity.getPersonType()==Constant.PERSON_TYPE_OWNER) {
|
||||||
List<SysDictEntity> dictList = sysDictService.queryByType("optype");
|
List<SysDictEntity> dictList = sysDictService.queryByType("optype");
|
||||||
Map<String,Object> optypeMap = new HashMap<>();
|
Map<String,Object> optypeMap = new HashMap<>();
|
||||||
dictList.forEach(dict -> {
|
dictList.forEach(dict -> {
|
||||||
|
@ -527,10 +531,12 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
JSONObject jsonObject = opFeignClient.submitData(personParams);
|
JSONObject jsonObject = opFeignClient.submitData(personParams);
|
||||||
if(!jsonObject.getString("shrgStatus").equals("S")) {
|
if(!jsonObject.getString("shrgStatus").equals("S")) {
|
||||||
log.error(jsonObject.toJSONString());
|
log.error(jsonObject.toJSONString());
|
||||||
|
new SyncFailedException(entity.getPersonId()+","+entity.getName()+"青桔同步失败");
|
||||||
return jsonObject.getString("shrgMsg");
|
return jsonObject.getString("shrgMsg");
|
||||||
}
|
}
|
||||||
if(!jsonObject.getJSONArray("errInfo").isEmpty()) {
|
if(!jsonObject.getJSONArray("errInfo").isEmpty()) {
|
||||||
log.error(jsonObject.toJSONString());
|
log.error(jsonObject.toJSONString());
|
||||||
|
new SyncFailedException(entity.getPersonId()+","+entity.getName()+"青桔同步失败");
|
||||||
return jsonObject.getJSONArray("errInfo").toJSONString();
|
return jsonObject.getJSONArray("errInfo").toJSONString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -820,14 +826,14 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
syncEntity.setLastUpdateTime(entity.getLastUpdateTime());
|
syncEntity.setLastUpdateTime(entity.getLastUpdateTime());
|
||||||
tenPersonSyncService.insert(syncEntity);
|
tenPersonSyncService.insert(syncEntity);
|
||||||
|
|
||||||
//下发通知
|
/* //下发通知
|
||||||
List<TenPersonOperationVo> list = new ArrayList<>();
|
List<TenPersonOperationVo> list = new ArrayList<>();
|
||||||
TenPersonOperationVo vo = new TenPersonOperationVo();
|
TenPersonOperationVo vo = new TenPersonOperationVo();
|
||||||
vo.setUid(syncEntity.getPersonId());
|
vo.setUid(syncEntity.getPersonId());
|
||||||
vo.setOperation(1);
|
vo.setOperation(1);
|
||||||
vo.setLast_update_stamp(syncEntity.getLastUpdateTime());
|
vo.setLast_update_stamp(syncEntity.getLastUpdateTime());
|
||||||
list.add(vo);
|
list.add(vo);
|
||||||
serverApiService.personOperation(dev.getSn(), list);
|
serverApiService.personOperation(dev.getSn(), list);*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -887,10 +893,28 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
|
|
||||||
|
|
||||||
//删除人员
|
//删除人员
|
||||||
tenPersonDao.logicDeleteById(personId, cellId);
|
|
||||||
|
|
||||||
//记录所有人员id
|
//记录所有人员id
|
||||||
personIds.add(personId);
|
|
||||||
|
Map<String,Object> personParams = new HashMap<>();
|
||||||
|
personParams.put("operation","delUserData");
|
||||||
|
personParams.put("accountNumber",globalValue.accountNumber);
|
||||||
|
personParams.put("passKey", KeysEntity.passKey);
|
||||||
|
personParams.put("empowerText",KeysEntity.empowerText);
|
||||||
|
JSONArray jsonArray = new JSONArray();
|
||||||
|
Map<String,Object> student = new HashMap<>();
|
||||||
|
student.put("objectUuid",String.valueOf(entity.getPersonId()));
|
||||||
|
jsonArray.add(student);
|
||||||
|
personParams.put("dataInfo",jsonArray);
|
||||||
|
JSONObject jsonObject = opFeignClient.submitData(personParams);
|
||||||
|
if(jsonObject.getString("shrgStatus").equals("S")) {
|
||||||
|
if(jsonObject.getJSONArray("errInfo").isEmpty()) {
|
||||||
|
tenPersonDao.logicDeleteById(personId, cellId);
|
||||||
|
tenRelationMapper.delete(new LambdaQueryWrapper<TenRelation>().eq(TenRelation::getStudentId,personId));
|
||||||
|
personIds.add(personId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//配置同步信息并推送
|
//配置同步信息并推送
|
||||||
|
@ -914,7 +938,7 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
syncEntity.setState(Constant.PERSON_SYNC_DELETE);
|
syncEntity.setState(Constant.PERSON_SYNC_DELETE);
|
||||||
tenPersonSyncService.updateById(syncEntity);
|
tenPersonSyncService.updateById(syncEntity);
|
||||||
}
|
}
|
||||||
//下发通知
|
/*//下发通知
|
||||||
List<TenPersonSyncEntity> allDelete = tenPersonSyncService.findDeviceAllDeletePersons(deviceEntity.getDeviceId(), deviceEntity.getTenantId());
|
List<TenPersonSyncEntity> allDelete = tenPersonSyncService.findDeviceAllDeletePersons(deviceEntity.getDeviceId(), deviceEntity.getTenantId());
|
||||||
for (TenPersonSyncEntity syncEntity : allDelete) {
|
for (TenPersonSyncEntity syncEntity : allDelete) {
|
||||||
TenPersonOperationVo vo = new TenPersonOperationVo();
|
TenPersonOperationVo vo = new TenPersonOperationVo();
|
||||||
|
@ -922,13 +946,12 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
vo.setOperation(Constant.PERSON_SYNC_DELETE);
|
vo.setOperation(Constant.PERSON_SYNC_DELETE);
|
||||||
vo.setLast_update_stamp(syncEntity.getLastUpdateTime());
|
vo.setLast_update_stamp(syncEntity.getLastUpdateTime());
|
||||||
list.add(vo);
|
list.add(vo);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
int flag = serverApiService.personOperation(sn, list);
|
//int flag = serverApiService.personOperation(sn, list);
|
||||||
if (flag == 0) {
|
|
||||||
//下发成功,删除状态为删除的同步人员
|
//下发成功,删除状态为删除的同步人员
|
||||||
tenPersonSyncService.removeAllDeletePersons(deviceEntity.getDeviceId(), tenantId);
|
tenPersonSyncService.removeAllDeletePersons(deviceEntity.getDeviceId(), tenantId);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1440,39 +1463,39 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
// for (TenDeviceVo dev : devList) {
|
// for (TenDeviceVo dev : devList) {
|
||||||
// CmdProcess.publishPersonChange(dev.getSn());
|
// CmdProcess.publishPersonChange(dev.getSn());
|
||||||
// }
|
// }
|
||||||
List<SysDictEntity> dictList = sysDictService.queryByType("optype");
|
if(entity.getPersonType() == Constant.PERSON_TYPE_OWNER) {
|
||||||
Map<String,Object> optypeMap = new HashMap<>();
|
List<SysDictEntity> dictList = sysDictService.queryByType("optype");
|
||||||
dictList.forEach(dict -> {
|
Map<String,Object> optypeMap = new HashMap<>();
|
||||||
optypeMap.put(dict.getValue(),dict.getCode());
|
dictList.forEach(dict -> {
|
||||||
});
|
optypeMap.put(dict.getValue(),dict.getCode());
|
||||||
Map<String,Object> personParams = new HashMap<>();
|
});
|
||||||
personParams.put("operation","editUserData");
|
Map<String,Object> personParams = new HashMap<>();
|
||||||
personParams.put("accountNumber",globalValue.accountNumber);
|
personParams.put("operation","editUserData");
|
||||||
personParams.put("passKey", KeysEntity.passKey);
|
personParams.put("accountNumber",globalValue.accountNumber);
|
||||||
personParams.put("empowerText",KeysEntity.empowerText);
|
personParams.put("passKey", KeysEntity.passKey);
|
||||||
JSONArray jsonArray = new JSONArray();
|
personParams.put("empowerText",KeysEntity.empowerText);
|
||||||
Map<String,Object> student = new HashMap<>();
|
JSONArray jsonArray = new JSONArray();
|
||||||
student.put("objectUuid",String.valueOf(entity.getPersonId()));
|
Map<String,Object> student = new HashMap<>();
|
||||||
student.put("userCode",entity.getRyid());
|
student.put("objectUuid",String.valueOf(entity.getPersonId()));
|
||||||
student.put("userName",entity.getName());
|
student.put("userCode",entity.getRyid());
|
||||||
student.put("userType",optypeMap.get(entity.getLabelName()));
|
student.put("userName",entity.getName());
|
||||||
student.put("studentType","0"+entity.getPersonType());
|
student.put("userType",optypeMap.get(entity.getLabelName()));
|
||||||
student.put("gender",entity.getGender()==0?"WOMAN":"MAN");
|
student.put("studentType","0"+entity.getLabelId());
|
||||||
student.put("cardNumber","");
|
student.put("gender",entity.getGender()==0?"WOMAN":"MAN");
|
||||||
student.put("idCard",entity.getIdCard());
|
student.put("cardNumber","");
|
||||||
student.put("fileUrl",imagBaseUrl+"/"+bucketName+"/"+entity.getOrgImage());
|
student.put("idCard",entity.getIdCard());
|
||||||
student.put("fileName",entity.getOrgImage().substring(entity.getOrgImage().lastIndexOf("//")));
|
student.put("fileUrl",imagBaseUrl+"/"+bucketName+"/"+entity.getOrgImage());
|
||||||
jsonArray.add(student);
|
student.put("fileName",entity.getOrgImage().substring(entity.getOrgImage().lastIndexOf("/")+1));
|
||||||
personParams.put("dataInfo",jsonArray);
|
jsonArray.add(student);
|
||||||
JSONObject jsonObject = opFeignClient.submitData(personParams);
|
personParams.put("dataInfo",jsonArray);
|
||||||
if(!jsonObject.getString("shrgStatus").equals("S")) {
|
JSONObject jsonObject = opFeignClient.submitData(personParams);
|
||||||
new SyncFailedException(entity.getPersonId()+","+entity.getName()+"青桔同步失败");
|
if(!jsonObject.getString("shrgStatus").equals("S")) {
|
||||||
|
throw new SyncFailedException(entity.getPersonId()+","+entity.getName()+"青桔同步失败");
|
||||||
|
}
|
||||||
|
if(jsonObject.getJSONArray("errInfo")!=null && !jsonObject.getJSONArray("errInfo").isEmpty()) {
|
||||||
|
throw new SyncFailedException(entity.getPersonId()+","+entity.getName()+"青桔同步失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(jsonObject.getJSONArray("errInfo")!=null && !jsonObject.getJSONArray("errInfo").isEmpty()) {
|
|
||||||
new SyncFailedException(entity.getPersonId()+","+entity.getName()+"青桔同步失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return "OK";
|
return "OK";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2543,4 +2566,9 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
public List<TenPersonEntity> listPage(int start, int count, String cellId) {
|
public List<TenPersonEntity> listPage(int start, int count, String cellId) {
|
||||||
return tenPersonDao.listPage(start, count, cellId);
|
return tenPersonDao.listPage(start, count, cellId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer findByRyId(String ryId) {
|
||||||
|
return tenPersonDao.getCountByRyId(ryId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,9 @@ spring:
|
||||||
# url: jdbc:mysql://localhost:3306/site_db_1.3?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
# url: jdbc:mysql://localhost:3306/site_db_1.3?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||||
# username: rootuser
|
# username: rootuser
|
||||||
# password: zy_db@C501
|
# password: zy_db@C501
|
||||||
url: jdbc:mysql://localhost:3306/cell_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.10.62:3306/smartschool?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||||
username: user
|
username: smartschool
|
||||||
password: user@server001
|
password: jaGXddQFnsxcTJSd
|
||||||
initial-size: 10
|
initial-size: 10
|
||||||
max-active: 100
|
max-active: 100
|
||||||
min-idle: 10
|
min-idle: 10
|
||||||
|
|
|
@ -1321,7 +1321,12 @@
|
||||||
|
|
||||||
<select id="findByRyId" resultType="net.shapelight.modules.ten.entity.TenPersonEntity">
|
<select id="findByRyId" resultType="net.shapelight.modules.ten.entity.TenPersonEntity">
|
||||||
select * from ten_person
|
select * from ten_person
|
||||||
where ryid = #{ryId} and id_card = #{idCard}
|
where ryid = #{ryId} and id_card = #{idCard} and delete_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getCountByRyId" resultType="int">
|
||||||
|
select count(1) from ten_person
|
||||||
|
where ryid = #{ryId} and delete_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue