Merge branch 'b_lms' of http://121.40.234.130:8899/root/lanzhouhailiang_one into b_lms
# Conflicts: # lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/slitter/service/SlitterService.java # lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/slitter/service/impl/SlitterServiceImpl.java
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import org.nl.common.domain.query.PageQuery;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@@ -40,4 +41,38 @@ public interface IBstIvtStockingivtService extends IService<BstIvtStockingivt> {
|
|||||||
* @param ids /
|
* @param ids /
|
||||||
*/
|
*/
|
||||||
void deleteAll(Set<String> ids);
|
void deleteAll(Set<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取备货区中指定条件的货位
|
||||||
|
* @param pointType 类型:0暂存位置,1靠近分切机
|
||||||
|
* @param tube 纸管号 两个都是一样的,因此拿一个就行
|
||||||
|
* @param location 位置:0上区域,1下区域
|
||||||
|
* @param qty 数量
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<BstIvtStockingivt> getPaperTubePoint(String pointType, String tube, String location, int qty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取备货区空位,没有任务的位置
|
||||||
|
* @param location 位置:0上区域,1下区域
|
||||||
|
* @param pointType 类型:0暂存位置,1靠近分切机
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<BstIvtStockingivt> getEmptyPointNotTask(String location, String pointType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据点位编码获取备货区点位
|
||||||
|
* @param pointCode 编码
|
||||||
|
* @param flag 是否校验可用
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
BstIvtStockingivt getPointByCode(String pointCode, boolean flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取一个可以搬走的位置
|
||||||
|
* @param location 位置:0上区域,1下区域
|
||||||
|
* @param pointType 类型:0暂存位置,1靠近分切机
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
BstIvtStockingivt getCanMovePointOne(String location, String pointType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.b_lms.bst.ivt.stockingivt.service.dao;
|
package org.nl.b_lms.bst.ivt.stockingivt.service.dao;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
@@ -76,5 +77,7 @@ public class BstIvtStockingivt implements Serializable {
|
|||||||
|
|
||||||
/** 规划 */
|
/** 规划 */
|
||||||
private String plan;
|
private String plan;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer qty;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,30 @@ package org.nl.b_lms.bst.ivt.stockingivt.service.dao.mapper;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lyd
|
* @author lyd
|
||||||
* @date 2024-02-26
|
* @date 2024-02-26
|
||||||
**/
|
**/
|
||||||
public interface BstIvtStockingivtMapper extends BaseMapper<BstIvtStockingivt> {
|
public interface BstIvtStockingivtMapper extends BaseMapper<BstIvtStockingivt> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取备货区中指定条件的货位
|
||||||
|
* @param pointType 类型:0暂存位置,1靠近分切机
|
||||||
|
* @param tube 纸管号 两个都是一样的,因此拿一个就行
|
||||||
|
* @param location 位置:0上区域,1下区域
|
||||||
|
* @param qty 数量
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<BstIvtStockingivt> getPaperTubePoint(String pointType, String tube, String location, int qty);
|
||||||
|
/**
|
||||||
|
* 获取备货区空位,没有任务的位置
|
||||||
|
* @param location 位置:0上区域,1下区域
|
||||||
|
* @param pointType 类型:0暂存位置,1靠近分切机
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
List<BstIvtStockingivt> getEmptyPointNotTask(String location, String pointType);
|
||||||
|
|
||||||
|
BstIvtStockingivt getCanMovePointOne(String location, String pointType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,4 +2,49 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!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.stockingivt.service.dao.mapper.BstIvtStockingivtMapper">
|
<mapper namespace="org.nl.b_lms.bst.ivt.stockingivt.service.dao.mapper.BstIvtStockingivtMapper">
|
||||||
|
|
||||||
|
<select id="getPaperTubePoint" resultType="org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt">
|
||||||
|
SELECT bs.*,
|
||||||
|
mp.qty
|
||||||
|
FROM `bst_ivt_stockingivt` bs
|
||||||
|
LEFT JOIN md_pb_papervehicle mp ON mp.vehicle_code = bs.vehicle_code
|
||||||
|
WHERE bs.point_location = #{location}
|
||||||
|
AND bs.point_type = #{pointType}
|
||||||
|
AND bs.ivt_status = '1'
|
||||||
|
AND bs.is_used = '1'
|
||||||
|
AND mp.material_code = #{tube}
|
||||||
|
AND mp.qty <![CDATA[ >= ]]> #{qty}
|
||||||
|
AND 0 = (SELECT COUNT(*)
|
||||||
|
FROM sch_base_task t
|
||||||
|
WHERE (t.point_code1 = bs.point_code OR t.point_code2 = bs.point_code OR
|
||||||
|
t.point_code3 = bs.point_code)
|
||||||
|
AND t.task_status <![CDATA[ < ]]> '07')
|
||||||
|
</select>
|
||||||
|
<select id="getEmptyPointNotTask"
|
||||||
|
resultType="org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt">
|
||||||
|
SELECT bs.*
|
||||||
|
FROM `bst_ivt_stockingivt` bs
|
||||||
|
WHERE bs.point_type = #{pointType}
|
||||||
|
AND bs.point_location = #{location}
|
||||||
|
AND bs.is_used = '1'
|
||||||
|
AND bs.ivt_status = '0'
|
||||||
|
AND 0 = (SELECT COUNT(*)
|
||||||
|
FROM sch_base_task t
|
||||||
|
WHERE (t.point_code1 = bs.point_code OR t.point_code2 = bs.point_code OR
|
||||||
|
t.point_code3 = bs.point_code)
|
||||||
|
AND t.task_status <![CDATA[ < ]]> '07')
|
||||||
|
</select>
|
||||||
|
<select id="getCanMovePointOne"
|
||||||
|
resultType="org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt">
|
||||||
|
SELECT bs.*
|
||||||
|
FROM `bst_ivt_stockingivt` bs
|
||||||
|
LEFT JOIN md_pb_papervehicle mp ON mp.vehicle_code = bs.vehicle_code
|
||||||
|
WHERE bs.point_type = #{pointType}
|
||||||
|
AND bs.point_location = #{location}
|
||||||
|
AND 0 = (SELECT COUNT(*)
|
||||||
|
FROM sch_base_task t
|
||||||
|
WHERE (t.point_code1 = bs.point_code OR t.point_code2 = bs.point_code OR
|
||||||
|
t.point_code3 = bs.point_code)
|
||||||
|
AND t.task_status <![CDATA[ < ]]> '07')
|
||||||
|
ORDER BY bs.ivt_status, mp.qty LIMIT 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterConstant;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
@@ -17,6 +18,7 @@ import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@@ -77,4 +79,27 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
|
|||||||
bstIvtStockingivtMapper.deleteBatchIds(ids);
|
bstIvtStockingivtMapper.deleteBatchIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BstIvtStockingivt> getPaperTubePoint(String pointType, String tube, String location, int qty) {
|
||||||
|
return bstIvtStockingivtMapper.getPaperTubePoint(pointType, tube, location, qty);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BstIvtStockingivt> getEmptyPointNotTask(String location, String pointType) {
|
||||||
|
return bstIvtStockingivtMapper.getEmptyPointNotTask(location, pointType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BstIvtStockingivt getPointByCode(String pointCode, boolean flag) {
|
||||||
|
LambdaQueryWrapper<BstIvtStockingivt> lam = new LambdaQueryWrapper<>();
|
||||||
|
lam.eq(BstIvtStockingivt::getPoint_code, pointCode)
|
||||||
|
.eq(flag, BstIvtStockingivt::getIs_used, SlitterConstant.SLITTER_YES);
|
||||||
|
return bstIvtStockingivtMapper.selectOne(lam);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BstIvtStockingivt getCanMovePointOne(String location, String pointType) {
|
||||||
|
return bstIvtStockingivtMapper.getCanMovePointOne(location, pointType);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
package org.nl.b_lms.sch.tasks.slitter;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
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.sch.task.dao.SchBaseTask;
|
||||||
|
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.common.utils.TaskUtils;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.wms.sch.AcsTaskDto;
|
||||||
|
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||||
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: lyd
|
||||||
|
* @Description: 备货区送纸管到机械手旁边的备货区 - AGV任务
|
||||||
|
* @Date: 2024/6/4
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class StockAreaCallTubeTask extends AbstractAcsTask {
|
||||||
|
private final String THIS_CLASS = StockAreaCallTubeTask.class.getName();
|
||||||
|
@Autowired
|
||||||
|
private IschBaseTaskService taskService;
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtStockingivtService stockingivtService;
|
||||||
|
@Override
|
||||||
|
public List<AcsTaskDto> addTask() {
|
||||||
|
/*
|
||||||
|
* 下发给ACS时需要特殊处理
|
||||||
|
*/
|
||||||
|
List<SchBaseTask> taskList = taskService.getIssueTasks(THIS_CLASS);
|
||||||
|
|
||||||
|
ArrayList<AcsTaskDto> resultList = new ArrayList<>();
|
||||||
|
String agv_system_type = "2";
|
||||||
|
for (SchBaseTask task : taskList) {
|
||||||
|
AcsTaskDto dto = AcsTaskDto.builder()
|
||||||
|
.ext_task_id(task.getTask_id())
|
||||||
|
.task_code(task.getTask_code())
|
||||||
|
.task_type(task.getAcs_task_type())
|
||||||
|
.start_device_code(task.getPoint_code1())
|
||||||
|
.next_device_code(task.getPoint_code2())
|
||||||
|
.start_device_code2(task.getPoint_code3())
|
||||||
|
.next_device_code2(task.getPoint_code4())
|
||||||
|
.vehicle_code(task.getVehicle_code())
|
||||||
|
.agv_system_type(agv_system_type)
|
||||||
|
.priority(task.getPriority())
|
||||||
|
.remark(task.getRemark())
|
||||||
|
.product_area(task.getProduct_area())
|
||||||
|
.build();
|
||||||
|
resultList.add(dto);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void updateTaskStatus(JSONObject taskObj, String status) {
|
||||||
|
SchBaseTask task = taskService.getById(taskObj.getString("task_id"));
|
||||||
|
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
||||||
|
// 更新任务状态为执行中
|
||||||
|
task.setTask_status(TaskStatusEnum.EXECUTING.getCode());
|
||||||
|
}
|
||||||
|
if (StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
||||||
|
task.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||||
|
String startPoint = task.getPoint_code1();
|
||||||
|
String endPoint = task.getPoint_code2();
|
||||||
|
BstIvtStockingivt startPointObj = stockingivtService.getPointByCode(startPoint, false);
|
||||||
|
BstIvtStockingivt endPointObj = stockingivtService.getPointByCode(endPoint, false);
|
||||||
|
// 互换资源 (交换载具号)
|
||||||
|
endPointObj.setIvt_status("1");
|
||||||
|
endPointObj.setVehicle_code(task.getVehicle_code());
|
||||||
|
TaskUtils.updateOptMessageByBStockingPoint(endPointObj);
|
||||||
|
stockingivtService.update(endPointObj);
|
||||||
|
startPointObj.setVehicle_code("");
|
||||||
|
startPointObj.setIvt_status("0");
|
||||||
|
TaskUtils.updateOptMessageByBStockingPoint(startPointObj);
|
||||||
|
stockingivtService.update(startPointObj);
|
||||||
|
}
|
||||||
|
// 取消
|
||||||
|
if (status.equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||||
|
task.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||||
|
}
|
||||||
|
task.setUpdate_time(DateUtil.now());
|
||||||
|
taskService.updateById(task);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String createTask(JSONObject form) {
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
SchBaseTask task = new SchBaseTask();
|
||||||
|
task.setTask_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
task.setTask_code(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
||||||
|
task.setPoint_code1(form.getString("point_code1"));
|
||||||
|
task.setPoint_code2(form.getString("point_code2"));
|
||||||
|
task.setVehicle_code(form.getString("vehicle_code"));
|
||||||
|
task.setAcs_task_type("3");
|
||||||
|
task.setIs_delete("0");
|
||||||
|
task.setRequest_param(form.toJSONString());
|
||||||
|
task.setTask_type(form.getString("task_type"));
|
||||||
|
task.setProduct_area(form.getString("product_area"));
|
||||||
|
task.setCreate_id(currentUserId);
|
||||||
|
task.setCreate_name(currentUsername);
|
||||||
|
task.setCreate_time(DateUtil.now());
|
||||||
|
task.setHandle_class(THIS_CLASS);
|
||||||
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag", "3").addParam("task_type", task.getTask_type()).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)) {
|
||||||
|
task.setPriority("1");
|
||||||
|
} else {
|
||||||
|
task.setPriority(priority_jo.getString("value"));
|
||||||
|
}
|
||||||
|
taskService.save(task);
|
||||||
|
this.immediateNotifyAcs(null);
|
||||||
|
return task.getTask_id();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void forceFinish(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, TaskStatusEnum.FINISHED.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
package org.nl.b_lms.sch.tasks.slitter;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
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.sch.task.dao.SchBaseTask;
|
||||||
|
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||||
|
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterConstant;
|
||||||
|
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterEnum;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.common.utils.TaskUtils;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.wms.sch.AcsTaskDto;
|
||||||
|
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||||
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: lyd
|
||||||
|
* @Description: 备货区(靠近机械手)送走托盘到暂存位置的备货区 - AGV任务
|
||||||
|
* @Date: 2024/6/4
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class StockAreaSendVehicleTask extends AbstractAcsTask {
|
||||||
|
private final String THIS_CLASS = StockAreaSendVehicleTask.class.getName();
|
||||||
|
@Autowired
|
||||||
|
private IschBaseTaskService taskService;
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtStockingivtService stockingivtService;
|
||||||
|
@Autowired
|
||||||
|
private StockAreaCallTubeTask stockAreaCallTubeTask;
|
||||||
|
@Override
|
||||||
|
public List<AcsTaskDto> addTask() {
|
||||||
|
/*
|
||||||
|
* 下发给ACS时需要特殊处理
|
||||||
|
*/
|
||||||
|
List<SchBaseTask> taskList = taskService.getIssueTasks(THIS_CLASS);
|
||||||
|
|
||||||
|
ArrayList<AcsTaskDto> resultList = new ArrayList<>();
|
||||||
|
String agv_system_type = "2";
|
||||||
|
for (SchBaseTask task : taskList) {
|
||||||
|
AcsTaskDto dto = AcsTaskDto.builder()
|
||||||
|
.ext_task_id(task.getTask_id())
|
||||||
|
.task_code(task.getTask_code())
|
||||||
|
.task_type(task.getAcs_task_type())
|
||||||
|
.start_device_code(task.getPoint_code1())
|
||||||
|
.next_device_code(task.getPoint_code2())
|
||||||
|
.start_device_code2("")
|
||||||
|
.next_device_code2(task.getPoint_code4())
|
||||||
|
.vehicle_code(task.getVehicle_code())
|
||||||
|
.agv_system_type(agv_system_type)
|
||||||
|
.priority(task.getPriority())
|
||||||
|
.remark(task.getRemark())
|
||||||
|
.product_area(task.getProduct_area())
|
||||||
|
.build();
|
||||||
|
resultList.add(dto);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void updateTaskStatus(JSONObject taskObj, String status) {
|
||||||
|
SchBaseTask task = taskService.getById(taskObj.getString("task_id"));
|
||||||
|
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
||||||
|
// 更新任务状态为执行中
|
||||||
|
task.setTask_status(TaskStatusEnum.EXECUTING.getCode());
|
||||||
|
}
|
||||||
|
if (StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
||||||
|
task.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||||
|
String startPoint = task.getPoint_code1();
|
||||||
|
String endPoint = task.getPoint_code2();
|
||||||
|
BstIvtStockingivt startPointObj = stockingivtService.getPointByCode(startPoint, false);
|
||||||
|
BstIvtStockingivt endPointObj = stockingivtService.getPointByCode(endPoint, false);
|
||||||
|
// 互换资源 (交换载具号)
|
||||||
|
endPointObj.setIvt_status("1");
|
||||||
|
endPointObj.setVehicle_code(task.getVehicle_code());
|
||||||
|
TaskUtils.updateOptMessageByBStockingPoint(endPointObj);
|
||||||
|
stockingivtService.update(endPointObj);
|
||||||
|
startPointObj.setVehicle_code("");
|
||||||
|
startPointObj.setIvt_status("0");
|
||||||
|
TaskUtils.updateOptMessageByBStockingPoint(startPointObj);
|
||||||
|
stockingivtService.update(startPointObj);
|
||||||
|
// 创建搬运任务, 将所需要的纸管对应的托盘换过来。
|
||||||
|
String requestParam = task.getRequest_param();
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(requestParam);
|
||||||
|
if (ObjectUtil.isEmpty(requestParam)) {
|
||||||
|
throw new BadRequestException("任务 code = " + task.getTask_code() + " 参数错误");
|
||||||
|
}
|
||||||
|
JSONObject callPoint = jsonObject.getJSONObject("call_point");
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("point_code1", callPoint.getString("point_code"));
|
||||||
|
param.put("point_code2", startPoint);
|
||||||
|
param.put("vehicle_code", callPoint.getString("vehicle_code"));
|
||||||
|
param.put("task_type", SlitterEnum.TASK_TYPE.code("备货区送纸管"));
|
||||||
|
param.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||||
|
stockAreaCallTubeTask.createTask(param);
|
||||||
|
}
|
||||||
|
// 取消
|
||||||
|
if (status.equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||||
|
task.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||||
|
}
|
||||||
|
task.setUpdate_time(DateUtil.now());
|
||||||
|
taskService.updateById(task);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String createTask(JSONObject form) {
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
JSONObject callPoint = form.getJSONObject("call_point");
|
||||||
|
SchBaseTask task = new SchBaseTask();
|
||||||
|
task.setTask_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
task.setTask_code(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
task.setTask_status(TaskStatusEnum.START_AND_POINT.getCode());
|
||||||
|
task.setPoint_code1(form.getString("point_code1"));
|
||||||
|
task.setPoint_code2(form.getString("point_code2"));
|
||||||
|
task.setPoint_code3(callPoint.getString("point_code"));
|
||||||
|
task.setVehicle_code(form.getString("vehicle_code"));
|
||||||
|
task.setAcs_task_type("3");
|
||||||
|
task.setIs_delete("0");
|
||||||
|
task.setRemark("point3只是记录点,不会下到ACS");
|
||||||
|
task.setRequest_param(form.toJSONString());
|
||||||
|
task.setTask_type(form.getString("task_type"));
|
||||||
|
task.setProduct_area(form.getString("product_area"));
|
||||||
|
task.setCreate_id(currentUserId);
|
||||||
|
task.setCreate_name(currentUsername);
|
||||||
|
task.setCreate_time(DateUtil.now());
|
||||||
|
task.setHandle_class(THIS_CLASS);
|
||||||
|
//根据类型获取对应的任务优先级
|
||||||
|
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag", "3").addParam("task_type", task.getTask_type()).process().uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(priority_jo)) {
|
||||||
|
task.setPriority("1");
|
||||||
|
} else {
|
||||||
|
task.setPriority(priority_jo.getString("value"));
|
||||||
|
}
|
||||||
|
taskService.save(task);
|
||||||
|
this.immediateNotifyAcs(null);
|
||||||
|
return task.getTask_id();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void forceFinish(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, TaskStatusEnum.FINISHED.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,23 +10,31 @@ 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.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.tasks.slitter.StockAreaCallTubeTask;
|
||||||
|
import org.nl.b_lms.sch.tasks.slitter.StockAreaSendVehicleTask;
|
||||||
import org.nl.b_lms.sch.tasks.slitter.TrussCallAirShaftTask;
|
import org.nl.b_lms.sch.tasks.slitter.TrussCallAirShaftTask;
|
||||||
import org.nl.b_lms.sch.tasks.slitter.TrussCallShaftCacheTask;
|
import org.nl.b_lms.sch.tasks.slitter.TrussCallShaftCacheTask;
|
||||||
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterConstant;
|
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterConstant;
|
||||||
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterEnum;
|
import org.nl.b_lms.sch.tasks.slitter.constant.SlitterEnum;
|
||||||
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.SlitterPlanDistinctDto;
|
import org.nl.b_lms.sch.tasks.slitter.mapper.dto.SlitterPlanDistinctDto;
|
||||||
import org.nl.b_lms.sch.tasks.slitter.util.SlitterTaskUtil;
|
import org.nl.b_lms.sch.tasks.slitter.util.SlitterTaskUtil;
|
||||||
|
import org.nl.common.enums.NoticeTypeEnum;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.common.utils.TaskUtils;
|
import org.nl.common.utils.TaskUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.system.service.notice.ISysNoticeService;
|
||||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: lyd
|
* @Author: lyd
|
||||||
@@ -51,8 +59,17 @@ public class AutoCallAirShaftTask {
|
|||||||
private WmsToAcsService wmsToAcsService;
|
private WmsToAcsService wmsToAcsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrussCallShaftCacheTask trussCallShaftCacheTask;
|
private TrussCallShaftCacheTask trussCallShaftCacheTask;
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtStockingivtService stockingivtService;
|
||||||
|
@Autowired
|
||||||
|
private ISysNoticeService noticeService;
|
||||||
|
@Autowired
|
||||||
|
private StockAreaSendVehicleTask stockAreaSendVehicleTask;
|
||||||
|
@Autowired
|
||||||
|
private StockAreaCallTubeTask stockAreaCallTubeTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* hint: 目前只是考虑了上区域
|
||||||
* 执行套轴和拔轴任务的逻辑处理。
|
* 执行套轴和拔轴任务的逻辑处理。
|
||||||
* 该方法首先寻找空闲的插拔轴位,然后根据不同的条件(如标箔或锂电)来确定区域。接着,它会检查是否有分切计划需要执行,
|
* 该方法首先寻找空闲的插拔轴位,然后根据不同的条件(如标箔或锂电)来确定区域。接着,它会检查是否有分切计划需要执行,
|
||||||
* 并根据计划来决定是进行套轴还是拔轴操作。如果需要套轴,它会寻找合适的套轴位置,并且在没有合适位置时会触发滚条气涨轴的操作。
|
* 并根据计划来决定是进行套轴还是拔轴操作。如果需要套轴,它会寻找合适的套轴位置,并且在没有合适位置时会触发滚条气涨轴的操作。
|
||||||
@@ -63,7 +80,8 @@ public class AutoCallAirShaftTask {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void run() {
|
public void run() {
|
||||||
// 1、获取空的插拔轴位(无任务)
|
// 1、获取空的插拔轴位(无任务)
|
||||||
List<BstIvtShafttubeivt> emptyPoints = bstIvtShafttubeivtService.getAllShaftPointsByConditions("2","0","0");
|
List<BstIvtShafttubeivt> emptyPoints = bstIvtShafttubeivtService.getAllShaftPointsByConditions("2",
|
||||||
|
"0","0");
|
||||||
emptyPoints.forEach(empty -> {
|
emptyPoints.forEach(empty -> {
|
||||||
// 标箔:1,锂电:2 改:大小:4代5代
|
// 标箔:1,锂电:2 改:大小:4代5代
|
||||||
String specification = empty.getQzz_generation();
|
String specification = empty.getQzz_generation();
|
||||||
@@ -76,7 +94,8 @@ public class AutoCallAirShaftTask {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 查看套轴对接位是否满了
|
// 查看套轴对接位是否满了
|
||||||
List<BstIvtCutpointivt> emptyShaftPoint = bcutpointivtService.getAreaNotTaskPointByStatus("1", "1", location, "0");
|
List<BstIvtCutpointivt> emptyShaftPoint = bcutpointivtService.getAreaNotTaskPointByStatus("1",
|
||||||
|
"1", location, "0");
|
||||||
// 如果满了就只做拔轴
|
// 如果满了就只做拔轴
|
||||||
if (emptyShaftPoint.size() == 0) {
|
if (emptyShaftPoint.size() == 0) {
|
||||||
// 如果不需要套轴,就只做拔轴
|
// 如果不需要套轴,就只做拔轴
|
||||||
@@ -111,6 +130,7 @@ public class AutoCallAirShaftTask {
|
|||||||
toAcsOutShaft(qzzSize, location, empty);
|
toAcsOutShaft(qzzSize, location, empty);
|
||||||
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
||||||
saveCutPlanMessage(empty, needPlans, qzzSize);
|
saveCutPlanMessage(empty, needPlans, qzzSize);
|
||||||
|
toCallAgvMovePaperTube(needPlans, location, empty);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 查找一条没任务的点位
|
// 查找一条没任务的点位
|
||||||
@@ -121,6 +141,7 @@ public class AutoCallAirShaftTask {
|
|||||||
toAcsOutShaft(qzzSize, location, empty);
|
toAcsOutShaft(qzzSize, location, empty);
|
||||||
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
// 保存所需要的分切计划数据到点位上(套轴对接位)更新分切计划
|
||||||
saveCutPlanMessage(empty, needPlans, qzzSize);
|
saveCutPlanMessage(empty, needPlans, qzzSize);
|
||||||
|
toCallAgvMovePaperTube(needPlans, location, empty);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 创建任务
|
// 创建任务
|
||||||
@@ -159,6 +180,7 @@ public class AutoCallAirShaftTask {
|
|||||||
// 拔管数量
|
// 拔管数量
|
||||||
param.put("pullCount", oldPlans.size());
|
param.put("pullCount", oldPlans.size());
|
||||||
trussCallAirShaftTask.createTask(param);
|
trussCallAirShaftTask.createTask(param);
|
||||||
|
toCallAgvMovePaperTube(needPlans, location, empty);
|
||||||
// 将分切计划is_paper_ok 1(纸管已经准备好) -> 2(已经套轴)
|
// 将分切计划is_paper_ok 1(纸管已经准备好) -> 2(已经套轴)
|
||||||
needPlans.forEach(p -> {
|
needPlans.forEach(p -> {
|
||||||
p.setIs_paper_ok("2");
|
p.setIs_paper_ok("2");
|
||||||
@@ -168,6 +190,75 @@ public class AutoCallAirShaftTask {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 呼叫AGV更换纸管
|
||||||
|
* @param needPlans 所需要套轴的分切计划
|
||||||
|
* @param location 位置
|
||||||
|
*/
|
||||||
|
public void toCallAgvMovePaperTube(List<PdmBiSlittingproductionplan> needPlans, String location, BstIvtShafttubeivt empty) {
|
||||||
|
// 最多两根
|
||||||
|
List<String> tubes = needPlans.stream().map(plan -> {
|
||||||
|
if (SlitterConstant.SLITTER_TYPE_PAPER.equals(plan.getPaper_tube_or_FRP())) {
|
||||||
|
return plan.getPaper_tube_material();
|
||||||
|
} else {
|
||||||
|
return plan.getFRP_material();
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
// 判断当前区域location对应的备货区是否含有相同的纸管 校验了不在搬运中
|
||||||
|
// type=1, 关联对象material_code=纸管, qty > 0
|
||||||
|
List<BstIvtStockingivt> useList = stockingivtService.getPaperTubePoint("1", tubes.get(0), location, tubes.size());
|
||||||
|
if (useList.size() > 0) {
|
||||||
|
// 说明三个位置中有包含此纸管的数据。
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 查找type=0的位置中是否存在 校验了不在搬运中
|
||||||
|
List<BstIvtStockingivt> stockingivtList = stockingivtService.getPaperTubePoint("0", tubes.get(0), location, tubes.size());
|
||||||
|
if (stockingivtList.size() == 0) {
|
||||||
|
// 不存在则站内通知
|
||||||
|
noticeService.createNotice("备货区找不到[" + tubes.get(0) + "]的纸管信息",
|
||||||
|
"点位[" + empty.getPoint_name() + "]无法从备货区找到纸管信息",
|
||||||
|
NoticeTypeEnum.EXCEPTION.getCode());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 找一个点位: 目的需要的点位
|
||||||
|
BstIvtStockingivt needPoint = stockingivtList.get(0);
|
||||||
|
// 找到就创建AGV搬运任务
|
||||||
|
// 查找一个没有任务的空位
|
||||||
|
List<BstIvtStockingivt> list = stockingivtService.getEmptyPointNotTask(location, "0");
|
||||||
|
if (list.size() == 0) {
|
||||||
|
noticeService.createNotice("备货区找不到空位置搬运",
|
||||||
|
"点位[" + empty.getPoint_name() + "]无法从备货区找到空位",
|
||||||
|
NoticeTypeEnum.EXCEPTION.getCode());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
BstIvtStockingivt endPoint = list.get(0);
|
||||||
|
// 筛选3个位置中数量最少的搬走
|
||||||
|
BstIvtStockingivt needMovePoint = stockingivtService.getCanMovePointOne(location, "1");
|
||||||
|
// 空位就直接创建搬过来的任务
|
||||||
|
if ("0".equals(needMovePoint.getIvt_status())) {
|
||||||
|
// 直接搬过来即可
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("point_code1", needPoint.getPoint_code());
|
||||||
|
param.put("point_code2", needMovePoint.getPoint_code());
|
||||||
|
param.put("vehicle_code", needPoint.getVehicle_code());
|
||||||
|
param.put("task_type", SlitterEnum.TASK_TYPE.code("备货区送纸管"));
|
||||||
|
param.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||||
|
stockAreaCallTubeTask.createTask(param);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 创建任务 -> HINT: 在此任务完成之后会调用搬回来的任务,因此任务中要记录需要搬运的点位放在任务请求参数中。
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("point_code1", needMovePoint.getPoint_code());
|
||||||
|
param.put("point_code2", endPoint.getPoint_code());
|
||||||
|
param.put("vehicle_code", needMovePoint.getVehicle_code());
|
||||||
|
param.put("material_code", tubes.get(0));
|
||||||
|
param.put("call_point", needPoint);
|
||||||
|
param.put("task_type", SlitterEnum.TASK_TYPE.code("备货区送载具"));
|
||||||
|
param.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||||
|
stockAreaSendVehicleTask.createTask(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取对应的气胀轴库1
|
* 获取对应的气胀轴库1
|
||||||
* @param qzzSize 气涨轴尺寸
|
* @param qzzSize 气涨轴尺寸
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ public enum SlitterEnum {
|
|||||||
* 任务类型
|
* 任务类型
|
||||||
*/
|
*/
|
||||||
TASK_TYPE(MapOf.of("穿拔轴缓存<>穿拔轴位", "010801", "穿拔轴缓存<>分切对接位", "010802", "穿拔轴位<>气胀轴缓存位", "010803"
|
TASK_TYPE(MapOf.of("穿拔轴缓存<>穿拔轴位", "010801", "穿拔轴缓存<>分切对接位", "010802", "穿拔轴位<>气胀轴缓存位", "010803"
|
||||||
, "分切机下料AGV任务", "010804", "分切机上气胀轴", "010805", "分切机下气胀轴", "010806"));
|
, "分切机下料AGV任务", "010804", "分切机上气胀轴", "010805", "分切机下气胀轴", "010806", "备货区送载具", "010807"
|
||||||
|
, "备货区送纸管", "010808"));
|
||||||
private Map<String, String> code;
|
private Map<String, String> code;
|
||||||
|
|
||||||
public String code(String desc) {
|
public String code(String desc) {
|
||||||
|
|||||||
@@ -72,4 +72,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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,4 +98,11 @@ public interface SlitterService {
|
|||||||
JSONObject downRolls(JSONObject param);
|
JSONObject downRolls(JSONObject param);
|
||||||
|
|
||||||
JSONObject moveVehicle(JSONObject param);
|
JSONObject moveVehicle(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;
|
||||||
@@ -87,9 +93,15 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
private IBstIvtScaleboundService scaleboundService;
|
private IBstIvtScaleboundService scaleboundService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private MoveVehicleAgvTask moveVehicleAgvTask;
|
private MoveVehicleAgvTask moveVehicleAgvTask;
|
||||||
|
@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");
|
||||||
@@ -128,6 +140,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);
|
||||||
@@ -146,6 +159,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();
|
||||||
@@ -280,6 +294,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");
|
||||||
@@ -317,25 +332,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(
|
||||||
.in(PdmBiSlittingproductionplan::getContainer_name, containerList)
|
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO)
|
.in(PdmBiSlittingproductionplan::getContainer_name, containerList)
|
||||||
.eq(PdmBiSlittingproductionplan::getStatus, "05"));
|
.eq(PdmBiSlittingproductionplan::getIs_delete, SlitterConstant.SLITTER_NO)
|
||||||
|
.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);
|
||||||
// 获得设备
|
// 获得设备
|
||||||
@@ -344,11 +364,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(
|
||||||
.eq(PdmBiSlittingproductionplan::getResource_name, device.getExt_code())
|
new LambdaQueryWrapper<PdmBiSlittingproductionplan>()
|
||||||
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
.eq(PdmBiSlittingproductionplan::getResource_name, device.getExt_code())
|
||||||
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
.eq(PdmBiSlittingproductionplan::getStatus, "03")
|
||||||
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
|
.eq(PdmBiSlittingproductionplan::getIs_delete, "0")
|
||||||
|
.orderByAsc(PdmBiSlittingproductionplan::getUpdate_time));
|
||||||
|
log.info("获取下一组分切计划:{}", timePlans);
|
||||||
// 任务参数
|
// 任务参数
|
||||||
JSONObject taskParam = new JSONObject();
|
JSONObject taskParam = new JSONObject();
|
||||||
if (timePlans.size() == 0) {
|
if (timePlans.size() == 0) {
|
||||||
@@ -356,6 +378,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() + "】找不到对应的对接位!");
|
||||||
}
|
}
|
||||||
// 枷锁
|
// 枷锁
|
||||||
@@ -497,6 +520,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");
|
||||||
@@ -545,6 +569,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");
|
||||||
// 获取称的设备号
|
// 获取称的设备号
|
||||||
@@ -571,6 +596,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);
|
||||||
@@ -626,6 +652,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);
|
||||||
@@ -671,4 +698,23 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
result.put("message", "任务下发成功!");
|
result.put("message", "任务下发成功!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
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.shafttubeivt.service.dao.BstIvtShafttubeivt;
|
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt;
|
||||||
|
import org.nl.b_lms.bst.ivt.stockingivt.service.dao.BstIvtStockingivt;
|
||||||
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.task.dao.SchBaseTask;
|
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||||
|
|
||||||
@@ -102,4 +103,14 @@ public class TaskUtils {
|
|||||||
point.setUpdate_optname(SecurityUtils.getCurrentUsername());
|
point.setUpdate_optname(SecurityUtils.getCurrentUsername());
|
||||||
point.setUpdate_time(DateUtil.now());
|
point.setUpdate_time(DateUtil.now());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 赋值备货区的修改时间、人等信息
|
||||||
|
* @param point 备货区
|
||||||
|
*/
|
||||||
|
public static void updateOptMessageByBStockingPoint(BstIvtStockingivt point) {
|
||||||
|
point.setUpdate_optid(SecurityUtils.getCurrentUserId());
|
||||||
|
point.setUpdate_optname(SecurityUtils.getCurrentUsername());
|
||||||
|
point.setUpdate_time(DateUtil.now());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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 }
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtStockingivt',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtStockingivt/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtStockingivt',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del }
|
||||||
162
lms/nladmin-ui/src/views/b_lms/bst/ivt/stockingivt/index.vue
Normal file
162
lms/nladmin-ui/src/views/b_lms/bst/ivt/stockingivt/index.vue
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
<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="点位编码" prop="point_code">
|
||||||
|
<el-input v-model="form.point_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位名称">
|
||||||
|
<el-input v-model="form.point_name" 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.product_area" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位类型">
|
||||||
|
<el-input v-model="form.point_type" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点位状态">
|
||||||
|
<el-input v-model="form.ivt_status" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="位置">
|
||||||
|
<el-input v-model="form.point_location" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="顺序号" prop="sort_seq">
|
||||||
|
<el-input v-model="form.sort_seq" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用" prop="is_used">
|
||||||
|
<el-input v-model="form.is_used" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.remark" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规划">
|
||||||
|
<el-input v-model="form.plan" 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="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" />
|
||||||
|
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
|
||||||
|
<el-table-column prop="vehicle_code" label="托盘号" :min-width="flexWidth('vehicle_code',crud.data,'托盘号')" />
|
||||||
|
<el-table-column prop="product_area" label="区域" :min-width="flexWidth('product_area',crud.data,'区域')" />
|
||||||
|
<el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')" />
|
||||||
|
<el-table-column prop="ivt_status" label="点位状态" :min-width="flexWidth('ivt_status',crud.data,'点位状态')" />
|
||||||
|
<el-table-column prop="point_location" label="位置" :min-width="flexWidth('point_location',crud.data,'位置')" />
|
||||||
|
<el-table-column prop="sort_seq" label="顺序号" :min-width="flexWidth('sort_seq',crud.data,'顺序号')" />
|
||||||
|
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')" />
|
||||||
|
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||||
|
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||||
|
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',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 prop="plan" label="规划" :min-width="flexWidth('plan',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 crudBstIvtStockingivt from './bstIvtStockingivt'
|
||||||
|
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,
|
||||||
|
point_code: null,
|
||||||
|
point_name: null,
|
||||||
|
vehicle_code: null,
|
||||||
|
product_area: null,
|
||||||
|
point_type: null,
|
||||||
|
ivt_status: null,
|
||||||
|
point_location: null,
|
||||||
|
sort_seq: null,
|
||||||
|
is_used: null,
|
||||||
|
remark: null,
|
||||||
|
create_id: null,
|
||||||
|
create_name: null,
|
||||||
|
create_time: null,
|
||||||
|
update_optid: null,
|
||||||
|
update_optname: null,
|
||||||
|
update_time: null,
|
||||||
|
plan: null
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'BstIvtStockingivt',
|
||||||
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '备货区点位库存表',
|
||||||
|
url: 'api/bstIvtStockingivt',
|
||||||
|
idField: 'ivt_id',
|
||||||
|
sort: 'ivt_id,desc',
|
||||||
|
crudMethod: { ...crudBstIvtStockingivt }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
permission: {
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
ivt_id: [
|
||||||
|
{ required: true, message: '库存记录标识不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
point_code: [
|
||||||
|
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
sort_seq: [
|
||||||
|
{ required: true, message: '顺序号不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
is_used: [
|
||||||
|
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
create_id: [
|
||||||
|
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
create_name: [
|
||||||
|
{ required: true, message: '创建人不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
create_time: [
|
||||||
|
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user