From 580766f56c88555652c3a626482bf710eebe74e4 Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Thu, 5 Sep 2024 18:20:59 +0800 Subject: [PATCH] =?UTF-8?q?[feat]:=20=E6=96=B0=E5=A2=9E=EF=BC=9A=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E6=8A=A5=E4=BB=B7=E5=8E=86=E5=8F=B2=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=EF=BC=8Cmapper=E5=B1=82=EF=BC=8Cser?= =?UTF-8?q?vice=E5=B1=82=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchaseQuoteHistoryController.java | 151 ++++++++ .../purchase/domain/PurchaseQuoteHistory.java | 323 ++++++++++++++++++ .../mapper/PurchaseQuoteHistoryMapper.java | 77 +++++ .../service/IPurchaseQuoteHistoryService.java | 75 ++++ .../impl/PurchaseQuoteHistoryServiceImpl.java | 126 +++++++ .../purchase/PurchaseQuoteHistoryMapper.xml | 180 ++++++++++ .../purchase/purchaseQuoteHistory/add.html | 162 +++++++++ .../purchaseQuoteHistory.html | 109 ++++++ 8 files changed, 1203 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteHistoryController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteHistory.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteHistoryMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteHistoryService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteHistoryServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteHistoryMapper.xml create mode 100644 ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteHistory/add.html create mode 100644 ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteHistory/purchaseQuoteHistory.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteHistoryController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteHistoryController.java new file mode 100644 index 00000000..b53fa846 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteHistoryController.java @@ -0,0 +1,151 @@ +package com.ruoyi.purchase.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.purchase.domain.PurchaseQuoteHistory; +import com.ruoyi.purchase.service.IPurchaseQuoteHistoryService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 采购物料历史报价信息Controller + * + * @author zhang + * @date 2024-08-28 + */ +@Controller +@RequestMapping("/purchaseQuoteHistory/purchaseQuoteHistory") +public class PurchaseQuoteHistoryController extends BaseController +{ + private String prefix = "purchaseQuoteHistory/purchaseQuoteHistory"; + + @Autowired + private IPurchaseQuoteHistoryService purchaseQuoteHistoryService; + + @RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:view") + @GetMapping() + public String purchaseQuoteHistory() + { + return prefix + "/purchaseQuoteHistory"; + } + + /** + * 查询采购物料历史报价信息列表 + */ + @RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(PurchaseQuoteHistory purchaseQuoteHistory) + { + startPage(); + List list = purchaseQuoteHistoryService.selectPurchaseQuoteHistoryList(purchaseQuoteHistory); + return getDataTable(list); + } + + /** + * 导出采购物料历史报价信息列表 + */ + @RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:export") + @Log(title = "采购物料历史报价信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(PurchaseQuoteHistory purchaseQuoteHistory) + { + List list = purchaseQuoteHistoryService.selectPurchaseQuoteHistoryList(purchaseQuoteHistory); + ExcelUtil util = new ExcelUtil(PurchaseQuoteHistory.class); + return util.exportExcel(list, "采购物料历史报价信息数据"); + } + + /** + * 新增采购物料历史报价信息 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存采购物料历史报价信息 + */ + @RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:add") + @Log(title = "采购物料历史报价信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(PurchaseQuoteHistory purchaseQuoteHistory) + { + return toAjax(purchaseQuoteHistoryService.insertPurchaseQuoteHistory(purchaseQuoteHistory)); + } + + /** + * 修改采购物料历史报价信息 + */ + @GetMapping("/edit/{purchaseQuoteChildId}") + public String edit(@PathVariable("purchaseQuoteChildId") Long purchaseQuoteChildId, ModelMap mmap) + { + PurchaseQuoteHistory purchaseQuoteHistory = purchaseQuoteHistoryService.selectPurchaseQuoteHistoryById(purchaseQuoteChildId); + mmap.put("purchaseQuoteHistory", purchaseQuoteHistory); + return prefix + "/edit"; + } + + /** + * 修改保存采购物料历史报价信息 + */ + @RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:edit") + @Log(title = "采购物料历史报价信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(PurchaseQuoteHistory purchaseQuoteHistory) + { + return toAjax(purchaseQuoteHistoryService.updatePurchaseQuoteHistory(purchaseQuoteHistory)); + } + + /** + * 删除采购物料历史报价信息 + */ + @RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:remove") + @Log(title = "采购物料历史报价信息", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(purchaseQuoteHistoryService.deletePurchaseQuoteHistoryByIds(ids)); + } + + /** + * 作废采购物料历史报价信息 + */ + @RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:cancel") + @Log(title = "采购物料历史报价信息", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(purchaseQuoteHistoryService.cancelPurchaseQuoteHistoryById(id)); + } + + /** + * 恢复采购物料历史报价信息 + */ + @RequiresPermissions("purchaseQuoteHistory:purchaseQuoteHistory:restore") + @Log(title = "采购物料历史报价信息", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(purchaseQuoteHistoryService.restorePurchaseQuoteHistoryById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteHistory.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteHistory.java new file mode 100644 index 00000000..9b634fe2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteHistory.java @@ -0,0 +1,323 @@ +package com.ruoyi.purchase.domain; + +import java.math.BigDecimal; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 采购物料历史报价信息对象 purchase_quote_history + * + * @author zhang + * @date 2024-08-28 + */ +public class PurchaseQuoteHistory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 采购报价历史id */ + @Excel(name = "采购报价历史id") + private Long purchaseQuoteChildId; + + /** 关联报价编号字段 */ + @Excel(name = "关联报价编号字段") + private String purchaseQuoteCode; + + /** 物料表中的id */ + @Excel(name = "物料表中的id") + private Long materialId; + + /** 物料表中的编号 */ + @Excel(name = "物料表中的编号") + private String materialCode; + + /** 物料的名称 */ + @Excel(name = "物料的名称") + private String materialName; + + /** 物料的类型 */ + @Excel(name = "物料的类型") + private String materialType; + + /** 物料的加工方式 */ + @Excel(name = "物料的加工方式") + private String processMethod; + + /** 物料的品牌 */ + @Excel(name = "物料的品牌") + private String brand; + + /** 物料的图片 */ + @Excel(name = "物料的图片") + private String photoUrl; + + /** 物料的描述 */ + @Excel(name = "物料的描述") + private String describe; + + /** 国内税率 */ + @Excel(name = "国内税率") + private BigDecimal taxRate; + + /** 美元汇率 */ + @Excel(name = "美元汇率") + private BigDecimal usdRate; + + /** 物料的数量 */ + @Excel(name = "物料的数量") + private BigDecimal materialNum; + + /** 物料的对外报价 */ + @Excel(name = "物料的对外报价") + private Long materialSole; + + /** 物料的不含税单价(RMB) */ + @Excel(name = "物料的不含税单价(RMB)") + private BigDecimal materialRmb; + + /** 物料的含税单价(RMB) */ + @Excel(name = "物料的含税单价(RMB)") + private BigDecimal materialNormb; + + /** 供应商编号 */ + @Excel(name = "供应商编号") + private String supplierCode; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + /** 删除状态 */ + @Excel(name = "删除状态") + private String useStatus; + + /** 审核状态 */ + @Excel(name = "审核状态") + private String auditStatus; + + /** 删除标志 */ + private String delFlag; + + public void setPurchaseQuoteChildId(Long purchaseQuoteChildId) + { + this.purchaseQuoteChildId = purchaseQuoteChildId; + } + + public Long getPurchaseQuoteChildId() + { + return purchaseQuoteChildId; + } + public void setPurchaseQuoteCode(String purchaseQuoteCode) + { + this.purchaseQuoteCode = purchaseQuoteCode; + } + + public String getPurchaseQuoteCode() + { + return purchaseQuoteCode; + } + public void setMaterialId(Long materialId) + { + this.materialId = materialId; + } + + public Long getMaterialId() + { + return materialId; + } + public void setMaterialCode(String materialCode) + { + this.materialCode = materialCode; + } + + public String getMaterialCode() + { + return materialCode; + } + public void setMaterialName(String materialName) + { + this.materialName = materialName; + } + + public String getMaterialName() + { + return materialName; + } + public void setMaterialType(String materialType) + { + this.materialType = materialType; + } + + public String getMaterialType() + { + return materialType; + } + public void setProcessMethod(String processMethod) + { + this.processMethod = processMethod; + } + + public String getProcessMethod() + { + return processMethod; + } + public void setBrand(String brand) + { + this.brand = brand; + } + + public String getBrand() + { + return brand; + } + public void setPhotoUrl(String photoUrl) + { + this.photoUrl = photoUrl; + } + + public String getPhotoUrl() + { + return photoUrl; + } + public void setDescribe(String describe) + { + this.describe = describe; + } + + public String getDescribe() + { + return describe; + } + public void setTaxRate(BigDecimal taxRate) + { + this.taxRate = taxRate; + } + + public BigDecimal getTaxRate() + { + return taxRate; + } + public void setUsdRate(BigDecimal usdRate) + { + this.usdRate = usdRate; + } + + public BigDecimal getUsdRate() + { + return usdRate; + } + public void setMaterialNum(BigDecimal materialNum) + { + this.materialNum = materialNum; + } + + public BigDecimal getMaterialNum() + { + return materialNum; + } + public void setMaterialSole(Long materialSole) + { + this.materialSole = materialSole; + } + + public Long getMaterialSole() + { + return materialSole; + } + public void setMaterialRmb(BigDecimal materialRmb) + { + this.materialRmb = materialRmb; + } + + public BigDecimal getMaterialRmb() + { + return materialRmb; + } + public void setMaterialNormb(BigDecimal materialNormb) + { + this.materialNormb = materialNormb; + } + + public BigDecimal getMaterialNormb() + { + return materialNormb; + } + public void setSupplierCode(String supplierCode) + { + this.supplierCode = supplierCode; + } + + public String getSupplierCode() + { + return supplierCode; + } + public void setSupplierName(String supplierName) + { + this.supplierName = supplierName; + } + + public String getSupplierName() + { + return supplierName; + } + public void setUseStatus(String useStatus) + { + this.useStatus = useStatus; + } + + public String getUseStatus() + { + return useStatus; + } + public void setAuditStatus(String auditStatus) + { + this.auditStatus = auditStatus; + } + + public String getAuditStatus() + { + return auditStatus; + } + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getDelFlag() + { + return delFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("purchaseQuoteChildId", getPurchaseQuoteChildId()) + .append("purchaseQuoteCode", getPurchaseQuoteCode()) + .append("materialId", getMaterialId()) + .append("materialCode", getMaterialCode()) + .append("materialName", getMaterialName()) + .append("materialType", getMaterialType()) + .append("processMethod", getProcessMethod()) + .append("brand", getBrand()) + .append("photoUrl", getPhotoUrl()) + .append("describe", getDescribe()) + .append("taxRate", getTaxRate()) + .append("usdRate", getUsdRate()) + .append("materialNum", getMaterialNum()) + .append("materialSole", getMaterialSole()) + .append("materialRmb", getMaterialRmb()) + .append("materialNormb", getMaterialNormb()) + .append("supplierCode", getSupplierCode()) + .append("supplierName", getSupplierName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("useStatus", getUseStatus()) + .append("auditStatus", getAuditStatus()) + .append("delFlag", getDelFlag()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteHistoryMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteHistoryMapper.java new file mode 100644 index 00000000..3fca392b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteHistoryMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.purchase.mapper; + +import java.util.List; +import com.ruoyi.purchase.domain.PurchaseQuoteHistory; + +/** + * 采购物料历史报价信息Mapper接口 + * + * @author zhang + * @date 2024-08-28 + */ +public interface PurchaseQuoteHistoryMapper +{ + /** + * 查询采购物料历史报价信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 采购物料历史报价信息 + */ + public PurchaseQuoteHistory selectPurchaseQuoteHistoryById(Long purchaseQuoteChildId); + + /** + * 查询采购物料历史报价信息列表 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 采购物料历史报价信息集合 + */ + public List selectPurchaseQuoteHistoryList(PurchaseQuoteHistory purchaseQuoteHistory); + + /** + * 新增采购物料历史报价信息 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 结果 + */ + public int insertPurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory); + + /** + * 修改采购物料历史报价信息 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 结果 + */ + public int updatePurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory); + + /** + * 删除采购物料历史报价信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 结果 + */ + public int deletePurchaseQuoteHistoryById(Long purchaseQuoteChildId); + + /** + * 批量删除采购物料历史报价信息 + * + * @param purchaseQuoteChildIds 需要删除的数据ID + * @return 结果 + */ + public int deletePurchaseQuoteHistoryByIds(String[] purchaseQuoteChildIds); + + /** + * 作废采购物料历史报价信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 结果 + */ + public int cancelPurchaseQuoteHistoryById(Long purchaseQuoteChildId); + + /** + * 恢复采购物料历史报价信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 结果 + */ + public int restorePurchaseQuoteHistoryById(Long purchaseQuoteChildId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteHistoryService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteHistoryService.java new file mode 100644 index 00000000..9b1a871b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteHistoryService.java @@ -0,0 +1,75 @@ +package com.ruoyi.purchase.service; + +import java.util.List; +import com.ruoyi.purchase.domain.PurchaseQuoteHistory; + +/** + * 采购物料历史报价信息Service接口 + * + * @author zhang + * @date 2024-08-28 + */ +public interface IPurchaseQuoteHistoryService +{ + /** + * 查询采购物料历史报价信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 采购物料历史报价信息 + */ + public PurchaseQuoteHistory selectPurchaseQuoteHistoryById(Long purchaseQuoteChildId); + + /** + * 查询采购物料历史报价信息列表 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 采购物料历史报价信息集合 + */ + public List selectPurchaseQuoteHistoryList(PurchaseQuoteHistory purchaseQuoteHistory); + + /** + * 新增采购物料历史报价信息 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 结果 + */ + public int insertPurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory); + + /** + * 修改采购物料历史报价信息 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 结果 + */ + public int updatePurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory); + + /** + * 批量删除采购物料历史报价信息 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deletePurchaseQuoteHistoryByIds(String ids); + + /** + * 删除采购物料历史报价信息信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 结果 + */ + public int deletePurchaseQuoteHistoryById(Long purchaseQuoteChildId); + + /** + * 作废采购物料历史报价信息 + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return + */ + int cancelPurchaseQuoteHistoryById(Long purchaseQuoteChildId); + + /** + * 恢复采购物料历史报价信息 + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return + */ + int restorePurchaseQuoteHistoryById(Long purchaseQuoteChildId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteHistoryServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteHistoryServiceImpl.java new file mode 100644 index 00000000..9320e743 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteHistoryServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.purchase.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.purchase.mapper.PurchaseQuoteHistoryMapper; +import com.ruoyi.purchase.domain.PurchaseQuoteHistory; +import com.ruoyi.purchase.service.IPurchaseQuoteHistoryService; +import com.ruoyi.common.core.text.Convert; + +/** + * 采购物料历史报价信息Service业务层处理 + * + * @author zhang + * @date 2024-08-28 + */ +@Service +public class PurchaseQuoteHistoryServiceImpl implements IPurchaseQuoteHistoryService +{ + @Autowired + private PurchaseQuoteHistoryMapper purchaseQuoteHistoryMapper; + + /** + * 查询采购物料历史报价信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 采购物料历史报价信息 + */ + @Override + public PurchaseQuoteHistory selectPurchaseQuoteHistoryById(Long purchaseQuoteChildId) + { + return purchaseQuoteHistoryMapper.selectPurchaseQuoteHistoryById(purchaseQuoteChildId); + } + + /** + * 查询采购物料历史报价信息列表 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 采购物料历史报价信息 + */ + @Override + public List selectPurchaseQuoteHistoryList(PurchaseQuoteHistory purchaseQuoteHistory) + { + return purchaseQuoteHistoryMapper.selectPurchaseQuoteHistoryList(purchaseQuoteHistory); + } + + /** + * 新增采购物料历史报价信息 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 结果 + */ + @Override + public int insertPurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory) + { + String loginName = ShiroUtils.getLoginName(); + purchaseQuoteHistory.setCreateBy(loginName); + purchaseQuoteHistory.setCreateTime(DateUtils.getNowDate()); + return purchaseQuoteHistoryMapper.insertPurchaseQuoteHistory(purchaseQuoteHistory); + } + + /** + * 修改采购物料历史报价信息 + * + * @param purchaseQuoteHistory 采购物料历史报价信息 + * @return 结果 + */ + @Override + public int updatePurchaseQuoteHistory(PurchaseQuoteHistory purchaseQuoteHistory) + { + String loginName = ShiroUtils.getLoginName(); + purchaseQuoteHistory.setUpdateBy(loginName); + purchaseQuoteHistory.setUpdateTime(DateUtils.getNowDate()); + return purchaseQuoteHistoryMapper.updatePurchaseQuoteHistory(purchaseQuoteHistory); + } + + /** + * 删除采购物料历史报价信息对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deletePurchaseQuoteHistoryByIds(String ids) + { + return purchaseQuoteHistoryMapper.deletePurchaseQuoteHistoryByIds(Convert.toStrArray(ids)); + } + + /** + * 删除采购物料历史报价信息信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 结果 + */ + @Override + public int deletePurchaseQuoteHistoryById(Long purchaseQuoteChildId) + { + return purchaseQuoteHistoryMapper.deletePurchaseQuoteHistoryById(purchaseQuoteChildId); + } + + /** + * 作废采购物料历史报价信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 结果 + */ + @Override + public int cancelPurchaseQuoteHistoryById(Long purchaseQuoteChildId) + { + return purchaseQuoteHistoryMapper.cancelPurchaseQuoteHistoryById(purchaseQuoteChildId); + } + + /** + * 恢复采购物料历史报价信息信息 + * + * @param purchaseQuoteChildId 采购物料历史报价信息ID + * @return 结果 + */ + @Override + public int restorePurchaseQuoteHistoryById(Long purchaseQuoteChildId) + { + return purchaseQuoteHistoryMapper.restorePurchaseQuoteHistoryById(purchaseQuoteChildId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteHistoryMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteHistoryMapper.xml new file mode 100644 index 00000000..a899c8d2 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteHistoryMapper.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select purchase_quote_child_id, purchase_quote_code, material_id, material_code, material_name, material_type, processMethod, brand, photoUrl, describe, tax_rate, usd_rate, material_num, material_sole, material_rmb, material_noRmb, supplier_code, supplier_name, create_by, create_time, update_by, update_time, remark, use_status, audit_status, del_flag from purchase_quote_history + + + + + + + + insert into purchase_quote_history + + purchase_quote_code, + material_id, + material_code, + material_name, + material_type, + processMethod, + brand, + photoUrl, + describe, + tax_rate, + usd_rate, + material_num, + material_sole, + material_rmb, + material_noRmb, + supplier_code, + supplier_name, + create_by, + create_time, + update_by, + update_time, + remark, + use_status, + audit_status, + del_flag, + + + #{purchaseQuoteCode}, + #{materialId}, + #{materialCode}, + #{materialName}, + #{materialType}, + #{processMethod}, + #{brand}, + #{photoUrl}, + #{describe}, + #{taxRate}, + #{usdRate}, + #{materialNum}, + #{materialSole}, + #{materialRmb}, + #{materialNormb}, + #{supplierCode}, + #{supplierName}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{useStatus}, + #{auditStatus}, + #{delFlag}, + + + + + update purchase_quote_history + + purchase_quote_code = #{purchaseQuoteCode}, + material_id = #{materialId}, + material_code = #{materialCode}, + material_name = #{materialName}, + material_type = #{materialType}, + processMethod = #{processMethod}, + brand = #{brand}, + photoUrl = #{photoUrl}, + describe = #{describe}, + tax_rate = #{taxRate}, + usd_rate = #{usdRate}, + material_num = #{materialNum}, + material_sole = #{materialSole}, + material_rmb = #{materialRmb}, + material_noRmb = #{materialNormb}, + supplier_code = #{supplierCode}, + supplier_name = #{supplierName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + use_status = #{useStatus}, + audit_status = #{auditStatus}, + del_flag = #{delFlag}, + + where purchase_quote_child_id = #{purchaseQuoteChildId} + + + + delete from purchase_quote_history where purchase_quote_child_id = #{purchaseQuoteChildId} + + + + delete from purchase_quote_history where purchase_quote_child_id in + + #{purchaseQuoteChildId} + + + + + update purchase_quote_history set del_flag = '1' where purchase_quote_child_id = #{purchaseQuoteChildId} + + + + update purchase_quote_history set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteHistory/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteHistory/add.html new file mode 100644 index 00000000..c2b16bd3 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteHistory/add.html @@ -0,0 +1,162 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteHistory/purchaseQuoteHistory.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteHistory/purchaseQuoteHistory.html new file mode 100644 index 00000000..1426e185 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuoteHistory/purchaseQuoteHistory.html @@ -0,0 +1,109 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ +
+ + + +
+
+
+
+
+
+ + + + \ No newline at end of file