fix: 暂存
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package org.nl.b_lms.pda.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description: 生箔手持控制类
|
||||
* @Date: 2024/8/5
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pda/raw/v2")
|
||||
@Slf4j
|
||||
public class RawPdaController {
|
||||
}
|
||||
@@ -26,15 +26,13 @@ public class InterfaceLogController {
|
||||
private final InterfaceLogService interfaceLogService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询接口日志")
|
||||
|
||||
// @Log("查询接口日志")
|
||||
//@SaCheckPermission("point:list")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(interfaceLogService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/error/{id}")
|
||||
|
||||
// @SaCheckPermission("@el.check()")
|
||||
public ResponseEntity<Object> queryErrorLogs(@PathVariable String id) {
|
||||
return new ResponseEntity<>(interfaceLogService.findByErrDetail(id), HttpStatus.OK);
|
||||
@@ -42,7 +40,6 @@ public class InterfaceLogController {
|
||||
|
||||
@DeleteMapping(value = "/delLogs")
|
||||
@Log("删除所有接口日志")
|
||||
|
||||
public ResponseEntity<Object> delLogs() {
|
||||
interfaceLogService.delLogs();
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
@@ -50,7 +47,6 @@ public class InterfaceLogController {
|
||||
|
||||
@GetMapping("/logTypeList")
|
||||
@Log("查询接口日志类型下拉框")
|
||||
|
||||
public ResponseEntity<Object> logTypeList() {
|
||||
return new ResponseEntity<>(interfaceLogService.logTypeList(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@RequestMapping("/api/wms/task")
|
||||
@Slf4j
|
||||
public class AcsToWmsController {
|
||||
@@ -35,14 +34,8 @@ public class AcsToWmsController {
|
||||
return new ResponseEntity<>(acsToWmsService.receiveTaskStatusAcs(string), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping("/orderFinish")
|
||||
@Log(value = "ACS给WMS下发工单完成状态", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> orderFinish(@RequestBody String string) {
|
||||
return new ResponseEntity<>(acsToWmsService.orderFinish(string), HttpStatus.OK);
|
||||
@@ -50,7 +43,6 @@ public class AcsToWmsController {
|
||||
|
||||
@PostMapping("/apply")
|
||||
@Log(value = "申请任务", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> apply(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
||||
@@ -58,8 +50,6 @@ public class AcsToWmsController {
|
||||
|
||||
@PostMapping("/againApply")
|
||||
@Log(value = "二次申请任务", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> againApply(@RequestBody String task_id) {
|
||||
return new ResponseEntity<>(acsToWmsService.againApply(task_id), HttpStatus.OK);
|
||||
@@ -74,7 +64,6 @@ public class AcsToWmsController {
|
||||
|
||||
@PostMapping("/process")
|
||||
@Log(value = "RCS上报密集库任务异常处理", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> process(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(acsToWmsService.process(jo), HttpStatus.OK);
|
||||
@@ -82,28 +71,24 @@ public class AcsToWmsController {
|
||||
|
||||
@PostMapping("/shipDeviceUpdate")
|
||||
// @Log(value = "输送线光电无货上报", isInterfaceLog = true,interfaceLogType= InterfaceLogType.ACS_TO_LMS)
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> shipDeviceUpdate(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(acsToWmsService.shipDeviceUpdate(jo), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/sendDeviceStatus")
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> sendDeviceStatus(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(acsToWmsService.sendDeviceStatus(jo), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/sendCBZInfo")
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> sendCBZInfo(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(acsToWmsService.sendCBZInfo(jo), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/sendGetGoalStruct")
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> sendGetGoalStruct(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(acsToWmsService.sendGetGoalStruct(jo), HttpStatus.OK);
|
||||
@@ -122,7 +107,6 @@ public class AcsToWmsController {
|
||||
}
|
||||
|
||||
/*@PostMapping("/getQZZInfo")
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> getQZZInfo(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(acsToWmsService.getQZZInfo(jo), HttpStatus.OK);
|
||||
@@ -130,7 +114,6 @@ public class AcsToWmsController {
|
||||
|
||||
@PostMapping("/initialize")
|
||||
@Log(value = "仓位初始化", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> initialize(@RequestBody JSONObject json) {
|
||||
acsToWmsService.initialize(json);
|
||||
@@ -139,15 +122,12 @@ public class AcsToWmsController {
|
||||
|
||||
@PostMapping("/initPoint")
|
||||
@Log(value = "点位初始化", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> initPoint() {
|
||||
acsToWmsService.initPoint();
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/sendProductToFirstFloor")
|
||||
@Log(value = "成品子卷到达一楼输送线", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||
@SaIgnore
|
||||
|
||||
@@ -72,6 +72,7 @@ import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@@ -2338,7 +2339,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String weight = param.getString("weight1");
|
||||
LambdaUpdateWrapper<PdmBiSlittingproductionplan> updateWrapper = new UpdateWrapper<PdmBiSlittingproductionplan>().lambda();
|
||||
updateWrapper.set(PdmBiSlittingproductionplan::getWeight, weight)
|
||||
.eq(PdmBiSlittingproductionplan::getContainer_name, subVolume);
|
||||
.eq(PdmBiSlittingproductionplan::getContainer_name, subVolume)
|
||||
.and(law -> law.isNull(PdmBiSlittingproductionplan::getWeight)
|
||||
.or().eq(PdmBiSlittingproductionplan::getWeight, ""));
|
||||
boolean update = slittingproductionplanService.update(updateWrapper);
|
||||
if (update) {
|
||||
res.put("code", cn.hutool.http.HttpStatus.HTTP_OK);
|
||||
|
||||
@@ -71,9 +71,9 @@ public class RawFoilController {
|
||||
}
|
||||
|
||||
|
||||
// 龙电项目接口
|
||||
@PostMapping("/needEmptyVehicle")
|
||||
@Log("呼叫空轴")
|
||||
|
||||
@Log("呼叫空辊")
|
||||
public ResponseEntity<Object> needEmptyVehicle(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(rawFoilService.needEmptyVehicle(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
@@ -31,7 +32,7 @@ import java.util.Date;
|
||||
@Slf4j
|
||||
public class RawFoilServiceImpl implements RawFoilService {
|
||||
private final AcsToWmsService acsToWmsService;
|
||||
private final PointService pointService;
|
||||
private final IschBasePointService pointService;
|
||||
|
||||
@Override
|
||||
public JSONObject queryProductArea() {
|
||||
@@ -406,53 +407,14 @@ public class RawFoilServiceImpl implements RawFoilService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject needEmptyVehicle(JSONObject whereJson) {
|
||||
throw new BadRequestException("请点击呼叫按钮进行搬运!");
|
||||
|
||||
/*String point_code = whereJson.getString("point_code");
|
||||
if (ObjectUtil.isEmpty(point_code)) {
|
||||
throw new BadRequestException("输入的点位不能为空!");
|
||||
public JSONObject needEmptyVehicle(JSONObject param) {
|
||||
log.info("手持呼叫收卷辊: {}", param);
|
||||
// param: point_code, vehicle_type
|
||||
String vehicleType = param.getString("vehicle_type");
|
||||
if (ObjectUtil.isEmpty(vehicleType)) {
|
||||
throw new BadRequestException("收卷辊的类型不能为空!");
|
||||
}
|
||||
JSONObject raw_jo = WQLObject.getWQLObject("st_ivt_sbpointivt").query("point_code = '" + point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(raw_jo)) {
|
||||
throw new BadRequestException("未查到相关的生箔机点位!");
|
||||
}
|
||||
|
||||
if (StrUtil.equals("0", raw_jo.getString("is_used"))) {
|
||||
throw new BadRequestException("当前生箔机:" + raw_jo.getString("ext_code") + "未启用!");
|
||||
}
|
||||
|
||||
// 2.根据就近原则查对应空卷抽
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "1");
|
||||
map.put("product_area", raw_jo.getString("product_area"));
|
||||
map.put("point_location", raw_jo.getString("point_location"));
|
||||
JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
|
||||
// 3.如果没找到则继续找下一节点
|
||||
String start_pint_code = "";
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||
*//*String point_location = jsonSb.getString("point_location");
|
||||
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
|
||||
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
|
||||
JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);*//*
|
||||
throw new BadRequestException("未查询到有空轴且母卷位置为空的点位!");
|
||||
} else {
|
||||
start_pint_code = jsonIvt.getString("empty_point_code");
|
||||
}
|
||||
|
||||
// 起点和终点确定 生成任务
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", start_pint_code);
|
||||
param.put("point_code2", point_code + "_K");
|
||||
param.put("task_type", "010103");
|
||||
param.put("product_area", jsonIvt.getString("product_area"));
|
||||
|
||||
CallEmpReelTask callEmpReelTask = new CallEmpReelTask();
|
||||
callEmpReelTask.createTask(param);
|
||||
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("message", "操作成功!");
|
||||
return jo;*/
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,7 +30,6 @@ public class RawfoilworkorderController {
|
||||
|
||||
@GetMapping
|
||||
@Log("查询生箔工序工单")
|
||||
|
||||
//@SaCheckPermission("@el.check('rawfoilworkorder:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(rawfoilworkorderService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
@@ -38,7 +37,6 @@ public class RawfoilworkorderController {
|
||||
|
||||
@PostMapping
|
||||
@Log("新增生箔工序工单")
|
||||
|
||||
//@SaCheckPermission("@el.check('rawfoilworkorder:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody RawfoilworkorderDto dto) {
|
||||
rawfoilworkorderService.create(dto);
|
||||
@@ -47,7 +45,6 @@ public class RawfoilworkorderController {
|
||||
|
||||
@PutMapping
|
||||
@Log("修改生箔工序工单")
|
||||
|
||||
//@SaCheckPermission("@el.check('rawfoilworkorder:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody RawfoilworkorderDto dto) {
|
||||
rawfoilworkorderService.update(dto);
|
||||
@@ -55,7 +52,6 @@ public class RawfoilworkorderController {
|
||||
}
|
||||
|
||||
@Log("删除生箔工序工单")
|
||||
|
||||
//@SaCheckPermission("@el.check('rawfoilworkorder:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
@@ -64,7 +60,6 @@ public class RawfoilworkorderController {
|
||||
}
|
||||
|
||||
@Log("强制确认")
|
||||
|
||||
@PostMapping("/compelEnd")
|
||||
public ResponseEntity<Object> compelEnd(@RequestBody JSONObject whereJson) {
|
||||
rawfoilworkorderService.compelEnd(whereJson);
|
||||
@@ -72,7 +67,6 @@ public class RawfoilworkorderController {
|
||||
}
|
||||
|
||||
@Log("称重")
|
||||
|
||||
@PostMapping("/confirm")
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
rawfoilworkorderService.confirm(whereJson);
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
@@ -104,11 +105,15 @@ public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
|
||||
WQLObject schBasePointService = WQLObject.getWQLObject("ST_IVT_SbPointIvt");
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
|
||||
String container_name = dto.getContainer_name();
|
||||
JSONObject json = wo.query("container_name = '" + container_name + "' and status <> '09'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(json)) {
|
||||
throw new BadRequestException("母卷号已存在");
|
||||
if (ObjectUtil.isEmpty(container_name)) {
|
||||
// 生成一个母卷号
|
||||
dto.setContainer_name(CodeUtil.getNewCode("PARENT_CONTAINER_CODE"));
|
||||
} else {
|
||||
JSONObject json = wo.query("container_name = '" + container_name + "' and status <> '09'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(json)) {
|
||||
dto.setContainer_name(CodeUtil.getNewCode("PARENT_CONTAINER_CODE"));
|
||||
}
|
||||
}
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
@@ -120,10 +125,10 @@ public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
|
||||
throw new BadRequestException("点位设备不存在");
|
||||
}
|
||||
|
||||
JSONObject josnMater = materTab.query("material_code ='" + dto.getProduct_name() + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(josnMater)) {
|
||||
throw new BadRequestException("物料不存在");
|
||||
}
|
||||
// JSONObject josnMater = materTab.query("material_code ='" + dto.getProduct_name() + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
||||
// if (ObjectUtil.isEmpty(josnMater)) {
|
||||
// throw new BadRequestException("物料不存在");
|
||||
// }
|
||||
|
||||
|
||||
dto.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
|
||||
Binary file not shown.
@@ -7,7 +7,7 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:88lmsdb}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:ldnx_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:ldnx_lms_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:NLABC&hl123}
|
||||
password: ${DB_PWD:12356}
|
||||
@@ -168,9 +168,6 @@ loki:
|
||||
systemName: lms
|
||||
es:
|
||||
index: lms_log
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lms\lucene\index
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
|
||||
@@ -183,4 +183,4 @@ jetcache:
|
||||
port: 6379
|
||||
lucene:
|
||||
index:
|
||||
path: D:\log\lms\lucene\index
|
||||
path: D:\log\lms\ld\index
|
||||
|
||||
@@ -108,6 +108,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</root>
|
||||
<logger name="jdbc" level="ERROR" additivity="true">
|
||||
<appender-ref ref="asyncLuceneAppender"/>
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.springframework" level="ERROR" additivity="true">
|
||||
@@ -126,6 +127,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.nl.modules.wql" level="ERROR" additivity="true">
|
||||
<appender-ref ref="asyncLuceneAppender"/>
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.springframework.data" level="ERROR" additivity="true">
|
||||
|
||||
Reference in New Issue
Block a user