no message
parent
8b7cd53fa1
commit
f39de8e134
|
|
@ -57,6 +57,22 @@ public class AgvTask implements Serializable {
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private java.lang.Long businessDetailId;
|
private java.lang.Long businessDetailId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料
|
||||||
|
*/
|
||||||
|
@Excel(name = "物料", width = 15)
|
||||||
|
@Schema(description = "物料")
|
||||||
|
@Dict(dictTable = "base_item", dicCode = "id", dicText = "item_code")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private java.lang.Long itemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 柜号
|
||||||
|
*/
|
||||||
|
@Excel(name = "柜号", width = 15)
|
||||||
|
@Schema(description = "柜号")
|
||||||
|
private java.lang.String conNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 载具编号
|
* 载具编号
|
||||||
*/
|
*/
|
||||||
|
|
@ -69,6 +85,7 @@ public class AgvTask implements Serializable {
|
||||||
@Excel(name = "载具类型", width = 15)
|
@Excel(name = "载具类型", width = 15)
|
||||||
@Schema(description = "载具类型")
|
@Schema(description = "载具类型")
|
||||||
private java.lang.String carrierType;
|
private java.lang.String carrierType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务类型
|
* 任务类型
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.cpte.modules.agvTask.entity.AgvTask;
|
import org.cpte.modules.agvTask.entity.AgvTask;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.cpte.modules.agvTask.vo.ConNoAgv;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -72,4 +73,6 @@ public interface AgvTaskMapper extends BaseMapper<AgvTask> {
|
||||||
*/
|
*/
|
||||||
@Select(value = "select end_code,count(end_code) from data_agv_task where type='OUTBOUND' and status in (1,2) and agv_vendor='TES' group by end_code")
|
@Select(value = "select end_code,count(end_code) from data_agv_task where type='OUTBOUND' and status in (1,2) and agv_vendor='TES' group by end_code")
|
||||||
List<Map<String, Integer>> pointTaskCountMap();
|
List<Map<String, Integer>> pointTaskCountMap();
|
||||||
|
|
||||||
|
List<ConNoAgv> queryIsExecuteAgvTask();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,14 @@
|
||||||
ORDER BY create_time DESC
|
ORDER BY create_time DESC
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryIsExecuteAgvTask" resultType="org.cpte.modules.agvTask.vo.ConNoAgv">
|
||||||
|
SELECT p.con_no, t.item_id
|
||||||
|
FROM data_pick p
|
||||||
|
JOIN data_task t ON t.pick_id = p.id
|
||||||
|
JOIN data_agv_task agv ON agv.id = t.agv_task_id
|
||||||
|
WHERE agv.type = 'OUTBOUND'
|
||||||
|
AND p.order_type in (4,5)
|
||||||
|
AND agv.status IN (1, 2, 3)
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -28,7 +28,7 @@ public interface IAgvTaskService extends IService<AgvTask> {
|
||||||
* @param izAll 整托/拆托
|
* @param izAll 整托/拆托
|
||||||
* @param agvVendor 供应商
|
* @param agvVendor 供应商
|
||||||
*/
|
*/
|
||||||
AgvTask createAgvTask(Long businessDetailId, String carrierCode, String startCode, String endCode, String taskType, String type, Integer izAll, String agvVendor);
|
AgvTask createAgvTask(String conNo,Long itemId,Long businessDetailId, String carrierCode, String startCode, String endCode, String taskType, String type, Integer izAll, String agvVendor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建agvTask任务
|
* 创建agvTask任务
|
||||||
|
|
@ -42,7 +42,7 @@ public interface IAgvTaskService extends IService<AgvTask> {
|
||||||
* @param izAll 整托/拆托
|
* @param izAll 整托/拆托
|
||||||
* @param agvVendor 供应商
|
* @param agvVendor 供应商
|
||||||
*/
|
*/
|
||||||
AgvTask bulidAgvTask(Long businessDetailId, String carrierCode, String startCode, String endCode, String taskType, String type, Integer izAll, String agvVendor);
|
AgvTask bulidAgvTask(String conNo,Long itemId,Long businessDetailId, String carrierCode, String startCode, String endCode, String taskType, String type, Integer izAll, String agvVendor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理AGV任务
|
* 处理AGV任务
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AgvTask createAgvTask(Long businessDetailId, String carrierCode, String startCode, String endCode, String taskType, String type, Integer izAll, String agvVendor) {
|
public AgvTask createAgvTask(String conNo,Long itemId,Long businessDetailId, String carrierCode, String startCode, String endCode, String taskType, String type, Integer izAll, String agvVendor) {
|
||||||
LoginUser sysUser = null;
|
LoginUser sysUser = null;
|
||||||
try {
|
try {
|
||||||
sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
@ -60,6 +60,8 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl
|
||||||
priority = 3;
|
priority = 3;
|
||||||
}
|
}
|
||||||
AgvTask agvTask = AgvTask.builder()
|
AgvTask agvTask = AgvTask.builder()
|
||||||
|
.conNo(conNo)
|
||||||
|
.itemId(itemId)
|
||||||
.businessDetailId(businessDetailId)
|
.businessDetailId(businessDetailId)
|
||||||
.carrierCode(carrierCode)
|
.carrierCode(carrierCode)
|
||||||
.type(type)
|
.type(type)
|
||||||
|
|
@ -80,7 +82,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AgvTask bulidAgvTask(Long businessDetailId, String carrierCode, String startCode, String endCode, String taskType, String type, Integer izAll, String agvVendor) {
|
public AgvTask bulidAgvTask(String conNo,Long itemId,Long businessDetailId, String carrierCode, String startCode, String endCode, String taskType, String type, Integer izAll, String agvVendor) {
|
||||||
LoginUser sysUser = null;
|
LoginUser sysUser = null;
|
||||||
try {
|
try {
|
||||||
sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
|
@ -93,6 +95,8 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl
|
||||||
}
|
}
|
||||||
return AgvTask.builder()
|
return AgvTask.builder()
|
||||||
.id(IdWorker.getId())
|
.id(IdWorker.getId())
|
||||||
|
.conNo(conNo)
|
||||||
|
.itemId(itemId)
|
||||||
.businessDetailId(businessDetailId)
|
.businessDetailId(businessDetailId)
|
||||||
.carrierCode(carrierCode)
|
.carrierCode(carrierCode)
|
||||||
.type(type)
|
.type(type)
|
||||||
|
|
@ -133,7 +137,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl
|
||||||
|
|
||||||
//验证通过,生成Tes任务
|
//验证通过,生成Tes任务
|
||||||
Stock stock = data.getStock();
|
Stock stock = data.getStock();
|
||||||
createAgvTask(asn.getId(), stock.getStockCode(), station.getPointCode(), dstPoint.getPointCode(), null, BusinessTypeEnum.INBOUND.getValue(), 0, AgvVendorEnum.TES.getValue());
|
createAgvTask(null, asnDetails.get(0).getItemId(),asn.getId(), stock.getStockCode(), station.getPointCode(), dstPoint.getPointCode(), null, BusinessTypeEnum.INBOUND.getValue(), 0, AgvVendorEnum.TES.getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package org.cpte.modules.agvTask.vo;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
public class ConNoAgv {
|
||||||
|
private String conNo;
|
||||||
|
private Long itemId;
|
||||||
|
}
|
||||||
|
|
@ -233,7 +233,7 @@ public class IHikAgvServiceImpl implements IHikAgvService {
|
||||||
if (agvTaskMapper.existsByStockCode(agvTask.getCarrierCode(), AgvVendorEnum.HIK.getValue()) !=null) {
|
if (agvTaskMapper.existsByStockCode(agvTask.getCarrierCode(), AgvVendorEnum.HIK.getValue()) !=null) {
|
||||||
throw new RuntimeException("任务已重新生成,请勿重复操作! ");
|
throw new RuntimeException("任务已重新生成,请勿重复操作! ");
|
||||||
}
|
}
|
||||||
AgvTask newAgvTask = iAgvTaskService.createAgvTask(agvTask.getBusinessDetailId(), agvTask.getCarrierCode(), agvTask.getStartCode(), agvTask.getEndCode(), null, agvTask.getType(),agvTask.getIzAll(), AgvVendorEnum.HIK.getValue());
|
AgvTask newAgvTask = iAgvTaskService.createAgvTask(agvTask.getConNo(),agvTask.getItemId(),agvTask.getBusinessDetailId(), agvTask.getCarrierCode(), agvTask.getStartCode(), agvTask.getEndCode(), null, agvTask.getType(),agvTask.getIzAll(), AgvVendorEnum.HIK.getValue());
|
||||||
switch (agvTask.getType()) {
|
switch (agvTask.getType()) {
|
||||||
case "INBOUND":
|
case "INBOUND":
|
||||||
case "OUTBOUND":
|
case "OUTBOUND":
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import org.cpte.modules.base.mapper.PointMapper;
|
||||||
import org.cpte.modules.base.mapper.StockMapper;
|
import org.cpte.modules.base.mapper.StockMapper;
|
||||||
import org.cpte.modules.base.service.IItemKeyService;
|
import org.cpte.modules.base.service.IItemKeyService;
|
||||||
import org.cpte.modules.constant.enums.CommonStatusEnum;
|
import org.cpte.modules.constant.enums.CommonStatusEnum;
|
||||||
|
import org.cpte.modules.inventory.mapper.InventoryMapper;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
|
@ -64,6 +65,9 @@ public class InventoryController extends JeecgController<Inventory, IInventorySe
|
||||||
@Autowired
|
@Autowired
|
||||||
private PointMapper pointMapper;
|
private PointMapper pointMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private InventoryMapper inventoryMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IInventoryService inventoryService;
|
private IInventoryService inventoryService;
|
||||||
|
|
||||||
|
|
@ -89,10 +93,13 @@ public class InventoryController extends JeecgController<Inventory, IInventorySe
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
|
|
||||||
|
|
||||||
QueryWrapper<Inventory> queryWrapper = QueryGenerator.initQueryWrapper(inventory, req.getParameterMap());
|
Page<Inventory> page = new Page<>(pageNo, pageSize);
|
||||||
Page<Inventory> page = new Page<Inventory>(pageNo, pageSize);
|
|
||||||
IPage<Inventory> pageList = inventoryService.page(page, queryWrapper);
|
IPage<Inventory> pageList = inventoryService.selectInventoryWithItemKey(page, inventory);
|
||||||
//物料属性
|
|
||||||
|
return Result.OK(pageList);
|
||||||
|
|
||||||
|
/* //物料属性
|
||||||
List<Long> itemKeyIds = pageList.getRecords().stream().map(Inventory::getItemKeyId).toList();
|
List<Long> itemKeyIds = pageList.getRecords().stream().map(Inventory::getItemKeyId).toList();
|
||||||
Map<Long, ItemKey> itemKeyMap=itemKeyService.queryByIdsToMap(itemKeyIds);
|
Map<Long, ItemKey> itemKeyMap=itemKeyService.queryByIdsToMap(itemKeyIds);
|
||||||
for(Inventory inv:pageList.getRecords()){
|
for(Inventory inv:pageList.getRecords()){
|
||||||
|
|
@ -104,8 +111,7 @@ public class InventoryController extends JeecgController<Inventory, IInventorySe
|
||||||
inv.setPropC1(itemKey.getPropC1());
|
inv.setPropC1(itemKey.getPropC1());
|
||||||
inv.setPropC3(itemKey.getPropC3());
|
inv.setPropC3(itemKey.getPropC3());
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
return Result.OK(pageList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -121,6 +127,7 @@ public class InventoryController extends JeecgController<Inventory, IInventorySe
|
||||||
public Result<String> add(@RequestBody Inventory inventory) {
|
public Result<String> add(@RequestBody Inventory inventory) {
|
||||||
ItemKey itemKey = itemKeyService.createItemKey(inventory.getItemId(), inventory.getWhCode(), inventory.getProject(), inventory.getTaskNo(), inventory.getPropC1(), inventory.getPropC3());
|
ItemKey itemKey = itemKeyService.createItemKey(inventory.getItemId(), inventory.getWhCode(), inventory.getProject(), inventory.getTaskNo(), inventory.getPropC1(), inventory.getPropC3());
|
||||||
inventory.setItemKeyId(itemKey.getId());
|
inventory.setItemKeyId(itemKey.getId());
|
||||||
|
inventory.setItemId(itemKey.getItemId());
|
||||||
inventoryService.save(inventory);
|
inventoryService.save(inventory);
|
||||||
|
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
|
|
@ -147,8 +154,9 @@ public class InventoryController extends JeecgController<Inventory, IInventorySe
|
||||||
pointMapper.updateById(newPoint);
|
pointMapper.updateById(newPoint);
|
||||||
}
|
}
|
||||||
ItemKey itemKey = itemKeyService.createItemKey(inventory.getItemId(), inventory.getWhCode(), inventory.getProject(), inventory.getTaskNo(), inventory.getPropC1(), inventory.getPropC3());
|
ItemKey itemKey = itemKeyService.createItemKey(inventory.getItemId(), inventory.getWhCode(), inventory.getProject(), inventory.getTaskNo(), inventory.getPropC1(), inventory.getPropC3());
|
||||||
inventory.setItemKeyId(itemKey.getId());
|
oldInventory.setItemKeyId(itemKey.getId());
|
||||||
inventoryService.updateById(inventory);
|
oldInventory.setItemId(inventory.getItemId());
|
||||||
|
inventoryMapper.updateById(oldInventory);
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,16 @@
|
||||||
package org.cpte.modules.inventory.mapper;
|
package org.cpte.modules.inventory.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.cpte.modules.inventory.entity.Inventory;
|
import org.cpte.modules.inventory.entity.Inventory;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -65,6 +69,8 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
|
||||||
@Select("select * from data_inventory where stock_id = #{stockId}")
|
@Select("select * from data_inventory where stock_id = #{stockId}")
|
||||||
List<Inventory> queryInventoryByStockId(@Param("stockId") Long stockId);
|
List<Inventory> queryInventoryByStockId(@Param("stockId") Long stockId);
|
||||||
|
|
||||||
|
List<Inventory> queryByStockIds(@Param("stockIds") List<Long> stockIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据容器ID集合删除库存数据
|
* 根据容器ID集合删除库存数据
|
||||||
*
|
*
|
||||||
|
|
@ -83,4 +89,17 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
|
||||||
*/
|
*/
|
||||||
List<Inventory> queryByAreaIdAndCountTypeAndCodes(@Param("areaId") Long areaId, @Param("countType") Integer countType, @Param("codes") Set<String> codes);
|
List<Inventory> queryByAreaIdAndCountTypeAndCodes(@Param("areaId") Long areaId, @Param("countType") Integer countType, @Param("codes") Set<String> codes);
|
||||||
|
|
||||||
|
|
||||||
|
@Select("SELECT " +
|
||||||
|
"inventory.*, " +
|
||||||
|
"item_key.wh_code as whCode, " +
|
||||||
|
"item_key.project as project, " +
|
||||||
|
"item_key.task_no as taskNo, " +
|
||||||
|
"item_key.prop_c1 as propC1, " +
|
||||||
|
"item_key.prop_c3 as propC3 " +
|
||||||
|
"FROM data_inventory inventory " +
|
||||||
|
"LEFT JOIN base_item_key item_key ON item_key.id = inventory.item_key_id " +
|
||||||
|
"${ew.customSqlSegment}")
|
||||||
|
IPage<Inventory> selectInventoryWithItemKey(Page<Inventory> page, @Param("inventory") Inventory inventory, @Param("ew") Wrapper<Inventory> wrapper);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,4 +53,14 @@
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryByStockIds" resultType="org.cpte.modules.inventory.entity.Inventory">
|
||||||
|
SELECT * FROM data_inventory
|
||||||
|
WHERE quantity > 0
|
||||||
|
AND status in (1,2)
|
||||||
|
AND stock_id IN
|
||||||
|
<foreach collection="stockIds" item="stockId" open="(" separator="," close=")">
|
||||||
|
#{stockId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package org.cpte.modules.inventory.service;
|
package org.cpte.modules.inventory.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.cpte.modules.inventory.entity.Inventory;
|
import org.cpte.modules.inventory.entity.Inventory;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.cpte.modules.receive.entity.Asn;
|
import org.cpte.modules.receive.entity.Asn;
|
||||||
|
|
@ -18,6 +20,12 @@ import java.util.Map;
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface IInventoryService extends IService<Inventory> {
|
public interface IInventoryService extends IService<Inventory> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义分页查询,包含与 item_key 表的关联数据
|
||||||
|
*/
|
||||||
|
IPage<Inventory> selectInventoryWithItemKey(Page<Inventory> page, Inventory inventory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建库存
|
* 构建库存
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
package org.cpte.modules.inventory.service.impl;
|
package org.cpte.modules.inventory.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.cpte.modules.base.entity.Point;
|
import org.cpte.modules.base.entity.Point;
|
||||||
import org.cpte.modules.base.mapper.PointMapper;
|
import org.cpte.modules.base.mapper.PointMapper;
|
||||||
|
|
@ -12,6 +15,7 @@ import org.cpte.modules.inventory.service.IInventoryService;
|
||||||
import org.cpte.modules.receive.entity.Asn;
|
import org.cpte.modules.receive.entity.Asn;
|
||||||
import org.cpte.modules.receive.entity.ReceiveRecord;
|
import org.cpte.modules.receive.entity.ReceiveRecord;
|
||||||
import org.cpte.modules.shipping.entity.Task;
|
import org.cpte.modules.shipping.entity.Task;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
@ -31,6 +35,26 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
|
||||||
@Autowired
|
@Autowired
|
||||||
private PointMapper pointMapper;
|
private PointMapper pointMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<Inventory> selectInventoryWithItemKey(Page<Inventory> page, Inventory inventory) {
|
||||||
|
QueryWrapper<Inventory> queryWrapper = new QueryWrapper<>();
|
||||||
|
// 添加查询条件
|
||||||
|
if (oConvertUtils.isNotEmpty(inventory.getItemId())) {
|
||||||
|
queryWrapper.eq("inventory.item_id", inventory.getItemId());
|
||||||
|
}
|
||||||
|
if (oConvertUtils.isNotEmpty(inventory.getPointId())) {
|
||||||
|
queryWrapper.eq("inventory.point_id", inventory.getPointId());
|
||||||
|
}
|
||||||
|
if (oConvertUtils.isNotEmpty(inventory.getStockId())) {
|
||||||
|
queryWrapper.eq("inventory.stock_id", inventory.getStockId());
|
||||||
|
}
|
||||||
|
if (oConvertUtils.isNotEmpty(inventory.getStatus())){
|
||||||
|
queryWrapper.eq("inventory.status", inventory.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
return baseMapper.selectInventoryWithItemKey(page, inventory, queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Inventory buildInventory(Long stockId, BigDecimal receivedQty, Asn asn, ReceiveRecord receiveRecord) {
|
public Inventory buildInventory(Long stockId, BigDecimal receivedQty, Asn asn, ReceiveRecord receiveRecord) {
|
||||||
return Inventory.builder()
|
return Inventory.builder()
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,13 @@ package org.cpte.modules.quartz.job;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.cpte.modules.agvTask.mapper.AgvTaskMapper;
|
||||||
|
import org.cpte.modules.agvTask.vo.ConNoAgv;
|
||||||
import org.cpte.modules.constant.enums.PickStatusEnum;
|
import org.cpte.modules.constant.enums.PickStatusEnum;
|
||||||
import org.cpte.modules.constant.enums.PickTypeEnum;
|
import org.cpte.modules.constant.enums.PickTypeEnum;
|
||||||
import org.cpte.modules.shipping.entity.Pick;
|
import org.cpte.modules.shipping.entity.Pick;
|
||||||
import org.cpte.modules.shipping.entity.PickDetail;
|
import org.cpte.modules.shipping.entity.PickDetail;
|
||||||
import org.cpte.modules.shipping.mapper.PickDetailMapper;
|
import org.cpte.modules.shipping.mapper.PickDetailMapper;
|
||||||
import org.cpte.modules.shipping.mapper.PickMapper;
|
|
||||||
import org.cpte.modules.shipping.service.IPickDetailService;
|
import org.cpte.modules.shipping.service.IPickDetailService;
|
||||||
import org.cpte.modules.shipping.service.IPickService;
|
import org.cpte.modules.shipping.service.IPickService;
|
||||||
import org.cpte.modules.shipping.vo.AllocationPickDetailData;
|
import org.cpte.modules.shipping.vo.AllocationPickDetailData;
|
||||||
|
|
@ -28,7 +29,7 @@ import java.util.stream.Collectors;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AllocatePickDetailJob implements Job {
|
public class AllocatePickDetailJob implements Job {
|
||||||
@Autowired
|
@Autowired
|
||||||
private PickMapper pickMapper;
|
private AgvTaskMapper agvTaskMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PickDetailMapper pickDetailMapper;
|
private PickDetailMapper pickDetailMapper;
|
||||||
|
|
@ -103,52 +104,98 @@ public class AllocatePickDetailJob implements Job {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 全局状态:是否有成品/配件类型的任务正在执行
|
// 1. 获取当前系统中所有正在执行的AGV任务
|
||||||
boolean hasExecutingCpPjTask = false;
|
List<ConNoAgv> executeAgv= agvTaskMapper.queryIsExecuteAgvTask();
|
||||||
|
Set<String> executeAgvKeys = buildExecuteAgvKey(executeAgv);
|
||||||
|
|
||||||
|
//2.处理明细
|
||||||
|
processPickDetails(cpPjPickIds, pickDetailMap, pickMap, executeAgvKeys);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建正在执行任务的键集合
|
||||||
|
*/
|
||||||
|
private Set<String> buildExecuteAgvKey(List<ConNoAgv> executeAgv) {
|
||||||
|
if (CollectionUtils.isEmpty(executeAgv)) {
|
||||||
|
return Collections.emptySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
Set<String> taskKeys = new HashSet<>(executeAgv.size());
|
||||||
|
for (ConNoAgv agv : executeAgv) {
|
||||||
|
String key = buildAgvKey(agv.getConNo(), agv.getItemId());
|
||||||
|
taskKeys.add(key);
|
||||||
|
}
|
||||||
|
return taskKeys;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建AGV唯一键
|
||||||
|
*/
|
||||||
|
private String buildAgvKey(String conNo, Long itemId) {
|
||||||
|
return conNo + "_" + itemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理拣货明细
|
||||||
|
*/
|
||||||
|
private void processPickDetails(List<Long> cpPjPickIds,
|
||||||
|
Map<Long, List<PickDetail>> pickDetailMap,
|
||||||
|
Map<Long, Pick> pickMap,
|
||||||
|
Set<String> executingTaskKeys) {
|
||||||
for (Long pickId : cpPjPickIds) {
|
for (Long pickId : cpPjPickIds) {
|
||||||
Pick pick = pickMap.get(pickId);
|
Pick pick = pickMap.get(pickId);
|
||||||
if (hasExecutingCpPjTask) {
|
if (pick == null) {
|
||||||
log.info("有成品/配件类型任务正在执行,跳过出库单【{}】的分配", pick.getThirdOrderNo());
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PickDetail> details = pickDetailMap.get(pickId);
|
List<PickDetail> details = pickDetailMap.get(pickId);
|
||||||
if (CollectionUtils.isEmpty(details)) {
|
if (CollectionUtils.isEmpty(details)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 处理单个成品/配件出库单
|
boolean allocated = processSinglePickDetails(pick, details, executingTaskKeys);
|
||||||
hasExecutingCpPjTask = allocateCpPjPick(pick, details);
|
if (allocated) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分配单个成品/配件出库单
|
* 处理单个pick的明细
|
||||||
*
|
* @return 是否成功分配
|
||||||
* @return 是否分配了任务且任务正在执行
|
|
||||||
*/
|
*/
|
||||||
private boolean allocateCpPjPick(Pick pick, List<PickDetail> pickDetails) {
|
private boolean processSinglePickDetails(Pick pick,
|
||||||
for (PickDetail detail : pickDetails) {
|
List<PickDetail> details,
|
||||||
// 检查已分配的任务是否正在执行
|
Set<String> executingTaskKeys) {
|
||||||
|
for (PickDetail detail : details) {
|
||||||
|
// 跳过已分配的任务
|
||||||
if (isAlreadyAssigned(detail.getStatus())) {
|
if (isAlreadyAssigned(detail.getStatus())) {
|
||||||
if (isPickDetailExecuting(detail.getId())) {
|
|
||||||
log.info("出库单【{}】的明细【{}】任务正在执行", pick.getThirdOrderNo(), detail.getId());
|
|
||||||
return true; // 有任务正在执行
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
allocatePickDetail(detail);
|
// 构建当前任务的唯一键
|
||||||
|
String currentKey = buildAgvKey(pick.getConNo(), detail.getItemId());
|
||||||
|
|
||||||
// 检查分配后任务状态
|
// 检查是否需要分配
|
||||||
if (isPickDetailExecuting(detail.getId())) {
|
if (shouldAllocatePickDetail(executingTaskKeys, currentKey)) {
|
||||||
log.info("出库单【{}】的明细【{}】任务已生成", pick.getThirdOrderNo(), detail.getId());
|
allocatePickDetail(detail);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false; // 没有正在执行的任务
|
return false; // 未分配任何明细
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否需要分配拣货明细
|
||||||
|
*/
|
||||||
|
private boolean shouldAllocatePickDetail(Set<String> executingTaskKeys, String currentKey) {
|
||||||
|
// 如果没有正在执行的任务,直接分配
|
||||||
|
if (CollectionUtils.isEmpty(executingTaskKeys)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果有正在执行的任务,且当前任务已存在,则分配
|
||||||
|
return executingTaskKeys.contains(currentKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理其他类型的出库单
|
* 处理其他类型的出库单
|
||||||
*/
|
*/
|
||||||
|
|
@ -157,13 +204,10 @@ public class AllocatePickDetailJob implements Job {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (Long pickId : otherPickIds) {
|
for (Long pickId : otherPickIds) {
|
||||||
Pick pick = pickMap.get(pickId);
|
|
||||||
List<PickDetail> details = pickDetailMap.get(pickId);
|
List<PickDetail> details = pickDetailMap.get(pickId);
|
||||||
if (CollectionUtils.isEmpty(details)) {
|
if (CollectionUtils.isEmpty(details)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 分配单个其他类型出库单的所有明细
|
|
||||||
log.info("分配其他类型出库单的明细【{}】", pick.getThirdOrderNo());
|
|
||||||
allocateOtherPick(details);
|
allocateOtherPick(details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -191,10 +235,6 @@ public class AllocatePickDetailJob implements Job {
|
||||||
return PickStatusEnum.ASSIGNED.getValue().equals(status);
|
return PickStatusEnum.ASSIGNED.getValue().equals(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPickDetailExecuting(Long pickDetailId) {
|
|
||||||
return pickMapper.queryPickDetailIsExecuting(pickDetailId) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void allocatePickDetail(PickDetail pickDetail) {
|
private void allocatePickDetail(PickDetail pickDetail) {
|
||||||
// 分配单个出库明细
|
// 分配单个出库明细
|
||||||
List<String> resultMsg;
|
List<String> resultMsg;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ public class AsnDetailServiceImpl extends ServiceImpl<AsnDetailMapper, AsnDetail
|
||||||
|
|
||||||
//4.成品入库,生成AGV任务
|
//4.成品入库,生成AGV任务
|
||||||
if (AsnOrderTypeEnum.PRODUCT.getValue().equals(inboundRequest.getType()) && station != null) {
|
if (AsnOrderTypeEnum.PRODUCT.getValue().equals(inboundRequest.getType()) && station != null) {
|
||||||
agvTaskService.createAgvTask(asn.getId(), stock.getStockCode(), srcPoint.getPointCode(), station.getPointCode(), null, BusinessTypeEnum.INBOUND.getValue(), 0, AgvVendorEnum.HIK.getValue());
|
agvTaskService.createAgvTask(null,asnDetails.get(0).getItemId(),asn.getId(), stock.getStockCode(), srcPoint.getPointCode(), station.getPointCode(), null, BusinessTypeEnum.INBOUND.getValue(), 0, AgvVendorEnum.HIK.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,6 @@ public class CallAgvProcessor {
|
||||||
if (agvTaskMapper.existsByStockCode(stockCode, AgvVendorEnum.HIK.getValue()) != null) {
|
if (agvTaskMapper.existsByStockCode(stockCode, AgvVendorEnum.HIK.getValue()) != null) {
|
||||||
throw new RuntimeException("【" + stockCode + "】容器已生成AGV任务,请勿重复操作! ");
|
throw new RuntimeException("【" + stockCode + "】容器已生成AGV任务,请勿重复操作! ");
|
||||||
}
|
}
|
||||||
agvTaskService.createAgvTask(null, stockCode, callData.getFromPoint().getPointCode(), callData.getToCode(), null, BusinessTypeEnum.TRANSPORT.getValue(), 0, AgvVendorEnum.HIK.getValue());
|
agvTaskService.createAgvTask(null, null, null, stockCode, callData.getFromPoint().getPointCode(), callData.getToCode(), null, BusinessTypeEnum.TRANSPORT.getValue(), 0, AgvVendorEnum.HIK.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,13 @@ public class Pick implements Serializable {
|
||||||
@Excel(name = "客户代码", width = 15)
|
@Excel(name = "客户代码", width = 15)
|
||||||
@Schema(description = "客户代码")
|
@Schema(description = "客户代码")
|
||||||
private java.lang.String customerCode;
|
private java.lang.String customerCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 柜号
|
||||||
|
*/
|
||||||
|
@Excel(name = "柜号", width = 15)
|
||||||
|
@Schema(description = "柜号")
|
||||||
|
private java.lang.String conNo;
|
||||||
/**
|
/**
|
||||||
* 单据类型;0.成品入库;1.配件入库;2.成品拆托入库;3.配件拆托入库;4.成品出库;5.配件出库;6.返工出库;7.检验出库;8.其他出库
|
* 单据类型;0.成品入库;1.配件入库;2.成品拆托入库;3.配件拆托入库;4.成品出库;5.配件出库;6.返工出库;7.检验出库;8.其他出库
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.cpte.modules.shipping.entity.Pick;
|
import org.cpte.modules.shipping.entity.Pick;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.cpte.modules.shipping.entity.PickDetail;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -45,8 +44,8 @@ public interface PickMapper extends BaseMapper<Pick> {
|
||||||
/**
|
/**
|
||||||
* 查询出库单任务是否正在执行
|
* 查询出库单任务是否正在执行
|
||||||
*
|
*
|
||||||
* @param pickDetailId 出库单明细
|
|
||||||
* @return Long
|
* @return Long
|
||||||
*/
|
*/
|
||||||
Long queryPickDetailIsExecuting(@Param("pickDetailId") Long pickDetailId);
|
Long queryPickDetailIsExecuting();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryPickDetailIsExecuting" resultType="long">
|
<select id="queryPickDetailIsExecuting" resultType="long">
|
||||||
SELECT count(t.id) FROM data_task t
|
SELECT count(agv.id) FROM data_task t
|
||||||
JOIN data_agv_task agv ON agv.id=t.agv_task_id
|
JOIN data_agv_task agv ON agv.id=t.agv_task_id
|
||||||
WHERE t.pick_detail_id = #{pickDetailId}
|
WHERE agv.type='OUTBOUND'
|
||||||
AND agv.`status` in (1,2,3)
|
AND agv.`status` in (1,2,3)
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -46,6 +46,7 @@ public class PickDetailServiceImpl extends ServiceImpl<PickDetailMapper, PickDet
|
||||||
@Override
|
@Override
|
||||||
public Pick buildPick(OutboundRequest outboundRequest) {
|
public Pick buildPick(OutboundRequest outboundRequest) {
|
||||||
return Pick.builder()
|
return Pick.builder()
|
||||||
|
.conNo(outboundRequest.getOrderNo())
|
||||||
.thirdOrderNo(outboundRequest.getOrderNo())
|
.thirdOrderNo(outboundRequest.getOrderNo())
|
||||||
.no(outboundRequest.getNo())
|
.no(outboundRequest.getNo())
|
||||||
.whCode(outboundRequest.getWhCode())
|
.whCode(outboundRequest.getWhCode())
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
|
||||||
if (CollectionUtils.isEmpty(taskList)) {
|
if (CollectionUtils.isEmpty(taskList)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//1.获取库存
|
//1.获取出库单
|
||||||
|
List<Long> pickIds = taskList.stream().map(Task::getPickId).distinct().toList();
|
||||||
|
Map<Long, Pick> pickMap = pickDetailService.queryByPickIdsToMap(pickIds);
|
||||||
|
|
||||||
|
//2.获取库存
|
||||||
List<Long> inventoryIds = taskList.stream().map(Task::getInventoryId).distinct().toList();
|
List<Long> inventoryIds = taskList.stream().map(Task::getInventoryId).distinct().toList();
|
||||||
Map<Long, Inventory> inventoryMap = inventoryService.queryByInventoryIdsToMap(inventoryIds);
|
Map<Long, Inventory> inventoryMap = inventoryService.queryByInventoryIdsToMap(inventoryIds);
|
||||||
|
|
||||||
|
|
@ -167,7 +171,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
|
||||||
String businessType = tasks.get(0).getTaskType() == 1 ? BusinessTypeEnum.OUTBOUND.getValue() : BusinessTypeEnum.MOVE.getValue();
|
String businessType = tasks.get(0).getTaskType() == 1 ? BusinessTypeEnum.OUTBOUND.getValue() : BusinessTypeEnum.MOVE.getValue();
|
||||||
|
|
||||||
if (!groupToAgvTaskMap.containsKey(key)) {
|
if (!groupToAgvTaskMap.containsKey(key)) {
|
||||||
AgvTask agvTask = agvTaskService.bulidAgvTask(null, key.getStockCode(), key.getFromPointCode(), key.getToPointCode(), null, businessType, izAll, AgvVendorEnum.TES.getValue());
|
Pick pick = pickMap.get(tasks.get(0).getPickId());
|
||||||
|
Long itemId = tasks.get(0).getItemId();
|
||||||
|
AgvTask agvTask = agvTaskService.bulidAgvTask(pick==null?null:pick.getConNo(),itemId,null, key.getStockCode(), key.getFromPointCode(), key.getToPointCode(), null, businessType, izAll, AgvVendorEnum.TES.getValue());
|
||||||
createToAgvTaskList.add(agvTask);
|
createToAgvTaskList.add(agvTask);
|
||||||
groupToAgvTaskMap.put(key, agvTask); // 建立映射
|
groupToAgvTaskMap.put(key, agvTask); // 建立映射
|
||||||
log.info("创建AGV任务:{}", agvTask);
|
log.info("创建AGV任务:{}", agvTask);
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,9 @@ public class AllocateProcessor {
|
||||||
List<PickDetail> pickDetails = pickDetailMapper.queryByPickIds(pickIds);
|
List<PickDetail> pickDetails = pickDetailMapper.queryByPickIds(pickIds);
|
||||||
data.setPickDetails(pickDetails);
|
data.setPickDetails(pickDetails);
|
||||||
|
|
||||||
|
//容器
|
||||||
|
List<Long> containerIds = pickDetails.stream().map(PickDetail::getStockId).distinct().toList();
|
||||||
|
|
||||||
//查询物料
|
//查询物料
|
||||||
List<Long> itemIds = pickDetails.stream().map(PickDetail::getItemId).distinct().toList();
|
List<Long> itemIds = pickDetails.stream().map(PickDetail::getItemId).distinct().toList();
|
||||||
Map<Long, Item> itemMap = itemService.queryByItemIdsToMap(itemIds);
|
Map<Long, Item> itemMap = itemService.queryByItemIdsToMap(itemIds);
|
||||||
|
|
@ -202,21 +205,40 @@ public class AllocateProcessor {
|
||||||
List<String> propC1List = pickDetails.stream().map(PickDetail::getPropC1).distinct().toList();
|
List<String> propC1List = pickDetails.stream().map(PickDetail::getPropC1).distinct().toList();
|
||||||
List<String> propC3List = pickDetails.stream().map(PickDetail::getPropC3).distinct().toList();
|
List<String> propC3List = pickDetails.stream().map(PickDetail::getPropC3).distinct().toList();
|
||||||
List<ItemKey> itemKeys = itemKeyMapper.queryItemKeys(itemIds, whCodeList, projectList, taskNoList, propC1List, propC3List);
|
List<ItemKey> itemKeys = itemKeyMapper.queryItemKeys(itemIds, whCodeList, projectList, taskNoList, propC1List, propC3List);
|
||||||
|
//出库明细指定了容器
|
||||||
|
if (CollectionUtils.isNotEmpty(containerIds)) {
|
||||||
|
List<Inventory> list = inventoryMapper.queryByStockIds(containerIds);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
List<Long> itemKeyIds = list.stream().map(Inventory::getItemKeyId).distinct().toList();
|
||||||
|
List<ItemKey> iks = itemKeyMapper.selectByIds(itemKeyIds);
|
||||||
|
if (CollectionUtils.isNotEmpty(itemKeys)) {
|
||||||
|
for (ItemKey ik : iks){
|
||||||
|
if(!itemKeys.contains(ik)){
|
||||||
|
itemKeys.add(ik);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//根据物料属性分组
|
} else {
|
||||||
Map<ItemGroupKey, ItemKey> itemGroupKey = itemKeys.stream()
|
itemKeys = iks;
|
||||||
.collect(Collectors.toMap(
|
}
|
||||||
itemKey -> ItemGroupKey.of(
|
}
|
||||||
itemKey.getItemId(),
|
}
|
||||||
itemKey.getWhCode(),
|
if(CollectionUtils.isNotEmpty(itemKeys)){
|
||||||
itemKey.getProject(),
|
//根据物料属性分组
|
||||||
itemKey.getTaskNo(),
|
Map<ItemGroupKey, ItemKey> itemGroupKey = itemKeys.stream()
|
||||||
itemKey.getPropC1(),
|
.collect(Collectors.toMap(
|
||||||
itemKey.getPropC3()
|
itemKey -> ItemGroupKey.of(
|
||||||
),
|
itemKey.getItemId(),
|
||||||
itemKey -> itemKey
|
itemKey.getWhCode(),
|
||||||
));
|
itemKey.getProject(),
|
||||||
data.setItemGroupMap(itemGroupKey);
|
itemKey.getTaskNo(),
|
||||||
|
itemKey.getPropC1(),
|
||||||
|
itemKey.getPropC3()
|
||||||
|
),
|
||||||
|
itemKey -> itemKey
|
||||||
|
));
|
||||||
|
data.setItemGroupMap(itemGroupKey);
|
||||||
|
}
|
||||||
|
|
||||||
//查询库存
|
//查询库存
|
||||||
List<Inventory> inventories = null;
|
List<Inventory> inventories = null;
|
||||||
|
|
@ -225,8 +247,6 @@ public class AllocateProcessor {
|
||||||
inventories = inventoryMapper.queryInventoryByItemKeyId(itemKeyIds);
|
inventories = inventoryMapper.queryInventoryByItemKeyId(itemKeyIds);
|
||||||
data.setInventories(inventories);
|
data.setInventories(inventories);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(inventories)) {
|
if (CollectionUtils.isNotEmpty(inventories)) {
|
||||||
//根据itemKeyId分组
|
//根据itemKeyId分组
|
||||||
Map<Long, List<Inventory>> inventoryMap = inventories.stream().collect(Collectors.groupingBy(Inventory::getItemKeyId));
|
Map<Long, List<Inventory>> inventoryMap = inventories.stream().collect(Collectors.groupingBy(Inventory::getItemKeyId));
|
||||||
|
|
@ -264,6 +284,9 @@ public class AllocateProcessor {
|
||||||
pickDetails.add(pickDetail);
|
pickDetails.add(pickDetail);
|
||||||
data.setPickDetails(pickDetails);
|
data.setPickDetails(pickDetails);
|
||||||
|
|
||||||
|
//容器
|
||||||
|
List<Long> containerIds = pickDetails.stream().map(PickDetail::getStockId).distinct().toList();
|
||||||
|
|
||||||
//查询物料
|
//查询物料
|
||||||
List<Long> itemIds = pickDetails.stream().map(PickDetail::getItemId).distinct().toList();
|
List<Long> itemIds = pickDetails.stream().map(PickDetail::getItemId).distinct().toList();
|
||||||
Map<Long, Item> itemMap = itemService.queryByItemIdsToMap(itemIds);
|
Map<Long, Item> itemMap = itemService.queryByItemIdsToMap(itemIds);
|
||||||
|
|
@ -276,21 +299,40 @@ public class AllocateProcessor {
|
||||||
List<String> propC1List = pickDetails.stream().map(PickDetail::getPropC1).distinct().toList();
|
List<String> propC1List = pickDetails.stream().map(PickDetail::getPropC1).distinct().toList();
|
||||||
List<String> propC3List = pickDetails.stream().map(PickDetail::getPropC3).distinct().toList();
|
List<String> propC3List = pickDetails.stream().map(PickDetail::getPropC3).distinct().toList();
|
||||||
List<ItemKey> itemKeys = itemKeyMapper.queryItemKeys(itemIds, whCodeList, projectList, taskNoList, propC1List, propC3List);
|
List<ItemKey> itemKeys = itemKeyMapper.queryItemKeys(itemIds, whCodeList, projectList, taskNoList, propC1List, propC3List);
|
||||||
|
//出库明细指定了容器
|
||||||
|
if (CollectionUtils.isNotEmpty(containerIds)) {
|
||||||
|
List<Inventory> list = inventoryMapper.queryByStockIds(containerIds);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
List<Long> itemKeyIds = list.stream().map(Inventory::getItemKeyId).distinct().toList();
|
||||||
|
List<ItemKey> iks = itemKeyMapper.selectByIds(itemKeyIds);
|
||||||
|
if (CollectionUtils.isNotEmpty(itemKeys)) {
|
||||||
|
for (ItemKey ik : iks){
|
||||||
|
if(!itemKeys.contains(ik)){
|
||||||
|
itemKeys.add(ik);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
itemKeys = iks;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isNotEmpty(itemKeys)){
|
||||||
|
//根据物料属性分组
|
||||||
|
Map<ItemGroupKey, ItemKey> itemGroupKey = itemKeys.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
itemKey -> ItemGroupKey.of(
|
||||||
|
itemKey.getItemId(),
|
||||||
|
itemKey.getWhCode(),
|
||||||
|
itemKey.getProject(),
|
||||||
|
itemKey.getTaskNo(),
|
||||||
|
itemKey.getPropC1(),
|
||||||
|
itemKey.getPropC3()
|
||||||
|
),
|
||||||
|
itemKey -> itemKey
|
||||||
|
));
|
||||||
|
data.setItemGroupMap(itemGroupKey);
|
||||||
|
}
|
||||||
|
|
||||||
//根据物料属性分组
|
|
||||||
Map<ItemGroupKey, ItemKey> itemGroupKey = itemKeys.stream()
|
|
||||||
.collect(Collectors.toMap(
|
|
||||||
itemKey -> ItemGroupKey.of(
|
|
||||||
itemKey.getItemId(),
|
|
||||||
itemKey.getWhCode(),
|
|
||||||
itemKey.getProject(),
|
|
||||||
itemKey.getTaskNo(),
|
|
||||||
itemKey.getPropC1(),
|
|
||||||
itemKey.getPropC3()
|
|
||||||
),
|
|
||||||
itemKey -> itemKey
|
|
||||||
));
|
|
||||||
data.setItemGroupMap(itemGroupKey);
|
|
||||||
|
|
||||||
//查询库存
|
//查询库存
|
||||||
List<Inventory> inventories = null;
|
List<Inventory> inventories = null;
|
||||||
|
|
@ -409,7 +451,10 @@ public class AllocateProcessor {
|
||||||
*/
|
*/
|
||||||
private List<Inventory> findMatchedInventories(PickDetail pickDetail,
|
private List<Inventory> findMatchedInventories(PickDetail pickDetail,
|
||||||
Pick pick, AllocationData data) {
|
Pick pick, AllocationData data) {
|
||||||
|
if (pickDetail.getStockId() != null) {
|
||||||
|
//筛选容器的库存
|
||||||
|
return data.getInventories().stream().filter(inventory -> inventory.getStockId().equals(pickDetail.getStockId())).toList();
|
||||||
|
}
|
||||||
ItemGroupKey groupKey = ItemGroupKey.of(
|
ItemGroupKey groupKey = ItemGroupKey.of(
|
||||||
pickDetail.getItemId(),
|
pickDetail.getItemId(),
|
||||||
pick.getWhCode(),
|
pick.getWhCode(),
|
||||||
|
|
@ -527,7 +572,7 @@ public class AllocateProcessor {
|
||||||
Map<Long, Point> pointMap = pointService.queryByPointIdsToMap(pointIds);
|
Map<Long, Point> pointMap = pointService.queryByPointIdsToMap(pointIds);
|
||||||
|
|
||||||
//获取出库口的库位
|
//获取出库口的库位
|
||||||
// List<Point> outPoints = pointService.queryPoints(null, null, AreaTypeEnum.CK_DOCK.getValue());
|
// List<Point> outPoints = pointService.queryPoints(null, null, AreaTypeEnum.CK_DOCK.getValue());
|
||||||
|
|
||||||
//获取优化后的库存
|
//获取优化后的库存
|
||||||
return matchedInventories.stream()
|
return matchedInventories.stream()
|
||||||
|
|
@ -559,7 +604,7 @@ public class AllocateProcessor {
|
||||||
//Point bestPoint = getBestOutboundPoint(currPoint, outPoints);
|
//Point bestPoint = getBestOutboundPoint(currPoint, outPoints);
|
||||||
//double distanceScore = calculateClusterDistanceCost(currPoint, bestPoint) * 0.3;
|
//double distanceScore = calculateClusterDistanceCost(currPoint, bestPoint) * 0.3;
|
||||||
|
|
||||||
double distanceScore =0;
|
double distanceScore = 0;
|
||||||
|
|
||||||
//当前巷道的库位数
|
//当前巷道的库位数
|
||||||
List<Point> points = pointMapper.findByColAndLayer(currPoint.getColNum(), currPoint.getLayerNum());
|
List<Point> points = pointMapper.findByColAndLayer(currPoint.getColNum(), currPoint.getLayerNum());
|
||||||
|
|
@ -660,7 +705,7 @@ public class AllocateProcessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重载方法,用于计算Point和Station之间的曼哈顿距离
|
// 重载方法,用于计算Point和Station之间的曼哈顿距离
|
||||||
private double calculateManhattanDistance(Point point,Station station) {
|
private double calculateManhattanDistance(Point point, Station station) {
|
||||||
// 假设Station也有getX()和getY()方法
|
// 假设Station也有getX()和getY()方法
|
||||||
int dx = Math.abs(station.getPositionX() - point.getPositionX());
|
int dx = Math.abs(station.getPositionX() - point.getPositionX());
|
||||||
int dy = Math.abs(station.getPositionY() - point.getPositionY());
|
int dy = Math.abs(station.getPositionY() - point.getPositionY());
|
||||||
|
|
@ -788,7 +833,7 @@ public class AllocateProcessor {
|
||||||
Point fromPoint = data.getPointMap().get(inventory.getPointId());
|
Point fromPoint = data.getPointMap().get(inventory.getPointId());
|
||||||
|
|
||||||
// 判断是否整托分配
|
// 判断是否整托分配
|
||||||
BigDecimal originalAvailableQty = BigDecimalUtil.subtract(inventory.getQuantity(), inventory.getQueuedQty(),0);
|
BigDecimal originalAvailableQty = BigDecimalUtil.subtract(inventory.getQuantity(), inventory.getQueuedQty(), 0);
|
||||||
Integer izAll = originalAvailableQty.compareTo(BigDecimal.ZERO) <= 0 ? 0 : 1;
|
Integer izAll = originalAvailableQty.compareTo(BigDecimal.ZERO) <= 0 ? 0 : 1;
|
||||||
|
|
||||||
// 目标库位
|
// 目标库位
|
||||||
|
|
|
||||||
|
|
@ -147,10 +147,13 @@ public class PickBackProcessor {
|
||||||
if (authInfo == null || authInfo.isEmpty()) {
|
if (authInfo == null || authInfo.isEmpty()) {
|
||||||
throw new RuntimeException("登录认证信息为空");
|
throw new RuntimeException("登录认证信息为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
String ticket = authInfo.get("Ticket");
|
String ticket = authInfo.get("Ticket");
|
||||||
String authorization = authInfo.get("authorization");
|
String authorization = authInfo.get("authorization");
|
||||||
reqMessage = pickTaskCallbackJson(pick, pickDetail, task, state, ticket);
|
if(task.getReqMessage()== null){
|
||||||
|
reqMessage = pickTaskCallbackJson(pick, pickDetail, task, state, ticket);
|
||||||
|
}else{
|
||||||
|
reqMessage=replaceTicketWithJson(task.getReqMessage(), ticket);
|
||||||
|
}
|
||||||
String url = openApiMapper.getRequestUrl(GeneralConstant.OUTBOUND_CALLBACK).getOriginUrl();
|
String url = openApiMapper.getRequestUrl(GeneralConstant.OUTBOUND_CALLBACK).getOriginUrl();
|
||||||
JSONObject jsonObject = swmsLoginUtil.sendSMOMResponse(reqMessage, url, authorization);
|
JSONObject jsonObject = swmsLoginUtil.sendSMOMResponse(reqMessage, url, authorization);
|
||||||
String code = validateResponse(jsonObject);
|
String code = validateResponse(jsonObject);
|
||||||
|
|
@ -160,6 +163,25 @@ public class PickBackProcessor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 替换Ticket
|
||||||
|
*
|
||||||
|
* @param jsonStr 原始JSON字符串
|
||||||
|
* @param newTicket 新的Ticket值
|
||||||
|
* @return 替换后的JSON字符串
|
||||||
|
*/
|
||||||
|
public static String replaceTicketWithJson(String jsonStr, String newTicket) {
|
||||||
|
JSONObject jsonObject = JSON.parseObject(jsonStr);
|
||||||
|
|
||||||
|
// 获取Context对象并修改Ticket
|
||||||
|
JSONObject context = jsonObject.getJSONObject("Context");
|
||||||
|
if (context != null) {
|
||||||
|
context.put("Ticket", newTicket);
|
||||||
|
}
|
||||||
|
|
||||||
|
return jsonObject.toJSONString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证响应数据
|
* 验证响应数据
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,13 @@ public class PickPage {
|
||||||
@Excel(name = "任务号", width = 15)
|
@Excel(name = "任务号", width = 15)
|
||||||
@Schema(description = "任务号")
|
@Schema(description = "任务号")
|
||||||
private java.lang.String no;
|
private java.lang.String no;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务号
|
||||||
|
*/
|
||||||
|
@Excel(name = "任务号", width = 15)
|
||||||
|
@Schema(description = "任务号")
|
||||||
|
private java.lang.String conNo;
|
||||||
/**
|
/**
|
||||||
* 外部仓库
|
* 外部仓库
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ public class ITesAgvServiceImpl implements ITesAgvService {
|
||||||
log.info("请求报文:{}", json);
|
log.info("请求报文:{}", json);
|
||||||
// 检查接口开关, 未开启则返回
|
// 检查接口开关, 未开启则返回
|
||||||
if (sysDictMapper.queryByDictCode(GeneralConstant.OPEN_FLAG) == null) {
|
if (sysDictMapper.queryByDictCode(GeneralConstant.OPEN_FLAG) == null) {
|
||||||
updateAgvTaskResponse(agvTask, null, "接口未开启", GeneralConstant.TES_FAIL_CODE);
|
updateAgvTaskResponse(agvTask, null, "接口未开启", GeneralConstant.TES_SUCCESS_CODE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String url = openApiMapper.getRequestUrl(openApi).getOriginUrl();
|
String url = openApiMapper.getRequestUrl(openApi).getOriginUrl();
|
||||||
|
|
@ -237,7 +237,7 @@ public class ITesAgvServiceImpl implements ITesAgvService {
|
||||||
String endCode = pointService.getElevatorPoint(agvTask.getEndCode(), GeneralConstant.CK_ELEVATOR_TASK_INDEX);
|
String endCode = pointService.getElevatorPoint(agvTask.getEndCode(), GeneralConstant.CK_ELEVATOR_TASK_INDEX);
|
||||||
agvTaskService.createAgvTask(null, agvTask.getCarrierCode(), agvTask.getEndCode(), endCode, null, BusinessTypeEnum.OUTBOUND.getValue(), 0, AgvVendorEnum.HIK.getValue());
|
agvTaskService.createAgvTask(null, agvTask.getCarrierCode(), agvTask.getEndCode(), endCode, null, BusinessTypeEnum.OUTBOUND.getValue(), 0, AgvVendorEnum.HIK.getValue());
|
||||||
}*/
|
}*/
|
||||||
}else if(BusinessTypeEnum.MOVE.getValue().equals(agvTask.getType())){
|
} else if (BusinessTypeEnum.MOVE.getValue().equals(agvTask.getType())) {
|
||||||
List<Task> tasks = taskMapper.queryByAgvTask(agvTask.getId());
|
List<Task> tasks = taskMapper.queryByAgvTask(agvTask.getId());
|
||||||
inventoryService.moveInventory(tasks);
|
inventoryService.moveInventory(tasks);
|
||||||
}
|
}
|
||||||
|
|
@ -253,9 +253,9 @@ public class ITesAgvServiceImpl implements ITesAgvService {
|
||||||
* @param agvTask 任务
|
* @param agvTask 任务
|
||||||
*/
|
*/
|
||||||
private void handleCelled(AgvTask agvTask) {
|
private void handleCelled(AgvTask agvTask) {
|
||||||
if(BusinessTypeEnum.INBOUND.getValue().equals(agvTask.getType()) || BusinessTypeEnum.MOVE.getValue().equals(agvTask.getType())){
|
if (BusinessTypeEnum.INBOUND.getValue().equals(agvTask.getType()) || BusinessTypeEnum.MOVE.getValue().equals(agvTask.getType())) {
|
||||||
Point point = pointMapper.queryByPointCode(agvTask.getEndCode());
|
Point point = pointMapper.queryByPointCode(agvTask.getEndCode());
|
||||||
if(point!=null){
|
if (point != null) {
|
||||||
point.setStatus(CommonStatusEnum.FREE.getValue());
|
point.setStatus(CommonStatusEnum.FREE.getValue());
|
||||||
pointMapper.updateById(point);
|
pointMapper.updateById(point);
|
||||||
}
|
}
|
||||||
|
|
@ -275,17 +275,14 @@ public class ITesAgvServiceImpl implements ITesAgvService {
|
||||||
throw new RuntimeException("任务已重新生成,请勿重复操作! ");
|
throw new RuntimeException("任务已重新生成,请勿重复操作! ");
|
||||||
}
|
}
|
||||||
|
|
||||||
AgvTask newAgvTask = agvTaskService.createAgvTask(agvTask.getBusinessDetailId(), agvTask.getCarrierCode(), agvTask.getStartCode(), agvTask.getEndCode(), null, agvTask.getType(), agvTask.getIzAll(), AgvVendorEnum.TES.getValue());
|
AgvTask newAgvTask = agvTaskService.createAgvTask(agvTask.getConNo(), agvTask.getItemId(), agvTask.getBusinessDetailId(), agvTask.getCarrierCode(), agvTask.getStartCode(), agvTask.getEndCode(), null, agvTask.getType(), agvTask.getIzAll(), AgvVendorEnum.TES.getValue());
|
||||||
if(BusinessTypeEnum.INBOUND.getValue().equals(agvTask.getType()) || BusinessTypeEnum.MOVE.getValue().equals(agvTask.getType())){
|
if (BusinessTypeEnum.INBOUND.getValue().equals(agvTask.getType())) {
|
||||||
Point point = pointMapper.queryByPointCode(agvTask.getEndCode());
|
inBoundAgvTask(agvTask);
|
||||||
point.setStatus(CommonStatusEnum.USED.getValue());
|
} else if (BusinessTypeEnum.OUTBOUND.getValue().equals(agvTask.getType())) {
|
||||||
pointMapper.updateById(point);
|
outBoundAgvTask(newAgvTask, agvTask);
|
||||||
}else if(BusinessTypeEnum.OUTBOUND.getValue().equals(agvTask.getType())){
|
} else if (BusinessTypeEnum.MOVE.getValue().equals(agvTask.getType())) {
|
||||||
List<Task> tasks=taskMapper.queryByAgvTask(agvTask.getId());
|
inBoundAgvTask(agvTask);
|
||||||
for (Task task:tasks){
|
outBoundAgvTask(newAgvTask, agvTask);
|
||||||
task.setAgvTaskId(newAgvTask.getId());
|
|
||||||
}
|
|
||||||
taskMapper.updateById(tasks);
|
|
||||||
}
|
}
|
||||||
switch (agvTask.getType()) {
|
switch (agvTask.getType()) {
|
||||||
case "INBOUND":
|
case "INBOUND":
|
||||||
|
|
@ -299,6 +296,20 @@ public class ITesAgvServiceImpl implements ITesAgvService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void inBoundAgvTask(AgvTask agvTask) {
|
||||||
|
Point point = pointMapper.queryByPointCode(agvTask.getEndCode());
|
||||||
|
point.setStatus(CommonStatusEnum.USED.getValue());
|
||||||
|
pointMapper.updateById(point);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void outBoundAgvTask(AgvTask newAgvTask, AgvTask agvTask) {
|
||||||
|
List<Task> tasks = taskMapper.queryByAgvTask(agvTask.getId());
|
||||||
|
for (Task task : tasks) {
|
||||||
|
task.setAgvTaskId(newAgvTask.getId());
|
||||||
|
}
|
||||||
|
taskMapper.updateById(tasks);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新任务状态
|
* 更新任务状态
|
||||||
|
|
|
||||||
|
|
@ -342,26 +342,28 @@ public class BatchUtil {
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public void saveBatchAgvTask(List<AgvTask> agvTasks) {
|
public void saveBatchAgvTask(List<AgvTask> agvTasks) {
|
||||||
String sql = "INSERT INTO data_agv_task (id,business_detail_id,carrier_code,carrier_type,task_type,type,status,priority,start_code,end_code,iz_all,agv_vendor,sys_org_code,tenant_id,create_by,create_time) " +
|
String sql = "INSERT INTO data_agv_task (id,con_no,item_id,business_detail_id,carrier_code,carrier_type,task_type,type,status,priority,start_code,end_code,iz_all,agv_vendor,sys_org_code,tenant_id,create_by,create_time) " +
|
||||||
"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
batchInsert(sql, agvTasks, (ps, agvTask) -> {
|
batchInsert(sql, agvTasks, (ps, agvTask) -> {
|
||||||
try {
|
try {
|
||||||
ps.setLong(1, agvTask.getId());
|
ps.setLong(1, agvTask.getId());
|
||||||
ps.setObject(2, agvTask.getBusinessDetailId());
|
ps.setString(2, agvTask.getConNo());
|
||||||
ps.setString(3, agvTask.getCarrierCode());
|
ps.setLong(3, agvTask.getItemId());
|
||||||
ps.setString(4, agvTask.getCarrierType());
|
ps.setObject(4, agvTask.getBusinessDetailId());
|
||||||
ps.setString(5, agvTask.getTaskType());
|
ps.setString(5, agvTask.getCarrierCode());
|
||||||
ps.setString(6, agvTask.getType());
|
ps.setString(6, agvTask.getCarrierType());
|
||||||
ps.setInt(7, agvTask.getStatus());
|
ps.setString(7, agvTask.getTaskType());
|
||||||
ps.setInt(8, agvTask.getPriority());
|
ps.setString(8, agvTask.getType());
|
||||||
ps.setString(9, agvTask.getStartCode());
|
ps.setInt(9, agvTask.getStatus());
|
||||||
ps.setString(10, agvTask.getEndCode());
|
ps.setInt(10, agvTask.getPriority());
|
||||||
ps.setInt(11, agvTask.getIzAll());
|
ps.setString(11, agvTask.getStartCode());
|
||||||
ps.setString(12, agvTask.getAgvVendor());
|
ps.setString(12, agvTask.getEndCode());
|
||||||
ps.setString(13, agvTask.getSysOrgCode());
|
ps.setInt(13, agvTask.getIzAll());
|
||||||
ps.setLong(14, agvTask.getTenantId());
|
ps.setString(14, agvTask.getAgvVendor());
|
||||||
ps.setString(15, agvTask.getCreateBy());
|
ps.setString(15, agvTask.getSysOrgCode());
|
||||||
ps.setTimestamp(16, new Timestamp(agvTask.getCreateTime().getTime()));
|
ps.setLong(16, agvTask.getTenantId());
|
||||||
|
ps.setString(17, agvTask.getCreateBy());
|
||||||
|
ps.setTimestamp(18, new Timestamp(agvTask.getCreateTime().getTime()));
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ spring:
|
||||||
jdbc:
|
jdbc:
|
||||||
initialize-schema: embedded
|
initialize-schema: embedded
|
||||||
#定时任务启动开关,true-开 false-关
|
#定时任务启动开关,true-开 false-关
|
||||||
auto-startup: false
|
auto-startup: true
|
||||||
#延迟1秒启动定时任务
|
#延迟1秒启动定时任务
|
||||||
startup-delay: 1s
|
startup-delay: 1s
|
||||||
#启动时更新己存在的Job
|
#启动时更新己存在的Job
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue