#适配现有的权限方案的改动
This commit is contained in:
@@ -102,7 +102,7 @@ public class SysProfileController extends BaseController
|
||||
* 重置密码
|
||||
*/
|
||||
@ApiOperation("重置密码")
|
||||
@PreAuthorize("@ss.hasPermi('systerm:user:updatePwd')")
|
||||
//@PreAuthorize("@ss.hasPermi('systerm:user:updatePwd')")
|
||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updatePwd")
|
||||
public AjaxResult updatePwd(String oldPassword, String newPassword)
|
||||
|
||||
@@ -23,7 +23,7 @@ public class SysQrCodeController {
|
||||
@Autowired
|
||||
private ISysQrCodeService qrCodeService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:qrcode:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:qrcode:list')")
|
||||
@ApiOperation("分页查询二维码")
|
||||
@GetMapping("/page")
|
||||
public AjaxResult page(Page<SysQrCode> page, SysQrCode qrCode) {
|
||||
@@ -31,7 +31,7 @@ public class SysQrCodeController {
|
||||
return AjaxResult.success(result.getRecords(), (int) result.getTotal());
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:qrcode:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:qrcode:list')")
|
||||
@ApiOperation("查询二维码列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SysQrCode qrCode) {
|
||||
@@ -39,14 +39,14 @@ public class SysQrCodeController {
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:qrcode:query')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:qrcode:query')")
|
||||
@ApiOperation("查询二维码详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return AjaxResult.success(qrCodeService.getById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:qrcode:query')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:qrcode:query')")
|
||||
@ApiOperation("根据序列号查询二维码")
|
||||
@GetMapping("/serial/{serialNumber}")
|
||||
public AjaxResult getBySerialNumber(@PathVariable String serialNumber) {
|
||||
@@ -70,7 +70,7 @@ public class SysQrCodeController {
|
||||
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:qrcode:generate')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:qrcode:generate')")
|
||||
@ApiOperation("生成二维码并保存记录")
|
||||
@PostMapping("/generate")
|
||||
public AjaxResult generate(@RequestBody QrCodeGenerateRequest request) {
|
||||
@@ -79,7 +79,7 @@ public class SysQrCodeController {
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:qrcode:bind')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:qrcode:bind')")
|
||||
@ApiOperation("绑定设备")
|
||||
@PostMapping("/bind/{qrCodeId}/{deviceId}")
|
||||
public AjaxResult bindDevice(@PathVariable Long qrCodeId,
|
||||
@@ -87,14 +87,14 @@ public class SysQrCodeController {
|
||||
return toAjax(qrCodeService.bindDevice(qrCodeId, deviceId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:qrcode:unbind')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:qrcode:unbind')")
|
||||
@ApiOperation("解绑设备")
|
||||
@PostMapping("/unbind/{qrCodeId}")
|
||||
public AjaxResult unbindDevice(@PathVariable Long qrCodeId) {
|
||||
return toAjax(qrCodeService.unbindDevice(qrCodeId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:qrcode:remove')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:qrcode:remove')")
|
||||
@ApiOperation("删除二维码")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SysRobotConfigController {
|
||||
@Autowired
|
||||
private ISysRobotConfigService configService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:config:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:config:list')")
|
||||
@ApiOperation("分页查询机器人配置")
|
||||
@GetMapping("/page")
|
||||
public AjaxResult page(Page<SysRobotConfig> page, SysRobotConfig config) {
|
||||
@@ -30,7 +30,7 @@ public class SysRobotConfigController {
|
||||
return AjaxResult.success(result.getRecords(), (int) result.getTotal());
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:config:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:config:list')")
|
||||
@ApiOperation("查询机器人配置列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SysRobotConfig config) {
|
||||
@@ -38,14 +38,14 @@ public class SysRobotConfigController {
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:config:query')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:config:query')")
|
||||
@ApiOperation("查询机器人配置详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return AjaxResult.success(configService.getById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:config:add')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:config:add')")
|
||||
@ApiOperation("新增机器人配置")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysRobotConfig config) {
|
||||
@@ -55,7 +55,7 @@ public class SysRobotConfigController {
|
||||
return toAjax(configService.save(config));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:config:edit')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:config:edit')")
|
||||
@ApiOperation("修改机器人配置")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SysRobotConfig config) {
|
||||
@@ -65,7 +65,7 @@ public class SysRobotConfigController {
|
||||
return toAjax(configService.updateById(config));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:config:remove')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:config:remove')")
|
||||
@ApiOperation("删除机器人配置")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SysRobotCountryController {
|
||||
@Autowired
|
||||
private ISysRobotCountryService countryService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:country:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:country:list')")
|
||||
@ApiOperation("分页查询国家")
|
||||
@GetMapping("/page")
|
||||
public AjaxResult page(Page<SysRobotCountry> page, SysRobotCountry country) {
|
||||
@@ -30,7 +30,7 @@ public class SysRobotCountryController {
|
||||
return AjaxResult.success(result.getRecords(), (int) result.getTotal());
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:country:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:country:list')")
|
||||
@ApiOperation("查询国家列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SysRobotCountry country) {
|
||||
@@ -38,14 +38,14 @@ public class SysRobotCountryController {
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:country:query')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:country:query')")
|
||||
@ApiOperation("查询国家详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return AjaxResult.success(countryService.getById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:country:add')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:country:add')")
|
||||
@ApiOperation("新增国家")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysRobotCountry country) {
|
||||
@@ -55,7 +55,7 @@ public class SysRobotCountryController {
|
||||
return toAjax(countryService.save(country));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:country:edit')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:country:edit')")
|
||||
@ApiOperation("修改国家")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SysRobotCountry country) {
|
||||
@@ -65,7 +65,7 @@ public class SysRobotCountryController {
|
||||
return toAjax(countryService.updateById(country));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:country:remove')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:country:remove')")
|
||||
@ApiOperation("删除国家")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SysRobotModelController {
|
||||
@Autowired
|
||||
private ISysRobotModelService modelService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:model:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:model:list')")
|
||||
@ApiOperation("分页查询机器人型号")
|
||||
@GetMapping("/page")
|
||||
public AjaxResult page(Page<SysRobotModel> page, SysRobotModel model) {
|
||||
@@ -30,7 +30,7 @@ public class SysRobotModelController {
|
||||
return AjaxResult.success(result.getRecords(), (int) result.getTotal());
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:model:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:model:list')")
|
||||
@ApiOperation("查询机器人型号列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SysRobotModel model) {
|
||||
@@ -38,14 +38,14 @@ public class SysRobotModelController {
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:model:query')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:model:query')")
|
||||
@ApiOperation("查询机器人型号详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return AjaxResult.success(modelService.getById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:model:add')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:model:add')")
|
||||
@ApiOperation("新增机器人型号")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysRobotModel model) {
|
||||
@@ -55,7 +55,7 @@ public class SysRobotModelController {
|
||||
return toAjax(modelService.save(model));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:model:edit')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:model:edit')")
|
||||
@ApiOperation("修改机器人型号")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SysRobotModel model) {
|
||||
@@ -65,7 +65,7 @@ public class SysRobotModelController {
|
||||
return toAjax(modelService.updateById(model));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:model:remove')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:model:remove')")
|
||||
@ApiOperation("删除机器人型号")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SysRobotProvinceController {
|
||||
@Autowired
|
||||
private ISysRobotProvinceService provinceService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:province:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:province:list')")
|
||||
@ApiOperation("分页查询省份")
|
||||
@GetMapping("/page")
|
||||
public AjaxResult page(Page<SysRobotProvince> page, SysRobotProvince province) {
|
||||
@@ -30,7 +30,7 @@ public class SysRobotProvinceController {
|
||||
return AjaxResult.success(result.getRecords(), (int) result.getTotal());
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:province:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:province:list')")
|
||||
@ApiOperation("查询省份列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SysRobotProvince province) {
|
||||
@@ -38,14 +38,14 @@ public class SysRobotProvinceController {
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:province:query')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:province:query')")
|
||||
@ApiOperation("查询省份详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return AjaxResult.success(provinceService.getById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:province:add')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:province:add')")
|
||||
@ApiOperation("新增省份")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysRobotProvince province) {
|
||||
@@ -55,7 +55,7 @@ public class SysRobotProvinceController {
|
||||
return toAjax(provinceService.save(province));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:province:edit')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:province:edit')")
|
||||
@ApiOperation("修改省份")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SysRobotProvince province) {
|
||||
@@ -65,7 +65,7 @@ public class SysRobotProvinceController {
|
||||
return toAjax(provinceService.updateById(province));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:province:remove')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:province:remove')")
|
||||
@ApiOperation("删除省份")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SysRobotTypeController {
|
||||
@Autowired
|
||||
private ISysRobotTypeService typeService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:type:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:type:list')")
|
||||
@ApiOperation("分页查询机器人类型")
|
||||
@GetMapping("/page")
|
||||
public AjaxResult page(Page<SysRobotType> page, SysRobotType type) {
|
||||
@@ -30,7 +30,7 @@ public class SysRobotTypeController {
|
||||
return AjaxResult.success(result.getRecords(), (int) result.getTotal());
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:type:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:type:list')")
|
||||
@ApiOperation("查询机器人类型列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SysRobotType type) {
|
||||
@@ -38,14 +38,14 @@ public class SysRobotTypeController {
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:type:query')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:type:query')")
|
||||
@ApiOperation("查询机器人类型详情")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return AjaxResult.success(typeService.getById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:type:add')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:type:add')")
|
||||
@ApiOperation("新增机器人类型")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysRobotType type) {
|
||||
@@ -55,7 +55,7 @@ public class SysRobotTypeController {
|
||||
return toAjax(typeService.save(type));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:type:edit')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:robot:type:edit')")
|
||||
@ApiOperation("修改机器人类型")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SysRobotType type) {
|
||||
@@ -65,7 +65,7 @@ public class SysRobotTypeController {
|
||||
return toAjax(typeService.updateById(type));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:robot:type:remove')")
|
||||
// @PreAuthorize("@ss.hasPermi('system:robot:type:remove')")
|
||||
@ApiOperation("删除机器人类型")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
||||
@@ -8,30 +8,27 @@ import lombok.Data;
|
||||
@ApiModel("二维码生成请求")
|
||||
public class QrCodeGenerateRequest {
|
||||
|
||||
@ApiModelProperty("型号")
|
||||
private String model;
|
||||
@ApiModelProperty("型号ID(可选)")
|
||||
private Long modelId;
|
||||
|
||||
@ApiModelProperty("配置")
|
||||
private String config;
|
||||
@ApiModelProperty("配置ID(可选)")
|
||||
private Long configId;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private String type;
|
||||
@ApiModelProperty("类型ID(可选)")
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty("国家代码")
|
||||
private String countryCode;
|
||||
@ApiModelProperty("国家ID(可选)")
|
||||
private Long countryId;
|
||||
|
||||
@ApiModelProperty("国家全称")
|
||||
private String countryFullName;
|
||||
@ApiModelProperty("省份ID(可选)")
|
||||
private Long provinceId;
|
||||
|
||||
@ApiModelProperty("省份代码")
|
||||
private String provinceCode;
|
||||
|
||||
@ApiModelProperty("省份全称")
|
||||
private String provinceFullName;
|
||||
|
||||
@ApiModelProperty("序列号")
|
||||
@ApiModelProperty(value = "序列号", required = true)
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty("二维码Base64数据")
|
||||
private String qrcode;
|
||||
@ApiModelProperty(value = "二维码Base64数据", required = true)
|
||||
private String qrCode;
|
||||
|
||||
@ApiModelProperty(value = "二维码JSON数据", required = true)
|
||||
private String qrJson;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ public class SysQrCode implements Serializable {
|
||||
@ApiModelProperty("二维码Base64图片数据")
|
||||
private String qrCodeBase64;
|
||||
|
||||
@ApiModelProperty("二维码JSON数据")
|
||||
private String qrJson;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
package com.maibu.controller;
|
||||
package com.maibu.controller;
|
||||
@@ -30,21 +30,21 @@ public class IOTWorkOrderController extends BaseController {
|
||||
@Autowired
|
||||
private IWorkOrderService workOrderService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('iot:workOrder:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("工单分页列表")
|
||||
public TableDataInfo list(WorkOrderQueryDTO queryDTO) {
|
||||
return workOrderService.selectWorkOrderPage(queryDTO);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:query')")
|
||||
//@PreAuthorize("@ss.hasPermi('iot:workOrder:query')")
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation("获取工单详情")
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
return AjaxResult.success(workOrderService.selectWorkOrderById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:add')")
|
||||
// @PreAuthorize("@ss.hasPermi('iot:workOrder:add')")
|
||||
@Log(title = "工单管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增工单")
|
||||
@@ -52,7 +52,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
return toAjax(workOrderService.insertWorkOrder(workOrder));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:edit')")
|
||||
//@PreAuthorize("@ss.hasPermi('iot:workOrder:edit')")
|
||||
@Log(title = "工单管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@ApiOperation("修改工单")
|
||||
@@ -60,7 +60,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
return toAjax(workOrderService.updateWorkOrder(workOrder));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:dispatch')")
|
||||
// @PreAuthorize("@ss.hasPermi('iot:workOrder:dispatch')")
|
||||
@Log(title = "工单派发", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/dispatch")
|
||||
@ApiOperation("派发工单")
|
||||
@@ -68,7 +68,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
return toAjax(workOrderService.dispatchWorkOrder(dispatchDTO));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:start')")
|
||||
//@PreAuthorize("@ss.hasPermi('iot:workOrder:start')")
|
||||
@Log(title = "工单开始", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/start/{id}")
|
||||
@ApiOperation("开始执行工单")
|
||||
@@ -76,7 +76,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
return toAjax(workOrderService.startWorkOrder(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:complete')")
|
||||
// @PreAuthorize("@ss.hasPermi('iot:workOrder:complete')")
|
||||
@Log(title = "工单完成", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/complete")
|
||||
@ApiOperation("完成工单")
|
||||
@@ -84,7 +84,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
return toAjax(workOrderService.completeWorkOrder(workOrder));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:suspend')")
|
||||
//@PreAuthorize("@ss.hasPermi('iot:workOrder:suspend')")
|
||||
@Log(title = "工单挂起", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/suspend/{id}")
|
||||
@ApiOperation("挂起工单")
|
||||
@@ -92,7 +92,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
return toAjax(workOrderService.suspendWorkOrder(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:remove')")
|
||||
//@PreAuthorize("@ss.hasPermi('iot:workOrder:remove')")
|
||||
@Log(title = "工单管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除工单")
|
||||
@@ -100,7 +100,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
return toAjax(workOrderService.deleteWorkOrderByIds(ids));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:statistics')")
|
||||
// @PreAuthorize("@ss.hasPermi('iot:workOrder:statistics')")
|
||||
@GetMapping("/statistics")
|
||||
@ApiOperation("工单统计")
|
||||
public AjaxResult statistics() {
|
||||
@@ -108,7 +108,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
return AjaxResult.success(statistics);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:export')")
|
||||
//@PreAuthorize("@ss.hasPermi('iot:workOrder:export')")
|
||||
@Log(title = "工单管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ApiOperation("导出工单")
|
||||
@@ -122,7 +122,7 @@ public class IOTWorkOrderController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('iot:workOrder:add')")
|
||||
// @PreAuthorize("@ss.hasPermi('iot:workOrder:add')")
|
||||
@Log(title = "从告警生成工单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/generateFromAlarm/{alarmId}")
|
||||
@ApiOperation("从告警生成工单")
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.maibu.core.business.sys_robot_qrcode.*;
|
||||
import com.maibu.mapper.*;
|
||||
import com.maibu.service.ISysQrCodeService;
|
||||
import com.maibu.utils.MinioUtil;
|
||||
import com.maibu.utils.SecurityUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -204,16 +205,6 @@ public class SysQrCodeServiceImpl extends ServiceImpl<SysQrCodeMapper, SysQrCode
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public SysQrCode generateQrCodeFromFrontend(QrCodeGenerateRequest request) {
|
||||
SysRobotModel model = findModelByStoreValue(request.getModel());
|
||||
SysRobotConfig config = findConfigByStoreValue(request.getConfig());
|
||||
SysRobotType type = findTypeByStoreValue(request.getType());
|
||||
SysRobotCountry country = findCountryByStoreValue(request.getCountryCode());
|
||||
SysRobotProvince province = findProvinceByStoreValue(request.getProvinceCode());
|
||||
|
||||
if (model == null || config == null || type == null || country == null || province == null) {
|
||||
throw new RuntimeException("基础数据不存在");
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<SysQrCode> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(SysQrCode::getSerialNumber, request.getSerialNumber());
|
||||
if (this.count(wrapper) > 0) {
|
||||
@@ -222,47 +213,34 @@ public class SysQrCodeServiceImpl extends ServiceImpl<SysQrCodeMapper, SysQrCode
|
||||
|
||||
SysQrCode qrCode = new SysQrCode();
|
||||
qrCode.setSerialNumber(request.getSerialNumber());
|
||||
qrCode.setModelId(model.getId());
|
||||
qrCode.setConfigId(config.getId());
|
||||
qrCode.setTypeId(type.getId());
|
||||
qrCode.setCountryId(country.getId());
|
||||
qrCode.setProvinceId(province.getId());
|
||||
qrCode.setQrCodeBase64(request.getQrcode());
|
||||
qrCode.setModelId(request.getModelId());
|
||||
qrCode.setConfigId(request.getConfigId());
|
||||
qrCode.setTypeId(request.getTypeId());
|
||||
qrCode.setCountryId(request.getCountryId());
|
||||
qrCode.setProvinceId(request.getProvinceId());
|
||||
qrCode.setQrCodeBase64(request.getQrCode());
|
||||
qrCode.setQrJson(request.getQrJson());
|
||||
qrCode.setQrCodeContent(request.getSerialNumber());
|
||||
qrCode.setStatus(0);
|
||||
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
qrCode.setCreateTime(now);
|
||||
qrCode.setUpdateTime(now);
|
||||
|
||||
try {
|
||||
String username = SecurityUtils.getUsername();
|
||||
qrCode.setCreateBy(username);
|
||||
qrCode.setUpdateBy(username);
|
||||
} catch (Exception e) {
|
||||
log.warn("获取当前用户失败,使用默认值", e);
|
||||
qrCode.setCreateBy("system");
|
||||
qrCode.setUpdateBy("system");
|
||||
}
|
||||
|
||||
this.save(qrCode);
|
||||
return qrCode;
|
||||
}
|
||||
private SysRobotModel findModelByStoreValue(String storeValue) {
|
||||
LambdaQueryWrapper<SysRobotModel> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(SysRobotModel::getStoreValue, storeValue);
|
||||
return robotModelMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
private SysRobotConfig findConfigByStoreValue(String storeValue) {
|
||||
LambdaQueryWrapper<SysRobotConfig> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(SysRobotConfig::getStoreValue, storeValue);
|
||||
return robotConfigMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
private SysRobotType findTypeByStoreValue(String storeValue) {
|
||||
LambdaQueryWrapper<SysRobotType> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(SysRobotType::getStoreValue, storeValue);
|
||||
return robotTypeMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
private SysRobotCountry findCountryByStoreValue(String storeValue) {
|
||||
LambdaQueryWrapper<SysRobotCountry> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(SysRobotCountry::getStoreValue, storeValue);
|
||||
return robotCountryMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
private SysRobotProvince findProvinceByStoreValue(String storeValue) {
|
||||
LambdaQueryWrapper<SysRobotProvince> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(SysRobotProvince::getStoreValue, storeValue);
|
||||
return robotProvinceMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user