This commit is contained in:
2024-01-05 15:57:25 +08:00
20 changed files with 181 additions and 83 deletions

View File

@@ -250,13 +250,13 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i
// apply_for_casing_inspection(material1, material2);
bushingSucess();
} else if (move != 1) {
remark += "套管工位没有货";
remark = "套管工位没有货";
} else if (task < 1) {
remark += "纸管库的任务号为空";
remark = "纸管库的任务号为空";
} else if (task1 < 1) {
remark += "行架任务为空";
remark = "行架任务为空";
} else if (requireSucess) {
remark += "requrieSucess为" + requireSucess;
remark = "requrieSucess为" + requireSucess;
}
break;
default:

View File

@@ -256,7 +256,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
if (action != last_action) {
this.setFeedbackSucess(false);
logServer.deviceItemValue(this.device_code, "action", String.valueOf(action));
logServer.deviceExecuteLog(this.device_code, "", "", "信号action" + last_action + "->" + action);
logServer.deviceExecuteLog(this.device_code, "", "", "信号action" + last_action + "->" + action + " feedbackSucess:" + feedbackSucess);
}
if (error != last_error) {
if (error != 0) {
@@ -296,7 +296,9 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
if (task > 0 && !feedbackSucess) {
update_instruction_status();
}
}/*else {
logServer.deviceExecuteLog(this.device_code,"","","更新指令状态,条件不满足的原因,task:"+task+"feedbackSucess:"+feedbackSucess);
}*/
} catch (Exception var17) {
@@ -435,6 +437,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
applyManipulatorActionRequest.setType("2");
applyManipulatorActionRequest.setTask_code1(task_code);
applyManipulatorActionRequest.setSize(String.valueOf(inflatable_shaft_size));
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈尺寸");
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus() == 200) {
feedbackSucess = true;
@@ -455,6 +458,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code();
applyManipulatorActionRequest.setType("3");
applyManipulatorActionRequest.setTask_code1(task_code);
logServer.deviceExecuteLog(this.device_code, "", "", "开始申请放货点");
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "申请放货点请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
@@ -481,6 +485,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code();
applyManipulatorActionRequest.setType("4");
applyManipulatorActionRequest.setTask_code1(task_code);
logServer.deviceExecuteLog(this.device_code, "", "", "开始申请取货点");
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus() == 200) {
String get_device_code = applyManipulatorActionResponse.getDevice_code();
@@ -507,6 +512,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code();
applyManipulatorActionRequest.setType("5");
applyManipulatorActionRequest.setTask_code1(task_code);
logServer.deviceExecuteLog(this.device_code, "", "", "申请二次放货点");
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse.getstatus() == 200) {
String put_device_code2 = applyManipulatorActionResponse.getDevice_code();
@@ -533,6 +539,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code();
applyManipulatorActionRequest.setAction("1");
applyManipulatorActionRequest.setTask_code1(task_code);
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈缓存库取货完成");
ApplyManipulatorActionResponse applyManipulatorActionResponse1 = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse1.getstatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "缓存库取货请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse1));
@@ -553,6 +560,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String task_code = inst1.getTask_code();
applyManipulatorActionRequest.setAction("2");
applyManipulatorActionRequest.setTask_code1(task_code);
logServer.deviceExecuteLog(this.device_code, "", "", "开始反馈缓存库放货完成");
ApplyManipulatorActionResponse applyManipulatorActionResponse1 = acsToWmsService.actionFinishRequest(applyManipulatorActionRequest);
if (applyManipulatorActionResponse1.getstatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "缓存库放货完成,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse1));
@@ -569,12 +577,40 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
}
}
//异常气胀轴反馈
/*if (action == 9) {
String task_code = inst1.getTask_code();
applyManipulatorActionRequest.setType("9");
applyManipulatorActionRequest.setTask_code1(task_code);
logServer.deviceExecuteLog(this.device_code, "", "", "异常反馈");
applyManipulatorActionResponse = acsToWmsService.applyManipulatorActionRequest(applyManipulatorActionRequest);
if (ObjectUtil.isNotEmpty(applyManipulatorActionResponse) && applyManipulatorActionResponse.getstatus() == 200) {
logServer.deviceExecuteLog(this.device_code, "", "", "异常反馈完成,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse));
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 9);
this.writing(map);
feedbackSucess = true;
message = "缓存库放货成功";
try {
instructionService.cancel(inst1.getInstruction_id());
logServer.deviceExecuteLog(this.device_code, "", "", "取消指令完成");
TaskDto byTaskCode = taskserver.findByTaskCode(inst1.getTask_code());
taskserver.cancel(byTaskCode.getTask_id());
logServer.deviceExecuteLog(this.device_code, "", "", "取消任务完成");
} catch (Exception e) {
message = "取消任务或指令失败,失败原因"+ e.getMessage();
logServer.deviceExecuteLog(this.device_code, "", "", "取消任务或指令失败,失败原因"+e.getMessage());
}
}
}*/
//放货完成
if (mode == 3 && action == 8 && move == 0) {
if (inst1 != null) {
try {
feedbackSucess = true;
logServer.deviceExecuteLog(this.device_code, "", "", "放货完成");
finish_instruction(inst1);
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 8);
@@ -744,12 +780,12 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + param;
//String opcservcerid = this.getDevice().getOpc_server_id();
//Server server = ReadUtil.getServer(opcservcerid);
// String opcservcerid = this.getDevice().getOpc_server_id();
// Server server = ReadUtil.getServer(opcservcerid);
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_param, Integer.parseInt(value));
// itemMap.put(to_param, Integer.parseInt(value));
// itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
}
@@ -810,13 +846,13 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 1);
map.put("inflatableShaftVersion", Integer.parseInt(version));
map.put("inflatableShaftVersion", version);
map.put("tube_num", bushing_num);
map.put("is_wrapped", is_bushing);
map.put("to_task_type", Integer.parseInt(taskDto.getTruss_type()));
map.put("to_onset", Integer.parseInt(start_addr));
map.put("to_task", Integer.parseInt(instruction.getInstruction_code()));
map.put("to_target", Integer.parseInt(next_addr));
map.put("to_task_type", taskDto.getTruss_type());
map.put("to_onset", start_addr);
map.put("to_task", instruction.getInstruction_code());
map.put("to_target", next_addr);
try {
this.writing(map);
} catch (Exception e) {
@@ -836,11 +872,11 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
if ("6".equals(task.getTruss_type())) {
flag = checkAgv(task);
if (flag) {
logServer.deviceExecuteLog(this.device_code,"","","RGV条件满足,允许创建指令,任务号为:"+task.getTask_code());
logServer.deviceExecuteLog(this.device_code, "", "", "RGV条件满足,允许创建指令,任务号为:" + task.getTask_code());
break;
} else {
task = null;
logServer.deviceExecuteLog(this.device_code,"","","RGV条件不满足,不允许允许创建指令,任务号为:"+task);
logServer.deviceExecuteLog(this.device_code, "", "", "RGV条件不满足,不允许允许创建指令,任务号为:" + task);
continue;
}
@@ -866,6 +902,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
return false;
}
}
String taskid = task.getTask_id();
String taskcode = task.getTask_code();
String vehiclecode = task.getVehicle_code();
@@ -966,15 +1003,14 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
rgv1 = (RgvDeviceDriver) agv1.getDeviceDriver();
rgv2 = (RgvDeviceDriver) agv2.getDeviceDriver();
if ((rgv1.getMode() == 2 && rgv1.getMove1() == 1 && rgv1.getMove2() == 0) || (rgv2.getMode() == 2 && rgv2.getMove1() == 1 && rgv2.getMove2() == 0)) {
logServer.deviceExecuteLog(device_code, "", "", "mode1"+rgv1.getMode()+"mode2"+
rgv2.getMode()+"rgv1的move2"+ rgv1.getMove2()+"rgv2的move2"+rgv2.getMove2());
logServer.deviceExecuteLog(device_code, "", "", "mode1" + rgv1.getMode() + "mode2" +
rgv2.getMode() + "rgv1的move2" + rgv1.getMove2() + "rgv2的move2" + rgv2.getMove2());
return true;
} else {
logServer.deviceExecuteLog(device_code, "", "", "rgv信号不符合");
}
} else {
logServer.deviceExecuteLog(device_code, "", "", "关联的站点不是rgv");
}
} else {
logServer.deviceExecuteLog(device_code, "", "", "rgv没有关联站点");

View File

@@ -383,7 +383,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
//存在行架->暂存的AGV任务 需要过滤
// 6 行架任务 8烘箱任务
if(!StrUtil.equals(taskDto.getTask_type(),"6") && !StrUtil.equals(taskDto.getTask_type(),"8")){
if (!StrUtil.equals(taskDto.getTask_type(), "6") && !StrUtil.equals(taskDto.getTask_type(), "8")) {
taskDto = null;
continue;
}
@@ -436,7 +436,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
boolean isCloseDoor = this.judgeCloseDoor(start_device_code, next_device_code);
//未关门结束
if (isCloseDoor) {
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code +",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code();
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code + ",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code();
return false;
}
instruction.setInstruction_status("1");
@@ -473,12 +473,12 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
} else {
List<TaskDto> taskDtoList = taskserver.queryTaskByDeviceCode(startDeviceCode);
if (ObjectUtil.isNotEmpty(taskDtoList)) {
for(int j=0; j <taskDtoList.size();j++ ){
for (int j = 0; j < taskDtoList.size(); j++) {
//按照优先级排序 优先级相等按照创建时间排序
taskDtoList = this.sortTask(taskDtoList);
task = taskDtoList.get(j);
// 6 行架任务 8烘箱任务
if(!StrUtil.equals(task.getTask_type(),"6") && !StrUtil.equals(task.getTask_type(),"8")){
if (!StrUtil.equals(task.getTask_type(), "6") && !StrUtil.equals(task.getTask_type(), "8")) {
task = null;
continue;
}
@@ -797,6 +797,20 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
} else if (this.getAction() == 4) {
action = "放货完成";
}
String steps_type = "";
if (now_steps_type == 0) {
steps_type += "无任务执行";
} else if (now_steps_type == 1) {
steps_type = "更新指令状态";
} else if (now_steps_type == 2) {
steps_type = "下发电气信号";
}else if(now_steps_type == 3){
steps_type = "允许取货";
}else if (now_steps_type ==4 ){
steps_type += "允许放货";
}else if (now_steps_type == 5){
steps_type += "放货完成";
}
jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode);
@@ -815,6 +829,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
jo.put("is_click", true);
jo.put("x", x_position);
jo.put("y", y_position);
jo.put("now_steps_type", steps_type);
return jo;
}

View File

@@ -248,14 +248,22 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv
requireSucess = true;
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴成功,返回参数:" + applyManipulatorActionResponse);
message = "套轴申请成功";
}else if (ObjectUtils.isNotEmpty(applyManipulatorActionResponse) && "2".equals(applyManipulatorActionResponse.getIs_bushing())){
message = applyManipulatorActionResponse.getMessage();
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 98);
this.writing(map);
requireSucess = true;
message = "等待套轴";
logServer.deviceExecuteLog(this.device_code, "", "", "等待套轴,返回参数:" + applyManipulatorActionResponse);
}else {
message = applyManipulatorActionResponse.getMessage();
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", 99);
this.writing(map);
requireSucess = true;
message = "申请失败";
logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴失败,返回参数:" + applyManipulatorActionResponse);
message = "套轴申请失败";
logServer.deviceExecuteLog(this.device_code, "", "", "套轴申请失败,返回参数:" + applyManipulatorActionResponse);
}
}

View File

@@ -697,7 +697,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
this.instruction_require_time = date;
//判断是否存在起点相同 任务状态就绪的任务
TaskDto taskdto = taskserver.findByStartCodeAndReady(device_code);
if (!ObjectUtil.isEmpty(taskdto)) {
if (!ObjectUtil.isEmpty(taskdto) && "5".equals(taskdto.getTask_type())) {
// if (!ObjectUtils.isEmpty(instructionService.findByBarcodeFromCache(container_code))) {
// return false;
// }

View File

@@ -33,7 +33,6 @@ public class WmsToAcsController {
@PostMapping("/task")
@Log(value = "ACS接收WMS任务",isInterfaceLog = true,interfaceLogType= InterfaceLogType.LMS_TO_ACS)
@SaIgnore
public ResponseEntity<Object> createFromWms(@RequestBody String whereJson) {
return new ResponseEntity<>(wmstoacsService.crateTask(whereJson), HttpStatus.OK);
@@ -73,7 +72,6 @@ public class WmsToAcsController {
@PostMapping("/action")
@Log(value = "WMS下发点位信号",isInterfaceLog = true,interfaceLogType= InterfaceLogType.LMS_TO_ACS)
@SaIgnore
public ResponseEntity<Object> putAction(@RequestBody String whereJson) throws Exception {
return new ResponseEntity<>(wmstoacsService.putAction(whereJson), HttpStatus.OK);

View File

@@ -207,6 +207,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
HongXiangStationDeviceDriver hongXiangStationDeviceDriver;
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
SiemensConveyorDeviceDriver siemensConveyorDeviceDriver;
PluggingUnpluggingMachineDeviceDriver pluggingUnpluggingMachineDeviceDriver;
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
hongXiangStationDeviceDriver.writing(code, value);
@@ -219,6 +220,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
siemensConveyorDeviceDriver = (SiemensConveyorDeviceDriver) device.getDeviceDriver();
siemensConveyorDeviceDriver.writing(code, value);
}
if (device.getDeviceDriver() instanceof PluggingUnpluggingMachineDeviceDriver) {
pluggingUnpluggingMachineDeviceDriver = (PluggingUnpluggingMachineDeviceDriver) device.getDeviceDriver();
pluggingUnpluggingMachineDeviceDriver.writing(code, value);
}
}

View File

@@ -2,8 +2,6 @@
package org.nl.acs.route.rest;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.route.service.RoutePlanService;
@@ -68,7 +66,6 @@ public class RoutePlanController {
}
@Log("导出路由方案")
@GetMapping(value = "/download")
//@PreAuthorize("@el.check('routePlan:list')")
public void download(HttpServletResponse response, Map whereJson) throws IOException {
@@ -77,7 +74,6 @@ public class RoutePlanController {
@GetMapping("/selectList")
@Log("下拉选路由方案")
//@PreAuthorize("@el.check('routePlan:list')")
public ResponseEntity<Object> selectList() {
return new ResponseEntity<>(routePlanService.selectList(), HttpStatus.OK);

BIN
acs/nladmin-ui/dist.rar Normal file

Binary file not shown.

View File

@@ -749,6 +749,9 @@ export default {
} else if (val === 'out_qty_arr') {
const obj = { name: '出库数量', value: data[val] }
this.arr.push(obj)
} else if (val === 'now_steps_type') {
const obj = { name: '烘箱执行信号', value: data[val] }
this.arr.push(obj)
}
}
}

View File

@@ -31,6 +31,11 @@
</properties>
<dependencies>
<dependency>
<groupId>org.dromara.dynamictp</groupId>
<artifactId>dynamic-tp-spring-boot-starter-adapter-webserver</artifactId>
<version>1.1.6.1</version>
</dependency>
<!-- 日志链路追踪 https://tlog.yomahub.com/pages/f62a84/#%E5%90%8C%E6%AD%A5%E6%97%A5%E5%BF%97-->
<dependency>
<groupId>com.yomahub</groupId>
@@ -297,12 +302,6 @@
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.9.2</version>
</dependency>
<!--接口限流-->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@@ -3,13 +3,12 @@ package org.nl;
import cn.dev33.satoken.annotation.SaIgnore;
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
import com.alicp.jetcache.anno.config.EnableMethodCache;
import org.dromara.dynamictp.core.spring.EnableDynamicTp;
import org.mybatis.spring.annotation.MapperScan;
import org.nl.modules.wql.util.SpringContextHolder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableAsync;
@@ -25,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
*/
@EnableAsync
@RestController
@EnableDynamicTp
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})
@@ -47,14 +47,6 @@ public class AppRun {
public SpringContextHolder springContextHolder() {
return new SpringContextHolder();
}
@Bean
public ServletWebServerFactory webServerFactory() {
TomcatServletWebServerFactory fa = new TomcatServletWebServerFactory();
fa.addConnectorCustomizers(connector -> connector.setProperty("relaxedQueryChars", "[]{}"));
return fa;
}
/**
* 访问首页提示
*

View File

@@ -25,7 +25,6 @@ public class AsyncLuceneAppender extends AspectLogbackAsyncAppender {
if (mdcPropertyMap.getClass().getName().contains("SynchronizedMap")) {
mdcPropertyMap.put("traceId", traceId);
}
MDC.clear();
}
super.append(event);
}

View File

@@ -16,7 +16,12 @@
package org.nl.config.thread;
import org.dromara.dynamictp.core.support.DynamicTp;
import org.nl.modules.wql.util.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
@@ -28,16 +33,22 @@ import java.util.concurrent.TimeUnit;
* @author Zheng Jie
* @date 2019年10月31日18:16:47
*/
@Configuration
public class ThreadPoolExecutorUtil {
public static ThreadPoolExecutor getPoll() {
AsyncTaskProperties properties = SpringContextHolder.getBean(AsyncTaskProperties.class);
@Autowired
private AsyncTaskProperties asyncTaskProperties;
@Bean
@Primary
@DynamicTp("el-thread")
public ThreadPoolExecutor threadPoolExecutor() {
return new ThreadPoolExecutor(
properties.getCorePoolSize(),
properties.getMaxPoolSize(),
properties.getKeepAliveSeconds(),
asyncTaskProperties.getCorePoolSize(),
asyncTaskProperties.getMaxPoolSize(),
asyncTaskProperties.getKeepAliveSeconds(),
TimeUnit.SECONDS,
new ArrayBlockingQueue<>(properties.getQueueCapacity()),
new ArrayBlockingQueue<>(asyncTaskProperties.getQueueCapacity()),
new TheadFactoryName()
);
}

View File

@@ -139,8 +139,8 @@ public class LogAspect {
throw ex;
} finally {
log.info("[--response--][请求接口:{} 执行结束][耗时:{}s]", url, (System.currentTimeMillis() - comming) / 1000);
MDC.clear();
LuceneAppender.traceIdTL.remove();
MDC.clear();
}
return result;
}

View File

@@ -16,6 +16,8 @@ import org.nl.system.service.quartz.impl.SysQuartzJobServiceImpl;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.annotation.Async;
import java.util.concurrent.Future;
@@ -35,7 +37,9 @@ public class ExecutionJob extends TLogQuartzJobBean {
/**
* 该处仅供参考
*/
private final static ThreadPoolExecutor EXECUTOR = ThreadPoolExecutorUtil.getPoll();
@Autowired
@Qualifier("threadPoolExecutor")
private ThreadPoolExecutor EXECUTOR;
@Override
public void executeTask(JobExecutionContext context) throws JobExecutionException {

View File

@@ -71,7 +71,7 @@
FROM
ST_IVT_IOStorInv ios
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinv_id = ios.iostorinv_id
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn
WHERE
ios.is_delete = '0'
AND

View File

@@ -792,7 +792,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
JSONArray resultJSONArray = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).process().getResultJSONArray(0);
List<JSONObject> ivtList = WQL.getWO("QST_IVT_CHECKOUTBILL").addParam("flag", "20").process().getResultJSONArray(0).toJavaList(JSONObject.class);
List<JSONObject> ivtList = WQL.getWO("QST_IVT_CHECKOUTBILL").addParam("flag", "21").process().getResultJSONArray(0).toJavaList(JSONObject.class);
List<Map<String, Object>> list = new ArrayList<>();
@@ -822,7 +822,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
}
String box_weight = ivtList.stream()
.filter(row -> row.getString("bill_code").equals(jsonObject.getString("bill_code")))
.filter(row -> row.getString("iostorinvdtl_id").equals(jsonObject.getString("iostorinvdtl_id")))
.map(row -> row.getDoubleValue("box_weight"))
.reduce(Double::sum).orElse(0.00).toString();

View File

@@ -199,7 +199,8 @@
MAX(ios.order_number) AS order_number,
MAX(ios.receiptaddress) AS receiptaddress,
MAX( sd.label ) AS bill_status,
count(DISTINCT(dis.box_no)) as box_count
count(DISTINCT(dis.box_no)) as box_count,
dtl.iostorinvdtl_id
FROM
st_ivt_iostorinvdis dis
LEFT JOIN st_ivt_iostorinvdtl dtl ON dis.iostorinvdtl_id = dtl.iostorinvdtl_id
@@ -1105,32 +1106,21 @@
ENDQUERY
ENDIF
IF 输入.flag = "20"
IF 输入.flag = "21"
QUERY
SELECT
SUM(sub.box_weight) AS box_weight,
MAX(ios.bill_code) AS bill_code
MAX(dtl.iostorinvdtl_id) AS iostorinvdtl_id
FROM
(
SELECT
a.box_no,
MAX(b.iostorinv_id) AS iostorinv_id,
MAX(a.pcsn) AS pcsn
FROM
st_ivt_iostorinvdis a
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
WHERE
b.io_type = '1'
and b.is_delete='0'
GROUP BY a.box_no
) dis
LEFT JOIN st_ivt_iostorinv ios ON dis.iostorinv_id = ios.iostorinv_id
st_ivt_iostorinvdis dis
LEFT JOIN st_ivt_iostorinvdtl dtl ON dis.iostorinvdtl_id = dtl.iostorinvdtl_id
LEFT JOIN st_ivt_iostorinv ios ON ios.iostorinv_id = dtl.iostorinv_id
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_sn = dis.box_no AND dis.pcsn = sub.container_name
WHERE
ios.io_type = '1'
and ios.is_delete='0'
GROUP BY ios.bill_code
GROUP BY dtl.iostorinvdtl_id
ENDSELECT
ENDQUERY

View File

@@ -1,3 +1,7 @@
server:
tomcat:
relaxed-query-chars: [ '|','{','}','[',']' ] #字符问题https://blog.csdn.net/CanYue_Yi/article/details/109182577
relaxed-path-chars: [ '|','{','}','[',']' ] #字符问题: https://blog.csdn.net/weixin_41996632/article/details/90715118
spring:
freemarker:
check-template-location: false
@@ -9,7 +13,45 @@ spring:
redis:
repositories:
enabled: false
dynamic:
tp:
enabled: true # 是否启用 dynamictp默认true
enabledBanner: false # 是否启用 控制台banner默认true
enabledCollect: true # 是否开启监控指标采集默认true
collectorTypes: logging # 监控数据采集器类型logging | micrometer | internal_logging默认micrometer
logPath: C:\log\lms # 监控日志数据路径,默认 ${user.home}/logs采集类型非logging不用配置
monitorInterval: 8
tomcatTp: # tomcat webserver 线程池配置
threadPoolAliasName: tomcat 线程池 # 线程池别名,可选
corePoolSize: 100
maximumPoolSize: 200
keepAliveTime: 60
runTimeout: 10000
queueTimeout: 100
notifyItems: # 报警项,不配置自动会按默认值配置(变更通知、容量报警、活性报警、拒绝报警、任务超时报警)
- type: change
enabled: true
- type: capacity # 队列容量使用率,报警项类型,查看源码 NotifyTypeEnum枚举类
enabled: true
threshold: 80 # 报警阈值默认70意思是队列使用率达到70%告警
interval: 120 # 报警间隔单位s默认120
- type: liveness # 线程池活性
enabled: true
threshold: 80 # 报警阈值,默认 70意思是活性达到70%告警
- type: reject # 触发任务拒绝告警
enabled: true
threshold: 100 # 默认阈值10
- type: run_timeout # 任务执行超时告警
enabled: true
threshold: 100 # 默认阈值10
- type: queue_timeout # 任务排队超时告警
enabled: true
threshold: 100 # 默认阈值10
#配置 Jpa
jpa:
hibernate: