小接口
This commit is contained in:
@@ -46,7 +46,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void receiveTaskFromAcs(Map jsonObject) {
|
||||
log.debug("WCS的请求参数为:" + jsonObject);
|
||||
log.info("ACS的请求参数为:" + jsonObject);
|
||||
String device_code = (String) jsonObject.get("device_code");
|
||||
String type = (String) jsonObject.get("type");
|
||||
JSONObject produceInfoByCode = new JSONObject();
|
||||
@@ -168,7 +168,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String material_id = (String) produceInfoByCode.get("material_id");
|
||||
String cust_id = (String) produceInfoByCode.get("cust_id");
|
||||
String producetask_id = (String) produceInfoByCode.get("producetask_id");
|
||||
JSONObject materialObj = WQLObject.getWQLObject("MD_ME_Material").query("material_id='" + material_id + "'").uniqueResult(0);
|
||||
JSONObject materialObj = WQLObject
|
||||
.getWQLObject("MD_ME_Material")
|
||||
.query("material_id='" + material_id + "'")
|
||||
.uniqueResult(0);
|
||||
JSONObject groubObj = new JSONObject();
|
||||
groubObj.put("group_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
groubObj.put("vehicle_code", vehicle_code);
|
||||
|
||||
@@ -83,6 +83,14 @@ public class DeviceController {
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PutMapping("/changeIsWorkDevice")
|
||||
@Log("修改是否生产设备")
|
||||
@ApiOperation("修改是否生产设备")
|
||||
public ResponseEntity<Object> changeIsWorkDevice(@RequestBody JSONObject json) {
|
||||
deviceService.changeIsWorkDevice(json);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@GetMapping("/getDevice")
|
||||
@Log("点位下拉获取设备信息")
|
||||
@ApiOperation("点位下拉获取设备信息")
|
||||
|
||||
@@ -2,27 +2,29 @@
|
||||
package org.nl.wms.pdm.rest;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
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.annotation.Log;
|
||||
import org.nl.wms.pdm.service.ProducetaskService;
|
||||
import org.nl.wms.pdm.service.dto.ProducetaskDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.annotation.Log;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.util.Map;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author geng by
|
||||
* @date 2022-04-26
|
||||
**/
|
||||
* @author geng by
|
||||
* @date 2022-04-26
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "生产任务管理")
|
||||
@@ -36,15 +38,15 @@ public class ProducetaskController {
|
||||
@Log("查询生产任务")
|
||||
@ApiOperation("查询生产任务")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
||||
return new ResponseEntity<>(producetaskService.queryAll(whereJson,page),HttpStatus.OK);
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(producetaskService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增生产任务")
|
||||
@ApiOperation("新增生产任务")
|
||||
//@PreAuthorize("@el.check('producetask:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody ProducetaskDto dto){
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody ProducetaskDto dto) {
|
||||
producetaskService.create(dto);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
@@ -53,7 +55,7 @@ public class ProducetaskController {
|
||||
@Log("修改生产任务")
|
||||
@ApiOperation("修改生产任务")
|
||||
//@PreAuthorize("@el.check('producetask:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody ProducetaskDto dto){
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody ProducetaskDto dto) {
|
||||
producetaskService.update(dto);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
@@ -71,55 +73,55 @@ public class ProducetaskController {
|
||||
@Log("查询物料")
|
||||
@ApiOperation("查询物料")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> getMaterial(){
|
||||
return new ResponseEntity<>(producetaskService.getMaterial(),HttpStatus.OK);
|
||||
public ResponseEntity<Object> getMaterial() {
|
||||
return new ResponseEntity<>(producetaskService.getMaterial(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getDevice")
|
||||
@Log("查询设备")
|
||||
@ApiOperation("查询设备")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> getDevice(@RequestBody JSONObject param){
|
||||
return new ResponseEntity<>(producetaskService.getDevice(param),HttpStatus.OK);
|
||||
public ResponseEntity<Object> getDevice(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(producetaskService.getDevice(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getDevice1")
|
||||
@Log("查询设备")
|
||||
@ApiOperation("查询设备")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> getDevice1(){
|
||||
return new ResponseEntity<>(producetaskService.getDevice1(),HttpStatus.OK);
|
||||
public ResponseEntity<Object> getDevice1() {
|
||||
return new ResponseEntity<>(producetaskService.getDevice1(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getProduceline")
|
||||
@Log("查询生产产线")
|
||||
@ApiOperation("查询生产产线")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> getProduceline(){
|
||||
return new ResponseEntity<>(producetaskService.getProduceline(),HttpStatus.OK);
|
||||
public ResponseEntity<Object> getProduceline() {
|
||||
return new ResponseEntity<>(producetaskService.getProduceline(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getCust")
|
||||
@Log("查询客户")
|
||||
@ApiOperation("查询客户")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> getCust(){
|
||||
return new ResponseEntity<>(producetaskService.getCust(),HttpStatus.OK);
|
||||
public ResponseEntity<Object> getCust() {
|
||||
return new ResponseEntity<>(producetaskService.getCust(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getWorkprocedure")
|
||||
@Log("查询工序")
|
||||
@ApiOperation("查询工序")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> getWorkprocedure(){
|
||||
return new ResponseEntity<>(producetaskService.getWorkprocedure(),HttpStatus.OK);
|
||||
public ResponseEntity<Object> getWorkprocedure() {
|
||||
return new ResponseEntity<>(producetaskService.getWorkprocedure(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/excelImport")
|
||||
@Log("excel导入")
|
||||
@ApiOperation("excel导入")
|
||||
public ResponseEntity<Object> excelImport(@RequestParam("file") MultipartFile file, HttpServletRequest request){
|
||||
producetaskService.excelImport(file,request);
|
||||
public ResponseEntity<Object> excelImport(@RequestParam("file") MultipartFile file, HttpServletRequest request) {
|
||||
producetaskService.excelImport(file, request);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -127,7 +129,7 @@ public class ProducetaskController {
|
||||
@Log("复制新增")
|
||||
@ApiOperation("复制新增")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> copyAdd(@RequestBody JSONObject param){
|
||||
public ResponseEntity<Object> copyAdd(@RequestBody JSONObject param) {
|
||||
producetaskService.copyAdd(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@@ -136,15 +138,15 @@ public class ProducetaskController {
|
||||
@Log("根据设备查询任务")
|
||||
@ApiOperation("根据设备查询任务")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> getTaskByDeviceId(@RequestParam Map whereJson, Pageable page){
|
||||
return new ResponseEntity<>(producetaskService.getTaskByDeviceId(whereJson,page),HttpStatus.OK);
|
||||
public ResponseEntity<Object> getTaskByDeviceId(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(producetaskService.getTaskByDeviceId(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping("/sortUpdate")
|
||||
@Log("排序")
|
||||
@ApiOperation("排序")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> sortUpdate(@RequestBody JSONObject param){
|
||||
public ResponseEntity<Object> sortUpdate(@RequestBody JSONObject param) {
|
||||
producetaskService.sortUpdate(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@@ -153,7 +155,7 @@ public class ProducetaskController {
|
||||
@Log("强制完成")
|
||||
@ApiOperation("强制完成")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> mandFinish(@RequestBody JSONObject param){
|
||||
public ResponseEntity<Object> mandFinish(@RequestBody JSONObject param) {
|
||||
producetaskService.mandFinish(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@@ -162,9 +164,16 @@ public class ProducetaskController {
|
||||
@Log("下发")
|
||||
@ApiOperation("下发")
|
||||
//@PreAuthorize("@el.check('producetask:list')")
|
||||
public ResponseEntity<Object> issued(@RequestBody JSONObject param){
|
||||
public ResponseEntity<Object> issued(@RequestBody JSONObject param) {
|
||||
producetaskService.issued(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getVehicleType")
|
||||
@Log("通过设备查询可用载具类型")
|
||||
@ApiOperation("通过设备查询可用载具类型")
|
||||
public ResponseEntity<JSONObject> getVehicleTypeByDeviceId(@RequestBody JSONObject device) {
|
||||
return new ResponseEntity<>(producetaskService.getVehicleTypeByDeviceId(device.getLong("device_id")), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,4 +77,10 @@ public interface DeviceService {
|
||||
* @param json
|
||||
*/
|
||||
void changeActive(JSONObject json);
|
||||
|
||||
/**
|
||||
* 改变是否工作设备
|
||||
* @param json
|
||||
*/
|
||||
void changeIsWorkDevice(JSONObject json);
|
||||
}
|
||||
|
||||
@@ -142,4 +142,11 @@ public interface ProducetaskService {
|
||||
* @param param
|
||||
*/
|
||||
void issued(JSONObject param);
|
||||
|
||||
/**
|
||||
* 通过设备查询可用载具类型
|
||||
* @param deviceId 设备id
|
||||
* @return 字典表数组
|
||||
*/
|
||||
JSONObject getVehicleTypeByDeviceId(Long deviceId);
|
||||
}
|
||||
|
||||
@@ -178,4 +178,20 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
WQLObject.getWQLObject("pdm_base_device").update(json);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeIsWorkDevice(JSONObject json) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
String is_work_device = "1";
|
||||
if (StrUtil.equals("1", json.getString("is_work_device"))) {
|
||||
is_work_device = "0";
|
||||
}
|
||||
json.put("is_work_device", is_work_device);
|
||||
json.put("update_optid", currentUserId);
|
||||
json.put("update_optname", nickName);
|
||||
json.put("update_time", now);
|
||||
WQLObject.getWQLObject("pdm_base_device").update(json);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wms.WorkProcedureEnum;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.pdm.service.ProducetaskService;
|
||||
@@ -28,6 +29,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
@@ -106,6 +108,12 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(ProducetaskDto dto) {
|
||||
Long device_id = dto.getDevice_id();
|
||||
if (ObjectUtil.isNotEmpty(device_id)
|
||||
&& device_id.equals(1518136519804719104L)
|
||||
&& ObjectUtil.isEmpty(dto.getCust_id())) {
|
||||
throw new BadRequestException("新增分拣拆垛机械手的生产任务, 客户不能为空!");
|
||||
}
|
||||
|
||||
//编码唯一性校验
|
||||
String producetask_code = dto.getProducetask_code();
|
||||
@@ -185,9 +193,10 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
|
||||
@Override
|
||||
public JSONArray getDevice1() {
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_base_device");
|
||||
JSONArray arr = wo.query(" is_delete = '0'", "device_code").getResultJSONArray(0);
|
||||
return arr;
|
||||
return WQLObject
|
||||
.getWQLObject("pdm_base_device")
|
||||
.query(" is_delete = '0' AND is_work_device = '1'", "device_code")
|
||||
.getResultJSONArray(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -275,8 +284,8 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
String now = DateUtil.now();
|
||||
String producetask_id = param.getString("producetask_id");
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_mg_producetask");
|
||||
JSONObject taskObj= WQL.getWO("PDM_ProduceTask_01").addParam("flag", "3").addParam("producetask_id", producetask_id).process().uniqueResult(0);
|
||||
taskObj.put("product_code","wms");
|
||||
JSONObject taskObj = WQL.getWO("PDM_ProduceTask_01").addParam("flag", "3").addParam("producetask_id", producetask_id).process().uniqueResult(0);
|
||||
taskObj.put("product_code", "wms");
|
||||
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
|
||||
JSONArray arr = new JSONArray();
|
||||
arr.add(taskObj);
|
||||
@@ -410,4 +419,62 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
return m.matches();
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getVehicleTypeByDeviceId(Long deviceId) {
|
||||
WQLObject dict = WQLObject.getWQLObject("sys_dict_detail");
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("isHLJ", false);
|
||||
if (ObjectUtil.isEmpty(deviceId)) {
|
||||
// 如果请求参数为空返回所有
|
||||
result.put("vehicleTypeList", dict.query("dict_id = 25").getResultJSONArray(0));
|
||||
return result;
|
||||
}
|
||||
|
||||
// 根据设备id查询设备
|
||||
JSONObject device = WQLObject
|
||||
.getWQLObject("pdm_base_device")
|
||||
.query("device_id = '" + deviceId + "'")
|
||||
.uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
throw new BadRequestException("设备不存在!");
|
||||
}
|
||||
|
||||
// 根据设备工序id获取工序枚举对象
|
||||
WorkProcedureEnum workProcedure = WorkProcedureEnum.get(device.getString("workprocedure_id"));
|
||||
if (ObjectUtil.isEmpty(workProcedure)) {
|
||||
throw new BadRequestException("此设备工序不存在!");
|
||||
}
|
||||
|
||||
// 根据工序区分不同的设备
|
||||
assert workProcedure != null;
|
||||
switch (workProcedure) {
|
||||
case HNGX:
|
||||
result.put("isHLJ", true);
|
||||
// 混料机只能使用料盅
|
||||
result.put("vehicleTypeList",
|
||||
dict
|
||||
.query("dict_id = 25 AND (value = '01' OR value = '09')")
|
||||
.getResultJSONArray(0));
|
||||
break;
|
||||
case YZGX:
|
||||
// 压制机只能使用钢托
|
||||
result.put("vehicleTypeList",
|
||||
dict
|
||||
.query("dict_id = 25 AND value = '02'")
|
||||
.getResultJSONArray(0));
|
||||
break;
|
||||
case FJGX:
|
||||
// 分拣机只能使用木托盘
|
||||
result.put("vehicleTypeList",
|
||||
dict
|
||||
.query("dict_id = 25 AND value IN ('03', '04', '05', '06', '07', '08')")
|
||||
.getResultJSONArray(0));
|
||||
break;
|
||||
default:
|
||||
// 其它返回所有
|
||||
result.put("vehicleTypeList", dict.query("dict_id = 25").getResultJSONArray(0));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
28
wms/hd/nladmin-system/src/main/resources/AcsToWms.xml
Normal file
28
wms/hd/nladmin-system/src/main/resources/AcsToWms.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<included>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE5" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/acstowms/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>20GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl" level="INFO" additivity="true">
|
||||
<appender-ref ref="FILE5"/>
|
||||
</logger>
|
||||
|
||||
<!-- 打印sql -->
|
||||
</included>
|
||||
28
wms/hd/nladmin-system/src/main/resources/WmsToAcs.xml
Normal file
28
wms/hd/nladmin-system/src/main/resources/WmsToAcs.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<included>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE5" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/wmstoacs/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>20GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl" level="INFO" additivity="true">
|
||||
<appender-ref ref="FILE5"/>
|
||||
</logger>
|
||||
|
||||
<!-- 打印sql -->
|
||||
</included>
|
||||
@@ -8,10 +8,12 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:llsh_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:llsh_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:llsh_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
#password: ${DB_PWD:P@ssw0rd}
|
||||
password: ${DB_PWD:Root.123456}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:zjw123}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
|
||||
@@ -16,7 +16,8 @@ https://juejin.cn/post/6844903775631572999
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!--引入默认的一些设置-->
|
||||
<!-- <include resource="log/AutoCreateInst.xml"/>-->
|
||||
<include resource="AcsToWms.xml"/>
|
||||
<include resource="WmsToAcs.xml"/>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
|
||||
Reference in New Issue
Block a user