Merge remote-tracking branch 'origin/main'
# Conflicts: # ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
import com.ruoyi.api.service.IStockScreenService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/stock")
|
||||
public class StockScreenController {
|
||||
|
||||
@Autowired
|
||||
private IStockScreenService stockScreenService;
|
||||
|
||||
@GetMapping("/all")
|
||||
public AjaxResult getAllStocks() {
|
||||
return AjaxResult.success(stockScreenService.getAllStocksWithTotal());
|
||||
}
|
||||
|
||||
@GetMapping("/cargoSpace/pie")
|
||||
public AjaxResult getCargoSpacePie() {
|
||||
return AjaxResult.success(stockScreenService.getCargoSpacePie());
|
||||
}
|
||||
|
||||
@GetMapping("/inout/stat")
|
||||
public AjaxResult getInOutStat() {
|
||||
return AjaxResult.success(stockScreenService.getInOutSummary());
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.ruoyi.api.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface IStockScreenService {
|
||||
Map<String, Object> getAllStocksWithTotal();
|
||||
Map<String, Object> getCargoSpacePie();
|
||||
Map<String, Object> getInOutSummary();
|
||||
}
|
||||
@@ -24,4 +24,6 @@ public interface IToErpService {
|
||||
AjaxResult receiveSupplier();
|
||||
|
||||
String login();
|
||||
|
||||
AjaxResult receiveOutStockList();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.ruoyi.api.service.impl;
|
||||
|
||||
import com.ruoyi.api.service.IStockScreenService;
|
||||
import com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper;
|
||||
import com.ruoyi.stock.stock.domain.BasStock;
|
||||
import com.ruoyi.stock.stock.service.IBasStockService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class StockScreenServiceImpl implements IStockScreenService {
|
||||
|
||||
@Autowired
|
||||
private IBasStockService basStockService;
|
||||
@Autowired
|
||||
private BasCargoSpaceMapper basCargoSpaceMapper;
|
||||
@Autowired
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getAllStocksWithTotal() {
|
||||
List<BasStock> list = basStockService.selectBasStockListApi(new BasStock());
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
for (BasStock s : list) {
|
||||
String q = s.getQuantity();
|
||||
if (q != null && !q.trim().isEmpty()) {
|
||||
try {
|
||||
total = total.add(new BigDecimal(q.trim()));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
List<BasStock> topList = list.size() > 50 ? list.subList(0, 50) : list;
|
||||
result.put("stockMsg", topList);
|
||||
result.put("totalQuantity", total);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getCargoSpacePie() {
|
||||
List<Map<String, Object>> statusCounts = basCargoSpaceMapper.selectStatusCount();
|
||||
Map<String, Integer> countMap = new HashMap<>();
|
||||
for (Map<String, Object> m : statusCounts) {
|
||||
Object status = m.get("status");
|
||||
Object count = m.get("count");
|
||||
if (status != null && count != null) {
|
||||
try {
|
||||
countMap.put(String.valueOf(status), Integer.parseInt(String.valueOf(count)));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
int totalCount = 0;
|
||||
for (Integer v : countMap.values()) {
|
||||
totalCount += v != null ? v : 0;
|
||||
}
|
||||
List<Map<String, Object>> pie = new ArrayList<>();
|
||||
Map<String, Object> i1 = new HashMap<>(); i1.put("value", countMap.getOrDefault("1", 0)); i1.put("name", "空货位"); pie.add(i1);
|
||||
Map<String, Object> i2 = new HashMap<>(); i2.put("value", countMap.getOrDefault("2", 0)); i2.put("name", "满货位"); pie.add(i2);
|
||||
Map<String, Object> i3 = new HashMap<>(); i3.put("value", countMap.getOrDefault("3", 0)); i3.put("name", "入库已分配"); pie.add(i3);
|
||||
Map<String, Object> i4 = new HashMap<>(); i4.put("value", countMap.getOrDefault("4", 0)); i4.put("name", "出库已分配"); pie.add(i4);
|
||||
Map<String, Object> i5 = new HashMap<>(); i5.put("value", countMap.getOrDefault("5", 0)); i5.put("name", "入库需盘点"); pie.add(i5);
|
||||
Map<String, Object> i6 = new HashMap<>(); i6.put("value", countMap.getOrDefault("6", 0)); i6.put("name", "出库需盘点"); pie.add(i6);
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("pie", pie);
|
||||
result.put("totalCargoSpace", totalCount);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getInOutSummary() {
|
||||
java.time.LocalDate now = java.time.LocalDate.now();
|
||||
java.time.format.DateTimeFormatter dFmt = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
java.time.format.DateTimeFormatter mFmt = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM");
|
||||
String todayPrefix = now.format(dFmt);
|
||||
int dIn = countLike("in_stockin_finish", todayPrefix);
|
||||
int dOut = countLike("out_stockout_finish", todayPrefix);
|
||||
|
||||
java.time.LocalDate monday = now.with(java.time.DayOfWeek.MONDAY);
|
||||
List<Integer> wkIn = new ArrayList<>();
|
||||
List<Integer> wkOut = new ArrayList<>();
|
||||
for (int i = 0; i < 7; i++) {
|
||||
java.time.LocalDate day = monday.plusDays(i);
|
||||
String p = day.format(dFmt);
|
||||
wkIn.add(countLike("in_stockin_finish", p));
|
||||
wkOut.add(countLike("out_stockout_finish", p));
|
||||
}
|
||||
|
||||
int year = now.getYear();
|
||||
List<Map<String, Object>> monthStat = new ArrayList<>();
|
||||
for (int m = 1; m <= 12; m++) {
|
||||
java.time.LocalDate mm = java.time.LocalDate.of(year, m, 1);
|
||||
String mp = mm.format(mFmt);
|
||||
int mi = countLikeMonth("in_stockin_finish", mp);
|
||||
int mo = countLikeMonth("out_stockout_finish", mp);
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
item.put("mouth", String.valueOf(m));
|
||||
item.put("入库", mi);
|
||||
item.put("出库", mo);
|
||||
monthStat.add(item);
|
||||
}
|
||||
|
||||
Map<String, Object> res = new HashMap<>();
|
||||
res.put("drrk", String.valueOf(dIn));
|
||||
res.put("drck", String.valueOf(dOut));
|
||||
res.put("bzrk", wkIn);
|
||||
res.put("bzck", wkOut);
|
||||
res.put("statistic", monthStat);
|
||||
return res;
|
||||
}
|
||||
|
||||
private int countLike(String table, String dayPrefix) {
|
||||
try {
|
||||
Integer c = jdbcTemplate.queryForObject("SELECT COUNT(1) FROM " + table + " WHERE create_date LIKE ?", Integer.class, dayPrefix + "%");
|
||||
return c == null ? 0 : c;
|
||||
} catch (Exception e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private int countLikeMonth(String table, String monthPrefix) {
|
||||
try {
|
||||
Integer c = jdbcTemplate.queryForObject("SELECT COUNT(1) FROM " + table + " WHERE create_date LIKE ?", Integer.class, monthPrefix + "%");
|
||||
return c == null ? 0 : c;
|
||||
} catch (Exception e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
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;
|
||||
@@ -16,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;
|
||||
|
||||
/**
|
||||
@@ -37,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;
|
||||
|
||||
@@ -52,6 +69,7 @@ public class ToErpServiceImpl implements IToErpService {
|
||||
private static final String productListUrl = erpUrl+"/sysa/mobilephone/salesmanage/product/billlist.asp";
|
||||
|
||||
private static final String TOKEN_KEY = "ZBAPI-Token";
|
||||
private static final String outStockListUrl = erpUrl+"/webapi/v3/store/KuOutApplyList";
|
||||
|
||||
|
||||
@Override
|
||||
@@ -175,6 +193,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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user