Merge branch 'master_merge' of http://121.40.234.130:8899/root/lanzhouhailiang_one into master_merge
This commit is contained in:
@@ -95,4 +95,12 @@ public interface IBstIvtShafttubeivtService extends IService<BstIvtShafttubeivt>
|
|||||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty(BstIvtShafttubeivt startPoint);
|
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty(BstIvtShafttubeivt startPoint);
|
||||||
|
|
||||||
void setHaveShaft(JSONObject param);
|
void setHaveShaft(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取其他穿拔轴机数据
|
||||||
|
* @param pointCode /
|
||||||
|
* @param location /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<BstIvtShafttubeivt> getOtherCBJData(String pointCode, String location);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,4 +33,6 @@ public interface BstIvtShafttubeivtMapper extends BaseMapper<BstIvtShafttubeivt>
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty(@Param("startPoint") BstIvtShafttubeivt startPoint);
|
List<BstIvtShafttubeivt> getNotTaskShaftCacheEmpty(@Param("startPoint") BstIvtShafttubeivt startPoint);
|
||||||
|
|
||||||
|
List<BstIvtShafttubeivt> getOtherCBJData(String pointCode, String location);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,4 +50,13 @@
|
|||||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code1 = b.point_code)
|
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[ < ]]> '07' AND t.point_code1 = b.point_code)
|
||||||
ORDER BY b.sort_seq ASC
|
ORDER BY b.sort_seq ASC
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getOtherCBJData" resultType="org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
bst_ivt_shafttubeivt bsf
|
||||||
|
WHERE bsf.point_code <![CDATA[ <> ]]> #{pointCode} AND bsf.point_type = '2'
|
||||||
|
AND (IFNULL(bsf.container_name1,'') <![CDATA[ <> ]]> '' OR IFNULL(bsf.container_name2,'') <![CDATA[ <> ]]> '')
|
||||||
|
AND point_location = #{location}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -144,4 +144,9 @@ public class BstIvtShafttubeivtServiceImpl extends ServiceImpl<BstIvtShafttubeiv
|
|||||||
this.updateBatchById(list);
|
this.updateBatchById(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BstIvtShafttubeivt> getOtherCBJData(String pointCode, String location) {
|
||||||
|
return bstIvtShafttubeivtMapper.getOtherCBJData(pointCode, location);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,4 +91,11 @@ public interface IPdmBiSlittingproductionplanService extends IService<PdmBiSlitt
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
List<PdmBiSlittingproductionplan> getByContainerNames(List<String> collect);
|
List<PdmBiSlittingproductionplan> getByContainerNames(List<String> collect);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分切计划数据
|
||||||
|
* @param dto /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<PdmBiSlittingproductionplan> getCurrentPlanInfos(SlitterPlanDistinctDto dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,4 +15,6 @@ public interface PdmBiSlittingproductionplanMapper extends BaseMapper<PdmBiSlitt
|
|||||||
List<SlitterPlanDistinctDto> getAllCutPlan();
|
List<SlitterPlanDistinctDto> getAllCutPlan();
|
||||||
|
|
||||||
List<SlitterPlanDistinctDto> getAllHalfPlan(List<String> qzzs);
|
List<SlitterPlanDistinctDto> getAllHalfPlan(List<String> qzzs);
|
||||||
|
|
||||||
|
List<PdmBiSlittingproductionplan> getCurrentPlanInfos(SlitterPlanDistinctDto dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,4 +140,11 @@
|
|||||||
WHERE
|
WHERE
|
||||||
rn = 1;
|
rn = 1;
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getCurrentPlanInfos"
|
||||||
|
resultType="org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan">
|
||||||
|
SELECT * FROM pdm_bi_slittingproductionplan p
|
||||||
|
WHERE DATE(p.start_time) = CURDATE()
|
||||||
|
AND (p.parent_container_name = #{parent_container_name} OR restruct_container_name = #{parent_container_name})
|
||||||
|
AND p.split_group <![CDATA[ <> ]]> #{split_group}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -149,5 +149,10 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
|||||||
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PdmBiSlittingproductionplan> getCurrentPlanInfos(SlitterPlanDistinctDto dto) {
|
||||||
|
return pdmBiSlittingproductionplanMapper.getCurrentPlanInfos(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class AutoCallAirShaftTask {
|
|||||||
List<SlitterPlanDistinctDto> plans = planAll.stream()
|
List<SlitterPlanDistinctDto> plans = planAll.stream()
|
||||||
.filter(p -> prefixList.stream()
|
.filter(p -> prefixList.stream()
|
||||||
.anyMatch(prefix -> p.getResource_name().startsWith(prefix)) &&
|
.anyMatch(prefix -> p.getResource_name().startsWith(prefix)) &&
|
||||||
checkComputationPoint(p) && checkHasTask(p))
|
checkComputationPoint(p, empty) && checkHasTask(p))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (plans.size() == 0) {
|
if (plans.size() == 0) {
|
||||||
// 如果不需要套轴,就只做拔轴
|
// 如果不需要套轴,就只做拔轴
|
||||||
@@ -185,7 +185,7 @@ public class AutoCallAirShaftTask {
|
|||||||
List<BstIvtCutpointivt> qzzPoint = bcutpointivtService.getPointByTypeAndShaftSize("1", qzzSize, specification);
|
List<BstIvtCutpointivt> qzzPoint = bcutpointivtService.getPointByTypeAndShaftSize("1", qzzSize, specification);
|
||||||
if (qzzPoint.size() == 0) {
|
if (qzzPoint.size() == 0) {
|
||||||
// 调用ACS滚条气涨轴下来
|
// 调用ACS滚条气涨轴下来
|
||||||
toAcsOutShaft(qzzSize, location, empty);
|
// toAcsOutShaft(qzzSize, location, empty);
|
||||||
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
||||||
saveCutPlanMessage(empty, needPlans, qzzSize);
|
saveCutPlanMessage(empty, needPlans, qzzSize);
|
||||||
toCallAgvMovePaperTube(needPlans, location, empty);
|
toCallAgvMovePaperTube(needPlans, location, empty);
|
||||||
@@ -196,7 +196,7 @@ public class AutoCallAirShaftTask {
|
|||||||
if (ObjectUtil.isEmpty(startPoint)) {
|
if (ObjectUtil.isEmpty(startPoint)) {
|
||||||
// 如果不存在,则发起信号滚气涨轴
|
// 如果不存在,则发起信号滚气涨轴
|
||||||
// 调用ACS滚条气涨轴下来
|
// 调用ACS滚条气涨轴下来
|
||||||
toAcsOutShaft(qzzSize, location, empty);
|
// toAcsOutShaft(qzzSize, location, empty);
|
||||||
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
||||||
saveCutPlanMessage(empty, needPlans, qzzSize);
|
saveCutPlanMessage(empty, needPlans, qzzSize);
|
||||||
toCallAgvMovePaperTube(needPlans, location, empty);
|
toCallAgvMovePaperTube(needPlans, location, empty);
|
||||||
@@ -526,13 +526,33 @@ public class AutoCallAirShaftTask {
|
|||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean checkComputationPoint(SlitterPlanDistinctDto dto) {
|
public boolean checkComputationPoint(SlitterPlanDistinctDto dto, BstIvtShafttubeivt empty) {
|
||||||
// 同设备,同母卷,同组别的点位
|
// 同设备,同母卷,同组别的点位
|
||||||
if (ObjectUtil.isNotEmpty(dto)) {
|
if (ObjectUtil.isNotEmpty(dto)) {
|
||||||
List<BstIvtCutpointivt> cuts = bcutpointivtService.getCachePointSame(dto);
|
List<BstIvtCutpointivt> cuts = bcutpointivtService.getCachePointSame(dto);
|
||||||
if (cuts.size() > 0) {
|
if (cuts.size() > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// 判断穿拔轴机是否存在正在套轴的,存在也不继续。
|
||||||
|
List<BstIvtShafttubeivt> shafts = bstIvtShafttubeivtService.getOtherCBJData(empty.getPoint_code(), empty.getPoint_location());
|
||||||
|
if (shafts.size() > 0) {
|
||||||
|
BstIvtShafttubeivt shafttubeivt = shafts.get(0);
|
||||||
|
String containerCode = ObjectUtil.isNotEmpty(shafttubeivt.getContainer_name1())
|
||||||
|
? shafttubeivt.getContainer_name1() : shafttubeivt.getContainer_name2();
|
||||||
|
// 获取这个子卷号的分切计划
|
||||||
|
PdmBiSlittingproductionplan byContainerName = slittingproductionplanService.getByContainerName(containerCode);
|
||||||
|
if ("1".equals(byContainerName.getOrder_type())) {
|
||||||
|
// 判断母卷
|
||||||
|
if (byContainerName.getParent_container_name().equals(dto.getParent_container_name())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 判断改切
|
||||||
|
if (byContainerName.getRestruct_container_name().equals(dto.getParent_container_name())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 校验是否在拔轴暂存位、分切对接位有相同设备的分切计划信息。
|
// 校验是否在拔轴暂存位、分切对接位有相同设备的分切计划信息。
|
||||||
// 有就返回false, 没有就返回true
|
// 有就返回false, 没有就返回true
|
||||||
List<BstIvtCutpointivt> cuts2 = bcutpointivtService.getReallyQzzSameDevice(dto.getResource_name());
|
List<BstIvtCutpointivt> cuts2 = bcutpointivtService.getReallyQzzSameDevice(dto.getResource_name());
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
}
|
}
|
||||||
List<PdmBiSlittingproductionplan> plans = slittingproductionplanService.getByQzzNo(qzzNo);
|
List<PdmBiSlittingproductionplan> plans = slittingproductionplanService.getByQzzNo(qzzNo);
|
||||||
if (plans.size() == 0) {
|
if (plans.size() == 0) {
|
||||||
log.error("查询不到气胀轴编码「" + qzzNo + "」对应的子卷信息!");
|
log.error("查询不到气胀轴编码「" + qzzNo + "」对应状态[结束]的子卷信息!");
|
||||||
throw new BadRequestException("查询不到气胀轴编码「" + qzzNo + "」对应的子卷信息!");
|
throw new BadRequestException("查询不到气胀轴编码「" + qzzNo + "」对应的子卷信息!");
|
||||||
}
|
}
|
||||||
// 反馈 纸管尺寸
|
// 反馈 纸管尺寸
|
||||||
@@ -294,8 +294,9 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
lockPointR.unlock();
|
lockPointR.unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
throw new BadRequestException("[" + collect + "]对应的分切计划状态已更改,异常处理位没位置!");
|
||||||
}
|
}
|
||||||
throw new BadRequestException("找不到[" + collect + "]对应的分切计划!");
|
|
||||||
}
|
}
|
||||||
// 分切计划设置纸卷重量
|
// 分切计划设置纸卷重量
|
||||||
for (PdmBiSlittingproductionplan plan : plans) {
|
for (PdmBiSlittingproductionplan plan : plans) {
|
||||||
@@ -1143,6 +1144,8 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
+ demoPlan.getUp_or_down();
|
+ demoPlan.getUp_or_down();
|
||||||
plans.forEach(p -> {
|
plans.forEach(p -> {
|
||||||
p.setQzzno(qzzNo);
|
p.setQzzno(qzzNo);
|
||||||
|
p.setStatus("09");
|
||||||
|
p.setEnd_time(ObjectUtil.isEmpty(p.getEnd_time()) ? DateUtil.now() : p.getEnd_time());
|
||||||
TaskUtils.updateOptMessageBySlitterPlan(p);
|
TaskUtils.updateOptMessageBySlitterPlan(p);
|
||||||
});
|
});
|
||||||
if (pointCode1.endsWith("A")) {
|
if (pointCode1.endsWith("A")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user