fix: 分切
This commit is contained in:
@@ -55,4 +55,12 @@ public interface IPdmBiSlittingproductionplanService extends IService<PdmBiSlitt
|
|||||||
* @return 最多两个
|
* @return 最多两个
|
||||||
*/
|
*/
|
||||||
List<PdmBiSlittingproductionplan> getByQzzNo(String qzzNo);
|
List<PdmBiSlittingproductionplan> getByQzzNo(String qzzNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据气胀轴数组获取分切计划
|
||||||
|
* @param qzzNo /
|
||||||
|
* @param status 状态
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<PdmBiSlittingproductionplan> getByQzzNos(List<String> qzzNo, String status);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,4 +90,15 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
|
|||||||
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PdmBiSlittingproductionplan> getByQzzNos(List<String> qzzNo, String status) {
|
||||||
|
LambdaQueryWrapper<PdmBiSlittingproductionplan> lam = new QueryWrapper<PdmBiSlittingproductionplan>().lambda();
|
||||||
|
lam.in(PdmBiSlittingproductionplan::getQzzno, qzzNo)
|
||||||
|
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
||||||
|
.eq(PdmBiSlittingproductionplan::getStatus, status);
|
||||||
|
return pdmBiSlittingproductionplanMapper.selectList(lam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject mesSlittingMachineSendMaterial(JSONObject param) {
|
public JSONObject mesSlittingMachineSendMaterial(JSONObject param) {
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
// todo: 获取子卷号数组
|
// todo: 获取子卷号数组
|
||||||
@@ -611,7 +611,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray slitterDevices() {
|
public JSONArray slitterDevices() {
|
||||||
String prefix = "B2_";
|
String prefix = "B6";
|
||||||
List<StIvtCutpointivt> list = cutpointivtService.getListByStartsWith(prefix, false);
|
List<StIvtCutpointivt> list = cutpointivtService.getListByStartsWith(prefix, false);
|
||||||
JSONArray jsonArray = list.stream()
|
JSONArray jsonArray = list.stream()
|
||||||
.map(item -> {
|
.map(item -> {
|
||||||
@@ -629,8 +629,13 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
// param: device_code
|
// param: device_code
|
||||||
String device_code = param.getString("device_code");
|
String device_code = param.getString("device_code");
|
||||||
StIvtCutpointivt deviceCode = cutpointivtService.getPintByExtCode(device_code, false);
|
StIvtCutpointivt deviceCode = cutpointivtService.getPintByExtCode(device_code, false);
|
||||||
List<String> collect = Stream.of(deviceCode.getUp_qzzno(), deviceCode.getDown_qzzno())
|
List<String> qzzNo = Stream.of(deviceCode.getUp_qzzno(), deviceCode.getDown_qzzno())
|
||||||
.filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
|
.filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
|
||||||
|
List<PdmBiSlittingproductionplan> list = slittingproductionplanService.getByQzzNos(qzzNo, "05");
|
||||||
|
if (list.size() == 0) {
|
||||||
|
throw new BadRequestException("分切机" + device_code + " 的分切计划 " + qzzNo + " 不存在");
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user