|
|
|
@ -13,7 +13,6 @@ import com.psdc.service.IPsdcDeviceService; |
|
|
|
|
import com.psdc.service.ISysUserService; |
|
|
|
|
import com.psdc.utils.SecurityUtils; |
|
|
|
|
import com.psdc.utils.poi.ExcelUtil; |
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFCell; |
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFRow; |
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFSheet; |
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|
|
|
@ -26,7 +25,6 @@ import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.io.BufferedOutputStream; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.io.InputStream; |
|
|
|
|
import java.io.OutputStream; |
|
|
|
|
import java.util.*; |
|
|
|
@ -39,7 +37,7 @@ import java.util.*; |
|
|
|
|
* @Version 1.0 |
|
|
|
|
*/ |
|
|
|
|
@RestController |
|
|
|
|
@RequestMapping("/manager/device") |
|
|
|
|
@RequestMapping("/system/device/index") |
|
|
|
|
public class PsdcDeviceController extends BaseController { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@ -49,7 +47,7 @@ public class PsdcDeviceController extends BaseController { |
|
|
|
|
ISysUserService sysUserService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('manager:device:list')") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:device:list')") |
|
|
|
|
@Log(title = "设备管理", businessType = BusinessType.INSERT) |
|
|
|
|
@PostMapping |
|
|
|
|
public AjaxResult add(@Validated @RequestBody PsdcDevice pd) { |
|
|
|
@ -60,7 +58,7 @@ public class PsdcDeviceController extends BaseController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('manager:device:list')") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:device:list')") |
|
|
|
|
@Log(title = "设备管理", businessType = BusinessType.UPDATE) |
|
|
|
|
@PutMapping |
|
|
|
|
public AjaxResult edit(@Validated @RequestBody PsdcDevice pd) { |
|
|
|
@ -70,7 +68,7 @@ public class PsdcDeviceController extends BaseController { |
|
|
|
|
return toAjax(psdcDeviceService.update(pd)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('manager:device:list')") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:device:list')") |
|
|
|
|
@Log(title = "设备管理", businessType = BusinessType.DELETE) |
|
|
|
|
@DeleteMapping |
|
|
|
|
public AjaxResult remove(@Validated @RequestBody Long[] deviceIds) { |
|
|
|
@ -78,7 +76,7 @@ public class PsdcDeviceController extends BaseController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('manager:device:list')") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:device:list')") |
|
|
|
|
@RequestMapping(value = "/selusers", method = RequestMethod.GET) |
|
|
|
|
public AjaxResult selAllUsers() { |
|
|
|
|
List<Map> maps = new ArrayList<>(); |
|
|
|
@ -92,7 +90,7 @@ public class PsdcDeviceController extends BaseController { |
|
|
|
|
return AjaxResult.success("用户下拉列表", maps); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('manager:device:list')") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:device:list')") |
|
|
|
|
@RequestMapping(value = "/devicesList", method = RequestMethod.POST) |
|
|
|
|
public TableDataInfo controlLogList(@RequestBody JSONObject jsonObject) { |
|
|
|
|
// PageMethod.startPage(jsonObject.getInteger("pageNum"),jsonObject.getInteger("pageSize"));
|
|
|
|
@ -105,7 +103,7 @@ public class PsdcDeviceController extends BaseController { |
|
|
|
|
/** |
|
|
|
|
excel文件的下载 |
|
|
|
|
*/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('manager:device:list')") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:device:list')") |
|
|
|
|
@Log(title = "设备管理", businessType = BusinessType.EXPORT) |
|
|
|
|
@RequestMapping(value = "/daochuDevs", method = RequestMethod.POST) |
|
|
|
|
public void daochuDevDta(HttpServletResponse response, @RequestBody PsdcDevice pd) { |
|
|
|
@ -121,7 +119,7 @@ public class PsdcDeviceController extends BaseController { |
|
|
|
|
* 下载设备信息模板 |
|
|
|
|
* @param response |
|
|
|
|
*/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('manager:device:list')") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:device:list')") |
|
|
|
|
@Log(title = "设备管理", businessType = BusinessType.EXPORT) |
|
|
|
|
@RequestMapping(value = "/downloadDevTemplate", method = RequestMethod.GET) |
|
|
|
|
public void downloadTemplate(HttpServletResponse response) { |
|
|
|
@ -162,7 +160,7 @@ public class PsdcDeviceController extends BaseController { |
|
|
|
|
excel文件的读取 |
|
|
|
|
*/ |
|
|
|
|
@RequestMapping("/daoruDevData") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('manager:device:list')") |
|
|
|
|
@PreAuthorize("@ss.hasPermi('system:device:list')") |
|
|
|
|
@Log(title = "设备管理", businessType = BusinessType.IMPORT) |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public AjaxResult daoruDevData(@RequestPart("file") MultipartFile file) { |
|
|
|
|