diff --git a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/controller/ErpCompanyCostController.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/CompanyCostController.java similarity index 57% rename from ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/controller/ErpCompanyCostController.java rename to ruoyi-admin/src/main/java/com/ruoyi/financial/controller/CompanyCostController.java index 1a58d52d..51837640 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/controller/ErpCompanyCostController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/CompanyCostController.java @@ -1,4 +1,4 @@ -package com.ruoyi.taxInvoice.controller; +package com.ruoyi.financial.controller; import java.util.List; import org.apache.shiro.authz.annotation.RequiresPermissions; @@ -12,8 +12,8 @@ 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.taxInvoice.domain.ErpCompanyCost; -import com.ruoyi.taxInvoice.service.IErpCompanyCostService; +import com.ruoyi.financial.domain.CompanyCost; +import com.ruoyi.financial.service.ICompanyCostService; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.poi.ExcelUtil; @@ -23,48 +23,48 @@ import com.ruoyi.common.core.page.TableDataInfo; * 公司成本Controller * * @author zhang - * @date 2024-03-05 + * @date 2024-08-05 */ @Controller -@RequestMapping("/taxInvoice/companyCost") -public class ErpCompanyCostController extends BaseController +@RequestMapping("/financial/companyCost") +public class CompanyCostController extends BaseController { - private String prefix = "taxInvoice/companyCost"; + private String prefix = "financial/companyCost"; @Autowired - private IErpCompanyCostService erpCompanyCostService; + private ICompanyCostService companyCostService; - @RequiresPermissions("taxInvoice:companyCost:view") + @RequiresPermissions("financial:companCost:view") @GetMapping() - public String companyCost() + public String compantCost() { - return prefix + "/companyCost"; + return prefix + "/compantCost"; } /** * 查询公司成本列表 */ - @RequiresPermissions("taxInvoice:companyCost:list") + @RequiresPermissions("financial:companCost:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(ErpCompanyCost erpCompanyCost) + public TableDataInfo list(CompanyCost companyCost) { startPage(); - List list = erpCompanyCostService.selectErpCompanyCostList(erpCompanyCost); + List list = companyCostService.selectCompanyCostList(companyCost); return getDataTable(list); } /** * 导出公司成本列表 */ - @RequiresPermissions("taxInvoice:companyCost:export") + @RequiresPermissions("financial:companCost:export") @Log(title = "公司成本", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(ErpCompanyCost erpCompanyCost) + public AjaxResult export(CompanyCost companyCost) { - List list = erpCompanyCostService.selectErpCompanyCostList(erpCompanyCost); - ExcelUtil util = new ExcelUtil(ErpCompanyCost.class); + List list = companyCostService.selectCompanyCostList(companyCost); + ExcelUtil util = new ExcelUtil(CompanyCost.class); return util.exportExcel(list, "公司成本数据"); } @@ -80,13 +80,13 @@ public class ErpCompanyCostController extends BaseController /** * 新增保存公司成本 */ - @RequiresPermissions("taxInvoice:companyCost:add") + @RequiresPermissions("financial:companCost:add") @Log(title = "公司成本", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(ErpCompanyCost erpCompanyCost) + public AjaxResult addSave(CompanyCost companyCost) { - return toAjax(erpCompanyCostService.insertErpCompanyCost(erpCompanyCost)); + return toAjax(companyCostService.insertCompanyCost(companyCost)); } /** @@ -95,56 +95,56 @@ public class ErpCompanyCostController extends BaseController @GetMapping("/edit/{id}") public String edit(@PathVariable("id") Long id, ModelMap mmap) { - ErpCompanyCost erpCompanyCost = erpCompanyCostService.selectErpCompanyCostById(id); - mmap.put("erpCompanyCost", erpCompanyCost); + CompanyCost companyCost = companyCostService.selectCompanyCostById(id); + mmap.put("companyCost", companyCost); return prefix + "/edit"; } /** * 修改保存公司成本 */ - @RequiresPermissions("taxInvoice:companyCost:edit") + @RequiresPermissions("financial:companCost:edit") @Log(title = "公司成本", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody - public AjaxResult editSave(ErpCompanyCost erpCompanyCost) + public AjaxResult editSave(CompanyCost companyCost) { - return toAjax(erpCompanyCostService.updateErpCompanyCost(erpCompanyCost)); + return toAjax(companyCostService.updateCompanyCost(companyCost)); } /** * 删除公司成本 */ - @RequiresPermissions("taxInvoice:companyCost:remove") + @RequiresPermissions("financial:companCost:remove") @Log(title = "公司成本", businessType = BusinessType.DELETE) @PostMapping( "/remove") @ResponseBody public AjaxResult remove(String ids) { - return toAjax(erpCompanyCostService.deleteErpCompanyCostByIds(ids)); + return toAjax(companyCostService.deleteCompanyCostByIds(ids)); } /** * 作废公司成本 */ - @RequiresPermissions("taxInvoice:companyCost:cancel") + @RequiresPermissions("financial:companCost:cancel") @Log(title = "公司成本", businessType = BusinessType.CANCEL) @GetMapping( "/cancel/{id}") @ResponseBody public AjaxResult cancel(@PathVariable("id") Long id){ - return toAjax(erpCompanyCostService.cancelErpCompanyCostById(id)); + return toAjax(companyCostService.cancelCompanyCostById(id)); } /** * 恢复公司成本 */ - @RequiresPermissions("taxInvoice:companyCost:restore") + @RequiresPermissions("financial:companCost:restore") @Log(title = "公司成本", businessType = BusinessType.RESTORE) @GetMapping( "/restore/{id}") @ResponseBody public AjaxResult restore(@PathVariable("id")Long id) { - return toAjax(erpCompanyCostService.restoreErpCompanyCostById(id)); + return toAjax(companyCostService.restoreCompanyCostById(id)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/CompanyCost.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/CompanyCost.java new file mode 100644 index 00000000..cee2b4c0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/CompanyCost.java @@ -0,0 +1,267 @@ +package com.ruoyi.financial.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; + +/** + * 公司成本对象 financial_company_cost + * + * @author zhang + * @date 2024-08-05 + */ +public class CompanyCost extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 索引 */ + private Long id; + + /** 公司成本ID */ + @Excel(name = "公司成本ID") + private String ctcId; + + /** 年份 */ + @Excel(name = "年份") + private Long year; + + /** 月份 */ + @Excel(name = "月份") + private Long month; + + /** 经营成本 */ + @Excel(name = "经营成本") + private Long operatingCosts; + + /** 工资费用 */ + @Excel(name = "工资费用") + private BigDecimal salaryExpenses; + + /** 厂租费用 */ + @Excel(name = "厂租费用") + private BigDecimal factoryRentalFees; + + /** 税金费用 */ + @Excel(name = "税金费用") + private BigDecimal taxExpenses; + + /** 工厂电费 */ + @Excel(name = "工厂电费") + private BigDecimal factoryElectricityFees; + + /** 其他费用 */ + @Excel(name = "其他费用") + private BigDecimal ohterExpenses; + + /** 业务成本 */ + @Excel(name = "业务成本") + private BigDecimal businessCost; + + /** 运输费用 */ + @Excel(name = "运输费用") + private BigDecimal transportationCosts; + + /** 推广费用 */ + @Excel(name = "推广费用") + private BigDecimal promotionExpenses; + + /** 包装费用 */ + @Excel(name = "包装费用") + private BigDecimal packagingCost; + + /** 业务费用 */ + @Excel(name = "业务费用") + private BigDecimal businessExpenses; + + /** 售后费用 */ + @Excel(name = "售后费用") + private BigDecimal afterSalesExpenses; + + /** 业务提成 */ + @Excel(name = "业务提成") + private BigDecimal businessCommission; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCtcId(String ctcId) + { + this.ctcId = ctcId; + } + + public String getCtcId() + { + return ctcId; + } + public void setYear(Long year) + { + this.year = year; + } + + public Long getYear() + { + return year; + } + public void setMonth(Long month) + { + this.month = month; + } + + public Long getMonth() + { + return month; + } + public void setOperatingCosts(Long operatingCosts) + { + this.operatingCosts = operatingCosts; + } + + public Long getOperatingCosts() + { + return operatingCosts; + } + public void setSalaryExpenses(BigDecimal salaryExpenses) + { + this.salaryExpenses = salaryExpenses; + } + + public BigDecimal getSalaryExpenses() + { + return salaryExpenses; + } + public void setFactoryRentalFees(BigDecimal factoryRentalFees) + { + this.factoryRentalFees = factoryRentalFees; + } + + public BigDecimal getFactoryRentalFees() + { + return factoryRentalFees; + } + public void setTaxExpenses(BigDecimal taxExpenses) + { + this.taxExpenses = taxExpenses; + } + + public BigDecimal getTaxExpenses() + { + return taxExpenses; + } + public void setFactoryElectricityFees(BigDecimal factoryElectricityFees) + { + this.factoryElectricityFees = factoryElectricityFees; + } + + public BigDecimal getFactoryElectricityFees() + { + return factoryElectricityFees; + } + public void setOhterExpenses(BigDecimal ohterExpenses) + { + this.ohterExpenses = ohterExpenses; + } + + public BigDecimal getOhterExpenses() + { + return ohterExpenses; + } + public void setBusinessCost(BigDecimal businessCost) + { + this.businessCost = businessCost; + } + + public BigDecimal getBusinessCost() + { + return businessCost; + } + public void setTransportationCosts(BigDecimal transportationCosts) + { + this.transportationCosts = transportationCosts; + } + + public BigDecimal getTransportationCosts() + { + return transportationCosts; + } + public void setPromotionExpenses(BigDecimal promotionExpenses) + { + this.promotionExpenses = promotionExpenses; + } + + public BigDecimal getPromotionExpenses() + { + return promotionExpenses; + } + public void setPackagingCost(BigDecimal packagingCost) + { + this.packagingCost = packagingCost; + } + + public BigDecimal getPackagingCost() + { + return packagingCost; + } + public void setBusinessExpenses(BigDecimal businessExpenses) + { + this.businessExpenses = businessExpenses; + } + + public BigDecimal getBusinessExpenses() + { + return businessExpenses; + } + public void setAfterSalesExpenses(BigDecimal afterSalesExpenses) + { + this.afterSalesExpenses = afterSalesExpenses; + } + + public BigDecimal getAfterSalesExpenses() + { + return afterSalesExpenses; + } + public void setBusinessCommission(BigDecimal businessCommission) + { + this.businessCommission = businessCommission; + } + + public BigDecimal getBusinessCommission() + { + return businessCommission; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("ctcId", getCtcId()) + .append("year", getYear()) + .append("month", getMonth()) + .append("operatingCosts", getOperatingCosts()) + .append("salaryExpenses", getSalaryExpenses()) + .append("factoryRentalFees", getFactoryRentalFees()) + .append("taxExpenses", getTaxExpenses()) + .append("factoryElectricityFees", getFactoryElectricityFees()) + .append("ohterExpenses", getOhterExpenses()) + .append("businessCost", getBusinessCost()) + .append("transportationCosts", getTransportationCosts()) + .append("promotionExpenses", getPromotionExpenses()) + .append("packagingCost", getPackagingCost()) + .append("businessExpenses", getBusinessExpenses()) + .append("afterSalesExpenses", getAfterSalesExpenses()) + .append("businessCommission", getBusinessCommission()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateTime", getUpdateTime()) + .append("updateBy", getUpdateBy()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/CompanyCostMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/CompanyCostMapper.java new file mode 100644 index 00000000..2223012e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/CompanyCostMapper.java @@ -0,0 +1,99 @@ +package com.ruoyi.financial.mapper; + +import java.util.List; +import com.ruoyi.financial.domain.CompanyCost; + +/** + * 公司成本Mapper接口 + * + * @author zhang + * @date 2024-08-05 + */ +public interface CompanyCostMapper +{ + /** + * 查询公司成本 + * + * @param id 公司成本ID + * @return 公司成本 + */ + public CompanyCost selectCompanyCostById(Long id); + /** + * 查询公司成本 + * + * @param id 公司成本ID + * @return 公司成本 + */ + public CompanyCost selectCompanyCostByCtcId(Long id); + + /** + * 查询公司成本列表 + * + * @param companyCost 公司成本 + * @return 公司成本集合 + */ + public List selectCompanyCostList(CompanyCost companyCost); + + /** + * 新增公司成本 + * + * @param companyCost 公司成本 + * @return 结果 + */ + public int insertCompanyCost(CompanyCost companyCost); + + /** + * 修改公司成本 + * + * @param companyCost 公司成本 + * @return 结果 + */ + public int updateCompanyCost(CompanyCost companyCost); + + /** + * 删除公司成本 + * + * @param id 公司成本ID + * @return 结果 + */ + public int deleteCompanyCostById(Long id); + /** + * 删除公司成本 + * + * @param id 公司成本ID + * @return 结果 + */ + public int deleteCompanyCostByCtcId(Long id); + + /** + * 批量删除公司成本 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteCompanyCostByIds(String[] ids); + + /** + * 批量删除公司成本 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteCompanyCostByCtcIds(String[] ids); + + /** + * 作废公司成本 + * + * @param id 公司成本ID + * @return 结果 + */ + public int cancelCompanyCostById(Long id); + + /** + * 恢复公司成本 + * + * @param id 公司成本ID + * @return 结果 + */ + public int restoreCompanyCostById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/ICompanyCostService.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/ICompanyCostService.java new file mode 100644 index 00000000..ac75c70c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/ICompanyCostService.java @@ -0,0 +1,97 @@ +package com.ruoyi.financial.service; + +import java.util.List; +import com.ruoyi.financial.domain.CompanyCost; + +/** + * 公司成本Service接口 + * + * @author zhang + * @date 2024-08-05 + */ +public interface ICompanyCostService +{ + /** + * 查询公司成本 + * + * @param id 公司成本ID + * @return 公司成本 + */ + public CompanyCost selectCompanyCostById(Long id); + /** + * 查询公司成本 + * + * @param ctcId 公司成本编号 + * @return 公司成本 + */ + public CompanyCost selectCompanyCostByCtcId(Long ctcId); + + /** + * 查询公司成本列表 + * + * @param companyCost 公司成本 + * @return 公司成本集合 + */ + public List selectCompanyCostList(CompanyCost companyCost); + + /** + * 新增公司成本 + * + * @param companyCost 公司成本 + * @return 结果 + */ + public int insertCompanyCost(CompanyCost companyCost); + + /** + * 修改公司成本 + * + * @param companyCost 公司成本 + * @return 结果 + */ + public int updateCompanyCost(CompanyCost companyCost); + + /** + * 批量删除公司成本 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteCompanyCostByIds(String ids); + + /** + * 删除公司成本信息 + * + * @param id 公司成本ID + * @return 结果 + */ + public int deleteCompanyCostById(Long id); + + /** + * 批量删除公司成本 + * + * @param ctcIds 需要删除的数据公司成本编号 + * @return 结果 + */ + public int deleteCompanyCostByCtcIds(String ctcIds); + + /** + * 删除公司成本信息 + * + * @param ctcId 公司成本编号 + * @return 结果 + */ + public int deleteCompanyCostByCtcId(Long ctcId); + /** + * 作废公司成本 + * @param id 公司成本ID + * @return + */ + int cancelCompanyCostById(Long id); + + /** + * 恢复公司成本 + * @param id 公司成本ID + * @return + */ + int restoreCompanyCostById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/CompanyCostServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/CompanyCostServiceImpl.java new file mode 100644 index 00000000..4f8302f0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/CompanyCostServiceImpl.java @@ -0,0 +1,148 @@ +package com.ruoyi.financial.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 com.ruoyi.system.service.ISysUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.financial.mapper.CompanyCostMapper; +import com.ruoyi.financial.domain.CompanyCost; +import com.ruoyi.financial.service.ICompanyCostService; +import com.ruoyi.common.core.text.Convert; + +/** + * 公司成本Service业务层处理 + * + * @author zhang + * @date 2024-08-05 + */ +@Service +public class CompanyCostServiceImpl implements ICompanyCostService +{ + @Autowired + private RedisCache redisCache; + @Autowired + private ISysUserService userService; + @Autowired + private CompanyCostMapper companyCostMapper; + + /** + * 查询公司成本 + * + * @param id 公司成本ID + * @return 公司成本 + */ + @Override + public CompanyCost selectCompanyCostById(Long id) + { + return companyCostMapper.selectCompanyCostById(id); + } + + @Override + public CompanyCost selectCompanyCostByCtcId(Long ctcId) { + return companyCostMapper.selectCompanyCostById(ctcId); + } + + /** + * 查询公司成本列表 + * + * @param companyCost 公司成本 + * @return 公司成本 + */ + @Override + public List selectCompanyCostList(CompanyCost companyCost) + { + return companyCostMapper.selectCompanyCostList(companyCost); + } + + /** + * 新增公司成本 + * + * @param companyCost 公司成本 + * @return 结果 + */ + @Override + public int insertCompanyCost(CompanyCost companyCost) + { + companyCost.setCreateTime(DateUtils.getNowDate()); + String loginName = ShiroUtils.getLoginName(); + companyCost.setCreateBy(loginName); + return companyCostMapper.insertCompanyCost(companyCost); + } + + /** + * 修改公司成本 + * + * @param companyCost 公司成本 + * @return 结果 + */ + @Override + public int updateCompanyCost(CompanyCost companyCost) + { + companyCost.setUpdateTime(DateUtils.getNowDate()); + String loginName = ShiroUtils.getLoginName(); + companyCost.setUpdateBy(loginName); + return companyCostMapper.updateCompanyCost(companyCost); + } + + /** + * 删除公司成本对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteCompanyCostByIds(String ids) + { + return companyCostMapper.deleteCompanyCostByIds(Convert.toStrArray(ids)); + } + + /** + * 删除公司成本信息 + * + * @param id 公司成本ID + * @return 结果 + */ + @Override + public int deleteCompanyCostById(Long id) + { + return companyCostMapper.deleteCompanyCostById(id); + } + + @Override + public int deleteCompanyCostByCtcIds(String ctcIds) { + return companyCostMapper.deleteCompanyCostByCtcIds(Convert.toStrArray(ctcIds)); + } + + @Override + public int deleteCompanyCostByCtcId(Long ctcId) { + return companyCostMapper.deleteCompanyCostByCtcId(ctcId); + } + + /** + * 作废公司成本 + * + * @param id 公司成本ID + * @return 结果 + */ + @Override + public int cancelCompanyCostById(Long id) + { + return companyCostMapper.cancelCompanyCostById(id); + } + + /** + * 恢复公司成本信息 + * + * @param id 公司成本ID + * @return 结果 + */ + @Override + public int restoreCompanyCostById(Long id) + { + return companyCostMapper.restoreCompanyCostById(id); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java index 40eb94ee..59cb87f1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java @@ -185,6 +185,18 @@ public class PurchaseOrderController extends BaseController public String edit(@PathVariable("purchaseOrderId") Long purchaseOrderId, ModelMap mmap) { PurchaseOrder purchaseOrder = purchaseOrderService.selectPurchaseOrderById(purchaseOrderId); + //获取子表信息 + List purchaseOrderChildList = purchaseOrderChildService.selectPurchaseOrderChildByOrderCode(purchaseOrder.getPurchaseOrderCode()); + //Set子表供应商的信息 供应商编号-供应商名称 + //Set子表采购计划单信息 + Set supplierCodes = new HashSet<>(); + Set purchasePlanCodes = new HashSet<>(); + for(PurchaseOrderChild purchaseOrderChild : purchaseOrderChildList){ + supplierCodes.add(purchaseOrderChild.getSupplierCode()); + purchasePlanCodes.add(purchaseOrderChild.getPurchasePlanCode()); + } + mmap.put("supplierCodes", supplierCodes); + mmap.put("purchasePlanCodes", purchasePlanCodes); mmap.put("purchaseOrder", purchaseOrder); return prefix + "/edit"; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/domain/ErpCompanyCost.java b/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/domain/ErpCompanyCost.java deleted file mode 100644 index 2aac98d4..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/domain/ErpCompanyCost.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.ruoyi.taxInvoice.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; - -/** - * 公司成本对象 erp_company_cost - * - * @author zhang - * @date 2024-03-05 - */ -public class ErpCompanyCost extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 索引 */ - private Long id; - - /** 公司成本ID */ - @Excel(name = "公司成本ID") - private String ctcId; - - /** 年份 */ - @Excel(name = "年份") - private Integer year; - - /** 月份 */ - @Excel(name = "月份") - private Integer month; - - /** 经营成本 */ - @Excel(name = "经营成本") - private BigDecimal opex; - - /** 业务成本 */ - @Excel(name = "业务成本") - private BigDecimal cob; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setCtcId(String ctcId) - { - this.ctcId = ctcId; - } - - public String getCtcId() - { - return ctcId; - } - public void setYear(Integer year) - { - this.year = year; - } - - public Integer getYear() - { - return year; - } - public void setMonth(Integer month) - { - this.month = month; - } - - public Integer getMonth() - { - return month; - } - public void setOpex(BigDecimal opex) - { - this.opex = opex; - } - - public BigDecimal getOpex() - { - return opex; - } - public void setCob(BigDecimal cob) - { - this.cob = cob; - } - - public BigDecimal getCob() - { - return cob; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("ctcId", getCtcId()) - .append("year", getYear()) - .append("month", getMonth()) - .append("opex", getOpex()) - .append("cob", getCob()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateTime", getUpdateTime()) - .append("updateBy", getUpdateBy()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/mapper/ErpCompanyCostMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/mapper/ErpCompanyCostMapper.java deleted file mode 100644 index 41aa8554..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/mapper/ErpCompanyCostMapper.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.ruoyi.taxInvoice.mapper; - -import java.util.List; -import com.ruoyi.taxInvoice.domain.ErpCompanyCost; - -/** - * 公司成本Mapper接口 - * - * @author zhang - * @date 2024-03-05 - */ -public interface ErpCompanyCostMapper -{ - /** - * 查询公司成本 - * - * @param id 公司成本ID - * @return 公司成本 - */ - public ErpCompanyCost selectErpCompanyCostById(Long id); - - /** - * 查询公司成本列表 - * - * @param erpCompanyCost 公司成本 - * @return 公司成本集合 - */ - public List selectErpCompanyCostList(ErpCompanyCost erpCompanyCost); - - /** - * 新增公司成本 - * - * @param erpCompanyCost 公司成本 - * @return 结果 - */ - public int insertErpCompanyCost(ErpCompanyCost erpCompanyCost); - - /** - * 修改公司成本 - * - * @param erpCompanyCost 公司成本 - * @return 结果 - */ - public int updateErpCompanyCost(ErpCompanyCost erpCompanyCost); - - /** - * 删除公司成本 - * - * @param id 公司成本ID - * @return 结果 - */ - public int deleteErpCompanyCostById(Long id); - - /** - * 批量删除公司成本 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteErpCompanyCostByIds(String[] ids); - - /** - * 作废公司成本 - * - * @param id 公司成本ID - * @return 结果 - */ - public int cancelErpCompanyCostById(Long id); - - /** - * 恢复公司成本 - * - * @param id 公司成本ID - * @return 结果 - */ - public int restoreErpCompanyCostById(Long id); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/service/IErpCompanyCostService.java b/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/service/IErpCompanyCostService.java deleted file mode 100644 index 9595db6d..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/service/IErpCompanyCostService.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.ruoyi.taxInvoice.service; - -import java.util.List; -import com.ruoyi.taxInvoice.domain.ErpCompanyCost; - -/** - * 公司成本Service接口 - * - * @author zhang - * @date 2024-03-05 - */ -public interface IErpCompanyCostService -{ - /** - * 查询公司成本 - * - * @param id 公司成本ID - * @return 公司成本 - */ - public ErpCompanyCost selectErpCompanyCostById(Long id); - - /** - * 查询公司成本列表 - * - * @param erpCompanyCost 公司成本 - * @return 公司成本集合 - */ - public List selectErpCompanyCostList(ErpCompanyCost erpCompanyCost); - - /** - * 新增公司成本 - * - * @param erpCompanyCost 公司成本 - * @return 结果 - */ - public int insertErpCompanyCost(ErpCompanyCost erpCompanyCost); - - /** - * 修改公司成本 - * - * @param erpCompanyCost 公司成本 - * @return 结果 - */ - public int updateErpCompanyCost(ErpCompanyCost erpCompanyCost); - - /** - * 批量删除公司成本 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteErpCompanyCostByIds(String ids); - - /** - * 删除公司成本信息 - * - * @param id 公司成本ID - * @return 结果 - */ - public int deleteErpCompanyCostById(Long id); - - /** - * 作废公司成本 - * @param id 公司成本ID - * @return - */ - int cancelErpCompanyCostById(Long id); - - /** - * 恢复公司成本 - * @param id 公司成本ID - * @return - */ - int restoreErpCompanyCostById(Long id); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/service/impl/ErpCompanyCostServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/service/impl/ErpCompanyCostServiceImpl.java deleted file mode 100644 index e7112853..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/taxInvoice/service/impl/ErpCompanyCostServiceImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.ruoyi.taxInvoice.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.taxInvoice.mapper.ErpCompanyCostMapper; -import com.ruoyi.taxInvoice.domain.ErpCompanyCost; -import com.ruoyi.taxInvoice.service.IErpCompanyCostService; -import com.ruoyi.common.core.text.Convert; - -/** - * 公司成本Service业务层处理 - * - * @author zhang - * @date 2024-03-05 - */ -@Service -public class ErpCompanyCostServiceImpl implements IErpCompanyCostService -{ - @Autowired - private ErpCompanyCostMapper erpCompanyCostMapper; - - /** - * 查询公司成本 - * - * @param id 公司成本ID - * @return 公司成本 - */ - @Override - public ErpCompanyCost selectErpCompanyCostById(Long id) - { - return erpCompanyCostMapper.selectErpCompanyCostById(id); - } - - /** - * 查询公司成本列表 - * - * @param erpCompanyCost 公司成本 - * @return 公司成本 - */ - @Override - public List selectErpCompanyCostList(ErpCompanyCost erpCompanyCost) - { - return erpCompanyCostMapper.selectErpCompanyCostList(erpCompanyCost); - } - - /** - * 新增公司成本 - * - * @param erpCompanyCost 公司成本 - * @return 结果 - */ - @Override - public int insertErpCompanyCost(ErpCompanyCost erpCompanyCost) - { - String loginName = ShiroUtils.getLoginName(); - erpCompanyCost.setCreateBy(loginName); - erpCompanyCost.setCreateTime(DateUtils.getNowDate()); - return erpCompanyCostMapper.insertErpCompanyCost(erpCompanyCost); - } - - /** - * 修改公司成本 - * - * @param erpCompanyCost 公司成本 - * @return 结果 - */ - @Override - public int updateErpCompanyCost(ErpCompanyCost erpCompanyCost) - { - erpCompanyCost.setUpdateTime(DateUtils.getNowDate()); - String loginName = ShiroUtils.getLoginName(); - erpCompanyCost.setUpdateBy(loginName); - return erpCompanyCostMapper.updateErpCompanyCost(erpCompanyCost); - } - - /** - * 删除公司成本对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteErpCompanyCostByIds(String ids) - { - return erpCompanyCostMapper.deleteErpCompanyCostByIds(Convert.toStrArray(ids)); - } - - /** - * 删除公司成本信息 - * - * @param id 公司成本ID - * @return 结果 - */ - @Override - public int deleteErpCompanyCostById(Long id) - { - return erpCompanyCostMapper.deleteErpCompanyCostById(id); - } - - /** - * 作废公司成本 - * - * @param id 公司成本ID - * @return 结果 - */ - @Override - public int cancelErpCompanyCostById(Long id) - { - return erpCompanyCostMapper.cancelErpCompanyCostById(id); - } - - /** - * 恢复公司成本信息 - * - * @param id 公司成本ID - * @return 结果 - */ - @Override - public int restoreErpCompanyCostById(Long id) - { - return erpCompanyCostMapper.restoreErpCompanyCostById(id); - } -} diff --git a/ruoyi-admin/src/main/resources/mapper/financial/CompanyCostMapper.xml b/ruoyi-admin/src/main/resources/mapper/financial/CompanyCostMapper.xml new file mode 100644 index 00000000..c7eea03a --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/financial/CompanyCostMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, ctc_id, year, month, operating_costs, salary_expenses, + factory_rental_fees, tax_expenses, factory_electricity_fees, + ohter_expenses, business_cost, transportation_costs, promotion_expenses, + packaging_cost, business_expenses, after_sales_expenses, business_commission, + create_time, create_by, update_time, update_by, remark + from financial_company_cost + + + + + + + + insert into financial_company_cost + + id, + ctc_id, + year, + month, + operating_costs, + salary_expenses, + factory_rental_fees, + tax_expenses, + factory_electricity_fees, + ohter_expenses, + business_cost, + transportation_costs, + promotion_expenses, + packaging_cost, + business_expenses, + after_sales_expenses, + business_commission, + create_time, + create_by, + update_time, + update_by, + remark, + + + #{id}, + #{ctcId}, + #{year}, + #{month}, + #{operatingCosts}, + #{salaryExpenses}, + #{factoryRentalFees}, + #{taxExpenses}, + #{factoryElectricityFees}, + #{ohterExpenses}, + #{businessCost}, + #{transportationCosts}, + #{promotionExpenses}, + #{packagingCost}, + #{businessExpenses}, + #{afterSalesExpenses}, + #{businessCommission}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + #{remark}, + + + + + update financial_company_cost + + ctc_id = #{ctcId}, + year = #{year}, + month = #{month}, + operating_costs = #{operatingCosts}, + salary_expenses = #{salaryExpenses}, + factory_rental_fees = #{factoryRentalFees}, + tax_expenses = #{taxExpenses}, + factory_electricity_fees = #{factoryElectricityFees}, + ohter_expenses = #{ohterExpenses}, + business_cost = #{businessCost}, + transportation_costs = #{transportationCosts}, + promotion_expenses = #{promotionExpenses}, + packaging_cost = #{packagingCost}, + business_expenses = #{businessExpenses}, + after_sales_expenses = #{afterSalesExpenses}, + business_commission = #{businessCommission}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + remark = #{remark}, + + where id = #{id} + + + + delete from financial_company_cost where id = #{id} + + + delete from financial_company_cost where id in + + #{id} + + + + delete from financial_company_cost where ctc_id = #{ctcId} + + + delete from financial_company_cost where ctc_id in + + #{ctcId} + + + + update financial_company_cost set del_flag = '1' where id = #{id} + + + + update financial_company_cost set del_flag = '0' where id = #{id} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml index b0da17cb..b5566728 100644 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml @@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and use_status = #{useStatus} and audit_status = #{auditStatus} + order by create_time desc - - - and ctc_id = #{ctcId} - and year = #{year} - and month = #{month} - and create_time between #{params.beginCreateTime} and #{params.endCreateTime} - - - - - - - insert into erp_company_cost - - id, - ctc_id, - year, - month, - opex, - cob, - create_by, - create_time, - update_time, - update_by, - remark, - - - #{id}, - #{ctcId}, - #{year}, - #{month}, - #{opex}, - #{cob}, - #{createBy}, - #{createTime}, - #{updateTime}, - #{updateBy}, - #{remark}, - - - - - update erp_company_cost - - ctc_id = #{ctcId}, - year = #{year}, - month = #{month}, - opex = #{opex}, - cob = #{cob}, - create_by = #{createBy}, - create_time = #{createTime}, - update_time = #{updateTime}, - update_by = #{updateBy}, - remark = #{remark}, - - where id = #{id} - - - - delete from erp_company_cost where id = #{id} - - - - delete from erp_company_cost where id in - - #{id} - - - - - update erp_company_cost set del_flag = '1' where id = #{id} - - - - update erp_company_cost set del_flag = '0' where id = #{id} - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/compantFixedAssets/add.html b/ruoyi-admin/src/main/resources/templates/financial/compantFixedAssets/add.html index 81fe1b13..a7695515 100644 --- a/ruoyi-admin/src/main/resources/templates/financial/compantFixedAssets/add.html +++ b/ruoyi-admin/src/main/resources/templates/financial/compantFixedAssets/add.html @@ -19,9 +19,8 @@
- + +
@@ -129,7 +128,10 @@
- +
+ + % +
@@ -192,42 +194,12 @@ // minimumInputLength: 1 } }); - $("#compant_materialName").select2({ - theme: "bootstrap", - allowClear: true, - placeholder: "请选择物料", - ajax:{ - type: "post", - url:ctx + "erp/material/getMaterialSelList", - dataType:"json", - delay:250, - cache:true, - processResults: function (res, params) { - var resultList = res.data; - var options = []; - for(let i in resultList){ - var option = resultList[i]; - option.id = resultList[i]["materialName"]; - option.text = resultList[i]["materialName"]; - option.title = resultList[i]["materialNo"]; - options.push(option); - } - return {results: options, pagination: {}}; - },escapeMarkup: function (markup) { return markup; }, - } - }); }); $("#compant_materialCode").on('select2:select', function (e){ var dataObj = e.params.data; console.log(dataObj); - $("#compant_materialName").val(dataObj.materialName).trigger('change'); - }); - - $("#compant_materialName").on('select2:select', function (e){ - var dataObj = e.params.data; - console.log(dataObj); - $("#compant_materialCode").val(dataObj.materialNo).trigger('change'); + $("input[name='materialName']").val(dataObj.materialName).trigger('change'); }); function submitHandler() { if ($.validate.form()) { diff --git a/ruoyi-admin/src/main/resources/templates/financial/companyCost/add.html b/ruoyi-admin/src/main/resources/templates/financial/companyCost/add.html new file mode 100644 index 00000000..6cb2e2ee --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/companyCost/add.html @@ -0,0 +1,127 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/companyCost/compantCost.html b/ruoyi-admin/src/main/resources/templates/financial/companyCost/compantCost.html new file mode 100644 index 00000000..a2d1bc8d --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/companyCost/compantCost.html @@ -0,0 +1,117 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ +
+ + 添加 + + + + + + + + + + +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/companyCost/edit.html b/ruoyi-admin/src/main/resources/templates/financial/companyCost/edit.html new file mode 100644 index 00000000..cd5bcf8d --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/companyCost/edit.html @@ -0,0 +1,128 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/add.html b/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/add.html deleted file mode 100644 index a5b55ed6..00000000 --- a/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/add.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/companyCost.html b/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/companyCost.html deleted file mode 100644 index 9c5d1e1b..00000000 --- a/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/companyCost.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - - - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/edit.html b/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/edit.html deleted file mode 100644 index 624cc2b8..00000000 --- a/ruoyi-admin/src/main/resources/templates/taxInvoice/companyCost/edit.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - \ No newline at end of file