Browse Source

优化 订单台账

dev
xiaoyu 1 month ago
parent
commit
58b483bc4e
  1. 11
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/gss/DhcOrderLedgerController.java
  2. 23
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/gss/DhcProductInfoController.java
  3. 199
      ruoyi-system/src/main/java/com/ruoyi/gss/domain/DhcProductInfo.java
  4. 795
      ruoyi-system/src/main/java/com/ruoyi/system/domain/DhcOrderLedger.java
  5. 8
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/DhcOrderLedgerMapper.java
  6. 8
      ruoyi-system/src/main/java/com/ruoyi/system/service/IDhcOrderLedgerService.java
  7. 5
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DhcOrderLedgerServiceImpl.java
  8. 196
      ruoyi-system/src/main/resources/mapper/system/DhcOrderLedgerMapper.xml

11
ruoyi-admin/src/main/java/com/ruoyi/web/controller/gss/DhcOrderLedgerController.java

@ -5,7 +5,9 @@ import com.ruoyi.common.core.controller.BaseController; @@ -5,7 +5,9 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.DhcOrderLedger;
import com.ruoyi.system.service.IDhcOrderLedgerService;
import org.springframework.beans.factory.annotation.Autowired;
@ -32,8 +34,13 @@ public class DhcOrderLedgerController extends BaseController { @@ -32,8 +34,13 @@ public class DhcOrderLedgerController extends BaseController {
@PreAuthorize("@ss.hasPermi('gss:orderLedger:export')")
@Log(title = "订单台账", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DhcOrderLedger dhcOrderLedger) {
List<DhcOrderLedger> list = dhcOrderLedgerService.selectDhcOrderLedgerList(dhcOrderLedger);
public void export(HttpServletResponse response, DhcOrderLedger dhcOrderLedger, String ids) {
List<DhcOrderLedger> list;
if (StringUtils.isNotEmpty(ids)) {
list = dhcOrderLedgerService.selectDhcOrderLedgerByIds(Convert.toLongArray(ids));
} else {
list = dhcOrderLedgerService.selectDhcOrderLedgerList(dhcOrderLedger);
}
ExcelUtil<DhcOrderLedger> util = new ExcelUtil<DhcOrderLedger>(DhcOrderLedger.class);
util.exportExcel(response, list, "订单台账数据");
}

23
ruoyi-admin/src/main/java/com/ruoyi/web/controller/gss/DhcProductInfoController.java

@ -28,11 +28,14 @@ public class DhcProductInfoController extends BaseController { @@ -28,11 +28,14 @@ public class DhcProductInfoController extends BaseController {
@PreAuthorize("@ss.hasPermi('gss:product:list')")
@GetMapping("/list")
public TableDataInfo list(DhcProductInfo dhcProductInfo) {
startPage();
startPage(); // 这里已经开启了分页
List<DhcProductInfo> list = dhcProductInfoService.selectDhcProductInfoList(dhcProductInfo);
return getDataTable(list);
return getDataTable(list); // 这里已经处理了分页数据的返回
}
/**
* 导出产品列表
*/
@PreAuthorize("@ss.hasPermi('gss:product:export')")
@Log(title = "产品管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
@ -42,19 +45,32 @@ public class DhcProductInfoController extends BaseController { @@ -42,19 +45,32 @@ public class DhcProductInfoController extends BaseController {
return util.exportExcel(list, "产品数据");
}
/**
* 获取产品详细信息
*/
@PreAuthorize("@ss.hasPermi('gss:product:query')")
@GetMapping(value = "/{productId}")
public AjaxResult getInfo(@PathVariable("productId") Long productId) {
return success(dhcProductInfoService.selectDhcProductInfoById(productId));
}
/**
* 新增产品
*/
@PreAuthorize("@ss.hasPermi('gss:product:add')")
@Log(title = "产品管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DhcProductInfo dhcProductInfo) {
// 设置默认值
dhcProductInfo.setProductStatus("0"); // 默认草稿状态
dhcProductInfo.setSalesType("0"); // 默认内销
dhcProductInfo.setDelFlag("0"); // 默认未删除
return toAjax(dhcProductInfoService.insertDhcProductInfo(dhcProductInfo));
}
/**
* 修改产品
*/
@PreAuthorize("@ss.hasPermi('gss:product:edit')")
@Log(title = "产品管理", businessType = BusinessType.UPDATE)
@PutMapping
@ -62,6 +78,9 @@ public class DhcProductInfoController extends BaseController { @@ -62,6 +78,9 @@ public class DhcProductInfoController extends BaseController {
return toAjax(dhcProductInfoService.updateDhcProductInfo(dhcProductInfo));
}
/**
* 删除产品
*/
@PreAuthorize("@ss.hasPermi('gss:product:remove')")
@Log(title = "产品管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{productIds}")

199
ruoyi-system/src/main/java/com/ruoyi/gss/domain/DhcProductInfo.java

@ -2,48 +2,245 @@ package com.ruoyi.gss.domain; @@ -2,48 +2,245 @@ package com.ruoyi.gss.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
public class DhcProductInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 产品ID */
@Excel(name = "产品ID")
private Long productId;
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 产品编码 */
@Excel(name = "产品编码")
private String productCode;
/** 所属大类编码 */
@Excel(name = "所属大类编码")
private String categoryLarge;
/** 所属中类编码 */
@Excel(name = "所属中类编码")
private String categoryMiddle;
/** 所属小类编码 */
@Excel(name = "所属小类编码")
private String categorySmall;
/** 产品状态(0草稿 1在售 2下市 3冻结) */
@Excel(name = "产品状态", readConverterExp = "0=草稿,1=在售,2=下市,3=冻结")
private String productStatus;
/** 品牌名称 */
@Excel(name = "品牌名称")
private String brandName;
/** 品牌编码 */
@Excel(name = "品牌编码")
private String brandCode;
/** 内外销标识(0内销 1外销 2内外销) */
@Excel(name = "内外销标识", readConverterExp = "0=内销,1=外销,2=内外销")
private String salesType;
/** 产品描述 */
@Excel(name = "产品描述")
private String description;
/** 扩展属性(JSON格式) */
private String extProperties;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
// getter/setter方法省略...
// 补充查询条件字段
/** 产品状态数组,用于批量查询 */
private String[] productStatuses;
/** 内外销标识数组,用于批量查询 */
private String[] salesTypes;
/** 分类编码数组,用于批量查询 */
private String[] categoryLarges;
private String[] categoryMiddles;
private String[] categorySmalls;
/** 创建时间范围 */
@JsonIgnore
private String[] createTimes;
// 补充业务方法
public boolean isEditable() {
return "0".equals(this.productStatus); // 只有草稿状态可编辑
}
public boolean isDeletable() {
return "0".equals(this.productStatus); // 只有草稿状态可删除
}
public boolean canChangeStatus(String targetStatus) {
// 状态流转规则:
// 草稿(0) -> 在售(1)
// 在售(1) -> 下市(2)或冻结(3)
// 下市(2)或冻结(3) -> 在售(1)
if ("0".equals(this.productStatus)) {
return "1".equals(targetStatus);
} else if ("1".equals(this.productStatus)) {
return "2".equals(targetStatus) || "3".equals(targetStatus);
} else if ("2".equals(this.productStatus) || "3".equals(targetStatus)) {
return "1".equals(targetStatus);
}
return false;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getCategoryLarge() {
return categoryLarge;
}
public void setCategoryLarge(String categoryLarge) {
this.categoryLarge = categoryLarge;
}
public String getCategoryMiddle() {
return categoryMiddle;
}
public void setCategoryMiddle(String categoryMiddle) {
this.categoryMiddle = categoryMiddle;
}
public String getCategorySmall() {
return categorySmall;
}
public void setCategorySmall(String categorySmall) {
this.categorySmall = categorySmall;
}
public String getProductStatus() {
return productStatus;
}
public void setProductStatus(String productStatus) {
this.productStatus = productStatus;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
public String getBrandCode() {
return brandCode;
}
public void setBrandCode(String brandCode) {
this.brandCode = brandCode;
}
public String getSalesType() {
return salesType;
}
public void setSalesType(String salesType) {
this.salesType = salesType;
}
public String getExtProperties() {
return extProperties;
}
public void setExtProperties(String extProperties) {
this.extProperties = extProperties;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
// 新增的getter/setter方法
public String[] getProductStatuses() {
return productStatuses;
}
public void setProductStatuses(String[] productStatuses) {
this.productStatuses = productStatuses;
}
public String[] getSalesTypes() {
return salesTypes;
}
public void setSalesTypes(String[] salesTypes) {
this.salesTypes = salesTypes;
}
public String[] getCategoryLarges() {
return categoryLarges;
}
public void setCategoryLarges(String[] categoryLarges) {
this.categoryLarges = categoryLarges;
}
public String[] getCategoryMiddles() {
return categoryMiddles;
}
public void setCategoryMiddles(String[] categoryMiddles) {
this.categoryMiddles = categoryMiddles;
}
public String[] getCategorySmalls() {
return categorySmalls;
}
public void setCategorySmalls(String[] categorySmalls) {
this.categorySmalls = categorySmalls;
}
public String[] getCreateTimes() {
return createTimes;
}
public void setCreateTimes(String[] createTimes) {
this.createTimes = createTimes;
}
}

795
ruoyi-system/src/main/java/com/ruoyi/system/domain/DhcOrderLedger.java

@ -34,6 +34,534 @@ public class DhcOrderLedger extends BaseEntity { @@ -34,6 +34,534 @@ public class DhcOrderLedger extends BaseEntity {
@Excel(name = "订单状态编码")
private String orderStatusCode;
public String getShipPortName() {
return shipPortName;
}
public void setShipPortName(String shipPortName) {
this.shipPortName = shipPortName;
}
public String getTradeTerms() {
return tradeTerms;
}
public void setTradeTerms(String tradeTerms) {
this.tradeTerms = tradeTerms;
}
public BigDecimal getFobUnitPrice() {
return fobUnitPrice;
}
public void setFobUnitPrice(BigDecimal fobUnitPrice) {
this.fobUnitPrice = fobUnitPrice;
}
public BigDecimal getFobPrice() {
return fobPrice;
}
public void setFobPrice(BigDecimal fobPrice) {
this.fobPrice = fobPrice;
}
public BigDecimal getCifUnitPrice() {
return cifUnitPrice;
}
public void setCifUnitPrice(BigDecimal cifUnitPrice) {
this.cifUnitPrice = cifUnitPrice;
}
public BigDecimal getCifPrice() {
return cifPrice;
}
public void setCifPrice(BigDecimal cifPrice) {
this.cifPrice = cifPrice;
}
public BigDecimal getMovePrice() {
return movePrice;
}
public void setMovePrice(BigDecimal movePrice) {
this.movePrice = movePrice;
}
public BigDecimal getPremium() {
return premium;
}
public void setPremium(BigDecimal premium) {
this.premium = premium;
}
public BigDecimal getCgUnitPrice() {
return cgUnitPrice;
}
public void setCgUnitPrice(BigDecimal cgUnitPrice) {
this.cgUnitPrice = cgUnitPrice;
}
public BigDecimal getCgPrice() {
return cgPrice;
}
public void setCgPrice(BigDecimal cgPrice) {
this.cgPrice = cgPrice;
}
public BigDecimal getPoPrice() {
return poPrice;
}
public void setPoPrice(BigDecimal poPrice) {
this.poPrice = poPrice;
}
public BigDecimal getExwUnitPrice() {
return exwUnitPrice;
}
public void setExwUnitPrice(BigDecimal exwUnitPrice) {
this.exwUnitPrice = exwUnitPrice;
}
public BigDecimal getActualInvoicedAmount() {
return actualInvoicedAmount;
}
public void setActualInvoicedAmount(BigDecimal actualInvoicedAmount) {
this.actualInvoicedAmount = actualInvoicedAmount;
}
public BigDecimal getHongKongInvoicePrice() {
return hongKongInvoicePrice;
}
public void setHongKongInvoicePrice(BigDecimal hongKongInvoicePrice) {
this.hongKongInvoicePrice = hongKongInvoicePrice;
}
public BigDecimal getHongKongPrice() {
return hongKongPrice;
}
public void setHongKongPrice(BigDecimal hongKongPrice) {
this.hongKongPrice = hongKongPrice;
}
public String getProductSize() {
return productSize;
}
public void setProductSize(String productSize) {
this.productSize = productSize;
}
public String getCompletemachCode() {
return completemachCode;
}
public void setCompletemachCode(String completemachCode) {
this.completemachCode = completemachCode;
}
public String getNewMaterialCode() {
return newMaterialCode;
}
public void setNewMaterialCode(String newMaterialCode) {
this.newMaterialCode = newMaterialCode;
}
public String getContractNo() {
return contractNo;
}
public void setContractNo(String contractNo) {
this.contractNo = contractNo;
}
public String getCustomerModel() {
return customerModel;
}
public void setCustomerModel(String customerModel) {
this.customerModel = customerModel;
}
public String getScreenCode() {
return screenCode;
}
public void setScreenCode(String screenCode) {
this.screenCode = screenCode;
}
public String getProductionBaseName() {
return productionBaseName;
}
public void setProductionBaseName(String productionBaseName) {
this.productionBaseName = productionBaseName;
}
public String getPackWayName() {
return packWayName;
}
public void setPackWayName(String packWayName) {
this.packWayName = packWayName;
}
public String getOrderType() {
return orderType;
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
public String getDestnPortName() {
return destnPortName;
}
public void setDestnPortName(String destnPortName) {
this.destnPortName = destnPortName;
}
public String getAirLine() {
return airLine;
}
public void setAirLine(String airLine) {
this.airLine = airLine;
}
public String getShipCompany() {
return shipCompany;
}
public void setShipCompany(String shipCompany) {
this.shipCompany = shipCompany;
}
public String getSoNo() {
return soNo;
}
public void setSoNo(String soNo) {
this.soNo = soNo;
}
public Date getOrdplanDate() {
return ordplanDate;
}
public void setOrdplanDate(Date ordplanDate) {
this.ordplanDate = ordplanDate;
}
public Date getFormalPlanDeliveryDate() {
return formalPlanDeliveryDate;
}
public void setFormalPlanDeliveryDate(Date formalPlanDeliveryDate) {
this.formalPlanDeliveryDate = formalPlanDeliveryDate;
}
public Integer getFormalPlanQty() {
return formalPlanQty;
}
public void setFormalPlanQty(Integer formalPlanQty) {
this.formalPlanQty = formalPlanQty;
}
public Integer getCurrentInventory() {
return currentInventory;
}
public void setCurrentInventory(Integer currentInventory) {
this.currentInventory = currentInventory;
}
public Integer getDeliveryDateDiff() {
return deliveryDateDiff;
}
public void setDeliveryDateDiff(Integer deliveryDateDiff) {
this.deliveryDateDiff = deliveryDateDiff;
}
public Integer getQtyDiff() {
return qtyDiff;
}
public void setQtyDiff(Integer qtyDiff) {
this.qtyDiff = qtyDiff;
}
public Date getPlanEtd() {
return planEtd;
}
public void setPlanEtd(Date planEtd) {
this.planEtd = planEtd;
}
public Date getPlanEta() {
return planEta;
}
public void setPlanEta(Date planEta) {
this.planEta = planEta;
}
public String getPlanEtdWeekday() {
return planEtdWeekday;
}
public void setPlanEtdWeekday(String planEtdWeekday) {
this.planEtdWeekday = planEtdWeekday;
}
public Date getLhzEtd() {
return lhzEtd;
}
public void setLhzEtd(Date lhzEtd) {
this.lhzEtd = lhzEtd;
}
public Date getDcEtd() {
return dcEtd;
}
public void setDcEtd(Date dcEtd) {
this.dcEtd = dcEtd;
}
public Date getEtdActualTime() {
return etdActualTime;
}
public void setEtdActualTime(Date etdActualTime) {
this.etdActualTime = etdActualTime;
}
public Date getEtaActualTime() {
return etaActualTime;
}
public void setEtaActualTime(Date etaActualTime) {
this.etaActualTime = etaActualTime;
}
public Integer getEtaDifference() {
return etaDifference;
}
public void setEtaDifference(Integer etaDifference) {
this.etaDifference = etaDifference;
}
public String getSpecialRemark() {
return specialRemark;
}
public void setSpecialRemark(String specialRemark) {
this.specialRemark = specialRemark;
}
public Date getAtd() {
return atd;
}
public void setAtd(Date atd) {
this.atd = atd;
}
public Date getAta() {
return ata;
}
public void setAta(Date ata) {
this.ata = ata;
}
public Date getZtdDate() {
return ztdDate;
}
public void setZtdDate(Date ztdDate) {
this.ztdDate = ztdDate;
}
public String getIsInspection() {
return isInspection;
}
public void setIsInspection(String isInspection) {
this.isInspection = isInspection;
}
public String getSalesAssistantName() {
return salesAssistantName;
}
public void setSalesAssistantName(String salesAssistantName) {
this.salesAssistantName = salesAssistantName;
}
public String getLogisticsPersonnel() {
return logisticsPersonnel;
}
public void setLogisticsPersonnel(String logisticsPersonnel) {
this.logisticsPersonnel = logisticsPersonnel;
}
public String getLhzStatusName() {
return lhzStatusName;
}
public void setLhzStatusName(String lhzStatusName) {
this.lhzStatusName = lhzStatusName;
}
public String getOrderEntryMonth() {
return orderEntryMonth;
}
public void setOrderEntryMonth(String orderEntryMonth) {
this.orderEntryMonth = orderEntryMonth;
}
public String getServiceType() {
return serviceType;
}
public void setServiceType(String serviceType) {
this.serviceType = serviceType;
}
public String getProductLineType() {
return productLineType;
}
public void setProductLineType(String productLineType) {
this.productLineType = productLineType;
}
public Integer getRkQty() {
return rkQty;
}
public void setRkQty(Integer rkQty) {
this.rkQty = rkQty;
}
public String getProductBigCategory() {
return productBigCategory;
}
public void setProductBigCategory(String productBigCategory) {
this.productBigCategory = productBigCategory;
}
public String getZeroRollPlanNumber() {
return zeroRollPlanNumber;
}
public void setZeroRollPlanNumber(String zeroRollPlanNumber) {
this.zeroRollPlanNumber = zeroRollPlanNumber;
}
public String getBoxType() {
return boxType;
}
public void setBoxType(String boxType) {
this.boxType = boxType;
}
public String getManuRemark() {
return manuRemark;
}
public void setManuRemark(String manuRemark) {
this.manuRemark = manuRemark;
}
public String getOverseasFactory() {
return overseasFactory;
}
public void setOverseasFactory(String overseasFactory) {
this.overseasFactory = overseasFactory;
}
public String getInProduction() {
return inProduction;
}
public void setInProduction(String inProduction) {
this.inProduction = inProduction;
}
public String getInStock() {
return inStock;
}
public void setInStock(String inStock) {
this.inStock = inStock;
}
public String getLoadedInContainer() {
return loadedInContainer;
}
public void setLoadedInContainer(String loadedInContainer) {
this.loadedInContainer = loadedInContainer;
}
public String getHasShipped() {
return hasShipped;
}
public void setHasShipped(String hasShipped) {
this.hasShipped = hasShipped;
}
public String getDeliveryStatus() {
return deliveryStatus;
}
public void setDeliveryStatus(String deliveryStatus) {
this.deliveryStatus = deliveryStatus;
}
public Integer getCustomsDeclarationNumber() {
return customsDeclarationNumber;
}
public void setCustomsDeclarationNumber(Integer customsDeclarationNumber) {
this.customsDeclarationNumber = customsDeclarationNumber;
}
public String getCustomsDeclarationReason() {
return customsDeclarationReason;
}
public void setCustomsDeclarationReason(String customsDeclarationReason) {
this.customsDeclarationReason = customsDeclarationReason;
}
/** 订单状态名称 */
@Excel(name = "订单状态")
private String orderStatusName;
@ -234,4 +762,271 @@ public class DhcOrderLedger extends BaseEntity { @@ -234,4 +762,271 @@ public class DhcOrderLedger extends BaseEntity {
public void setBrandName(String brandName) {
this.brandName = brandName;
}
/** 贸易条款 */
@Excel(name = "贸易条款")
private String tradeTerms;
/** FOB单价 */
@Excel(name = "FOB单价")
private BigDecimal fobUnitPrice;
/** FOB总金额 */
@Excel(name = "FOB总金额")
private BigDecimal fobPrice;
/** CIF单价 */
@Excel(name = "CIF单价")
private BigDecimal cifUnitPrice;
/** CIF总金额 */
@Excel(name = "CIF总金额")
private BigDecimal cifPrice;
/** 总运费 */
@Excel(name = "总运费")
private BigDecimal movePrice;
/** 总保费 */
@Excel(name = "总保费")
private BigDecimal premium;
/** 预估保值单价 */
@Excel(name = "预估保值单价")
private BigDecimal cgUnitPrice;
/** 预估保值总额 */
@Excel(name = "预估保值总额")
private BigDecimal cgPrice;
/** PO总金额 */
@Excel(name = "PO总金额")
private BigDecimal poPrice;
/** EXW单价 */
@Excel(name = "EXW单价")
private BigDecimal exwUnitPrice;
/** 实际开票金额 */
@Excel(name = "实际开票金额")
private BigDecimal actualInvoicedAmount;
/** 香港发票价格 */
@Excel(name = "香港发票价格")
private BigDecimal hongKongInvoicePrice;
/** 香港发票总金额 */
@Excel(name = "香港发票总金额")
private BigDecimal hongKongPrice;
/** 尺寸 */
@Excel(name = "尺寸")
private String productSize;
/** 整机编码 */
@Excel(name = "整机编码")
private String completemachCode;
/** 新物料号 */
@Excel(name = "新物料号")
private String newMaterialCode;
/** 合同号 */
@Excel(name = "合同号")
private String contractNo;
/** 销售型号 */
@Excel(name = "销售型号")
private String customerModel;
/** 屏型号 */
@Excel(name = "屏型号")
private String screenCode;
/** 生产基地 */
@Excel(name = "生产基地")
private String productionBaseName;
/** 包装方式 */
@Excel(name = "包装方式")
private String packWayName;
/** 订单类别 */
@Excel(name = "订单类别")
private String orderType;
/** 起运港 */
@Excel(name = "起运港")
private String shipPortName;
/** 目的港 */
@Excel(name = "目的港")
private String destnPortName;
/** 航线 */
@Excel(name = "航线")
private String airLine;
/** 船公司 */
@Excel(name = "船公司")
private String shipCompany;
/** SO号 */
@Excel(name = "SO号")
private String soNo;
/** 排产交货期 */
@Excel(name = "排产交货期", dateFormat = "yyyy-MM-dd")
private Date ordplanDate;
/** 正式版滚动计划交货期 */
@Excel(name = "正式版滚动计划交货期", dateFormat = "yyyy-MM-dd")
private Date formalPlanDeliveryDate;
/** 正式版滚动计划数量 */
@Excel(name = "正式版滚动计划数量")
private Integer formalPlanQty;
/** 当前库存数 */
@Excel(name = "当前库存数")
private Integer currentInventory;
/** GSS交货期与正式版交货期差异 */
@Excel(name = "交货期差异")
private Integer deliveryDateDiff;
/** GSS数量与正式版数量差异 */
@Excel(name = "数量差异")
private Integer qtyDiff;
/** ETD计划 */
@Excel(name = "ETD计划", dateFormat = "yyyy-MM-dd")
private Date planEtd;
/** ETA计划 */
@Excel(name = "ETA计划", dateFormat = "yyyy-MM-dd")
private Date planEta;
/** ETD Weekday(计划) */
@Excel(name = "ETD Weekday")
private String planEtdWeekday;
/** 落货纸ETD */
@Excel(name = "落货纸ETD", dateFormat = "yyyy-MM-dd")
private Date lhzEtd;
/** 订舱ETD */
@Excel(name = "订舱ETD", dateFormat = "yyyy-MM-dd")
private Date dcEtd;
/** ETD(实时) */
@Excel(name = "ETD实时", dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date etdActualTime;
/** ETA(实时) */
@Excel(name = "ETA实时", dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date etaActualTime;
/** ETA(差异) */
@Excel(name = "ETA差异")
private Integer etaDifference;
/** 特殊备注 */
@Excel(name = "特殊备注")
private String specialRemark;
/** ATD */
@Excel(name = "ATD", dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date atd;
/** ATA */
@Excel(name = "ATA", dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date ata;
/** 提单日期 */
@Excel(name = "提单日期", dateFormat = "yyyy-MM-dd")
private Date ztdDate;
/** 是否验货 */
@Excel(name = "是否验货", readConverterExp = "0=否,1=是")
private String isInspection;
/** 销售协调 */
@Excel(name = "销售协调")
private String salesAssistantName;
/** 物流人员 */
@Excel(name = "物流人员")
private String logisticsPersonnel;
/** 落货纸状态 */
@Excel(name = "落货纸状态")
private String lhzStatusName;
/** 报关月份 */
@Excel(name = "报关月份")
private String orderEntryMonth;
/** 是否执行零号 */
@Excel(name = "是否执行零号", readConverterExp = "0=否,1=是")
private String serviceType;
/** 产品线 */
@Excel(name = "产品线")
private String productLineType;
/** 累计入库数 */
@Excel(name = "累计入库数")
private Integer rkQty;
/** 产品大类 */
@Excel(name = "产品大类")
private String productBigCategory;
/** 零号滚动计划号 */
@Excel(name = "零号滚动计划号")
private String zeroRollPlanNumber;
/** 箱型箱量 */
@Excel(name = "箱型箱量")
private String boxType;
/** 手工备注 */
@Excel(name = "手工备注")
private String manuRemark;
/** 海外工厂 */
@Excel(name = "海外工厂")
private String overseasFactory;
/** 生产中 */
@Excel(name = "生产中", readConverterExp = "0=否,1=是")
private String inProduction;
/** 有库存 */
@Excel(name = "有库存", readConverterExp = "0=否,1=是")
private String inStock;
/** 已装柜 */
@Excel(name = "已装柜", readConverterExp = "0=否,1=是")
private String loadedInContainer;
/** 已出运 */
@Excel(name = "已出运", readConverterExp = "0=否,1=是")
private String hasShipped;
/** 交付状态 */
@Excel(name = "交付状态")
private String deliveryStatus;
/** 关单数量 */
@Excel(name = "关单数量")
private Integer customsDeclarationNumber;
/** 关单原因 */
@Excel(name = "关单原因")
private String customsDeclarationReason;
// 生成所有新增字段的getter和setter方法
// ... 此处省略getter和setter方法,需要全部补充 ...
}

8
ruoyi-system/src/main/java/com/ruoyi/system/mapper/DhcOrderLedgerMapper.java

@ -15,4 +15,12 @@ public interface DhcOrderLedgerMapper { @@ -15,4 +15,12 @@ public interface DhcOrderLedgerMapper {
public int deleteDhcOrderLedgerById(Long id);
public int deleteDhcOrderLedgerByIds(Long[] ids);
/**
* 根据ID数组查询订单台账列表
*
* @param ids ID数组
* @return 订单台账集合
*/
public List<DhcOrderLedger> selectDhcOrderLedgerByIds(Long[] ids);
}

8
ruoyi-system/src/main/java/com/ruoyi/system/service/IDhcOrderLedgerService.java

@ -15,4 +15,12 @@ public interface IDhcOrderLedgerService { @@ -15,4 +15,12 @@ public interface IDhcOrderLedgerService {
public int deleteDhcOrderLedgerByIds(Long[] ids);
public int deleteDhcOrderLedgerById(Long id);
/**
* 根据ID数组查询订单台账列表
*
* @param ids ID数组
* @return 订单台账集合
*/
public List<DhcOrderLedger> selectDhcOrderLedgerByIds(Long[] ids);
}

5
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DhcOrderLedgerServiceImpl.java

@ -25,6 +25,11 @@ public class DhcOrderLedgerServiceImpl implements IDhcOrderLedgerService { @@ -25,6 +25,11 @@ public class DhcOrderLedgerServiceImpl implements IDhcOrderLedgerService {
return dhcOrderLedgerMapper.selectDhcOrderLedgerById(id);
}
@Override
public List<DhcOrderLedger> selectDhcOrderLedgerByIds(Long[] ids) {
return dhcOrderLedgerMapper.selectDhcOrderLedgerByIds(ids);
}
@Override
public int insertDhcOrderLedger(DhcOrderLedger dhcOrderLedger) {
dhcOrderLedger.setCreateTime(DateUtils.getNowDate());

196
ruoyi-system/src/main/resources/mapper/system/DhcOrderLedgerMapper.xml

@ -6,50 +6,155 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -6,50 +6,155 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="DhcOrderLedger" id="DhcOrderLedgerResult">
<id property="id" column="id" />
<result property="lhzNo" column="lhz_no" />
<result property="lhzNo" column="lhz_no" />
<result property="rollPlanNumber" column="roll_plan_number" />
<result property="productModel" column="product_model" />
<result property="orderQty" column="order_qty" />
<result property="noProductNum" column="no_product_num" />
<result property="productNum" column="product_num" />
<result property="customerName" column="customer_name" />
<result property="orderStatusCode" column="order_status_code"/>
<result property="orderStatusName" column="order_status_name"/>
<result property="salesAreaCode" column="sales_area_code" />
<result property="salesAreaName" column="sales_area_name" />
<result property="countryCode" column="country_code" />
<result property="countryName" column="country_name" />
<result property="customerName" column="customer_name" />
<result property="realCustomer" column="real_customer" />
<result property="brandCode" column="brand_code" />
<result property="brandName" column="brand_name" />
<!-- 其他字段映射 -->
<result property="shipPortName" column="ship_port_name" />
<result property="tradeTerms" column="trade_terms" />
<result property="fobUnitPrice" column="fob_unit_price" />
<result property="fobPrice" column="fob_price" />
<result property="cifUnitPrice" column="cif_unit_price" />
<result property="cifPrice" column="cif_price" />
<result property="movePrice" column="move_price" />
<result property="premium" column="premium" />
<result property="cgUnitPrice" column="cg_unit_price" />
<result property="cgPrice" column="cg_price" />
<result property="poPrice" column="po_price" />
<result property="exwUnitPrice" column="exw_unit_price" />
<result property="actualInvoicedAmount" column="actual_invoiced_amount"/>
<result property="hongKongInvoicePrice" column="hong_kong_invoice_price"/>
<result property="hongKongPrice" column="hong_kong_price" />
<result property="productSize" column="product_size" />
<result property="completemachCode" column="completemach_code"/>
<result property="newMaterialCode" column="new_material_code"/>
<result property="contractNo" column="contract_no" />
<result property="customerModel" column="customer_model" />
<result property="screenCode" column="screen_code" />
<result property="productionBaseName" column="production_base_name"/>
<result property="packWayName" column="pack_way_name" />
<result property="orderType" column="order_type" />
<result property="destnPortName" column="destn_port_name" />
<result property="airLine" column="air_line" />
<result property="shipCompany" column="ship_company" />
<result property="soNo" column="so_no" />
<result property="ordplanDate" column="ordplan_date" />
<result property="formalPlanDeliveryDate" column="formal_plan_delivery_date"/>
<result property="formalPlanQty" column="formal_plan_qty" />
<result property="currentInventory" column="current_inventory"/>
<result property="deliveryDateDiff" column="delivery_date_diff"/>
<result property="qtyDiff" column="qty_diff" />
<result property="planEtd" column="plan_etd" />
<result property="planEta" column="plan_eta" />
<result property="planEtdWeekday" column="plan_etd_weekday" />
<result property="lhzEtd" column="lhz_etd" />
<result property="dcEtd" column="dc_etd" />
<result property="etdActualTime" column="etd_actual_time" />
<result property="etaActualTime" column="eta_actual_time" />
<result property="etaDifference" column="eta_difference" />
<result property="specialRemark" column="special_remark" />
<result property="atd" column="atd" />
<result property="ata" column="ata" />
<result property="ztdDate" column="ztd_date" />
<result property="isInspection" column="is_inspection" />
<result property="salesAssistantName" column="sales_assistant_name"/>
<result property="logisticsPersonnel" column="logistics_personnel"/>
<result property="lhzStatusName" column="lhz_status_name" />
<result property="orderEntryMonth" column="order_entry_month"/>
<result property="serviceType" column="service_type" />
<result property="productLineType" column="product_line_type"/>
<result property="rkQty" column="rk_qty" />
<result property="productBigCategory" column="product_big_category"/>
<result property="zeroRollPlanNumber" column="zero_roll_plan_number"/>
<result property="boxType" column="box_type" />
<result property="manuRemark" column="manu_remark" />
<result property="overseasFactory" column="overseas_factory" />
<result property="inProduction" column="in_production" />
<result property="inStock" column="in_stock" />
<result property="loadedInContainer" column="loaded_in_container"/>
<result property="hasShipped" column="has_shipped" />
<result property="deliveryStatus" column="delivery_status" />
<result property="customsDeclarationNumber" column="customs_declaration_number"/>
<result property="customsDeclarationReason" column="customs_declaration_reason"/>
<result property="planDeliveryDate" column="plan_delivery_date"/>
<result property="planDeliveryWeekday" column="plan_delivery_weekday"/>
<result property="noProductNum" column="no_product_num" />
<result property="productNum" column="product_num" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectDhcOrderLedgerVo">
select id, lhz_no, roll_plan_number, product_model, order_qty, no_product_num, product_num,
sales_area_code, sales_area_name, country_code, country_name, customer_name, real_customer,
brand_code, brand_name, create_by, create_time, update_by, update_time, remark
select id, lhz_no, roll_plan_number, product_model, order_qty, customer_name,
order_status_code, order_status_name, sales_area_code, sales_area_name,
country_code, country_name, real_customer, brand_code, brand_name,
ship_port_name, trade_terms, fob_unit_price, fob_price, cif_unit_price,
cif_price, move_price, premium, cg_unit_price, cg_price, po_price,
exw_unit_price, actual_invoiced_amount, hong_kong_invoice_price, hong_kong_price,
product_size, completemach_code, new_material_code, contract_no, customer_model,
screen_code, production_base_name, pack_way_name, order_type, destn_port_name,
air_line, ship_company, so_no, ordplan_date, formal_plan_delivery_date,
formal_plan_qty, current_inventory, delivery_date_diff, qty_diff, plan_etd,
plan_eta, plan_etd_weekday, lhz_etd, dc_etd, etd_actual_time, eta_actual_time,
eta_difference, special_remark, atd, ata, ztd_date, is_inspection,
sales_assistant_name, logistics_personnel, lhz_status_name, order_entry_month,
service_type, product_line_type, rk_qty, product_big_category,
zero_roll_plan_number, box_type, manu_remark, overseas_factory,
in_production, in_stock, loaded_in_container, has_shipped, delivery_status,
customs_declaration_number, customs_declaration_reason,
plan_delivery_date, plan_delivery_weekday, no_product_num, product_num,
create_by, create_time, update_by, update_time
from dhc_order_ledger
</sql>
<select id="selectDhcOrderLedgerList" parameterType="DhcOrderLedger" resultMap="DhcOrderLedgerResult">
<include refid="selectDhcOrderLedgerVo"/>
<where>
<if test="lhzNo != null and lhzNo != ''"> and lhz_no = #{lhzNo}</if>
<if test="rollPlanNumber != null and rollPlanNumber != ''"> and roll_plan_number = #{rollPlanNumber}</if>
<if test="productModel != null and productModel != ''"> and product_model = #{productModel}</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="orderStatusCode != null and orderStatusCode != ''"> and order_status_code = #{orderStatusCode}</if>
<if test="planDeliveryDate != null "> and plan_delivery_date = #{planDeliveryDate}</if>
<if test="lhzNo != null and lhzNo != ''">
AND lhz_no like concat('%', #{lhzNo}, '%')
</if>
<if test="rollPlanNumber != null and rollPlanNumber != ''">
AND roll_plan_number = #{rollPlanNumber}
</if>
<if test="customerName != null and customerName != ''">
AND customer_name like concat('%', #{customerName}, '%')
</if>
<if test="orderStatusCode != null and orderStatusCode != ''">
AND order_status_code = #{orderStatusCode}
</if>
<if test="salesAreaCode != null and salesAreaCode != ''">
AND sales_area_code = #{salesAreaCode}
</if>
<if test="countryCode != null and countryCode != ''">
AND country_code = #{countryCode}
</if>
<if test="brandCode != null and brandCode != ''">
AND brand_code = #{brandCode}
</if>
<if test="planDeliveryDate != null">
AND plan_delivery_date = #{planDeliveryDate}
</if>
</where>
</select>
<select id="selectDhcOrderLedgerById" parameterType="Long" resultMap="DhcOrderLedgerResult">
<select id="selectDhcOrderLedgerByIds" parameterType="Long[]" resultMap="DhcOrderLedgerResult">
<include refid="selectDhcOrderLedgerVo"/>
where id = #{id}
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<insert id="insertDhcOrderLedger" parameterType="DhcOrderLedger" useGeneratedKeys="true" keyProperty="id">
@ -59,19 +164,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -59,19 +164,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="rollPlanNumber != null">roll_plan_number,</if>
<if test="productModel != null">product_model,</if>
<if test="orderQty != null">order_qty,</if>
<if test="customerName != null">customer_name,</if>
<if test="orderStatusCode != null">order_status_code,</if>
<if test="orderStatusName != null">order_status_name,</if>
<if test="salesAreaCode != null">sales_area_code,</if>
<if test="salesAreaName != null">sales_area_name,</if>
<if test="countryCode != null">country_code,</if>
<if test="countryName != null">country_name,</if>
<if test="realCustomer != null">real_customer,</if>
<if test="brandCode != null">brand_code,</if>
<if test="brandName != null">brand_name,</if>
<if test="planDeliveryDate != null">plan_delivery_date,</if>
<if test="planDeliveryWeekday != null">plan_delivery_weekday,</if>
<if test="noProductNum != null">no_product_num,</if>
<if test="productNum != null">product_num,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null">remark,</if>
</trim>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="lhzNo != null">#{lhzNo},</if>
<if test="rollPlanNumber != null">#{rollPlanNumber},</if>
<if test="productModel != null">#{productModel},</if>
<if test="orderQty != null">#{orderQty},</if>
<if test="customerName != null">#{customerName},</if>
<if test="orderStatusCode != null">#{orderStatusCode},</if>
<if test="orderStatusName != null">#{orderStatusName},</if>
<if test="salesAreaCode != null">#{salesAreaCode},</if>
<if test="salesAreaName != null">#{salesAreaName},</if>
<if test="countryCode != null">#{countryCode},</if>
<if test="countryName != null">#{countryName},</if>
<if test="realCustomer != null">#{realCustomer},</if>
<if test="brandCode != null">#{brandCode},</if>
<if test="brandName != null">#{brandName},</if>
<if test="planDeliveryDate != null">#{planDeliveryDate},</if>
<if test="planDeliveryWeekday != null">#{planDeliveryWeekday},</if>
<if test="noProductNum != null">#{noProductNum},</if>
<if test="productNum != null">#{productNum},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateDhcOrderLedger" parameterType="DhcOrderLedger">
@ -81,9 +216,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -81,9 +216,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="rollPlanNumber != null">roll_plan_number = #{rollPlanNumber},</if>
<if test="productModel != null">product_model = #{productModel},</if>
<if test="orderQty != null">order_qty = #{orderQty},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="orderStatusCode != null">order_status_code = #{orderStatusCode},</if>
<if test="orderStatusName != null">order_status_name = #{orderStatusName},</if>
<if test="salesAreaCode != null">sales_area_code = #{salesAreaCode},</if>
<if test="salesAreaName != null">sales_area_name = #{salesAreaName},</if>
<if test="countryCode != null">country_code = #{countryCode},</if>
<if test="countryName != null">country_name = #{countryName},</if>
<if test="realCustomer != null">real_customer = #{realCustomer},</if>
<if test="brandCode != null">brand_code = #{brandCode},</if>
<if test="brandName != null">brand_name = #{brandName},</if>
<if test="planDeliveryDate != null">plan_delivery_date = #{planDeliveryDate},</if>
<if test="planDeliveryWeekday != null">plan_delivery_weekday = #{planDeliveryWeekday},</if>
<if test="noProductNum != null">no_product_num = #{noProductNum},</if>
<if test="productNum != null">product_num = #{productNum},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>

Loading…
Cancel
Save