手持机部分
This commit is contained in:
@@ -67,4 +67,6 @@ public interface InStockinDetailMapper
|
||||
void insertInStockinDetailHistory(InStockin inStockin);
|
||||
|
||||
void deleteInStockinDetailByStockinGuid(String stockinGuid);
|
||||
|
||||
List<InStockinDetail> selectStockinByDetailById(String stockinDetailId);
|
||||
}
|
||||
|
||||
@@ -78,4 +78,7 @@ public interface IInStockinDetailService
|
||||
void deleteInStockinDetailByStockinGuid(String stockinGuid);
|
||||
|
||||
AjaxResult barcodePrinting(Map<String,Object> stockinDetailId);
|
||||
|
||||
|
||||
public List<InStockinDetail> selectStockinByDetailById(String stockinDetailId);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.in.stockindetail.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -121,4 +122,10 @@ public class InStockinDetailServiceImpl implements IInStockinDetailService
|
||||
//System.out.println(map);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InStockinDetail> selectStockinByDetailById(String stockinDetailId) {
|
||||
return inStockinDetailMapper.selectStockinByDetailById(stockinDetailId);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,12 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.in.stockin.domain.InStockin;
|
||||
import com.ruoyi.in.stockin.service.IInStockinService;
|
||||
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
|
||||
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
|
||||
import com.ruoyi.pda.domain.TrayCodeMsg;
|
||||
import com.ruoyi.pda.service.PdaService;
|
||||
import com.ruoyi.pda.trayMsg.domain.TrayMsg;
|
||||
import com.ruoyi.pda.trayMsg.service.ITrayMsgService;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -31,11 +35,13 @@ public class PdaController extends BaseController {
|
||||
@Autowired
|
||||
private PdaService pdaService;
|
||||
@Autowired
|
||||
private IInStockinService inStockinService;
|
||||
private IInStockinDetailService inStockinDetailService;
|
||||
@Autowired
|
||||
private IBasStockService basStockService;
|
||||
@Autowired
|
||||
private IBasWarehouseService basWarehouseService;
|
||||
@Autowired
|
||||
private ITrayMsgService trayMsgService;
|
||||
|
||||
/**
|
||||
* 空托盘入库
|
||||
@@ -116,12 +122,54 @@ public class PdaController extends BaseController {
|
||||
return pdaService.emptyBoxOut(trayCodeMsg);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/inorder/list")
|
||||
/**
|
||||
* 绑盘查询入库单详情
|
||||
* @param stockinDetailId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/inorder/detail")
|
||||
@ResponseBody
|
||||
public List<InStockin> inoderList(String stockinDetailId) {
|
||||
List<InStockin> stockins = inStockinService.selectStockinByDetail(stockinDetailId);
|
||||
return stockins;
|
||||
public List<InStockinDetail> inoderList(String stockinDetailId) {
|
||||
List<InStockinDetail> inStockinDetail = inStockinDetailService.selectStockinByDetailById(stockinDetailId);
|
||||
return inStockinDetail;
|
||||
}
|
||||
/**
|
||||
* 绑定托盘物料
|
||||
*/
|
||||
@RequestMapping("/bindTrayMsg")
|
||||
@ResponseBody
|
||||
public AjaxResult bindTrayMsg(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||
return pdaService.bindTrayMsg(trayCodeMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询托盘已绑定物料
|
||||
*/
|
||||
@RequestMapping("/bindMsg")
|
||||
@ResponseBody
|
||||
public AjaxResult bindMsg(String trayCode) {
|
||||
TrayMsg trayMsg = new TrayMsg();
|
||||
trayMsg.setTrayCode(trayCode);
|
||||
List<TrayMsg> trayMsgs = trayMsgService.selectTrayMsgList(trayMsg);
|
||||
return AjaxResult.success(trayMsgs);
|
||||
}
|
||||
/**
|
||||
* 确认入库
|
||||
*/
|
||||
@RequestMapping("/addInJob")
|
||||
@ResponseBody
|
||||
public AjaxResult addInJob(@RequestBody TrayCodeMsg trayCodeMsg) {
|
||||
BasWarehouse basWarehouse = basWarehouseService.selectBasWarehouseByWarehouseId(trayCodeMsg.getWarehouseId());
|
||||
if(basWarehouse==null){
|
||||
return AjaxResult.error("仓库不存在");
|
||||
}
|
||||
if("1".equals(basWarehouse.getWarehouseType()) && StrUtil.isEmpty(trayCodeMsg.getCargoSpaceId())){
|
||||
return AjaxResult.error("请选择高架库货位");
|
||||
}
|
||||
if("2".equals(basWarehouse.getWarehouseType()) && StrUtil.isEmpty(trayCodeMsg.getEntranceId())){
|
||||
return AjaxResult.error("请选择入口");
|
||||
}
|
||||
return pdaService.addInJob(trayCodeMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ private String trayCode;
|
||||
|
||||
private String warehouseId;
|
||||
|
||||
private String quantity;
|
||||
private String inQuantity;
|
||||
|
||||
private String entranceId;
|
||||
|
||||
@@ -14,6 +14,16 @@ private String cargoSpaceId;
|
||||
|
||||
private String exitId;
|
||||
|
||||
private String stockinDetailId;
|
||||
|
||||
public String getStockinDetailId() {
|
||||
return stockinDetailId;
|
||||
}
|
||||
|
||||
public void setStockinDetailId(String stockinDetailId) {
|
||||
this.stockinDetailId = stockinDetailId;
|
||||
}
|
||||
|
||||
public String getExitId() {
|
||||
return exitId;
|
||||
}
|
||||
@@ -54,11 +64,11 @@ private String exitId;
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
public String getInQuantity() {
|
||||
return inQuantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
public void setInQuantity(String inQuantity) {
|
||||
this.inQuantity = inQuantity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,8 @@ public interface PdaMapper {
|
||||
void emptyTrayOut(HashMap<String, Object> map);
|
||||
|
||||
void emptyBoxOut(HashMap<String, Object> map);
|
||||
|
||||
void bindTrayMsg(HashMap<String, Object> map);
|
||||
|
||||
void addInJob(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.ruoyi.pda.service;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.pda.domain.TrayCodeMsg;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.aspectj.weaver.loadtime.Aj;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PdaService {
|
||||
|
||||
@@ -13,4 +16,13 @@ public interface PdaService {
|
||||
public AjaxResult emptyTrayOut(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
public AjaxResult emptyBoxOut(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
public AjaxResult bindTrayMsg(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
public AjaxResult addInJob(TrayCodeMsg trayCodeMsg);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ import com.ruoyi.pda.domain.TrayCodeMsg;
|
||||
import com.ruoyi.pda.mapper.PdaMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class PdaServiceImp implements PdaService{
|
||||
@@ -88,4 +91,37 @@ public class PdaServiceImp implements PdaService{
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult bindTrayMsg(TrayCodeMsg trayCodeMsg) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMsg.getTrayCode());
|
||||
map.put("v_stockin_detail_id", trayCodeMsg.getStockinDetailId());
|
||||
map.put("v_quantity", Integer.parseInt(trayCodeMsg.getInQuantity()));
|
||||
pdaMapper.bindTrayMsg(map);
|
||||
String result = map.get("v_result").toString();
|
||||
if("10".equals(result)){
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult addInJob(TrayCodeMsg trayCodeMsg) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_tray_code", trayCodeMsg.getTrayCode());
|
||||
map.put("v_warehouse_id", trayCodeMsg.getWarehouseId());
|
||||
map.put("v_cargo_space_id", trayCodeMsg.getCargoSpaceId());
|
||||
map.put("v_entrance_id", trayCodeMsg.getEntranceId());
|
||||
pdaMapper.addInJob(map);
|
||||
String result = map.get("v_result").toString();
|
||||
if("10".equals(result)){
|
||||
return AjaxResult.success(map.get("v_resultmsg").toString());
|
||||
}else{
|
||||
return AjaxResult.warn(map.get("v_resultmsg").toString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.pda.trayMsg.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.pda.trayMsg.domain.TrayMsg;
|
||||
import com.ruoyi.pda.trayMsg.service.ITrayMsgService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* trayMsgController
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pda/trayMsg")
|
||||
public class TrayMsgController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITrayMsgService trayMsgService;
|
||||
|
||||
/**
|
||||
* 查询trayMsg列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:trayMsg:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TrayMsg trayMsg)
|
||||
{
|
||||
startPage();
|
||||
List<TrayMsg> list = trayMsgService.selectTrayMsgList(trayMsg);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出trayMsg列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:trayMsg:export')")
|
||||
@Log(title = "trayMsg", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TrayMsg trayMsg)
|
||||
{
|
||||
List<TrayMsg> list = trayMsgService.selectTrayMsgList(trayMsg);
|
||||
ExcelUtil<TrayMsg> util = new ExcelUtil<TrayMsg>(TrayMsg.class);
|
||||
util.exportExcel(response, list, "trayMsg数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取trayMsg详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:trayMsg:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(trayMsgService.selectTrayMsgById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增trayMsg
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:trayMsg:add')")
|
||||
@Log(title = "trayMsg", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TrayMsg trayMsg)
|
||||
{
|
||||
return toAjax(trayMsgService.insertTrayMsg(trayMsg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改trayMsg
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:trayMsg:edit')")
|
||||
@Log(title = "trayMsg", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TrayMsg trayMsg)
|
||||
{
|
||||
return toAjax(trayMsgService.updateTrayMsg(trayMsg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除trayMsg
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pda:trayMsg:remove')")
|
||||
@Log(title = "trayMsg", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(trayMsgService.deleteTrayMsgByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.ruoyi.pda.trayMsg.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;
|
||||
|
||||
/**
|
||||
* trayMsg对象 tray_msg
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
public class TrayMsg extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 序号 */
|
||||
private String id;
|
||||
|
||||
/** 托盘条码 */
|
||||
@Excel(name = "托盘条码")
|
||||
private String trayCode;
|
||||
|
||||
/** 子单编码 */
|
||||
@Excel(name = "子单编码")
|
||||
private String stockinDetailId;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private String quantity;
|
||||
|
||||
private String productName;
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode)
|
||||
{
|
||||
this.trayCode = trayCode;
|
||||
}
|
||||
|
||||
public String getTrayCode()
|
||||
{
|
||||
return trayCode;
|
||||
}
|
||||
|
||||
public void setStockinDetailId(String stockinDetailId)
|
||||
{
|
||||
this.stockinDetailId = stockinDetailId;
|
||||
}
|
||||
|
||||
public String getStockinDetailId()
|
||||
{
|
||||
return stockinDetailId;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("trayCode", getTrayCode())
|
||||
.append("stockinDetailId", getStockinDetailId())
|
||||
.append("quantity", getQuantity())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.pda.trayMsg.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.pda.trayMsg.domain.TrayMsg;
|
||||
|
||||
/**
|
||||
* trayMsgMapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
public interface TrayMsgMapper
|
||||
{
|
||||
/**
|
||||
* 查询trayMsg
|
||||
*
|
||||
* @param id trayMsg主键
|
||||
* @return trayMsg
|
||||
*/
|
||||
public TrayMsg selectTrayMsgById(String id);
|
||||
|
||||
/**
|
||||
* 查询trayMsg列表
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return trayMsg集合
|
||||
*/
|
||||
public List<TrayMsg> selectTrayMsgList(TrayMsg trayMsg);
|
||||
|
||||
/**
|
||||
* 新增trayMsg
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTrayMsg(TrayMsg trayMsg);
|
||||
|
||||
/**
|
||||
* 修改trayMsg
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTrayMsg(TrayMsg trayMsg);
|
||||
|
||||
/**
|
||||
* 删除trayMsg
|
||||
*
|
||||
* @param id trayMsg主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTrayMsgById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除trayMsg
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTrayMsgByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.pda.trayMsg.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.pda.trayMsg.domain.TrayMsg;
|
||||
|
||||
/**
|
||||
* trayMsgService接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
public interface ITrayMsgService
|
||||
{
|
||||
/**
|
||||
* 查询trayMsg
|
||||
*
|
||||
* @param id trayMsg主键
|
||||
* @return trayMsg
|
||||
*/
|
||||
public TrayMsg selectTrayMsgById(String id);
|
||||
|
||||
/**
|
||||
* 查询trayMsg列表
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return trayMsg集合
|
||||
*/
|
||||
public List<TrayMsg> selectTrayMsgList(TrayMsg trayMsg);
|
||||
|
||||
/**
|
||||
* 新增trayMsg
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTrayMsg(TrayMsg trayMsg);
|
||||
|
||||
/**
|
||||
* 修改trayMsg
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTrayMsg(TrayMsg trayMsg);
|
||||
|
||||
/**
|
||||
* 批量删除trayMsg
|
||||
*
|
||||
* @param ids 需要删除的trayMsg主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTrayMsgByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除trayMsg信息
|
||||
*
|
||||
* @param id trayMsg主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTrayMsgById(String id);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.pda.trayMsg.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.pda.trayMsg.mapper.TrayMsgMapper;
|
||||
import com.ruoyi.pda.trayMsg.domain.TrayMsg;
|
||||
import com.ruoyi.pda.trayMsg.service.ITrayMsgService;
|
||||
|
||||
/**
|
||||
* trayMsgService业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
@Service
|
||||
public class TrayMsgServiceImpl implements ITrayMsgService
|
||||
{
|
||||
@Autowired
|
||||
private TrayMsgMapper trayMsgMapper;
|
||||
|
||||
/**
|
||||
* 查询trayMsg
|
||||
*
|
||||
* @param id trayMsg主键
|
||||
* @return trayMsg
|
||||
*/
|
||||
@Override
|
||||
public TrayMsg selectTrayMsgById(String id)
|
||||
{
|
||||
return trayMsgMapper.selectTrayMsgById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询trayMsg列表
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return trayMsg
|
||||
*/
|
||||
@Override
|
||||
public List<TrayMsg> selectTrayMsgList(TrayMsg trayMsg)
|
||||
{
|
||||
return trayMsgMapper.selectTrayMsgList(trayMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增trayMsg
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTrayMsg(TrayMsg trayMsg)
|
||||
{
|
||||
return trayMsgMapper.insertTrayMsg(trayMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改trayMsg
|
||||
*
|
||||
* @param trayMsg trayMsg
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTrayMsg(TrayMsg trayMsg)
|
||||
{
|
||||
return trayMsgMapper.updateTrayMsg(trayMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除trayMsg
|
||||
*
|
||||
* @param ids 需要删除的trayMsg主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTrayMsgByIds(String[] ids)
|
||||
{
|
||||
return trayMsgMapper.deleteTrayMsgByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除trayMsg信息
|
||||
*
|
||||
* @param id trayMsg主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTrayMsgById(String id)
|
||||
{
|
||||
return trayMsgMapper.deleteTrayMsgById(id);
|
||||
}
|
||||
}
|
||||
@@ -293,4 +293,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<delete id="deleteInStockinDetailByStockinGuid">
|
||||
delete from in_stockin_detail where stockin_guid = #{stockinGuid}
|
||||
</delete>
|
||||
<select id="selectStockinByDetailById" parameterType="string" resultMap="InStockinDetailResult">
|
||||
select
|
||||
isd.stockin_detail_id, isd.stockin_guid, isd.stockin_id, isd.lot_no, isd.product_guid,
|
||||
isd.product_id, isd.quantity-isd.scan_num as quantity, isd.quantity_x, isd.quantity_j, isd.price, isd.cargo_no, isd.remark,
|
||||
isd.assign_num, isd.assign_num_x, isd.assign_num_j, isd.print_date, isd.stock_status,
|
||||
isd.supplier_id, isd.customer_id, isd.unit, isd.spec, isd.spare1, isd.spare2, isd.spare3, isd.spare4,
|
||||
isd.spare5, isd.spare6, isd.scan_num, isd.scan_num_x, isd.scan_num_j,
|
||||
bp.product_name, bp.spare1 as englishDesc,
|
||||
bp.spare2 as netWeight,bp.spare5 as length,bp.spare6 as width,bp.spare7 as height,bp.spare8 as volume
|
||||
from in_stockin_detail isd
|
||||
left join bas_product bp on bp.product_id = isd.product_id
|
||||
left join in_stockin ist on ist.stockin_guid = isd.stockin_guid
|
||||
<where>
|
||||
<if test="stockinDetailId != null and stockinDetailId != '' ">
|
||||
isd.stockin_detail_id = #{stockinDetailId}
|
||||
</if>
|
||||
</where>
|
||||
order by ist.create_date desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -41,4 +41,25 @@
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<select id="bindTrayMsg" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_bind_tray_msg(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_stockin_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_quantity,mode=IN,jdbcType=INTEGER},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
|
||||
<select id="addInJob" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{call proc_add_in_job(
|
||||
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_warehouse_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_cargo_space_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_entrance_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</select>
|
||||
</mapper>
|
||||
71
ruoyi-admin/src/main/resources/mapper/pda/TrayMsgMapper.xml
Normal file
71
ruoyi-admin/src/main/resources/mapper/pda/TrayMsgMapper.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?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.pda.trayMsg.mapper.TrayMsgMapper">
|
||||
|
||||
<resultMap type="TrayMsg" id="TrayMsgResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="productName" column="product_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTrayMsgVo">
|
||||
select id, tray_code, stockin_detail_id, quantity from tray_msg
|
||||
</sql>
|
||||
|
||||
<select id="selectTrayMsgList" parameterType="TrayMsg" resultMap="TrayMsgResult">
|
||||
select t.id, t.tray_code, t.stockin_detail_id, t.quantity,p.product_name from tray_msg t
|
||||
left join in_stockin_detail d on t.stockin_detail_id = d.stockin_detail_id
|
||||
left join bas_product p on d.product_id=p.product_id
|
||||
<where>
|
||||
<if test="trayCode != null and trayCode != ''"> and t.tray_code = #{trayCode}</if>
|
||||
<if test="stockinDetailId != null and stockinDetailId != ''"> and t.stockin_detail_id = #{stockinDetailId}</if>
|
||||
<if test="quantity != null and quantity != ''"> and t.quantity = #{quantity}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTrayMsgById" parameterType="String" resultMap="TrayMsgResult">
|
||||
<include refid="selectTrayMsgVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTrayMsg" parameterType="TrayMsg">
|
||||
insert into tray_msg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTrayMsg" parameterType="TrayMsg">
|
||||
update tray_msg
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTrayMsgById" parameterType="String">
|
||||
delete from tray_msg where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTrayMsgByIds" parameterType="String">
|
||||
delete from tray_msg where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user