瀏覽代碼

津南精细化服务平台

lin 3 年之前
父節點
當前提交
1bc211c1e4

+ 2 - 4
src/main/java/com/zoniot/ccrc/controller/system/CommunityManagerController.java

@@ -66,7 +66,6 @@ public class CommunityManagerController {
 
 	@GetMapping("getCommunityPage")
 	@ApiOperation(value = "获取小区列表分页", notes = "权限:sys:community:query")
-
 	public AjaxMessage<Pagination<CommunityDto>> getCommunityPage(
 			@ApiParam(value = "小区名称", required = false) @RequestParam(required = false) String communityName,
 			@ApiParam(value = "省", required = false) @RequestParam(required = false) Integer province,
@@ -82,7 +81,7 @@ public class CommunityManagerController {
 
 	@PostMapping("add")
 	@ApiOperation(value = "添加小区", notes = "权限:sys:community:add")
-	@PreAuthorize("hasAuthority('sys:community:add')")
+	//@PreAuthorize("hasAuthority('sys:community:add')")
 	public AjaxMessage addCommunity(
 			@ApiParam(value = "小区", required = true) @RequestBody(required = true) @Validated CommunityDto communityDto
 	) {
@@ -92,7 +91,7 @@ public class CommunityManagerController {
 
 	@PutMapping("edit")
 	@ApiOperation(value = "编辑小区", notes = "权限:sys:community:edit")
-	@PreAuthorize("hasAuthority('sys:community:edit')")
+	//@PreAuthorize("hasAuthority('sys:community:edit')")
 	public AjaxMessage editCommunity(
 			@ApiParam(value = "小区", required = true) @RequestBody(required = true) @Validated Community community
 	) {
@@ -111,7 +110,6 @@ public class CommunityManagerController {
 	}
 	@GetMapping("getOrgCommunity")
 	@ApiOperation(value = "获取机构小区")
-
 	public AjaxMessage getOrgCommunity(
 			@ApiParam(value = "小区Id") @RequestParam(required = false) Integer orgId,
 			@ApiParam(value = "区域Id") @RequestParam(required = false) Integer areaId

+ 7 - 11
src/main/java/com/zoniot/ccrc/service/impl/DeviceServiceImpl.java

@@ -84,10 +84,8 @@ public class DeviceServiceImpl implements DeviceService{
         if (orgId != null) communityIds = organizationMapper.findCommunityIds(orgId);
         List<DeviceDto> list = deviceMapper.getList(loginUser.getSiteId(),userId,sysId,deviceTypeId,orgId,province,city,region,communityId,buildingId,deviceNo,clientName,locDesc,status,valveStatus,communityIds,sortColumn,sortOrder);
 
-        //水表档案号、水表电子号、设备状态、当前读数、机构、客户编号、客户名称、手机号、标签、建筑、安装地址、网格员
-        SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        //DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        String[] rowsName = new String[]{"序号", "水表档案号", "水表电子号", "设备状态", "当前读数", "机构", "客户编号", "客户名称", "手机号", "标签","建筑","安装地址","网格员"};
+        //设备编号、水表档案号、设备状态、当前读数、机构、客户编号、客户名称、手机号、标签、小区、安装地址、网格员
+        String[] rowsName = new String[]{"序号", "设备编号", "水表档案号", "设备状态", "当前读数", "机构", "客户编号", "客户名称", "手机号", "标签","小区","安装地址","网格员"};
 
         List<Object[]> dataList = newArrayList();
         Object[] objs = null;
@@ -95,8 +93,8 @@ public class DeviceServiceImpl implements DeviceService{
             DeviceDto data = list.get(i);
             objs = new Object[rowsName.length];
             objs[0] = i;
-            objs[1] = data.getFileNo();
-            objs[2] = data.getMeterNo();
+            objs[1] = data.getDeviceNo();
+            objs[2] = data.getFileNo();
             objs[3] = getDeviceStatusName(data.getDeviceStatus());
             objs[4] = data.getMeterReading();
             objs[5] = data.getOrgName();
@@ -104,7 +102,7 @@ public class DeviceServiceImpl implements DeviceService{
             objs[7] = data.getCustomerName();
             objs[8] = data.getCustomerPhone();
             objs[9] = data.getLabel();
-            objs[10] = data.getBuildingName();
+            objs[10] = data.getCommunityName();
             objs[11] = data.getLocDesc();
             objs[12] = data.getUsername();
 
@@ -120,11 +118,9 @@ public class DeviceServiceImpl implements DeviceService{
     }
 
     private String getDeviceStatusName(Integer deviceStatus){
-        //1:正常 2:故障 3:无 4: 预警 5:未启用
+        //1:正常 0:告警
         if (deviceStatus == 1) return  "正常";
-        if (deviceStatus == 2) return  "故障";
-        if (deviceStatus == 4) return  "预警";
-        if (deviceStatus == 5) return  "未启用";
+        if (deviceStatus == 0) return  "告警";
         return "";
     }