rev:修改调度管理路径
This commit is contained in:
@@ -1,21 +1,97 @@
|
||||
package org.nl.wms.product_manage.controller.device;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.product_manage.service.device.IPdmBiDeviceService;
|
||||
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice;
|
||||
import org.nl.wms.product_manage.备份pdm.service.DeviceService;
|
||||
import org.nl.wms.product_manage.备份pdm.service.dto.DeviceDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产设备基础信息表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-26
|
||||
*/
|
||||
* @author lyd
|
||||
* @date 2023-03-15
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/pdmBiDevice")
|
||||
@Api(tags = "生产设备管理")
|
||||
@RequestMapping("/api/device")
|
||||
@Slf4j
|
||||
public class PdmBiDeviceController {
|
||||
@Autowired
|
||||
private DeviceService deviceService;
|
||||
@Autowired
|
||||
private IPdmBiDeviceService iDeviceService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询生产设备")
|
||||
@ApiOperation("查询生产设备")
|
||||
//@PreAuthorize("@el.check('device:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
||||
return new ResponseEntity<>(deviceService.queryAll(whereJson,page),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增生产设备")
|
||||
@ApiOperation("新增生产设备")
|
||||
//@PreAuthorize("@el.check('device:add')")
|
||||
public ResponseEntity<Object> create( @RequestBody JSONObject form){
|
||||
PdmBiDevice device = form.toJavaObject(PdmBiDevice.class);
|
||||
device.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
device.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
device.setCreate_time(DateUtil.now());
|
||||
iDeviceService.save(device);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改生产设备")
|
||||
@ApiOperation("修改生产设备")
|
||||
//@PreAuthorize("@el.check('device:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody JSONObject form){
|
||||
PdmBiDevice device = form.toJavaObject(PdmBiDevice.class);
|
||||
device.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
device.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
device.setUpdate_time(DateUtil.now());
|
||||
iDeviceService.updateById(device);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除生产设备")
|
||||
@ApiOperation("删除生产设备")
|
||||
//@PreAuthorize("@el.check('device:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
|
||||
deviceService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getWorkprocedure")
|
||||
@Log("工序下拉")
|
||||
@ApiOperation("工序下拉")
|
||||
//@PreAuthorize("@el.check('device:list')")
|
||||
public ResponseEntity<Object> getWorkprocedure(){
|
||||
return new ResponseEntity<>(deviceService.getWorkprocedure(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getDeviceList")
|
||||
@Log("设备下拉框")
|
||||
@ApiOperation("设备下拉框")
|
||||
//@PreAuthorize("@el.check('device:list')")
|
||||
public ResponseEntity<Object> getDeviceList(){
|
||||
return new ResponseEntity<>(deviceService.getDeviceList(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.product_manage.service.device.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
@@ -24,6 +26,7 @@ public class PdmBiDevice implements Serializable {
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@TableId(value = "device_code")
|
||||
private String device_code;
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,10 +21,8 @@ import java.util.Map;
|
||||
* @author lyd
|
||||
* @date 2023-03-15
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "生产设备管理")
|
||||
@RequestMapping("/api/device")
|
||||
@Slf4j
|
||||
public class DeviceController {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class SysUser implements Serializable {
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
/**fperson_name
|
||||
* 姓名
|
||||
*/
|
||||
private String person_name;
|
||||
|
||||
Reference in New Issue
Block a user