出库主单据,主表、关联表、中间表
This commit is contained in:
@@ -41,6 +41,11 @@ public class ToErpApiController {
|
||||
return toErpService.receiveSupplier();
|
||||
}
|
||||
|
||||
@GetMapping("/outStockList")
|
||||
public AjaxResult outStockList(){
|
||||
return toErpService.receiveOutStockList();
|
||||
}
|
||||
|
||||
@PostMapping("/login")
|
||||
public AjaxResult login() {
|
||||
toErpService.login();
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import com.mysql.cj.x.protobuf.MysqlxDatatypes;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ErpOutStockListParam {
|
||||
private int Cateid;
|
||||
private String Kg;
|
||||
private String Ck;
|
||||
private int Sort1;
|
||||
private int Complete1;
|
||||
private String Title;
|
||||
private String Ckbh;
|
||||
private int Company;
|
||||
private String pro_name;
|
||||
private String Order1;
|
||||
private String Type1;
|
||||
private String Date3_start;
|
||||
private String Date3_end;
|
||||
private String Date5_start;
|
||||
private String Date5_end;
|
||||
private int needList;
|
||||
private int page_size;
|
||||
private int page_index;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.api.domain.erp;
|
||||
|
||||
import cn.hutool.core.annotation.Alias;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ErpOutStockListResponse {
|
||||
@Alias("Page")
|
||||
private Page page;
|
||||
@Alias("Cols")
|
||||
private List<String> cols;
|
||||
@Alias("Rows")
|
||||
private List<List<Object>> rows;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class Page{
|
||||
@Alias("RecordCount")
|
||||
private int recordCount;
|
||||
@Alias("PageSize")
|
||||
private int pageSize;
|
||||
@Alias("PageIndex")
|
||||
private int pageIndex;
|
||||
@Alias("PageCount")
|
||||
private int pageCount;
|
||||
}
|
||||
}
|
||||
@@ -24,4 +24,6 @@ public interface IToErpService {
|
||||
AjaxResult receiveSupplier();
|
||||
|
||||
String login();
|
||||
|
||||
AjaxResult receiveOutStockList();
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
package com.ruoyi.api.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.api.domain.erp.ErpSupplierParam;
|
||||
import com.ruoyi.api.domain.erp.ErpSupplierResponse;
|
||||
import com.ruoyi.api.domain.erp.LoginParam;
|
||||
import com.ruoyi.api.domain.erp.LoginResponse;
|
||||
import com.ruoyi.api.domain.erp.*;
|
||||
import com.ruoyi.api.service.IToErpService;
|
||||
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
|
||||
import com.ruoyi.bas.BasCustomer.service.IBasCustomerService;
|
||||
@@ -19,13 +15,19 @@ import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
|
||||
import com.ruoyi.bas.BasSupplier.service.IBasSupplierService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import com.ruoyi.out.ErpOutStock.domain.ErpOutStock;
|
||||
import com.ruoyi.out.OutStockMiddle.domain.OutStockMiddle;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockout;
|
||||
import com.ruoyi.out.ErpOutStock.service.IErpOutStockService;
|
||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
import com.ruoyi.out.OutStockMiddle.service.IOutStockMiddleService;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -40,6 +42,18 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
@Autowired
|
||||
private IBasSupplierService basSupplierService;
|
||||
|
||||
@Autowired
|
||||
private IErpOutStockService erpOutStockService;
|
||||
|
||||
@Autowired
|
||||
private IOutStockoutService outStockoutService;
|
||||
|
||||
@Autowired
|
||||
private IOutStockMiddleService outStockMiddleService;
|
||||
|
||||
@Autowired
|
||||
private IBasJobIdService basJobIdService;
|
||||
|
||||
@Autowired
|
||||
private IBasCustomerService basCustomerService;
|
||||
|
||||
@@ -51,6 +65,7 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
|
||||
private static final String loginUrl = erpUrl+"/webapi/v3/ov1/login";
|
||||
private static final String supplierListUrl = erpUrl+"/webapi/v3/store/supplierList";
|
||||
private static final String outStockListUrl = erpUrl+"/webapi/v3/store/KuOutApplyList";
|
||||
|
||||
|
||||
@Override
|
||||
@@ -120,6 +135,77 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult receiveOutStockList() {
|
||||
ErpOutStockListParam erpOutStockListParam = new ErpOutStockListParam();
|
||||
erpOutStockListParam.setPage_index(0);
|
||||
erpOutStockListParam.setPage_size(0);
|
||||
String body=HttpRequest.post(outStockListUrl).header("ZBAPI-Token", login()).body(JSONUtil.toJsonStr(erpOutStockListParam)).execute().body();
|
||||
ErpOutStockListResponse responseBean = JSONUtil.toBean(body, ErpOutStockListResponse.class);
|
||||
for (List<Object> row : responseBean.getRows()) {
|
||||
ErpOutStock erpOutStock = new ErpOutStock();
|
||||
OutStockout outStockout = new OutStockout();
|
||||
OutStockMiddle outStockMiddle = new OutStockMiddle();
|
||||
erpOutStock.setStockoutId(Convert.toStr(row.get(0)));
|
||||
erpOutStock.setTheme(Convert.toStr(row.get(1)));
|
||||
erpOutStock.setWarehouse(Convert.toStr(row.get(2)));
|
||||
erpOutStock.setApplicationDate(Convert.toStr(row.get(3)));
|
||||
erpOutStock.setConfirmTheDate(Convert.toStr(row.get(4)));
|
||||
erpOutStock.setOutboundRemarks(Convert.toStr(row.get(5)));
|
||||
erpOutStock.setOutboundCompletionStatus(Convert.toStr(row.get(6)));
|
||||
erpOutStock.setShippingStatus(Convert.toStr(row.get(7)));
|
||||
erpOutStock.setApprovalComments(Convert.toStr(row.get(8)));
|
||||
erpOutStock.setAddPersonnel(Convert.toStr(row.get(9)));
|
||||
erpOutStock.setStatus(Convert.toStr(row.get(10)));
|
||||
erpOutStock.setApprover(Convert.toStr(row.get(11)));
|
||||
erpOutStock.setActualOperationTime(Convert.toStr(row.get(12)));
|
||||
erpOutStock.setStorekeeper(Convert.toStr(row.get(13)));
|
||||
erpOutStock.setOutboundNumber(Convert.toStr(row.get(14)));
|
||||
erpOutStock.setOutboundType(Convert.toStr(row.get(15)));
|
||||
erpOutStock.setConsignee(Convert.toStr(row.get(16)));
|
||||
erpOutStock.setLandline(Convert.toStr(row.get(17)));
|
||||
erpOutStock.setMobilePhone(Convert.toStr(row.get(18)));
|
||||
erpOutStock.setAddress(Convert.toStr(row.get(19)));
|
||||
erpOutStock.setPostalCode(Convert.toStr(row.get(20)));
|
||||
erpOutStock.setHedge(Convert.toStr(row.get(21)));
|
||||
erpOutStock.setApprovalStatus(Convert.toStr(row.get(22)));
|
||||
erpOutStock.setProductDetails(Convert.toStr(row.get(23)));
|
||||
erpOutStock.setCustomerName(Convert.toStr(row.get(24)));
|
||||
erpOutStock.setSpare2(Convert.toStr(row.get(25)));
|
||||
erpOutStock.setSpare3(Convert.toStr(row.get(26)));
|
||||
erpOutStock.setSpare4(Convert.toStr(row.get(27)));
|
||||
String stockOutId = basJobIdService.getJobId("CKD");
|
||||
outStockout.setStockoutId(stockOutId);
|
||||
outStockout.setErpStockoutId(Convert.toStr(row.get(0)));
|
||||
outStockout.setStockoutGuid(UUID.randomUUID().toString());
|
||||
outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||
outStockout.setOutType("1");
|
||||
outStockout.setStatus("1");
|
||||
outStockMiddle.setStockoutId(stockOutId);
|
||||
outStockMiddle.setCreateDate(outStockout.getCreateDate());
|
||||
outStockMiddle.setStatus("0");
|
||||
ErpOutStock outStock1 = erpOutStockService.selectErpOutStockByStockoutId(erpOutStock.getStockoutId());
|
||||
OutStockout outStockout1 = outStockoutService.selectOutStockoutByStockoutGuid(outStockout.getStockoutGuid());
|
||||
OutStockMiddle outStockMiddle1 = outStockMiddleService.selectOutStockMiddleByStockoutId(outStockMiddle.getStockoutId());
|
||||
if (ObjUtil.isNotNull(outStock1)){
|
||||
erpOutStockService.updateErpOutStock(outStock1);
|
||||
}else {
|
||||
erpOutStockService.insertErpOutStock(erpOutStock);
|
||||
}
|
||||
if (ObjUtil.isNotNull(outStockout1)){
|
||||
outStockoutService.updateOutStockout(outStockout1);
|
||||
}else {
|
||||
outStockoutService.insertOutStockout(outStockout);
|
||||
}
|
||||
if (ObjUtil.isNotNull(outStockMiddle1)){
|
||||
outStockMiddleService.updateOutStockMiddle(outStockMiddle1);
|
||||
}else {
|
||||
outStockMiddleService.insertOutStockMiddle(outStockMiddle);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String login() {
|
||||
LoginParam loginParam = new LoginParam();
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.out.ErpOutStock.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.ErpOutStock.domain.ErpOutStock;
|
||||
import com.ruoyi.out.ErpOutStock.service.IErpOutStockService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库主单关联表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/ErpOutStock")
|
||||
public class ErpOutStockController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IErpOutStockService erpOutStockService;
|
||||
|
||||
/**
|
||||
* 查询出库主单关联表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:ErpOutStock:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ErpOutStock erpOutStock)
|
||||
{
|
||||
startPage();
|
||||
List<ErpOutStock> list = erpOutStockService.selectErpOutStockList(erpOutStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库主单关联表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:ErpOutStock:export')")
|
||||
@Log(title = "出库主单关联表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ErpOutStock erpOutStock)
|
||||
{
|
||||
List<ErpOutStock> list = erpOutStockService.selectErpOutStockList(erpOutStock);
|
||||
ExcelUtil<ErpOutStock> util = new ExcelUtil<ErpOutStock>(ErpOutStock.class);
|
||||
util.exportExcel(response, list, "出库主单关联表数据");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增出库主单关联表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:ErpOutStock:add')")
|
||||
@Log(title = "出库主单关联表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ErpOutStock erpOutStock)
|
||||
{
|
||||
return toAjax(erpOutStockService.insertErpOutStock(erpOutStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库主单关联表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:ErpOutStock:edit')")
|
||||
@Log(title = "出库主单关联表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ErpOutStock erpOutStock)
|
||||
{
|
||||
return toAjax(erpOutStockService.updateErpOutStock(erpOutStock));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库主单关联表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:ErpOutStock:remove')")
|
||||
@Log(title = "出库主单关联表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockoutIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockoutIds)
|
||||
{
|
||||
return toAjax(erpOutStockService.deleteErpOutStockByStockoutIds(stockoutIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,443 @@
|
||||
package com.ruoyi.out.ErpOutStock.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;
|
||||
|
||||
/**
|
||||
* 出库主单关联表对象 erp_out_stock
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public class ErpOutStock extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 出库id 542 */
|
||||
@Excel(name = "出库id 542")
|
||||
private String stockoutId;
|
||||
|
||||
/** 主题 */
|
||||
@Excel(name = "主题")
|
||||
private String theme;
|
||||
|
||||
/** 仓库 */
|
||||
@Excel(name = "仓库")
|
||||
private String warehouse;
|
||||
|
||||
/** 申请日期 */
|
||||
@Excel(name = "申请日期")
|
||||
private String applicationDate;
|
||||
|
||||
/** 确认日期 */
|
||||
@Excel(name = "确认日期")
|
||||
private String confirmTheDate;
|
||||
|
||||
/** 出库备注 */
|
||||
@Excel(name = "出库备注")
|
||||
private String outboundRemarks;
|
||||
|
||||
/** 出库完成状态 */
|
||||
@Excel(name = "出库完成状态")
|
||||
private String outboundCompletionStatus;
|
||||
|
||||
/** 发货状态 */
|
||||
@Excel(name = "发货状态")
|
||||
private String shippingStatus;
|
||||
|
||||
/** 审批意见 */
|
||||
@Excel(name = "审批意见")
|
||||
private String approvalComments;
|
||||
|
||||
/** 添加人员 */
|
||||
@Excel(name = "添加人员")
|
||||
private String addPersonnel;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 审批人 */
|
||||
@Excel(name = "审批人")
|
||||
private String approver;
|
||||
|
||||
/** 实际操作时间 */
|
||||
@Excel(name = "实际操作时间")
|
||||
private String actualOperationTime;
|
||||
|
||||
/** 库管 */
|
||||
@Excel(name = "库管")
|
||||
private String storekeeper;
|
||||
|
||||
/** 出库编号 */
|
||||
@Excel(name = "出库编号")
|
||||
private String outboundNumber;
|
||||
|
||||
/** 出库类型 */
|
||||
@Excel(name = "出库类型")
|
||||
private String outboundType;
|
||||
|
||||
/** 收货人 */
|
||||
@Excel(name = "收货人")
|
||||
private String consignee;
|
||||
|
||||
/** 固话 */
|
||||
@Excel(name = "固话")
|
||||
private String landline;
|
||||
|
||||
/** 手机 */
|
||||
@Excel(name = "手机")
|
||||
private String mobilePhone;
|
||||
|
||||
/** 地址 */
|
||||
@Excel(name = "地址")
|
||||
private String address;
|
||||
|
||||
/** 邮编 */
|
||||
@Excel(name = "邮编")
|
||||
private String postalCode;
|
||||
|
||||
/** 是否对冲后转出库单 */
|
||||
@Excel(name = "是否对冲后转出库单")
|
||||
private String hedge;
|
||||
|
||||
/** 审批状态 */
|
||||
@Excel(name = "审批状态")
|
||||
private String approvalStatus;
|
||||
|
||||
/** 产品明细 */
|
||||
@Excel(name = "产品明细")
|
||||
private String productDetails;
|
||||
|
||||
/** 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
/** 自定义2 */
|
||||
@Excel(name = "自定义2")
|
||||
private String spare2;
|
||||
|
||||
/** 自定义3 */
|
||||
@Excel(name = "自定义3")
|
||||
private String spare3;
|
||||
|
||||
/** 自定义4 */
|
||||
@Excel(name = "自定义4")
|
||||
private String spare4;
|
||||
|
||||
public void setStockoutId(String stockoutId)
|
||||
{
|
||||
this.stockoutId = stockoutId;
|
||||
}
|
||||
|
||||
public String getStockoutId()
|
||||
{
|
||||
return stockoutId;
|
||||
}
|
||||
|
||||
public void setTheme(String theme)
|
||||
{
|
||||
this.theme = theme;
|
||||
}
|
||||
|
||||
public String getTheme()
|
||||
{
|
||||
return theme;
|
||||
}
|
||||
|
||||
public void setWarehouse(String warehouse)
|
||||
{
|
||||
this.warehouse = warehouse;
|
||||
}
|
||||
|
||||
public String getWarehouse()
|
||||
{
|
||||
return warehouse;
|
||||
}
|
||||
|
||||
public void setApplicationDate(String applicationDate)
|
||||
{
|
||||
this.applicationDate = applicationDate;
|
||||
}
|
||||
|
||||
public String getApplicationDate()
|
||||
{
|
||||
return applicationDate;
|
||||
}
|
||||
|
||||
public void setConfirmTheDate(String confirmTheDate)
|
||||
{
|
||||
this.confirmTheDate = confirmTheDate;
|
||||
}
|
||||
|
||||
public String getConfirmTheDate()
|
||||
{
|
||||
return confirmTheDate;
|
||||
}
|
||||
|
||||
public void setOutboundRemarks(String outboundRemarks)
|
||||
{
|
||||
this.outboundRemarks = outboundRemarks;
|
||||
}
|
||||
|
||||
public String getOutboundRemarks()
|
||||
{
|
||||
return outboundRemarks;
|
||||
}
|
||||
|
||||
public void setOutboundCompletionStatus(String outboundCompletionStatus)
|
||||
{
|
||||
this.outboundCompletionStatus = outboundCompletionStatus;
|
||||
}
|
||||
|
||||
public String getOutboundCompletionStatus()
|
||||
{
|
||||
return outboundCompletionStatus;
|
||||
}
|
||||
|
||||
public void setShippingStatus(String shippingStatus)
|
||||
{
|
||||
this.shippingStatus = shippingStatus;
|
||||
}
|
||||
|
||||
public String getShippingStatus()
|
||||
{
|
||||
return shippingStatus;
|
||||
}
|
||||
|
||||
public void setApprovalComments(String approvalComments)
|
||||
{
|
||||
this.approvalComments = approvalComments;
|
||||
}
|
||||
|
||||
public String getApprovalComments()
|
||||
{
|
||||
return approvalComments;
|
||||
}
|
||||
|
||||
public void setAddPersonnel(String addPersonnel)
|
||||
{
|
||||
this.addPersonnel = addPersonnel;
|
||||
}
|
||||
|
||||
public String getAddPersonnel()
|
||||
{
|
||||
return addPersonnel;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setApprover(String approver)
|
||||
{
|
||||
this.approver = approver;
|
||||
}
|
||||
|
||||
public String getApprover()
|
||||
{
|
||||
return approver;
|
||||
}
|
||||
|
||||
public void setActualOperationTime(String actualOperationTime)
|
||||
{
|
||||
this.actualOperationTime = actualOperationTime;
|
||||
}
|
||||
|
||||
public String getActualOperationTime()
|
||||
{
|
||||
return actualOperationTime;
|
||||
}
|
||||
|
||||
public void setStorekeeper(String storekeeper)
|
||||
{
|
||||
this.storekeeper = storekeeper;
|
||||
}
|
||||
|
||||
public String getStorekeeper()
|
||||
{
|
||||
return storekeeper;
|
||||
}
|
||||
|
||||
public void setOutboundNumber(String outboundNumber)
|
||||
{
|
||||
this.outboundNumber = outboundNumber;
|
||||
}
|
||||
|
||||
public String getOutboundNumber()
|
||||
{
|
||||
return outboundNumber;
|
||||
}
|
||||
|
||||
public void setOutboundType(String outboundType)
|
||||
{
|
||||
this.outboundType = outboundType;
|
||||
}
|
||||
|
||||
public String getOutboundType()
|
||||
{
|
||||
return outboundType;
|
||||
}
|
||||
|
||||
public void setConsignee(String consignee)
|
||||
{
|
||||
this.consignee = consignee;
|
||||
}
|
||||
|
||||
public String getConsignee()
|
||||
{
|
||||
return consignee;
|
||||
}
|
||||
|
||||
public void setLandline(String landline)
|
||||
{
|
||||
this.landline = landline;
|
||||
}
|
||||
|
||||
public String getLandline()
|
||||
{
|
||||
return landline;
|
||||
}
|
||||
|
||||
public void setMobilePhone(String mobilePhone)
|
||||
{
|
||||
this.mobilePhone = mobilePhone;
|
||||
}
|
||||
|
||||
public String getMobilePhone()
|
||||
{
|
||||
return mobilePhone;
|
||||
}
|
||||
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setPostalCode(String postalCode)
|
||||
{
|
||||
this.postalCode = postalCode;
|
||||
}
|
||||
|
||||
public String getPostalCode()
|
||||
{
|
||||
return postalCode;
|
||||
}
|
||||
|
||||
public void setHedge(String hedge)
|
||||
{
|
||||
this.hedge = hedge;
|
||||
}
|
||||
|
||||
public String getHedge()
|
||||
{
|
||||
return hedge;
|
||||
}
|
||||
|
||||
public void setApprovalStatus(String approvalStatus)
|
||||
{
|
||||
this.approvalStatus = approvalStatus;
|
||||
}
|
||||
|
||||
public String getApprovalStatus()
|
||||
{
|
||||
return approvalStatus;
|
||||
}
|
||||
|
||||
public void setProductDetails(String productDetails)
|
||||
{
|
||||
this.productDetails = productDetails;
|
||||
}
|
||||
|
||||
public String getProductDetails()
|
||||
{
|
||||
return productDetails;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName)
|
||||
{
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public String getCustomerName()
|
||||
{
|
||||
return customerName;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("theme", getTheme())
|
||||
.append("warehouse", getWarehouse())
|
||||
.append("applicationDate", getApplicationDate())
|
||||
.append("confirmTheDate", getConfirmTheDate())
|
||||
.append("outboundRemarks", getOutboundRemarks())
|
||||
.append("outboundCompletionStatus", getOutboundCompletionStatus())
|
||||
.append("shippingStatus", getShippingStatus())
|
||||
.append("approvalComments", getApprovalComments())
|
||||
.append("addPersonnel", getAddPersonnel())
|
||||
.append("status", getStatus())
|
||||
.append("approver", getApprover())
|
||||
.append("actualOperationTime", getActualOperationTime())
|
||||
.append("storekeeper", getStorekeeper())
|
||||
.append("outboundNumber", getOutboundNumber())
|
||||
.append("outboundType", getOutboundType())
|
||||
.append("consignee", getConsignee())
|
||||
.append("landline", getLandline())
|
||||
.append("mobilePhone", getMobilePhone())
|
||||
.append("address", getAddress())
|
||||
.append("postalCode", getPostalCode())
|
||||
.append("hedge", getHedge())
|
||||
.append("approvalStatus", getApprovalStatus())
|
||||
.append("productDetails", getProductDetails())
|
||||
.append("customerName", getCustomerName())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("spare4", getSpare4())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.out.ErpOutStock.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.ErpOutStock.domain.ErpOutStock;
|
||||
|
||||
/**
|
||||
* 出库主单关联表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface ErpOutStockMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库主单关联表
|
||||
*
|
||||
* @param stockoutId 出库主单关联表主键
|
||||
* @return 出库主单关联表
|
||||
*/
|
||||
public ErpOutStock selectErpOutStockByStockoutId(String stockoutId);
|
||||
|
||||
/**
|
||||
* 查询出库主单关联表列表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 出库主单关联表集合
|
||||
*/
|
||||
public List<ErpOutStock> selectErpOutStockList(ErpOutStock erpOutStock);
|
||||
|
||||
/**
|
||||
* 新增出库主单关联表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertErpOutStock(ErpOutStock erpOutStock);
|
||||
|
||||
/**
|
||||
* 修改出库主单关联表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateErpOutStock(ErpOutStock erpOutStock);
|
||||
|
||||
/**
|
||||
* 删除出库主单关联表
|
||||
*
|
||||
* @param stockoutId 出库主单关联表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteErpOutStockByStockoutId(String stockoutId);
|
||||
|
||||
/**
|
||||
* 批量删除出库主单关联表
|
||||
*
|
||||
* @param stockoutIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteErpOutStockByStockoutIds(String[] stockoutIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.out.ErpOutStock.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.ErpOutStock.domain.ErpOutStock;
|
||||
|
||||
/**
|
||||
* 出库主单关联表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
public interface IErpOutStockService
|
||||
{
|
||||
/**
|
||||
* 查询出库主单关联表
|
||||
*
|
||||
* @param stockoutId 出库主单关联表主键
|
||||
* @return 出库主单关联表
|
||||
*/
|
||||
public ErpOutStock selectErpOutStockByStockoutId(String stockoutId);
|
||||
|
||||
/**
|
||||
* 查询出库主单关联表列表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 出库主单关联表集合
|
||||
*/
|
||||
public List<ErpOutStock> selectErpOutStockList(ErpOutStock erpOutStock);
|
||||
|
||||
/**
|
||||
* 新增出库主单关联表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertErpOutStock(ErpOutStock erpOutStock);
|
||||
|
||||
/**
|
||||
* 修改出库主单关联表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateErpOutStock(ErpOutStock erpOutStock);
|
||||
|
||||
/**
|
||||
* 批量删除出库主单关联表
|
||||
*
|
||||
* @param stockoutIds 需要删除的出库主单关联表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteErpOutStockByStockoutIds(String[] stockoutIds);
|
||||
|
||||
/**
|
||||
* 删除出库主单关联表信息
|
||||
*
|
||||
* @param stockoutId 出库主单关联表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteErpOutStockByStockoutId(String stockoutId);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.out.ErpOutStock.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.ErpOutStock.mapper.ErpOutStockMapper;
|
||||
import com.ruoyi.out.ErpOutStock.domain.ErpOutStock;
|
||||
import com.ruoyi.out.ErpOutStock.service.IErpOutStockService;
|
||||
|
||||
/**
|
||||
* 出库主单关联表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-04
|
||||
*/
|
||||
@Service
|
||||
public class ErpOutStockServiceImpl implements IErpOutStockService
|
||||
{
|
||||
@Autowired
|
||||
private ErpOutStockMapper erpOutStockMapper;
|
||||
|
||||
/**
|
||||
* 查询出库主单关联表
|
||||
*
|
||||
* @param stockoutId 出库主单关联表主键
|
||||
* @return 出库主单关联表
|
||||
*/
|
||||
@Override
|
||||
public ErpOutStock selectErpOutStockByStockoutId(String stockoutId)
|
||||
{
|
||||
return erpOutStockMapper.selectErpOutStockByStockoutId(stockoutId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库主单关联表列表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 出库主单关联表
|
||||
*/
|
||||
@Override
|
||||
public List<ErpOutStock> selectErpOutStockList(ErpOutStock erpOutStock)
|
||||
{
|
||||
return erpOutStockMapper.selectErpOutStockList(erpOutStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库主单关联表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertErpOutStock(ErpOutStock erpOutStock)
|
||||
{
|
||||
return erpOutStockMapper.insertErpOutStock(erpOutStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库主单关联表
|
||||
*
|
||||
* @param erpOutStock 出库主单关联表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateErpOutStock(ErpOutStock erpOutStock)
|
||||
{
|
||||
return erpOutStockMapper.updateErpOutStock(erpOutStock);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库主单关联表
|
||||
*
|
||||
* @param stockoutIds 需要删除的出库主单关联表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteErpOutStockByStockoutIds(String[] stockoutIds)
|
||||
{
|
||||
return erpOutStockMapper.deleteErpOutStockByStockoutIds(stockoutIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库主单关联表信息
|
||||
*
|
||||
* @param stockoutId 出库主单关联表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteErpOutStockByStockoutId(String stockoutId)
|
||||
{
|
||||
return erpOutStockMapper.deleteErpOutStockByStockoutId(stockoutId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.out.OutStockMiddle.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.OutStockMiddle.domain.OutStockMiddle;
|
||||
import com.ruoyi.out.OutStockMiddle.service.IOutStockMiddleService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 出库单中间表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/out/OutStockMiddle")
|
||||
public class OutStockMiddleController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IOutStockMiddleService outStockMiddleService;
|
||||
|
||||
/**
|
||||
* 查询出库单中间表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:OutStockMiddle:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OutStockMiddle outStockMiddle)
|
||||
{
|
||||
startPage();
|
||||
List<OutStockMiddle> list = outStockMiddleService.selectOutStockMiddleList(outStockMiddle);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出库单中间表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:OutStockMiddle:export')")
|
||||
@Log(title = "出库单中间表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OutStockMiddle outStockMiddle)
|
||||
{
|
||||
List<OutStockMiddle> list = outStockMiddleService.selectOutStockMiddleList(outStockMiddle);
|
||||
ExcelUtil<OutStockMiddle> util = new ExcelUtil<OutStockMiddle>(OutStockMiddle.class);
|
||||
util.exportExcel(response, list, "出库单中间表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单中间表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:OutStockMiddle:query')")
|
||||
@GetMapping(value = "/{stockoutId}")
|
||||
public AjaxResult getInfo(@PathVariable("stockoutId") String stockoutId)
|
||||
{
|
||||
return success(outStockMiddleService.selectOutStockMiddleByStockoutId(stockoutId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单中间表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:OutStockMiddle:add')")
|
||||
@Log(title = "出库单中间表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OutStockMiddle outStockMiddle)
|
||||
{
|
||||
return toAjax(outStockMiddleService.insertOutStockMiddle(outStockMiddle));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单中间表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:OutStockMiddle:edit')")
|
||||
@Log(title = "出库单中间表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OutStockMiddle outStockMiddle)
|
||||
{
|
||||
return toAjax(outStockMiddleService.updateOutStockMiddle(outStockMiddle));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单中间表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('out:OutStockMiddle:remove')")
|
||||
@Log(title = "出库单中间表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockoutIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockoutIds)
|
||||
{
|
||||
return toAjax(outStockMiddleService.deleteOutStockMiddleByStockoutIds(stockoutIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.ruoyi.out.OutStockMiddle.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_stock_middle
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-05
|
||||
*/
|
||||
public class OutStockMiddle extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 出库主单id */
|
||||
private String stockoutId;
|
||||
|
||||
/** 是否添加子单 0否 1是 */
|
||||
@Excel(name = "是否添加子单 0否 1是")
|
||||
private String status;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间")
|
||||
private String createDate;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
public void setStockoutId(String stockoutId)
|
||||
{
|
||||
this.stockoutId = stockoutId;
|
||||
}
|
||||
|
||||
public String getStockoutId()
|
||||
{
|
||||
return stockoutId;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setSpare1(String spare1)
|
||||
{
|
||||
this.spare1 = spare1;
|
||||
}
|
||||
|
||||
public String getSpare1()
|
||||
{
|
||||
return spare1;
|
||||
}
|
||||
|
||||
public void setSpare2(String spare2)
|
||||
{
|
||||
this.spare2 = spare2;
|
||||
}
|
||||
|
||||
public String getSpare2()
|
||||
{
|
||||
return spare2;
|
||||
}
|
||||
|
||||
public void setSpare3(String spare3)
|
||||
{
|
||||
this.spare3 = spare3;
|
||||
}
|
||||
|
||||
public String getSpare3()
|
||||
{
|
||||
return spare3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("stockoutId", getStockoutId())
|
||||
.append("status", getStatus())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.out.OutStockMiddle.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.OutStockMiddle.domain.OutStockMiddle;
|
||||
|
||||
/**
|
||||
* 出库单中间表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-05
|
||||
*/
|
||||
public interface OutStockMiddleMapper
|
||||
{
|
||||
/**
|
||||
* 查询出库单中间表
|
||||
*
|
||||
* @param stockoutId 出库单中间表主键
|
||||
* @return 出库单中间表
|
||||
*/
|
||||
public OutStockMiddle selectOutStockMiddleByStockoutId(String stockoutId);
|
||||
|
||||
/**
|
||||
* 查询出库单中间表列表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 出库单中间表集合
|
||||
*/
|
||||
public List<OutStockMiddle> selectOutStockMiddleList(OutStockMiddle outStockMiddle);
|
||||
|
||||
/**
|
||||
* 新增出库单中间表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockMiddle(OutStockMiddle outStockMiddle);
|
||||
|
||||
/**
|
||||
* 修改出库单中间表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockMiddle(OutStockMiddle outStockMiddle);
|
||||
|
||||
/**
|
||||
* 删除出库单中间表
|
||||
*
|
||||
* @param stockoutId 出库单中间表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockMiddleByStockoutId(String stockoutId);
|
||||
|
||||
/**
|
||||
* 批量删除出库单中间表
|
||||
*
|
||||
* @param stockoutIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockMiddleByStockoutIds(String[] stockoutIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.out.OutStockMiddle.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.out.OutStockMiddle.domain.OutStockMiddle;
|
||||
|
||||
/**
|
||||
* 出库单中间表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-05
|
||||
*/
|
||||
public interface IOutStockMiddleService
|
||||
{
|
||||
/**
|
||||
* 查询出库单中间表
|
||||
*
|
||||
* @param stockoutId 出库单中间表主键
|
||||
* @return 出库单中间表
|
||||
*/
|
||||
public OutStockMiddle selectOutStockMiddleByStockoutId(String stockoutId);
|
||||
|
||||
/**
|
||||
* 查询出库单中间表列表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 出库单中间表集合
|
||||
*/
|
||||
public List<OutStockMiddle> selectOutStockMiddleList(OutStockMiddle outStockMiddle);
|
||||
|
||||
/**
|
||||
* 新增出库单中间表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOutStockMiddle(OutStockMiddle outStockMiddle);
|
||||
|
||||
/**
|
||||
* 修改出库单中间表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOutStockMiddle(OutStockMiddle outStockMiddle);
|
||||
|
||||
/**
|
||||
* 批量删除出库单中间表
|
||||
*
|
||||
* @param stockoutIds 需要删除的出库单中间表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockMiddleByStockoutIds(String[] stockoutIds);
|
||||
|
||||
/**
|
||||
* 删除出库单中间表信息
|
||||
*
|
||||
* @param stockoutId 出库单中间表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOutStockMiddleByStockoutId(String stockoutId);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.out.OutStockMiddle.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.out.OutStockMiddle.mapper.OutStockMiddleMapper;
|
||||
import com.ruoyi.out.OutStockMiddle.domain.OutStockMiddle;
|
||||
import com.ruoyi.out.OutStockMiddle.service.IOutStockMiddleService;
|
||||
|
||||
/**
|
||||
* 出库单中间表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-12-05
|
||||
*/
|
||||
@Service
|
||||
public class OutStockMiddleServiceImpl implements IOutStockMiddleService
|
||||
{
|
||||
@Autowired
|
||||
private OutStockMiddleMapper outStockMiddleMapper;
|
||||
|
||||
/**
|
||||
* 查询出库单中间表
|
||||
*
|
||||
* @param stockoutId 出库单中间表主键
|
||||
* @return 出库单中间表
|
||||
*/
|
||||
@Override
|
||||
public OutStockMiddle selectOutStockMiddleByStockoutId(String stockoutId)
|
||||
{
|
||||
return outStockMiddleMapper.selectOutStockMiddleByStockoutId(stockoutId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库单中间表列表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 出库单中间表
|
||||
*/
|
||||
@Override
|
||||
public List<OutStockMiddle> selectOutStockMiddleList(OutStockMiddle outStockMiddle)
|
||||
{
|
||||
return outStockMiddleMapper.selectOutStockMiddleList(outStockMiddle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单中间表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOutStockMiddle(OutStockMiddle outStockMiddle)
|
||||
{
|
||||
return outStockMiddleMapper.insertOutStockMiddle(outStockMiddle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单中间表
|
||||
*
|
||||
* @param outStockMiddle 出库单中间表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOutStockMiddle(OutStockMiddle outStockMiddle)
|
||||
{
|
||||
return outStockMiddleMapper.updateOutStockMiddle(outStockMiddle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库单中间表
|
||||
*
|
||||
* @param stockoutIds 需要删除的出库单中间表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockMiddleByStockoutIds(String[] stockoutIds)
|
||||
{
|
||||
return outStockMiddleMapper.deleteOutStockMiddleByStockoutIds(stockoutIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出库单中间表信息
|
||||
*
|
||||
* @param stockoutId 出库单中间表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOutStockMiddleByStockoutId(String stockoutId)
|
||||
{
|
||||
return outStockMiddleMapper.deleteOutStockMiddleByStockoutId(stockoutId);
|
||||
}
|
||||
}
|
||||
189
ruoyi-admin/src/main/resources/mapper/out/ErpOutStockMapper.xml
Normal file
189
ruoyi-admin/src/main/resources/mapper/out/ErpOutStockMapper.xml
Normal file
@@ -0,0 +1,189 @@
|
||||
<?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.ErpOutStock.mapper.ErpOutStockMapper">
|
||||
|
||||
<resultMap type="ErpOutStock" id="ErpOutStockResult">
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="theme" column="theme" />
|
||||
<result property="warehouse" column="warehouse" />
|
||||
<result property="applicationDate" column="application_date" />
|
||||
<result property="confirmTheDate" column="confirm_the_date" />
|
||||
<result property="outboundRemarks" column="outbound_remarks" />
|
||||
<result property="outboundCompletionStatus" column="outbound_completion_status" />
|
||||
<result property="shippingStatus" column="shipping_status" />
|
||||
<result property="approvalComments" column="approval_comments" />
|
||||
<result property="addPersonnel" column="add_personnel" />
|
||||
<result property="status" column="status" />
|
||||
<result property="approver" column="approver" />
|
||||
<result property="actualOperationTime" column="actual_operation_time" />
|
||||
<result property="storekeeper" column="storekeeper" />
|
||||
<result property="outboundNumber" column="outbound_number" />
|
||||
<result property="outboundType" column="outbound_type" />
|
||||
<result property="consignee" column="consignee" />
|
||||
<result property="landline" column="landline" />
|
||||
<result property="mobilePhone" column="mobile_phone" />
|
||||
<result property="address" column="address" />
|
||||
<result property="postalCode" column="postal_code" />
|
||||
<result property="hedge" column="hedge" />
|
||||
<result property="approvalStatus" column="approval_status" />
|
||||
<result property="productDetails" column="product_details" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectErpOutStockVo">
|
||||
select stockout_id, theme, warehouse, application_date, confirm_the_date, outbound_remarks, outbound_completion_status, shipping_status, approval_comments, add_personnel, status, approver, actual_operation_time, storekeeper, outbound_number, outbound_type, consignee, landline, mobile_phone, address, postal_code, hedge, approval_status, product_details, customer_name, spare2, spare3, spare4 from erp_out_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectErpOutStockList" parameterType="ErpOutStock" resultMap="ErpOutStockResult">
|
||||
<include refid="selectErpOutStockVo"/>
|
||||
<where>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="theme != null and theme != ''"> and theme = #{theme}</if>
|
||||
<if test="warehouse != null and warehouse != ''"> and warehouse = #{warehouse}</if>
|
||||
<if test="applicationDate != null and applicationDate != ''"> and application_date = #{applicationDate}</if>
|
||||
<if test="confirmTheDate != null and confirmTheDate != ''"> and confirm_the_date = #{confirmTheDate}</if>
|
||||
<if test="outboundRemarks != null and outboundRemarks != ''"> and outbound_remarks = #{outboundRemarks}</if>
|
||||
<if test="outboundCompletionStatus != null and outboundCompletionStatus != ''"> and outbound_completion_status = #{outboundCompletionStatus}</if>
|
||||
<if test="shippingStatus != null and shippingStatus != ''"> and shipping_status = #{shippingStatus}</if>
|
||||
<if test="approvalComments != null and approvalComments != ''"> and approval_comments = #{approvalComments}</if>
|
||||
<if test="addPersonnel != null and addPersonnel != ''"> and add_personnel = #{addPersonnel}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="approver != null and approver != ''"> and approver = #{approver}</if>
|
||||
<if test="actualOperationTime != null and actualOperationTime != ''"> and actual_operation_time = #{actualOperationTime}</if>
|
||||
<if test="storekeeper != null and storekeeper != ''"> and storekeeper = #{storekeeper}</if>
|
||||
<if test="outboundNumber != null and outboundNumber != ''"> and outbound_number = #{outboundNumber}</if>
|
||||
<if test="outboundType != null and outboundType != ''"> and outbound_type = #{outboundType}</if>
|
||||
<if test="consignee != null and consignee != ''"> and consignee = #{consignee}</if>
|
||||
<if test="landline != null and landline != ''"> and landline = #{landline}</if>
|
||||
<if test="mobilePhone != null and mobilePhone != ''"> and mobile_phone = #{mobilePhone}</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="postalCode != null and postalCode != ''"> and postal_code = #{postalCode}</if>
|
||||
<if test="hedge != null and hedge != ''"> and hedge = #{hedge}</if>
|
||||
<if test="approvalStatus != null and approvalStatus != ''"> and approval_status = #{approvalStatus}</if>
|
||||
<if test="productDetails != null and productDetails != ''"> and product_details = #{productDetails}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name = #{customerName}</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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectErpOutStockByStockoutId" parameterType="String" resultMap="ErpOutStockResult">
|
||||
<include refid="selectErpOutStockVo"/>
|
||||
where stockout_id = #{stockoutId}
|
||||
</select>
|
||||
|
||||
<insert id="insertErpOutStock" parameterType="ErpOutStock">
|
||||
insert into erp_out_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutId != null">stockout_id,</if>
|
||||
<if test="theme != null">theme,</if>
|
||||
<if test="warehouse != null">warehouse,</if>
|
||||
<if test="applicationDate != null">application_date,</if>
|
||||
<if test="confirmTheDate != null">confirm_the_date,</if>
|
||||
<if test="outboundRemarks != null">outbound_remarks,</if>
|
||||
<if test="outboundCompletionStatus != null">outbound_completion_status,</if>
|
||||
<if test="shippingStatus != null">shipping_status,</if>
|
||||
<if test="approvalComments != null">approval_comments,</if>
|
||||
<if test="addPersonnel != null">add_personnel,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="approver != null">approver,</if>
|
||||
<if test="actualOperationTime != null">actual_operation_time,</if>
|
||||
<if test="storekeeper != null">storekeeper,</if>
|
||||
<if test="outboundNumber != null">outbound_number,</if>
|
||||
<if test="outboundType != null">outbound_type,</if>
|
||||
<if test="consignee != null">consignee,</if>
|
||||
<if test="landline != null">landline,</if>
|
||||
<if test="mobilePhone != null">mobile_phone,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="postalCode != null">postal_code,</if>
|
||||
<if test="hedge != null">hedge,</if>
|
||||
<if test="approvalStatus != null">approval_status,</if>
|
||||
<if test="productDetails != null">product_details,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="theme != null">#{theme},</if>
|
||||
<if test="warehouse != null">#{warehouse},</if>
|
||||
<if test="applicationDate != null">#{applicationDate},</if>
|
||||
<if test="confirmTheDate != null">#{confirmTheDate},</if>
|
||||
<if test="outboundRemarks != null">#{outboundRemarks},</if>
|
||||
<if test="outboundCompletionStatus != null">#{outboundCompletionStatus},</if>
|
||||
<if test="shippingStatus != null">#{shippingStatus},</if>
|
||||
<if test="approvalComments != null">#{approvalComments},</if>
|
||||
<if test="addPersonnel != null">#{addPersonnel},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="approver != null">#{approver},</if>
|
||||
<if test="actualOperationTime != null">#{actualOperationTime},</if>
|
||||
<if test="storekeeper != null">#{storekeeper},</if>
|
||||
<if test="outboundNumber != null">#{outboundNumber},</if>
|
||||
<if test="outboundType != null">#{outboundType},</if>
|
||||
<if test="consignee != null">#{consignee},</if>
|
||||
<if test="landline != null">#{landline},</if>
|
||||
<if test="mobilePhone != null">#{mobilePhone},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="postalCode != null">#{postalCode},</if>
|
||||
<if test="hedge != null">#{hedge},</if>
|
||||
<if test="approvalStatus != null">#{approvalStatus},</if>
|
||||
<if test="productDetails != null">#{productDetails},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateErpOutStock" parameterType="ErpOutStock">
|
||||
update erp_out_stock
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="theme != null">theme = #{theme},</if>
|
||||
<if test="warehouse != null">warehouse = #{warehouse},</if>
|
||||
<if test="applicationDate != null">application_date = #{applicationDate},</if>
|
||||
<if test="confirmTheDate != null">confirm_the_date = #{confirmTheDate},</if>
|
||||
<if test="outboundRemarks != null">outbound_remarks = #{outboundRemarks},</if>
|
||||
<if test="outboundCompletionStatus != null">outbound_completion_status = #{outboundCompletionStatus},</if>
|
||||
<if test="shippingStatus != null">shipping_status = #{shippingStatus},</if>
|
||||
<if test="approvalComments != null">approval_comments = #{approvalComments},</if>
|
||||
<if test="addPersonnel != null">add_personnel = #{addPersonnel},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="approver != null">approver = #{approver},</if>
|
||||
<if test="actualOperationTime != null">actual_operation_time = #{actualOperationTime},</if>
|
||||
<if test="storekeeper != null">storekeeper = #{storekeeper},</if>
|
||||
<if test="outboundNumber != null">outbound_number = #{outboundNumber},</if>
|
||||
<if test="outboundType != null">outbound_type = #{outboundType},</if>
|
||||
<if test="consignee != null">consignee = #{consignee},</if>
|
||||
<if test="landline != null">landline = #{landline},</if>
|
||||
<if test="mobilePhone != null">mobile_phone = #{mobilePhone},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="postalCode != null">postal_code = #{postalCode},</if>
|
||||
<if test="hedge != null">hedge = #{hedge},</if>
|
||||
<if test="approvalStatus != null">approval_status = #{approvalStatus},</if>
|
||||
<if test="productDetails != null">product_details = #{productDetails},</if>
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
</trim>
|
||||
where stockout_id = #{stockoutId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteErpOutStockByStockoutId" parameterType="String">
|
||||
delete from erp_out_stock where stockout_id = #{stockoutId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteErpOutStockByStockoutIds" parameterType="String">
|
||||
delete from erp_out_stock where stockout_id in
|
||||
<foreach item="stockoutId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?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.OutStockMiddle.mapper.OutStockMiddleMapper">
|
||||
|
||||
<resultMap type="OutStockMiddle" id="OutStockMiddleResult">
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockMiddleVo">
|
||||
select stockout_id, status, create_date, spare1, spare2, spare3 from out_stock_middle
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockMiddleList" parameterType="OutStockMiddle" resultMap="OutStockMiddleResult">
|
||||
<include refid="selectOutStockMiddleVo"/>
|
||||
<where>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockMiddleByStockoutId" parameterType="String" resultMap="OutStockMiddleResult">
|
||||
<include refid="selectOutStockMiddleVo"/>
|
||||
where stockout_id = #{stockoutId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockMiddle" parameterType="OutStockMiddle">
|
||||
insert into out_stock_middle
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockMiddle" parameterType="OutStockMiddle">
|
||||
update out_stock_middle
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where stockout_id = #{stockoutId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockMiddleByStockoutId" parameterType="String">
|
||||
delete from out_stock_middle where stockout_id = #{stockoutId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockMiddleByStockoutIds" parameterType="String">
|
||||
delete from out_stock_middle where stockout_id in
|
||||
<foreach item="stockoutId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user