fix: ACS请求扣除纸管数量
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package org.nl.b_lms.bst.ivt.papervehicle.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.IMdPbPapervehicleService;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/mdPbPapervehicle")
|
||||
public class MdPbPapervehicleController {
|
||||
|
||||
@Autowired
|
||||
private IMdPbPapervehicleService mdPbPapervehicleService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询管芯托盘库存")
|
||||
//@SaCheckPermission("@el.check('mdPbPapervehicle:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(mdPbPapervehicleService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增管芯托盘库存")
|
||||
//@SaCheckPermission("@el.check('mdPbPapervehicle:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody MdPbPapervehicle entity){
|
||||
mdPbPapervehicleService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改管芯托盘库存")
|
||||
//@SaCheckPermission("@el.check('mdPbPapervehicle:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody MdPbPapervehicle entity){
|
||||
mdPbPapervehicleService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除管芯托盘库存")
|
||||
//@SaCheckPermission("@el.check('mdPbPapervehicle:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
mdPbPapervehicleService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.b_lms.bst.ivt.papervehicle.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author lyd
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
public interface IMdPbPapervehicleService extends IService<MdPbPapervehicle> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<MdPbPapervehicle>
|
||||
*/
|
||||
IPage<MdPbPapervehicle> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param entity /
|
||||
*/
|
||||
void create(MdPbPapervehicle entity);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param entity /
|
||||
*/
|
||||
void update(MdPbPapervehicle entity);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package org.nl.b_lms.bst.ivt.papervehicle.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @description /
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_pb_papervehicle")
|
||||
public class MdPbPapervehicle implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 载具标识 */
|
||||
@TableId(value = "ivt_id", type = IdType.NONE)
|
||||
private String ivt_id;
|
||||
|
||||
/**
|
||||
* 托盘号
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 排
|
||||
*/
|
||||
private String row_num;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String material_name;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Long update_optid;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.b_lms.bst.ivt.papervehicle.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
public interface MdPbPapervehicleMapper extends BaseMapper<MdPbPapervehicle> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.b_lms.bst.ivt.papervehicle.service.dao.mapper.MdPbPapervehicleMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.nl.b_lms.bst.ivt.papervehicle.service.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @description /
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
public class MdPbPapervehicleDto implements Serializable {
|
||||
|
||||
/**
|
||||
* 载具标识
|
||||
*/
|
||||
private String ivt_id;
|
||||
|
||||
/**
|
||||
* 托盘号
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 排
|
||||
*/
|
||||
private String row_num;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String material_name;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Long update_optid;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optname;
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_time;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.b_lms.bst.ivt.papervehicle.service.dto;
|
||||
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
public class MdPbPapervehicleQuery extends BaseQuery<MdPbPapervehicle> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package org.nl.b_lms.bst.ivt.papervehicle.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.IMdPbPapervehicleService;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.mapper.MdPbPapervehicleMapper;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务实现
|
||||
* @author lyd
|
||||
* @date 2024-06-04
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MdPbPapervehicleServiceImpl extends ServiceImpl<MdPbPapervehicleMapper, MdPbPapervehicle> implements IMdPbPapervehicleService {
|
||||
|
||||
@Autowired
|
||||
private MdPbPapervehicleMapper mdPbPapervehicleMapper;
|
||||
|
||||
@Override
|
||||
public IPage<MdPbPapervehicle> queryAll(Map whereJson, PageQuery page){
|
||||
LambdaQueryWrapper<MdPbPapervehicle> lam = new LambdaQueryWrapper<>();
|
||||
IPage<MdPbPapervehicle> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
mdPbPapervehicleMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(MdPbPapervehicle entity) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
entity.setIvt_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
entity.setUpdate_optid(Long.valueOf(currentUserId));
|
||||
entity.setUpdate_optname(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
mdPbPapervehicleMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(MdPbPapervehicle entity) {
|
||||
MdPbPapervehicle dto = mdPbPapervehicleMapper.selectById(entity.getIvt_id());
|
||||
if (dto == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败");
|
||||
}
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_optid(Long.valueOf(currentUserId));
|
||||
entity.setUpdate_optname(nickName);
|
||||
entity.setUpdate_time(now);
|
||||
|
||||
mdPbPapervehicleMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
mdPbPapervehicleMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -71,4 +71,9 @@ public class SlitterController {
|
||||
public ResponseEntity<Object> create6(@RequestBody JSONObject entity){
|
||||
return new ResponseEntity<>(slitterService.mesGetFinishWeighingOfWasteFoil(entity), HttpStatus.CREATED);
|
||||
}
|
||||
@PostMapping("/test7")
|
||||
@Log("1111")
|
||||
public ResponseEntity<Object> create7(@RequestBody JSONObject entity){
|
||||
return new ResponseEntity<>(slitterService.acsToReduceTube(entity), HttpStatus.CREATED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,4 +96,11 @@ public interface SlitterService {
|
||||
* @param param
|
||||
*/
|
||||
JSONObject downRolls(JSONObject param);
|
||||
|
||||
/**
|
||||
* 扣除纸管数据
|
||||
* @param param /
|
||||
* @return /
|
||||
*/
|
||||
JSONObject acsToReduceTube(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -8,16 +8,22 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.bst.ivt.cutpointivt.service.IBstIvtCutpointivtService;
|
||||
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.IMdPbPapervehicleService;
|
||||
import org.nl.b_lms.bst.ivt.papervehicle.service.dao.MdPbPapervehicle;
|
||||
import org.nl.b_lms.bst.ivt.scale.bound.service.IBstIvtScaleboundService;
|
||||
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.BstIvtScalebound;
|
||||
import org.nl.b_lms.bst.ivt.scale.history.service.IBstIvtScalehistoryService;
|
||||
import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
||||
import org.nl.b_lms.bst.ivt.shafttubeivt.service.IBstIvtShafttubeivtService;
|
||||
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt;
|
||||
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.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.sch.point.dao.StIvtCutpointivt;
|
||||
@@ -86,9 +92,14 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
private IBstIvtScalehistoryService scaleHistoryService;
|
||||
@Autowired
|
||||
private WmsToAcsService wmsToAcsService;
|
||||
@Autowired
|
||||
private IBstIvtStockingivtService stockingivtService;
|
||||
@Autowired
|
||||
private IMdPbPapervehicleService papervehicleService;
|
||||
|
||||
@Override
|
||||
public JSONObject acsRequestShaftLoadTube(JSONObject param) {
|
||||
log.info("acs申请套轴的输入参数为:{}", param);
|
||||
JSONObject res = new JSONObject();
|
||||
JSONObject con = new JSONObject();
|
||||
String deviceCode = param.getString("device_code");
|
||||
@@ -127,6 +138,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public JSONObject acsFinishShaftPluckTube(JSONObject param) {
|
||||
log.info("acs申请拔轴完毕的输入参数为:{}", param);
|
||||
JSONObject res = new JSONObject();
|
||||
String deviceCode = param.getString("device_code");
|
||||
BstIvtShafttubeivt CBJ = shafttubeivtService.getByPointCode(deviceCode, false);
|
||||
@@ -145,6 +157,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public JSONObject acsRequestShaftPluckTube(JSONObject param) {
|
||||
log.info("acs申请拔轴的输入参数为:{}", param);
|
||||
// 反馈拔轴机构上的纸管信息
|
||||
// 参数:设备号,type,插拔轴位,qzzSize
|
||||
JSONObject res = new JSONObject();
|
||||
@@ -279,6 +292,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public JSONObject acsSendShaftToCache(JSONObject param) {
|
||||
log.info("ACS申请送气涨轴到气涨轴暂存位的输入参数为:{}", param);
|
||||
JSONObject res = new JSONObject();
|
||||
String deviceCode = param.getString("device_code");
|
||||
String qzzSize = param.getString("size");
|
||||
@@ -316,25 +330,30 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
@Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject mesSlittingMachineSendMaterial(JSONObject param) {
|
||||
log.info("分切机下料的输入参数为:{}", param);
|
||||
JSONObject res = new JSONObject();
|
||||
// todo: 获取子卷号数组
|
||||
JSONArray containers = param.getJSONArray("container");
|
||||
List<String> containerList = containers.toJavaList(String.class);
|
||||
if (containerList.size() == 0) {
|
||||
log.error("子卷参数不能为空!");
|
||||
throw new BadRequestException("子卷参数不能为空!");
|
||||
}
|
||||
// 获取分切计划,最多4个需要出站的任务
|
||||
List<PdmBiSlittingproductionplan> currentPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||
List<PdmBiSlittingproductionplan> currentPlans = slittingproductionplanService.list(
|
||||
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||
.in(PdmBiSlittingproductionplan::getContainer_name, containerList)
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO)
|
||||
.eq(PdmBiSlittingproductionplan::getStatus, "05"));
|
||||
if (currentPlans.size() == 0) {
|
||||
log.error("当前子卷已经出卷或者不存在!");
|
||||
throw new BadRequestException("当前子卷已经出卷或者不存在!");
|
||||
}
|
||||
// 获取上轴分切计划和下轴分切计划,各一条
|
||||
PdmBiSlittingproductionplan currentUpPlan = currentPlans.stream().filter(p -> "1".equals(p.getUp_or_down())).findFirst().orElse(null);
|
||||
PdmBiSlittingproductionplan currentDownPlan = currentPlans.stream().filter(p -> "2".equals(p.getUp_or_down())).findFirst().orElse(null);
|
||||
|
||||
PdmBiSlittingproductionplan currentUpPlan = currentPlans.stream()
|
||||
.filter(p -> "1".equals(p.getUp_or_down())).findFirst().orElse(null);
|
||||
PdmBiSlittingproductionplan currentDownPlan = currentPlans.stream()
|
||||
.filter(p -> "2".equals(p.getUp_or_down())).findFirst().orElse(null);
|
||||
// 获取其中一条分切计划
|
||||
PdmBiSlittingproductionplan demoPlan = currentPlans.get(0);
|
||||
// 获得设备
|
||||
@@ -343,11 +362,13 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
String area = demoPlan.getContainer_name().substring(0, 2);
|
||||
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
||||
// hint: 获取到的分切可能是不同组的但具有一定时间顺序
|
||||
List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||
List<PdmBiSlittingproductionplan> timePlans = slittingproductionplanService.list(
|
||||
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||
.eq(PdmBiSlittingproductionplan::getResource_name, device.getExt_code())
|
||||
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
||||
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
||||
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
|
||||
log.info("获取下一组分切计划:{}", timePlans);
|
||||
// 任务参数
|
||||
JSONObject taskParam = new JSONObject();
|
||||
if (timePlans.size() == 0) {
|
||||
@@ -355,6 +376,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
// 获取分切对接位没任务的空位置
|
||||
List<BstIvtCutpointivt> emptyPoints = slitterMapper.getEmptyCutPointNotTask(area, device.getSort_seq());
|
||||
if (emptyPoints.size() == 0) {
|
||||
log.error("分切机【" + device.getExt_code() + "】找不到对应的对接位!");
|
||||
throw new BadRequestException("分切机【" + device.getExt_code() + "】找不到对应的对接位!");
|
||||
}
|
||||
// 枷锁
|
||||
@@ -496,6 +518,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
|
||||
@Override
|
||||
public JSONObject mesGetWeighingOfWasteFoil(JSONObject param) {
|
||||
log.info("分切子卷获取LMS,AGV废箔称重重量的输入参数为:{}", param);
|
||||
JSONObject res = new JSONObject();
|
||||
JSONObject resData = new JSONObject();
|
||||
String resourceName = param.getString("ResourceName");
|
||||
@@ -544,6 +567,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
|
||||
@Override
|
||||
public JSONObject mesGetFinishWeighingOfWasteFoil(JSONObject param) {
|
||||
log.info("分切子卷获取LMS,AGV废箔称重重量MES提交废箔成功的输入参数为:{}", param);
|
||||
JSONObject res = new JSONObject();
|
||||
String resourceName = param.getString("ResourceName");
|
||||
// 获取称的设备号
|
||||
@@ -570,6 +594,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
|
||||
@Override
|
||||
public JSONObject acsSendSubVolume(JSONObject param) {
|
||||
log.info("套管工位请求判断去成品还是废箔的输入参数为:{}", param);
|
||||
JSONObject res = new JSONObject();
|
||||
String deviceCode = param.getString("device_code");
|
||||
BstIvtShafttubeivt device = shafttubeivtService.getByPointCode(deviceCode, false);
|
||||
@@ -625,6 +650,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
|
||||
@Override
|
||||
public JSONObject downRolls(JSONObject param) {
|
||||
log.info("下卷的输入参数为:{}", param);
|
||||
// param: device_code
|
||||
String device_code = param.getString("device_code");
|
||||
StIvtCutpointivt deviceCode = cutpointivtService.getPintByExtCode(device_code, false);
|
||||
@@ -642,4 +668,24 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
result.put("message", "分切机" + device_code + "下卷成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject acsToReduceTube(JSONObject param) {
|
||||
log.info("扣除纸管数据的输入参数为:{}", param);
|
||||
// param: device_code row_num
|
||||
if (ObjectUtil.isEmpty(param.getString("row_num"))) {
|
||||
log.error("设备:{},排数不能为空", param.getString("device_code"));
|
||||
throw new BadRequestException("设备:" + param.getString("device_code") + "排数不能为空");
|
||||
}
|
||||
BstIvtStockingivt device = stockingivtService.getPointByCode(param.getString("device_code"), false);
|
||||
UpdateWrapper<MdPbPapervehicle> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("vehicle_code", device.getVehicle_code())
|
||||
.eq("row_num", param.getString("row_num"))
|
||||
.setSql("qty=qty-1");
|
||||
papervehicleService.update(updateWrapper);
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("code", HttpStatus.HTTP_OK);
|
||||
res.put("message", "请求成功!");
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user