|
@@ -505,17 +505,18 @@ public class PersonInfoApiController {
|
|
|
int affectCount = personInfoService.insert(personInfo);
|
|
|
|
|
|
// //todo 关联设备
|
|
|
-// String[] deviceIds = bindDevices.split(",");
|
|
|
-// for(String deviceId : deviceIds){
|
|
|
-// PersonDeviceRelation personDeviceRelation = new PersonDeviceRelation();
|
|
|
-// personDeviceRelation.setId(UUID.randomUUID().toString());
|
|
|
-// personDeviceRelation.setDeviceId(deviceId);
|
|
|
-// personDeviceRelation.setPersonId(personInfo.getId());
|
|
|
-// personDeviceRelation.setDelFlag(false);
|
|
|
-// personDeviceRelation.setCreateBy(subject);
|
|
|
-// personDeviceRelation.setCreateTime(new Date());
|
|
|
-// personDeviceRelationService.insert(personDeviceRelation);
|
|
|
-// }
|
|
|
+ String[] deviceIds = bindDevices.split(",");
|
|
|
+
|
|
|
+ for(String deviceId : deviceIds){
|
|
|
+ PersonDeviceRelation personDeviceRelation = new PersonDeviceRelation();
|
|
|
+ personDeviceRelation.setId(UUID.randomUUID().toString());
|
|
|
+ personDeviceRelation.setDeviceId(deviceId);
|
|
|
+ personDeviceRelation.setPersonId(personInfo.getId());
|
|
|
+ personDeviceRelation.setDelFlag(false);
|
|
|
+ personDeviceRelation.setCreateBy(subject);
|
|
|
+ personDeviceRelation.setCreateTime(new Date());
|
|
|
+ personDeviceRelationService.insert(personDeviceRelation);
|
|
|
+ }
|
|
|
|
|
|
if(affectCount>0) {
|
|
|
//todo 加入到导入图片队列中
|