|
@@ -9,6 +9,7 @@ import com.jpsoft.smart.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.smart.modules.sys.entity.User;
|
|
|
import com.jpsoft.smart.modules.base.entity.PersonDeviceRelation;
|
|
|
import com.jpsoft.smart.modules.base.service.PersonDeviceRelationService;
|
|
|
+import com.jpsoft.smart.modules.sys.service.DataDictionaryService;
|
|
|
import com.jpsoft.smart.modules.sys.service.UserService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
@@ -39,6 +40,9 @@ public class PersonDeviceRelationController {
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private DataDictionaryService dataDictionaryService;
|
|
|
+
|
|
|
|
|
|
@ApiOperation(value="添加设备和人员绑定")
|
|
|
@PostMapping("add")
|
|
@@ -237,7 +241,7 @@ public class PersonDeviceRelationController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "personId",value = "人员ID",paramType = "query")
|
|
|
})
|
|
|
- public MessageResult<List<PersonDeviceRelation>> listByPersonId(String personId){
|
|
|
+ public MessageResult<List<PersonDeviceRelation>> listByPersonId(Long personId){
|
|
|
|
|
|
MessageResult<List<PersonDeviceRelation>> msgResult = new MessageResult<>();
|
|
|
|
|
@@ -274,7 +278,7 @@ public class PersonDeviceRelationController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "personId",value = "人员ID",paramType = "query")
|
|
|
})
|
|
|
- public MessageResult<Integer> unbindDevice(String personId,@RequestAttribute String subject){
|
|
|
+ public MessageResult<Integer> unbindDevice(Long personId,@RequestAttribute String subject){
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
try{
|
|
@@ -313,7 +317,7 @@ public class PersonDeviceRelationController {
|
|
|
@ApiImplicitParam(name = "personId",value = "人员ID",required = true ,paramType = "query")
|
|
|
})
|
|
|
public MessageResult<Map> isUnbindDeviceList(
|
|
|
- String personId,
|
|
|
+ Long personId,
|
|
|
@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
@RequestParam(value="pageSize",defaultValue="20") int pageSize,@RequestAttribute String subject){
|
|
|
|
|
@@ -338,6 +342,8 @@ public class PersonDeviceRelationController {
|
|
|
else{
|
|
|
deviceInfo.setIsBindPerson(true);
|
|
|
}
|
|
|
+ String typeN = dataDictionaryService.findParentId("ddf2ecbe-84a6-4f0d-a84f-2fc6917f5856",deviceInfo.getType());
|
|
|
+ deviceInfo.setTypeN(typeN);
|
|
|
}
|
|
|
|
|
|
msgResult.setResult(true);
|