入库部分和接口

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);
}
}