From 090cd3830e739e3cdc4993e8a3aa589992f27967 Mon Sep 17 00:00:00 2001 From: zhangzhiqiang Date: Thu, 18 May 2023 19:14:38 +0800 Subject: [PATCH] =?UTF-8?q?rev=EF=BC=9A=E4=BF=AE=E6=94=B9=E8=B0=83?= =?UTF-8?q?=E5=BA=A6=E7=AE=A1=E7=90=86=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/PdmBiDeviceController.java | 100 +++++++++++++++--- .../java/org/nl/wms/product_manage/pdm.xls | Bin 215040 -> 215040 bytes .../service/device/dao/PdmBiDevice.java | 3 + .../备份pdm/rest/DeviceController.java | 2 - .../service/user/dao/SysUser.java | 2 +- .../main/resources/config/application-dev.yml | 20 ++-- .../resources/config/application-dev3.yml | 8 +- .../resources/config/application-prod.yml | 8 +- .../src/main/resources/logback-spring.xml | 2 +- mes/qd/public/config.js | 1 - mes/qd/src/views/wms/pub/StructDialog.vue | 2 +- .../point/MaterialDialog.vue | 0 .../point/ViewDialog.vue | 0 .../point/WorkOrderDialog.vue | 0 .../sch => scheduler_manage}/point/index.vue | 10 +- .../wms/scheduler_manage/point}/point.js | 0 .../sch => scheduler_manage}/region/index.vue | 2 +- .../wms/scheduler_manage/region}/region.js | 0 .../sch => scheduler_manage}/task/index.vue | 2 +- .../wms/scheduler_manage/task}/task.js | 0 .../product/productIn/DivDialog.vue | 2 +- .../product/productOut/DivDialog.vue | 4 +- .../rawproduct/rawProductIn/DivDialog.vue | 4 +- .../rawproduct/rawProductOut/DivDialog.vue | 4 +- 24 files changed, 125 insertions(+), 51 deletions(-) rename mes/qd/src/views/wms/{product_manage/sch => scheduler_manage}/point/MaterialDialog.vue (100%) rename mes/qd/src/views/wms/{product_manage/sch => scheduler_manage}/point/ViewDialog.vue (100%) rename mes/qd/src/views/wms/{product_manage/sch => scheduler_manage}/point/WorkOrderDialog.vue (100%) rename mes/qd/src/views/wms/{product_manage/sch => scheduler_manage}/point/index.vue (98%) rename mes/qd/src/{api/wms/sch => views/wms/scheduler_manage/point}/point.js (100%) rename mes/qd/src/views/wms/{product_manage/sch => scheduler_manage}/region/index.vue (99%) rename mes/qd/src/{api/wms/sch => views/wms/scheduler_manage/region}/region.js (100%) rename mes/qd/src/views/wms/{product_manage/sch => scheduler_manage}/task/index.vue (99%) rename mes/qd/src/{api/wms/sch => views/wms/scheduler_manage/task}/task.js (100%) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/controller/device/PdmBiDeviceController.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/controller/device/PdmBiDeviceController.java index decc1cc0..c9ca3d46 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/controller/device/PdmBiDeviceController.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/controller/device/PdmBiDeviceController.java @@ -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; /** - *

- * 生产设备基础信息表 前端控制器 - *

- * - * @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 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 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 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 delete(@RequestBody String[] ids) { + deviceService.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + + @GetMapping("/getWorkprocedure") + @Log("工序下拉") + @ApiOperation("工序下拉") + //@PreAuthorize("@el.check('device:list')") + public ResponseEntity getWorkprocedure(){ + return new ResponseEntity<>(deviceService.getWorkprocedure(),HttpStatus.OK); + } + + @GetMapping("/getDeviceList") + @Log("设备下拉框") + @ApiOperation("设备下拉框") + //@PreAuthorize("@el.check('device:list')") + public ResponseEntity getDeviceList(){ + return new ResponseEntity<>(deviceService.getDeviceList(),HttpStatus.OK); + } } - diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/pdm.xls b/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/pdm.xls index 8aeca089c50a44c1bf363fe3c81f98176f839bd6..78870a96022ac194e5564a5dc62240341d983b41 100644 GIT binary patch delta 32 mcmZpez}ql^cS9}2NuA9_EbT=sj6lq^y@-Xm&lv#DB@220 delta 32 mcmZpez}ql^cS9}<>&u596FZuVSlWwN7=f5+dl3tBpECg22MhcF diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/service/device/dao/PdmBiDevice.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/service/device/dao/PdmBiDevice.java index 690c0017..1b0a47c1 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/service/device/dao/PdmBiDevice.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/service/device/dao/PdmBiDevice.java @@ -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; /** diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/备份pdm/rest/DeviceController.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/备份pdm/rest/DeviceController.java index cd028e6f..7d083a4c 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/备份pdm/rest/DeviceController.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/product_manage/备份pdm/rest/DeviceController.java @@ -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 { diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/user/dao/SysUser.java b/mes/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/user/dao/SysUser.java index cb805293..9e74e6fc 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/user/dao/SysUser.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/wms/system_manage/service/user/dao/SysUser.java @@ -37,7 +37,7 @@ public class SysUser implements Serializable { */ private String username; - /** + /**fperson_name * 姓名 */ private String person_name; diff --git a/mes/hd/nladmin-system/src/main/resources/config/application-dev.yml b/mes/hd/nladmin-system/src/main/resources/config/application-dev.yml index 413b4ddd..33a2a28d 100644 --- a/mes/hd/nladmin-system/src/main/resources/config/application-dev.yml +++ b/mes/hd/nladmin-system/src/main/resources/config/application-dev.yml @@ -9,25 +9,23 @@ spring: client: reactive: #endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网 - # endpoints: 47.96.133.178:8200 #外网 - endpoints: http://47.96.133.178:8200 #外网 + # endpoints: 192.168.46.225:8200 #外网 + endpoints: http://192.168.46.225:8200 #外网 elasticsearch: rest: #uris: 172.31.185.110:9200,172.31.154.9:9200 #内网 - # uris: 47.96.133.178:8200 #外网 - uris: http://47.96.133.178:8200 #外网 - username: elastic - password: 123456 + # uris: 192.168.46.225:8200 #外网 + uris: http://192.168.46.225:9200 #外网 +# username: elastic +# password: 123456 datasource: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - #url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false - url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false + url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false +# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false username: ${DB_USER:root} - password: ${DB_PWD:Root.123456} -# username: ${DB_USER:root} -# password: ${DB_PWD:942464Yy} + password: ${DB_PWD:123456} # 初始连接数 initial-size: 5 diff --git a/mes/hd/nladmin-system/src/main/resources/config/application-dev3.yml b/mes/hd/nladmin-system/src/main/resources/config/application-dev3.yml index b1296e0a..2182437d 100644 --- a/mes/hd/nladmin-system/src/main/resources/config/application-dev3.yml +++ b/mes/hd/nladmin-system/src/main/resources/config/application-dev3.yml @@ -9,13 +9,13 @@ spring: client: reactive: #endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网 - # endpoints: 47.96.133.178:8200 #外网 - endpoints: http://47.96.133.178:8200 #外网 + # endpoints: 192.168.46.225:8200 #外网 + endpoints: http://192.168.46.225:8200 #外网 elasticsearch: rest: #uris: 172.31.185.110:9200,172.31.154.9:9200 #内网 - # uris: 47.96.133.178:8200 #外网 - uris: http://47.96.133.178:8200 #外网 + # uris: 192.168.46.225:8200 #外网 + uris: http://192.168.46.225:8200 #外网 username: elastic password: 123456 datasource: diff --git a/mes/hd/nladmin-system/src/main/resources/config/application-prod.yml b/mes/hd/nladmin-system/src/main/resources/config/application-prod.yml index 971add56..b5894b99 100644 --- a/mes/hd/nladmin-system/src/main/resources/config/application-prod.yml +++ b/mes/hd/nladmin-system/src/main/resources/config/application-prod.yml @@ -9,13 +9,13 @@ spring: client: reactive: #endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网 - # endpoints: 47.96.133.178:8200 #外网 - endpoints: http://47.96.133.178:8200 #外网 + # endpoints: 192.168.46.225:8200 #外网 + endpoints: http://192.168.46.225:8200 #外网 elasticsearch: rest: #uris: 172.31.185.110:9200,172.31.154.9:9200 #内网 - # uris: 47.96.133.178:8200 #外网 - uris: http://47.96.133.178:8200 #外网 + # uris: 192.168.46.225:8200 #外网 + uris: http://192.168.46.225:8200 #外网 username: elastic password: 123456 datasource: diff --git a/mes/hd/nladmin-system/src/main/resources/logback-spring.xml b/mes/hd/nladmin-system/src/main/resources/logback-spring.xml index ae30a148..df9bf5a1 100644 --- a/mes/hd/nladmin-system/src/main/resources/logback-spring.xml +++ b/mes/hd/nladmin-system/src/main/resources/logback-spring.xml @@ -18,7 +18,7 @@ https://juejin.cn/post/6844903775631572999