fix:内包间代码优化
This commit is contained in:
@@ -39,9 +39,9 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: 2024/2/1
|
||||
* @see TrussCallAirShaftTask#createTask(JSONObject)
|
||||
* @Description: 自动任务 呼叫套轴 根据分切计划来呼叫套轴任务 桁架任务
|
||||
* <p>注:内包间只是区分气胀轴大小(即代数),不需要区分锂电/标箔</p>
|
||||
* @see TrussCallAirShaftTask#createTask(JSONObject)
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@@ -81,7 +81,7 @@ public class AutoCallAirShaftTask {
|
||||
public void run() {
|
||||
// 1、获取空的插拔轴位(无任务)
|
||||
List<BstIvtShafttubeivt> emptyPoints = bstIvtShafttubeivtService.getAllShaftPointsByConditions("2",
|
||||
"0","0");
|
||||
"0", "0");
|
||||
emptyPoints.forEach(empty -> {
|
||||
// 标箔:1,锂电:2 改:大小:4代5代
|
||||
String specification = empty.getQzz_generation();
|
||||
@@ -163,7 +163,7 @@ public class AutoCallAirShaftTask {
|
||||
param.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||
param.put("qzz_size", needPlan.getQzz_size());
|
||||
// 所需的纸管规格
|
||||
SlitterTaskUtil.putNeedPaperSpec(param, needPlans);
|
||||
SlitterTaskUtil.putNeedPaperSpec(param, needPlans);
|
||||
// 当前纸管的规格信息
|
||||
String oldQzzNo = ObjectUtil.isNotEmpty(startPoint.getQzz_no1())
|
||||
? startPoint.getQzz_no1() : startPoint.getQzz_no2();
|
||||
@@ -192,8 +192,9 @@ public class AutoCallAirShaftTask {
|
||||
|
||||
/**
|
||||
* 呼叫AGV更换纸管
|
||||
*
|
||||
* @param needPlans 所需要套轴的分切计划
|
||||
* @param location 位置
|
||||
* @param location 位置
|
||||
*/
|
||||
public void toCallAgvMovePaperTube(List<PdmBiSlittingproductionplan> needPlans, String location, BstIvtShafttubeivt empty) {
|
||||
// 最多两根
|
||||
@@ -235,7 +236,7 @@ public class AutoCallAirShaftTask {
|
||||
// 筛选3个位置中数量最少的搬走
|
||||
BstIvtStockingivt needMovePoint = stockingivtService.getCanMovePointOne(location, "1");
|
||||
// 空位就直接创建搬过来的任务
|
||||
if ("0".equals(needMovePoint.getIvt_status())) {
|
||||
if (ObjectUtil.isEmpty(needMovePoint) || "0".equals(needMovePoint.getIvt_status())) {
|
||||
// 直接搬过来即可
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("point_code1", needPoint.getPoint_code());
|
||||
@@ -261,13 +262,14 @@ public class AutoCallAirShaftTask {
|
||||
|
||||
/**
|
||||
* 获取对应的气胀轴库1
|
||||
* @param qzzSize 气涨轴尺寸
|
||||
*
|
||||
* @param qzzSize 气涨轴尺寸
|
||||
* @param location 位置:上半部分还是下半部分
|
||||
* @param empty 套拔轴点位
|
||||
* @param empty 套拔轴点位
|
||||
*/
|
||||
private void toAcsOutShaft(String qzzSize, String location, BstIvtShafttubeivt empty) {
|
||||
// 需要区分上下
|
||||
List<BstIvtShafttubeivt> shafttubeivts = bstIvtShafttubeivtService.getByQzzSize(qzzSize, empty.getPoint_code(), location);
|
||||
List<BstIvtShafttubeivt> shafttubeivts = bstIvtShafttubeivtService.getByQzzSize(qzzSize, empty.getPoint_code(), location);
|
||||
if (shafttubeivts.size() == 0) {
|
||||
throw new BadRequestException("气胀轴库找不到[" + qzzSize + "]规格的气涨轴");
|
||||
}
|
||||
@@ -286,10 +288,11 @@ public class AutoCallAirShaftTask {
|
||||
/**
|
||||
* todo: 预留
|
||||
* 创建气涨轴缓存的桁架任务
|
||||
* @param qzzSize 气涨轴尺寸
|
||||
*
|
||||
* @param qzzSize 气涨轴尺寸
|
||||
* @param specification 标箔、锂电(1,2)
|
||||
* @param location 位置:上半部分还是下半部分
|
||||
* @param empty 套拔轴点位
|
||||
* @param location 位置:上半部分还是下半部分
|
||||
* @param empty 套拔轴点位
|
||||
*/
|
||||
@Deprecated
|
||||
private void toCreatShaftCacheTask(String qzzSize, String specification, String location, BstIvtShafttubeivt empty) {
|
||||
@@ -311,9 +314,10 @@ public class AutoCallAirShaftTask {
|
||||
|
||||
/**
|
||||
* 保存信息到点位上
|
||||
* @param empty 套拔轴机位置
|
||||
*
|
||||
* @param empty 套拔轴机位置
|
||||
* @param needPlans 需要的分切计划
|
||||
* @param qzzSize 气涨轴尺寸
|
||||
* @param qzzSize 气涨轴尺寸
|
||||
*/
|
||||
private void saveCutPlanMessage(BstIvtShafttubeivt empty, List<PdmBiSlittingproductionplan> needPlans, String qzzSize) {
|
||||
empty.setHave_qzz(SlitterConstant.SLITTER_YES);
|
||||
@@ -355,7 +359,8 @@ public class AutoCallAirShaftTask {
|
||||
/**
|
||||
* 不需要套轴,就只做拔轴
|
||||
* update: 不需要(区分标箔、锂电)
|
||||
* @param empty 空的插拔轴点位
|
||||
*
|
||||
* @param empty 空的插拔轴点位
|
||||
* @param specification 代数(4、5)
|
||||
*/
|
||||
private void makePullShaft(BstIvtShafttubeivt empty, String specification) {
|
||||
|
||||
@@ -768,9 +768,9 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
.filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
|
||||
LambdaUpdateWrapper<PdmBiSlittingproductionplan> upPlanLam = new LambdaUpdateWrapper<>();
|
||||
upPlanLam.set(PdmBiSlittingproductionplan::getIs_paper_ok, "1")
|
||||
.eq(PdmBiSlittingproductionplan::getUpdate_optid, SecurityUtils.getCurrentUserId())
|
||||
.eq(PdmBiSlittingproductionplan::getUpdate_optname, SecurityUtils.getCurrentUsername())
|
||||
.eq(PdmBiSlittingproductionplan::getUpdate_time, DateUtil.now())
|
||||
.set(PdmBiSlittingproductionplan::getUpdate_optid, SecurityUtils.getCurrentUserId())
|
||||
.set(PdmBiSlittingproductionplan::getUpdate_optname, SecurityUtils.getCurrentUsername())
|
||||
.set(PdmBiSlittingproductionplan::getUpdate_time, DateUtil.now())
|
||||
.in(PdmBiSlittingproductionplan::getContainer_name, containers);
|
||||
slittingproductionplanService.update(upPlanLam);
|
||||
//3、清空当前穿拔轴点位的库存信息
|
||||
|
||||
@@ -6,10 +6,11 @@ spring:
|
||||
druid:
|
||||
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:lzhl_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:lzhl_two_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:lzhl_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:lms_xc}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:NLABC&hl123}
|
||||
# password: ${DB_PWD:NLABC&hl123}
|
||||
password: ${DB_PWD:root}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
|
||||
Reference in New Issue
Block a user