货位信息初始化

This commit is contained in:
liuhanqing
2025-09-23 14:10:14 +08:00
parent 543c7a6feb
commit 00e807f71c
11 changed files with 845 additions and 29 deletions

View File

@@ -0,0 +1,104 @@
package com.ruoyi.bas.cargospace.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 库存信息Controller
*
* @author ruoyi
* @date 2025-09-23
*/
@RestController
@RequestMapping("/bas/cargoSpace")
public class BasCargoSpaceController extends BaseController
{
@Autowired
private IBasCargoSpaceService basCargoSpaceService;
/**
* 查询库存信息列表
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:list')")
@GetMapping("/list")
public TableDataInfo list(BasCargoSpace basCargoSpace)
{
startPage();
List<BasCargoSpace> list = basCargoSpaceService.selectBasCargoSpaceList(basCargoSpace);
return getDataTable(list);
}
/**
* 导出库存信息列表
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:export')")
@Log(title = "库存信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BasCargoSpace basCargoSpace)
{
List<BasCargoSpace> list = basCargoSpaceService.selectBasCargoSpaceList(basCargoSpace);
ExcelUtil<BasCargoSpace> util = new ExcelUtil<BasCargoSpace>(BasCargoSpace.class);
util.exportExcel(response, list, "库存信息数据");
}
/**
* 获取库存信息详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:query')")
@GetMapping(value = "/{cargoSpaceId}")
public AjaxResult getInfo(@PathVariable("cargoSpaceId") String cargoSpaceId)
{
return success(basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId));
}
/**
* 新增库存信息
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:add')")
@Log(title = "库存信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BasCargoSpace basCargoSpace)
{
return toAjax(basCargoSpaceService.insertBasCargoSpace(basCargoSpace));
}
/**
* 修改库存信息
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:edit')")
@Log(title = "库存信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BasCargoSpace basCargoSpace)
{
return toAjax(basCargoSpaceService.updateBasCargoSpace(basCargoSpace));
}
/**
* 删除库存信息
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:remove')")
@Log(title = "库存信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{cargoSpaceIds}")
public AjaxResult remove(@PathVariable String[] cargoSpaceIds)
{
return toAjax(basCargoSpaceService.deleteBasCargoSpaceByCargoSpaceIds(cargoSpaceIds));
}
}

View File

@@ -0,0 +1,324 @@
package com.ruoyi.bas.cargospace.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 库存信息对象 bas_cargo_space
*
* @author ruoyi
* @date 2025-09-23
*/
public class BasCargoSpace extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 货位id 主键 */
private String cargoSpaceId;
/** 仓库id(不允许为空) */
@Excel(name = "仓库id", readConverterExp = "不=允许为空")
private String warehouseId;
/** 巷道id(允许为空) */
@Excel(name = "巷道id", readConverterExp = "允=许为空")
private String roadwayId;
/** 货区id(允许为空) */
@Excel(name = "货区id", readConverterExp = "允=许为空")
private String cargoAreaId;
/** 货位类型(允许为空) */
@Excel(name = "货位类型", readConverterExp = "允=许为空")
private String theType;
/** 货位类型名称 */
@Excel(name = "货位类型名称")
private String theTypeName;
/** 货位名称(不允许为空) */
@Excel(name = "货位名称", readConverterExp = "不=允许为空")
private String cargoSpaceName;
/** 排(不允许为空) */
@Excel(name = "排", readConverterExp = "不=允许为空")
private Long thePlatoon;
/** 列(不允许为空) */
@Excel(name = "列", readConverterExp = "不=允许为空")
private Long theColumn;
/** 层(不允许为空) */
@Excel(name = "层", readConverterExp = "不=允许为空")
private Long theFloor;
/** 货位状态1空2满 3入库分配 4出库分配 5入库盘点 6出库盘点 */
@Excel(name = "货位状态1空2满 3入库分配 4出库分配 5入库盘点 6出库盘点")
private String status;
/** 是否锁定(不允许为空)
Y锁、N开 */
@Excel(name = "是否锁定", readConverterExp = "不=允许为空")
private String locked;
/** 托盘条码(允许为空) */
@Excel(name = "托盘条码", readConverterExp = "允=许为空")
private String trayCode;
/** 货位高度 */
@Excel(name = "货位高度")
private String cargoHight;
/** 是否双伸 Y N */
@Excel(name = "是否双伸 Y N ")
private String issDouble;
/** 双货位分组编码(标识区分) */
@Excel(name = "双货位分组编码", readConverterExp = "标=识区分")
private String groupCodingNo;
/** 双货位分组编码1、2… */
@Excel(name = "双货位分组编码1、2… ")
private String groupCoding;
/** 双货位标识 0 外1内 */
@Excel(name = "双货位标识 0 外1内")
private String cargoSpaceLogo;
/** 本仓库区域 1--8 A
9--15 B */
@Excel(name = "本仓库区域")
private String thisCargoArea;
/** wms货位id */
@Excel(name = "wms货位id")
private String wmsCargoSpaceId;
public void setCargoSpaceId(String cargoSpaceId)
{
this.cargoSpaceId = cargoSpaceId;
}
public String getCargoSpaceId()
{
return cargoSpaceId;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setRoadwayId(String roadwayId)
{
this.roadwayId = roadwayId;
}
public String getRoadwayId()
{
return roadwayId;
}
public void setCargoAreaId(String cargoAreaId)
{
this.cargoAreaId = cargoAreaId;
}
public String getCargoAreaId()
{
return cargoAreaId;
}
public void setTheType(String theType)
{
this.theType = theType;
}
public String getTheType()
{
return theType;
}
public void setTheTypeName(String theTypeName)
{
this.theTypeName = theTypeName;
}
public String getTheTypeName()
{
return theTypeName;
}
public void setCargoSpaceName(String cargoSpaceName)
{
this.cargoSpaceName = cargoSpaceName;
}
public String getCargoSpaceName()
{
return cargoSpaceName;
}
public void setThePlatoon(Long thePlatoon)
{
this.thePlatoon = thePlatoon;
}
public Long getThePlatoon()
{
return thePlatoon;
}
public void setTheColumn(Long theColumn)
{
this.theColumn = theColumn;
}
public Long getTheColumn()
{
return theColumn;
}
public void setTheFloor(Long theFloor)
{
this.theFloor = theFloor;
}
public Long getTheFloor()
{
return theFloor;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setLocked(String locked)
{
this.locked = locked;
}
public String getLocked()
{
return locked;
}
public void setTrayCode(String trayCode)
{
this.trayCode = trayCode;
}
public String getTrayCode()
{
return trayCode;
}
public void setCargoHight(String cargoHight)
{
this.cargoHight = cargoHight;
}
public String getCargoHight()
{
return cargoHight;
}
public void setIssDouble(String issDouble)
{
this.issDouble = issDouble;
}
public String getIssDouble()
{
return issDouble;
}
public void setGroupCodingNo(String groupCodingNo)
{
this.groupCodingNo = groupCodingNo;
}
public String getGroupCodingNo()
{
return groupCodingNo;
}
public void setGroupCoding(String groupCoding)
{
this.groupCoding = groupCoding;
}
public String getGroupCoding()
{
return groupCoding;
}
public void setCargoSpaceLogo(String cargoSpaceLogo)
{
this.cargoSpaceLogo = cargoSpaceLogo;
}
public String getCargoSpaceLogo()
{
return cargoSpaceLogo;
}
public void setThisCargoArea(String thisCargoArea)
{
this.thisCargoArea = thisCargoArea;
}
public String getThisCargoArea()
{
return thisCargoArea;
}
public void setWmsCargoSpaceId(String wmsCargoSpaceId)
{
this.wmsCargoSpaceId = wmsCargoSpaceId;
}
public String getWmsCargoSpaceId()
{
return wmsCargoSpaceId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("cargoSpaceId", getCargoSpaceId())
.append("warehouseId", getWarehouseId())
.append("roadwayId", getRoadwayId())
.append("cargoAreaId", getCargoAreaId())
.append("theType", getTheType())
.append("theTypeName", getTheTypeName())
.append("cargoSpaceName", getCargoSpaceName())
.append("thePlatoon", getThePlatoon())
.append("theColumn", getTheColumn())
.append("theFloor", getTheFloor())
.append("status", getStatus())
.append("locked", getLocked())
.append("trayCode", getTrayCode())
.append("cargoHight", getCargoHight())
.append("issDouble", getIssDouble())
.append("groupCodingNo", getGroupCodingNo())
.append("groupCoding", getGroupCoding())
.append("cargoSpaceLogo", getCargoSpaceLogo())
.append("thisCargoArea", getThisCargoArea())
.append("wmsCargoSpaceId", getWmsCargoSpaceId())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.cargospace.mapper;
import java.util.List;
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
/**
* 库存信息Mapper接口
*
* @author ruoyi
* @date 2025-09-23
*/
public interface BasCargoSpaceMapper
{
/**
* 查询库存信息
*
* @param cargoSpaceId 库存信息主键
* @return 库存信息
*/
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
/**
* 查询库存信息列表
*
* @param basCargoSpace 库存信息
* @return 库存信息集合
*/
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace);
/**
* 新增库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
public int insertBasCargoSpace(BasCargoSpace basCargoSpace);
/**
* 修改库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
public int updateBasCargoSpace(BasCargoSpace basCargoSpace);
/**
* 删除库存信息
*
* @param cargoSpaceId 库存信息主键
* @return 结果
*/
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
/**
* 批量删除库存信息
*
* @param cargoSpaceIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.cargospace.service;
import java.util.List;
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
/**
* 库存信息Service接口
*
* @author ruoyi
* @date 2025-09-23
*/
public interface IBasCargoSpaceService
{
/**
* 查询库存信息
*
* @param cargoSpaceId 库存信息主键
* @return 库存信息
*/
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
/**
* 查询库存信息列表
*
* @param basCargoSpace 库存信息
* @return 库存信息集合
*/
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace);
/**
* 新增库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
public int insertBasCargoSpace(BasCargoSpace basCargoSpace);
/**
* 修改库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
public int updateBasCargoSpace(BasCargoSpace basCargoSpace);
/**
* 批量删除库存信息
*
* @param cargoSpaceIds 需要删除的库存信息主键集合
* @return 结果
*/
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
/**
* 删除库存信息信息
*
* @param cargoSpaceId 库存信息主键
* @return 结果
*/
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.bas.cargospace.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.cargospace.mapper.BasCargoSpaceMapper;
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
/**
* 库存信息Service业务层处理
*
* @author ruoyi
* @date 2025-09-23
*/
@Service
public class BasCargoSpaceServiceImpl implements IBasCargoSpaceService
{
@Autowired
private BasCargoSpaceMapper basCargoSpaceMapper;
/**
* 查询库存信息
*
* @param cargoSpaceId 库存信息主键
* @return 库存信息
*/
@Override
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId)
{
return basCargoSpaceMapper.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
}
/**
* 查询库存信息列表
*
* @param basCargoSpace 库存信息
* @return 库存信息
*/
@Override
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace)
{
return basCargoSpaceMapper.selectBasCargoSpaceList(basCargoSpace);
}
/**
* 新增库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
@Override
public int insertBasCargoSpace(BasCargoSpace basCargoSpace)
{
return basCargoSpaceMapper.insertBasCargoSpace(basCargoSpace);
}
/**
* 修改库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
@Override
public int updateBasCargoSpace(BasCargoSpace basCargoSpace)
{
return basCargoSpaceMapper.updateBasCargoSpace(basCargoSpace);
}
/**
* 批量删除库存信息
*
* @param cargoSpaceIds 需要删除的库存信息主键
* @return 结果
*/
@Override
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds)
{
return basCargoSpaceMapper.deleteBasCargoSpaceByCargoSpaceIds(cargoSpaceIds);
}
/**
* 删除库存信息信息
*
* @param cargoSpaceId 库存信息主键
* @return 结果
*/
@Override
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId)
{
return basCargoSpaceMapper.deleteBasCargoSpaceByCargoSpaceId(cargoSpaceId);
}
}

View File

@@ -3,6 +3,7 @@ package com.ruoyi.job.mapper;
import java.util.HashMap;
import java.util.List;
import com.ruoyi.job.domain.MydoJob;
import org.apache.ibatis.annotations.Param;
/**
* 作业信息Mapper接口
@@ -63,4 +64,6 @@ public interface MydoJobMapper
void ddjTaskFinish(HashMap<String, Object> map);
void InvalidMydoJob(HashMap<String, Object> map);
MydoJob selectMydoJobByExitList(@Param("exitList") List<String> exitList);
}

View File

@@ -64,4 +64,6 @@ public interface IMydoJobService
boolean ddjTaskFinish(Long rwh, Integer id);
boolean InvalidMydoJob(Long rwh, Integer id);
MydoJob selectMydoJobByExitList(List<String> exitList);
}

View File

@@ -126,4 +126,9 @@ public class MydoJobServiceImpl implements IMydoJobService
throw new RuntimeException(map.get("v_result").toString());
}
}
@Override
public MydoJob selectMydoJobByExitList(List<String> exitList) {
return mydoJobMapper.selectMydoJobByExitList(exitList);
}
}

View File

@@ -1,7 +1,10 @@
package com.ruoyi.schedule.scheduleTask.ssj.floor1;
import cn.hutool.core.util.ObjUtil;
import com.ruoyi.api.service.IApiService;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.job.domain.MydoJob;
import com.ruoyi.job.service.IMydoJobService;
import com.ruoyi.queue.agv.service.IAgvQueueService;
import com.ruoyi.device.ssj.domain.DeviceSsj;
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
@@ -10,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 一楼单向出库线程 循环出库作业+巷道口空闲 生成堆垛机出库队列
@@ -20,20 +24,26 @@ public class Floor1SingleSsjThread implements Runnable {
public HashMap<String, List<String>> ssjCodeList;
private IApiService apiService;
private IAgvQueueService agvQueueService;
private IMydoJobService mydoJobService;
public boolean isRun = true;
private Map<String,String> exitRoadwayMap = new HashMap<>();
public void init() {
ssjCodeList = new HashMap<>();
ArrayList<String> ssjCodes = new ArrayList<>();
ssjCodes.add("L1002");
ssjCodes.add("L1004");
ssjCodeList.put("in", ssjCodes);
ssjCodes.add("L2001");
ssjCodes.add("L2007");
ssjCodeList.put("outRoadwaySsj", ssjCodes);
apiService = SpringUtils.getBean(IApiService.class);
agvQueueService = SpringUtils.getBean(IAgvQueueService.class);
log.info("初始化服务 {},{}", apiService, agvQueueService);
mydoJobService = SpringUtils.getBean(IMydoJobService.class);
exitRoadwayMap.put("L2001","L2011");
exitRoadwayMap.put("L2007","L2014");
log.info("初始化服务 {},{}", apiService, mydoJobService);
}
@Override
@@ -41,23 +51,20 @@ public class Floor1SingleSsjThread implements Runnable {
init();
while (isRun){
for (String type : ssjCodeList.keySet()) {
switch ( type){
case "in":
//生产线入库
for (String ssjCode : ssjCodeList.get(type)) {
try {
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
inDispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
} else {
log.error("设备不存在 ssjCode{}", ssjCode);
}
} catch (RuntimeException e) {
log.error(e.getMessage(),e);
//一楼单向出库口
if ("outRoadwaySsj".equals(type)) {
for (String ssjCode : ssjCodeList.get(type)) {
try {
if (PlcSsjRead.deviceSsjMap.containsKey(ssjCode)) {
dispatch(PlcSsjRead.deviceSsjMap.get(ssjCode));
} else {
log.error("设备不存在 ssjCode{}", ssjCode);
}
} catch (RuntimeException e) {
log.error(e.getMessage(), e);
}
break;
}
}
}
try {
@@ -70,15 +77,14 @@ public class Floor1SingleSsjThread implements Runnable {
}
public void inDispatch(DeviceSsj inSsjDevice) {
public void dispatch(DeviceSsj ssj) {
//如果入库请求1 并且 托盘码不为空
if (inSsjDevice.getDw() == 1 && inSsjDevice.getTaskNo() > 0 && inSsjDevice.getRkqq() == 1) {
//查询货位 排列层
//查询入口 排列层
//生成堆垛机队列
if (ssj.getKx()==1){
String exitId = exitRoadwayMap.get(ssj.getDeviceCode());
MydoJob mydoJob = mydoJobService.selectMydoJobByExitList(List.of(exitId));
if (ObjUtil.isNotNull(mydoJob)){
//生成队列
}
}
}

View File

@@ -0,0 +1,148 @@
<?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="com.ruoyi.bas.cargospace.mapper.BasCargoSpaceMapper">
<resultMap type="BasCargoSpace" id="BasCargoSpaceResult">
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="roadwayId" column="roadway_id" />
<result property="cargoAreaId" column="cargo_area_id" />
<result property="theType" column="the_type" />
<result property="theTypeName" column="the_type_name" />
<result property="cargoSpaceName" column="cargo_space_name" />
<result property="thePlatoon" column="the_platoon" />
<result property="theColumn" column="the_column" />
<result property="theFloor" column="the_floor" />
<result property="status" column="status" />
<result property="locked" column="locked" />
<result property="trayCode" column="tray_code" />
<result property="cargoHight" column="cargo_hight" />
<result property="issDouble" column="iss_double" />
<result property="groupCodingNo" column="group_coding_no" />
<result property="groupCoding" column="group_coding" />
<result property="cargoSpaceLogo" column="cargo_space_logo" />
<result property="thisCargoArea" column="this_cargo_area" />
<result property="wmsCargoSpaceId" column="wms_cargo_space_id" />
</resultMap>
<sql id="selectBasCargoSpaceVo">
select cargo_space_id, warehouse_id, roadway_id, cargo_area_id, the_type, the_type_name, cargo_space_name, the_platoon, the_column, the_floor, status, locked, tray_code, cargo_hight, iss_double, group_coding_no, group_coding, cargo_space_logo, this_cargo_area, wms_cargo_space_id from bas_cargo_space
</sql>
<select id="selectBasCargoSpaceList" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
<include refid="selectBasCargoSpaceVo"/>
<where>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
<if test="cargoAreaId != null and cargoAreaId != ''"> and cargo_area_id = #{cargoAreaId}</if>
<if test="theType != null and theType != ''"> and the_type = #{theType}</if>
<if test="theTypeName != null and theTypeName != ''"> and the_type_name like concat('%', #{theTypeName}, '%')</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and the_column = #{theColumn}</if>
<if test="theFloor != null "> and the_floor = #{theFloor}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="locked != null and locked != ''"> and locked = #{locked}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="cargoHight != null and cargoHight != ''"> and cargo_hight = #{cargoHight}</if>
<if test="issDouble != null and issDouble != ''"> and iss_double = #{issDouble}</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and group_coding_no = #{groupCodingNo}</if>
<if test="groupCoding != null and groupCoding != ''"> and group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="thisCargoArea != null and thisCargoArea != ''"> and this_cargo_area = #{thisCargoArea}</if>
<if test="wmsCargoSpaceId != null and wmsCargoSpaceId != ''"> and wms_cargo_space_id = #{wmsCargoSpaceId}</if>
</where>
</select>
<select id="selectBasCargoSpaceByCargoSpaceId" parameterType="String" resultMap="BasCargoSpaceResult">
<include refid="selectBasCargoSpaceVo"/>
where cargo_space_id = #{cargoSpaceId}
</select>
<insert id="insertBasCargoSpace" parameterType="BasCargoSpace">
insert into bas_cargo_space
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cargoSpaceId != null">cargo_space_id,</if>
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
<if test="roadwayId != null">roadway_id,</if>
<if test="cargoAreaId != null">cargo_area_id,</if>
<if test="theType != null">the_type,</if>
<if test="theTypeName != null">the_type_name,</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''">cargo_space_name,</if>
<if test="thePlatoon != null">the_platoon,</if>
<if test="theColumn != null">the_column,</if>
<if test="theFloor != null">the_floor,</if>
<if test="status != null and status != ''">status,</if>
<if test="locked != null and locked != ''">locked,</if>
<if test="trayCode != null">tray_code,</if>
<if test="cargoHight != null">cargo_hight,</if>
<if test="issDouble != null">iss_double,</if>
<if test="groupCodingNo != null">group_coding_no,</if>
<if test="groupCoding != null">group_coding,</if>
<if test="cargoSpaceLogo != null">cargo_space_logo,</if>
<if test="thisCargoArea != null">this_cargo_area,</if>
<if test="wmsCargoSpaceId != null">wms_cargo_space_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
<if test="roadwayId != null">#{roadwayId},</if>
<if test="cargoAreaId != null">#{cargoAreaId},</if>
<if test="theType != null">#{theType},</if>
<if test="theTypeName != null">#{theTypeName},</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''">#{cargoSpaceName},</if>
<if test="thePlatoon != null">#{thePlatoon},</if>
<if test="theColumn != null">#{theColumn},</if>
<if test="theFloor != null">#{theFloor},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="locked != null and locked != ''">#{locked},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="cargoHight != null">#{cargoHight},</if>
<if test="issDouble != null">#{issDouble},</if>
<if test="groupCodingNo != null">#{groupCodingNo},</if>
<if test="groupCoding != null">#{groupCoding},</if>
<if test="cargoSpaceLogo != null">#{cargoSpaceLogo},</if>
<if test="thisCargoArea != null">#{thisCargoArea},</if>
<if test="wmsCargoSpaceId != null">#{wmsCargoSpaceId},</if>
</trim>
</insert>
<update id="updateBasCargoSpace" parameterType="BasCargoSpace">
update bas_cargo_space
<trim prefix="SET" suffixOverrides=",">
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
<if test="cargoAreaId != null">cargo_area_id = #{cargoAreaId},</if>
<if test="theType != null">the_type = #{theType},</if>
<if test="theTypeName != null">the_type_name = #{theTypeName},</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''">cargo_space_name = #{cargoSpaceName},</if>
<if test="thePlatoon != null">the_platoon = #{thePlatoon},</if>
<if test="theColumn != null">the_column = #{theColumn},</if>
<if test="theFloor != null">the_floor = #{theFloor},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="locked != null and locked != ''">locked = #{locked},</if>
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="cargoHight != null">cargo_hight = #{cargoHight},</if>
<if test="issDouble != null">iss_double = #{issDouble},</if>
<if test="groupCodingNo != null">group_coding_no = #{groupCodingNo},</if>
<if test="groupCoding != null">group_coding = #{groupCoding},</if>
<if test="cargoSpaceLogo != null">cargo_space_logo = #{cargoSpaceLogo},</if>
<if test="thisCargoArea != null">this_cargo_area = #{thisCargoArea},</if>
<if test="wmsCargoSpaceId != null">wms_cargo_space_id = #{wmsCargoSpaceId},</if>
</trim>
where cargo_space_id = #{cargoSpaceId}
</update>
<delete id="deleteBasCargoSpaceByCargoSpaceId" parameterType="String">
delete from bas_cargo_space where cargo_space_id = #{cargoSpaceId}
</delete>
<delete id="deleteBasCargoSpaceByCargoSpaceIds" parameterType="String">
delete from bas_cargo_space where cargo_space_id in
<foreach item="cargoSpaceId" collection="array" open="(" separator="," close=")">
#{cargoSpaceId}
</foreach>
</delete>
</mapper>

View File

@@ -69,6 +69,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
</select>
<select id="selectMydoJobByExitList" resultMap="MydoJobResult">
select TOP 1 job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag from mydo_job_wcs
where exit_id in
<foreach item="item" index="index" collection="exitList" separator="," open="(" close=")">
#{item}
</foreach>
and in_or_out > 20
order by priority desc,create_time desc
</select>
<insert id="insertMydoJob" parameterType="MydoJob">
insert into mydo_job_wcs