Skip to content

Commit

Permalink
Merge pull request #249 from Jzow/master
Browse files Browse the repository at this point in the history
Add warehouse module export api and update views
  • Loading branch information
Jzow authored Dec 2, 2023
2 parents d959e79 + d2f9da3 commit 8afc766
Show file tree
Hide file tree
Showing 30 changed files with 479 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.AllotReceiptDetailVO;
import com.wansenai.vo.warehouse.AllotReceiptVO;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.*;

import java.util.List;

Expand Down Expand Up @@ -64,4 +58,10 @@ public Response<String> deleteAllotShipmentsByIds(@RequestParam("ids") List<Long
public Response<String> updateAllotShipmentsStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return allotShipmentsService.updateAllotReceiptStatus(ids, status);
}

@GetMapping("export")
public void exportAllotShipments(@ModelAttribute QueryAllotReceiptDTO queryAllotReceiptDTO, HttpServletResponse response) throws Exception {
allotShipmentsService.exportAllotReceipt(queryAllotReceiptDTO, response);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.AssembleReceiptDetailVO;
import com.wansenai.vo.warehouse.AssembleReceiptVO;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.*;

import java.util.List;

Expand Down Expand Up @@ -64,4 +58,9 @@ public Response<String> deleteAssembleReceiptByIds(@RequestParam("ids") List<Lon
public Response<String> updateAssembleReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return assembleService.updateAssembleReceiptStatus(ids, status);
}

@GetMapping("export")
public void exportAssembleReceipt(@ModelAttribute QueryAssembleReceiptDTO queryAssembleReceiptDTO, HttpServletResponse response) throws Exception {
assembleService.exportAssembleReceipt(queryAssembleReceiptDTO, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.DisassembleReceiptDetailVO;
import com.wansenai.vo.warehouse.DisassembleReceiptVO;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.*;

import java.util.List;

Expand Down Expand Up @@ -64,4 +58,9 @@ public Response<String> deleteDisAssembleReceiptByIds(@RequestParam("ids") List<
public Response<String> updateDisAssembleReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return disassembleService.updateDisassembleReceiptStatus(ids, status);
}

@GetMapping("export")
public void exportDisAssembleReceipt(@ModelAttribute QueryDisassembleReceiptDTO queryDisassembleReceiptDTO, HttpServletResponse response) throws Exception {
disassembleService.exportDisAssembleReceipt(queryDisassembleReceiptDTO, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.OtherShipmentDetailVO;
import com.wansenai.vo.warehouse.OtherShipmentVO;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.*;

import java.util.List;

Expand Down Expand Up @@ -64,4 +58,9 @@ public Response<String> deleteOtherShipmentsByIds(@RequestParam("ids") List<Long
public Response<String> updateOtherShipmentsStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return otherShipmentsService.updateOtherShipmentsStatus(ids, status);
}

@GetMapping("export")
public void exportOtherShipments(@ModelAttribute QueryOtherShipmentDTO queryOtherShipmentDTO, HttpServletResponse response) throws Exception {
otherShipmentsService.exportOtherShipments(queryOtherShipmentDTO, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.OtherStorageDetailVO;
import com.wansenai.vo.warehouse.OtherStorageVO;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.*;

import java.util.List;

Expand Down Expand Up @@ -64,4 +58,10 @@ public Response<String> deleteOtherStorageByIds(@RequestParam("ids") List<Long>
public Response<String> updateOtherStorageStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
return otherStorageService.updateOtherStorageStatus(ids, status);
}

@GetMapping("export")
public void exportOtherStorage(@ModelAttribute QueryOtherStorageDTO queryOtherStorageDTO, HttpServletResponse response) throws Exception {
otherStorageService.exportOtherStorage(queryOtherStorageDTO, response);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

Expand All @@ -28,19 +29,26 @@ public class AllotReceiptVO {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;

@ExcelExport(value = "单据编号")
private String receiptNumber;

@ExcelExport(value = "商品信息")
private String productInfo;

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ExcelExport(value = "单据日期")
private LocalDateTime receiptDate;

private String operator;

@ExcelExport(value = "商品数量")
private Integer productNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "金额合计")
private BigDecimal totalAmount;

@ExcelExport(value = "操作员")
private String operator;

@ExcelExport(value = "状态", kv = "0-未审核;1-已审核")
private Integer status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

Expand All @@ -28,19 +29,26 @@ public class AssembleReceiptVO {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;

@ExcelExport(value = "单据编号")
private String receiptNumber;

@ExcelExport(value = "商品信息")
private String productInfo;

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ExcelExport(value = "单据日期")
private LocalDateTime receiptDate;

private String operator;

@ExcelExport(value = "商品数量")
private Integer productNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "金额合计")
private BigDecimal totalAmount;

@ExcelExport(value = "操作员")
private String operator;

@ExcelExport(value = "状态", kv = "0-未审核;1-已审核")
private Integer status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

Expand All @@ -28,19 +29,26 @@ public class DisassembleReceiptVO {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;

@ExcelExport(value = "单据编号")
private String receiptNumber;

@ExcelExport(value = "商品信息")
private String productInfo;

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ExcelExport(value = "单据日期")
private LocalDateTime receiptDate;

private String operator;

@ExcelExport(value = "商品数量")
private Integer productNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "金额合计")
private BigDecimal totalAmount;

@ExcelExport(value = "操作员")
private String operator;

@ExcelExport(value = "状态", kv = "0-未审核;1-已审核")
private Integer status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

Expand All @@ -28,21 +29,29 @@ public class OtherShipmentVO {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;

@ExcelExport(value = "客户")
private String customerName;

@ExcelExport(value = "单据编号")
private String receiptNumber;

@ExcelExport(value = "商品信息")
private String productInfo;

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ExcelExport(value = "单据日期")
private LocalDateTime receiptDate;

private String operator;

@ExcelExport(value = "商品数量")
private Integer productNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "金额合计")
private BigDecimal totalAmount;

@ExcelExport(value = "操作员")
private String operator;

@ExcelExport(value = "状态", kv = "0-未审核;1-已审核")
private Integer status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wansenai.bo.BigDecimalSerializerBO;
import com.wansenai.utils.excel.ExcelExport;
import lombok.Builder;
import lombok.Data;

Expand All @@ -28,21 +29,29 @@ public class OtherStorageVO {
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;

@ExcelExport(value = "供应商")
private String supplierName;

@ExcelExport(value = "单据编号")
private String receiptNumber;

@ExcelExport(value = "商品信息")
private String productInfo;

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ExcelExport(value = "单据日期")
private LocalDateTime receiptDate;

private String operator;

@ExcelExport(value = "商品数量")
private Integer productNumber;

@JsonSerialize(using = BigDecimalSerializerBO.class)
@ExcelExport(value = "金额合计")
private BigDecimal totalAmount;

@ExcelExport(value = "操作员")
private String operator;

@ExcelExport(value = "状态", kv = "0-未审核;1-已审核")
private Integer status;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.AllotReceiptDetailVO;
import com.wansenai.vo.warehouse.AllotReceiptVO;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

Expand All @@ -34,4 +35,6 @@ public interface AllotShipmentsService extends IService<WarehouseReceiptMain> {
Response<String> deleteBatchAllotReceipt(List<Long> ids);

Response<String> updateAllotReceiptStatus(List<Long> ids, Integer status);

void exportAllotReceipt(QueryAllotReceiptDTO queryAllotReceiptDTO, HttpServletResponse response) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.AssembleReceiptDetailVO;
import com.wansenai.vo.warehouse.AssembleReceiptVO;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

Expand All @@ -34,4 +35,6 @@ public interface AssembleReceiptService extends IService<WarehouseReceiptMain> {
Response<String> deleteBatchAssembleReceipt(List<Long> ids);

Response<String> updateAssembleReceiptStatus(List<Long> ids, Integer status);

void exportAssembleReceipt(QueryAssembleReceiptDTO queryAssembleReceiptDTO, HttpServletResponse response) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.DisassembleReceiptDetailVO;
import com.wansenai.vo.warehouse.DisassembleReceiptVO;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

Expand All @@ -34,4 +35,6 @@ public interface DisassembleReceiptService extends IService<WarehouseReceiptMain
Response<String> deleteBatchDisassembleReceipt(List<Long> ids);

Response<String> updateDisassembleReceiptStatus(List<Long> ids, Integer status);

void exportDisAssembleReceipt(QueryDisassembleReceiptDTO queryDisassembleReceiptDTO, HttpServletResponse response) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.wansenai.utils.response.Response;
import com.wansenai.vo.warehouse.OtherShipmentDetailVO;
import com.wansenai.vo.warehouse.OtherShipmentVO;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

Expand All @@ -34,4 +35,6 @@ public interface OtherShipmentsService extends IService<WarehouseReceiptMain> {
Response<String> deleteBatchOtherShipments(List<Long> ids);

Response<String> updateOtherShipmentsStatus(List<Long> ids, Integer status);

void exportOtherShipments(QueryOtherShipmentDTO queryOtherShipmentDTO, HttpServletResponse response) throws Exception;
}
Loading

0 comments on commit 8afc766

Please sign in to comment.