13 Commits

Author SHA1 Message Date
1009473166@qq.com
10fa4b3b15 2026.3.19 晚
缓存出库确认后台
2026-03-19 18:33:27 +08:00
1009473166@qq.com
f25bb2a549 Merge remote-tracking branch 'origin/main' 2026-03-19 15:44:02 +08:00
张怡蓉
d9da0de59e 入库部分和接口 2026-03-19 09:05:42 +08:00
1009473166@qq.com
e65b5933ad 2026.3.18 晚 2026-03-18 20:28:14 +08:00
liuhanqing
76517dc3a5 现场修改 2026-03-11 10:06:28 +08:00
liuhanqing
969949adf4 现场修改 2026-03-11 09:01:51 +08:00
liuhanqing
4384eb5b7a 现场调度修改 2026-03-11 08:55:44 +08:00
猫猫guowen
d652a29bba 库存平面图 2026-03-06 13:21:52 +08:00
liuhanqing
1ad5a15b6f 现场调度修改 2026-03-05 15:08:32 +08:00
张怡蓉
38f10b676d 入库部分和接口 2026-03-05 14:20:39 +08:00
张怡蓉
83db499c85 入库部分和接口 2026-03-02 11:41:34 +08:00
liuhanqing
a33998553e 现场调度修改 2026-02-26 09:55:15 +08:00
张怡蓉
88d4caa017 入库部分和接口 2026-02-24 10:17:20 +08:00
79 changed files with 4219 additions and 240 deletions

View File

@@ -1,9 +1,12 @@
package com.ruoyi.api.controller;
import cn.hutool.json.JSONUtil;
import com.ruoyi.api.moveMsg.domain.MoveMsg;
import com.ruoyi.api.service.IToErpService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.log.service.IRequestLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.api.domain.DeliveryNoticeVo;
@@ -28,7 +31,7 @@ public class ToErpApiController {
public AjaxResult receiveDeliveryNotice(@RequestBody DeliveryNoticeVo deliveryNoticeVo) {
AjaxResult ajaxResult = toErpService.receiveDeliveryNotice(deliveryNoticeVo);
requestLogService.insertRequestLog(requestLogService.getRequestLog(deliveryNoticeVo.toString(), "接收入出库通知单", ajaxResult));
requestLogService.insertRequestLog(requestLogService.getRequestLog(JSONUtil.toJsonStr(deliveryNoticeVo), "接收入出库通知单", ajaxResult));
return ajaxResult;
@@ -38,7 +41,7 @@ public class ToErpApiController {
/**
* 回传其他入库单
*/
// @Scheduled(fixedDelay = 1500)
//@Scheduled(fixedDelay = 1500)
@RequestMapping("/callbackInDeliveryNotice")
@ResponseBody
public void callbackInDeliveryNotice() {
@@ -48,10 +51,20 @@ public class ToErpApiController {
/**
* 回传其他出库单
*/
// @Scheduled(fixedDelay = 1500)
@RequestMapping("/callbackOutDeliveryNotice")
@ResponseBody
public void callbackDeliveryOutNotice() {
toErpService.callbackoutDeliveryNotice();
}
/**
* 移库回调接口
*/
// @Scheduled(fixedDelay = 1500)
@RequestMapping("/moveCargoSpace")
@ResponseBody
public void moveCargoSpace(){
toErpService.moveCargoSpace();
}
}

View File

@@ -47,6 +47,14 @@ public class ToWmsApiController {
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
@PostMapping("/sendCargoSpace")
public AjaxResult sendCargoSpace(@RequestBody RequestEnter requestEnter) {
AjaxResult ajaxResult = toWmsService.requestEnterByTaskNo(requestEnter);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "入库任务创建请求",ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
/**
* 请求补码作业

View File

@@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.annotation.Anonymous;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -23,6 +24,7 @@ public class TwinController {
@Autowired
private ITwinService twinService;
//获取所有货位
@Anonymous
@GetMapping("/getEmptyCargoSpace")
public AjaxResult getEmptyCargoSpace() {
@@ -30,10 +32,25 @@ public class TwinController {
return AjaxResult.success(list);
}
//获取统计信息
@Anonymous
@GetMapping("/getStockList")
public Map<String, Object> getStockList() {
return twinService.getStockListOverview();
}
//根据货位号获取库存中的物料信息
@Anonymous
@GetMapping("/getCargo/{cargoSpaceName}")
public Map<String, Object> getCargo(@PathVariable("cargoSpaceName") String cargoSpaceName) {
return twinService.getCargo(cargoSpaceName);
}
//根据任务号获取作业表中的物料信息
@Anonymous
@GetMapping("/getTaskCargo/{taskNo}")
public Map<String, Object> getTaskCargo(@PathVariable("taskNo") String taskNo) {
return twinService.getTaskCargo(taskNo);
}
}

View File

@@ -12,4 +12,5 @@ public class AgvMoveParam {
private String endPoint;
private String containerCode;
private String taskNo;
private String type;
}

View File

@@ -4,6 +4,9 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.w3c.dom.stylesheets.LinkStyle;
import java.util.List;
/**
* 出入库通知单-子表接收对象
@@ -42,7 +45,14 @@ public class DeliveryNoticeItemVo {
/** 备注 */
private String remark;
private List<LocationDetail> locations;
/**货位*/
private String area;
/**托盘*/
private String location;
private String areaBefore;
private String locationBefore;
}

View File

@@ -49,6 +49,10 @@ public class DeliveryNoticeVo {
private String warehouseId;
/** 备注 */
private String remark;
/** 配送终点 */
private String destination;
/** 领料车间 */
private String workshop;
/** 子表明细列表 */
private List<DeliveryNoticeItemVo> detailList;
}

View File

@@ -0,0 +1,44 @@
package com.ruoyi.api.domain;
public class LocationDetail {
private String locationNo;
private String areaNo;
private String quantity;
private String lotNo;
public String getLocationNo() {
return locationNo;
}
public void setLocationNo(String locationNo) {
this.locationNo = locationNo;
}
public String getAreaNo() {
return areaNo;
}
public void setAreaNo(String areaNo) {
this.areaNo = areaNo;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
public String getLotNo() {
return lotNo;
}
public void setLotNo(String lotNo) {
this.lotNo = lotNo;
}
}

View File

@@ -20,4 +20,5 @@ public class RequestEnter {
private String type;
private String flag;
private String taskNo;
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.api.moveMsg.controller;
import java.util.List;
import jakarta.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.api.moveMsg.domain.MoveMsg;
import com.ruoyi.api.moveMsg.service.IMoveMsgService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 移库信息回传Controller
*
* @author ruoyi
* @date 2026-01-29
*/
@RestController
@RequestMapping("/api/moveMsg")
public class MoveMsgController extends BaseController
{
@Autowired
private IMoveMsgService moveMsgService;
/**
* 查询移库信息回传列表
*/
@PreAuthorize("@ss.hasPermi('api:moveMsg:list')")
@GetMapping("/list")
public TableDataInfo list(MoveMsg moveMsg)
{
startPage();
List<MoveMsg> list = moveMsgService.selectMoveMsgList(moveMsg);
return getDataTable(list);
}
/**
* 导出移库信息回传列表
*/
@PreAuthorize("@ss.hasPermi('api:moveMsg:export')")
@Log(title = "移库信息回传", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MoveMsg moveMsg)
{
List<MoveMsg> list = moveMsgService.selectMoveMsgList(moveMsg);
ExcelUtil<MoveMsg> util = new ExcelUtil<MoveMsg>(MoveMsg.class);
util.exportExcel(response, list, "移库信息回传数据");
}
/**
* 获取移库信息回传详细信息
*/
@PreAuthorize("@ss.hasPermi('api:moveMsg:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(moveMsgService.selectMoveMsgById(id));
}
/**
* 新增移库信息回传
*/
@PreAuthorize("@ss.hasPermi('api:moveMsg:add')")
@Log(title = "移库信息回传", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MoveMsg moveMsg)
{
return toAjax(moveMsgService.insertMoveMsg(moveMsg));
}
/**
* 修改移库信息回传
*/
@PreAuthorize("@ss.hasPermi('api:moveMsg:edit')")
@Log(title = "移库信息回传", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MoveMsg moveMsg)
{
return toAjax(moveMsgService.updateMoveMsg(moveMsg));
}
/**
* 删除移库信息回传
*/
@PreAuthorize("@ss.hasPermi('api:moveMsg:remove')")
@Log(title = "移库信息回传", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(moveMsgService.deleteMoveMsgByIds(ids));
}
}

View File

@@ -0,0 +1,202 @@
package com.ruoyi.api.moveMsg.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;
/**
* 移库信息回传对象 move_msg
*
* @author ruoyi
* @date 2026-01-29
*/
public class MoveMsg extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
private String id;
/** 托盘条码 */
@Excel(name = "托盘条码")
private String trayCode;
/** 原货位 */
@Excel(name = "原货位")
private String oldSpace;
/** 新货位 */
@Excel(name = "新货位")
private String newSpace;
/** 状态 */
@Excel(name = "状态")
private String status;
/** 发送时间 */
@Excel(name = "发送时间")
private String sendTime;
/** 信息 */
@Excel(name = "信息")
private String msg;
/** 备用 */
@Excel(name = "备用")
private String spare1;
/** 备用 */
@Excel(name = "备用")
private String spare2;
/** 备用 */
@Excel(name = "备用")
private String spare3;
/** 备用 */
@Excel(name = "备用")
private String spare4;
/** 备用 */
@Excel(name = "备用")
private String spare5;
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 setOldSpace(String oldSpace)
{
this.oldSpace = oldSpace;
}
public String getOldSpace()
{
return oldSpace;
}
public void setNewSpace(String newSpace)
{
this.newSpace = newSpace;
}
public String getNewSpace()
{
return newSpace;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setSendTime(String sendTime)
{
this.sendTime = sendTime;
}
public String getSendTime()
{
return sendTime;
}
public void setMsg(String msg)
{
this.msg = msg;
}
public String getMsg()
{
return msg;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
{
return spare5;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("trayCode", getTrayCode())
.append("oldSpace", getOldSpace())
.append("newSpace", getNewSpace())
.append("status", getStatus())
.append("sendTime", getSendTime())
.append("msg", getMsg())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.api.moveMsg.mapper;
import java.util.List;
import com.ruoyi.api.moveMsg.domain.MoveMsg;
/**
* 移库信息回传Mapper接口
*
* @author ruoyi
* @date 2026-01-29
*/
public interface MoveMsgMapper
{
/**
* 查询移库信息回传
*
* @param id 移库信息回传主键
* @return 移库信息回传
*/
public MoveMsg selectMoveMsgById(String id);
/**
* 查询移库信息回传列表
*
* @param moveMsg 移库信息回传
* @return 移库信息回传集合
*/
public List<MoveMsg> selectMoveMsgList(MoveMsg moveMsg);
/**
* 新增移库信息回传
*
* @param moveMsg 移库信息回传
* @return 结果
*/
public int insertMoveMsg(MoveMsg moveMsg);
/**
* 修改移库信息回传
*
* @param moveMsg 移库信息回传
* @return 结果
*/
public int updateMoveMsg(MoveMsg moveMsg);
/**
* 删除移库信息回传
*
* @param id 移库信息回传主键
* @return 结果
*/
public int deleteMoveMsgById(String id);
/**
* 批量删除移库信息回传
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMoveMsgByIds(String[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.api.moveMsg.service;
import java.util.List;
import com.ruoyi.api.moveMsg.domain.MoveMsg;
/**
* 移库信息回传Service接口
*
* @author ruoyi
* @date 2026-01-29
*/
public interface IMoveMsgService
{
/**
* 查询移库信息回传
*
* @param id 移库信息回传主键
* @return 移库信息回传
*/
public MoveMsg selectMoveMsgById(String id);
/**
* 查询移库信息回传列表
*
* @param moveMsg 移库信息回传
* @return 移库信息回传集合
*/
public List<MoveMsg> selectMoveMsgList(MoveMsg moveMsg);
/**
* 新增移库信息回传
*
* @param moveMsg 移库信息回传
* @return 结果
*/
public int insertMoveMsg(MoveMsg moveMsg);
/**
* 修改移库信息回传
*
* @param moveMsg 移库信息回传
* @return 结果
*/
public int updateMoveMsg(MoveMsg moveMsg);
/**
* 批量删除移库信息回传
*
* @param ids 需要删除的移库信息回传主键集合
* @return 结果
*/
public int deleteMoveMsgByIds(String[] ids);
/**
* 删除移库信息回传信息
*
* @param id 移库信息回传主键
* @return 结果
*/
public int deleteMoveMsgById(String id);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.api.moveMsg.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.api.moveMsg.mapper.MoveMsgMapper;
import com.ruoyi.api.moveMsg.domain.MoveMsg;
import com.ruoyi.api.moveMsg.service.IMoveMsgService;
/**
* 移库信息回传Service业务层处理
*
* @author ruoyi
* @date 2026-01-29
*/
@Service
public class MoveMsgServiceImpl implements IMoveMsgService
{
@Autowired
private MoveMsgMapper moveMsgMapper;
/**
* 查询移库信息回传
*
* @param id 移库信息回传主键
* @return 移库信息回传
*/
@Override
public MoveMsg selectMoveMsgById(String id)
{
return moveMsgMapper.selectMoveMsgById(id);
}
/**
* 查询移库信息回传列表
*
* @param moveMsg 移库信息回传
* @return 移库信息回传
*/
@Override
public List<MoveMsg> selectMoveMsgList(MoveMsg moveMsg)
{
return moveMsgMapper.selectMoveMsgList(moveMsg);
}
/**
* 新增移库信息回传
*
* @param moveMsg 移库信息回传
* @return 结果
*/
@Override
public int insertMoveMsg(MoveMsg moveMsg)
{
return moveMsgMapper.insertMoveMsg(moveMsg);
}
/**
* 修改移库信息回传
*
* @param moveMsg 移库信息回传
* @return 结果
*/
@Override
public int updateMoveMsg(MoveMsg moveMsg)
{
return moveMsgMapper.updateMoveMsg(moveMsg);
}
/**
* 批量删除移库信息回传
*
* @param ids 需要删除的移库信息回传主键
* @return 结果
*/
@Override
public int deleteMoveMsgByIds(String[] ids)
{
return moveMsgMapper.deleteMoveMsgByIds(ids);
}
/**
* 删除移库信息回传信息
*
* @param id 移库信息回传主键
* @return 结果
*/
@Override
public int deleteMoveMsgById(String id)
{
return moveMsgMapper.deleteMoveMsgById(id);
}
}

View File

@@ -1,6 +1,7 @@
package com.ruoyi.api.service;
import com.ruoyi.api.domain.DeliveryNoticeVo;
import com.ruoyi.api.moveMsg.domain.MoveMsg;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -16,5 +17,7 @@ public interface IToErpService {
void callbackoutDeliveryNotice();
void moveCargoSpace();
AjaxResult createWorkshopInboundOrder(BasProduct basProduct);
}

View File

@@ -45,4 +45,6 @@ public interface IToWcsService {
AjaxResult updateWcsPort(WcsPort wcsPort);
AjaxResult insertAgvMoveJob(AgvMoveParam agvMoveParam);
}

View File

@@ -59,4 +59,6 @@ public interface IToWmsService {
* 作废物料
*/
AjaxResult InvalidProduct(ErpProduct erpProduct);
AjaxResult requestEnterByTaskNo(RequestEnter requestEnter);
}

View File

@@ -4,5 +4,7 @@ import java.util.Map;
public interface ITwinService {
Map<String, Object> getStockListOverview();
Map<String, Object> getCargo(String cargoSpaceName);
Map<String, Object> getTaskCargo(String taskNo);
}

View File

@@ -3,6 +3,8 @@ package com.ruoyi.api.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;
import com.ruoyi.api.domain.*;
import com.ruoyi.api.moveMsg.domain.MoveMsg;
import com.ruoyi.api.moveMsg.service.IMoveMsgService;
import com.ruoyi.api.service.IToErpService;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
@@ -27,10 +29,17 @@ import com.ruoyi.log.domain.RequestLog;
import com.ruoyi.log.service.IRequestLogService;
import com.ruoyi.out.outStockout.domain.OutStockout;
import com.ruoyi.out.outStockout.service.IOutStockoutService;
import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack;
import com.ruoyi.out.outStockoutBack.mapper.OutStockoutBackMapper;
import com.ruoyi.out.outStockoutBack.service.IOutStockoutBackService;
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService;
import com.ruoyi.out.outStockoutDetail.mapper.OutStockoutDetailMapper;
import com.ruoyi.out.outStockout.mapper.OutStockoutMapper;
import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
import com.ruoyi.out.outStockoutDetailBack.service.IOutStockoutDetailBackService;
import com.ruoyi.stock.stock.domain.BasStock;
import com.ruoyi.stock.stock.service.IBasStockService;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences;
import org.springframework.beans.BeanUtils;
@@ -38,10 +47,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 作业统计 Service 实现
@@ -57,7 +69,7 @@ public class ToErpServiceImpl implements IToErpService {
private IMydoJobDetailService mydoJobDetailService;
@Autowired
private IBasJobIdService basJobIdService;
private IBasJobIdService basJobIdService;
@Autowired
private IRequestLogService requestLogService;
@@ -79,13 +91,24 @@ public class ToErpServiceImpl implements IToErpService {
private IInStockinBackService inStockinBackService;
@Autowired
private IInStockinDetailBackService inStockinDetailBackService;
@Autowired
private IMoveMsgService moveMsgService;
@Autowired
private IBasStockService basStockService;
@Autowired
private IOutStockoutBackService outStockoutBackService;
@Autowired
private IOutStockoutDetailBackService outStockoutDetailBackService;
private static final String TO_ERP_URL = "http://192.168.1.100:8080/api/";
//todo 需要调试
private static final String WORKSHOP_INBOUND_ORDER_URL = TO_ERP_URL+"TRANSACTION_DOC";
private static final String WORKSHOP_INBOUND_ORDER_URL = TO_ERP_URL + "TRANSACTION_DOC";
//todo 需要调试
private static final String OTHER_IN_OUTBOUND_ORDER_URL = TO_ERP_URL+"WIP_TRANSFER_DOC";
private static final String OTHER_IN_OUTBOUND_ORDER_URL = TO_ERP_URL + "WIP_TRANSFER_DOC";
/**
* 处理送货通知单的业务逻辑
* 根据单据类型和操作类型进行入库单或出库单的增删改操作
@@ -97,14 +120,17 @@ public class ToErpServiceImpl implements IToErpService {
@Transactional(rollbackFor = Exception.class)
public AjaxResult receiveDeliveryNotice(DeliveryNoticeVo deliveryNoticeVo) {
if (deliveryNoticeVo == null || deliveryNoticeVo.getDetailList() == null || deliveryNoticeVo.getDetailList().isEmpty()){
if (deliveryNoticeVo == null || deliveryNoticeVo.getDetailList() == null || deliveryNoticeVo.getDetailList().isEmpty()) {
return AjaxResult.error("单据或明细不能为空");
}
String billType = deliveryNoticeVo.getBillType();
String opType = deliveryNoticeVo.getOpType();
// String status = deliveryNoticeVo.getStatus();
int type = 0;
try { type = Integer.parseInt(billType); } catch (Exception ignored) {}
try {
type = Integer.parseInt(billType);
} catch (Exception ignored) {
}
// 处理入库单相关操作(单据类型1-4)
if (type >= 1 && type <= 4) {
@@ -134,7 +160,7 @@ public class ToErpServiceImpl implements IToErpService {
if ("2".equals(opType) && exist == null) {
return AjaxResult.error("单据不存在,无法修改");
}
if("1".equals(opType) && exist != null){
if ("1".equals(opType) && exist != null) {
return AjaxResult.error("单据已存在,请勿重复添加");
}
if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType)) {
@@ -172,7 +198,7 @@ public class ToErpServiceImpl implements IToErpService {
for (DeliveryNoticeItemVo item : items) {
InStockinDetail detail = new InStockinDetail();
detail.setStockinGuid(inStockin.getStockinGuid());
detail.setStockinDetailId(inStockin.getStockinId()+"-"+item.getLineNo());
detail.setStockinDetailId(item.getLineNo());
detail.setStockinId(inStockin.getStockinId());
detail.setProductId(item.getInventoryCode());
detail.setProductName(item.getInventoryName());
@@ -225,10 +251,10 @@ public class ToErpServiceImpl implements IToErpService {
if ("2".equals(opType) && exist == null) {
return AjaxResult.error("单据不存在,无法修改");
}
if ("1".equals(opType) && exist != null){
if ("1".equals(opType) && exist != null) {
return AjaxResult.error("单据已存在,请勿重复添加");
}
if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType) ) {
if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType)) {
return AjaxResult.error("单据已执行,禁止修改");
}
OutStockout out = exist != null ? exist : new OutStockout();
@@ -243,6 +269,8 @@ public class ToErpServiceImpl implements IToErpService {
out.setStatus("1");
out.setWarehouseId(deliveryNoticeVo.getWarehouseId());
out.setStockoutSource("1");
out.setSpare6(deliveryNoticeVo.getOutType());
out.setCarNumber(deliveryNoticeVo.getIsProjectOut());
out.setDepartmentNo(deliveryNoticeVo.getProjectNo());
out.setCustomerNo(deliveryNoticeVo.getCustomerId());
out.setClassNowId(deliveryNoticeVo.getCustomerName());
@@ -251,6 +279,7 @@ public class ToErpServiceImpl implements IToErpService {
out.setSpare3(deliveryNoticeVo.getApproveDate());//审核时间
out.setSpare4(deliveryNoticeVo.getApproveMan());//审核人
out.setSpare5(deliveryNoticeVo.getRemark());
out.setSpare7(deliveryNoticeVo.getDestination());
if (exist == null) {
outStockoutService.insertOutStockout(out);
@@ -268,19 +297,22 @@ public class ToErpServiceImpl implements IToErpService {
for (DeliveryNoticeItemVo item : deliveryNoticeVo.getDetailList()) {
OutStockoutDetail d = new OutStockoutDetail();
d.setStockoutDetailId(out.getStockoutId()+"-"+item.getLineNo());
d.setStockoutDetailId(item.getLineNo());
d.setStockoutGuid(out.getStockoutGuid());
d.setStockoutId(out.getStockoutId());
d.setProductId(item.getInventoryCode());
d.setProductId(item.getInventoryCode());
d.setProductName(item.getInventoryName());
d.setLotNo(item.getLotNo());
d.setSpec(item.getSpecModel());
d.setUnit(item.getUnit());
d.setSpare1(item.getLevelRelation());
d.setSpare2(item.getUpperMaterial());
d.setSpare3(item.getTopMaterial());
d.setSpare6(item.getLineNo());
d.setSpare4(deliveryNoticeVo.getProjectNo());
// d.setSpare6(item.getLineNo());
d.setRemark(item.getRemark());
//d.setSpare8(deliveryNoticeVo.getDestination());
try {
d.setQuantity(new BigDecimal(item.getQuantity()));
@@ -304,21 +336,25 @@ public class ToErpServiceImpl implements IToErpService {
public void callbackInDeliveryNotice() {
InStockinBack inStockin = inStockinBackService.selectTopInStockin();
if (inStockin == null) {
return;
}
DeliveryNoticeVo deliveryNoticeVo = new DeliveryNoticeVo();
deliveryNoticeVo.setBillNo(inStockin.getStockinId());
deliveryNoticeVo.setNoteBillNo(inStockin.getStockinId());
deliveryNoticeVo.setBillType(inStockin.getInType());
deliveryNoticeVo.setOpType("1");
deliveryNoticeVo.setBillDate(inStockin.getCreateDate());
deliveryNoticeVo.setCreateMan(inStockin.getCreateManId());
// deliveryNoticeVo.setCreateMan(inStockin.getCreateManId());
deliveryNoticeVo.setWarehouseId(inStockin.getWarehouseId());
deliveryNoticeVo.setProjectNo(inStockin.getDepartmentNo());
deliveryNoticeVo.setCustomerId(inStockin.getSupplierNo());
deliveryNoticeVo.setCustomerName(inStockin.getClassNo()); // 对应receiveDeliveryNotice中的映射
deliveryNoticeVo.setContractNo(inStockin.getSpare1());
deliveryNoticeVo.setSalesOrderNo(inStockin.getSpare2());
deliveryNoticeVo.setApproveDate(inStockin.getSpare3());
deliveryNoticeVo.setApproveMan(inStockin.getSpare4());
deliveryNoticeVo.setRemark(inStockin.getSpare5());
// deliveryNoticeVo.setSalesOrderNo(inStockin.getSpare2());
// deliveryNoticeVo.setApproveDate(inStockin.getSpare3());
// deliveryNoticeVo.setApproveMan(inStockin.getSpare4());
// deliveryNoticeVo.setRemark(inStockin.getSpare5());
InStockinDetailBack inStockinDetailParam = new InStockinDetailBack();
inStockinDetailParam.setStockinId(inStockin.getStockinId());
@@ -328,6 +364,7 @@ public class ToErpServiceImpl implements IToErpService {
if (inStockinDetails != null && !inStockinDetails.isEmpty()) {
for (InStockinDetailBack detail : inStockinDetails) {
DeliveryNoticeItemVo item = new DeliveryNoticeItemVo();
item.setLineNo(detail.getStockinDetailId());
item.setNotelineNo(detail.getStockinDetailId());
item.setBillNo(detail.getStockinId());
@@ -336,29 +373,237 @@ public class ToErpServiceImpl implements IToErpService {
item.setSpecModel(detail.getSpec());
item.setUnit(detail.getUnit());
item.setQuantity(detail.getAssignNum());
item.setLotNo(detail.getLotNo());
// item.setLotNo(detail.getLotNo());
item.setLevelRelation(detail.getSpare1());
item.setUpperMaterial(detail.getSpare2());
item.setTopMaterial(detail.getSpare3());
item.setRemark(detail.getRemark());
item.setArea(detail.getSpare9());
item.setLocation(detail.getSpare8());
String[] splitArea = detail.getSpare9().split(",");
String[] splitLocation = detail.getSpare8().split(",");
String[] splitQuantity = detail.getQuantityX().split(",");
ArrayList<LocationDetail> locationDetails = new ArrayList<>();
for(int i=0;i<splitArea.length;i++) {
LocationDetail locationDetail = new LocationDetail();
locationDetail.setLocationNo(splitLocation[i]);
locationDetail.setQuantity(splitQuantity[i]);
locationDetail.setAreaNo(splitArea[i]);
locationDetail.setLotNo(detail.getLotNo());
locationDetails.add(locationDetail);
}
item.setLocations(locationDetails);
detailList.add(item);
}
}
deliveryNoticeVo.setDetailList(detailList);
//todo 发送给erp 成功失败改状态
String sendMsg=JSONUtil.toJsonStr(deliveryNoticeVo);
try {
//todo 发送给erp 成功失败改状态
RequestLog requestLog = requestLogService.getRequestLog("http://192.168.188.235/app1/api?type=1&key=1", JSONUtil.toJsonStr(deliveryNoticeVo), "入库回传", "wms", "erp");
if ("1".equals(requestLog.getIsSuccessful())) {
inStockin.setSendStatus("1");
inStockin.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
inStockin.setMsg("成功");
inStockinDetailParam.setSendStatus("1");
inStockinDetailParam.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
inStockinDetailParam.setMsg("成功");
} else {
inStockin.setSendStatus("2");
inStockin.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
inStockin.setMsg(requestLog.getErrorDetails());
inStockinDetailParam.setSendStatus("2");
inStockinDetailParam.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
inStockinDetailParam.setMsg(requestLog.getErrorDetails());
}
inStockinBackService.updateInStockinBack(inStockin);
inStockinDetailBackService.updateInStockinDetailBack(inStockinDetailParam);
} catch (Exception e) {
inStockin.setSendStatus("2");
inStockin.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
inStockin.setMsg(e.getMessage());
inStockinDetailParam.setSendStatus("2");
inStockinDetailParam.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
inStockinDetailParam.setMsg(e.getMessage());
inStockinBackService.updateInStockinBack(inStockin);
inStockinDetailBackService.updateInStockinDetailBack(inStockinDetailParam);
}
// return AjaxResult.success(deliveryNoticeVo);
}
@Override
public void callbackoutDeliveryNotice() {
OutStockoutBack outStockoutBack = outStockoutBackService.selelctTopOutStockout();
if (outStockoutBack == null) {
return;
}
DeliveryNoticeVo deliveryNoticeVo = new DeliveryNoticeVo();
deliveryNoticeVo.setBillNo(outStockoutBack.getStockoutId());
deliveryNoticeVo.setNoteBillNo(outStockoutBack.getStockoutId());
deliveryNoticeVo.setBillType(outStockoutBack.getOutType());
deliveryNoticeVo.setOpType("1");
deliveryNoticeVo.setBillDate(outStockoutBack.getCreateDate());
deliveryNoticeVo.setWarehouseId(outStockoutBack.getWarehouseId());
deliveryNoticeVo.setProjectNo(outStockoutBack.getDepartmentNo());
deliveryNoticeVo.setCustomerId(outStockoutBack.getCustomerNo());
deliveryNoticeVo.setCustomerName(outStockoutBack.getClassNowId());
deliveryNoticeVo.setContractNo(outStockoutBack.getSpare1());
OutStockoutDetailBack outStockoutDetailBack = new OutStockoutDetailBack();
outStockoutDetailBack.setStockoutId(outStockoutBack.getStockoutId());
// outStockoutDetailBack.setSendStatus("0");
List<OutStockoutDetailBack> outStockoutDetailBacks = outStockoutDetailBackService.selectOutStockoutDetailBackList(outStockoutDetailBack);
List<DeliveryNoticeItemVo> detailList = new ArrayList<>();
if(outStockoutDetailBacks != null && !outStockoutDetailBacks.isEmpty()) {
for (OutStockoutDetailBack detail : outStockoutDetailBacks) {
DeliveryNoticeItemVo item = new DeliveryNoticeItemVo();
item.setLineNo(detail.getStockoutDetailId());
item.setNotelineNo(detail.getStockoutDetailId());
item.setInventoryCode(detail.getProductId());
item.setInventoryName(detail.getProductName());
item.setSpecModel(detail.getSpec());
item.setUnit(detail.getUnit());
item.setQuantity(detail.getQuantity().toString());
item.setLevelRelation(detail.getSpare1());
item.setUpperMaterial(detail.getSpare2());
item.setTopMaterial(detail.getSpare3());
// item.setLotNo(detail.getLotNo());
item.setRemark(detail.getRemark());
// item.setArea(detail.getSpare9());
// item.setLocation(detail.getSpare8());
String[] splitArea = detail.getSpare9().split(",");
String[] splitLocation = detail.getSpare8().split(",");
String[] splitQuantity = detail.getQuantityX().split(",");
String[] lotNo = detail.getLotNo().split(",");
ArrayList<LocationDetail> locationDetails = new ArrayList<>();
for(int i=0;i<splitArea.length;i++) {
LocationDetail locationDetail = new LocationDetail();
locationDetail.setLocationNo(splitLocation[i]);
locationDetail.setQuantity(splitQuantity[i]);
locationDetail.setAreaNo(splitArea[i]);
locationDetail.setLotNo(lotNo[i]);
locationDetails.add(locationDetail);
}
item.setLocations(locationDetails);
detailList.add(item);
}
deliveryNoticeVo.setDetailList(detailList);
}
try {
//todo 发送给erp 成功失败改状态
RequestLog requestLog = requestLogService.getRequestLog("http://192.168.188.235/app1/api?type=1&key=1", JSONUtil.toJsonStr(deliveryNoticeVo), "出库回传", "wms", "erp");
if ("1".equals(requestLog.getIsSuccessful())) {
outStockoutBack.setSendStatus("1");
outStockoutBack.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
outStockoutBack.setMsg("成功");
outStockoutDetailBack.setSendStatus("1");
outStockoutDetailBack.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
outStockoutDetailBack.setMsg("成功");
} else {
outStockoutBack.setSendStatus("2");
outStockoutBack.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
outStockoutBack.setMsg(requestLog.getErrorDetails());
outStockoutDetailBack.setSendStatus("2");
outStockoutDetailBack.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
outStockoutDetailBack.setMsg(requestLog.getErrorDetails());
}
outStockoutBackService.updateOutStockoutBack(outStockoutBack);
outStockoutDetailBackService.updateOutStockoutDetailBack(outStockoutDetailBack);
} catch (Exception e) {
outStockoutBack.setSendStatus("2");
outStockoutBack.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
outStockoutBack.setMsg(e.getMessage());
outStockoutDetailBack.setSendStatus("2");
outStockoutDetailBack.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
outStockoutDetailBack.setMsg(e.getMessage());
outStockoutBackService.updateOutStockoutBack(outStockoutBack);
outStockoutDetailBackService.updateOutStockoutDetailBack(outStockoutDetailBack);
}
}
@Override
public void moveCargoSpace() {
MoveMsg moveMsg1 = new MoveMsg();
moveMsg1.setStatus("0");
List<MoveMsg> moveMsgs = moveMsgService.selectMoveMsgList(moveMsg1);
MoveMsg moveMsg = new MoveMsg();
if (moveMsgs.size() > 0) {
moveMsg = moveMsgs.get(0);
} else {
return;
}
try {
BasStock basStock = new BasStock();
basStock.setTrayCode(moveMsg.getTrayCode());
List<BasStock> basStocks = basStockService.selectBasStockList(basStock);
//将basStocks按照stockinId分组
Map<String, List<BasStock>> basStocksMap = basStocks.stream().collect(Collectors.groupingBy(BasStock::getStockinId));
for (Map.Entry<String, List<BasStock>> entry : basStocksMap.entrySet()) {
// 获取 stockinId(键)
String stockinId = entry.getKey();
// 获取对应的 basStock 列表(值)
List<BasStock> basStockList = entry.getValue();
DeliveryNoticeVo deliveryNoticeVo = new DeliveryNoticeVo();
deliveryNoticeVo.setBillNo(basStockList.get(0).getStockinId());
//deliveryNoticeVo.setNoteBillNo(basStockList.get(0).getStockinId());
deliveryNoticeVo.setBillDate(DateUtil.formatDateTime(new Date()));
deliveryNoticeVo.setWarehouseId(basStockList.get(0).getWarehouseId());
deliveryNoticeVo.setProjectNo(basStockList.get(0).getSpare4());
deliveryNoticeVo.setBillType("9");
ArrayList<DeliveryNoticeItemVo> deliveryNoticeItemVos = new ArrayList<>();
for (BasStock basStock1 : basStockList) {
DeliveryNoticeItemVo item = new DeliveryNoticeItemVo();
item.setLineNo(basStock1.getStockinDetailId());
//item.setNotelineNo(basStock1.getStockinDetailId());
item.setInventoryCode(basStock1.getProductId());
item.setInventoryName(basStock1.getProductName());
item.setSpecModel(basStock1.getPower());
item.setUnit(basStock1.getPhase());
item.setQuantity(basStock1.getQuantity());
item.setLevelRelation(basStock1.getSpare1());
item.setUpperMaterial(basStock1.getSpare2());
item.setTopMaterial(basStock1.getSpare3());
item.setLotNo(basStock1.getLotNo());
item.setAreaBefore(moveMsg.getOldSpace());
//item.setLocationBefore(moveMsg.getTrayCode());
item.setArea(moveMsg.getNewSpace());
item.setLocation(moveMsg.getTrayCode());
deliveryNoticeItemVos.add(item);
}
deliveryNoticeVo.setDetailList(deliveryNoticeItemVos);
//code success msg
RequestLog requestLog = requestLogService.getRequestLog("http://192.168.188.235/app1/api?type=1&key=2", JSONUtil.toJsonStr(deliveryNoticeVo), "移库回传", "wms", "erp");
moveMsg.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
if ("1".equals(requestLog.getIsSuccessful())) {
moveMsg.setStatus("1");
moveMsg.setMsg("成功");
} else {
moveMsg.setStatus("2");
moveMsg.setMsg(requestLog.getErrorDetails());
}
moveMsgService.updateMoveMsg(moveMsg);
}
} catch (Exception e) {
moveMsg.setSendTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
moveMsg.setStatus("2");
moveMsg.setMsg(e.getMessage());
moveMsgService.updateMoveMsg(moveMsg);
}
}
@Override
public AjaxResult createWorkshopInboundOrder(BasProduct basProduct) {
ErpInterfaceParam<WipTransferDoc> param = new ErpInterfaceParam<>();
@@ -382,15 +627,15 @@ public class ToErpServiceImpl implements IToErpService {
objectErpParameter.setDatas(List.of(wipTransferDoc));
erpStdData.setParameter(objectErpParameter);
param.setStd_data(erpStdData);
RequestLog requestLog = requestLogService.getRequestLog(WORKSHOP_INBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建工艺单","wms","erp");
RequestLog requestLog = requestLogService.getRequestLog(WORKSHOP_INBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建工艺单", "wms", "erp");
// String post = requestLog.getResponseBody();
// ErpInterfaceParam bean = JSONUtil.toBean(post, ErpInterfaceParam.class);
// if ("0".equals(bean.getStd_data().getExecution().getCode())) {
// return AjaxResult.success();
// }
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
if (requestLog != null && "1".equals(requestLog.getIsSuccessful())) {
return AjaxResult.success();
}else{
} else {
return AjaxResult.error();
}
}
@@ -404,10 +649,10 @@ public class ToErpServiceImpl implements IToErpService {
ErpInOutBoundOrder erpInOutBoundOrder = new ErpInOutBoundOrder();
String docNo = "";
String docIdDocCode = "";
if ("1".equals(transferBillCallback.getType())){
if ("1".equals(transferBillCallback.getType())) {
docNo = basJobIdService.getJobId("11T1");
docIdDocCode = "11T1";
}else {
} else {
docNo = basJobIdService.getJobId("11T2");
docIdDocCode = "11T2";
}
@@ -428,7 +673,7 @@ public class ToErpServiceImpl implements IToErpService {
for (int i = 0; i < mydoJobDetails.size(); i++) {
MydoJobDetail mydoJobDetail = mydoJobDetails.get(i);
ErpTransactionDocD erpTransactionDocD = new ErpTransactionDocD();
erpTransactionDocD.setSequenceNumber(i+1);
erpTransactionDocD.setSequenceNumber(i + 1);
erpTransactionDocD.setITEM_ID_ITEM_CODE(mydoJobDetail.getProductId());
erpTransactionDocD.setITEM_DESCRIPTION(mydoJobDetail.getProductName());
erpTransactionDocD.setITEM_SPECIFICATION(mydoJobDetail.getSpec());
@@ -444,11 +689,11 @@ public class ToErpServiceImpl implements IToErpService {
objectErpParameter.setDatas(list);
erpStdData.setParameter(objectErpParameter);
param.setStd_data(erpStdData);
RequestLog requestLog = requestLogService.getRequestLog( OTHER_IN_OUTBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建其他入出库单","wms","erp");
RequestLog requestLog = requestLogService.getRequestLog(OTHER_IN_OUTBOUND_ORDER_URL, JSONUtil.toJsonStr(param), "创建其他入出库单", "wms", "erp");
if(requestLog != null && "1".equals(requestLog.getIsSuccessful())){
if (requestLog != null && "1".equals(requestLog.getIsSuccessful())) {
return AjaxResult.success();
}else{
} else {
return AjaxResult.error();
}
// String post = requestLog.getResponseBody();

View File

@@ -33,7 +33,7 @@ public class ToWcsServiceImpl implements IToWcsService {
@Autowired
private IAgvContainerTaskService agvContainerTaskService;
public static final String PUSH_OUT_MYDO_JOB = "http://localhost:8081/wcs2Wms/api/receiveOutMydoJob";
public static final String PUSH_OUT_MYDO_JOB = "http://192.168.188.236:8081/wcs2Wms/api/receiveOutMydoJob";
public static final String PUSH_IN_MYDO_JOB = "http://localhost:8081/wcs2Wms/api/receiveInMydoJob";
public static final String PUSH_AGV_MOVE_JOB = "http://localhost:8081/agv/api/receiveAgvMoveJob";
public static final String OUT_MYDOJOB_MS = "http://localhost:8081/wcs2Wms/api/outMydojobMakesure";
@@ -42,16 +42,14 @@ public class ToWcsServiceImpl implements IToWcsService {
public static final String UPDATE_WCS_PORT = "http://localhost:8081/wcs2Wms/api/updateWcsPort";
@Override
// @Scheduled(fixedDelay=1500)
@Scheduled(fixedDelay=1500)
public void pushOutMydoJob() {
//查询所有未推送的料箱出库作业
MydoJob mydoJobParam = new MydoJob();
mydoJobParam.setStatus("1");
List<String> list = new ArrayList<>();
list.add("21");
list.add("26");
mydoJobParam.setInOutIds(list);
mydoJobParam.setInOut("2");
List<MydoJob> outMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
for (MydoJob outMydoJob : outMydoJobs) {
RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB, JSONUtil.toJsonStr(outMydoJob), "推送出库任务","wms","wcs");
@@ -155,4 +153,18 @@ public class ToWcsServiceImpl implements IToWcsService {
return AjaxResult.error();
}
@Override
public AjaxResult insertAgvMoveJob(AgvMoveParam agvMoveParam) {
Map<String,String> map = new HashMap<>();
map.put("startPoint", agvMoveParam.getStartPoint());
map.put("endPoint", agvMoveParam.getEndPoint());
map.put("type", agvMoveParam.getType());
map.put("jobId", UUID.randomUUID().toString());
RequestLog requestLog = requestLogService.getRequestLog(PUSH_AGV_MOVE_JOB, JSONUtil.toJsonStr(map), "修改缓存点状态","wms","wcs");
if ("1".equals(requestLog.getIsSuccessful())){
return AjaxResult.success();
}
return AjaxResult.error();
}
}

View File

@@ -93,27 +93,29 @@ public class ToWmsServiceImpl implements IToWmsService {
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult requestEnterByTrayCode(RequestEnter requestEnter) {
String trayCode = requestEnter.getTrayCode();
MydoJob inJob = mydoJobMapper.selectInJobByTrayCode(trayCode);
if(inJob != null && Integer.parseInt(inJob.getInOrOut()) < 20){
if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
return AjaxResult.success(JSONUtil.toJsonStr(inJob));
}else{
//分配货位
HashMap<String, Object> map = new HashMap<>();
// if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
// return AjaxResult.success(inJob);
// }else{
// //分配货位
// HashMap<String, Object> map = new HashMap<>();
//
// map.put("v_tray_code", trayCode);
// mydoJobMapper.allotInJobSpace(map);
// if (!"10".equals(map.get("v_result").toString())) {
// return AjaxResult.error(map.get("v_resultmsg").toString());
// }else{
//
// }
// }
// MydoJob inJob2 = mydoJobMapper.selectInJobByTrayCode(trayCode);
return AjaxResult.success(inJob);
map.put("v_tray_code", trayCode);
mydoJobMapper.allotInJobSpace(map);
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_resultmsg").toString());
}else{
MydoJob inJob2 = mydoJobMapper.selectInJobByTrayCode(trayCode);
return AjaxResult.success(JSONUtil.toJsonStr(inJob2));
}
}
}else{
return AjaxResult.error("该条码无入库任务,请扫码绑定!");
}
@@ -197,9 +199,20 @@ public class ToWmsServiceImpl implements IToWmsService {
return AjaxResult.error("任务不存在");
}
MydoJob outJob = outMydoJobs.get(0);
//出库作业
outJob.setExecutionPhase("2");
mydoJobService.updateMydoJob(outJob);
break;
case "7":
//移库作业
mydoJobParam.setTaskNo(wmsJobRequest.getTaskNo());
List<MydoJob> ykMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
if (ykMydoJobs.isEmpty()) {
return AjaxResult.error("任务不存在");
}
MydoJob ykJob = ykMydoJobs.get(0);
mydoJobService.ykCompleted(ykJob);
break;
default:
log.error("作业类型错误");
@@ -385,5 +398,30 @@ public class ToWmsServiceImpl implements IToWmsService {
return AjaxResult.error(erpProduct.getSys_MainId()+"物料不存在");
}
@Override
public AjaxResult requestEnterByTaskNo(RequestEnter requestEnter) {
String taskNo = requestEnter.getTaskNo();
MydoJob inJob = mydoJobMapper.selectInJobByTaskNo(taskNo);
if(inJob != null && Integer.parseInt(inJob.getInOrOut()) < 20){
if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
return AjaxResult.success(inJob);
}else{
//分配货位
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", inJob.getTrayCode());
mydoJobMapper.allotInJobSpace(map);
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_resultmsg").toString());
}else{
MydoJob inJob2 = mydoJobMapper.selectInJobByTaskNo(taskNo);
return AjaxResult.success(inJob2);
}
}
}else{
return AjaxResult.error("该条码无入库任务,请扫码绑定!");
}
}
}

View File

@@ -5,6 +5,10 @@ import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
import com.ruoyi.in.stockinfinish.domain.InStockinFinish;
import com.ruoyi.in.stockinfinish.service.IInStockinFinishService;
import com.ruoyi.job.mydojob.domain.MydoJob;
import com.ruoyi.job.mydojob.service.IMydoJobService;
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
import com.ruoyi.out.outStockoutFinish.domain.OutStockoutFinish;
import com.ruoyi.out.outStockoutFinish.service.IOutStockoutFinishService;
import com.ruoyi.stock.stock.domain.BasStock;
@@ -33,6 +37,10 @@ public class TwinServiceImpl implements ITwinService {
private IInStockinFinishService inStockinFinishService;
@Autowired
private IOutStockoutFinishService outStockoutFinishService;
@Autowired
private IMydoJobService mydoJobService;
@Autowired
private IMydoJobDetailService mydoJobDetailService;
@Override
public Map<String, Object> getStockListOverview() {
@@ -250,4 +258,62 @@ public class TwinServiceImpl implements ITwinService {
result.put("monthOutStock", monthOutStock);
return result;
}
@Override
public Map<String, Object> getCargo(String cargoSpaceName) {
BasStock basStock = new BasStock();
basStock.setCargoSpaceName(cargoSpaceName);
List<BasStock> list = basStockService.selectBasStockList(basStock);
List<Map<String, String>> dataList = new ArrayList<>();
for (BasStock stock : list) {
Map<String, String> dataMap = new HashMap<>();
dataMap.put("productId", stock.getProductId());
dataMap.put("productName", stock.getProductName());
dataMap.put("quantity", stock.getQuantity());
dataMap.put("trayCode", stock.getTrayCode());
dataList.add(dataMap);
}
Map<String, Object> result = new HashMap<>();
result.put("data", dataList);
return result;
}
@Override
public Map<String, Object> getTaskCargo(String taskNo) {
MydoJob mydoJob = new MydoJob();
mydoJob.setTaskNo(taskNo);
List<MydoJob> jobList = mydoJobService.selectMydoJobList(mydoJob);
List<Map<String, String>> dataList = new ArrayList<>();
if (jobList != null && !jobList.isEmpty()) {
MydoJob job = jobList.get(0);
String jobId = job.getJobId();
String inOrOutStr = job.getInOrOut();
int inOrOut = 0;
try {
inOrOut = Integer.parseInt(inOrOutStr);
} catch (Exception e) {
// Ignore parse error
}
List<MydoJobDetail> details = mydoJobDetailService.selectMydoJobDetailListByJobId(jobId);
for (MydoJobDetail detail : details) {
Map<String, String> dataMap = new HashMap<>();
dataMap.put("productId", detail.getProductId());
dataMap.put("productName", detail.getProductName());
String quantity = "0";
if (inOrOut < 20) {
quantity = detail.getInQuantity();
} else {
quantity = detail.getOutQuantity();
}
dataMap.put("quantity", quantity);
dataMap.put("trayCode", detail.getTrayCode());
dataList.add(dataMap);
}
}
Map<String, Object> result = new HashMap<>();
result.put("data", dataList);
return result;
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.bas.agvPoint.controller;
import java.util.List;
import jakarta.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.agvPoint.domain.AgvPoint;
import com.ruoyi.bas.agvPoint.service.IAgvPointService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* agv站点Controller
*
* @author ruoyi
* @date 2026-03-17
*/
@RestController
@RequestMapping("/bas/agvPoint")
public class AgvPointController extends BaseController
{
@Autowired
private IAgvPointService agvPointService;
/**
* 查询agv站点列表
*/
@PreAuthorize("@ss.hasPermi('bas:agvPoint:list')")
@GetMapping("/list")
public TableDataInfo list(AgvPoint agvPoint)
{
startPage();
List<AgvPoint> list = agvPointService.selectAgvPointList(agvPoint);
return getDataTable(list);
}
/**
* 导出agv站点列表
*/
@PreAuthorize("@ss.hasPermi('bas:agvPoint:export')")
@Log(title = "agv站点", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AgvPoint agvPoint)
{
List<AgvPoint> list = agvPointService.selectAgvPointList(agvPoint);
ExcelUtil<AgvPoint> util = new ExcelUtil<AgvPoint>(AgvPoint.class);
util.exportExcel(response, list, "agv站点数据");
}
/**
* 获取agv站点详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:agvPoint:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(agvPointService.selectAgvPointById(id));
}
/**
* 新增agv站点
*/
@PreAuthorize("@ss.hasPermi('bas:agvPoint:add')")
@Log(title = "agv站点", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AgvPoint agvPoint)
{
return toAjax(agvPointService.insertAgvPoint(agvPoint));
}
/**
* 修改agv站点
*/
@PreAuthorize("@ss.hasPermi('bas:agvPoint:edit')")
@Log(title = "agv站点", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AgvPoint agvPoint)
{
return toAjax(agvPointService.updateAgvPoint(agvPoint));
}
/**
* 删除agv站点
*/
@PreAuthorize("@ss.hasPermi('bas:agvPoint:remove')")
@Log(title = "agv站点", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(agvPointService.deleteAgvPointByIds(ids));
}
}

View File

@@ -0,0 +1,113 @@
package com.ruoyi.bas.agvPoint.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;
/**
* agv站点对象 agv_point
*
* @author ruoyi
* @date 2026-03-17
*/
public class AgvPoint extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 序号 */
private String id;
/** 站点编号 */
@Excel(name = "站点编号")
private String station;
/** 类型 */
@Excel(name = "类型")
private String type;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare1;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare2;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare3;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setStation(String station)
{
this.station = station;
}
public String getStation()
{
return station;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("station", getStation())
.append("type", getType())
.append("remark", getRemark())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.agvPoint.mapper;
import java.util.List;
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
/**
* agv站点Mapper接口
*
* @author ruoyi
* @date 2026-03-17
*/
public interface AgvPointMapper
{
/**
* 查询agv站点
*
* @param id agv站点主键
* @return agv站点
*/
public AgvPoint selectAgvPointById(String id);
/**
* 查询agv站点列表
*
* @param agvPoint agv站点
* @return agv站点集合
*/
public List<AgvPoint> selectAgvPointList(AgvPoint agvPoint);
/**
* 新增agv站点
*
* @param agvPoint agv站点
* @return 结果
*/
public int insertAgvPoint(AgvPoint agvPoint);
/**
* 修改agv站点
*
* @param agvPoint agv站点
* @return 结果
*/
public int updateAgvPoint(AgvPoint agvPoint);
/**
* 删除agv站点
*
* @param id agv站点主键
* @return 结果
*/
public int deleteAgvPointById(String id);
/**
* 批量删除agv站点
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteAgvPointByIds(String[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.agvPoint.service;
import java.util.List;
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
/**
* agv站点Service接口
*
* @author ruoyi
* @date 2026-03-17
*/
public interface IAgvPointService
{
/**
* 查询agv站点
*
* @param id agv站点主键
* @return agv站点
*/
public AgvPoint selectAgvPointById(String id);
/**
* 查询agv站点列表
*
* @param agvPoint agv站点
* @return agv站点集合
*/
public List<AgvPoint> selectAgvPointList(AgvPoint agvPoint);
/**
* 新增agv站点
*
* @param agvPoint agv站点
* @return 结果
*/
public int insertAgvPoint(AgvPoint agvPoint);
/**
* 修改agv站点
*
* @param agvPoint agv站点
* @return 结果
*/
public int updateAgvPoint(AgvPoint agvPoint);
/**
* 批量删除agv站点
*
* @param ids 需要删除的agv站点主键集合
* @return 结果
*/
public int deleteAgvPointByIds(String[] ids);
/**
* 删除agv站点信息
*
* @param id agv站点主键
* @return 结果
*/
public int deleteAgvPointById(String id);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.bas.agvPoint.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.agvPoint.mapper.AgvPointMapper;
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
import com.ruoyi.bas.agvPoint.service.IAgvPointService;
/**
* agv站点Service业务层处理
*
* @author ruoyi
* @date 2026-03-17
*/
@Service
public class AgvPointServiceImpl implements IAgvPointService
{
@Autowired
private AgvPointMapper agvPointMapper;
/**
* 查询agv站点
*
* @param id agv站点主键
* @return agv站点
*/
@Override
public AgvPoint selectAgvPointById(String id)
{
return agvPointMapper.selectAgvPointById(id);
}
/**
* 查询agv站点列表
*
* @param agvPoint agv站点
* @return agv站点
*/
@Override
public List<AgvPoint> selectAgvPointList(AgvPoint agvPoint)
{
return agvPointMapper.selectAgvPointList(agvPoint);
}
/**
* 新增agv站点
*
* @param agvPoint agv站点
* @return 结果
*/
@Override
public int insertAgvPoint(AgvPoint agvPoint)
{
return agvPointMapper.insertAgvPoint(agvPoint);
}
/**
* 修改agv站点
*
* @param agvPoint agv站点
* @return 结果
*/
@Override
public int updateAgvPoint(AgvPoint agvPoint)
{
return agvPointMapper.updateAgvPoint(agvPoint);
}
/**
* 批量删除agv站点
*
* @param ids 需要删除的agv站点主键
* @return 结果
*/
@Override
public int deleteAgvPointByIds(String[] ids)
{
return agvPointMapper.deleteAgvPointByIds(ids);
}
/**
* 删除agv站点信息
*
* @param id agv站点主键
* @return 结果
*/
@Override
public int deleteAgvPointById(String id)
{
return agvPointMapper.deleteAgvPointById(id);
}
}

View File

@@ -71,6 +71,7 @@ public class BasTraycodeController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody BasTraycode basTraycode)
{
return toAjax(basTraycodeService.insertBasTraycode(basTraycode));
}

View File

@@ -16,16 +16,16 @@ public class BasTraycode extends BaseEntity
private static final long serialVersionUID = 1L;
/** id */
@Excel(name = "${bas.Traycode.id}")
// @Excel(name = "${bas.Traycode.id}")
private Long id;
/** 条码类型id */
@Excel(name = "${bas.Traycode.formatId}")
// @Excel(name = "${bas.Traycode.formatId}")
private Long formatId;
private String formatName;
/** 条码 */
@Excel(name = "${bas.Traycode.trayCode}")
@Excel(name = "条码")
private String trayCode;
/** 备用字段1 */
@@ -33,7 +33,7 @@ public class BasTraycode extends BaseEntity
private String spare1;
/** 备用字段2 */
// @Excel(name = "${bas.Traycode.spare2}")
@Excel(name = "是否可用",dictType = "sys_yes_no")
private String spare2;
/** 备用字段3 */

View File

@@ -61,4 +61,6 @@ public interface BasTraycodeMapper
public int deleteBasTraycodeByIds(Long[] ids);
void insertBasTraycodeList(List<BasTraycode> list);
Integer selectBasTrayCodeMax();
}

View File

@@ -61,4 +61,6 @@ public interface IBasTraycodeService
public int deleteBasTraycodeById(Long id);
void insertBasTraycodeList(List<BasTraycode> traycodeList);
Integer selectBasTrayCodeMax();
}

View File

@@ -1,9 +1,12 @@
package com.ruoyi.bas.traycode.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import com.ruoyi.bas.traycode.domain.BasTraycode;
import com.ruoyi.bas.traycode.mapper.BasTraycodeMapper;
import com.ruoyi.bas.traycode.service.IBasTraycodeService;
import com.ruoyi.bas.traycodeformat.domain.BasTraycodeFormat;
import com.ruoyi.bas.traycodeformat.service.IBasTraycodeFormatService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -21,6 +24,8 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService
{
@Autowired
private BasTraycodeMapper basTraycodeMapper;
@Autowired
private IBasTraycodeFormatService basTraycodeFormatService;
/**
* 查询条码信息
@@ -55,8 +60,33 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService
@Override
public int insertBasTraycode(BasTraycode basTraycode)
{
basTraycode.setCreateTime(DateUtils.getNowDate());
return basTraycodeMapper.insertBasTraycode(basTraycode);
try {
BasTraycodeFormat basTraycodeFormat = basTraycodeFormatService.selectBasTraycodeFormatById(basTraycode.getFormatId());
int i1 = Integer.parseInt(basTraycode.getSpare1());
//如果i<4位数,前面补0
String code = "";
for (int j = 0; j < i1; j++) {
code = String.format("%07d",Convert.toInt( basTraycodeFormat.getSerialRule()) + 1 + j);
if(basTraycodeFormat.getMaxNum() < Convert.toLong( code)){
throw new RuntimeException("已生成最大值");
}
String finalCode = basTraycodeFormat.getBarcodeFormat()+code;
basTraycode.setTrayCode(finalCode);
basTraycode.setSpare1(null);
basTraycode.setCreateTime(DateUtils.getNowDate());
basTraycode.setSpare2("Y");
basTraycodeMapper.insertBasTraycode(basTraycode);
}
basTraycodeFormat.setSerialRule(Convert.toLong( code).toString());
basTraycodeFormatService.updateBasTraycodeFormat(basTraycodeFormat);
} catch (Exception e) {
throw new RuntimeException(e);
}
return 1;
}
/**
@@ -103,4 +133,9 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService
basTraycodeMapper.insertBasTraycodeList(list);
}
}
@Override
public Integer selectBasTrayCodeMax() {
return basTraycodeMapper.selectBasTrayCodeMax();
}
}

View File

@@ -1,17 +1,13 @@
package com.ruoyi.bas.traycodeformat.service.impl;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.bas.traycode.domain.BasTraycode;
import com.ruoyi.bas.traycode.service.IBasTraycodeService;
import com.ruoyi.bas.traycodeformat.domain.BasTraycodeFormat;
import com.ruoyi.bas.traycodeformat.mapper.BasTraycodeFormatMapper;
import com.ruoyi.bas.traycodeformat.service.IBasTraycodeFormatService;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
@@ -79,20 +75,7 @@ public class BasTraycodeFormatServiceImpl implements IBasTraycodeFormatService
public int updateBasTraycodeFormat(BasTraycodeFormat basTraycodeFormat)
{
BasTraycodeFormat old = selectBasTraycodeFormatById(basTraycodeFormat.getId());
int oldSerialRule = Convert.toInt(old.getSerialRule());
int newSerialRule = Convert.toInt(basTraycodeFormat.getSerialRule());
List<BasTraycode> traycodeList = new ArrayList<>();
for (int i = oldSerialRule; i < newSerialRule; i++) {
BasTraycode basTraycode = new BasTraycode();
basTraycode.setFormatId(basTraycodeFormat.getId());
String traycode = old.getBarcodeFormat()+ StrUtil.padPre(Convert.toStr(i),5,'0');
basTraycode.setTrayCode(traycode);
traycodeList.add(basTraycode);
}
basTraycodeFormat.setUpdateTime(DateUtils.getNowDate());
//插入条码信息
basTraycodeService.insertBasTraycodeList(traycodeList);
return basTraycodeFormatMapper.updateBasTraycodeFormat(basTraycodeFormat);
}

View File

@@ -27,25 +27,23 @@ import java.util.List;
*/
@RestController
@RequestMapping("/check/stockCheck")
public class CheckStockinController extends BaseController
{
public class CheckStockinController extends BaseController {
@Autowired
private ICheckStockinService checkStockinService;
@Autowired
private ICheckStockinFinishService checkStockinFinishService;
private ICheckStockinFinishService checkStockinFinishService;
/**
* 查询盘库单据主信息列表
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:list')")
@GetMapping("/list")
public TableDataInfo list(CheckStockin checkStockin)
{
public TableDataInfo list(CheckStockin checkStockin) {
startPage();
List<CheckStockin> list = new ArrayList<>();
if (checkStockin.getStatus() == null || Convert.toInt(checkStockin.getStatus())<4){
list = checkStockinService.selectCheckStockinList(checkStockin);
}else {
if (checkStockin.getStatus() == null || Convert.toInt(checkStockin.getStatus()) < 4) {
list = checkStockinService.selectCheckStockinList(checkStockin);
} else {
list = checkStockinFinishService.selectCheckStockinList(checkStockin);
}
@@ -58,8 +56,7 @@ public class CheckStockinController extends BaseController
@PreAuthorize("@ss.hasPermi('check:stockCheck:export')")
@Log(title = "盘库单据主信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CheckStockin checkStockin)
{
public void export(HttpServletResponse response, CheckStockin checkStockin) {
List<CheckStockin> list = checkStockinService.selectCheckStockinList(checkStockin);
ExcelUtil<CheckStockin> util = new ExcelUtil<CheckStockin>(CheckStockin.class);
util.exportExcel(response, list, "盘库单据主信息数据");
@@ -70,8 +67,7 @@ public class CheckStockinController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:query')")
@GetMapping(value = "/{stockGuid}")
public AjaxResult getInfo(@PathVariable("stockGuid") String stockGuid)
{
public AjaxResult getInfo(@PathVariable("stockGuid") String stockGuid) {
return success(checkStockinService.selectCheckStockinByStockGuid(stockGuid));
}
@@ -81,8 +77,7 @@ public class CheckStockinController extends BaseController
@PreAuthorize("@ss.hasPermi('check:stockCheck:add')")
@Log(title = "盘库单据主信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody CheckStockin checkStockin)
{
public AjaxResult add(@RequestBody CheckStockin checkStockin) {
return toAjax(checkStockinService.insertCheckStockin(checkStockin));
}
@@ -92,8 +87,7 @@ public class CheckStockinController extends BaseController
@PreAuthorize("@ss.hasPermi('check:stockCheck:edit')")
@Log(title = "盘库单据主信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CheckStockin checkStockin)
{
public AjaxResult edit(@RequestBody CheckStockin checkStockin) {
return checkStockinService.updateCheckStockin(checkStockin);
}
@@ -102,9 +96,8 @@ public class CheckStockinController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('check:stockCheck:remove')")
@Log(title = "盘库单据主信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{stockGuids}")
public AjaxResult remove(@PathVariable String[] stockGuids)
{
@DeleteMapping("/{stockGuids}")
public AjaxResult remove(@PathVariable String[] stockGuids) {
return toAjax(checkStockinService.deleteCheckStockinByStockGuids(stockGuids));
}
@@ -119,12 +112,15 @@ public class CheckStockinController extends BaseController
@PreAuthorize("@ss.hasPermi('check:stockCheck:saveBill')")
@ResponseBody
public AjaxResult saveBill(@RequestBody CheckStockVo checkStockVo) {
String stockOutId = checkStockinService.saveBill(checkStockVo);
return AjaxResult.success(stockOutId);
return checkStockinService.saveBill(checkStockVo);
}
/**
* 盘点自动分配
*
* @param checkStockin
* @return
*/

View File

@@ -62,7 +62,7 @@ public interface ICheckStockinService
*/
public int deleteCheckStockinByStockGuid(String stockGuid);
String saveBill(CheckStockVo outStockoutVo);
AjaxResult saveBill(CheckStockVo outStockoutVo);
/**
* 盘点自动分配

View File

@@ -162,9 +162,8 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
@Override
@Transactional(rollbackFor = Exception.class)
public String saveBill(CheckStockVo checkStockVo) {
public AjaxResult saveBill(CheckStockVo checkStockVo) {
CheckStockin checkStockin = checkStockVo.getCheckStockin();
List<CheckStockinDetail> detailList = checkStockVo.getDetailList();
String stockCheckId = basJobIdService.getJobId("PDD");
checkStockin.setStockCheckId(stockCheckId);
@@ -183,6 +182,9 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
checkStockinDetail.setStockCheckId(stockCheckId);
BasProduct basProduct = productService.selectBasProductByProductId(checkStockinDetail.getProductId());
if (basProduct==null){
throw new RuntimeException(checkStockinDetail.getProductId()+",系统内无该物料,请检查!");
}
checkStockinDetail.setProductGuid(basProduct.getProductGuid());
checkStockinDetail.setStockCheckGuid(checkStockin.getStockGuid());
checkStockinDetail.setScanNum("0");
@@ -193,13 +195,6 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
} else if ("2".equals(checkStockin.getCheckType())) {
//货位盘点
for (int i = 0; i < detailList.size(); i++) {
// BasStock param = new BasStock();
// param.setCargoSpaceId(detailList.get(i).getSpare1());
// List<BasStock> basStocks = basStockService.selectBasStockList(param);
// Integer quantity = 0;
// for (BasStock basStock : basStocks) {
// quantity += Convert.toInt(basStock.getQuantity());
// }
CheckStockinDetail checkStockinDetail = detailList.get(i);
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
checkStockinDetail.setStockCheckId(stockCheckId);
@@ -211,7 +206,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
}
checkStockinMapper.insertCheckStockin(checkStockin);
return stockCheckId;
return AjaxResult.success("单据创建成功",stockCheckId);
}
@Override
@@ -229,7 +224,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
checkStockinMapper.autoAllot(map);
builder.append("行明细:" + checkStockinDetail.getStockCheckDetailId() + ",分配结果:" + map.get("v_resultmsg") + "<br />");
}
iToWcsService.pushOutMydoJob();
//iToWcsService.pushOutMydoJob();
return AjaxResult.success(builder.toString());

View File

@@ -102,7 +102,7 @@ public class InStockinFinishServiceImpl implements IInStockinFinishService
}
@Override
@DataScope(warehouseAlias = "is2")
// @DataScope(warehouseAlias = "is2")
public List<InStockin> selectInStockinFinishListByInStockin(InStockin inStockin) {
return inStockinFinishMapper.selectInStockinFinishListByInStockin(inStockin);
}

View File

@@ -82,5 +82,10 @@ public interface MydoJobMapper
MydoJob selectInJobByTrayCode(@Param("trayCode") String trayCode);
MydoJob selectInJobByTaskNo(@Param("taskNo") String taskNo);
void allotInJobSpace(HashMap<String, Object> map);
void ykCompleted(HashMap<String, Object> map);
}

View File

@@ -109,4 +109,6 @@ public interface IMydoJobService
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
List<MydoJob> getInJobBySerial(String serial);
void ykCompleted(MydoJob outJob);
}

View File

@@ -192,7 +192,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
String inOrOutDId = mydoJobDetail.getInOrOutDId();
String inOrOutDId = mydoJobDetail.getStockinDetailId();
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
BigDecimal stockInNum = Convert.toBigDecimal(inStockinDetail.getScanNum());
BigDecimal jobInNum = Convert.toBigDecimal(mydoJobDetail.getInQuantity());
@@ -506,7 +506,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
msg = map.get("v_resultmsg").toString();
builder.append("托盘:" + basStock.getTrayCode() + ",分配结果:" + msg + "<br/>");
}
iToWcsService.pushOutMydoJob();
//iToWcsService.pushOutMydoJob();
if (!StrUtil.isEmpty(builder)) {
return AjaxResult.warn(builder.toString());
}
@@ -527,4 +527,17 @@ public class MydoJobServiceImpl implements IMydoJobService {
public List<MydoJob> getInJobBySerial(String trayCode) {
return mydoJobMapper.getInJobBySerial(trayCode);
}
@Override
public void ykCompleted(MydoJob outJob) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_job_id", outJob.getJobId());
map.put("v_result", null);
mydoJobMapper.ykCompleted(map);
if (!"10".equals(map.get("v_result").toString())) {
log.error("移库任务处理异常 异常代码{}", map.get("v_result"));
}else{
log.info("移库任务处理成功 jobId:[{}] trayCode:[{}]", outJob.getJobId(), outJob.getTrayCode());
}
}
}

View File

@@ -122,8 +122,8 @@ public class RequestLogServiceImpl implements IRequestLogService
requestLog.setRequestBody(param);
requestLog.setRequestUrl(url);
try {
String resStr = HttpUtil.post(url, param);
String resStr = HttpUtil.post(url, param);
requestLog.setResponseBody(resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象");
@@ -133,7 +133,6 @@ public class RequestLogServiceImpl implements IRequestLogService
if (codeObj == null || !codeObj.toString().equals("200")) {
throw new RuntimeException("请求失败,状态码: " + (codeObj != null ? codeObj.toString() : "null"));
}
requestLog.setResponseBody(resStr);
requestLog.setResponseTime(DateUtil.formatDateTime(new Date()));
requestLog.setResponseStatus("1");
requestLog.setDuration(Convert.toStr(DateUtil.between(Convert.toDate(requestLog.getRequestTime()), Convert.toDate(requestLog.getResponseTime()), DateUnit.MS)));
@@ -173,4 +172,9 @@ public class RequestLogServiceImpl implements IRequestLogService
requestLog.setResponseBody(Convert.toStr(ajaxResult.get("msg")));
return requestLog;
}
public static void main(String[] args) {
String aa = "{\"code\":\"200,\"success\":true,\"msg\":\"请求成功\"}";
System.out.println(JSONUtil.isJsonObj(aa));
}
}

View File

@@ -91,6 +91,9 @@ public class OutStockout extends BaseEntity
private String spare4;
private String spare5;
private String spare6;
private String spare7;
private String spare8;
private String customerName;
@@ -102,6 +105,30 @@ public class OutStockout extends BaseEntity
private List<String> typeData;
public String getSpare6() {
return spare6;
}
public void setSpare6(String spare6) {
this.spare6 = spare6;
}
public String getSpare7() {
return spare7;
}
public void setSpare7(String spare7) {
this.spare7 = spare7;
}
public String getSpare8() {
return spare8;
}
public void setSpare8(String spare8) {
this.spare8 = spare8;
}
public List<String> getTypeData() {
return typeData;
}

View File

@@ -180,10 +180,12 @@ public class OutStockoutServiceImpl implements IOutStockoutService
for (OutStockoutDetail detail : outStockoutDetails) {
if (detail.getAllotQuantity().compareTo(detail.getQuantity()) < 0){
map.put("v_stockout_detail_id", detail.getStockoutDetailId());
map.put("v_result", null);
map.put("v_resultmsg", null);
outStockoutMapper.autoAllot(map);
toWcsService.pushOutMydoJob();
//toWcsService.pushOutMydoJob();
if (!"10".equals(map.get("v_result"))){
stringBuilder.append(",").append(detail.getStockoutDetailId()+map.get("v_resultString"));
stringBuilder.append(",").append(detail.getStockoutDetailId()+map.get("v_resultmsg"));
}
}else{
stringBuilder.append(",").append(detail.getStockoutDetailId()+"单据已分配完成");
@@ -209,7 +211,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
map.put("v_stockout_detail_id", stockoutDetailId);
map.put("v_stock_id", stock);
outStockoutMapper.manualAllot(map);
toWcsService.pushOutMydoJob();
//toWcsService.pushOutMydoJob();
if (!"10".equals(map.get("v_result"))){
stringBuilder.append(",").append(stockoutDetailId+map.get("v_resultString"));
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.out.outStockoutBack.controller;
import java.util.List;
import jakarta.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.out.outStockoutBack.domain.OutStockoutBack;
import com.ruoyi.out.outStockoutBack.service.IOutStockoutBackService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 出库单据主信息Controller
*
* @author ruoyi
* @date 2026-02-02
*/
@RestController
@RequestMapping("/out/outStockoutBack")
public class OutStockoutBackController extends BaseController
{
@Autowired
private IOutStockoutBackService outStockoutBackService;
/**
* 查询出库单据主信息列表
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:list')")
@GetMapping("/list")
public TableDataInfo list(OutStockoutBack outStockoutBack)
{
startPage();
List<OutStockoutBack> list = outStockoutBackService.selectOutStockoutBackList(outStockoutBack);
return getDataTable(list);
}
/**
* 导出出库单据主信息列表
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:export')")
@Log(title = "出库单据主信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, OutStockoutBack outStockoutBack)
{
List<OutStockoutBack> list = outStockoutBackService.selectOutStockoutBackList(outStockoutBack);
ExcelUtil<OutStockoutBack> util = new ExcelUtil<OutStockoutBack>(OutStockoutBack.class);
util.exportExcel(response, list, "出库单据主信息数据");
}
/**
* 获取出库单据主信息详细信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:query')")
@GetMapping(value = "/{stockoutGuid}")
public AjaxResult getInfo(@PathVariable("stockoutGuid") String stockoutGuid)
{
return success(outStockoutBackService.selectOutStockoutBackByStockoutGuid(stockoutGuid));
}
/**
* 新增出库单据主信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:add')")
@Log(title = "出库单据主信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody OutStockoutBack outStockoutBack)
{
return toAjax(outStockoutBackService.insertOutStockoutBack(outStockoutBack));
}
/**
* 修改出库单据主信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:edit')")
@Log(title = "出库单据主信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody OutStockoutBack outStockoutBack)
{
return toAjax(outStockoutBackService.updateOutStockoutBack(outStockoutBack));
}
/**
* 删除出库单据主信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutBack:remove')")
@Log(title = "出库单据主信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{stockoutGuids}")
public AjaxResult remove(@PathVariable String[] stockoutGuids)
{
return toAjax(outStockoutBackService.deleteOutStockoutBackByStockoutGuids(stockoutGuids));
}
}

View File

@@ -0,0 +1,443 @@
package com.ruoyi.out.outStockoutBack.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;
/**
* 出库单据主信息对象 out_stockout_back
*
* @author ruoyi
* @date 2026-02-02
*/
public class OutStockoutBack extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 546 guid */
@Excel(name = "546 guid")
private String stockoutGuid;
/** 546 单据编码 */
@Excel(name = "546 单据编码")
private String stockoutId;
/** 546 出库类型 */
@Excel(name = "546 出库类型")
private String outType;
/** 546 单据时间 */
@Excel(name = "546 单据时间")
private String createDate;
/** 项目号546 */
@Excel(name = "项目号546")
private String departmentNo;
/** 客户编码546 */
@Excel(name = "客户编码546")
private String customerNo;
/** 制单人546 */
@Excel(name = "制单人546")
private String createManId;
/** 546 单据状态 */
@Excel(name = "546 单据状态")
private String status;
/** 单据来源0自建单1接口 */
@Excel(name = "单据来源0自建单1接口")
private String stockoutSource;
/** 仓库ID546 */
@Excel(name = "仓库ID546")
private String warehouseId;
/** 客户名称546 */
@Excel(name = "客户名称546")
private String classNowId;
/** 出口 */
@Excel(name = "出口")
private String exitId;
/** 出库方式546 */
@Excel(name = "出库方式546")
private String carNumber;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String FID;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String erpStockoutId;
/** 546 */
@Excel(name = "546")
private String startDate;
/** 546 */
@Excel(name = "546")
private String finishDate;
/** 合同号546 */
@Excel(name = "合同号546")
private String spare1;
/** 销售订单号546 */
@Excel(name = "销售订单号546")
private String spare2;
/** 审核时间546 */
@Excel(name = "审核时间546")
private String spare3;
/** 审核人546 */
@Excel(name = "审核人546")
private String spare4;
/** 备注546 */
@Excel(name = "备注546")
private String spare5;
/** 配送方式546 1人工2agv */
@Excel(name = "配送方式546 1人工2agv")
private String spare6;
/** 出库配送终点546 */
@Excel(name = "出库配送终点546")
private String spare7;
/** 1缓存2线边546 */
@Excel(name = "1缓存2线边546")
private String spare8;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String sendStatus;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String sendTime;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String msg;
public void setStockoutGuid(String stockoutGuid)
{
this.stockoutGuid = stockoutGuid;
}
public String getStockoutGuid()
{
return stockoutGuid;
}
public void setStockoutId(String stockoutId)
{
this.stockoutId = stockoutId;
}
public String getStockoutId()
{
return stockoutId;
}
public void setOutType(String outType)
{
this.outType = outType;
}
public String getOutType()
{
return outType;
}
public void setCreateDate(String createDate)
{
this.createDate = createDate;
}
public String getCreateDate()
{
return createDate;
}
public void setDepartmentNo(String departmentNo)
{
this.departmentNo = departmentNo;
}
public String getDepartmentNo()
{
return departmentNo;
}
public void setCustomerNo(String customerNo)
{
this.customerNo = customerNo;
}
public String getCustomerNo()
{
return customerNo;
}
public void setCreateManId(String createManId)
{
this.createManId = createManId;
}
public String getCreateManId()
{
return createManId;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setStockoutSource(String stockoutSource)
{
this.stockoutSource = stockoutSource;
}
public String getStockoutSource()
{
return stockoutSource;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setClassNowId(String classNowId)
{
this.classNowId = classNowId;
}
public String getClassNowId()
{
return classNowId;
}
public void setExitId(String exitId)
{
this.exitId = exitId;
}
public String getExitId()
{
return exitId;
}
public void setCarNumber(String carNumber)
{
this.carNumber = carNumber;
}
public String getCarNumber()
{
return carNumber;
}
public void setFID(String FID)
{
this.FID = FID;
}
public String getFID()
{
return FID;
}
public void setErpStockoutId(String erpStockoutId)
{
this.erpStockoutId = erpStockoutId;
}
public String getErpStockoutId()
{
return erpStockoutId;
}
public void setStartDate(String startDate)
{
this.startDate = startDate;
}
public String getStartDate()
{
return startDate;
}
public void setFinishDate(String finishDate)
{
this.finishDate = finishDate;
}
public String getFinishDate()
{
return finishDate;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
{
return spare5;
}
public void setSpare6(String spare6)
{
this.spare6 = spare6;
}
public String getSpare6()
{
return spare6;
}
public void setSpare7(String spare7)
{
this.spare7 = spare7;
}
public String getSpare7()
{
return spare7;
}
public void setSpare8(String spare8)
{
this.spare8 = spare8;
}
public String getSpare8()
{
return spare8;
}
public void setSendStatus(String sendStatus)
{
this.sendStatus = sendStatus;
}
public String getSendStatus()
{
return sendStatus;
}
public void setSendTime(String sendTime)
{
this.sendTime = sendTime;
}
public String getSendTime()
{
return sendTime;
}
public void setMsg(String msg)
{
this.msg = msg;
}
public String getMsg()
{
return msg;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("stockoutGuid", getStockoutGuid())
.append("stockoutId", getStockoutId())
.append("outType", getOutType())
.append("createDate", getCreateDate())
.append("departmentNo", getDepartmentNo())
.append("customerNo", getCustomerNo())
.append("createManId", getCreateManId())
.append("status", getStatus())
.append("stockoutSource", getStockoutSource())
.append("warehouseId", getWarehouseId())
.append("classNowId", getClassNowId())
.append("exitId", getExitId())
.append("carNumber", getCarNumber())
.append("FID", getFID())
.append("erpStockoutId", getErpStockoutId())
.append("startDate", getStartDate())
.append("finishDate", getFinishDate())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.append("spare6", getSpare6())
.append("spare7", getSpare7())
.append("spare8", getSpare8())
.append("sendStatus", getSendStatus())
.append("sendTime", getSendTime())
.append("msg", getMsg())
.toString();
}
}

View File

@@ -0,0 +1,64 @@
package com.ruoyi.out.outStockoutBack.mapper;
import java.util.List;
import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack;
/**
* 出库单据主信息Mapper接口
*
* @author ruoyi
* @date 2026-02-02
*/
public interface OutStockoutBackMapper
{
/**
* 查询出库单据主信息
*
* @param stockoutGuid 出库单据主信息主键
* @return 出库单据主信息
*/
public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid);
public OutStockoutBack selelctTopOutStockout();
/**
* 查询出库单据主信息列表
*
* @param outStockoutBack 出库单据主信息
* @return 出库单据主信息集合
*/
public List<OutStockoutBack> selectOutStockoutBackList(OutStockoutBack outStockoutBack);
/**
* 新增出库单据主信息
*
* @param outStockoutBack 出库单据主信息
* @return 结果
*/
public int insertOutStockoutBack(OutStockoutBack outStockoutBack);
/**
* 修改出库单据主信息
*
* @param outStockoutBack 出库单据主信息
* @return 结果
*/
public int updateOutStockoutBack(OutStockoutBack outStockoutBack);
/**
* 删除出库单据主信息
*
* @param stockoutGuid 出库单据主信息主键
* @return 结果
*/
public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid);
/**
* 批量删除出库单据主信息
*
* @param stockoutGuids 需要删除的数据主键集合
* @return 结果
*/
public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids);
}

View File

@@ -0,0 +1,70 @@
package com.ruoyi.out.outStockoutBack.service;
import java.util.List;
import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack;
/**
* 出库单据主信息Service接口
*
* @author ruoyi
* @date 2026-02-02
*/
public interface IOutStockoutBackService
{
/**
* 查询出库单据主信息
*
* @param stockoutGuid 出库单据主信息主键
* @return 出库单据主信息
*/
public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid);
public OutStockoutBack selelctTopOutStockout();
/**
* 查询出库单据主信息列表
*
* @param outStockoutBack 出库单据主信息
* @return 出库单据主信息集合
*/
public List<OutStockoutBack> selectOutStockoutBackList(OutStockoutBack outStockoutBack);
/**
* 新增出库单据主信息
*
* @param outStockoutBack 出库单据主信息
* @return 结果
*/
public int insertOutStockoutBack(OutStockoutBack outStockoutBack);
/**
* 修改出库单据主信息
*
* @param outStockoutBack 出库单据主信息
* @return 结果
*/
public int updateOutStockoutBack(OutStockoutBack outStockoutBack);
/**
* 批量删除出库单据主信息
*
* @param stockoutGuids 需要删除的出库单据主信息主键集合
* @return 结果
*/
public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids);
/**
* 删除出库单据主信息信息
*
* @param stockoutGuid 出库单据主信息主键
* @return 结果
*/
public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid);
}

View File

@@ -0,0 +1,98 @@
package com.ruoyi.out.outStockoutBack.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.out.outStockoutBack.mapper.OutStockoutBackMapper;
import com.ruoyi.out.outStockoutBack.domain.OutStockoutBack;
import com.ruoyi.out.outStockoutBack.service.IOutStockoutBackService;
/**
* 出库单据主信息Service业务层处理
*
* @author ruoyi
* @date 2026-02-02
*/
@Service
public class OutStockoutBackServiceImpl implements IOutStockoutBackService
{
@Autowired
private OutStockoutBackMapper outStockoutBackMapper;
/**
* 查询出库单据主信息
*
* @param stockoutGuid 出库单据主信息主键
* @return 出库单据主信息
*/
@Override
public OutStockoutBack selectOutStockoutBackByStockoutGuid(String stockoutGuid)
{
return outStockoutBackMapper.selectOutStockoutBackByStockoutGuid(stockoutGuid);
}
@Override
public OutStockoutBack selelctTopOutStockout() {
return outStockoutBackMapper.selelctTopOutStockout();
}
/**
* 查询出库单据主信息列表
*
* @param outStockoutBack 出库单据主信息
* @return 出库单据主信息
*/
@Override
public List<OutStockoutBack> selectOutStockoutBackList(OutStockoutBack outStockoutBack)
{
return outStockoutBackMapper.selectOutStockoutBackList(outStockoutBack);
}
/**
* 新增出库单据主信息
*
* @param outStockoutBack 出库单据主信息
* @return 结果
*/
@Override
public int insertOutStockoutBack(OutStockoutBack outStockoutBack)
{
return outStockoutBackMapper.insertOutStockoutBack(outStockoutBack);
}
/**
* 修改出库单据主信息
*
* @param outStockoutBack 出库单据主信息
* @return 结果
*/
@Override
public int updateOutStockoutBack(OutStockoutBack outStockoutBack)
{
return outStockoutBackMapper.updateOutStockoutBack(outStockoutBack);
}
/**
* 批量删除出库单据主信息
*
* @param stockoutGuids 需要删除的出库单据主信息主键
* @return 结果
*/
@Override
public int deleteOutStockoutBackByStockoutGuids(String[] stockoutGuids)
{
return outStockoutBackMapper.deleteOutStockoutBackByStockoutGuids(stockoutGuids);
}
/**
* 删除出库单据主信息信息
*
* @param stockoutGuid 出库单据主信息主键
* @return 结果
*/
@Override
public int deleteOutStockoutBackByStockoutGuid(String stockoutGuid)
{
return outStockoutBackMapper.deleteOutStockoutBackByStockoutGuid(stockoutGuid);
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.out.outStockoutDetailBack.controller;
import java.util.List;
import jakarta.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.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
import com.ruoyi.out.outStockoutDetailBack.service.IOutStockoutDetailBackService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 历史出库单据子信息Controller
*
* @author ruoyi
* @date 2026-02-02
*/
@RestController
@RequestMapping("/out/outStockoutDetailBack")
public class OutStockoutDetailBackController extends BaseController
{
@Autowired
private IOutStockoutDetailBackService outStockoutDetailBackService;
/**
* 查询历史出库单据子信息列表
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:list')")
@GetMapping("/list")
public TableDataInfo list(OutStockoutDetailBack outStockoutDetailBack)
{
startPage();
List<OutStockoutDetailBack> list = outStockoutDetailBackService.selectOutStockoutDetailBackList(outStockoutDetailBack);
return getDataTable(list);
}
/**
* 导出历史出库单据子信息列表
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:export')")
@Log(title = "历史出库单据子信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, OutStockoutDetailBack outStockoutDetailBack)
{
List<OutStockoutDetailBack> list = outStockoutDetailBackService.selectOutStockoutDetailBackList(outStockoutDetailBack);
ExcelUtil<OutStockoutDetailBack> util = new ExcelUtil<OutStockoutDetailBack>(OutStockoutDetailBack.class);
util.exportExcel(response, list, "历史出库单据子信息数据");
}
/**
* 获取历史出库单据子信息详细信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:query')")
@GetMapping(value = "/{stockoutDetailId}")
public AjaxResult getInfo(@PathVariable("stockoutDetailId") String stockoutDetailId)
{
return success(outStockoutDetailBackService.selectOutStockoutDetailBackByStockoutDetailId(stockoutDetailId));
}
/**
* 新增历史出库单据子信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:add')")
@Log(title = "历史出库单据子信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody OutStockoutDetailBack outStockoutDetailBack)
{
return toAjax(outStockoutDetailBackService.insertOutStockoutDetailBack(outStockoutDetailBack));
}
/**
* 修改历史出库单据子信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:edit')")
@Log(title = "历史出库单据子信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody OutStockoutDetailBack outStockoutDetailBack)
{
return toAjax(outStockoutDetailBackService.updateOutStockoutDetailBack(outStockoutDetailBack));
}
/**
* 删除历史出库单据子信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockoutDetailBack:remove')")
@Log(title = "历史出库单据子信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{stockoutDetailIds}")
public AjaxResult remove(@PathVariable String[] stockoutDetailIds)
{
return toAjax(outStockoutDetailBackService.deleteOutStockoutDetailBackByStockoutDetailIds(stockoutDetailIds));
}
}

View File

@@ -0,0 +1,608 @@
package com.ruoyi.out.outStockoutDetailBack.domain;
import java.math.BigDecimal;
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;
/**
* 历史出库单据子信息对象 out_stockout_detail_back
*
* @author ruoyi
* @date 2026-02-02
*/
public class OutStockoutDetailBack extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String stockoutDetailId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String stockoutGuid;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String stockoutId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String lotNo;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String productGuid;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String productId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private BigDecimal quantity;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String quantityX;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private BigDecimal quantityJ;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private BigDecimal assignNum;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private BigDecimal assignNumX;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private BigDecimal assignNumJ;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private BigDecimal allotQuantity;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private BigDecimal allotQuantityX;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private BigDecimal allotQuantityJ;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String price;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String warehouseId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String outId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String bukechaiQuantity;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String kechaiQuantity;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String entryid;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String flatQuantity;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String fid;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String erpStockoutId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String unit;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spec;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String productName;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare1;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare2;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare3;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare4;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare5;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare6;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare7;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare8;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spare9;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String sendStatus;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String sendTime;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String msg;
public void setStockoutDetailId(String stockoutDetailId)
{
this.stockoutDetailId = stockoutDetailId;
}
public String getStockoutDetailId()
{
return stockoutDetailId;
}
public void setStockoutGuid(String stockoutGuid)
{
this.stockoutGuid = stockoutGuid;
}
public String getStockoutGuid()
{
return stockoutGuid;
}
public void setStockoutId(String stockoutId)
{
this.stockoutId = stockoutId;
}
public String getStockoutId()
{
return stockoutId;
}
public void setLotNo(String lotNo)
{
this.lotNo = lotNo;
}
public String getLotNo()
{
return lotNo;
}
public void setProductGuid(String productGuid)
{
this.productGuid = productGuid;
}
public String getProductGuid()
{
return productGuid;
}
public void setProductId(String productId)
{
this.productId = productId;
}
public String getProductId()
{
return productId;
}
public void setQuantity(BigDecimal quantity)
{
this.quantity = quantity;
}
public BigDecimal getQuantity()
{
return quantity;
}
public String getQuantityX() {
return quantityX;
}
public void setQuantityX(String quantityX) {
this.quantityX = quantityX;
}
public void setQuantityJ(BigDecimal quantityJ)
{
this.quantityJ = quantityJ;
}
public BigDecimal getQuantityJ()
{
return quantityJ;
}
public void setAssignNum(BigDecimal assignNum)
{
this.assignNum = assignNum;
}
public BigDecimal getAssignNum()
{
return assignNum;
}
public void setAssignNumX(BigDecimal assignNumX)
{
this.assignNumX = assignNumX;
}
public BigDecimal getAssignNumX()
{
return assignNumX;
}
public void setAssignNumJ(BigDecimal assignNumJ)
{
this.assignNumJ = assignNumJ;
}
public BigDecimal getAssignNumJ()
{
return assignNumJ;
}
public void setAllotQuantity(BigDecimal allotQuantity)
{
this.allotQuantity = allotQuantity;
}
public BigDecimal getAllotQuantity()
{
return allotQuantity;
}
public void setAllotQuantityX(BigDecimal allotQuantityX)
{
this.allotQuantityX = allotQuantityX;
}
public BigDecimal getAllotQuantityX()
{
return allotQuantityX;
}
public void setAllotQuantityJ(BigDecimal allotQuantityJ)
{
this.allotQuantityJ = allotQuantityJ;
}
public BigDecimal getAllotQuantityJ()
{
return allotQuantityJ;
}
public void setPrice(String price)
{
this.price = price;
}
public String getPrice()
{
return price;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setOutId(String outId)
{
this.outId = outId;
}
public String getOutId()
{
return outId;
}
public void setBukechaiQuantity(String bukechaiQuantity)
{
this.bukechaiQuantity = bukechaiQuantity;
}
public String getBukechaiQuantity()
{
return bukechaiQuantity;
}
public void setKechaiQuantity(String kechaiQuantity)
{
this.kechaiQuantity = kechaiQuantity;
}
public String getKechaiQuantity()
{
return kechaiQuantity;
}
public void setEntryid(String entryid)
{
this.entryid = entryid;
}
public String getEntryid()
{
return entryid;
}
public void setFlatQuantity(String flatQuantity)
{
this.flatQuantity = flatQuantity;
}
public String getFlatQuantity()
{
return flatQuantity;
}
public void setFid(String fid)
{
this.fid = fid;
}
public String getFid()
{
return fid;
}
public void setErpStockoutId(String erpStockoutId)
{
this.erpStockoutId = erpStockoutId;
}
public String getErpStockoutId()
{
return erpStockoutId;
}
public void setUnit(String unit)
{
this.unit = unit;
}
public String getUnit()
{
return unit;
}
public void setSpec(String spec)
{
this.spec = spec;
}
public String getSpec()
{
return spec;
}
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
{
return productName;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
{
return spare5;
}
public void setSpare6(String spare6)
{
this.spare6 = spare6;
}
public String getSpare6()
{
return spare6;
}
public void setSpare7(String spare7)
{
this.spare7 = spare7;
}
public String getSpare7()
{
return spare7;
}
public void setSpare8(String spare8)
{
this.spare8 = spare8;
}
public String getSpare8()
{
return spare8;
}
public void setSpare9(String spare9)
{
this.spare9 = spare9;
}
public String getSpare9()
{
return spare9;
}
public void setSendStatus(String sendStatus)
{
this.sendStatus = sendStatus;
}
public String getSendStatus()
{
return sendStatus;
}
public void setSendTime(String sendTime)
{
this.sendTime = sendTime;
}
public String getSendTime()
{
return sendTime;
}
public void setMsg(String msg)
{
this.msg = msg;
}
public String getMsg()
{
return msg;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("stockoutDetailId", getStockoutDetailId())
.append("stockoutGuid", getStockoutGuid())
.append("stockoutId", getStockoutId())
.append("lotNo", getLotNo())
.append("productGuid", getProductGuid())
.append("productId", getProductId())
.append("quantity", getQuantity())
.append("quantityX", getQuantityX())
.append("quantityJ", getQuantityJ())
.append("assignNum", getAssignNum())
.append("assignNumX", getAssignNumX())
.append("assignNumJ", getAssignNumJ())
.append("allotQuantity", getAllotQuantity())
.append("allotQuantityX", getAllotQuantityX())
.append("allotQuantityJ", getAllotQuantityJ())
.append("price", getPrice())
.append("remark", getRemark())
.append("warehouseId", getWarehouseId())
.append("outId", getOutId())
.append("bukechaiQuantity", getBukechaiQuantity())
.append("kechaiQuantity", getKechaiQuantity())
.append("entryid", getEntryid())
.append("flatQuantity", getFlatQuantity())
.append("fid", getFid())
.append("erpStockoutId", getErpStockoutId())
.append("unit", getUnit())
.append("spec", getSpec())
.append("productName", getProductName())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.append("spare6", getSpare6())
.append("spare7", getSpare7())
.append("spare8", getSpare8())
.append("spare9", getSpare9())
.append("sendStatus", getSendStatus())
.append("sendTime", getSendTime())
.append("msg", getMsg())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.out.outStockoutDetailBack.mapper;
import java.util.List;
import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
/**
* 历史出库单据子信息Mapper接口
*
* @author ruoyi
* @date 2026-02-02
*/
public interface OutStockoutDetailBackMapper
{
/**
* 查询历史出库单据子信息
*
* @param stockoutDetailId 历史出库单据子信息主键
* @return 历史出库单据子信息
*/
public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId);
/**
* 查询历史出库单据子信息列表
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 历史出库单据子信息集合
*/
public List<OutStockoutDetailBack> selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack);
/**
* 新增历史出库单据子信息
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 结果
*/
public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack);
/**
* 修改历史出库单据子信息
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 结果
*/
public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack);
/**
* 删除历史出库单据子信息
*
* @param stockoutDetailId 历史出库单据子信息主键
* @return 结果
*/
public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId);
/**
* 批量删除历史出库单据子信息
*
* @param stockoutDetailIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.out.outStockoutDetailBack.service;
import java.util.List;
import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
/**
* 历史出库单据子信息Service接口
*
* @author ruoyi
* @date 2026-02-02
*/
public interface IOutStockoutDetailBackService
{
/**
* 查询历史出库单据子信息
*
* @param stockoutDetailId 历史出库单据子信息主键
* @return 历史出库单据子信息
*/
public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId);
/**
* 查询历史出库单据子信息列表
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 历史出库单据子信息集合
*/
public List<OutStockoutDetailBack> selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack);
/**
* 新增历史出库单据子信息
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 结果
*/
public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack);
/**
* 修改历史出库单据子信息
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 结果
*/
public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack);
/**
* 批量删除历史出库单据子信息
*
* @param stockoutDetailIds 需要删除的历史出库单据子信息主键集合
* @return 结果
*/
public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds);
/**
* 删除历史出库单据子信息信息
*
* @param stockoutDetailId 历史出库单据子信息主键
* @return 结果
*/
public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.out.outStockoutDetailBack.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.out.outStockoutDetailBack.mapper.OutStockoutDetailBackMapper;
import com.ruoyi.out.outStockoutDetailBack.domain.OutStockoutDetailBack;
import com.ruoyi.out.outStockoutDetailBack.service.IOutStockoutDetailBackService;
/**
* 历史出库单据子信息Service业务层处理
*
* @author ruoyi
* @date 2026-02-02
*/
@Service
public class OutStockoutDetailBackServiceImpl implements IOutStockoutDetailBackService
{
@Autowired
private OutStockoutDetailBackMapper outStockoutDetailBackMapper;
/**
* 查询历史出库单据子信息
*
* @param stockoutDetailId 历史出库单据子信息主键
* @return 历史出库单据子信息
*/
@Override
public OutStockoutDetailBack selectOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId)
{
return outStockoutDetailBackMapper.selectOutStockoutDetailBackByStockoutDetailId(stockoutDetailId);
}
/**
* 查询历史出库单据子信息列表
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 历史出库单据子信息
*/
@Override
public List<OutStockoutDetailBack> selectOutStockoutDetailBackList(OutStockoutDetailBack outStockoutDetailBack)
{
return outStockoutDetailBackMapper.selectOutStockoutDetailBackList(outStockoutDetailBack);
}
/**
* 新增历史出库单据子信息
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 结果
*/
@Override
public int insertOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack)
{
return outStockoutDetailBackMapper.insertOutStockoutDetailBack(outStockoutDetailBack);
}
/**
* 修改历史出库单据子信息
*
* @param outStockoutDetailBack 历史出库单据子信息
* @return 结果
*/
@Override
public int updateOutStockoutDetailBack(OutStockoutDetailBack outStockoutDetailBack)
{
return outStockoutDetailBackMapper.updateOutStockoutDetailBack(outStockoutDetailBack);
}
/**
* 批量删除历史出库单据子信息
*
* @param stockoutDetailIds 需要删除的历史出库单据子信息主键
* @return 结果
*/
@Override
public int deleteOutStockoutDetailBackByStockoutDetailIds(String[] stockoutDetailIds)
{
return outStockoutDetailBackMapper.deleteOutStockoutDetailBackByStockoutDetailIds(stockoutDetailIds);
}
/**
* 删除历史出库单据子信息信息
*
* @param stockoutDetailId 历史出库单据子信息主键
* @return 结果
*/
@Override
public int deleteOutStockoutDetailBackByStockoutDetailId(String stockoutDetailId)
{
return outStockoutDetailBackMapper.deleteOutStockoutDetailBackByStockoutDetailId(stockoutDetailId);
}
}

View File

@@ -1,7 +1,10 @@
package com.ruoyi.pda.controller;
import com.ruoyi.api.domain.AgvMoveParam;
import com.ruoyi.api.domain.RequestEnter;
import com.ruoyi.api.domain.WcsPort;
import com.ruoyi.api.service.IToWcsService;
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -32,6 +35,8 @@ public class PdaController extends BaseController {
private PdaService pdaService;
@Autowired
private IInStockinDetailService iInStockinDetailService;
@Autowired
private IToWcsService iToWcsService;
/**
* 查询是否有半满托盘
@@ -91,7 +96,7 @@ public class PdaController extends BaseController {
@RequestMapping("/tpIn")
@ResponseBody
public AjaxResult tpIn(@RequestBody TrayCodeMsg trayCodeMsg) {
return pdaService.tpIn(trayCodeMsg.getTrayCode());
return pdaService.tpIn(trayCodeMsg);
}
/**
@@ -129,9 +134,6 @@ public class PdaController extends BaseController {
}
/**
* 入库扫码生成作业
*/
@@ -149,10 +151,6 @@ public class PdaController extends BaseController {
return pdaService.selectDetailByPDTray(trayCodeMakeSure);
}
/**
* 盘点出库确认
*
@@ -179,6 +177,32 @@ public class PdaController extends BaseController {
return pdaService.updateWcsPort(wcsPort);
}
/**
* 根据类型查询AGV站点
*/
@RequestMapping("/selectAgvPointByType")
@ResponseBody
public AjaxResult selectAgvPointByType(String type) {
List<AgvPoint> list = pdaService.selectAgvPointByType(type);
return AjaxResult.success(list);
}
@RequestMapping("/insertAgvJob")
@ResponseBody
public AjaxResult insertAgvJob(@RequestBody AgvMoveParam agvMoveParam) {
return iToWcsService.insertAgvMoveJob(agvMoveParam);
}
@RequestMapping("/hcoutMakesure")
@ResponseBody
@Log(title = "手持机缓存出库确认",businessType = BusinessType.OTHER)
public AjaxResult hcoutMakesure(String trayCode ){
return pdaService.hcoutMakesure(trayCode);
}
}

View File

@@ -19,6 +19,16 @@ private String stockinDetailId;
private String inOut;
private String status;
private String trayType;
public String getTrayType() {
return trayType;
}
public void setTrayType(String trayType) {
this.trayType = trayType;
}
public String getStatus() {
return status;
}

View File

@@ -38,4 +38,6 @@ public interface PdaMapper {
void pkOut(HashMap<String, Object> map);
void outMakeSureException(HashMap<String, Object> map);
void hcoutMakesure(HashMap<String, Object> map);
}

View File

@@ -2,6 +2,7 @@ package com.ruoyi.pda.service;
import com.ruoyi.api.domain.RequestEnter;
import com.ruoyi.api.domain.WcsPort;
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
import com.ruoyi.bas.container.domain.BasContainer;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.pda.domain.TrayCodeMakeSure;
@@ -28,7 +29,7 @@ public interface PdaService {
AjaxResult bindTray(TrayCodeMakeSure trayCodeMakeSure);
AjaxResult tpIn(String trayCode);
AjaxResult tpIn(TrayCodeMsg trayCodeMsg);
AjaxResult tpOut(TrayCodeMsg trayCodeMsg);
@@ -55,5 +56,7 @@ public interface PdaService {
AjaxResult updateWcsPort(WcsPort wcsport);
List<AgvPoint> selectAgvPointByType(String type);
AjaxResult hcoutMakesure(String trayCode);
}

View File

@@ -6,6 +6,8 @@ import com.ruoyi.api.domain.RequestEnter;
import com.ruoyi.api.domain.WcsPort;
import com.ruoyi.api.service.IToWcsService;
import com.ruoyi.api.service.IToWmsService;
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
import com.ruoyi.bas.agvPoint.service.IAgvPointService;
import com.ruoyi.check.commit.domain.CheckCommitRecord;
import com.ruoyi.check.commit.service.ICheckCommitRecordService;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -60,6 +62,8 @@ public class PdaServiceImp implements PdaService {
private BasStockMapper basStockMapper;
@Autowired
private IInStockinService inStockinService;
@Autowired
private IAgvPointService agvPointService;
@Override
@@ -139,9 +143,11 @@ public class PdaServiceImp implements PdaService {
}
@Override
public AjaxResult tpIn(String trayCode) {
public AjaxResult tpIn(TrayCodeMsg trayCodeMsg) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCode);
map.put("v_tray_code", trayCodeMsg.getTrayCode());
map.put("v_tray_type", trayCodeMsg.getTrayType());
map.put("v_quantity", Integer.valueOf(trayCodeMsg.getInQuantity()));
pdaMapper.tpIn(map);
if(!"10".equals(map.get("v_result").toString())){
return AjaxResult.error(map.get("v_resultmsg").toString());
@@ -155,7 +161,7 @@ public class PdaServiceImp implements PdaService {
public AjaxResult tpOut(TrayCodeMsg trayCodeMsg) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_exit_id", trayCodeMsg.getExitId());
map.put("v_tray_type", trayCodeMsg.getTrayType());
pdaMapper.tpOut(map);
if(!"10".equals(map.get("v_result").toString())){
return AjaxResult.error(map.get("v_resultmsg").toString());
@@ -197,9 +203,9 @@ public class PdaServiceImp implements PdaService {
@Override
public AjaxResult selectDetailByPDTray(TrayCodeMakeSure trayCodeMakeSure) {
MydoJob mydoJob = new MydoJob();
mydoJob.setExitId(trayCodeMakeSure.getExitId());
mydoJob.setTrayCode(trayCodeMakeSure.getTrayCode());
mydoJob.setStatus("3");
mydoJob.setInOrOut("26");
mydoJob.setInOrOut("28");
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectPdMydoJobDetailListByExit(mydoJob);
return AjaxResult.success(mydoJobDetails);
}
@@ -237,9 +243,9 @@ public class PdaServiceImp implements PdaService {
public AjaxResult checkMakeSure(TrayCodeMakeSure trayCodeMakeSure) {
MydoJob mydoJob = new MydoJob();
mydoJob.setExitId(trayCodeMakeSure.getExitId());
mydoJob.setTrayCode(trayCodeMakeSure.getTrayCode());
mydoJob.setStatus("3");
mydoJob.setInOrOut("26");
mydoJob.setInOrOut("28");
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectPdMydoJobDetailListByExit(mydoJob);
if (mydoJobDetails.isEmpty()) {
return AjaxResult.error("该物料没有盘点出库作业,请检查");
@@ -249,7 +255,7 @@ public class PdaServiceImp implements PdaService {
if (CollUtil.isNotEmpty(mydoJobDetailList)) {
boolean flag = mydoJobDetailList.stream().anyMatch(x -> StrUtil.isEmpty(x.getStockId()) && "0".equals(x.getInQuantity()));
if (flag) {
return AjaxResult.warn(MessageUtils.message("warn.message8"));
return AjaxResult.warn(MessageUtils.message("数量不可为0"));
}
for (MydoJobDetail mydoJobDetail : mydoJobDetailList) {
//插入盘点提交表
@@ -259,7 +265,7 @@ public class PdaServiceImp implements PdaService {
checkCommitRecord.setStockId(mydoJobDetail.getStockId());
checkCommitRecord.setSpare1(mydoJobDetail.getInOrOutDId());
checkCommitRecord.setSpare2(mydoJobDetail.getProductId());
checkCommitRecord.setSpare3(mydoJobDetail.getOutQuantity());
// checkCommitRecord.setSpare3(mydoJobDetail.getOutQuantity());
checkCommitRecordService.insertCheckCommitRecord(checkCommitRecord);
}
@@ -287,4 +293,25 @@ public class PdaServiceImp implements PdaService {
AjaxResult ajaxResult = toWcsService.updateWcsPort(wcsport);
return ajaxResult;
}
@Override
public List<AgvPoint> selectAgvPointByType(String type) {
AgvPoint agvPoint = new AgvPoint();
agvPoint.setType(type);
return agvPointService.selectAgvPointList(agvPoint);
}
@Override
public AjaxResult hcoutMakesure(String trayCode) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCode);
pdaMapper.hcoutMakesure(map);
String result = map.get("v_result").toString();
if ("10".equals(result)) {
return AjaxResult.success();
} else {
return AjaxResult.error(map.get("v_resultmsg").toString());
}
}
}

View File

@@ -6,14 +6,14 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:sqlserver://172.16.4.141:1433;databaseName=FT546-wms;encrypt=true;trustServerCertificate=true;
url: jdbc:sqlserver://192.168.188.236:1433;databaseName=FT546-wms;encrypt=true;trustServerCertificate=true;
username: sa
password: Flrd0914.
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url: jdbc:mariadb://172.16.4.141:3307/mydb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mariadb://172.16.4.12:3307/mydb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: Flrd0914.
# 初始连接数

View File

@@ -66,12 +66,12 @@ spring:
devtools:
restart:
# 热部署开关
enabled: true
enabled: false
data:
# redis 配置
redis:
# 地址
host: 172.16.4.141
host: 192.168.188.236
# 端口,默认为6379
port: 6379
# 数据库索引
@@ -133,7 +133,7 @@ token:
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
expireTime: 30
expireTime: 720

View File

@@ -0,0 +1,108 @@
<?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.api.moveMsg.mapper.MoveMsgMapper">
<resultMap type="MoveMsg" id="MoveMsgResult">
<result property="id" column="id" />
<result property="trayCode" column="tray_code" />
<result property="oldSpace" column="old_space" />
<result property="newSpace" column="new_space" />
<result property="status" column="status" />
<result property="sendTime" column="send_time" />
<result property="msg" column="msg" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
</resultMap>
<sql id="selectMoveMsgVo">
select id, tray_code, old_space, new_space, status, send_time, msg, spare1, spare2, spare3, spare4, spare5 from move_msg
</sql>
<select id="selectMoveMsgList" parameterType="MoveMsg" resultMap="MoveMsgResult">
<include refid="selectMoveMsgVo"/>
<where>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="oldSpace != null and oldSpace != ''"> and old_space = #{oldSpace}</if>
<if test="newSpace != null and newSpace != ''"> and new_space = #{newSpace}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="sendTime != null and sendTime != ''"> and send_time = #{sendTime}</if>
<if test="msg != null and msg != ''"> and msg = #{msg}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
</where>
</select>
<select id="selectMoveMsgById" parameterType="String" resultMap="MoveMsgResult">
<include refid="selectMoveMsgVo"/>
where id = #{id}
</select>
<insert id="insertMoveMsg" parameterType="MoveMsg">
insert into move_msg
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="trayCode != null">tray_code,</if>
<if test="oldSpace != null">old_space,</if>
<if test="newSpace != null">new_space,</if>
<if test="status != null">status,</if>
<if test="sendTime != null">send_time,</if>
<if test="msg != null">msg,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="oldSpace != null">#{oldSpace},</if>
<if test="newSpace != null">#{newSpace},</if>
<if test="status != null">#{status},</if>
<if test="sendTime != null">#{sendTime},</if>
<if test="msg != null">#{msg},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
</trim>
</insert>
<update id="updateMoveMsg" parameterType="MoveMsg">
update move_msg
<trim prefix="SET" suffixOverrides=",">
<if test="trayCode != null">tray_code = #{trayCode},</if>
<if test="oldSpace != null">old_space = #{oldSpace},</if>
<if test="newSpace != null">new_space = #{newSpace},</if>
<if test="status != null">status = #{status},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="msg != null">msg = #{msg},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMoveMsgById" parameterType="String">
delete from move_msg where id = #{id}
</delete>
<delete id="deleteMoveMsgByIds" parameterType="String">
delete from move_msg where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,82 @@
<?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.agvPoint.mapper.AgvPointMapper">
<resultMap type="AgvPoint" id="AgvPointResult">
<result property="id" column="id" />
<result property="station" column="station" />
<result property="type" column="type" />
<result property="remark" column="remark" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
</resultMap>
<sql id="selectAgvPointVo">
select id, station, type, remark, spare1, spare2, spare3 from agv_point
</sql>
<select id="selectAgvPointList" parameterType="AgvPoint" resultMap="AgvPointResult">
<include refid="selectAgvPointVo"/>
<where>
<if test="station != null and station != ''"> and station = #{station}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
</where>
</select>
<select id="selectAgvPointById" parameterType="String" resultMap="AgvPointResult">
<include refid="selectAgvPointVo"/>
where id = #{id}
</select>
<insert id="insertAgvPoint" parameterType="AgvPoint">
insert into agv_point
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="station != null">station,</if>
<if test="type != null">type,</if>
<if test="remark != null">remark,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="station != null">#{station},</if>
<if test="type != null">#{type},</if>
<if test="remark != null">#{remark},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
</trim>
</insert>
<update id="updateAgvPoint" parameterType="AgvPoint">
update agv_point
<trim prefix="SET" suffixOverrides=",">
<if test="station != null">station = #{station},</if>
<if test="type != null">type = #{type},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAgvPointById" parameterType="String">
delete from agv_point where id = #{id}
</delete>
<delete id="deleteAgvPointByIds" parameterType="String">
delete from agv_point where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -208,7 +208,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bs.product_name
from bas_cargo_space bcs
left join bas_stock bs on bcs.cargo_space_id = bs.cargo_space_id
where bcs.status in ('1', '2')
where bcs.status in ( '2')
</select>
<select id="selectBasCargoSpaceListByRoadway" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
select bcs.cargo_space_id, bcs.warehouse_id, bcs.roadway_id, bcs.cargo_space_name,

View File

@@ -146,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classNo != null">class_no = #{classNo},</if>
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
<if test="sendStatus != null">send_status = #{sendStatus},</if>
<if test="senTime != null">send_time = #{senTime},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="msg != null">msg = #{msg},</if>
</trim>
where stockin_guid = #{stockinGuid}
@@ -165,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTopInStockin" resultMap="InStockinBackResult">
select top(1) *
from in_stockin_back where status= 0
from in_stockin_back where send_status= 0
</select>
</mapper>

View File

@@ -189,7 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update in_stockin_detail_back
<trim prefix="SET" suffixOverrides=",">
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid = #{stockinGuid},</if>
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="productGuid != null">product_guid = #{productGuid},</if>
<if test="productId != null and productId != ''">product_id = #{productId},</if>
@@ -222,10 +222,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare9 != null">spare9 = #{spare9},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="sendStatus != null">send_status = #{sendStatus},</if>
<if test="senTime != null">send_time = #{senTime},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="msg != null">msg = #{msg},</if>
</trim>
where stockin_detail_id = #{stockinDetailId}
where stockin_id = #{stockinId}
</update>
<delete id="deleteInStockinDetailBackByStockinDetailId" parameterType="String">

View File

@@ -404,7 +404,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mjd.spare4,
mjd.pick_quantity,
mjd.out_quantity-mjd.pick_quantity as pick_quantity_real,
bp.product_name,
mjd.product_name,
mjd.spare5,
mjd.spare6,
mjd.spare7,
@@ -415,11 +415,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mj.tray_code
from mydo_job_detail mjd
left join bas_product bp on mjd.product_id = bp.product_id
left join mydo_job mj on mjd.job_id = mj.job_id
where mj.exit_id=#{exitId}
where tray_code=#{trayCode}
and mj.status='3'
and mj.execution_phase=2
and mj.in_or_out = #{inOrOut}
</select>
</mapper>

View File

@@ -205,6 +205,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where job_id = #{jobId}
</update>
<select id="ykCompleted" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_yk_complete(
#{v_job_id,jdbcType=VARCHAR,mode=IN},
#{v_result,mode=OUT,jdbcType=INTEGER}
)}
</select>
<delete id="deleteMydoJobByJobId" parameterType="String">
delete from mydo_job where job_id = #{jobId}
@@ -237,10 +243,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectMydoJobByEntranceId" parameterType="MydoJob" resultMap="MydoJobResult">
select top(1)* from mydo_job mj
where in_or_out&lt;20 and mj.entrance_id = #{entranceId}
and mj.status = #{status}
<if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
where in_or_out&lt;20
and mj.tray_code = #{trayCode}
<!-- <if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>-->
<!-- <if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>-->
order by mj.create_time
</select>
@@ -260,6 +266,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from mydo_job where tray_code = #{trayCode}
</select>
<select id="selectInJobByTaskNo" parameterType="String" resultMap="MydoJobResult">
select * from mydo_job where task_no = #{taskNo}
</select>
<select id="allotInJobSpace" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_allot_space(
#{v_tray_code,jdbcType=VARCHAR,mode=IN},

View File

@@ -0,0 +1,193 @@
<?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.out.outStockoutBack.mapper.OutStockoutBackMapper">
<resultMap type="OutStockoutBack" id="OutStockoutBackResult">
<result property="stockoutGuid" column="stockout_guid" />
<result property="stockoutId" column="stockout_id" />
<result property="outType" column="out_type" />
<result property="createDate" column="create_date" />
<result property="departmentNo" column="department_no" />
<result property="customerNo" column="customer_no" />
<result property="createManId" column="create_man_id" />
<result property="status" column="status" />
<result property="stockoutSource" column="stockout_source" />
<result property="warehouseId" column="warehouse_id" />
<result property="classNowId" column="class_now_id" />
<result property="exitId" column="exit_id" />
<result property="carNumber" column="car_number" />
<result property="FID" column="FID" />
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="startDate" column="start_date" />
<result property="finishDate" column="finish_date" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="sendStatus" column="send_status" />
<result property="sendTime" column="send_time" />
<result property="msg" column="msg" />
</resultMap>
<sql id="selectOutStockoutBackVo">
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id, start_date, finish_date, spare1, spare2, spare3, spare4, spare5, spare6, spare7, spare8, send_status, send_time, msg from out_stockout_back
</sql>
<select id="selectOutStockoutBackList" parameterType="OutStockoutBack" resultMap="OutStockoutBackResult">
<include refid="selectOutStockoutBackVo"/>
<where>
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
<if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="sendStatus != null and sendStatus != ''"> and send_status = #{sendStatus}</if>
<if test="sendTime != null and sendTime != ''"> and send_time = #{sendTime}</if>
<if test="msg != null and msg != ''"> and msg = #{msg}</if>
</where>
</select>
<select id="selectOutStockoutBackByStockoutGuid" parameterType="String" resultMap="OutStockoutBackResult">
<include refid="selectOutStockoutBackVo"/>
where stockout_guid = #{stockoutGuid}
</select>
<select id="selelctTopOutStockout" resultMap="OutStockoutBackResult">
select top(1)* from out_stockout_back where send_status=0
</select>
<insert id="insertOutStockoutBack" parameterType="OutStockoutBack">
insert into out_stockout_back
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
<if test="outType != null and outType != ''">out_type,</if>
<if test="createDate != null and createDate != ''">create_date,</if>
<if test="departmentNo != null">department_no,</if>
<if test="customerNo != null">customer_no,</if>
<if test="createManId != null">create_man_id,</if>
<if test="status != null and status != ''">status,</if>
<if test="stockoutSource != null">stockout_source,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="classNowId != null">class_now_id,</if>
<if test="exitId != null">exit_id,</if>
<if test="carNumber != null">car_number,</if>
<if test="FID != null">FID,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="startDate != null">start_date,</if>
<if test="finishDate != null">finish_date,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="sendStatus != null">send_status,</if>
<if test="sendTime != null">send_time,</if>
<if test="msg != null">msg,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
<if test="outType != null and outType != ''">#{outType},</if>
<if test="createDate != null and createDate != ''">#{createDate},</if>
<if test="departmentNo != null">#{departmentNo},</if>
<if test="customerNo != null">#{customerNo},</if>
<if test="createManId != null">#{createManId},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="stockoutSource != null">#{stockoutSource},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="classNowId != null">#{classNowId},</if>
<if test="exitId != null">#{exitId},</if>
<if test="carNumber != null">#{carNumber},</if>
<if test="FID != null">#{FID},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="startDate != null">#{startDate},</if>
<if test="finishDate != null">#{finishDate},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="sendStatus != null">#{sendStatus},</if>
<if test="sendTime != null">#{sendTime},</if>
<if test="msg != null">#{msg},</if>
</trim>
</insert>
<update id="updateOutStockoutBack" parameterType="OutStockoutBack">
update out_stockout_back
<trim prefix="SET" suffixOverrides=",">
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
<if test="outType != null and outType != ''">out_type = #{outType},</if>
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
<if test="departmentNo != null">department_no = #{departmentNo},</if>
<if test="customerNo != null">customer_no = #{customerNo},</if>
<if test="createManId != null">create_man_id = #{createManId},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="classNowId != null">class_now_id = #{classNowId},</if>
<if test="exitId != null">exit_id = #{exitId},</if>
<if test="carNumber != null">car_number = #{carNumber},</if>
<if test="FID != null">FID = #{FID},</if>
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="finishDate != null">finish_date = #{finishDate},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="sendStatus != null">send_status = #{sendStatus},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="msg != null">msg = #{msg},</if>
</trim>
where stockout_guid = #{stockoutGuid}
</update>
<delete id="deleteOutStockoutBackByStockoutGuid" parameterType="String">
delete from out_stockout_back where stockout_guid = #{stockoutGuid}
</delete>
<delete id="deleteOutStockoutBackByStockoutGuids" parameterType="String">
delete from out_stockout_back where stockout_guid in
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
#{stockoutGuid}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,247 @@
<?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.out.outStockoutDetailBack.mapper.OutStockoutDetailBackMapper">
<resultMap type="OutStockoutDetailBack" id="OutStockoutDetailBackResult">
<result property="stockoutDetailId" column="stockout_detail_id" />
<result property="stockoutGuid" column="stockout_guid" />
<result property="stockoutId" column="stockout_id" />
<result property="lotNo" column="lot_no" />
<result property="productGuid" column="product_guid" />
<result property="productId" column="product_id" />
<result property="quantity" column="quantity" />
<result property="quantityX" column="quantity_x" />
<result property="quantityJ" column="quantity_j" />
<result property="assignNum" column="assign_num" />
<result property="assignNumX" column="assign_num_x" />
<result property="assignNumJ" column="assign_num_j" />
<result property="allotQuantity" column="allot_quantity" />
<result property="allotQuantityX" column="allot_quantity_x" />
<result property="allotQuantityJ" column="allot_quantity_j" />
<result property="price" column="price" />
<result property="remark" column="remark" />
<result property="warehouseId" column="warehouse_id" />
<result property="outId" column="out_id" />
<result property="bukechaiQuantity" column="bukechai_quantity" />
<result property="kechaiQuantity" column="kechai_quantity" />
<result property="entryid" column="entryid" />
<result property="flatQuantity" column="flat_quantity" />
<result property="fid" column="fid" />
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="unit" column="unit" />
<result property="spec" column="spec" />
<result property="productName" column="product_name" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="spare9" column="spare9" />
<result property="sendStatus" column="send_status" />
<result property="sendTime" column="send_time" />
<result property="msg" column="msg" />
</resultMap>
<sql id="selectOutStockoutDetailBackVo">
select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, spare1, spare2, spare3, spare4, spare5, spare6, spare7, spare8, spare9, send_status, send_time, msg from out_stockout_detail_back
</sql>
<select id="selectOutStockoutDetailBackList" parameterType="OutStockoutDetailBack" resultMap="OutStockoutDetailBackResult">
<include refid="selectOutStockoutDetailBackVo"/>
<where>
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="quantityX != null "> and quantity_x = #{quantityX}</if>
<if test="quantityJ != null "> and quantity_j = #{quantityJ}</if>
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
<if test="assignNumX != null "> and assign_num_x = #{assignNumX}</if>
<if test="assignNumJ != null "> and assign_num_j = #{assignNumJ}</if>
<if test="allotQuantity != null "> and allot_quantity = #{allotQuantity}</if>
<if test="allotQuantityX != null "> and allot_quantity_x = #{allotQuantityX}</if>
<if test="allotQuantityJ != null "> and allot_quantity_j = #{allotQuantityJ}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="outId != null and outId != ''"> and out_id = #{outId}</if>
<if test="bukechaiQuantity != null and bukechaiQuantity != ''"> and bukechai_quantity = #{bukechaiQuantity}</if>
<if test="kechaiQuantity != null and kechaiQuantity != ''"> and kechai_quantity = #{kechaiQuantity}</if>
<if test="entryid != null and entryid != ''"> and entryid = #{entryid}</if>
<if test="flatQuantity != null and flatQuantity != ''"> and flat_quantity = #{flatQuantity}</if>
<if test="fid != null and fid != ''"> and fid = #{fid}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="spare9 != null and spare9 != ''"> and spare9 = #{spare9}</if>
<if test="sendStatus != null and sendStatus != ''"> and send_status = #{sendStatus}</if>
<if test="sendTime != null and sendTime != ''"> and send_time = #{sendTime}</if>
<if test="msg != null and msg != ''"> and msg = #{msg}</if>
</where>
</select>
<select id="selectOutStockoutDetailBackByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailBackResult">
<include refid="selectOutStockoutDetailBackVo"/>
where stockout_detail_id = #{stockoutDetailId}
</select>
<insert id="insertOutStockoutDetailBack" parameterType="OutStockoutDetailBack">
insert into out_stockout_detail_back
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
<if test="stockoutGuid != null">stockout_guid,</if>
<if test="stockoutId != null">stockout_id,</if>
<if test="lotNo != null">lot_no,</if>
<if test="productGuid != null">product_guid,</if>
<if test="productId != null">product_id,</if>
<if test="quantity != null">quantity,</if>
<if test="quantityX != null">quantity_x,</if>
<if test="quantityJ != null">quantity_j,</if>
<if test="assignNum != null">assign_num,</if>
<if test="assignNumX != null">assign_num_x,</if>
<if test="assignNumJ != null">assign_num_j,</if>
<if test="allotQuantity != null">allot_quantity,</if>
<if test="allotQuantityX != null">allot_quantity_x,</if>
<if test="allotQuantityJ != null">allot_quantity_j,</if>
<if test="price != null">price,</if>
<if test="remark != null">remark,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="outId != null">out_id,</if>
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
<if test="kechaiQuantity != null">kechai_quantity,</if>
<if test="entryid != null">entryid,</if>
<if test="flatQuantity != null">flat_quantity,</if>
<if test="fid != null">fid,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="unit != null">unit,</if>
<if test="spec != null">spec,</if>
<if test="productName != null">product_name,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="spare9 != null">spare9,</if>
<if test="sendStatus != null">send_status,</if>
<if test="sendTime != null">send_time,</if>
<if test="msg != null">msg,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
<if test="stockoutGuid != null">#{stockoutGuid},</if>
<if test="stockoutId != null">#{stockoutId},</if>
<if test="lotNo != null">#{lotNo},</if>
<if test="productGuid != null">#{productGuid},</if>
<if test="productId != null">#{productId},</if>
<if test="quantity != null">#{quantity},</if>
<if test="quantityX != null">#{quantityX},</if>
<if test="quantityJ != null">#{quantityJ},</if>
<if test="assignNum != null">#{assignNum},</if>
<if test="assignNumX != null">#{assignNumX},</if>
<if test="assignNumJ != null">#{assignNumJ},</if>
<if test="allotQuantity != null">#{allotQuantity},</if>
<if test="allotQuantityX != null">#{allotQuantityX},</if>
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
<if test="price != null">#{price},</if>
<if test="remark != null">#{remark},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="outId != null">#{outId},</if>
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
<if test="entryid != null">#{entryid},</if>
<if test="flatQuantity != null">#{flatQuantity},</if>
<if test="fid != null">#{fid},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="unit != null">#{unit},</if>
<if test="spec != null">#{spec},</if>
<if test="productName != null">#{productName},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="spare9 != null">#{spare9},</if>
<if test="sendStatus != null">#{sendStatus},</if>
<if test="sendTime != null">#{sendTime},</if>
<if test="msg != null">#{msg},</if>
</trim>
</insert>
<update id="updateOutStockoutDetailBack" parameterType="OutStockoutDetailBack">
update out_stockout_detail_back
<trim prefix="SET" suffixOverrides=",">
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="productGuid != null">product_guid = #{productGuid},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="quantityX != null">quantity_x = #{quantityX},</if>
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
<if test="assignNum != null">assign_num = #{assignNum},</if>
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
<if test="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
<if test="price != null">price = #{price},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="outId != null">out_id = #{outId},</if>
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
<if test="entryid != null">entryid = #{entryid},</if>
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
<if test="fid != null">fid = #{fid},</if>
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="spare9 != null">spare9 = #{spare9},</if>
<if test="sendStatus != null">send_status = #{sendStatus},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="msg != null">msg = #{msg},</if>
</trim>
where stockout_id = #{stockoutId}
</update>
<delete id="deleteOutStockoutDetailBackByStockoutDetailId" parameterType="String">
delete from out_stockout_detail_back where stockout_detail_id = #{stockoutDetailId}
</delete>
<delete id="deleteOutStockoutDetailBackByStockoutDetailIds" parameterType="String">
delete from out_stockout_detail_back where stockout_detail_id in
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
#{stockoutDetailId}
</foreach>
</delete>
</mapper>

View File

@@ -253,9 +253,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x,
d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j,
d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid,
d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date,
d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id,
p.product_name
d.erp_stockout_id, d.unit, d.spec,
d.product_name,d.spare1, d.spare2, d.spare3, d.spare4,d.spare5, d.spare6,d.spare7,d.spare8,d.spare9
from out_stockout_detail_finish d left join bas_product p on d.product_id = p.product_id
where stockout_guid = #{stockoutGuid}
</select>

View File

@@ -29,10 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
</resultMap>
<sql id="selectOutStockoutVo">
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date,spare1,spare2,spare3,spare4,spare5 from out_stockout
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date,spare1,spare2,spare3,spare4,spare5,spare6,spare7,spare8 from out_stockout
</sql>
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
@@ -68,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare3 != null and spare3 != ''"> and is2.spare3 = #{spare3}</if>
<if test="spare5 != null and spare5 != ''"> and is2.spare5 = #{spare5}</if>
</where>
order by o.create_date desc
</select>
@@ -100,6 +104,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare4 != null">spare4,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
@@ -122,6 +129,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare4 != null">#{spare4},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
</trim>
</insert>
@@ -171,8 +181,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{status,mode=IN,jdbcType=VARCHAR},
#{newStatus,mode=IN,jdbcType=VARCHAR},
#{exitId,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=VARCHAR},
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)
}
</select>
@@ -181,7 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
call proc_out_auto_allocation(
#{v_stockout_detail_id,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=VARCHAR},
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)
}
</select>
@@ -192,7 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{v_stockout_detail_id,mode=IN,jdbcType=VARCHAR},
#{v_stock_id,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=VARCHAR},
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)
}
</select>

View File

@@ -17,6 +17,8 @@
<select id="tpIn" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_tp_in(
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
#{v_tray_type,mode=IN,jdbcType=VARCHAR},
#{v_quantity,mode=IN,jdbcType=INTEGER},
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
@@ -25,7 +27,7 @@
<select id="tpOut" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_tp_out(
#{v_exit_id,mode=IN,jdbcType=VARCHAR},
#{v_tray_type,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
@@ -142,4 +144,15 @@
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
</select>
<select id="hcoutMakesure" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_hc_out_make_sure(
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
</select>
</mapper>

View File

@@ -44,6 +44,7 @@
"sortablejs": "1.10.2",
"splitpanes": "2.4.1",
"vue": "2.6.12",
"vue-barcode": "^1.3.0",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-easy-print": "^0.0.8",

View File

@@ -1,22 +1,22 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" >
<!-- <el-form-item label="格式ID" prop="formatId">-->
<!--&lt;!&ndash; <el-input-->
<!-- v-model="queryParams.formatId"-->
<!-- placeholder="请输入格式ID"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />&ndash;&gt;-->
<!-- <el-select v-model="queryParams.formatId" placeholder="请选择格式ID">-->
<!-- <el-option-->
<!-- v-for="item in traycodeFormatList"-->
<!-- :key="item.id"-->
<!-- :label="item.remarks"-->
<!-- :value="item.id"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="格式ID" prop="formatId">-->
<!--&lt;!&ndash; <el-input-->
<!-- v-model="queryParams.formatId"-->
<!-- placeholder="请输入格式ID"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />&ndash;&gt;-->
<!-- <el-select v-model="queryParams.formatId" placeholder="请选择格式ID">-->
<!-- <el-option-->
<!-- v-for="item in traycodeFormatList"-->
<!-- :key="item.id"-->
<!-- :label="item.remarks"-->
<!-- :value="item.id"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="条码" prop="trayCode">
<el-input
v-model="queryParams.trayCode"
@@ -25,6 +25,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否可用" prop="spare2">
<el-select v-model="queryParams.spare2" placeholder="请选择">
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -91,12 +101,16 @@
<el-table ref="table" v-loading="loading" :data="traycodeList" @selection-change="handleSelectionChange" max-height="700">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="left" prop="id" width="120" />
<!-- <el-table-column label="格式ID" align="left" prop="formatName" />-->
<el-table-column label="条码" align="left" prop="trayCode" />
<el-table-column label="Spare Field 1" align="center" prop="spare1" />
<el-table-column label="Spare Field 2" align="center" prop="spare2" />
<el-table-column label="Spare Field 3" align="center" prop="spare3" />
<!-- <el-table-column label="序号" align="center" prop="id" />-->
<!-- <el-table-column label="格式ID" align="left" prop="formatName" />-->
<el-table-column label="条码" align="center" prop="trayCode" />
<!-- <el-table-column label="Spare Field 1" align="center" prop="spare1" />-->
<el-table-column label="是否可用" align="center" prop="spare2" >
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.spare2"/>
</template>
</el-table-column>
<!-- <el-table-column label="Spare Field 3" align="center" prop="spare3" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
<template slot-scope="scope">
<el-button
@@ -136,7 +150,7 @@
<!-- 添加或修改条码信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<!-- <el-form-item label="格式ID" prop="formatId">
<el-form-item label="格式ID" prop="formatId">
<el-select v-model="form.formatId" placeholder="请选择格式ID">
<el-option
v-for="item in traycodeFormatList"
@@ -145,19 +159,24 @@
:value="item.id"
/>
</el-select>
</el-form-item>-->
<el-form-item label="托盘编码" prop="trayCode">
</el-form-item>
<el-input v-model="form.trayCode" placeholder="请输入托盘编码" />
<el-form-item label="数量" prop="spare1" v-if="form.id == null">
<el-input v-model="form.spare1" placeholder="请输入数量" />
</el-form-item>
<el-form-item label="Spare Field 1" prop="spare1">
<el-input v-model="form.spare1" placeholder="Enter spare field 1" />
<el-form-item label="托盘编码" prop="trayCode" v-if="form.id != null" >
<el-input v-model="form.trayCode" placeholder="请输入托盘编码" disabled/>
</el-form-item>
<el-form-item label="Spare Field 2" prop="spare2">
<el-input v-model="form.spare2" placeholder="Enter spare field 2" />
</el-form-item>
<el-form-item label="Spare Field 3" prop="spare3">
<el-input v-model="form.spare3" placeholder="Enter spare field 3" />
<el-form-item label="是否可用" prop="spare2" v-if="form.id != null">
<el-select v-model="form.spare2" placeholder="请选择" >
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -170,10 +189,13 @@
<!-- 打印模板 -->
<vue-easy-print v-show="true" ref="easyPrint2">
<div v-for="item in printData" :key="item.id" style="page-break-after:always" class="vue-easy-print">
<vue-qr :text='item.trayCode' :size="150" :margin="10" :align-item="center" :correctLevel="2"></vue-qr>
<div>
<span class="num">{{ item.trayCode }}</span>
</div>
<vue-barcode
:value=item.trayCode
format="CODE39"
width="2"
height="100"
display-value
/>
</div>
</vue-easy-print>
</div>
@@ -184,13 +206,15 @@ import { listTraycode, getTraycode, delTraycode, addTraycode, updateTraycode } f
import { listTraycodeFormat } from "@/api/bas/traycodeFormat"
import vueEasyPrint from 'vue-easy-print'
import VueQr from 'vue-qr'
import VueBarcode from 'vue-barcode'
export default {
name: "Traycode",
dicts:['sys_yes_no'],
components: {
vueEasyPrint,
VueQr
VueQr,
VueBarcode
},
data() {
return {
@@ -353,10 +377,23 @@ export default {
},
/** 打印条码 */
printBarcode: function (row) {
const yesValItem = (this.dict && this.dict.type && this.dict.type.sys_yes_no) ? (this.dict.type.sys_yes_no.find(i => i.label === '是') || this.dict.type.sys_yes_no.find(i => i.value === 'Y' || i.value === '1')) : null
const yesVal = yesValItem ? yesValItem.value : 'Y'
if (row.spare2 !== yesVal) {
this.$modal.msgError("该托盘不可打印:仅“是”可用")
return;
}
this.printData = [row]
this.$nextTick(() => {
setTimeout(() => {
this.$refs.easyPrint2.print()
const noValItem = (this.dict && this.dict.type && this.dict.type.sys_yes_no) ? (this.dict.type.sys_yes_no.find(i => i.label === '否') || this.dict.type.sys_yes_no.find(i => i.value === 'N' || i.value === '0')) : null
const noVal = noValItem ? noValItem.value : 'N'
const data = Object.assign({}, row, { spare2: noVal })
updateTraycode(data).then(() => {
this.$modal.msgSuccess("打印完成,已标记为不可用")
this.getList()
}).catch(() => {})
}, 100)
})
},
@@ -367,10 +404,27 @@ export default {
this.$modal.msgError("请选择要打印的数据项");
return;
}
const yesValItem = (this.dict && this.dict.type && this.dict.type.sys_yes_no) ? (this.dict.type.sys_yes_no.find(i => i.label === '是') || this.dict.type.sys_yes_no.find(i => i.value === 'Y' || i.value === '1')) : null
const yesVal = yesValItem ? yesValItem.value : 'Y'
const invalid = selection.filter(item => item.spare2 !== yesVal)
if (invalid.length > 0) {
this.$modal.msgError("存在不可打印项(非“是”),请重新选择")
return;
}
this.printData = selection;
this.$nextTick(() => {
setTimeout(() => {
this.$refs.easyPrint2.print()
const noValItem = (this.dict && this.dict.type && this.dict.type.sys_yes_no) ? (this.dict.type.sys_yes_no.find(i => i.label === '否') || this.dict.type.sys_yes_no.find(i => i.value === 'N' || i.value === '0')) : null
const noVal = noValItem ? noValItem.value : 'N'
const updates = selection.map(item => {
const data = Object.assign({}, item, { spare2: noVal })
return updateTraycode(data)
})
Promise.all(updates).then(() => {
this.$modal.msgSuccess("批量打印完成,已标记为不可用")
this.getList()
}).catch(() => {})
}, 100)
});
},
@@ -405,7 +459,7 @@ export default {
@media print {
@page {
size: A4;
size: 80mm 50mm;
margin: 0;
}

View File

@@ -670,9 +670,15 @@ export default {
console.log(data)
// 这里需要调用保存接口
saveCheckStock(data).then(response => {
if (response.code==200){
this.$modal.msgSuccess('保存成功:' + response.msg);
this.$tab.refreshPage(this.$route);
}
else {
this.$modal.msgError('建单失败:' + response.msg);
}
this.$modal.msgSuccess('保存成功:' + response.msg);
this.$tab.refreshPage(this.$route);
// this.reset();
});
}

View File

@@ -135,7 +135,7 @@
<el-table v-loading="loading" :data="mydoJobList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row :current-row="currentRow"
max-height="400">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="作业编码" align="left" prop="jobId" fixed width="140" />
<el-table-column label="作业编码" align="left" prop="jobId" fixed width="160" />
<el-table-column label="状态" align="left" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.mydo_job_status" :value="scope.row.status"/>
@@ -249,7 +249,7 @@ export default {
pageNum: 1,
pageSize: 10,
jobId: null,
status: '1',
status: null,
onLineType: null,
taskNo: null,
supplierId: null,

View File

@@ -188,15 +188,15 @@
</template>
</el-table-column>
<el-table-column label="仓库" align="left" prop="warehouseName"/><!--仓库-->
<el-table-column label="供应商代码" align="left" prop="supplierNo"/><!--仓库-->
<el-table-column label="供应商名称" align="left" prop="classNo" /><!--供应商-->
<el-table-column label="制单人" align="left" prop="createManId"/><!--创建人-->
<el-table-column label="项目号" align="left" prop="departmentNo"/><!--部门-->
<el-table-column label="单据时间" align="left" prop="createDate" sortable/><!--建立时间-->
<el-table-column label="确认时间" align="left" prop="finishDate" sortable/><!--完成日期-->
<el-table-column label="合同号" align="left" prop="spare1" sortable/><!--完成日期-->
<el-table-column label="销售单号" align="left" prop="spare2" sortable/><!--完成日期-->
<el-table-column label="审核时间" align="left" prop="spare3" sortable/><!--完成日期-->
<el-table-column label="供应商代码" align="left" prop="supplierNo" width="140"/><!--仓库-->
<el-table-column label="供应商名称" align="left" prop="classNo" width="140"/><!--供应商-->
<el-table-column label="制单人" align="left" prop="createManId" width="140"/><!--创建人-->
<el-table-column label="项目号" align="left" prop="departmentNo" width="140"/><!--部门-->
<el-table-column label="单据时间" align="left" prop="createDate" width="160" sortable/><!--建立时间-->
<el-table-column label="确认时间" align="left" prop="finishDate" width="160" sortable/><!--完成日期-->
<el-table-column label="合同号" align="left" prop="spare1" width="140" sortable/><!--完成日期-->
<el-table-column label="销售单号" align="left" prop="spare2" width="140" sortable/><!--完成日期-->
<el-table-column label="审核时间" align="left" prop="spare3" width="160" sortable/><!--完成日期-->
<el-table-column label="审核人" align="left" prop="spare4" /><!--完成日期-->
<el-table-column label="备注" align="left" prop="spare5" /><!--完成日期-->
</el-table>
@@ -240,7 +240,7 @@
class="vue-easy-print">
<vue-qr :text='item.stockinDetailId' :size="150" :margin="10" :align-item="center" :correctLevel="2"></vue-qr>
<div>
<span class="num">{{ item.stockinDetailId }}</span>
<span class="num">{{ item.productId }} {{ item.productName }}</span>
</div>
</div>
</vue-easy-print>
@@ -547,11 +547,6 @@ export default {
font-family: Arial, sans-serif;
}
.vue-qr {
display: block;
margin: 20px auto;
max-width: 100%;
}
@media print {
@page {

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<!-- 主表信息录入 -->
<el-form :model="formData" ref="formRef" size="small" :inline="true" label-width="68px" :rules="rules">
<el-form-item :label="'仓库'" prop="warehouseId" required><!--仓库-->
<!-- <el-form-item :label="'仓库'" prop="warehouseId" required>&lt;!&ndash;仓库&ndash;&gt;
<el-select v-model="formData.warehouseId" :placeholder="'请选择仓库'" clearable>
<el-option
v-for="dict in warehouseOptions"
@@ -11,7 +11,7 @@
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
</el-form-item>-->
<el-form-item label="项目号" prop="departmentNo">
<el-input v-model="formData.departmentNo" placeholder="请输入项目号"/>
</el-form-item>
@@ -265,9 +265,9 @@ export default {
customerTotal: 0,
// 表单验证规则
rules: {
warehouseId: [
{ required: true, message: '请选择仓库', trigger: "change" }
],
// warehouseId: [
// { required: true, message: '请选择仓库', trigger: "change" }
// ],
customerNo: [
{ required: true, message: '请输入客商编号', trigger: "blur" }
],
@@ -403,10 +403,10 @@ export default {
},
/** 打开选择存货弹窗 */
handleSelectMaterials() {
if (!this.formData.warehouseId) {
/*if (!this.formData.warehouseId) {
this.$modal.msgError('请选择仓库');
return;
}
}*/
if (!this.formData.departmentNo) {
this.$modal.msgError('请输入项目号');
return;

View File

@@ -379,8 +379,8 @@ export default {
},
// 出口选项
exitOptions: [
{ exitId: '1', exitName: '一楼'},
{ exitId: '2', exitName: '二楼'},
{ exitId: '1', exitName: '缓存'},
{ exitId: '2', exitName: '线边'},
],

View File

@@ -79,20 +79,20 @@
<el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange" max-height="650">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="库存编码" align="center" prop="stockId" width="120"/>
<el-table-column label="库存编码" align="center" prop="stockId" width="160"/>
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="120"/>
<el-table-column label="入库日期" align="center" prop="inDate" width="160" />
<el-table-column label="批次号" align="center" prop="lotNo"/>
<el-table-column label="托盘条码" align="center" prop="trayCode" width="130" />
<el-table-column label="存货编码" align="center" prop="productId" />
<el-table-column label="存货名称" align="center" prop="productName"/>
<el-table-column label="存货名称" align="center" prop="productName" width="120"/>
<el-table-column label="层级关系" align="center" prop="spare1"/>
<el-table-column label="上层物料" align="center" prop="spare2"/>
<el-table-column label="顶层物料" align="center" prop="spare3"/>
<el-table-column label="项目号" align="center" prop="spare4"/>
<el-table-column label="合同号" align="center" prop="spare5"/>
<el-table-column label="销售订单" align="center" prop="spare6"/>
<el-table-column label="供应商编码" align="center" prop="voltage"/>
<el-table-column label="供应商编码" align="center" prop="voltage" width="120"/>
<el-table-column label="规格型号" align="center" prop="power"/>
<el-table-column label="计量单位" align="center" prop="phase"/>
<el-table-column label="数量" align="center" prop="quantity"/>
@@ -244,8 +244,8 @@ export default {
},
// 出口选项
exitOptions: [
{exitId: '1', exitName: '一楼'},
{exitId: '2', exitName: '二楼'},
{exitId: '1', exitName: '缓存'},
{exitId: '2', exitName: '线边'},
],