入库部分和接口

This commit is contained in:
张怡蓉
2026-02-24 10:17:20 +08:00
parent 2b86d14f56
commit 88d4caa017
38 changed files with 3279 additions and 86 deletions

View File

@@ -1,9 +1,11 @@
package com.ruoyi.api.controller;
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;
@@ -48,10 +50,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

@@ -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,34 @@
package com.ruoyi.api.domain;
public class LocationDetail {
private String locationNo;
private String areaNo;
private String quantity;
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;
}
}

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

@@ -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());
@@ -268,20 +296,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());
try {
d.setQuantity(new BigDecimal(item.getQuantity()));
d.setAllotQuantity(BigDecimal.ZERO);
@@ -304,30 +334,35 @@ 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());
List<InStockinDetailBack> inStockinDetails = inStockinDetailBackService.selectInStockinDetailBackList(inStockinDetailParam);
List<DeliveryNoticeItemVo> detailList = new ArrayList<>();
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());
@@ -341,24 +376,229 @@ public class ToErpServiceImpl implements IToErpService {
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]);
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(",");
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]);
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(basStockList.get(0).getSpare8());
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 +622,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 +644,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 +668,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 +684,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

@@ -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

@@ -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

@@ -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());

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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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>

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

@@ -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="序号" align="center" prop="id" />-->
<!-- <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="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,20 +159,25 @@
: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 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-item label="Spare Field 3" prop="spare3">
<el-input v-model="form.spare3" placeholder="Enter spare field 3" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确定</el-button>
@@ -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;
}