rev: 分切呼叫套轴不区分锂电标箔,只区分气胀轴尺寸
This commit is contained in:
@@ -57,10 +57,10 @@ public interface IBstIvtCutpointivtService extends IService<BstIvtCutpointivt> {
|
|||||||
* 获取同尺寸的气涨轴
|
* 获取同尺寸的气涨轴
|
||||||
* @param type 点位类型:1套轴对接位,2分切缓存位,3分切对接位
|
* @param type 点位类型:1套轴对接位,2分切缓存位,3分切对接位
|
||||||
* @param size 气涨轴尺寸
|
* @param size 气涨轴尺寸
|
||||||
* @param area 区域(0上1下)
|
* @param generation 代数(4:小,5:大)
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<BstIvtCutpointivt> getPointByTypeAndShaftSize(String type, String size, String area);
|
List<BstIvtCutpointivt> getPointByTypeAndShaftSize(String type, String size, String generation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据桁架对应的点位编码获取点位实体
|
* 根据桁架对应的点位编码获取点位实体
|
||||||
@@ -80,8 +80,7 @@ public interface IBstIvtCutpointivtService extends IService<BstIvtCutpointivt> {
|
|||||||
/**
|
/**
|
||||||
* 获取类型1状态3,没任务的点位
|
* 获取类型1状态3,没任务的点位
|
||||||
* @param location 区域:0上1下
|
* @param location 区域:0上1下
|
||||||
* @param area:区域:B1 B2 B3 B4
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<BstIvtCutpointivt> getAreaNotTaskPointByLocationAreaAndStatus(String location, String area);
|
List<BstIvtCutpointivt> getAreaNotTaskPointByLocationAreaAndStatus(String location);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.b_lms.bst.ivt.cutpointivt.service.dao;
|
package org.nl.b_lms.bst.ivt.cutpointivt.service.dao;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -84,4 +85,9 @@ public class BstIvtCutpointivt implements Serializable {
|
|||||||
|
|
||||||
private String point_status;
|
private String point_status;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String qzz_generation;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String qzz_size;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public interface BstIvtCutpointivtMapper extends BaseMapper<BstIvtCutpointivt> {
|
|||||||
|
|
||||||
List<BstIvtCutpointivt> getAreaNotTaskPointByStatus(String type, String pointStatus, String area, String sort);
|
List<BstIvtCutpointivt> getAreaNotTaskPointByStatus(String type, String pointStatus, String area, String sort);
|
||||||
|
|
||||||
List<BstIvtCutpointivt> getPointByTypeAndShaftSize(String type, String size, String area);
|
List<BstIvtCutpointivt> getPointByTypeAndShaftSize(String type, String size, String generation);
|
||||||
|
|
||||||
List<BstIvtCutpointivt> getAreaNotTaskPointByLocationAreaAndStatus(String location, String area);
|
List<BstIvtCutpointivt> getAreaNotTaskPointByLocationAreaAndStatus(String location);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,9 +31,12 @@
|
|||||||
FROM `bst_ivt_cutpointivt` bc
|
FROM `bst_ivt_cutpointivt` bc
|
||||||
LEFT JOIN pdm_bi_slittingproductionplan pp ON pp.qzzno = bc.qzz_no1
|
LEFT JOIN pdm_bi_slittingproductionplan pp ON pp.qzzno = bc.qzz_no1
|
||||||
OR pp.qzzno = bc.qzz_no2
|
OR pp.qzzno = bc.qzz_no2
|
||||||
|
LEFT JOIN st_ivt_cutpointivt sc ON sc.ext_code = pp.resource_name
|
||||||
WHERE bc.point_type = #{type}
|
WHERE bc.point_type = #{type}
|
||||||
AND pp.qzz_size = #{size}
|
AND pp.qzz_size = #{size}
|
||||||
AND LEFT(pp.resource_name, 2) = #{area}
|
<if test="size == '3'">
|
||||||
|
AND sc.qzz_generation = #{generation}
|
||||||
|
</if>
|
||||||
AND bc.is_used = '1'
|
AND bc.is_used = '1'
|
||||||
AND bc.point_status = '3'
|
AND bc.point_status = '3'
|
||||||
AND 0 = (SELECT COUNT(*)
|
AND 0 = (SELECT COUNT(*)
|
||||||
@@ -43,9 +46,10 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="getAreaNotTaskPointByLocationAreaAndStatus"
|
<select id="getAreaNotTaskPointByLocationAreaAndStatus"
|
||||||
resultType="org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt">
|
resultType="org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt">
|
||||||
SELECT DISTINCT bic.*
|
SELECT DISTINCT bic.*, sc.qzz_generation, p.qzz_size
|
||||||
FROM bst_ivt_cutpointivt bic
|
FROM bst_ivt_cutpointivt bic
|
||||||
LEFT JOIN pdm_bi_slittingproductionplan p ON p.qzzno = bic.qzz_no1 OR p.qzzno = bic.qzz_no2
|
LEFT JOIN pdm_bi_slittingproductionplan p ON p.qzzno = bic.qzz_no1 OR p.qzzno = bic.qzz_no2
|
||||||
|
LEFT JOIN st_ivt_cutpointivt sc ON sc.ext_code = p.resource_name
|
||||||
WHERE bic.point_type = '1'
|
WHERE bic.point_type = '1'
|
||||||
AND bic.is_used = '1'
|
AND bic.is_used = '1'
|
||||||
AND bic.point_status = '3'
|
AND bic.point_status = '3'
|
||||||
@@ -57,6 +61,5 @@
|
|||||||
OR t.point_code1 = bic.truss_point_code1 oR t.point_code2 = bic.truss_point_code1
|
OR t.point_code1 = bic.truss_point_code1 oR t.point_code2 = bic.truss_point_code1
|
||||||
OR t.point_code1 = bic.truss_point_code2 oR t.point_code2 = bic.truss_point_code2)
|
OR t.point_code1 = bic.truss_point_code2 oR t.point_code2 = bic.truss_point_code2)
|
||||||
)
|
)
|
||||||
AND LEFT(p.resource_name,2) = #{area}
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ public class BstIvtCutpointivtServiceImpl extends ServiceImpl<BstIvtCutpointivtM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BstIvtCutpointivt> getPointByTypeAndShaftSize(String type, String size, String area) {
|
public List<BstIvtCutpointivt> getPointByTypeAndShaftSize(String type, String size, String generation) {
|
||||||
return bstIvtCutpointivtMapper.getPointByTypeAndShaftSize(type, size, area);
|
return bstIvtCutpointivtMapper.getPointByTypeAndShaftSize(type, size, generation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -115,7 +115,7 @@ public class BstIvtCutpointivtServiceImpl extends ServiceImpl<BstIvtCutpointivtM
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BstIvtCutpointivt> getAreaNotTaskPointByLocationAreaAndStatus(String location, String area) {
|
public List<BstIvtCutpointivt> getAreaNotTaskPointByLocationAreaAndStatus(String location) {
|
||||||
return bstIvtCutpointivtMapper.getAreaNotTaskPointByLocationAreaAndStatus(location, area);
|
return bstIvtCutpointivtMapper.getAreaNotTaskPointByLocationAreaAndStatus(location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ public interface IBstIvtShafttubeivtService extends IService<BstIvtShafttubeivt>
|
|||||||
/**
|
/**
|
||||||
* 获得气胀轴库对应的气涨轴位置
|
* 获得气胀轴库对应的气涨轴位置
|
||||||
* @param qzzSize 气涨轴尺寸
|
* @param qzzSize 气涨轴尺寸
|
||||||
* @param specification 标箔、锂电
|
* @param pointCode 对应的穿拔轴机
|
||||||
* @param location 位置:上半部分还是下半部分
|
* @param location 位置:上半部分还是下半部分
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String specification, String location);
|
List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String pointCode, String location);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取没任务的气涨轴缓存位
|
* 获取没任务的气涨轴缓存位
|
||||||
|
|||||||
@@ -92,4 +92,7 @@ public class BstIvtShafttubeivt implements Serializable {
|
|||||||
/** 规划 */
|
/** 规划 */
|
||||||
private String plan;
|
private String plan;
|
||||||
|
|
||||||
|
/** 关联点位 */
|
||||||
|
private String parent_code;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,21 @@ public interface BstIvtShafttubeivtMapper extends BaseMapper<BstIvtShafttubeivt>
|
|||||||
|
|
||||||
List<BstIvtShafttubeivt> getAllShaftPointsByConditions(String type, String location, String have);
|
List<BstIvtShafttubeivt> getAllShaftPointsByConditions(String type, String location, String have);
|
||||||
|
|
||||||
List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String specification, String location);
|
List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String pointCode, String location);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取含有气胀轴的气胀轴暂存位
|
||||||
|
* @param qzzSize 气胀轴尺寸
|
||||||
|
* @param specification 标箔/锂电
|
||||||
|
* @param location 位置(上下)
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
List<BstIvtShafttubeivt> getNotTaskShaftCache(String qzzSize, String specification, String location);
|
List<BstIvtShafttubeivt> getNotTaskShaftCache(String qzzSize, String specification, String location);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取空气胀轴的气胀轴暂存位
|
||||||
|
* @param startPoint 点位信息(包含:尺寸、类型、位置)
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty(BstIvtShafttubeivt startPoint);
|
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty(BstIvtShafttubeivt startPoint);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,13 @@
|
|||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
<select id="getByQzzSize" resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
<select id="getByQzzSize" resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||||
SELECT
|
SELECT *
|
||||||
*
|
FROM `bst_ivt_shafttubeivt` bsf
|
||||||
FROM
|
WHERE bsf.is_used = '1'
|
||||||
`bst_ivt_shafttubeivt` bsf
|
AND bsf.qzz_size = #{qzzSize}
|
||||||
WHERE bsf.is_used = '1' AND bsf.qzz_size = #{qzzSize} AND bsf.point_type = '1'
|
AND bsf.point_type = '1'
|
||||||
AND bsf.qzz_generation = #{specification} AND bsf.point_location = #{location}
|
AND bsf.point_location = #{location}
|
||||||
|
AND bsf.parent_code = #{pointCode}
|
||||||
</select>
|
</select>
|
||||||
<select id="getNotTaskShaftCache"
|
<select id="getNotTaskShaftCache"
|
||||||
resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ public class BstIvtShafttubeivtServiceImpl extends ServiceImpl<BstIvtShafttubeiv
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String specification, String location) {
|
public List<BstIvtShafttubeivt> getByQzzSize(String qzzSize, String pointCode, String location) {
|
||||||
return bstIvtShafttubeivtMapper.getByQzzSize(qzzSize, specification, location);
|
return bstIvtShafttubeivtMapper.getByQzzSize(qzzSize, pointCode, location);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -45,10 +45,9 @@ public interface IPdmBiSlittingproductionplanService extends IService<PdmBiSlitt
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取可用的分切计划
|
* 获取可用的分切计划
|
||||||
* @param area 区域
|
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<SlitterPlanDistinctDto> getAllCutPlan(String area);
|
List<SlitterPlanDistinctDto> getAllCutPlan();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过气涨轴编码获取分切计划
|
* 通过气涨轴编码获取分切计划
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ import java.util.List;
|
|||||||
**/
|
**/
|
||||||
public interface PdmBiSlittingproductionplanMapper extends BaseMapper<PdmBiSlittingproductionplan> {
|
public interface PdmBiSlittingproductionplanMapper extends BaseMapper<PdmBiSlittingproductionplan> {
|
||||||
|
|
||||||
List<SlitterPlanDistinctDto> getAllCutPlan(String area);
|
List<SlitterPlanDistinctDto> getAllCutPlan();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
p.parent_container_name,
|
p.parent_container_name,
|
||||||
p.split_group,
|
p.split_group,
|
||||||
p.up_or_down,
|
p.up_or_down,
|
||||||
|
p.qzz_size,
|
||||||
|
sc.qzz_generation,
|
||||||
COALESCE ( count_table.num, 0 ) num,
|
COALESCE ( count_table.num, 0 ) num,
|
||||||
COALESCE ( ct1.cn, 0 ) AS cn,
|
COALESCE ( ct1.cn, 0 ) AS cn,
|
||||||
COALESCE ( ct2.cnn, 0 ) AS cnn
|
COALESCE ( ct2.cnn, 0 ) AS cnn
|
||||||
@@ -58,12 +60,13 @@
|
|||||||
AND p.parent_container_name = ct2.parent_container_name
|
AND p.parent_container_name = ct2.parent_container_name
|
||||||
AND p.split_group = ct2.split_group
|
AND p.split_group = ct2.split_group
|
||||||
AND p.up_or_down <![CDATA[ <> ]]> ct2.up_or_down
|
AND p.up_or_down <![CDATA[ <> ]]> ct2.up_or_down
|
||||||
|
LEFT JOIN st_ivt_cutpointivt sc
|
||||||
|
ON sc.ext_code = p.resource_name
|
||||||
WHERE
|
WHERE
|
||||||
p.`status` = '01'
|
p.`status` = '01'
|
||||||
AND p.is_child_tz_ok = '0'
|
AND p.is_child_tz_ok = '0'
|
||||||
AND p.is_paper_ok = '1'
|
AND p.is_paper_ok = '1'
|
||||||
AND p.is_delete = '0'
|
AND p.is_delete = '0'
|
||||||
AND LEFT ( p.resource_name, 2 ) = #{area}
|
|
||||||
AND p.up_or_down IS NOT NULL
|
AND p.up_or_down IS NOT NULL
|
||||||
AND p.left_or_right IS NOT NULL
|
AND p.left_or_right IS NOT NULL
|
||||||
GROUP BY
|
GROUP BY
|
||||||
@@ -71,6 +74,8 @@
|
|||||||
p.parent_container_name,
|
p.parent_container_name,
|
||||||
p.split_group,
|
p.split_group,
|
||||||
p.up_or_down,
|
p.up_or_down,
|
||||||
|
p.qzz_size,
|
||||||
|
sc.qzz_generation,
|
||||||
num,
|
num,
|
||||||
cn,
|
cn,
|
||||||
cnn
|
cnn
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SlitterPlanDistinctDto> getAllCutPlan(String area) {
|
public List<SlitterPlanDistinctDto> getAllCutPlan() {
|
||||||
return pdmBiSlittingproductionplanMapper.getAllCutPlan(area);
|
return pdmBiSlittingproductionplanMapper.getAllCutPlan();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -30,9 +30,10 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: lyd
|
* @Author: lyd
|
||||||
* @Description: 自动任务 呼叫套轴 根据分切计划来呼叫套轴任务 桁架任务
|
|
||||||
* @Date: 2024/2/1
|
* @Date: 2024/2/1
|
||||||
* @see TrussCallAirShaftTask#createTask(JSONObject)
|
* @see TrussCallAirShaftTask#createTask(JSONObject)
|
||||||
|
* @Description: 自动任务 呼叫套轴 根据分切计划来呼叫套轴任务 桁架任务
|
||||||
|
* <p>注:内包间只是区分气胀轴大小(即代数),不需要区分锂电/标箔</p>
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
@@ -57,34 +58,21 @@ public class AutoCallAirShaftTask {
|
|||||||
* 并根据计划来决定是进行套轴还是拔轴操作。如果需要套轴,它会寻找合适的套轴位置,并且在没有合适位置时会触发滚条气涨轴的操作。
|
* 并根据计划来决定是进行套轴还是拔轴操作。如果需要套轴,它会寻找合适的套轴位置,并且在没有合适位置时会触发滚条气涨轴的操作。
|
||||||
* 同时,该方法也会更新相关的分切计划状态。
|
* 同时,该方法也会更新相关的分切计划状态。
|
||||||
* 套拔轴缓存位满了、没有分切计划,则触发自动创建套拔轴任务
|
* 套拔轴缓存位满了、没有分切计划,则触发自动创建套拔轴任务
|
||||||
|
* update: 24/04/28 内包间只是区分气胀轴大小(即代数),不需要区分锂电/标箔
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void run() {
|
public void run() {
|
||||||
// 1、获取空的插拔轴位(无任务)
|
// 1、获取空的插拔轴位(无任务)
|
||||||
List<BstIvtShafttubeivt> emptyPoints = bstIvtShafttubeivtService.getAllShaftPointsByConditions("2","0","0");
|
List<BstIvtShafttubeivt> emptyPoints = bstIvtShafttubeivtService.getAllShaftPointsByConditions("2","0","0");
|
||||||
emptyPoints.forEach(empty -> {
|
emptyPoints.forEach(empty -> {
|
||||||
// 标箔:1,锂电:2
|
// 标箔:1,锂电:2 改:大小:4代5代
|
||||||
String specification = empty.getQzz_generation();
|
String specification = empty.getQzz_generation();
|
||||||
String location = empty.getPoint_location();
|
String location = empty.getPoint_location();
|
||||||
String area;
|
// 2、获取分切计划数据
|
||||||
if (SlitterConstant.SLITTER_STANDARD_FOIL.equals(specification)) {
|
List<SlitterPlanDistinctDto> plans = slittingproductionplanService.getAllCutPlan();
|
||||||
if (SlitterConstant.SLITTER_AREA_UP.equals(location)) {
|
|
||||||
area = "B2";
|
|
||||||
} else {
|
|
||||||
area = "B4";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (SlitterConstant.SLITTER_AREA_UP.equals(location)) {
|
|
||||||
area = "B1";
|
|
||||||
} else {
|
|
||||||
area = "B3";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 2、获取分切计划数据,hint: 根据标箔锂电区分区域
|
|
||||||
List<SlitterPlanDistinctDto> plans = slittingproductionplanService.getAllCutPlan(area);
|
|
||||||
if (plans.size() == 0) {
|
if (plans.size() == 0) {
|
||||||
// 如果不需要套轴,就只做拔轴
|
// 如果不需要套轴,就只做拔轴
|
||||||
makePullShaft(empty, area);
|
makePullShaft(empty, specification);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 查看套轴对接位是否满了
|
// 查看套轴对接位是否满了
|
||||||
@@ -92,26 +80,35 @@ public class AutoCallAirShaftTask {
|
|||||||
// 如果满了就只做拔轴
|
// 如果满了就只做拔轴
|
||||||
if (emptyShaftPoint.size() == 0) {
|
if (emptyShaftPoint.size() == 0) {
|
||||||
// 如果不需要套轴,就只做拔轴
|
// 如果不需要套轴,就只做拔轴
|
||||||
makePullShaft(empty, area);
|
makePullShaft(empty, specification);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 获取一个分切计划的Dto。如果是6寸,可以直接使用、如果是3寸,需要判断当前位置是否满足
|
||||||
|
SlitterPlanDistinctDto planDto = plans.stream()
|
||||||
|
.filter(planD -> "6".equals(planD.getQzz_size()) ||
|
||||||
|
("3".equals(planD.getQzz_size()) && specification.equals(planD.getQzz_generation())))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
if (planDto == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 获取一个分切计划的Dto。一根轴可能有两个分切计划
|
|
||||||
SlitterPlanDistinctDto planDto = plans.get(0);
|
|
||||||
// 获取分切计划dto中对应的需要套轴的分切计划 最多两个计划
|
// 获取分切计划dto中对应的需要套轴的分切计划 最多两个计划
|
||||||
List<PdmBiSlittingproductionplan> needPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
List<PdmBiSlittingproductionplan> needPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.eq(PdmBiSlittingproductionplan::getResource_name, planDto.getResource_name())
|
.eq(PdmBiSlittingproductionplan::getResource_name, planDto.getResource_name())
|
||||||
.eq(PdmBiSlittingproductionplan::getParent_container_name, planDto.getParent_container_name())
|
.eq(PdmBiSlittingproductionplan::getParent_container_name, planDto.getParent_container_name())
|
||||||
.eq(PdmBiSlittingproductionplan::getUp_or_down, planDto.getUp_or_down())
|
.eq(PdmBiSlittingproductionplan::getUp_or_down, planDto.getUp_or_down())
|
||||||
|
.eq(PdmBiSlittingproductionplan::getSplit_group, planDto.getSplit_group())
|
||||||
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO)
|
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO)
|
||||||
.eq(PdmBiSlittingproductionplan::getIs_paper_ok, SlitterConstant.SLITTER_YES));
|
.eq(PdmBiSlittingproductionplan::getIs_paper_ok, SlitterConstant.SLITTER_YES));
|
||||||
// 获取其中一条
|
// 获取其中一条
|
||||||
PdmBiSlittingproductionplan needPlan = needPlans.get(0);
|
PdmBiSlittingproductionplan needPlan = needPlans.get(0);
|
||||||
String qzzSize = needPlan.getQzz_size();
|
String qzzSize = needPlan.getQzz_size();
|
||||||
// 从套轴对接位获取相同气涨轴大小 (同标箔或者锂电分开)
|
// 从套轴对接位获取相同气涨轴大小
|
||||||
List<BstIvtCutpointivt> qzzPoint = bcutpointivtService.getPointByTypeAndShaftSize("1", qzzSize, area);
|
// update: 不需要(同标箔或者锂电分开)
|
||||||
|
List<BstIvtCutpointivt> qzzPoint = bcutpointivtService.getPointByTypeAndShaftSize("1", qzzSize, specification);
|
||||||
if (qzzPoint.size() == 0) {
|
if (qzzPoint.size() == 0) {
|
||||||
// 调用ACS滚条气涨轴下来
|
// 调用ACS滚条气涨轴下来
|
||||||
toAcsOutShaft(qzzSize, specification, location, empty);
|
toAcsOutShaft(qzzSize, location, empty);
|
||||||
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
||||||
saveCutPlanMessage(empty, needPlans, qzzSize);
|
saveCutPlanMessage(empty, needPlans, qzzSize);
|
||||||
return;
|
return;
|
||||||
@@ -121,7 +118,7 @@ public class AutoCallAirShaftTask {
|
|||||||
if (ObjectUtil.isEmpty(startPoint)) {
|
if (ObjectUtil.isEmpty(startPoint)) {
|
||||||
// 如果不存在,则发起信号滚气涨轴
|
// 如果不存在,则发起信号滚气涨轴
|
||||||
// 调用ACS滚条气涨轴下来
|
// 调用ACS滚条气涨轴下来
|
||||||
toAcsOutShaft(qzzSize, specification, location, empty);
|
toAcsOutShaft(qzzSize, location, empty);
|
||||||
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
||||||
saveCutPlanMessage(empty, needPlans, qzzSize);
|
saveCutPlanMessage(empty, needPlans, qzzSize);
|
||||||
return;
|
return;
|
||||||
@@ -172,23 +169,17 @@ public class AutoCallAirShaftTask {
|
|||||||
/**
|
/**
|
||||||
* 获取对应的气胀轴库1
|
* 获取对应的气胀轴库1
|
||||||
* @param qzzSize 气涨轴尺寸
|
* @param qzzSize 气涨轴尺寸
|
||||||
* @param specification 标箔、锂电(1,2)
|
|
||||||
* @param location 位置:上半部分还是下半部分
|
* @param location 位置:上半部分还是下半部分
|
||||||
* @param empty 套拔轴点位
|
* @param empty 套拔轴点位
|
||||||
*/
|
*/
|
||||||
private void toAcsOutShaft(String qzzSize, String specification, String location, BstIvtShafttubeivt empty) {
|
private void toAcsOutShaft(String qzzSize, String location, BstIvtShafttubeivt empty) {
|
||||||
// 需要区分上下
|
// 需要区分上下
|
||||||
List<BstIvtShafttubeivt> shafttubeivts = bstIvtShafttubeivtService.getByQzzSize(qzzSize, specification, location);
|
List<BstIvtShafttubeivt> shafttubeivts = bstIvtShafttubeivtService.getByQzzSize(qzzSize, empty.getPoint_code(), location);
|
||||||
if (shafttubeivts.size() == 0) {
|
if (shafttubeivts.size() == 0) {
|
||||||
throw new BadRequestException("气胀轴库找不到[" + qzzSize + "]规格的气涨轴");
|
throw new BadRequestException("气胀轴库找不到[" + qzzSize + "]规格的气涨轴");
|
||||||
}
|
}
|
||||||
BstIvtShafttubeivt shafttubeivt = shafttubeivts.get(0);
|
BstIvtShafttubeivt shafttubeivt = shafttubeivts.get(0);
|
||||||
// todo: 访问acs判断有无气涨轴
|
// todo: 访问acs判断有无气涨轴
|
||||||
boolean flag = true;
|
|
||||||
if (!flag) {
|
|
||||||
// 气涨轴库没有对应的气涨轴,就到气涨轴暂存区获取
|
|
||||||
toCreatShaftCacheTask(qzzSize, specification, location, empty);
|
|
||||||
} else {
|
|
||||||
JSONArray acsParam = new JSONArray();
|
JSONArray acsParam = new JSONArray();
|
||||||
JSONObject acsQzz = new JSONObject();
|
JSONObject acsQzz = new JSONObject();
|
||||||
acsQzz.put("device_code", shafttubeivt.getPoint_code());
|
acsQzz.put("device_code", shafttubeivt.getPoint_code());
|
||||||
@@ -198,15 +189,16 @@ public class AutoCallAirShaftTask {
|
|||||||
acsParam.add(acsQzz);
|
acsParam.add(acsQzz);
|
||||||
wmsToAcsService.action(acsParam);
|
wmsToAcsService.action(acsParam);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* todo: 预留
|
||||||
* 创建气涨轴缓存的桁架任务
|
* 创建气涨轴缓存的桁架任务
|
||||||
* @param qzzSize 气涨轴尺寸
|
* @param qzzSize 气涨轴尺寸
|
||||||
* @param specification 标箔、锂电(1,2)
|
* @param specification 标箔、锂电(1,2)
|
||||||
* @param location 位置:上半部分还是下半部分
|
* @param location 位置:上半部分还是下半部分
|
||||||
* @param empty 套拔轴点位
|
* @param empty 套拔轴点位
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
private void toCreatShaftCacheTask(String qzzSize, String specification, String location, BstIvtShafttubeivt empty) {
|
private void toCreatShaftCacheTask(String qzzSize, String specification, String location, BstIvtShafttubeivt empty) {
|
||||||
// 获取气涨轴缓存没有任务的点位
|
// 获取气涨轴缓存没有任务的点位
|
||||||
List<BstIvtShafttubeivt> shafttubeivts = bstIvtShafttubeivtService.getNotTaskShaftCache(qzzSize, specification, location);
|
List<BstIvtShafttubeivt> shafttubeivts = bstIvtShafttubeivtService.getNotTaskShaftCache(qzzSize, specification, location);
|
||||||
@@ -270,16 +262,25 @@ public class AutoCallAirShaftTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不需要套轴,就只做拔轴(区分标箔、锂电)
|
* 不需要套轴,就只做拔轴
|
||||||
|
* update: 不需要(区分标箔、锂电)
|
||||||
* @param empty 空的插拔轴点位
|
* @param empty 空的插拔轴点位
|
||||||
* @param area 区域
|
* @param specification 代数(4、5)
|
||||||
*/
|
*/
|
||||||
private void makePullShaft(BstIvtShafttubeivt empty, String area) {
|
private void makePullShaft(BstIvtShafttubeivt empty, String specification) {
|
||||||
List<BstIvtCutpointivt> notTaskPoints = bcutpointivtService.getAreaNotTaskPointByLocationAreaAndStatus(empty.getPoint_location(), area);
|
List<BstIvtCutpointivt> notTaskPoints = bcutpointivtService.getAreaNotTaskPointByLocationAreaAndStatus(empty.getPoint_location());
|
||||||
if (notTaskPoints.size() == 0) {
|
if (notTaskPoints.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BstIvtCutpointivt cutpointivt = notTaskPoints.get(0);
|
// 筛选一个满足的位置:3寸:看代数4/5;6寸直接
|
||||||
|
BstIvtCutpointivt cutpointivt = notTaskPoints.stream()
|
||||||
|
.filter(cut -> "6".equals(cut.getQzz_size()) ||
|
||||||
|
("3".equals(cut.getQzz_size()) && specification.equals(cut.getQzz_generation())))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
if (cutpointivt == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String pointCode1 = ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1()) ? cutpointivt.getTruss_point_code1() : cutpointivt.getTruss_point_code2();
|
String pointCode1 = ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1()) ? cutpointivt.getTruss_point_code1() : cutpointivt.getTruss_point_code2();
|
||||||
String qzzNo = ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1()) ? cutpointivt.getQzz_no1() : cutpointivt.getQzz_no2();
|
String qzzNo = ObjectUtil.isNotEmpty(cutpointivt.getQzz_no1()) ? cutpointivt.getQzz_no1() : cutpointivt.getQzz_no2();
|
||||||
// 获取对应的分切计划
|
// 获取对应的分切计划
|
||||||
|
|||||||
@@ -29,4 +29,12 @@ public class SlitterPlanDistinctDto {
|
|||||||
* 数量
|
* 数量
|
||||||
*/
|
*/
|
||||||
private String num;
|
private String num;
|
||||||
|
/**
|
||||||
|
* 气胀轴尺寸
|
||||||
|
*/
|
||||||
|
private String qzz_size;
|
||||||
|
/**
|
||||||
|
* 气胀轴代数
|
||||||
|
*/
|
||||||
|
private String qzz_generation;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
if (ObjectUtil.isEmpty(CBJ.getTube_code1()) && ObjectUtil.isEmpty(CBJ.getTube_code2())) {
|
if (ObjectUtil.isEmpty(CBJ.getTube_code1()) && ObjectUtil.isEmpty(CBJ.getTube_code2())) {
|
||||||
// 清空
|
// 清空
|
||||||
CBJ.setHave_qzz(SlitterConstant.SLITTER_NO);
|
CBJ.setHave_qzz(SlitterConstant.SLITTER_NO);
|
||||||
|
CBJ.setQzz_size("");
|
||||||
TaskUtils.updateOptMessageByBShaftPoint(CBJ);
|
TaskUtils.updateOptMessageByBShaftPoint(CBJ);
|
||||||
shafttubeivtService.updateById(CBJ);
|
shafttubeivtService.updateById(CBJ);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,10 +139,10 @@ public class SlitterTaskUtil {
|
|||||||
param.put("currentLeftSpec", SlitterTaskUtil.getPaperTubeInformation(plan));
|
param.put("currentLeftSpec", SlitterTaskUtil.getPaperTubeInformation(plan));
|
||||||
} else {
|
} else {
|
||||||
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||||
param.put("currentRight", plan.getPaper_tube_model());
|
param.put("currentRight", plan.getPaper_tube_material());
|
||||||
param.put("currentRightSize", plan.getPaper_tube_model().split("\\|")[2].charAt(0));
|
param.put("currentRightSize", plan.getPaper_tube_model().split("\\|")[2].charAt(0));
|
||||||
} else {
|
} else {
|
||||||
param.put("currentRight", plan.getFRP_model());
|
param.put("currentRight", plan.getFRP_material());
|
||||||
param.put("currentRightSize", plan.getFRP_model().split("\\|")[2].charAt(0));
|
param.put("currentRightSize", plan.getFRP_model().split("\\|")[2].charAt(0));
|
||||||
}
|
}
|
||||||
param.put("currentLeftSpec", SlitterTaskUtil.getPaperTubeInformation(plan));
|
param.put("currentLeftSpec", SlitterTaskUtil.getPaperTubeInformation(plan));
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')"/>
|
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')"/>
|
||||||
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')"/>
|
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')"/>
|
||||||
<el-table-column prop="qzz_size" label="气涨轴尺寸" :min-width="flexWidth('qzz_size',crud.data,'气涨轴尺寸')"/>
|
<el-table-column prop="qzz_size" label="气涨轴尺寸" :min-width="flexWidth('qzz_size',crud.data,'气涨轴尺寸')"/>
|
||||||
<el-table-column prop="qzz_generation" label="标箔/锂电" :min-width="flexWidth('qzz_generation',crud.data,'气涨轴代数')"/>
|
<el-table-column prop="qzz_generation" label="气涨轴代数" :min-width="flexWidth('qzz_generation',crud.data,'气涨轴代数')"/>
|
||||||
<el-table-column prop="tube_code1" label="纸管1编码" :min-width="flexWidth('tube_code1',crud.data,'纸管1编码')"/>
|
<el-table-column prop="tube_code1" label="纸管1编码" :min-width="flexWidth('tube_code1',crud.data,'纸管1编码')"/>
|
||||||
<el-table-column prop="tube_name1" label="纸管1描述" :min-width="flexWidth('tube_name1',crud.data,'纸管1描述')"/>
|
<el-table-column prop="tube_name1" label="纸管1描述" :min-width="flexWidth('tube_name1',crud.data,'纸管1描述')"/>
|
||||||
<el-table-column prop="tube_code2" label="纸管2编码" :min-width="flexWidth('tube_code2',crud.data,'纸管2编码')"/>
|
<el-table-column prop="tube_code2" label="纸管2编码" :min-width="flexWidth('tube_code2',crud.data,'纸管2编码')"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user