功能
This commit is contained in:
parent
b4586ea664
commit
4fc16a308e
@ -0,0 +1,98 @@
|
||||
package com.ktg.mes.cg.controller;
|
||||
|
||||
import com.ktg.common.annotation.Log;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.mes.cg.domain.InquiryQuotation;
|
||||
import com.ktg.mes.cg.service.IInquiryQuotationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 询报比价Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/md/quotation")
|
||||
public class InquiryQuotationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInquiryQuotationService inquiryQuotationService;
|
||||
|
||||
/**
|
||||
* 查询询报比价列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:quotation:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InquiryQuotation inquiryQuotation)
|
||||
{
|
||||
startPage();
|
||||
List<InquiryQuotation> list = inquiryQuotationService.selectInquiryQuotationList(inquiryQuotation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出询报比价列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:quotation:export')")
|
||||
@Log(title = "询报比价", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InquiryQuotation inquiryQuotation)
|
||||
{
|
||||
List<InquiryQuotation> list = inquiryQuotationService.selectInquiryQuotationList(inquiryQuotation);
|
||||
ExcelUtil<InquiryQuotation> util = new ExcelUtil<InquiryQuotation>(InquiryQuotation.class);
|
||||
util.exportExcel(response, list, "询报比价数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取询报比价详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:quotation:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(inquiryQuotationService.selectInquiryQuotationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增询报比价
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:quotation:add')")
|
||||
@Log(title = "询报比价", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InquiryQuotation inquiryQuotation)
|
||||
{
|
||||
return toAjax(inquiryQuotationService.insertInquiryQuotation(inquiryQuotation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改询报比价
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:quotation:edit')")
|
||||
@Log(title = "询报比价", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InquiryQuotation inquiryQuotation)
|
||||
{
|
||||
return toAjax(inquiryQuotationService.updateInquiryQuotation(inquiryQuotation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除询报比价
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:quotation:remove')")
|
||||
@Log(title = "询报比价", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(inquiryQuotationService.deleteInquiryQuotationByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package com.ktg.mes.cg.controller;
|
||||
|
||||
import com.ktg.common.annotation.Log;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.mes.cg.domain.ProcurementPlan;
|
||||
import com.ktg.mes.cg.service.IProcurementPlanService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购计划Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/md/plan")
|
||||
public class ProcurementPlanController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProcurementPlanService procurementPlanService;
|
||||
|
||||
/**
|
||||
* 查询采购计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:plan:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProcurementPlan procurementPlan)
|
||||
{
|
||||
startPage();
|
||||
List<ProcurementPlan> list = procurementPlanService.selectProcurementPlanList(procurementPlan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:plan:export')")
|
||||
@Log(title = "采购计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProcurementPlan procurementPlan)
|
||||
{
|
||||
List<ProcurementPlan> list = procurementPlanService.selectProcurementPlanList(procurementPlan);
|
||||
ExcelUtil<ProcurementPlan> util = new ExcelUtil<ProcurementPlan>(ProcurementPlan.class);
|
||||
util.exportExcel(response, list, "采购计划数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购计划详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:plan:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(procurementPlanService.selectProcurementPlanById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:plan:add')")
|
||||
@Log(title = "采购计划", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProcurementPlan procurementPlan)
|
||||
{
|
||||
return toAjax(procurementPlanService.insertProcurementPlan(procurementPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:plan:edit')")
|
||||
@Log(title = "采购计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProcurementPlan procurementPlan)
|
||||
{
|
||||
return toAjax(procurementPlanService.updateProcurementPlan(procurementPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:plan:remove')")
|
||||
@Log(title = "采购计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(procurementPlanService.deleteProcurementPlanByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ktg.mes.md.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.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.ktg.common.annotation.Log;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.mes.md.domain.PurchaseOrder;
|
||||
import com.ktg.mes.md.service.IPurchaseOrderService;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 采购订单Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/md/order")
|
||||
public class PurchaseOrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPurchaseOrderService purchaseOrderService;
|
||||
|
||||
/**
|
||||
* 查询采购订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:order:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PurchaseOrder purchaseOrder)
|
||||
{
|
||||
startPage();
|
||||
List<PurchaseOrder> list = purchaseOrderService.selectPurchaseOrderList(purchaseOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:order:export')")
|
||||
@Log(title = "采购订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PurchaseOrder purchaseOrder)
|
||||
{
|
||||
List<PurchaseOrder> list = purchaseOrderService.selectPurchaseOrderList(purchaseOrder);
|
||||
ExcelUtil<PurchaseOrder> util = new ExcelUtil<PurchaseOrder>(PurchaseOrder.class);
|
||||
util.exportExcel(response, list, "采购订单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购订单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:order:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(purchaseOrderService.selectPurchaseOrderById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:order:add')")
|
||||
@Log(title = "采购订单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PurchaseOrder purchaseOrder)
|
||||
{
|
||||
return toAjax(purchaseOrderService.insertPurchaseOrder(purchaseOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:order:edit')")
|
||||
@Log(title = "采购订单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PurchaseOrder purchaseOrder)
|
||||
{
|
||||
return toAjax(purchaseOrderService.updatePurchaseOrder(purchaseOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购订单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('md:order:remove')")
|
||||
@Log(title = "采购订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(purchaseOrderService.deletePurchaseOrderByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,293 @@
|
||||
package com.ktg.mes.cg.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 询报比价对象 inquiry_quotation
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public class InquiryQuotation extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 询报比价编号 */
|
||||
@Excel(name = "询报比价编号")
|
||||
private String inquiryNo;
|
||||
|
||||
/** 询报比价标题 */
|
||||
@Excel(name = "询报比价标题")
|
||||
private String title;
|
||||
|
||||
/** 发起人ID */
|
||||
@Excel(name = "发起人ID")
|
||||
private Long initiatorId;
|
||||
|
||||
/** 发起人姓名 */
|
||||
@Excel(name = "发起人姓名")
|
||||
private String initiatorName;
|
||||
|
||||
/** 发起时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "发起时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date initiateDate;
|
||||
|
||||
/** 材料ID */
|
||||
@Excel(name = "材料ID")
|
||||
private Long materialId;
|
||||
|
||||
/** 材料名称 */
|
||||
@Excel(name = "材料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 需求数量 */
|
||||
@Excel(name = " 需求数量")
|
||||
private Long quantity;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String specs;
|
||||
|
||||
/** 供应商ID */
|
||||
@Excel(name = "供应商ID")
|
||||
private Long vendorId;
|
||||
|
||||
/** 供应商名称 */
|
||||
@Excel(name = "供应商名称")
|
||||
private String vendorName;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价")
|
||||
private Long unitPrice;
|
||||
|
||||
/** 总价 */
|
||||
@Excel(name = "总价")
|
||||
private Long totalPrice;
|
||||
|
||||
/** 交货时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = " 交货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deliveryTime;
|
||||
|
||||
/** 付款方式 */
|
||||
@Excel(name = "付款方式")
|
||||
private String paymentTerms;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setInquiryNo(String inquiryNo)
|
||||
{
|
||||
this.inquiryNo = inquiryNo;
|
||||
}
|
||||
|
||||
public String getInquiryNo()
|
||||
{
|
||||
return inquiryNo;
|
||||
}
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
public void setInitiatorId(Long initiatorId)
|
||||
{
|
||||
this.initiatorId = initiatorId;
|
||||
}
|
||||
|
||||
public Long getInitiatorId()
|
||||
{
|
||||
return initiatorId;
|
||||
}
|
||||
public void setInitiatorName(String initiatorName)
|
||||
{
|
||||
this.initiatorName = initiatorName;
|
||||
}
|
||||
|
||||
public String getInitiatorName()
|
||||
{
|
||||
return initiatorName;
|
||||
}
|
||||
public void setInitiateDate(Date initiateDate)
|
||||
{
|
||||
this.initiateDate = initiateDate;
|
||||
}
|
||||
|
||||
public Date getInitiateDate()
|
||||
{
|
||||
return initiateDate;
|
||||
}
|
||||
public void setMaterialId(Long materialId)
|
||||
{
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public Long getMaterialId()
|
||||
{
|
||||
return materialId;
|
||||
}
|
||||
public void setMaterialName(String materialName)
|
||||
{
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName()
|
||||
{
|
||||
return materialName;
|
||||
}
|
||||
public void setQuantity(Long quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Long getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
public void setSpecs(String specs)
|
||||
{
|
||||
this.specs = specs;
|
||||
}
|
||||
|
||||
public String getSpecs()
|
||||
{
|
||||
return specs;
|
||||
}
|
||||
public void setVendorId(Long vendorId)
|
||||
{
|
||||
this.vendorId = vendorId;
|
||||
}
|
||||
|
||||
public Long getVendorId()
|
||||
{
|
||||
return vendorId;
|
||||
}
|
||||
public void setVendorName(String vendorName)
|
||||
{
|
||||
this.vendorName = vendorName;
|
||||
}
|
||||
|
||||
public String getVendorName()
|
||||
{
|
||||
return vendorName;
|
||||
}
|
||||
public void setUnitPrice(Long unitPrice)
|
||||
{
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public Long getUnitPrice()
|
||||
{
|
||||
return unitPrice;
|
||||
}
|
||||
public void setTotalPrice(Long totalPrice)
|
||||
{
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
public Long getTotalPrice()
|
||||
{
|
||||
return totalPrice;
|
||||
}
|
||||
public void setDeliveryTime(Date deliveryTime)
|
||||
{
|
||||
this.deliveryTime = deliveryTime;
|
||||
}
|
||||
|
||||
public Date getDeliveryTime()
|
||||
{
|
||||
return deliveryTime;
|
||||
}
|
||||
public void setPaymentTerms(String paymentTerms)
|
||||
{
|
||||
this.paymentTerms = paymentTerms;
|
||||
}
|
||||
|
||||
public String getPaymentTerms()
|
||||
{
|
||||
return paymentTerms;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("inquiryNo", getInquiryNo())
|
||||
.append("title", getTitle())
|
||||
.append("initiatorId", getInitiatorId())
|
||||
.append("initiatorName", getInitiatorName())
|
||||
.append("initiateDate", getInitiateDate())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unit", getUnit())
|
||||
.append("specs", getSpecs())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("vendorName", getVendorName())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("totalPrice", getTotalPrice())
|
||||
.append("deliveryTime", getDeliveryTime())
|
||||
.append("paymentTerms", getPaymentTerms())
|
||||
.append("status", getStatus())
|
||||
.append("remarks", getRemarks())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
365
ktg-mes/src/main/java/com/ktg/mes/cg/domain/ProcurementPlan.java
Normal file
365
ktg-mes/src/main/java/com/ktg/mes/cg/domain/ProcurementPlan.java
Normal file
@ -0,0 +1,365 @@
|
||||
package com.ktg.mes.cg.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 采购计划对象 procurement_plan
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public class ProcurementPlan extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** Id */
|
||||
private Long id;
|
||||
|
||||
/** 采购计划编号 */
|
||||
@Excel(name = "采购计划编号")
|
||||
private String planNo;
|
||||
|
||||
/** 采购计划标题 */
|
||||
@Excel(name = "采购计划标题")
|
||||
private String title;
|
||||
|
||||
/** 发起人ID */
|
||||
@Excel(name = "发起人ID")
|
||||
private Long initiatorId;
|
||||
|
||||
/** 发起人姓名 */
|
||||
@Excel(name = "发起人姓名")
|
||||
private String initiatorName;
|
||||
|
||||
/** 发起时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "发起时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date initiateDate;
|
||||
|
||||
/** 物料ID */
|
||||
@Excel(name = "物料ID")
|
||||
private Long materialId;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 采购数量 */
|
||||
@Excel(name = "采购数量")
|
||||
private String quantity;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String specs;
|
||||
|
||||
/** 供应商ID */
|
||||
@Excel(name = "供应商ID")
|
||||
private Long vendorId;
|
||||
|
||||
/** 供应商名称 */
|
||||
@Excel(name = "供应商名称")
|
||||
private String vendorName;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价")
|
||||
private Long unitPrice;
|
||||
|
||||
/** 总价 */
|
||||
@Excel(name = "总价")
|
||||
private Long totalPrice;
|
||||
|
||||
/** 交货时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "交货时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date deliveryTime;
|
||||
|
||||
/** 付款方式 */
|
||||
@Excel(name = "付款方式")
|
||||
private String paymentTerms;
|
||||
|
||||
/** 预算金额 */
|
||||
@Excel(name = "预算金额")
|
||||
private String budgetAmount;
|
||||
|
||||
/** 实际金额 */
|
||||
@Excel(name = "实际金额")
|
||||
private String actualAmount;
|
||||
|
||||
/** 审批人ID */
|
||||
@Excel(name = "审批人ID")
|
||||
private Long approverId;
|
||||
|
||||
/** 审批人姓名 */
|
||||
@Excel(name = "审批人姓名")
|
||||
private String approverName;
|
||||
|
||||
/** 审批时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date approvalDate;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remarks;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPlanNo(String planNo)
|
||||
{
|
||||
this.planNo = planNo;
|
||||
}
|
||||
|
||||
public String getPlanNo()
|
||||
{
|
||||
return planNo;
|
||||
}
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
public void setInitiatorId(Long initiatorId)
|
||||
{
|
||||
this.initiatorId = initiatorId;
|
||||
}
|
||||
|
||||
public Long getInitiatorId()
|
||||
{
|
||||
return initiatorId;
|
||||
}
|
||||
public void setInitiatorName(String initiatorName)
|
||||
{
|
||||
this.initiatorName = initiatorName;
|
||||
}
|
||||
|
||||
public String getInitiatorName()
|
||||
{
|
||||
return initiatorName;
|
||||
}
|
||||
public void setInitiateDate(Date initiateDate)
|
||||
{
|
||||
this.initiateDate = initiateDate;
|
||||
}
|
||||
|
||||
public Date getInitiateDate()
|
||||
{
|
||||
return initiateDate;
|
||||
}
|
||||
public void setMaterialId(Long materialId)
|
||||
{
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public Long getMaterialId()
|
||||
{
|
||||
return materialId;
|
||||
}
|
||||
public void setMaterialName(String materialName)
|
||||
{
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName()
|
||||
{
|
||||
return materialName;
|
||||
}
|
||||
public void setQuantity(String quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
public void setSpecs(String specs)
|
||||
{
|
||||
this.specs = specs;
|
||||
}
|
||||
|
||||
public String getSpecs()
|
||||
{
|
||||
return specs;
|
||||
}
|
||||
public void setVendorId(Long vendorId)
|
||||
{
|
||||
this.vendorId = vendorId;
|
||||
}
|
||||
|
||||
public Long getVendorId()
|
||||
{
|
||||
return vendorId;
|
||||
}
|
||||
public void setVendorName(String vendorName)
|
||||
{
|
||||
this.vendorName = vendorName;
|
||||
}
|
||||
|
||||
public String getVendorName()
|
||||
{
|
||||
return vendorName;
|
||||
}
|
||||
public void setUnitPrice(Long unitPrice)
|
||||
{
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public Long getUnitPrice()
|
||||
{
|
||||
return unitPrice;
|
||||
}
|
||||
public void setTotalPrice(Long totalPrice)
|
||||
{
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
public Long getTotalPrice()
|
||||
{
|
||||
return totalPrice;
|
||||
}
|
||||
public void setDeliveryTime(Date deliveryTime)
|
||||
{
|
||||
this.deliveryTime = deliveryTime;
|
||||
}
|
||||
|
||||
public Date getDeliveryTime()
|
||||
{
|
||||
return deliveryTime;
|
||||
}
|
||||
public void setPaymentTerms(String paymentTerms)
|
||||
{
|
||||
this.paymentTerms = paymentTerms;
|
||||
}
|
||||
|
||||
public String getPaymentTerms()
|
||||
{
|
||||
return paymentTerms;
|
||||
}
|
||||
public void setBudgetAmount(String budgetAmount)
|
||||
{
|
||||
this.budgetAmount = budgetAmount;
|
||||
}
|
||||
|
||||
public String getBudgetAmount()
|
||||
{
|
||||
return budgetAmount;
|
||||
}
|
||||
public void setActualAmount(String actualAmount)
|
||||
{
|
||||
this.actualAmount = actualAmount;
|
||||
}
|
||||
|
||||
public String getActualAmount()
|
||||
{
|
||||
return actualAmount;
|
||||
}
|
||||
public void setApproverId(Long approverId)
|
||||
{
|
||||
this.approverId = approverId;
|
||||
}
|
||||
|
||||
public Long getApproverId()
|
||||
{
|
||||
return approverId;
|
||||
}
|
||||
public void setApproverName(String approverName)
|
||||
{
|
||||
this.approverName = approverName;
|
||||
}
|
||||
|
||||
public String getApproverName()
|
||||
{
|
||||
return approverName;
|
||||
}
|
||||
public void setApprovalDate(Date approvalDate)
|
||||
{
|
||||
this.approvalDate = approvalDate;
|
||||
}
|
||||
|
||||
public Date getApprovalDate()
|
||||
{
|
||||
return approvalDate;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("planNo", getPlanNo())
|
||||
.append("title", getTitle())
|
||||
.append("initiatorId", getInitiatorId())
|
||||
.append("initiatorName", getInitiatorName())
|
||||
.append("initiateDate", getInitiateDate())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unit", getUnit())
|
||||
.append("specs", getSpecs())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("vendorName", getVendorName())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("totalPrice", getTotalPrice())
|
||||
.append("deliveryTime", getDeliveryTime())
|
||||
.append("paymentTerms", getPaymentTerms())
|
||||
.append("budgetAmount", getBudgetAmount())
|
||||
.append("actualAmount", getActualAmount())
|
||||
.append("approverId", getApproverId())
|
||||
.append("approverName", getApproverName())
|
||||
.append("approvalDate", getApprovalDate())
|
||||
.append("status", getStatus())
|
||||
.append("remarks", getRemarks())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
451
ktg-mes/src/main/java/com/ktg/mes/cg/domain/PurchaseOrder.java
Normal file
451
ktg-mes/src/main/java/com/ktg/mes/cg/domain/PurchaseOrder.java
Normal file
@ -0,0 +1,451 @@
|
||||
package com.ktg.mes.md.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 采购订单对象 purchase_order
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public class PurchaseOrder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 采购订单ID,自增主键 */
|
||||
private Long id;
|
||||
|
||||
/** 采购订单编号,格式如PO20231001 */
|
||||
@Excel(name = "采购订单编号,格式如PO20231001")
|
||||
private String orderNo;
|
||||
|
||||
/** 采购订单标题或简要描述 */
|
||||
@Excel(name = "采购订单标题或简要描述")
|
||||
private String title;
|
||||
|
||||
/** 供应商ID,关联到vendor表 */
|
||||
@Excel(name = "供应商ID,关联到vendor表")
|
||||
private Long vendorId;
|
||||
|
||||
/** 供应商名称 */
|
||||
@Excel(name = "供应商名称")
|
||||
private String vendorName;
|
||||
|
||||
/** 供应商联系人 */
|
||||
@Excel(name = "供应商联系人")
|
||||
private String vendorContact;
|
||||
|
||||
/** 供应商联系电话 */
|
||||
@Excel(name = "供应商联系电话")
|
||||
private String vendorPhone;
|
||||
|
||||
/** 物料ID,关联到material表 */
|
||||
@Excel(name = "物料ID,关联到material表")
|
||||
private Long materialId;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 物料规格 */
|
||||
@Excel(name = "物料规格")
|
||||
private String specs;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/** 采购数量 */
|
||||
@Excel(name = "采购数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** 订货金额(单价×数量) */
|
||||
@Excel(name = "订货金额", readConverterExp = "单=价×数量")
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
/** 税金 */
|
||||
@Excel(name = "税金")
|
||||
private BigDecimal tax;
|
||||
|
||||
/** 总金额(订货金额 + 税金) */
|
||||
@Excel(name = "总金额", readConverterExp = "订=货金额,+=,税=金")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/** 付款方式,例如:预付50%,余款到货后30天内支付 */
|
||||
@Excel(name = "付款方式,例如:预付50%,余款到货后30天内支付")
|
||||
private String paymentTerms;
|
||||
|
||||
/** 付款状态:未付款、部分付款、已付款 */
|
||||
@Excel(name = "付款状态:未付款、部分付款、已付款")
|
||||
private String paymentStatus;
|
||||
|
||||
/** 交货地址 */
|
||||
@Excel(name = "交货地址")
|
||||
private String deliveryAddress;
|
||||
|
||||
/** 预期交货日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预期交货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expectedDeliveryDate;
|
||||
|
||||
/** 实际交货日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实际交货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date actualDeliveryDate;
|
||||
|
||||
/** 运输方式:公路、铁路、航空、海运等 */
|
||||
@Excel(name = "运输方式:公路、铁路、航空、海运等")
|
||||
private String shippingMethod;
|
||||
|
||||
/** 运输费用 */
|
||||
@Excel(name = "运输费用")
|
||||
private BigDecimal shippingCost;
|
||||
|
||||
/** 订单状态:草稿、已审批、进行中、已完成、已取消 */
|
||||
@Excel(name = "订单状态:草稿、已审批、进行中、已完成、已取消")
|
||||
private String status;
|
||||
|
||||
/** 发起人ID,关联到employee表 */
|
||||
@Excel(name = "发起人ID,关联到employee表")
|
||||
private Long initiatorId;
|
||||
|
||||
/** 发起日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "发起日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date initiateDate;
|
||||
|
||||
/** 审批人ID,关联到employee表 */
|
||||
@Excel(name = "审批人ID,关联到employee表")
|
||||
private Long approverId;
|
||||
|
||||
/** 审批日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审批日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date approvalDate;
|
||||
|
||||
/** 备注或额外说明 */
|
||||
@Excel(name = "备注或额外说明")
|
||||
private String remarks;
|
||||
|
||||
/** 记录创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdDate;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setOrderNo(String orderNo)
|
||||
{
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderNo()
|
||||
{
|
||||
return orderNo;
|
||||
}
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
public void setVendorId(Long vendorId)
|
||||
{
|
||||
this.vendorId = vendorId;
|
||||
}
|
||||
|
||||
public Long getVendorId()
|
||||
{
|
||||
return vendorId;
|
||||
}
|
||||
public void setVendorName(String vendorName)
|
||||
{
|
||||
this.vendorName = vendorName;
|
||||
}
|
||||
|
||||
public String getVendorName()
|
||||
{
|
||||
return vendorName;
|
||||
}
|
||||
public void setVendorContact(String vendorContact)
|
||||
{
|
||||
this.vendorContact = vendorContact;
|
||||
}
|
||||
|
||||
public String getVendorContact()
|
||||
{
|
||||
return vendorContact;
|
||||
}
|
||||
public void setVendorPhone(String vendorPhone)
|
||||
{
|
||||
this.vendorPhone = vendorPhone;
|
||||
}
|
||||
|
||||
public String getVendorPhone()
|
||||
{
|
||||
return vendorPhone;
|
||||
}
|
||||
public void setMaterialId(Long materialId)
|
||||
{
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public Long getMaterialId()
|
||||
{
|
||||
return materialId;
|
||||
}
|
||||
public void setMaterialName(String materialName)
|
||||
{
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName()
|
||||
{
|
||||
return materialName;
|
||||
}
|
||||
public void setSpecs(String specs)
|
||||
{
|
||||
this.specs = specs;
|
||||
}
|
||||
|
||||
public String getSpecs()
|
||||
{
|
||||
return specs;
|
||||
}
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
public void setQuantity(BigDecimal quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
public void setUnitPrice(BigDecimal unitPrice)
|
||||
{
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice()
|
||||
{
|
||||
return unitPrice;
|
||||
}
|
||||
public void setOrderAmount(BigDecimal orderAmount)
|
||||
{
|
||||
this.orderAmount = orderAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getOrderAmount()
|
||||
{
|
||||
return orderAmount;
|
||||
}
|
||||
public void setTax(BigDecimal tax)
|
||||
{
|
||||
this.tax = tax;
|
||||
}
|
||||
|
||||
public BigDecimal getTax()
|
||||
{
|
||||
return tax;
|
||||
}
|
||||
public void setTotalAmount(BigDecimal totalAmount)
|
||||
{
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAmount()
|
||||
{
|
||||
return totalAmount;
|
||||
}
|
||||
public void setPaymentTerms(String paymentTerms)
|
||||
{
|
||||
this.paymentTerms = paymentTerms;
|
||||
}
|
||||
|
||||
public String getPaymentTerms()
|
||||
{
|
||||
return paymentTerms;
|
||||
}
|
||||
public void setPaymentStatus(String paymentStatus)
|
||||
{
|
||||
this.paymentStatus = paymentStatus;
|
||||
}
|
||||
|
||||
public String getPaymentStatus()
|
||||
{
|
||||
return paymentStatus;
|
||||
}
|
||||
public void setDeliveryAddress(String deliveryAddress)
|
||||
{
|
||||
this.deliveryAddress = deliveryAddress;
|
||||
}
|
||||
|
||||
public String getDeliveryAddress()
|
||||
{
|
||||
return deliveryAddress;
|
||||
}
|
||||
public void setExpectedDeliveryDate(Date expectedDeliveryDate)
|
||||
{
|
||||
this.expectedDeliveryDate = expectedDeliveryDate;
|
||||
}
|
||||
|
||||
public Date getExpectedDeliveryDate()
|
||||
{
|
||||
return expectedDeliveryDate;
|
||||
}
|
||||
public void setActualDeliveryDate(Date actualDeliveryDate)
|
||||
{
|
||||
this.actualDeliveryDate = actualDeliveryDate;
|
||||
}
|
||||
|
||||
public Date getActualDeliveryDate()
|
||||
{
|
||||
return actualDeliveryDate;
|
||||
}
|
||||
public void setShippingMethod(String shippingMethod)
|
||||
{
|
||||
this.shippingMethod = shippingMethod;
|
||||
}
|
||||
|
||||
public String getShippingMethod()
|
||||
{
|
||||
return shippingMethod;
|
||||
}
|
||||
public void setShippingCost(BigDecimal shippingCost)
|
||||
{
|
||||
this.shippingCost = shippingCost;
|
||||
}
|
||||
|
||||
public BigDecimal getShippingCost()
|
||||
{
|
||||
return shippingCost;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setInitiatorId(Long initiatorId)
|
||||
{
|
||||
this.initiatorId = initiatorId;
|
||||
}
|
||||
|
||||
public Long getInitiatorId()
|
||||
{
|
||||
return initiatorId;
|
||||
}
|
||||
public void setInitiateDate(Date initiateDate)
|
||||
{
|
||||
this.initiateDate = initiateDate;
|
||||
}
|
||||
|
||||
public Date getInitiateDate()
|
||||
{
|
||||
return initiateDate;
|
||||
}
|
||||
public void setApproverId(Long approverId)
|
||||
{
|
||||
this.approverId = approverId;
|
||||
}
|
||||
|
||||
public Long getApproverId()
|
||||
{
|
||||
return approverId;
|
||||
}
|
||||
public void setApprovalDate(Date approvalDate)
|
||||
{
|
||||
this.approvalDate = approvalDate;
|
||||
}
|
||||
|
||||
public Date getApprovalDate()
|
||||
{
|
||||
return approvalDate;
|
||||
}
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
public void setCreatedDate(Date createdDate)
|
||||
{
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
|
||||
public Date getCreatedDate()
|
||||
{
|
||||
return createdDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("title", getTitle())
|
||||
.append("vendorId", getVendorId())
|
||||
.append("vendorName", getVendorName())
|
||||
.append("vendorContact", getVendorContact())
|
||||
.append("vendorPhone", getVendorPhone())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("specs", getSpecs())
|
||||
.append("unit", getUnit())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("orderAmount", getOrderAmount())
|
||||
.append("tax", getTax())
|
||||
.append("totalAmount", getTotalAmount())
|
||||
.append("paymentTerms", getPaymentTerms())
|
||||
.append("paymentStatus", getPaymentStatus())
|
||||
.append("deliveryAddress", getDeliveryAddress())
|
||||
.append("expectedDeliveryDate", getExpectedDeliveryDate())
|
||||
.append("actualDeliveryDate", getActualDeliveryDate())
|
||||
.append("shippingMethod", getShippingMethod())
|
||||
.append("shippingCost", getShippingCost())
|
||||
.append("status", getStatus())
|
||||
.append("initiatorId", getInitiatorId())
|
||||
.append("initiateDate", getInitiateDate())
|
||||
.append("approverId", getApproverId())
|
||||
.append("approvalDate", getApprovalDate())
|
||||
.append("remarks", getRemarks())
|
||||
.append("createdDate", getCreatedDate())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.ktg.mes.cg.mapper;
|
||||
|
||||
import com.ktg.mes.cg.domain.InquiryQuotation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 询报比价Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public interface InquiryQuotationMapper
|
||||
{
|
||||
/**
|
||||
* 查询询报比价
|
||||
*
|
||||
* @param id 询报比价主键
|
||||
* @return 询报比价
|
||||
*/
|
||||
public InquiryQuotation selectInquiryQuotationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询询报比价列表
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 询报比价集合
|
||||
*/
|
||||
public List<InquiryQuotation> selectInquiryQuotationList(InquiryQuotation inquiryQuotation);
|
||||
|
||||
/**
|
||||
* 新增询报比价
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInquiryQuotation(InquiryQuotation inquiryQuotation);
|
||||
|
||||
/**
|
||||
* 修改询报比价
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInquiryQuotation(InquiryQuotation inquiryQuotation);
|
||||
|
||||
/**
|
||||
* 删除询报比价
|
||||
*
|
||||
* @param id 询报比价主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInquiryQuotationById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除询报比价
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInquiryQuotationByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.ktg.mes.cg.mapper;
|
||||
|
||||
import com.ktg.mes.cg.domain.ProcurementPlan;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 采购计划Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public interface ProcurementPlanMapper
|
||||
{
|
||||
/**
|
||||
* 查询采购计划
|
||||
*
|
||||
* @param id 采购计划主键
|
||||
* @return 采购计划
|
||||
*/
|
||||
public ProcurementPlan selectProcurementPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购计划列表
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 采购计划集合
|
||||
*/
|
||||
public List<ProcurementPlan> selectProcurementPlanList(ProcurementPlan procurementPlan);
|
||||
|
||||
/**
|
||||
* 新增采购计划
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProcurementPlan(ProcurementPlan procurementPlan);
|
||||
|
||||
/**
|
||||
* 修改采购计划
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProcurementPlan(ProcurementPlan procurementPlan);
|
||||
|
||||
/**
|
||||
* 删除采购计划
|
||||
*
|
||||
* @param id 采购计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProcurementPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除采购计划
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProcurementPlanByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ktg.mes.md.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.md.domain.PurchaseOrder;
|
||||
|
||||
/**
|
||||
* 采购订单Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public interface PurchaseOrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询采购订单
|
||||
*
|
||||
* @param id 采购订单主键
|
||||
* @return 采购订单
|
||||
*/
|
||||
public PurchaseOrder selectPurchaseOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购订单列表
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 采购订单集合
|
||||
*/
|
||||
public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder);
|
||||
|
||||
/**
|
||||
* 新增采购订单
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPurchaseOrder(PurchaseOrder purchaseOrder);
|
||||
|
||||
/**
|
||||
* 修改采购订单
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePurchaseOrder(PurchaseOrder purchaseOrder);
|
||||
|
||||
/**
|
||||
* 删除采购订单
|
||||
*
|
||||
* @param id 采购订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除采购订单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseOrderByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.ktg.mes.cg.service;
|
||||
|
||||
import com.ktg.mes.cg.domain.InquiryQuotation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 询报比价Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public interface IInquiryQuotationService
|
||||
{
|
||||
/**
|
||||
* 查询询报比价
|
||||
*
|
||||
* @param id 询报比价主键
|
||||
* @return 询报比价
|
||||
*/
|
||||
public InquiryQuotation selectInquiryQuotationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询询报比价列表
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 询报比价集合
|
||||
*/
|
||||
public List<InquiryQuotation> selectInquiryQuotationList(InquiryQuotation inquiryQuotation);
|
||||
|
||||
/**
|
||||
* 新增询报比价
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInquiryQuotation(InquiryQuotation inquiryQuotation);
|
||||
|
||||
/**
|
||||
* 修改询报比价
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInquiryQuotation(InquiryQuotation inquiryQuotation);
|
||||
|
||||
/**
|
||||
* 批量删除询报比价
|
||||
*
|
||||
* @param ids 需要删除的询报比价主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInquiryQuotationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除询报比价信息
|
||||
*
|
||||
* @param id 询报比价主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInquiryQuotationById(Long id);
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.ktg.mes.cg.service;
|
||||
|
||||
import com.ktg.mes.cg.domain.ProcurementPlan;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 采购计划Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public interface IProcurementPlanService
|
||||
{
|
||||
/**
|
||||
* 查询采购计划
|
||||
*
|
||||
* @param id 采购计划主键
|
||||
* @return 采购计划
|
||||
*/
|
||||
public ProcurementPlan selectProcurementPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购计划列表
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 采购计划集合
|
||||
*/
|
||||
public List<ProcurementPlan> selectProcurementPlanList(ProcurementPlan procurementPlan);
|
||||
|
||||
/**
|
||||
* 新增采购计划
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProcurementPlan(ProcurementPlan procurementPlan);
|
||||
|
||||
/**
|
||||
* 修改采购计划
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProcurementPlan(ProcurementPlan procurementPlan);
|
||||
|
||||
/**
|
||||
* 批量删除采购计划
|
||||
*
|
||||
* @param ids 需要删除的采购计划主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProcurementPlanByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除采购计划信息
|
||||
*
|
||||
* @param id 采购计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProcurementPlanById(Long id);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ktg.mes.md.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.md.domain.PurchaseOrder;
|
||||
|
||||
/**
|
||||
* 采购订单Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
public interface IPurchaseOrderService
|
||||
{
|
||||
/**
|
||||
* 查询采购订单
|
||||
*
|
||||
* @param id 采购订单主键
|
||||
* @return 采购订单
|
||||
*/
|
||||
public PurchaseOrder selectPurchaseOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购订单列表
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 采购订单集合
|
||||
*/
|
||||
public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder);
|
||||
|
||||
/**
|
||||
* 新增采购订单
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPurchaseOrder(PurchaseOrder purchaseOrder);
|
||||
|
||||
/**
|
||||
* 修改采购订单
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePurchaseOrder(PurchaseOrder purchaseOrder);
|
||||
|
||||
/**
|
||||
* 批量删除采购订单
|
||||
*
|
||||
* @param ids 需要删除的采购订单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseOrderByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除采购订单信息
|
||||
*
|
||||
* @param id 采购订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseOrderById(Long id);
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package com.ktg.mes.cg.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ktg.mes.cg.domain.InquiryQuotation;
|
||||
import com.ktg.mes.cg.mapper.InquiryQuotationMapper;
|
||||
import com.ktg.mes.cg.service.IInquiryQuotationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
* 询报比价Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
@Service
|
||||
public class InquiryQuotationServiceImpl implements IInquiryQuotationService
|
||||
{
|
||||
@Autowired
|
||||
private InquiryQuotationMapper inquiryQuotationMapper;
|
||||
|
||||
/**
|
||||
* 查询询报比价
|
||||
*
|
||||
* @param id 询报比价主键
|
||||
* @return 询报比价
|
||||
*/
|
||||
@Override
|
||||
public InquiryQuotation selectInquiryQuotationById(Long id)
|
||||
{
|
||||
return inquiryQuotationMapper.selectInquiryQuotationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询询报比价列表
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 询报比价
|
||||
*/
|
||||
@Override
|
||||
public List<InquiryQuotation> selectInquiryQuotationList(InquiryQuotation inquiryQuotation)
|
||||
{
|
||||
return inquiryQuotationMapper.selectInquiryQuotationList(inquiryQuotation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增询报比价
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInquiryQuotation(InquiryQuotation inquiryQuotation)
|
||||
{
|
||||
return inquiryQuotationMapper.insertInquiryQuotation(inquiryQuotation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改询报比价
|
||||
*
|
||||
* @param inquiryQuotation 询报比价
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInquiryQuotation(InquiryQuotation inquiryQuotation)
|
||||
{
|
||||
return inquiryQuotationMapper.updateInquiryQuotation(inquiryQuotation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除询报比价
|
||||
*
|
||||
* @param ids 需要删除的询报比价主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInquiryQuotationByIds(Long[] ids)
|
||||
{
|
||||
return inquiryQuotationMapper.deleteInquiryQuotationByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除询报比价信息
|
||||
*
|
||||
* @param id 询报比价主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInquiryQuotationById(Long id)
|
||||
{
|
||||
return inquiryQuotationMapper.deleteInquiryQuotationById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package com.ktg.mes.cg.service.impl;
|
||||
|
||||
import com.ktg.mes.cg.domain.ProcurementPlan;
|
||||
import com.ktg.mes.cg.mapper.ProcurementPlanMapper;
|
||||
import com.ktg.mes.cg.service.IProcurementPlanService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购计划Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
@Service
|
||||
public class ProcurementPlanServiceImpl implements IProcurementPlanService
|
||||
{
|
||||
@Autowired
|
||||
private ProcurementPlanMapper procurementPlanMapper;
|
||||
|
||||
/**
|
||||
* 查询采购计划
|
||||
*
|
||||
* @param id 采购计划主键
|
||||
* @return 采购计划
|
||||
*/
|
||||
@Override
|
||||
public ProcurementPlan selectProcurementPlanById(Long id)
|
||||
{
|
||||
return procurementPlanMapper.selectProcurementPlanById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购计划列表
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 采购计划
|
||||
*/
|
||||
@Override
|
||||
public List<ProcurementPlan> selectProcurementPlanList(ProcurementPlan procurementPlan)
|
||||
{
|
||||
return procurementPlanMapper.selectProcurementPlanList(procurementPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购计划
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProcurementPlan(ProcurementPlan procurementPlan)
|
||||
{
|
||||
return procurementPlanMapper.insertProcurementPlan(procurementPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购计划
|
||||
*
|
||||
* @param procurementPlan 采购计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProcurementPlan(ProcurementPlan procurementPlan)
|
||||
{
|
||||
return procurementPlanMapper.updateProcurementPlan(procurementPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购计划
|
||||
*
|
||||
* @param ids 需要删除的采购计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProcurementPlanByIds(Long[] ids)
|
||||
{
|
||||
return procurementPlanMapper.deleteProcurementPlanByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购计划信息
|
||||
*
|
||||
* @param id 采购计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProcurementPlanById(Long id)
|
||||
{
|
||||
return procurementPlanMapper.deleteProcurementPlanById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.ktg.mes.md.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ktg.mes.md.mapper.PurchaseOrderMapper;
|
||||
import com.ktg.mes.md.domain.PurchaseOrder;
|
||||
import com.ktg.mes.md.service.IPurchaseOrderService;
|
||||
|
||||
/**
|
||||
* 采购订单Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2025-02-24
|
||||
*/
|
||||
@Service
|
||||
public class PurchaseOrderServiceImpl implements IPurchaseOrderService
|
||||
{
|
||||
@Autowired
|
||||
private PurchaseOrderMapper purchaseOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询采购订单
|
||||
*
|
||||
* @param id 采购订单主键
|
||||
* @return 采购订单
|
||||
*/
|
||||
@Override
|
||||
public PurchaseOrder selectPurchaseOrderById(Long id)
|
||||
{
|
||||
return purchaseOrderMapper.selectPurchaseOrderById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购订单列表
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 采购订单
|
||||
*/
|
||||
@Override
|
||||
public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder)
|
||||
{
|
||||
return purchaseOrderMapper.selectPurchaseOrderList(purchaseOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购订单
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPurchaseOrder(PurchaseOrder purchaseOrder)
|
||||
{
|
||||
return purchaseOrderMapper.insertPurchaseOrder(purchaseOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购订单
|
||||
*
|
||||
* @param purchaseOrder 采购订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePurchaseOrder(PurchaseOrder purchaseOrder)
|
||||
{
|
||||
return purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购订单
|
||||
*
|
||||
* @param ids 需要删除的采购订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePurchaseOrderByIds(Long[] ids)
|
||||
{
|
||||
return purchaseOrderMapper.deletePurchaseOrderByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购订单信息
|
||||
*
|
||||
* @param id 采购订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePurchaseOrderById(Long id)
|
||||
{
|
||||
return purchaseOrderMapper.deletePurchaseOrderById(id);
|
||||
}
|
||||
}
|
||||
143
ktg-mes/src/main/resources/mapper/cg/InquiryQuotationMapper.xml
Normal file
143
ktg-mes/src/main/resources/mapper/cg/InquiryQuotationMapper.xml
Normal file
@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ktg.mes.cg.mapper.InquiryQuotationMapper">
|
||||
|
||||
<resultMap type="com.ktg.mes.cg.domain.InquiryQuotation" id="InquiryQuotationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="inquiryNo" column="inquiry_no" />
|
||||
<result property="title" column="title" />
|
||||
<result property="initiatorId" column="initiator_id" />
|
||||
<result property="initiatorName" column="initiator_name" />
|
||||
<result property="initiateDate" column="initiate_date" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="specs" column="specs" />
|
||||
<result property="vendorId" column="vendor_id" />
|
||||
<result property="vendorName" column="vendor_name" />
|
||||
<result property="unitPrice" column="unit_price" />
|
||||
<result property="totalPrice" column="total_price" />
|
||||
<result property="deliveryTime" column="delivery_time" />
|
||||
<result property="paymentTerms" column="payment_terms" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remarks" column="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInquiryQuotationVo">
|
||||
select id, inquiry_no, title, initiator_id, initiator_name, initiate_date, material_id, material_name, quantity, unit, specs, vendor_id, vendor_name, unit_price, total_price, delivery_time, payment_terms, status, remarks from inquiry_quotation
|
||||
</sql>
|
||||
|
||||
<select id="selectInquiryQuotationList" parameterType="com.ktg.mes.cg.domain.InquiryQuotation" resultMap="InquiryQuotationResult">
|
||||
<include refid="selectInquiryQuotationVo"/>
|
||||
<where>
|
||||
<if test="inquiryNo != null and inquiryNo != ''"> and inquiry_no = #{inquiryNo}</if>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="initiatorId != null "> and initiator_id = #{initiatorId}</if>
|
||||
<if test="initiatorName != null and initiatorName != ''"> and initiator_name like concat('%', #{initiatorName}, '%')</if>
|
||||
<if test="initiateDate != null "> and initiate_date = #{initiateDate}</if>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="specs != null and specs != ''"> and specs = #{specs}</if>
|
||||
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
|
||||
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
|
||||
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||||
<if test="totalPrice != null "> and total_price = #{totalPrice}</if>
|
||||
<if test="deliveryTime != null "> and delivery_time = #{deliveryTime}</if>
|
||||
<if test="paymentTerms != null and paymentTerms != ''"> and payment_terms = #{paymentTerms}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInquiryQuotationById" parameterType="Long" resultMap="InquiryQuotationResult">
|
||||
<include refid="selectInquiryQuotationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInquiryQuotation" parameterType="com.ktg.mes.cg.domain.InquiryQuotation">
|
||||
insert into inquiry_quotation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="inquiryNo != null">inquiry_no,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="initiatorId != null">initiator_id,</if>
|
||||
<if test="initiatorName != null">initiator_name,</if>
|
||||
<if test="initiateDate != null">initiate_date,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="specs != null">specs,</if>
|
||||
<if test="vendorId != null">vendor_id,</if>
|
||||
<if test="vendorName != null">vendor_name,</if>
|
||||
<if test="unitPrice != null">unit_price,</if>
|
||||
<if test="totalPrice != null">total_price,</if>
|
||||
<if test="deliveryTime != null">delivery_time,</if>
|
||||
<if test="paymentTerms != null">payment_terms,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="inquiryNo != null">#{inquiryNo},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="initiatorId != null">#{initiatorId},</if>
|
||||
<if test="initiatorName != null">#{initiatorName},</if>
|
||||
<if test="initiateDate != null">#{initiateDate},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="specs != null">#{specs},</if>
|
||||
<if test="vendorId != null">#{vendorId},</if>
|
||||
<if test="vendorName != null">#{vendorName},</if>
|
||||
<if test="unitPrice != null">#{unitPrice},</if>
|
||||
<if test="totalPrice != null">#{totalPrice},</if>
|
||||
<if test="deliveryTime != null">#{deliveryTime},</if>
|
||||
<if test="paymentTerms != null">#{paymentTerms},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInquiryQuotation" parameterType="com.ktg.mes.cg.domain.InquiryQuotation">
|
||||
update inquiry_quotation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="inquiryNo != null">inquiry_no = #{inquiryNo},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="initiatorId != null">initiator_id = #{initiatorId},</if>
|
||||
<if test="initiatorName != null">initiator_name = #{initiatorName},</if>
|
||||
<if test="initiateDate != null">initiate_date = #{initiateDate},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="specs != null">specs = #{specs},</if>
|
||||
<if test="vendorId != null">vendor_id = #{vendorId},</if>
|
||||
<if test="vendorName != null">vendor_name = #{vendorName},</if>
|
||||
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||||
<if test="totalPrice != null">total_price = #{totalPrice},</if>
|
||||
<if test="deliveryTime != null">delivery_time = #{deliveryTime},</if>
|
||||
<if test="paymentTerms != null">payment_terms = #{paymentTerms},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInquiryQuotationById" parameterType="Long">
|
||||
delete from inquiry_quotation where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInquiryQuotationByIds" parameterType="String">
|
||||
delete from inquiry_quotation where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
166
ktg-mes/src/main/resources/mapper/cg/ProcurementPlanMapper.xml
Normal file
166
ktg-mes/src/main/resources/mapper/cg/ProcurementPlanMapper.xml
Normal file
@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ktg.mes.cg.mapper.ProcurementPlanMapper">
|
||||
|
||||
<resultMap type="com.ktg.mes.cg.domain.ProcurementPlan" id="ProcurementPlanResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="planNo" column="plan_no" />
|
||||
<result property="title" column="title" />
|
||||
<result property="initiatorId" column="initiator_id" />
|
||||
<result property="initiatorName" column="initiator_name" />
|
||||
<result property="initiateDate" column="initiate_date" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="specs" column="specs" />
|
||||
<result property="vendorId" column="vendor_id" />
|
||||
<result property="vendorName" column="vendor_name" />
|
||||
<result property="unitPrice" column="unit_price" />
|
||||
<result property="totalPrice" column="total_price" />
|
||||
<result property="deliveryTime" column="delivery_time" />
|
||||
<result property="paymentTerms" column="payment_terms" />
|
||||
<result property="budgetAmount" column="budget_amount" />
|
||||
<result property="actualAmount" column="actual_amount" />
|
||||
<result property="approverId" column="approver_id" />
|
||||
<result property="approverName" column="approver_name" />
|
||||
<result property="approvalDate" column="approval_date" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remarks" column="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProcurementPlanVo">
|
||||
select id, plan_no, title, initiator_id, initiator_name, initiate_date, material_id, material_name, quantity, unit, specs, vendor_id, vendor_name, unit_price, total_price, delivery_time, payment_terms, budget_amount, actual_amount, approver_id, approver_name, approval_date, status, remarks from procurement_plan
|
||||
</sql>
|
||||
|
||||
<select id="selectProcurementPlanList" parameterType="com.ktg.mes.cg.domain.ProcurementPlan" resultMap="ProcurementPlanResult">
|
||||
<include refid="selectProcurementPlanVo"/>
|
||||
<where>
|
||||
<if test="planNo != null and planNo != ''"> and plan_no = #{planNo}</if>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="initiatorId != null "> and initiator_id = #{initiatorId}</if>
|
||||
<if test="initiatorName != null and initiatorName != ''"> and initiator_name like concat('%', #{initiatorName}, '%')</if>
|
||||
<if test="initiateDate != null "> and initiate_date = #{initiateDate}</if>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="specs != null and specs != ''"> and specs = #{specs}</if>
|
||||
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
|
||||
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
|
||||
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||||
<if test="totalPrice != null "> and total_price = #{totalPrice}</if>
|
||||
<if test="deliveryTime != null "> and delivery_time = #{deliveryTime}</if>
|
||||
<if test="paymentTerms != null and paymentTerms != ''"> and payment_terms = #{paymentTerms}</if>
|
||||
<if test="budgetAmount != null and budgetAmount != ''"> and budget_amount = #{budgetAmount}</if>
|
||||
<if test="actualAmount != null and actualAmount != ''"> and actual_amount = #{actualAmount}</if>
|
||||
<if test="approverId != null "> and approver_id = #{approverId}</if>
|
||||
<if test="approverName != null and approverName != ''"> and approver_name like concat('%', #{approverName}, '%')</if>
|
||||
<if test="approvalDate != null "> and approval_date = #{approvalDate}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProcurementPlanById" parameterType="Long" resultMap="ProcurementPlanResult">
|
||||
<include refid="selectProcurementPlanVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProcurementPlan" parameterType="com.ktg.mes.cg.domain.ProcurementPlan" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into procurement_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planNo != null">plan_no,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="initiatorId != null">initiator_id,</if>
|
||||
<if test="initiatorName != null">initiator_name,</if>
|
||||
<if test="initiateDate != null">initiate_date,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="specs != null">specs,</if>
|
||||
<if test="vendorId != null">vendor_id,</if>
|
||||
<if test="vendorName != null">vendor_name,</if>
|
||||
<if test="unitPrice != null">unit_price,</if>
|
||||
<if test="totalPrice != null">total_price,</if>
|
||||
<if test="deliveryTime != null">delivery_time,</if>
|
||||
<if test="paymentTerms != null">payment_terms,</if>
|
||||
<if test="budgetAmount != null">budget_amount,</if>
|
||||
<if test="actualAmount != null">actual_amount,</if>
|
||||
<if test="approverId != null">approver_id,</if>
|
||||
<if test="approverName != null">approver_name,</if>
|
||||
<if test="approvalDate != null">approval_date,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planNo != null">#{planNo},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="initiatorId != null">#{initiatorId},</if>
|
||||
<if test="initiatorName != null">#{initiatorName},</if>
|
||||
<if test="initiateDate != null">#{initiateDate},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="specs != null">#{specs},</if>
|
||||
<if test="vendorId != null">#{vendorId},</if>
|
||||
<if test="vendorName != null">#{vendorName},</if>
|
||||
<if test="unitPrice != null">#{unitPrice},</if>
|
||||
<if test="totalPrice != null">#{totalPrice},</if>
|
||||
<if test="deliveryTime != null">#{deliveryTime},</if>
|
||||
<if test="paymentTerms != null">#{paymentTerms},</if>
|
||||
<if test="budgetAmount != null">#{budgetAmount},</if>
|
||||
<if test="actualAmount != null">#{actualAmount},</if>
|
||||
<if test="approverId != null">#{approverId},</if>
|
||||
<if test="approverName != null">#{approverName},</if>
|
||||
<if test="approvalDate != null">#{approvalDate},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProcurementPlan" parameterType="com.ktg.mes.cg.domain.ProcurementPlan">
|
||||
update procurement_plan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planNo != null">plan_no = #{planNo},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="initiatorId != null">initiator_id = #{initiatorId},</if>
|
||||
<if test="initiatorName != null">initiator_name = #{initiatorName},</if>
|
||||
<if test="initiateDate != null">initiate_date = #{initiateDate},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="specs != null">specs = #{specs},</if>
|
||||
<if test="vendorId != null">vendor_id = #{vendorId},</if>
|
||||
<if test="vendorName != null">vendor_name = #{vendorName},</if>
|
||||
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||||
<if test="totalPrice != null">total_price = #{totalPrice},</if>
|
||||
<if test="deliveryTime != null">delivery_time = #{deliveryTime},</if>
|
||||
<if test="paymentTerms != null">payment_terms = #{paymentTerms},</if>
|
||||
<if test="budgetAmount != null">budget_amount = #{budgetAmount},</if>
|
||||
<if test="actualAmount != null">actual_amount = #{actualAmount},</if>
|
||||
<if test="approverId != null">approver_id = #{approverId},</if>
|
||||
<if test="approverName != null">approver_name = #{approverName},</if>
|
||||
<if test="approvalDate != null">approval_date = #{approvalDate},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProcurementPlanById" parameterType="Long">
|
||||
delete from procurement_plan where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProcurementPlanByIds" parameterType="String">
|
||||
delete from procurement_plan where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
196
ktg-mes/src/main/resources/mapper/cg/PurchaseOrderMapper.xml
Normal file
196
ktg-mes/src/main/resources/mapper/cg/PurchaseOrderMapper.xml
Normal file
@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ktg.mes.md.mapper.PurchaseOrderMapper">
|
||||
|
||||
<resultMap type="PurchaseOrder" id="PurchaseOrderResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderNo" column="order_no" />
|
||||
<result property="title" column="title" />
|
||||
<result property="vendorId" column="vendor_id" />
|
||||
<result property="vendorName" column="vendor_name" />
|
||||
<result property="vendorContact" column="vendor_contact" />
|
||||
<result property="vendorPhone" column="vendor_phone" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="specs" column="specs" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="unitPrice" column="unit_price" />
|
||||
<result property="orderAmount" column="order_amount" />
|
||||
<result property="tax" column="tax" />
|
||||
<result property="totalAmount" column="total_amount" />
|
||||
<result property="paymentTerms" column="payment_terms" />
|
||||
<result property="paymentStatus" column="payment_status" />
|
||||
<result property="deliveryAddress" column="delivery_address" />
|
||||
<result property="expectedDeliveryDate" column="expected_delivery_date" />
|
||||
<result property="actualDeliveryDate" column="actual_delivery_date" />
|
||||
<result property="shippingMethod" column="shipping_method" />
|
||||
<result property="shippingCost" column="shipping_cost" />
|
||||
<result property="status" column="status" />
|
||||
<result property="initiatorId" column="initiator_id" />
|
||||
<result property="initiateDate" column="initiate_date" />
|
||||
<result property="approverId" column="approver_id" />
|
||||
<result property="approvalDate" column="approval_date" />
|
||||
<result property="remarks" column="remarks" />
|
||||
<result property="createdDate" column="created_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPurchaseOrderVo">
|
||||
select id, order_no, title, vendor_id, vendor_name, vendor_contact, vendor_phone, material_id, material_name, specs, unit, quantity, unit_price, order_amount, tax, total_amount, payment_terms, payment_status, delivery_address, expected_delivery_date, actual_delivery_date, shipping_method, shipping_cost, status, initiator_id, initiate_date, approver_id, approval_date, remarks, created_date from purchase_order
|
||||
</sql>
|
||||
|
||||
<select id="selectPurchaseOrderList" parameterType="PurchaseOrder" resultMap="PurchaseOrderResult">
|
||||
<include refid="selectPurchaseOrderVo"/>
|
||||
<where>
|
||||
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="vendorId != null "> and vendor_id = #{vendorId}</if>
|
||||
<if test="vendorName != null and vendorName != ''"> and vendor_name like concat('%', #{vendorName}, '%')</if>
|
||||
<if test="vendorContact != null and vendorContact != ''"> and vendor_contact = #{vendorContact}</if>
|
||||
<if test="vendorPhone != null and vendorPhone != ''"> and vendor_phone = #{vendorPhone}</if>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="specs != null and specs != ''"> and specs = #{specs}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||||
<if test="orderAmount != null "> and order_amount = #{orderAmount}</if>
|
||||
<if test="tax != null "> and tax = #{tax}</if>
|
||||
<if test="totalAmount != null "> and total_amount = #{totalAmount}</if>
|
||||
<if test="paymentTerms != null and paymentTerms != ''"> and payment_terms = #{paymentTerms}</if>
|
||||
<if test="paymentStatus != null and paymentStatus != ''"> and payment_status = #{paymentStatus}</if>
|
||||
<if test="deliveryAddress != null and deliveryAddress != ''"> and delivery_address = #{deliveryAddress}</if>
|
||||
<if test="expectedDeliveryDate != null "> and expected_delivery_date = #{expectedDeliveryDate}</if>
|
||||
<if test="actualDeliveryDate != null "> and actual_delivery_date = #{actualDeliveryDate}</if>
|
||||
<if test="shippingMethod != null and shippingMethod != ''"> and shipping_method = #{shippingMethod}</if>
|
||||
<if test="shippingCost != null "> and shipping_cost = #{shippingCost}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="initiatorId != null "> and initiator_id = #{initiatorId}</if>
|
||||
<if test="initiateDate != null "> and initiate_date = #{initiateDate}</if>
|
||||
<if test="approverId != null "> and approver_id = #{approverId}</if>
|
||||
<if test="approvalDate != null "> and approval_date = #{approvalDate}</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
||||
<if test="createdDate != null "> and created_date = #{createdDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPurchaseOrderById" parameterType="Long" resultMap="PurchaseOrderResult">
|
||||
<include refid="selectPurchaseOrderVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPurchaseOrder" parameterType="PurchaseOrder" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into purchase_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNo != null">order_no,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="vendorId != null">vendor_id,</if>
|
||||
<if test="vendorName != null">vendor_name,</if>
|
||||
<if test="vendorContact != null">vendor_contact,</if>
|
||||
<if test="vendorPhone != null">vendor_phone,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="specs != null">specs,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="unitPrice != null">unit_price,</if>
|
||||
<if test="orderAmount != null">order_amount,</if>
|
||||
<if test="tax != null">tax,</if>
|
||||
<if test="totalAmount != null">total_amount,</if>
|
||||
<if test="paymentTerms != null">payment_terms,</if>
|
||||
<if test="paymentStatus != null">payment_status,</if>
|
||||
<if test="deliveryAddress != null">delivery_address,</if>
|
||||
<if test="expectedDeliveryDate != null">expected_delivery_date,</if>
|
||||
<if test="actualDeliveryDate != null">actual_delivery_date,</if>
|
||||
<if test="shippingMethod != null">shipping_method,</if>
|
||||
<if test="shippingCost != null">shipping_cost,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="initiatorId != null">initiator_id,</if>
|
||||
<if test="initiateDate != null">initiate_date,</if>
|
||||
<if test="approverId != null">approver_id,</if>
|
||||
<if test="approvalDate != null">approval_date,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
<if test="createdDate != null">created_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNo != null">#{orderNo},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="vendorId != null">#{vendorId},</if>
|
||||
<if test="vendorName != null">#{vendorName},</if>
|
||||
<if test="vendorContact != null">#{vendorContact},</if>
|
||||
<if test="vendorPhone != null">#{vendorPhone},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="specs != null">#{specs},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="unitPrice != null">#{unitPrice},</if>
|
||||
<if test="orderAmount != null">#{orderAmount},</if>
|
||||
<if test="tax != null">#{tax},</if>
|
||||
<if test="totalAmount != null">#{totalAmount},</if>
|
||||
<if test="paymentTerms != null">#{paymentTerms},</if>
|
||||
<if test="paymentStatus != null">#{paymentStatus},</if>
|
||||
<if test="deliveryAddress != null">#{deliveryAddress},</if>
|
||||
<if test="expectedDeliveryDate != null">#{expectedDeliveryDate},</if>
|
||||
<if test="actualDeliveryDate != null">#{actualDeliveryDate},</if>
|
||||
<if test="shippingMethod != null">#{shippingMethod},</if>
|
||||
<if test="shippingCost != null">#{shippingCost},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="initiatorId != null">#{initiatorId},</if>
|
||||
<if test="initiateDate != null">#{initiateDate},</if>
|
||||
<if test="approverId != null">#{approverId},</if>
|
||||
<if test="approvalDate != null">#{approvalDate},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
<if test="createdDate != null">#{createdDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePurchaseOrder" parameterType="PurchaseOrder">
|
||||
update purchase_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderNo != null">order_no = #{orderNo},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="vendorId != null">vendor_id = #{vendorId},</if>
|
||||
<if test="vendorName != null">vendor_name = #{vendorName},</if>
|
||||
<if test="vendorContact != null">vendor_contact = #{vendorContact},</if>
|
||||
<if test="vendorPhone != null">vendor_phone = #{vendorPhone},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="specs != null">specs = #{specs},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||||
<if test="orderAmount != null">order_amount = #{orderAmount},</if>
|
||||
<if test="tax != null">tax = #{tax},</if>
|
||||
<if test="totalAmount != null">total_amount = #{totalAmount},</if>
|
||||
<if test="paymentTerms != null">payment_terms = #{paymentTerms},</if>
|
||||
<if test="paymentStatus != null">payment_status = #{paymentStatus},</if>
|
||||
<if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
|
||||
<if test="expectedDeliveryDate != null">expected_delivery_date = #{expectedDeliveryDate},</if>
|
||||
<if test="actualDeliveryDate != null">actual_delivery_date = #{actualDeliveryDate},</if>
|
||||
<if test="shippingMethod != null">shipping_method = #{shippingMethod},</if>
|
||||
<if test="shippingCost != null">shipping_cost = #{shippingCost},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="initiatorId != null">initiator_id = #{initiatorId},</if>
|
||||
<if test="initiateDate != null">initiate_date = #{initiateDate},</if>
|
||||
<if test="approverId != null">approver_id = #{approverId},</if>
|
||||
<if test="approvalDate != null">approval_date = #{approvalDate},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
<if test="createdDate != null">created_date = #{createdDate},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePurchaseOrderById" parameterType="Long">
|
||||
delete from purchase_order where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePurchaseOrderByIds" parameterType="String">
|
||||
delete from purchase_order where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user