Merge remote-tracking branch 'origin/b_lms' into b_lms
This commit is contained in:
@@ -31,11 +31,10 @@
|
|||||||
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}
|
||||||
<if test="size == '3'">
|
<if test="size == '3'">
|
||||||
AND sc.qzz_generation = #{generation}
|
AND pp.qzz_generation = #{generation}
|
||||||
</if>
|
</if>
|
||||||
AND bc.is_used = '1'
|
AND bc.is_used = '1'
|
||||||
AND bc.point_status = '3'
|
AND bc.point_status = '3'
|
||||||
@@ -46,11 +45,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.*, sc.qzz_generation, p.qzz_size
|
SELECT DISTINCT bic.*, p.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 AND IFNULL(bic.qzz_no1,'') != '')
|
LEFT JOIN pdm_bi_slittingproductionplan p ON ((p.qzzno = bic.qzz_no1 AND IFNULL(bic.qzz_no1,'') != '')
|
||||||
OR (p.qzzno = bic.qzz_no2 AND IFNULL(bic.qzz_no2,'') != ''))
|
OR (p.qzzno = bic.qzz_no2 AND IFNULL(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'
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public class SlitterPdaController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/toCleanCutCacheInventory")
|
@PostMapping("/toCleanCutCacheInventory")
|
||||||
@Log("清理分切缓存到内包间")
|
@Log("清理分切缓存")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> toCleanCutCacheInventory(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> toCleanCutCacheInventory(@RequestBody JSONObject param) {
|
||||||
return new ResponseEntity<>(slitterDevices.toCleanCutCacheInventory(param), HttpStatus.OK);
|
return new ResponseEntity<>(slitterDevices.toCleanCutCacheInventory(param), HttpStatus.OK);
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ public class PdmBiSlittingproductionplan implements Serializable {
|
|||||||
|
|
||||||
/** 左右(1,2) */
|
/** 左右(1,2) */
|
||||||
private String left_or_right;
|
private String left_or_right;
|
||||||
|
|
||||||
/** 气涨轴规格 */
|
/** 气涨轴规格 */
|
||||||
private String qzz_size;
|
private String qzz_size;
|
||||||
|
|
||||||
@@ -159,6 +160,9 @@ public class PdmBiSlittingproductionplan implements Serializable {
|
|||||||
/** 子卷重量 */
|
/** 子卷重量 */
|
||||||
private String weight;
|
private String weight;
|
||||||
|
|
||||||
|
/** 接头数 */
|
||||||
|
private String joint_type;
|
||||||
|
|
||||||
/** 分切重量 */
|
/** 分切重量 */
|
||||||
private String paper_weight;
|
private String paper_weight;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
p.split_group,
|
p.split_group,
|
||||||
p.up_or_down,
|
p.up_or_down,
|
||||||
p.qzz_size,
|
p.qzz_size,
|
||||||
sc.qzz_generation,
|
p.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
|
||||||
@@ -60,8 +60,6 @@
|
|||||||
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'
|
||||||
@@ -75,7 +73,7 @@
|
|||||||
p.split_group,
|
p.split_group,
|
||||||
p.up_or_down,
|
p.up_or_down,
|
||||||
p.qzz_size,
|
p.qzz_size,
|
||||||
sc.qzz_generation,
|
p.qzz_generation,
|
||||||
num,
|
num,
|
||||||
cn,
|
cn,
|
||||||
cnn
|
cnn
|
||||||
@@ -97,7 +95,7 @@
|
|||||||
p1.up_or_down,
|
p1.up_or_down,
|
||||||
'1' AS num,
|
'1' AS num,
|
||||||
p1.qzz_size,
|
p1.qzz_size,
|
||||||
c.qzz_generation,
|
p1.qzz_generation,
|
||||||
ROW_NUMBER() OVER (
|
ROW_NUMBER() OVER (
|
||||||
PARTITION BY p1.parent_container_name, p1.split_group
|
PARTITION BY p1.parent_container_name, p1.split_group
|
||||||
ORDER BY p1.resource_name
|
ORDER BY p1.resource_name
|
||||||
@@ -124,16 +122,6 @@
|
|||||||
AND p1.up_or_down <![CDATA[ <> ]]> p2.up_or_down
|
AND p1.up_or_down <![CDATA[ <> ]]> p2.up_or_down
|
||||||
AND p1.is_delete = '0'
|
AND p1.is_delete = '0'
|
||||||
AND p1.is_paper_ok = '1'
|
AND p1.is_paper_ok = '1'
|
||||||
LEFT JOIN
|
|
||||||
st_ivt_cutpointivt c
|
|
||||||
ON
|
|
||||||
c.ext_code = p1.resource_name
|
|
||||||
WHERE
|
|
||||||
p1.qzzno NOT IN
|
|
||||||
<foreach item="item" index="index" collection="qzzs" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
OR p1.qzzno IS NULL
|
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
resource_name,
|
resource_name,
|
||||||
|
|||||||
@@ -310,6 +310,13 @@ public class PdmBiSubpackagerelation extends Model<PdmBiSubpackagerelation> {
|
|||||||
*/
|
*/
|
||||||
private String box_group;
|
private String box_group;
|
||||||
|
|
||||||
|
|
||||||
|
/** 接头数 */
|
||||||
|
private String joint_type;
|
||||||
|
|
||||||
|
/** 物料类型 */
|
||||||
|
private String material_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 纸管规格
|
* 纸管规格
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -17,8 +17,10 @@ import org.nl.b_lms.sch.point.dao.SchBasePoint;
|
|||||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxlashboundService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxlashboundService;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.IMdpbBoxtypeService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
@@ -54,6 +56,12 @@ public class TwoLashTask extends AbstractAcsTask {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
private IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 木箱类型信息服务
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private IMdpbBoxtypeService iMdpbBoxtypeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AcsTaskDto> addTask() {
|
public List<AcsTaskDto> addTask() {
|
||||||
/*
|
/*
|
||||||
@@ -86,15 +94,23 @@ public class TwoLashTask extends AbstractAcsTask {
|
|||||||
throw new BadRequestException("未查询到相关木箱信息!");
|
throw new BadRequestException("未查询到相关木箱信息!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询木箱类型信息
|
||||||
|
MdpbBoxtype boxTypeDao = iMdpbBoxtypeService.getById(dao.get(0).getMaterial_code());
|
||||||
|
if (ObjectUtil.isEmpty(boxTypeDao)) {
|
||||||
|
throw new BadRequestException("木箱类型信息不存在!木箱料号为:"+dao.get(0).getMaterial_code());
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject interaction_json = new JSONObject();
|
JSONObject interaction_json = new JSONObject();
|
||||||
interaction_json.put("isLeave", json.getString("is_auto_issue"));
|
interaction_json.put("isLeave", json.getString("is_auto_issue"));
|
||||||
interaction_json.put("length", dao.get(0).getBox_length());
|
interaction_json.put("length", dao.get(0).getBox_length());
|
||||||
interaction_json.put("weight", dao.get(0).getBox_width());
|
interaction_json.put("weight", dao.get(0).getBox_width());
|
||||||
interaction_json.put("height", dao.get(0).getBox_high());
|
interaction_json.put("height", dao.get(0).getBox_high());
|
||||||
interaction_json.put("template", dao.get(0).getLash_num());
|
// 捆扎模版
|
||||||
//第二次捆扎次数
|
interaction_json.put("template", boxTypeDao.getLash_num());
|
||||||
interaction_json.put("bindingTimes", "3");
|
// 第二次捆扎次数
|
||||||
interaction_json.put("isBinding", IOSEnum.IS_SEND.code("是"));
|
interaction_json.put("bindingTimes", boxTypeDao.getLash_num_tow());
|
||||||
|
// 是否二次捆扎
|
||||||
|
interaction_json.put("isBinding", boxTypeDao.getNeed_lash_two());
|
||||||
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
||||||
AcsTaskDto dto = AcsTaskDto.builder()
|
AcsTaskDto dto = AcsTaskDto.builder()
|
||||||
.ext_task_id(json.getString("task_id"))
|
.ext_task_id(json.getString("task_id"))
|
||||||
|
|||||||
@@ -7,8 +7,15 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.IMdpbBoxtypeService;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.mapper.BstIvtBoxinfoMapper;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.mapper.MdpbBoxtypeMapper;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
@@ -21,9 +28,11 @@ import org.nl.wms.sch.AcsTaskDto;
|
|||||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
import org.nl.wms.sch.tasks.CutConveyorTask;
|
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -35,6 +44,18 @@ import static org.nl.wms.util.TaskUtil.getRoutePlanCode;
|
|||||||
public class TwoSendOutTask extends AbstractAcsTask {
|
public class TwoSendOutTask extends AbstractAcsTask {
|
||||||
private final String THIS_CLASS = TwoSendOutTask.class.getName();
|
private final String THIS_CLASS = TwoSendOutTask.class.getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 木箱信息服务
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private BstIvtBoxinfoMapper iBstIvtBoxinfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 木箱类型信息服务
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private MdpbBoxtypeMapper iMdpbBoxtypeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AcsTaskDto> addTask() {
|
public List<AcsTaskDto> addTask() {
|
||||||
/*
|
/*
|
||||||
@@ -43,15 +64,28 @@ public class TwoSendOutTask extends AbstractAcsTask {
|
|||||||
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
|
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
|
||||||
|
|
||||||
JSONArray arr = WQLObject.getWQLObject("SCH_BASE_Task").query("handle_class = '" + THIS_CLASS + "' and task_status = '" + TaskStatusEnum.START_AND_POINT.getCode() + "' and is_delete ='0'").getResultJSONArray(0);
|
JSONArray arr = WQLObject.getWQLObject("SCH_BASE_Task").query("handle_class = '" + THIS_CLASS + "' and task_status = '" + TaskStatusEnum.START_AND_POINT.getCode() + "' and is_delete ='0'").getResultJSONArray(0);
|
||||||
// 获取系统参数
|
|
||||||
String expandWidthLength = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("expandWidthLength").getValue();
|
|
||||||
JSONObject param = new JSONObject();
|
|
||||||
param.put("expandWidthLength",expandWidthLength);
|
|
||||||
|
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
ArrayList<AcsTaskDto> resultList = new ArrayList<>();
|
ArrayList<AcsTaskDto> resultList = new ArrayList<>();
|
||||||
for (int i = 0; i < arr.size(); i++) {
|
for (int i = 0; i < arr.size(); i++) {
|
||||||
JSONObject json = arr.getJSONObject(i);
|
JSONObject json = arr.getJSONObject(i);
|
||||||
|
|
||||||
|
// 根据木箱号查询木箱信息
|
||||||
|
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.selectOne(
|
||||||
|
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||||
|
.eq(BstIvtBoxinfo::getBox_no, json.getString("vehicle_code"))
|
||||||
|
);
|
||||||
|
if (ObjectUtil.isEmpty(boxDao)) {
|
||||||
|
throw new BadRequestException("未查询到相关木箱信息!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询木箱类型信息
|
||||||
|
MdpbBoxtype boxTypeDao = iMdpbBoxtypeService.selectById(boxDao.getMaterial_code());
|
||||||
|
if (ObjectUtil.isEmpty(boxTypeDao)) {
|
||||||
|
throw new BadRequestException("木箱类型信息不存在!木箱料号为:"+boxDao.getMaterial_code());
|
||||||
|
}
|
||||||
|
param.put("expandWidthLength",boxTypeDao.getExpend_width());
|
||||||
|
|
||||||
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
||||||
AcsTaskDto dto = AcsTaskDto.builder()
|
AcsTaskDto dto = AcsTaskDto.builder()
|
||||||
.ext_task_id(json.getString("task_id"))
|
.ext_task_id(json.getString("task_id"))
|
||||||
|
|||||||
@@ -89,8 +89,10 @@ public class AutoCallAirShaftTask {
|
|||||||
// 标箔:1,锂电:2 改:大小:4代5代
|
// 标箔:1,锂电:2 改:大小:4代5代
|
||||||
String specification = empty.getQzz_generation();
|
String specification = empty.getQzz_generation();
|
||||||
String location = empty.getPoint_location();
|
String location = empty.getPoint_location();
|
||||||
// 2、获取分切计划数据
|
// 2、获取分切计划数据 校验代数
|
||||||
List<SlitterPlanDistinctDto> plans = slittingproductionplanService.getAllCutPlan();
|
List<SlitterPlanDistinctDto> planAll = slittingproductionplanService.getAllCutPlan();
|
||||||
|
List<SlitterPlanDistinctDto> plans = planAll.stream()
|
||||||
|
.filter(p -> p.getResource_name().startsWith("B")).collect(Collectors.toList());
|
||||||
if (plans.size() == 0) {
|
if (plans.size() == 0) {
|
||||||
// 如果不需要套轴,就只做拔轴
|
// 如果不需要套轴,就只做拔轴
|
||||||
makePullShaft(empty, specification);
|
makePullShaft(empty, specification);
|
||||||
@@ -113,7 +115,7 @@ public class AutoCallAirShaftTask {
|
|||||||
makePullShaft(empty, specification);
|
makePullShaft(empty, specification);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 从寻查找分切计划,并放在plans, 没有考虑区域问题
|
// 从寻查找分切计划,并放在plans, 没有考虑区域问题, 里面会考虑代数
|
||||||
plans = slittingproductionplanService.getAllHalfPlan(qzzs);
|
plans = slittingproductionplanService.getAllHalfPlan(qzzs);
|
||||||
if (plans.size() == 0) {
|
if (plans.size() == 0) {
|
||||||
// 如果不需要套轴,就只做拔轴
|
// 如果不需要套轴,就只做拔轴
|
||||||
@@ -122,6 +124,7 @@ public class AutoCallAirShaftTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 获取一个分切计划的Dto。如果是6寸,可以直接使用、如果是3寸,需要判断当前位置是否满足
|
// 获取一个分切计划的Dto。如果是6寸,可以直接使用、如果是3寸,需要判断当前位置是否满足
|
||||||
|
// todo: 需要校验分切设备是在对应的区域钟
|
||||||
SlitterPlanDistinctDto planDto = plans.stream()
|
SlitterPlanDistinctDto planDto = plans.stream()
|
||||||
.filter(planD -> "6".equals(planD.getQzz_size()) ||
|
.filter(planD -> "6".equals(planD.getQzz_size()) ||
|
||||||
("3".equals(planD.getQzz_size()) && specification.equals(planD.getQzz_generation())))
|
("3".equals(planD.getQzz_size()) && specification.equals(planD.getQzz_generation())))
|
||||||
@@ -143,6 +146,7 @@ public class AutoCallAirShaftTask {
|
|||||||
String qzzSize = needPlan.getQzz_size();
|
String qzzSize = needPlan.getQzz_size();
|
||||||
// 从套轴对接位获取相同气涨轴大小
|
// 从套轴对接位获取相同气涨轴大小
|
||||||
// update: 不需要(同标箔或者锂电分开)
|
// update: 不需要(同标箔或者锂电分开)
|
||||||
|
// todo: 需要校验区域0/1
|
||||||
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滚条气涨轴下来
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public interface SlitterService {
|
|||||||
JSONArray getCutCacheAgvPoints();
|
JSONArray getCutCacheAgvPoints();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清理分切缓存到内包间
|
* 清理分切缓
|
||||||
* @param param /
|
* @param param /
|
||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import org.nl.b_lms.bst.ivt.stockingivt.service.IBstIvtStockingivtService;
|
|||||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||||
|
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||||
|
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||||
import org.nl.b_lms.sch.point.dao.StIvtCutpointivt;
|
import org.nl.b_lms.sch.point.dao.StIvtCutpointivt;
|
||||||
import org.nl.b_lms.sch.point.service.IstIvtCutpointivtService;
|
import org.nl.b_lms.sch.point.service.IstIvtCutpointivtService;
|
||||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||||
@@ -111,6 +113,8 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
private ISysParamService paramService;
|
private ISysParamService paramService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SendNBJExceptionPointTask sendNBJExceptionPointTask;
|
private SendNBJExceptionPointTask sendNBJExceptionPointTask;
|
||||||
|
@Autowired
|
||||||
|
private IpdmBiSubpackagerelationService subpackagerelationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
||||||
@@ -428,7 +432,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
// 获得设备
|
// 获得设备
|
||||||
StIvtCutpointivt device = cutpointivtService.getOne(new LambdaQueryWrapper<StIvtCutpointivt>()
|
StIvtCutpointivt device = cutpointivtService.getOne(new LambdaQueryWrapper<StIvtCutpointivt>()
|
||||||
.eq(StIvtCutpointivt::getExt_code, demoPlan.getResource_name()));
|
.eq(StIvtCutpointivt::getExt_code, demoPlan.getResource_name()));
|
||||||
String area = demoPlan.getContainer_name().substring(0, 2);
|
String area = device.getProduct_area();
|
||||||
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
||||||
// hint: 获取到的分切可能是不同组的但具有一定时间顺序
|
// hint: 获取到的分切可能是不同组的但具有一定时间顺序
|
||||||
List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(
|
List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(
|
||||||
@@ -736,7 +740,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
}
|
}
|
||||||
List<String> collect = list.stream().map(PdmBiSlittingproductionplan::getContainer_name).collect(Collectors.toList());
|
List<String> collect = list.stream().map(PdmBiSlittingproductionplan::getContainer_name).collect(Collectors.toList());
|
||||||
param.put("container", collect);
|
param.put("container", collect);
|
||||||
log.info("手持调用分切机{}下卷, 参数:{}", device_code, param);
|
log.info("调用分切机{}下卷, 参数:{}", device_code, param);
|
||||||
mesSlittingMachineSendMaterial(param);
|
mesSlittingMachineSendMaterial(param);
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("message", "分切机" + device_code + "下卷成功!");
|
result.put("message", "分切机" + device_code + "下卷成功!");
|
||||||
@@ -999,10 +1003,16 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (openLock) {
|
if (openLock) {
|
||||||
BstIvtCutpointivt agvCode = bcutpointivtService.getPintByAgvCode(pointCode, false);
|
BstIvtCutpointivt agvCode = bcutpointivtService.getPintByTrussCode(pointCode, false);
|
||||||
agvCode.setQzz_no1("");
|
if (agvCode.getTruss_point_code1().equals(pointCode)) {
|
||||||
agvCode.setQzz_no2("");
|
agvCode.setQzz_no1("");
|
||||||
agvCode.setPoint_status("1");
|
}
|
||||||
|
if (agvCode.getTruss_point_code2().equals(pointCode)) {
|
||||||
|
agvCode.setQzz_no2("");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(agvCode.getQzz_no1()) && ObjectUtil.isEmpty(agvCode.getQzz_no2())) {
|
||||||
|
agvCode.setPoint_status("1");
|
||||||
|
}
|
||||||
TaskUtils.updateOptMessageByBCutPoint(agvCode);
|
TaskUtils.updateOptMessageByBCutPoint(agvCode);
|
||||||
bcutpointivtService.updateById(agvCode);
|
bcutpointivtService.updateById(agvCode);
|
||||||
} else {
|
} else {
|
||||||
@@ -1025,20 +1035,30 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
String outsideContainerName = param.getString("OutsideContainerName");
|
String outsideContainerName = param.getString("OutsideContainerName");
|
||||||
String insideContainerName = param.getString("InsideContainerName");
|
String insideContainerName = param.getString("InsideContainerName");
|
||||||
String carrierStatus = param.getString("CarrierStatus");
|
String carrierStatus = param.getString("CarrierStatus");
|
||||||
if (SlitterConstant.SLITTER_NO.equals(carrierStatus)) {
|
// 接头数,内卷+1 = 外卷 carrierStatus = 0 不下任务
|
||||||
// 不下卷需要修改。
|
// 内卷,包装关系删除。
|
||||||
PdmBiSlittingproductionplan outPlan = slittingproductionplanService.getByContainerName(outsideContainerName);
|
PdmBiSlittingproductionplan outPlan = slittingproductionplanService.getByContainerName(outsideContainerName);
|
||||||
PdmBiSlittingproductionplan inPlan = slittingproductionplanService.getByContainerName(insideContainerName);
|
PdmBiSlittingproductionplan inPlan = slittingproductionplanService.getByContainerName(insideContainerName);
|
||||||
outPlan.setQzzno(inPlan.getQzzno());
|
inPlan.setIs_delete(SlitterConstant.SLITTER_YES);
|
||||||
outPlan.setStatus(inPlan.getStatus());
|
TaskUtils.updateOptMessageBySlitterPlan(inPlan);
|
||||||
outPlan.setIs_child_tz_ok(inPlan.getIs_child_tz_ok());
|
// 接头数,内卷+1 = 外卷
|
||||||
outPlan.setIs_paper_ok(inPlan.getIs_paper_ok());
|
outPlan.setJoint_type(String.valueOf(Integer.valueOf(inPlan.getJoint_type()) + 1));
|
||||||
TaskUtils.updateOptMessageBySlitterPlan(outPlan);
|
TaskUtils.updateOptMessageBySlitterPlan(outPlan);
|
||||||
inPlan.setQzzno(inPlan.getQzzno() + "拼接");
|
List<PdmBiSlittingproductionplan> collect = Stream.of(outPlan, inPlan).collect(Collectors.toList());
|
||||||
inPlan.setStatus("09");
|
slittingproductionplanService.updateBatchById(collect);
|
||||||
TaskUtils.updateOptMessageBySlitterPlan(outPlan);
|
// 删除子卷包装关系
|
||||||
List<PdmBiSlittingproductionplan> collect = Stream.of(outPlan, inPlan).collect(Collectors.toList());
|
subpackagerelationService.remove(new LambdaQueryWrapper<PdmBiSubpackagerelation>()
|
||||||
slittingproductionplanService.updateBatchById(collect);
|
.eq(PdmBiSubpackagerelation::getContainer_name, insideContainerName));
|
||||||
|
if (SlitterConstant.SLITTER_YES.equals(carrierStatus)) {
|
||||||
|
List<String> cons = Stream.of(outPlan.getQzzno()).collect(Collectors.toList());
|
||||||
|
// 调接口创建任务
|
||||||
|
JSONObject taskParam = new JSONObject();
|
||||||
|
taskParam.put("container", cons);
|
||||||
|
try {
|
||||||
|
mesSlittingMachineSendMaterial(taskParam);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ import org.nl.b_lms.sch.tasks.TwoLashTask;
|
|||||||
import org.nl.b_lms.sch.tasks.TwoOutHeapTask;
|
import org.nl.b_lms.sch.tasks.TwoOutHeapTask;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxlashboundService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxlashboundService;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.IMdpbBoxtypeService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxlashbound;
|
||||||
|
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.LashManageService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.LashManageService;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
@@ -65,6 +67,11 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
*/
|
*/
|
||||||
private final TwoLashTask twoLashTask;
|
private final TwoLashTask twoLashTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 木箱类型信息服务
|
||||||
|
*/
|
||||||
|
private final IMdpbBoxtypeService iMdpbBoxtypeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void createLashTask(JSONObject whereJson) {
|
public void createLashTask(JSONObject whereJson) {
|
||||||
@@ -245,22 +252,31 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("vehicle_code"))
|
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("vehicle_code"))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 根据木箱料号查询木箱类型信息
|
||||||
|
MdpbBoxtype boxTypeDao = iMdpbBoxtypeService.getById(boxDao.getMaterial_code());
|
||||||
|
if (ObjectUtil.isEmpty(boxTypeDao)) {
|
||||||
|
throw new BadRequestException("木箱类型信息不存在!木箱料号为:"+boxDao.getMaterial_code());
|
||||||
|
}
|
||||||
|
|
||||||
// 返回参数
|
// 返回参数
|
||||||
result.put("length", boxDao.getBox_length());
|
result.put("length", boxDao.getBox_length());
|
||||||
result.put("width", boxDao.getBox_width());
|
result.put("width", boxDao.getBox_width());
|
||||||
result.put("height", boxDao.getBox_high());
|
result.put("height", boxDao.getBox_high());
|
||||||
result.put("case", boxDao.getMaterial_code());
|
result.put("case", boxDao.getMaterial_code());
|
||||||
result.put("isBinding", IOSEnum.IS_SEND.code("是"));
|
// 是否捆扎
|
||||||
|
result.put("isBinding", boxTypeDao.getNeed_lash_one());
|
||||||
|
// TODO 是否贴标
|
||||||
result.put("isLabeling", IOSEnum.IS_SEND.code("否"));
|
result.put("isLabeling", IOSEnum.IS_SEND.code("否"));
|
||||||
|
// TODO 贴标模版
|
||||||
result.put("labelingTemplate", boxDao.getLash_num());
|
result.put("labelingTemplate", boxDao.getLash_num());
|
||||||
//捆扎模板
|
// 捆扎模板
|
||||||
result.put("bindingTemplate", boxDao.getLash_num());
|
result.put("bindingTemplate", boxTypeDao.getLash_num());
|
||||||
|
// TODO 打印机
|
||||||
result.put("printDevice", "1");
|
result.put("printDevice", "1");
|
||||||
|
// TODO 贴标数量
|
||||||
result.put("printQty", "1");
|
result.put("printQty", "1");
|
||||||
//第一次捆扎次数
|
// 第一次捆扎次数
|
||||||
result.put("bundleTimes", "3");
|
result.put("bundleTimes", boxTypeDao.getLash_num_one());
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,11 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
|||||||
*/
|
*/
|
||||||
private final SchBasePointMapper schBasePointMapper;
|
private final SchBasePointMapper schBasePointMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货服务
|
||||||
|
*/
|
||||||
|
private final TwoSendOutTask twoSendOutTask;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void createSendOutTask(JSONObject whereJson) {
|
public void createSendOutTask(JSONObject whereJson) {
|
||||||
@@ -196,8 +201,7 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
|||||||
task_jo.put("point_code2", point_code);
|
task_jo.put("point_code2", point_code);
|
||||||
task_jo.put("vehicle_code", vehicleCode);
|
task_jo.put("vehicle_code", vehicleCode);
|
||||||
task_jo.put("task_type", "010708");
|
task_jo.put("task_type", "010708");
|
||||||
TwoSendOutTask taskBean = new TwoSendOutTask();
|
twoSendOutTask.createTask(task_jo);
|
||||||
taskBean.createTask(task_jo);
|
|
||||||
|
|
||||||
// 锁住点位
|
// 锁住点位
|
||||||
ischBasePointService.update(
|
ischBasePointService.update(
|
||||||
@@ -366,8 +370,7 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
|||||||
task_jo.put("point_code4", point_code);
|
task_jo.put("point_code4", point_code);
|
||||||
task_jo.put("vehicle_code", vehicleCode);
|
task_jo.put("vehicle_code", vehicleCode);
|
||||||
task_jo.put("task_type", "010708");
|
task_jo.put("task_type", "010708");
|
||||||
TwoSendOutTask taskBean = new TwoSendOutTask();
|
twoSendOutTask.createTask(task_jo);
|
||||||
taskBean.createTask(task_jo);
|
|
||||||
|
|
||||||
// 锁住点位
|
// 锁住点位
|
||||||
ischBasePointService.update(
|
ischBasePointService.update(
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
|||||||
roleTree.add(row);
|
roleTree.add(row);
|
||||||
}
|
}
|
||||||
res.put("sonTree", roleTree);
|
res.put("sonTree", roleTree);
|
||||||
result.put("rf_menu" + i, res);
|
result.put("rf_menu" + ("188".equals(res.getString("menu_id"))?1:0), res);
|
||||||
}
|
}
|
||||||
|
|
||||||
returnjo.put("code", "1");
|
returnjo.put("code", "1");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
server:
|
server:
|
||||||
port: 8010
|
port: 9999
|
||||||
#配置数据源
|
#配置数据源
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
@@ -7,10 +7,10 @@ spring:
|
|||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
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: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
|
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
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
# password: ${DB_PWD:NLABC&hl123}
|
# password: ${DB_PWD:NLABC&hl123}
|
||||||
password: ${DB_PWD:root}
|
password: ${DB_PWD:12356}
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
# 最小连接数
|
# 最小连接数
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# 接口地址
|
# 接口地址
|
||||||
VUE_APP_BASE_API = 'http://localhost:8011'
|
VUE_APP_BASE_API = 'http://localhost:9999'
|
||||||
VUE_APP_WS_API = 'ws://localhost:8011'
|
VUE_APP_WS_API = 'ws://localhost:9999'
|
||||||
|
|
||||||
# 是否启用 babel-plugin-dynamic-import-node插件
|
# 是否启用 babel-plugin-dynamic-import-node插件
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
Reference in New Issue
Block a user