diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateController.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateController.java index 8cf29911..8ee5958f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesEstimateController.java @@ -147,5 +147,10 @@ public class SalesEstimateController extends BaseController return toAjax(salesEstimateService.restoreSalesEstimateById(id)); } - + @RequestMapping("/getId") + @ResponseBody + public AjaxResult getId() + { + return AjaxResult.success(salesEstimateService.getId()); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SysSalesEstimateChildController.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SysSalesEstimateChildController.java new file mode 100644 index 00000000..53ec9ff9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SysSalesEstimateChildController.java @@ -0,0 +1,151 @@ +package com.ruoyi.sales.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.sales.domain.SysSalesEstimateChild; +import com.ruoyi.sales.service.ISysSalesEstimateChildService; +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-05-27 + */ +@Controller +@RequestMapping("/sales/EstimateChild") +public class SysSalesEstimateChildController extends BaseController +{ + private String prefix = "sales/EstimateChild"; + + @Autowired + private ISysSalesEstimateChildService sysSalesEstimateChildService; + + @RequiresPermissions("sales:EstimateChild:view") + @GetMapping() + public String EstimateChild() + { + return prefix + "/EstimateChild"; + } + + /** + * 查询销售物料估价列表 + */ + @RequiresPermissions("sales:EstimateChild:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysSalesEstimateChild sysSalesEstimateChild) + { + startPage(); + List list = sysSalesEstimateChildService.selectSysSalesEstimateChildList(sysSalesEstimateChild); + return getDataTable(list); + } + + /** + * 导出销售物料估价列表 + */ + @RequiresPermissions("sales:EstimateChild:export") + @Log(title = "销售物料估价", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysSalesEstimateChild sysSalesEstimateChild) + { + List list = sysSalesEstimateChildService.selectSysSalesEstimateChildList(sysSalesEstimateChild); + ExcelUtil util = new ExcelUtil(SysSalesEstimateChild.class); + return util.exportExcel(list, "销售物料估价数据"); + } + + /** + * 新增销售物料估价 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存销售物料估价 + */ + @RequiresPermissions("sales:EstimateChild:add") + @Log(title = "销售物料估价", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysSalesEstimateChild sysSalesEstimateChild) + { + return toAjax(sysSalesEstimateChildService.insertSysSalesEstimateChild(sysSalesEstimateChild)); + } + + /** + * 修改销售物料估价 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + SysSalesEstimateChild sysSalesEstimateChild = sysSalesEstimateChildService.selectSysSalesEstimateChildById(id); + mmap.put("sysSalesEstimateChild", sysSalesEstimateChild); + return prefix + "/edit"; + } + + /** + * 修改保存销售物料估价 + */ + @RequiresPermissions("sales:EstimateChild:edit") + @Log(title = "销售物料估价", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysSalesEstimateChild sysSalesEstimateChild) + { + return toAjax(sysSalesEstimateChildService.updateSysSalesEstimateChild(sysSalesEstimateChild)); + } + + /** + * 删除销售物料估价 + */ + @RequiresPermissions("sales:EstimateChild:remove") + @Log(title = "销售物料估价", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysSalesEstimateChildService.deleteSysSalesEstimateChildByIds(ids)); + } + + /** + * 作废销售物料估价 + */ + @RequiresPermissions("sales:EstimateChild:cancel") + @Log(title = "销售物料估价", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(sysSalesEstimateChildService.cancelSysSalesEstimateChildById(id)); + } + + /** + * 恢复销售物料估价 + */ + @RequiresPermissions("sales:EstimateChild:restore") + @Log(title = "销售物料估价", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(sysSalesEstimateChildService.restoreSysSalesEstimateChildById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesEstimate.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesEstimate.java index 7e18937a..2c218a5d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesEstimate.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SalesEstimate.java @@ -2,7 +2,8 @@ package com.ruoyi.sales.domain; import java.math.BigDecimal; import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.List; + import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -71,6 +72,8 @@ public class SalesEstimate extends BaseEntity /** 不含税总价(美元) */ @Excel(name = "不含税总价", readConverterExp = "美=元") private BigDecimal allPriceExcludingTaxDollar; + //估价日期 + private String pricingDate; /** 流程实例ID */ private String instanceId; @@ -96,6 +99,15 @@ public class SalesEstimate extends BaseEntity /** 流程恢复实例ID */ private String restoreInstanceId; + private List sysSalesEstimateChildList; + + public void setPricingDate(String pricingDate) { + this.pricingDate = pricingDate; + } + public String getPricingDate() { + return pricingDate ; + } + public void setAftersalesEstimateId(Long aftersalesEstimateId) { this.aftersalesEstimateId = aftersalesEstimateId; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SysSalesEstimateChild.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SysSalesEstimateChild.java new file mode 100644 index 00000000..5370c6d6 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/domain/SysSalesEstimateChild.java @@ -0,0 +1,450 @@ +package com.ruoyi.sales.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.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 销售物料估价对象 sys_sales_estimate_child + * + * @author zhang + * @date 2024-05-27 + */ +public class SysSalesEstimateChild extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 销售估价子表id */ + private Long id; + + /** 关联销售估价编号 */ + @Excel(name = "关联销售估价编号") + private String quoteId; + + /** 物料表中的id */ + @Excel(name = "物料表中的id") + private Long materialId; + + /** 物料表中的编号 */ + @Excel(name = "物料表中的编号") + private String materialCode; + + /** 物料的名称 */ + @Excel(name = "物料的名称") + private String materialName; + + /** 物料相关的BOM编号 */ + @Excel(name = "物料相关的BOM编号") + private String materialBom; + + /** 物料的类型 */ + @Excel(name = "物料的类型") + private String materialType; + + /** 物料的加工方式 */ + @Excel(name = "物料的加工方式") + private String processMethod; + + /** 物料的品牌 */ + @Excel(name = "物料的品牌") + private String brand; + + /** 物料的图片 */ + @Excel(name = "物料的图片") + private String photoUrl; + + /** 单位 */ + @Excel(name = "单位") + private String unit; + + /** 物料的描述 */ + @Excel(name = "物料的描述") + private String describe; + + /** 国内税率 */ + @Excel(name = "国内税率") + private BigDecimal countTax; + + /** 美元汇率 */ + @Excel(name = "美元汇率") + private BigDecimal usdTax; + + /** 物料的数量 */ + @Excel(name = "物料的数量") + private Long materialNum; + + /** 物料的对外报价 */ + @Excel(name = "物料的对外报价") + private BigDecimal materialSole; + + /** 物料的不含税单价(RMB) */ + @Excel(name = "物料的不含税单价(RMB)") + private BigDecimal materialRmb; + + /** 物料的含税单价(RMB) */ + @Excel(name = "物料的含税单价(RMB)") + private BigDecimal materialNoRmb; + + /** 物料的不含税总价(RMB) */ + @Excel(name = "物料的不含税总价(RMB)") + private Long materialRmbSum; + + /** 物料的含税总价(RMB) */ + @Excel(name = "物料的含税总价(RMB)") + private BigDecimal materialNoRmbSum; + + /** 物料的不含税单价(美元) */ + @Excel(name = "物料的不含税单价(美元)") + private BigDecimal materialNoUsd; + + /** 物料的含税单价(美元) */ + @Excel(name = "物料的含税单价(美元)") + private BigDecimal materialUsd; + + /** 物料的不含税总价(美元) */ + @Excel(name = "物料的不含税总价(美元)") + private BigDecimal materialNoUsdSum; + + /** 物料的含税总价(美元) */ + @Excel(name = "物料的含税总价(美元)") + private BigDecimal materialUsdSum; + + /** 计划交付时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "计划交付时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date deliveryTime; + + /** 质保天数 */ + @Excel(name = "质保天数") + private String expiryDay; + + /** 删除状态 */ + @Excel(name = "删除状态") + private String useStatus; + + /** 审核状态 */ + @Excel(name = "审核状态") + private String auditStatus; + + /** 已出库数量 */ + private String outBoundQuantity; + + /** 未出库数量 */ + private String unBoundQuantity; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setQuoteId(String quoteId) + { + this.quoteId = quoteId; + } + + public String getQuoteId() + { + return quoteId; + } + 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 setMaterialBom(String materialBom) + { + this.materialBom = materialBom; + } + + public String getMaterialBom() + { + return materialBom; + } + 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 setUnit(String unit) + { + this.unit = unit; + } + + public String getUnit() + { + return unit; + } + public void setDescribe(String describe) + { + this.describe = describe; + } + + public String getDescribe() + { + return describe; + } + public void setCountTax(BigDecimal countTax) + { + this.countTax = countTax; + } + + public BigDecimal getCountTax() + { + return countTax; + } + public void setUsdTax(BigDecimal usdTax) + { + this.usdTax = usdTax; + } + + public BigDecimal getUsdTax() + { + return usdTax; + } + public void setMaterialNum(Long materialNum) + { + this.materialNum = materialNum; + } + + public Long getMaterialNum() + { + return materialNum; + } + public void setMaterialSole(BigDecimal materialSole) + { + this.materialSole = materialSole; + } + + public BigDecimal 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 setMaterialRmbSum(Long materialRmbSum) + { + this.materialRmbSum = materialRmbSum; + } + + public Long getMaterialRmbSum() + { + return materialRmbSum; + } + public void setMaterialNoRmbSum(BigDecimal materialNoRmbSum) + { + this.materialNoRmbSum = materialNoRmbSum; + } + + public BigDecimal getMaterialNoRmbSum() + { + return materialNoRmbSum; + } + public void setMaterialNoUsd(BigDecimal materialNoUsd) + { + this.materialNoUsd = materialNoUsd; + } + + public BigDecimal getMaterialNoUsd() + { + return materialNoUsd; + } + public void setMaterialUsd(BigDecimal materialUsd) + { + this.materialUsd = materialUsd; + } + + public BigDecimal getMaterialUsd() + { + return materialUsd; + } + public void setMaterialNoUsdSum(BigDecimal materialNoUsdSum) + { + this.materialNoUsdSum = materialNoUsdSum; + } + + public BigDecimal getMaterialNoUsdSum() + { + return materialNoUsdSum; + } + public void setMaterialUsdSum(BigDecimal materialUsdSum) + { + this.materialUsdSum = materialUsdSum; + } + + public BigDecimal getMaterialUsdSum() + { + return materialUsdSum; + } + public void setDeliveryTime(Date deliveryTime) + { + this.deliveryTime = deliveryTime; + } + + public Date getDeliveryTime() + { + return deliveryTime; + } + public void setExpiryDay(String expiryDay) + { + this.expiryDay = expiryDay; + } + + public String getExpiryDay() + { + return expiryDay; + } + 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 setOutBoundQuantity(String outBoundQuantity) + { + this.outBoundQuantity = outBoundQuantity; + } + + public String getOutBoundQuantity() + { + return outBoundQuantity; + } + public void setUnBoundQuantity(String unBoundQuantity) + { + this.unBoundQuantity = unBoundQuantity; + } + + public String getUnBoundQuantity() + { + return unBoundQuantity; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("quoteId", getQuoteId()) + .append("materialId", getMaterialId()) + .append("materialCode", getMaterialCode()) + .append("materialName", getMaterialName()) + .append("materialBom", getMaterialBom()) + .append("materialType", getMaterialType()) + .append("processMethod", getProcessMethod()) + .append("brand", getBrand()) + .append("photoUrl", getPhotoUrl()) + .append("unit", getUnit()) + .append("describe", getDescribe()) + .append("countTax", getCountTax()) + .append("usdTax", getUsdTax()) + .append("materialNum", getMaterialNum()) + .append("materialSole", getMaterialSole()) + .append("materialRmb", getMaterialRmb()) + .append("materialNoRmb", getMaterialNoRmb()) + .append("materialRmbSum", getMaterialRmbSum()) + .append("materialNoRmbSum", getMaterialNoRmbSum()) + .append("materialNoUsd", getMaterialNoUsd()) + .append("materialUsd", getMaterialUsd()) + .append("materialNoUsdSum", getMaterialNoUsdSum()) + .append("materialUsdSum", getMaterialUsdSum()) + .append("deliveryTime", getDeliveryTime()) + .append("expiryDay", getExpiryDay()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("useStatus", getUseStatus()) + .append("auditStatus", getAuditStatus()) + .append("outBoundQuantity", getOutBoundQuantity()) + .append("unBoundQuantity", getUnBoundQuantity()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SysSalesEstimateChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SysSalesEstimateChildMapper.java new file mode 100644 index 00000000..bb5feb87 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/mapper/SysSalesEstimateChildMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.sales.mapper; + +import java.util.List; +import com.ruoyi.sales.domain.SysSalesEstimateChild; + +/** + * 销售物料估价Mapper接口 + * + * @author zhang + * @date 2024-05-27 + */ +public interface SysSalesEstimateChildMapper +{ + /** + * 查询销售物料估价 + * + * @param id 销售物料估价ID + * @return 销售物料估价 + */ + public SysSalesEstimateChild selectSysSalesEstimateChildById(Long id); + + /** + * 查询销售物料估价列表 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 销售物料估价集合 + */ + public List selectSysSalesEstimateChildList(SysSalesEstimateChild sysSalesEstimateChild); + + /** + * 新增销售物料估价 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 结果 + */ + public int insertSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild); + + /** + * 修改销售物料估价 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 结果 + */ + public int updateSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild); + + /** + * 删除销售物料估价 + * + * @param id 销售物料估价ID + * @return 结果 + */ + public int deleteSysSalesEstimateChildById(Long id); + + /** + * 批量删除销售物料估价 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysSalesEstimateChildByIds(String[] ids); + + /** + * 作废销售物料估价 + * + * @param id 销售物料估价ID + * @return 结果 + */ + public int cancelSysSalesEstimateChildById(Long id); + + /** + * 恢复销售物料估价 + * + * @param id 销售物料估价ID + * @return 结果 + */ + public int restoreSysSalesEstimateChildById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesEstimateService.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesEstimateService.java index fe70cbc7..78086be8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesEstimateService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesEstimateService.java @@ -72,4 +72,6 @@ public interface ISalesEstimateService * @return */ int restoreSalesEstimateById(Long aftersalesEstimateId); + + Object getId(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISysSalesEstimateChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISysSalesEstimateChildService.java new file mode 100644 index 00000000..6481746d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISysSalesEstimateChildService.java @@ -0,0 +1,75 @@ +package com.ruoyi.sales.service; + +import java.util.List; +import com.ruoyi.sales.domain.SysSalesEstimateChild; + +/** + * 销售物料估价Service接口 + * + * @author zhang + * @date 2024-05-27 + */ +public interface ISysSalesEstimateChildService +{ + /** + * 查询销售物料估价 + * + * @param id 销售物料估价ID + * @return 销售物料估价 + */ + public SysSalesEstimateChild selectSysSalesEstimateChildById(Long id); + + /** + * 查询销售物料估价列表 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 销售物料估价集合 + */ + public List selectSysSalesEstimateChildList(SysSalesEstimateChild sysSalesEstimateChild); + + /** + * 新增销售物料估价 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 结果 + */ + public int insertSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild); + + /** + * 修改销售物料估价 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 结果 + */ + public int updateSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild); + + /** + * 批量删除销售物料估价 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysSalesEstimateChildByIds(String ids); + + /** + * 删除销售物料估价信息 + * + * @param id 销售物料估价ID + * @return 结果 + */ + public int deleteSysSalesEstimateChildById(Long id); + + /** + * 作废销售物料估价 + * @param id 销售物料估价ID + * @return + */ + int cancelSysSalesEstimateChildById(Long id); + + /** + * 恢复销售物料估价 + * @param id 销售物料估价ID + * @return + */ + int restoreSysSalesEstimateChildById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesEstimateServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesEstimateServiceImpl.java index b9daa339..7709ee58 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesEstimateServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesEstimateServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.sales.service.impl; import java.util.List; + +import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +24,9 @@ public class SalesEstimateServiceImpl implements ISalesEstimateService @Autowired private SalesEstimateMapper salesEstimateMapper; + @Autowired + private RedisCache redisCache; + /** * 查询销售估价 * @@ -123,4 +128,9 @@ public class SalesEstimateServiceImpl implements ISalesEstimateService { return salesEstimateMapper.restoreSalesEstimateById(aftersalesEstimateId); } + + @Override + public Object getId() { + return redisCache.generateBillNo("GJ"); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SysSalesEstimateChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SysSalesEstimateChildServiceImpl.java new file mode 100644 index 00000000..fe90eeb1 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SysSalesEstimateChildServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.sales.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.sales.mapper.SysSalesEstimateChildMapper; +import com.ruoyi.sales.domain.SysSalesEstimateChild; +import com.ruoyi.sales.service.ISysSalesEstimateChildService; +import com.ruoyi.common.core.text.Convert; + +/** + * 销售物料估价Service业务层处理 + * + * @author zhang + * @date 2024-05-27 + */ +@Service +public class SysSalesEstimateChildServiceImpl implements ISysSalesEstimateChildService +{ + @Autowired + private SysSalesEstimateChildMapper sysSalesEstimateChildMapper; + + /** + * 查询销售物料估价 + * + * @param id 销售物料估价ID + * @return 销售物料估价 + */ + @Override + public SysSalesEstimateChild selectSysSalesEstimateChildById(Long id) + { + return sysSalesEstimateChildMapper.selectSysSalesEstimateChildById(id); + } + + /** + * 查询销售物料估价列表 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 销售物料估价 + */ + @Override + public List selectSysSalesEstimateChildList(SysSalesEstimateChild sysSalesEstimateChild) + { + return sysSalesEstimateChildMapper.selectSysSalesEstimateChildList(sysSalesEstimateChild); + } + + /** + * 新增销售物料估价 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 结果 + */ + @Override + public int insertSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild) + { + String loginName = ShiroUtils.getLoginName(); + sysSalesEstimateChild.setCreateBy(loginName); + sysSalesEstimateChild.setCreateTime(DateUtils.getNowDate()); + return sysSalesEstimateChildMapper.insertSysSalesEstimateChild(sysSalesEstimateChild); + } + + /** + * 修改销售物料估价 + * + * @param sysSalesEstimateChild 销售物料估价 + * @return 结果 + */ + @Override + public int updateSysSalesEstimateChild(SysSalesEstimateChild sysSalesEstimateChild) + { + String loginName = ShiroUtils.getLoginName(); + sysSalesEstimateChild.setUpdateBy(loginName); + sysSalesEstimateChild.setUpdateTime(DateUtils.getNowDate()); + return sysSalesEstimateChildMapper.updateSysSalesEstimateChild(sysSalesEstimateChild); + } + + /** + * 删除销售物料估价对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSysSalesEstimateChildByIds(String ids) + { + return sysSalesEstimateChildMapper.deleteSysSalesEstimateChildByIds(Convert.toStrArray(ids)); + } + + /** + * 删除销售物料估价信息 + * + * @param id 销售物料估价ID + * @return 结果 + */ + @Override + public int deleteSysSalesEstimateChildById(Long id) + { + return sysSalesEstimateChildMapper.deleteSysSalesEstimateChildById(id); + } + + /** + * 作废销售物料估价 + * + * @param id 销售物料估价ID + * @return 结果 + */ + @Override + public int cancelSysSalesEstimateChildById(Long id) + { + return sysSalesEstimateChildMapper.cancelSysSalesEstimateChildById(id); + } + + /** + * 恢复销售物料估价信息 + * + * @param id 销售物料估价ID + * @return 结果 + */ + @Override + public int restoreSysSalesEstimateChildById(Long id) + { + return sysSalesEstimateChildMapper.restoreSysSalesEstimateChildById(id); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/sales/SysSalesEstimateChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/sales/SysSalesEstimateChildMapper.xml new file mode 100644 index 00000000..6d1edeab --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/sales/SysSalesEstimateChildMapper.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, quoteId, materialId, materialCode, materialName, materialBom, materialType, processMethod, brand, photoUrl, unit, describe, countTax, usdTax, materialNum, materialSole, materialRmb, materialNoRmb, materialRmbSum, materialNoRmbSum, materialNoUsd, materialUsd, materialNoUsdSum, materialUsdSum, delivery_time, expiry_day, create_by, create_time, update_by, update_time, remark, use_status, audit_status, out_bound_quantity, un_bound_quantity from sys_sales_estimate_child + + + + + + + + insert into sys_sales_estimate_child + + quoteId, + materialId, + materialCode, + materialName, + materialBom, + materialType, + processMethod, + brand, + photoUrl, + unit, + describe, + countTax, + usdTax, + materialNum, + materialSole, + materialRmb, + materialNoRmb, + materialRmbSum, + materialNoRmbSum, + materialNoUsd, + materialUsd, + materialNoUsdSum, + materialUsdSum, + delivery_time, + expiry_day, + create_by, + create_time, + update_by, + update_time, + remark, + use_status, + audit_status, + out_bound_quantity, + un_bound_quantity, + + + #{quoteId}, + #{materialId}, + #{materialCode}, + #{materialName}, + #{materialBom}, + #{materialType}, + #{processMethod}, + #{brand}, + #{photoUrl}, + #{unit}, + #{describe}, + #{countTax}, + #{usdTax}, + #{materialNum}, + #{materialSole}, + #{materialRmb}, + #{materialNoRmb}, + #{materialRmbSum}, + #{materialNoRmbSum}, + #{materialNoUsd}, + #{materialUsd}, + #{materialNoUsdSum}, + #{materialUsdSum}, + #{deliveryTime}, + #{expiryDay}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{useStatus}, + #{auditStatus}, + #{outBoundQuantity}, + #{unBoundQuantity}, + + + + + update sys_sales_estimate_child + + quoteId = #{quoteId}, + materialId = #{materialId}, + materialCode = #{materialCode}, + materialName = #{materialName}, + materialBom = #{materialBom}, + materialType = #{materialType}, + processMethod = #{processMethod}, + brand = #{brand}, + photoUrl = #{photoUrl}, + unit = #{unit}, + describe = #{describe}, + countTax = #{countTax}, + usdTax = #{usdTax}, + materialNum = #{materialNum}, + materialSole = #{materialSole}, + materialRmb = #{materialRmb}, + materialNoRmb = #{materialNoRmb}, + materialRmbSum = #{materialRmbSum}, + materialNoRmbSum = #{materialNoRmbSum}, + materialNoUsd = #{materialNoUsd}, + materialUsd = #{materialUsd}, + materialNoUsdSum = #{materialNoUsdSum}, + materialUsdSum = #{materialUsdSum}, + delivery_time = #{deliveryTime}, + expiry_day = #{expiryDay}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + use_status = #{useStatus}, + audit_status = #{auditStatus}, + out_bound_quantity = #{outBoundQuantity}, + un_bound_quantity = #{unBoundQuantity}, + + where id = #{id} + + + + delete from sys_sales_estimate_child where id = #{id} + + + + delete from sys_sales_estimate_child where id in + + #{id} + + + + + update sys_sales_estimate_child set del_flag = '1' where id = #{id} + + + + update sys_sales_estimate_child set del_flag = '0' where id = #{id} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/sales/EstimateChild/EstimateChild.html b/ruoyi-admin/src/main/resources/templates/sales/EstimateChild/EstimateChild.html new file mode 100644 index 00000000..fb88cfe7 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/sales/EstimateChild/EstimateChild.html @@ -0,0 +1,314 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • + + + - + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/sales/EstimateChild/add.html b/ruoyi-admin/src/main/resources/templates/sales/EstimateChild/add.html new file mode 100644 index 00000000..07232db1 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/sales/EstimateChild/add.html @@ -0,0 +1,211 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/sales/salesEstimate/add.html b/ruoyi-admin/src/main/resources/templates/sales/salesEstimate/add.html index a87bc79d..d8c50ae4 100644 --- a/ruoyi-admin/src/main/resources/templates/sales/salesEstimate/add.html +++ b/ruoyi-admin/src/main/resources/templates/sales/salesEstimate/add.html @@ -3,163 +3,607 @@ + +
-
+ -
- +
+
- -
-
-
- -
- +
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- +
+
- +
-
- +
+
- + +
-
- +
+
- + - 代码生成请选择字典属性
-
- +
+
- +
-
- +
+
- +
+ + % +
-
- +
+
- +
-
- +
+
- +
-
- -
- +
+

计算

+
+
+ + + +
+
+ + +
-
-
- -
- +
+
+ + + RMB +
+
+ + + RMB +
+
+ + + RMB +
+
+ + + RMB +
-
-
- -
- +
+
+ + + 美元 +
+
+ + + 美元 +
+
+ + + 美元 +
+
+ + + 美元 +
+
+
+ +
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/sales/salesEstimate/edit.html b/ruoyi-admin/src/main/resources/templates/sales/salesEstimate/edit.html index 6fe6a673..175d69b7 100644 --- a/ruoyi-admin/src/main/resources/templates/sales/salesEstimate/edit.html +++ b/ruoyi-admin/src/main/resources/templates/sales/salesEstimate/edit.html @@ -70,97 +70,545 @@
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - 代码生成请选择字典属性 -
-
-
- +
+
- +
-
- +
+
- +
+ + % +
-
- +
+
- +
-
- +
+
- +
-
- -
- +
+

计算

+
+
+ + + +
+
+ + + +
-
-
- -
- +
+
+ + + RMB +
+
+ + + RMB +
+
+ + + RMB +
+
+ + + RMB +
-
-
- -
- +
+
+ + + 美元 +
+
+ + + 美元 +
+
+ + + 美元 +
+
+ + + 美元 +
+