diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java index ca1540f9..6fc498a5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java @@ -1,8 +1,21 @@ package com.ruoyi.purchase.service.impl; +import java.util.Arrays; +import java.util.Date; import java.util.List; + +import com.ruoyi.common.service.ICommonService; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.process.general.service.IProcessService; +import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; +import com.ruoyi.system.domain.SysAttach; +import com.ruoyi.system.mapper.SysUserMapper; +import com.ruoyi.system.service.ISysAttachFileService; +import com.ruoyi.system.service.ISysAttachService; +import com.ruoyi.system.service.ISysRoleService; +import org.activiti.engine.TaskService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.purchase.mapper.PurchaseQuoteMapper; @@ -22,6 +35,29 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService @Autowired private PurchaseQuoteMapper purchaseQuoteMapper; + @Autowired + private ISysAttachService attachService; + + @Autowired + private ISysAttachFileService attachFileService; + + @Autowired + private ICommonService commonService; + + @Autowired + private SysUserMapper userMapper; + + @Autowired + private TaskService taskService; + + @Autowired + private BizTodoItemMapper todoItemMapper; + + @Autowired + private IProcessService processService; + + @Autowired + private ISysRoleService roleService; /** * 查询采购报价单 * @@ -58,7 +94,24 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService String loginName = ShiroUtils.getLoginName(); purchaseQuote.setCreateBy(loginName); purchaseQuote.setCreateTime(DateUtils.getNowDate()); - return purchaseQuoteMapper.insertPurchaseQuote(purchaseQuote); + int result = purchaseQuoteMapper.insertPurchaseQuote(purchaseQuote); + Long id = purchaseQuote.getPurchaseQuoteId(); + String fileIdStr = purchaseQuote.getFileIdStr(); + if(StringUtils.isNotBlank(fileIdStr)){ + // 保存附件关联 + SysAttach attach = new SysAttach(); + attach.setCreateBy(loginName); + attach.setCreateTime(DateUtils.getNowDate()); + attach.setSourceType("PurchaseQuote"); + attach.setSourceSubType("photo"); + attach.setRelId(id); + attachService.insertSysAttach(attach); + // 更新附件与文件关联 + Long attachId = attach.getId(); + List fileIdList = Arrays.asList(fileIdStr.split(";")); + attachFileService.updateAttachIdByIdList(attachId,fileIdList); + } + return result; } /** @@ -73,7 +126,32 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService String loginName = ShiroUtils.getLoginName(); purchaseQuote.setUpdateBy(loginName); purchaseQuote.setUpdateTime(DateUtils.getNowDate()); + Long id = purchaseQuote.getPurchaseQuoteId(); + String fileIdStr = purchaseQuote.getFileIdStr(); + Long photoAttachId = purchaseQuote.getPhotoAttachId(); + String removeFileIdStr = purchaseQuote.getRemoveFileIdStr(); + + + if(StringUtils.isNotBlank(removeFileIdStr)){ + List removeFileIdList = Arrays.asList(removeFileIdStr.split(";")); + commonService.deleteByIds(removeFileIdList); + } + if(StringUtils.isNotBlank(fileIdStr)) { + List fileIdList = Arrays.asList(fileIdStr.split(";")); + if (photoAttachId == null) { + SysAttach attach = new SysAttach(); + attach.setCreateBy(loginName); + attach.setCreateTime(DateUtils.getNowDate()); + attach.setSourceType("PurchaseQuote"); + attach.setSourceSubType("photo"); + attach.setRelId(id); + attachService.insertSysAttach(attach); + photoAttachId = attach.getId(); + } + attachFileService.updateAttachIdByIdList(photoAttachId, fileIdList); + } return purchaseQuoteMapper.updatePurchaseQuote(purchaseQuote); + } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java new file mode 100644 index 00000000..c1a2ed2c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysPurchaseQuoteChildController.java @@ -0,0 +1,151 @@ +package com.ruoyi.system.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.system.domain.SysPurchaseQuoteChild; +import com.ruoyi.system.service.ISysPurchaseQuoteChildService; +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-15 + */ +@Controller +@RequestMapping("/system/purchaseQuoteChild") +public class SysPurchaseQuoteChildController extends BaseController +{ + private String prefix = "system/purchaseQuoteChild"; + + @Autowired + private ISysPurchaseQuoteChildService sysPurchaseQuoteChildService; + + @RequiresPermissions("system:purchaseQuoteChild:view") + @GetMapping() + public String purchaseQuoteChild() + { + return prefix + "/purchaseQuoteChild"; + } + + /** + * 查询采购报价单物料信息列表 + */ + @RequiresPermissions("system:purchaseQuoteChild:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysPurchaseQuoteChild sysPurchaseQuoteChild) + { + startPage(); + List list = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild); + return getDataTable(list); + } + + /** + * 导出采购报价单物料信息列表 + */ + @RequiresPermissions("system:purchaseQuoteChild:export") + @Log(title = "采购报价单物料信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysPurchaseQuoteChild sysPurchaseQuoteChild) + { + List list = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild); + ExcelUtil util = new ExcelUtil(SysPurchaseQuoteChild.class); + return util.exportExcel(list, "采购报价单物料信息数据"); + } + + /** + * 新增采购报价单物料信息 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存采购报价单物料信息 + */ + @RequiresPermissions("system:purchaseQuoteChild:add") + @Log(title = "采购报价单物料信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysPurchaseQuoteChild sysPurchaseQuoteChild) + { + return toAjax(sysPurchaseQuoteChildService.insertSysPurchaseQuoteChild(sysPurchaseQuoteChild)); + } + + /** + * 修改采购报价单物料信息 + */ + @GetMapping("/edit/{purchaseQuoteChildId}") + public String edit(@PathVariable("purchaseQuoteChildId") Long purchaseQuoteChildId, ModelMap mmap) + { + SysPurchaseQuoteChild sysPurchaseQuoteChild = sysPurchaseQuoteChildService.selectSysPurchaseQuoteChildById(purchaseQuoteChildId); + mmap.put("sysPurchaseQuoteChild", sysPurchaseQuoteChild); + return prefix + "/edit"; + } + + /** + * 修改保存采购报价单物料信息 + */ + @RequiresPermissions("system:purchaseQuoteChild:edit") + @Log(title = "采购报价单物料信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysPurchaseQuoteChild sysPurchaseQuoteChild) + { + return toAjax(sysPurchaseQuoteChildService.updateSysPurchaseQuoteChild(sysPurchaseQuoteChild)); + } + + /** + * 删除采购报价单物料信息 + */ + @RequiresPermissions("system:purchaseQuoteChild:remove") + @Log(title = "采购报价单物料信息", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysPurchaseQuoteChildService.deleteSysPurchaseQuoteChildByIds(ids)); + } + + /** + * 作废采购报价单物料信息 + */ + @RequiresPermissions("system:purchaseQuoteChild:cancel") + @Log(title = "采购报价单物料信息", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(sysPurchaseQuoteChildService.cancelSysPurchaseQuoteChildById(id)); + } + + /** + * 恢复采购报价单物料信息 + */ + @RequiresPermissions("system:purchaseQuoteChild:restore") + @Log(title = "采购报价单物料信息", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(sysPurchaseQuoteChildService.restoreSysPurchaseQuoteChildById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java new file mode 100644 index 00000000..12bd48ce --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPurchaseQuoteChild.java @@ -0,0 +1,292 @@ +package com.ruoyi.system.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; + +/** + * 采购报价单物料信息对象 sys_purchase_quote_child + * + * @author zhang + * @date 2024-05-15 + */ +public class SysPurchaseQuoteChild extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 采购报价单物料索引 */ + 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; + + /** 国内税率 */ + private Double taxRate; + + /** 美元汇率 */ + private Double usdRate; + + /** 物料的数量 */ + @Excel(name = "物料的数量") + private Long materialNum; + + /** 物料的对外报价 */ + @Excel(name = "物料的对外报价") + private BigDecimal materialSole; + + /** 物料的不含税单价(RMB) */ + @Excel(name = "物料的不含税单价(RMB)") + private BigDecimal materialRmb; + + /** 物料的含税单价(RMB) */ + @Excel(name = "物料的含税单价(RMB)") + private BigDecimal materialNormb; + + /** 删除状态 */ + @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(Double taxRate) + { + this.taxRate = taxRate; + } + + public Double getTaxRate() + { + return taxRate; + } + public void setUsdRate(Double usdRate) + { + this.usdRate = usdRate; + } + + public Double getUsdRate() + { + return usdRate; + } + 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 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("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/system/mapper/SysPurchaseQuoteChildMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPurchaseQuoteChildMapper.java new file mode 100644 index 00000000..1c09a506 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPurchaseQuoteChildMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.SysPurchaseQuoteChild; + +/** + * 采购报价单物料信息Mapper接口 + * + * @author zhang + * @date 2024-05-15 + */ +public interface SysPurchaseQuoteChildMapper +{ + /** + * 查询采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 采购报价单物料信息 + */ + public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + + /** + * 查询采购报价单物料信息列表 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 采购报价单物料信息集合 + */ + public List selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild); + + /** + * 新增采购报价单物料信息 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 结果 + */ + public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild); + + /** + * 修改采购报价单物料信息 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 结果 + */ + public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild); + + /** + * 删除采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + + /** + * 批量删除采购报价单物料信息 + * + * @param purchaseQuoteChildIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSysPurchaseQuoteChildByIds(String[] purchaseQuoteChildIds); + + /** + * 作废采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + public int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + + /** + * 恢复采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + public int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java new file mode 100644 index 00000000..41ca15d0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPurchaseQuoteChildService.java @@ -0,0 +1,75 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.SysPurchaseQuoteChild; + +/** + * 采购报价单物料信息Service接口 + * + * @author zhang + * @date 2024-05-15 + */ +public interface ISysPurchaseQuoteChildService +{ + /** + * 查询采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 采购报价单物料信息 + */ + public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + + /** + * 查询采购报价单物料信息列表 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 采购报价单物料信息集合 + */ + public List selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild); + + /** + * 新增采购报价单物料信息 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 结果 + */ + public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild); + + /** + * 修改采购报价单物料信息 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 结果 + */ + public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild); + + /** + * 批量删除采购报价单物料信息 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysPurchaseQuoteChildByIds(String ids); + + /** + * 删除采购报价单物料信息信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + + /** + * 作废采购报价单物料信息 + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return + */ + int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId); + + /** + * 恢复采购报价单物料信息 + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return + */ + int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java new file mode 100644 index 00000000..a2061ea6 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPurchaseQuoteChildServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.system.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.system.mapper.SysPurchaseQuoteChildMapper; +import com.ruoyi.system.domain.SysPurchaseQuoteChild; +import com.ruoyi.system.service.ISysPurchaseQuoteChildService; +import com.ruoyi.common.core.text.Convert; + +/** + * 采购报价单物料信息Service业务层处理 + * + * @author zhang + * @date 2024-05-15 + */ +@Service +public class SysPurchaseQuoteChildServiceImpl implements ISysPurchaseQuoteChildService +{ + @Autowired + private SysPurchaseQuoteChildMapper sysPurchaseQuoteChildMapper; + + /** + * 查询采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 采购报价单物料信息 + */ + @Override + public SysPurchaseQuoteChild selectSysPurchaseQuoteChildById(Long purchaseQuoteChildId) + { + return sysPurchaseQuoteChildMapper.selectSysPurchaseQuoteChildById(purchaseQuoteChildId); + } + + /** + * 查询采购报价单物料信息列表 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 采购报价单物料信息 + */ + @Override + public List selectSysPurchaseQuoteChildList(SysPurchaseQuoteChild sysPurchaseQuoteChild) + { + return sysPurchaseQuoteChildMapper.selectSysPurchaseQuoteChildList(sysPurchaseQuoteChild); + } + + /** + * 新增采购报价单物料信息 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 结果 + */ + @Override + public int insertSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild) + { + String loginName = ShiroUtils.getLoginName(); + sysPurchaseQuoteChild.setCreateBy(loginName); + sysPurchaseQuoteChild.setCreateTime(DateUtils.getNowDate()); + return sysPurchaseQuoteChildMapper.insertSysPurchaseQuoteChild(sysPurchaseQuoteChild); + } + + /** + * 修改采购报价单物料信息 + * + * @param sysPurchaseQuoteChild 采购报价单物料信息 + * @return 结果 + */ + @Override + public int updateSysPurchaseQuoteChild(SysPurchaseQuoteChild sysPurchaseQuoteChild) + { + String loginName = ShiroUtils.getLoginName(); + sysPurchaseQuoteChild.setUpdateBy(loginName); + sysPurchaseQuoteChild.setUpdateTime(DateUtils.getNowDate()); + return sysPurchaseQuoteChildMapper.updateSysPurchaseQuoteChild(sysPurchaseQuoteChild); + } + + /** + * 删除采购报价单物料信息对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSysPurchaseQuoteChildByIds(String ids) + { + return sysPurchaseQuoteChildMapper.deleteSysPurchaseQuoteChildByIds(Convert.toStrArray(ids)); + } + + /** + * 删除采购报价单物料信息信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + @Override + public int deleteSysPurchaseQuoteChildById(Long purchaseQuoteChildId) + { + return sysPurchaseQuoteChildMapper.deleteSysPurchaseQuoteChildById(purchaseQuoteChildId); + } + + /** + * 作废采购报价单物料信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + @Override + public int cancelSysPurchaseQuoteChildById(Long purchaseQuoteChildId) + { + return sysPurchaseQuoteChildMapper.cancelSysPurchaseQuoteChildById(purchaseQuoteChildId); + } + + /** + * 恢复采购报价单物料信息信息 + * + * @param purchaseQuoteChildId 采购报价单物料信息ID + * @return 结果 + */ + @Override + public int restoreSysPurchaseQuoteChildById(Long purchaseQuoteChildId) + { + return sysPurchaseQuoteChildMapper.restoreSysPurchaseQuoteChildById(purchaseQuoteChildId); + } +} diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html index 4fed281f..264ac4cf 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html @@ -2,12 +2,14 @@ + + + -
+
-
- +
@@ -16,7 +18,7 @@
-
@@ -42,12 +44,33 @@
+
+ + 点击上传 +
只能上传jpg/png文件,第一张图片为主图
+
+ + + +
+
+ +
- + %
@@ -70,8 +93,77 @@
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/edit.html b/ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/edit.html new file mode 100644 index 00000000..7e68b6c8 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/edit.html @@ -0,0 +1,143 @@ + + + + + + +
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/purchaseQuoteChild.html b/ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/purchaseQuoteChild.html new file mode 100644 index 00000000..72090732 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/purchaseQuoteChild/purchaseQuoteChild.html @@ -0,0 +1,228 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file