Browse Source

rev:代码优化

master
涂强 9 months ago
parent
commit
7ae9712c90
  1. 2
      hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java
  2. 2
      hd/nladmin-system/src/main/java/org/nl/acs/angle/rest/AcsPointAngleController.java
  3. 10
      hd/nladmin-system/src/main/java/org/nl/acs/angle/service/AcsPointAngleService.java
  4. 19
      hd/nladmin-system/src/main/java/org/nl/acs/angle/service/impl/AcsPointAngleServiceImpl.java
  5. 58
      hd/nladmin-system/src/main/java/org/nl/acs/angle/wql/ANGLE_QUERY.wql
  6. 7
      hd/nladmin-system/src/main/resources/config/application-dev.yml
  7. 2
      hd/nladmin-system/src/main/resources/config/application.yml
  8. 21
      qd/src/views/acs/angle/index.vue

2
hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java

@ -286,6 +286,8 @@ public class AgvServiceImpl implements AgvService {
return destinationOrder; return destinationOrder;
} }
private AcsPointAngleDto getAcsPointAngleDto(Instruction dto) { private AcsPointAngleDto getAcsPointAngleDto(Instruction dto) {
List<AcsPointAngleDto> list = acsPointAngleService.queryAll(new HashMap()); List<AcsPointAngleDto> list = acsPointAngleService.queryAll(new HashMap());
AcsPointAngleDto acsPointAngleDto = new AcsPointAngleDto(); AcsPointAngleDto acsPointAngleDto = new AcsPointAngleDto();

2
hd/nladmin-system/src/main/java/org/nl/acs/angle/rest/AcsPointAngleController.java

@ -38,7 +38,7 @@ public class AcsPointAngleController {
//@PreAuthorize("@el.check('acsPointAngle:list')") //@PreAuthorize("@el.check('acsPointAngle:list')")
public ResponseEntity public ResponseEntity
<Object> query(@RequestParam Map whereJson, Pageable page) { <Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(acsPointAngleService.queryAll(whereJson, page), HttpStatus.OK); return new ResponseEntity<>(acsPointAngleService.queryAllByCache(whereJson, page), HttpStatus.OK);
} }
@PostMapping @PostMapping

10
hd/nladmin-system/src/main/java/org/nl/acs/angle/service/AcsPointAngleService.java

@ -25,6 +25,16 @@ public interface AcsPointAngleService {
*/ */
Map<String, Object> queryAll(Map whereJson, Pageable page); Map<String, Object> queryAll(Map whereJson, Pageable page);
/**
* 在缓存中查询所有任务列表
*
* @param whereJson 条件
* @param page 分页参数
* @return
*/
Map<String, Object> queryAllByCache(Map whereJson, Pageable page);
/** /**
* 查询所有数据不分页 * 查询所有数据不分页
* *

19
hd/nladmin-system/src/main/java/org/nl/acs/angle/service/impl/AcsPointAngleServiceImpl.java

@ -1,9 +1,12 @@
package org.nl.acs.angle.service.impl; package org.nl.acs.angle.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.nl.acs.angle.service.AcsPointAngleService; import org.nl.acs.angle.service.AcsPointAngleService;
import org.nl.acs.angle.service.dto.AcsPointAngleDto; import org.nl.acs.angle.service.dto.AcsPointAngleDto;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.exception.BadRequestException; import org.nl.exception.BadRequestException;
import org.nl.wql.WQL; import org.nl.wql.WQL;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -111,6 +114,22 @@ public class AcsPointAngleServiceImpl implements AcsPointAngleService {
wo.update(json); wo.update(json);
} }
@Override
public Map<String, Object> queryAllByCache(Map whereJson, Pageable page) {
HashMap<String, String> map = new HashMap<>();
map.put("flag", "1");
String start_code = (String) whereJson.get("start_code");
String next_code = (String) whereJson.get("next_code");
if (!StrUtil.isEmpty(start_code)) {
map.put("start_code", start_code);
}
if (!StrUtil.isEmpty(next_code)) {
map.put("next_code", next_code);
}
final JSONObject jo = WQL.getWO("ANGLE_QUERY").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "");
return jo;
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)

58
hd/nladmin-system/src/main/java/org/nl/acs/angle/wql/ANGLE_QUERY.wql

@ -0,0 +1,58 @@
[交易说明]
交易名: 空载具入库分页查询
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
[数据库]
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
[IO定义]
#################################################
## 表字段对应输入参数
#################################################
输入.flag TYPEAS s_string
输入.start_code TYPEAS s_string
输入.next_code TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
[临时变量]
--所有中间过程变量均可在此处定义
[业务过程]
##########################################
# 1、输入输出检查 #
##########################################
##########################################
# 2、主过程前处理 #
##########################################
##########################################
# 3、业务主过程 #
##########################################
IF 输入.flag = "1"
PAGEQUERY
SELECT
*
FROM
acs_point_angle angle
WHERE
1=1
OPTION 输入.start_code <> ""
angle.start_device_code = 输入.start_code
ENDOPTION
OPTION 输入.next_code <> ""
angle.next_device_code = 输入.next_code
ENDOPTION
ENDSELECT
ENDPAGEQUERY
ENDIF

7
hd/nladmin-system/src/main/resources/config/application-dev.yml

@ -8,9 +8,11 @@ spring:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:gcc_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:gcc_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:gcc_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
username: ${DB_USER:root} username: ${DB_USER:root}
password: ${DB_PWD:123456} password: ${DB_PWD:root}
# password: ${DB_PWD:Root.123456}
# 初始连接数 # 初始连接数
initial-size: 5 initial-size: 5
# 最小连接数 # 最小连接数
@ -129,3 +131,6 @@ file:
# 文件大小 /M # 文件大小 /M
maxSize: 100 maxSize: 100
avatarMaxSize: 5 avatarMaxSize: 5
agvToAcs:
addr: http://127.0.0.1:8010

2
hd/nladmin-system/src/main/resources/config/application.yml

@ -43,7 +43,7 @@ rsa:
private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A== private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
logging: logging:
file: file:
path: C:\logs\nlacs\ path: D:\ACS\logs\nlacs\
acsTowms: acsTowms:
token: Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiJiZTVmOGZiZDcyMWU0NGFiODRlOGI4NTE4ODE5OWM0ZiIsImF1dGgiOiJ1c2VyOmxpc3QsbW9uaXRvcjpsaXN0Iiwic3ViIjoiYWNzIn0.JGga-TcIHTt76KT_m_7bt-fxdBUdwdRfRjXzwLyPLVLLPoOSXbVPbf2q6vcV-fh33r2wyrBEleWYVPOEvjrZMw token: Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiJiZTVmOGZiZDcyMWU0NGFiODRlOGI4NTE4ODE5OWM0ZiIsImF1dGgiOiJ1c2VyOmxpc3QsbW9uaXRvcjpsaXN0Iiwic3ViIjoiYWNzIn0.JGga-TcIHTt76KT_m_7bt-fxdBUdwdRfRjXzwLyPLVLLPoOSXbVPbf2q6vcV-fh33r2wyrBEleWYVPOEvjrZMw

21
qd/src/views/acs/angle/index.vue

@ -3,6 +3,27 @@
<!--工具栏--> <!--工具栏-->
<div class="head-container"> <div class="head-container">
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'--> <!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-input
v-model="query.start_code"
size="small"
clearable
placeholder="输入起点"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-input
v-model="query.next_code"
size="small"
clearable
placeholder="输入终点"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</div>
<crudOperation :permission="permission" /> <crudOperation :permission="permission" />
<!--表单组件--> <!--表单组件-->
<el-dialog <el-dialog

Loading…
Cancel
Save