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){
|
public ResponseEntity<Object> create6(@RequestBody JSONObject entity){
|
||||||
return new ResponseEntity<>(slitterService.mesGetFinishWeighingOfWasteFoil(entity), HttpStatus.CREATED);
|
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
|
* @param param
|
||||||
*/
|
*/
|
||||||
JSONObject downRolls(JSONObject 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.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.b_lms.bst.ivt.cutpointivt.service.IBstIvtCutpointivtService;
|
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.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.IBstIvtScaleboundService;
|
||||||
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.BstIvtScalebound;
|
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.IBstIvtScalehistoryService;
|
||||||
import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
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.IBstIvtShafttubeivtService;
|
||||||
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt;
|
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.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.sch.point.dao.StIvtCutpointivt;
|
import org.nl.b_lms.sch.point.dao.StIvtCutpointivt;
|
||||||
@@ -86,9 +92,14 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
private IBstIvtScalehistoryService scaleHistoryService;
|
private IBstIvtScalehistoryService scaleHistoryService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private WmsToAcsService wmsToAcsService;
|
private WmsToAcsService wmsToAcsService;
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtStockingivtService stockingivtService;
|
||||||
|
@Autowired
|
||||||
|
private IMdPbPapervehicleService papervehicleService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject acsRequestShaftLoadTube(JSONObject param) {
|
public JSONObject acsRequestShaftLoadTube(JSONObject param) {
|
||||||
|
log.info("acs申请套轴的输入参数为:{}", param);
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
JSONObject con = new JSONObject();
|
JSONObject con = new JSONObject();
|
||||||
String deviceCode = param.getString("device_code");
|
String deviceCode = param.getString("device_code");
|
||||||
@@ -127,6 +138,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
@Override
|
@Override
|
||||||
public JSONObject acsFinishShaftPluckTube(JSONObject param) {
|
public JSONObject acsFinishShaftPluckTube(JSONObject param) {
|
||||||
|
log.info("acs申请拔轴完毕的输入参数为:{}", param);
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
String deviceCode = param.getString("device_code");
|
String deviceCode = param.getString("device_code");
|
||||||
BstIvtShafttubeivt CBJ = shafttubeivtService.getByPointCode(deviceCode, false);
|
BstIvtShafttubeivt CBJ = shafttubeivtService.getByPointCode(deviceCode, false);
|
||||||
@@ -145,6 +157,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
@Override
|
@Override
|
||||||
public JSONObject acsRequestShaftPluckTube(JSONObject param) {
|
public JSONObject acsRequestShaftPluckTube(JSONObject param) {
|
||||||
|
log.info("acs申请拔轴的输入参数为:{}", param);
|
||||||
// 反馈拔轴机构上的纸管信息
|
// 反馈拔轴机构上的纸管信息
|
||||||
// 参数:设备号,type,插拔轴位,qzzSize
|
// 参数:设备号,type,插拔轴位,qzzSize
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
@@ -279,6 +292,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
@Override
|
@Override
|
||||||
public JSONObject acsSendShaftToCache(JSONObject param) {
|
public JSONObject acsSendShaftToCache(JSONObject param) {
|
||||||
|
log.info("ACS申请送气涨轴到气涨轴暂存位的输入参数为:{}", param);
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
String deviceCode = param.getString("device_code");
|
String deviceCode = param.getString("device_code");
|
||||||
String qzzSize = param.getString("size");
|
String qzzSize = param.getString("size");
|
||||||
@@ -316,25 +330,30 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
@Override
|
@Override
|
||||||
// @Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject mesSlittingMachineSendMaterial(JSONObject param) {
|
public JSONObject mesSlittingMachineSendMaterial(JSONObject param) {
|
||||||
|
log.info("分切机下料的输入参数为:{}", param);
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
// todo: 获取子卷号数组
|
// todo: 获取子卷号数组
|
||||||
JSONArray containers = param.getJSONArray("container");
|
JSONArray containers = param.getJSONArray("container");
|
||||||
List<String> containerList = containers.toJavaList(String.class);
|
List<String> containerList = containers.toJavaList(String.class);
|
||||||
if (containerList.size() == 0) {
|
if (containerList.size() == 0) {
|
||||||
|
log.error("子卷参数不能为空!");
|
||||||
throw new BadRequestException("子卷参数不能为空!");
|
throw new BadRequestException("子卷参数不能为空!");
|
||||||
}
|
}
|
||||||
// 获取分切计划,最多4个需要出站的任务
|
// 获取分切计划,最多4个需要出站的任务
|
||||||
List<PdmBiSlittingproductionplan> currentPlans = slittingproductionplanService.list(new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
List<PdmBiSlittingproductionplan> currentPlans = slittingproductionplanService.list(
|
||||||
|
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.in(PdmBiSlittingproductionplan::getContainer_name, containerList)
|
.in(PdmBiSlittingproductionplan::getContainer_name, containerList)
|
||||||
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO)
|
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO)
|
||||||
.eq(PdmBiSlittingproductionplan::getStatus, "05"));
|
.eq(PdmBiSlittingproductionplan::getStatus, "05"));
|
||||||
if (currentPlans.size() == 0) {
|
if (currentPlans.size() == 0) {
|
||||||
|
log.error("当前子卷已经出卷或者不存在!");
|
||||||
throw new BadRequestException("当前子卷已经出卷或者不存在!");
|
throw new BadRequestException("当前子卷已经出卷或者不存在!");
|
||||||
}
|
}
|
||||||
// 获取上轴分切计划和下轴分切计划,各一条
|
// 获取上轴分切计划和下轴分切计划,各一条
|
||||||
PdmBiSlittingproductionplan currentUpPlan = currentPlans.stream().filter(p -> "1".equals(p.getUp_or_down())).findFirst().orElse(null);
|
PdmBiSlittingproductionplan currentUpPlan = currentPlans.stream()
|
||||||
PdmBiSlittingproductionplan currentDownPlan = currentPlans.stream().filter(p -> "2".equals(p.getUp_or_down())).findFirst().orElse(null);
|
.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);
|
PdmBiSlittingproductionplan demoPlan = currentPlans.get(0);
|
||||||
// 获得设备
|
// 获得设备
|
||||||
@@ -343,11 +362,13 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
String area = demoPlan.getContainer_name().substring(0, 2);
|
String area = demoPlan.getContainer_name().substring(0, 2);
|
||||||
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
// 获取当前分切机的下一组分切计划(最多四条分切计划)
|
||||||
// hint: 获取到的分切可能是不同组的但具有一定时间顺序
|
// 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::getResource_name, device.getExt_code())
|
||||||
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
||||||
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
||||||
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
|
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
|
||||||
|
log.info("获取下一组分切计划:{}", timePlans);
|
||||||
// 任务参数
|
// 任务参数
|
||||||
JSONObject taskParam = new JSONObject();
|
JSONObject taskParam = new JSONObject();
|
||||||
if (timePlans.size() == 0) {
|
if (timePlans.size() == 0) {
|
||||||
@@ -355,6 +376,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
// 获取分切对接位没任务的空位置
|
// 获取分切对接位没任务的空位置
|
||||||
List<BstIvtCutpointivt> emptyPoints = slitterMapper.getEmptyCutPointNotTask(area, device.getSort_seq());
|
List<BstIvtCutpointivt> emptyPoints = slitterMapper.getEmptyCutPointNotTask(area, device.getSort_seq());
|
||||||
if (emptyPoints.size() == 0) {
|
if (emptyPoints.size() == 0) {
|
||||||
|
log.error("分切机【" + device.getExt_code() + "】找不到对应的对接位!");
|
||||||
throw new BadRequestException("分切机【" + device.getExt_code() + "】找不到对应的对接位!");
|
throw new BadRequestException("分切机【" + device.getExt_code() + "】找不到对应的对接位!");
|
||||||
}
|
}
|
||||||
// 枷锁
|
// 枷锁
|
||||||
@@ -496,6 +518,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject mesGetWeighingOfWasteFoil(JSONObject param) {
|
public JSONObject mesGetWeighingOfWasteFoil(JSONObject param) {
|
||||||
|
log.info("分切子卷获取LMS,AGV废箔称重重量的输入参数为:{}", param);
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
JSONObject resData = new JSONObject();
|
JSONObject resData = new JSONObject();
|
||||||
String resourceName = param.getString("ResourceName");
|
String resourceName = param.getString("ResourceName");
|
||||||
@@ -544,6 +567,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject mesGetFinishWeighingOfWasteFoil(JSONObject param) {
|
public JSONObject mesGetFinishWeighingOfWasteFoil(JSONObject param) {
|
||||||
|
log.info("分切子卷获取LMS,AGV废箔称重重量MES提交废箔成功的输入参数为:{}", param);
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
String resourceName = param.getString("ResourceName");
|
String resourceName = param.getString("ResourceName");
|
||||||
// 获取称的设备号
|
// 获取称的设备号
|
||||||
@@ -570,6 +594,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject acsSendSubVolume(JSONObject param) {
|
public JSONObject acsSendSubVolume(JSONObject param) {
|
||||||
|
log.info("套管工位请求判断去成品还是废箔的输入参数为:{}", param);
|
||||||
JSONObject res = new JSONObject();
|
JSONObject res = new JSONObject();
|
||||||
String deviceCode = param.getString("device_code");
|
String deviceCode = param.getString("device_code");
|
||||||
BstIvtShafttubeivt device = shafttubeivtService.getByPointCode(deviceCode, false);
|
BstIvtShafttubeivt device = shafttubeivtService.getByPointCode(deviceCode, false);
|
||||||
@@ -625,6 +650,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject downRolls(JSONObject param) {
|
public JSONObject downRolls(JSONObject param) {
|
||||||
|
log.info("下卷的输入参数为:{}", param);
|
||||||
// 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);
|
||||||
@@ -642,4 +668,24 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
result.put("message", "分切机" + device_code + "下卷成功!");
|
result.put("message", "分切机" + device_code + "下卷成功!");
|
||||||
return result;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
120
lms/nladmin-ui/src/views/b_lms/bst/ivt/papervehicle/index.vue
Normal file
120
lms/nladmin-ui/src/views/b_lms/bst/ivt/papervehicle/index.vue
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
|
<el-form-item label="载具标识">
|
||||||
|
<el-input v-model="form.ivt_id" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="托盘号">
|
||||||
|
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排">
|
||||||
|
<el-input v-model="form.row_num" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料号">
|
||||||
|
<el-input v-model="form.material_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称">
|
||||||
|
<el-input v-model="form.material_name" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量">
|
||||||
|
<el-input v-model="form.qty" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="修改时间">
|
||||||
|
<el-input v-model="form.update_optid" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="修改人">
|
||||||
|
<el-input v-model="form.update_optname" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="修改人姓名">
|
||||||
|
<el-input v-model="form.update_time" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="ivt_id" label="载具标识" :min-width="flexWidth('ivt_id',crud.data,'载具标识')"/>
|
||||||
|
<el-table-column prop="vehicle_code" label="托盘号" :min-width="flexWidth('vehicle_code',crud.data,'托盘号')"/>
|
||||||
|
<el-table-column prop="row_num" label="排" :min-width="flexWidth('row_num',crud.data,'排')"/>
|
||||||
|
<el-table-column prop="material_code" label="物料号" :min-width="flexWidth('material_code',crud.data,'物料号')"/>
|
||||||
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')"/>
|
||||||
|
<el-table-column prop="qty" label="数量" :min-width="flexWidth('qty',crud.data,'数量')"/>
|
||||||
|
<el-table-column prop="update_optid" label="修改时间" :min-width="flexWidth('update_optid',crud.data,'修改时间')"/>
|
||||||
|
<el-table-column prop="update_optname" label="修改人" :min-width="flexWidth('update_optname',crud.data,'修改人')"/>
|
||||||
|
<el-table-column prop="update_time" label="修改人姓名" :min-width="flexWidth('update_time',crud.data,'修改人姓名')"/>
|
||||||
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudMdPbPapervehicle from './mdPbPapervehicle'
|
||||||
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
|
const defaultForm = {
|
||||||
|
ivt_id: null,
|
||||||
|
vehicle_code: null,
|
||||||
|
row_num: null,
|
||||||
|
material_code: null,
|
||||||
|
material_name: null,
|
||||||
|
qty: null,
|
||||||
|
update_optid: null,
|
||||||
|
update_optname: null,
|
||||||
|
update_time: null
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'MdPbPapervehicle',
|
||||||
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '管芯托盘库存',
|
||||||
|
url: 'api/mdPbPapervehicle',
|
||||||
|
idField: 'ivt_id',
|
||||||
|
sort: 'ivt_id,desc',
|
||||||
|
crudMethod: { ...crudMdPbPapervehicle }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
permission: {
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
} }
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/mdPbPapervehicle',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/mdPbPapervehicle/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/mdPbPapervehicle',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del }
|
||||||
Reference in New Issue
Block a user