feat(cost): 添加成本管理系统核心功能模块
- 实现成本项目配置管理,包括增删改查和导出功能 - 实现成本单价历史记录功能,支持按时间追溯价格变化 - 实现生产成本明细管理,记录各班次的详细成本数据 - 集成权限控制和操作日志记录功能 - 提供完整的CRUD接口和数据持久化支持 - 集成Excel导入导出功能便于数据统计分析
This commit is contained in:
8
pom.xml
8
pom.xml
@@ -225,6 +225,13 @@
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 成本管理模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-cost</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
@@ -248,6 +255,7 @@
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>ruoyi-mill</module>
|
||||
<module>ruoyi-cost</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
||||
@@ -67,6 +67,12 @@
|
||||
<artifactId>ruoyi-mill</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 成本管理模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-cost</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.cost.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.cost.domain.CostItem;
|
||||
import com.ruoyi.cost.service.ICostItemService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 成本项目配置Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cost/item")
|
||||
public class CostItemController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICostItemService costItemService;
|
||||
|
||||
/**
|
||||
* 查询成本项目配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:item:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CostItem costItem)
|
||||
{
|
||||
startPage();
|
||||
List<CostItem> list = costItemService.selectCostItemList(costItem);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出成本项目配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:item:export')")
|
||||
@Log(title = "成本项目配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CostItem costItem)
|
||||
{
|
||||
List<CostItem> list = costItemService.selectCostItemList(costItem);
|
||||
ExcelUtil<CostItem> util = new ExcelUtil<CostItem>(CostItem.class);
|
||||
util.exportExcel(response, list, "成本项目配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取成本项目配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:item:query')")
|
||||
@GetMapping(value = "/{itemId}")
|
||||
public AjaxResult getInfo(@PathVariable("itemId") Long itemId)
|
||||
{
|
||||
return success(costItemService.selectCostItemByItemId(itemId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成本项目配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:item:add')")
|
||||
@Log(title = "成本项目配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CostItem costItem)
|
||||
{
|
||||
return toAjax(costItemService.insertCostItem(costItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成本项目配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:item:edit')")
|
||||
@Log(title = "成本项目配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CostItem costItem)
|
||||
{
|
||||
return toAjax(costItemService.updateCostItem(costItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成本项目配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:item:remove')")
|
||||
@Log(title = "成本项目配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{itemIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] itemIds)
|
||||
{
|
||||
return toAjax(costItemService.deleteCostItemByItemIds(itemIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.cost.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.cost.domain.CostPrice;
|
||||
import com.ruoyi.cost.service.ICostPriceService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 成本单价历史Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cost/price")
|
||||
public class CostPriceController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICostPriceService costPriceService;
|
||||
|
||||
/**
|
||||
* 查询成本单价历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:price:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CostPrice costPrice)
|
||||
{
|
||||
startPage();
|
||||
List<CostPrice> list = costPriceService.selectCostPriceList(costPrice);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出成本单价历史列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:price:export')")
|
||||
@Log(title = "成本单价历史", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CostPrice costPrice)
|
||||
{
|
||||
List<CostPrice> list = costPriceService.selectCostPriceList(costPrice);
|
||||
ExcelUtil<CostPrice> util = new ExcelUtil<CostPrice>(CostPrice.class);
|
||||
util.exportExcel(response, list, "成本单价历史数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取成本单价历史详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:price:query')")
|
||||
@GetMapping(value = "/{priceId}")
|
||||
public AjaxResult getInfo(@PathVariable("priceId") Long priceId)
|
||||
{
|
||||
return success(costPriceService.selectCostPriceByPriceId(priceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成本单价历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:price:add')")
|
||||
@Log(title = "成本单价历史", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CostPrice costPrice)
|
||||
{
|
||||
return toAjax(costPriceService.insertCostPrice(costPrice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成本单价历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:price:edit')")
|
||||
@Log(title = "成本单价历史", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CostPrice costPrice)
|
||||
{
|
||||
return toAjax(costPriceService.updateCostPrice(costPrice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成本单价历史
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:price:remove')")
|
||||
@Log(title = "成本单价历史", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{priceIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] priceIds)
|
||||
{
|
||||
return toAjax(costPriceService.deleteCostPriceByPriceIds(priceIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.cost.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.cost.domain.CostProdDetail;
|
||||
import com.ruoyi.cost.service.ICostProdDetailService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 生产成本明细Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cost/detail")
|
||||
public class CostProdDetailController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICostProdDetailService costProdDetailService;
|
||||
|
||||
/**
|
||||
* 查询生产成本明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:detail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CostProdDetail costProdDetail)
|
||||
{
|
||||
startPage();
|
||||
List<CostProdDetail> list = costProdDetailService.selectCostProdDetailList(costProdDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产成本明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:detail:export')")
|
||||
@Log(title = "生产成本明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CostProdDetail costProdDetail)
|
||||
{
|
||||
List<CostProdDetail> list = costProdDetailService.selectCostProdDetailList(costProdDetail);
|
||||
ExcelUtil<CostProdDetail> util = new ExcelUtil<CostProdDetail>(CostProdDetail.class);
|
||||
util.exportExcel(response, list, "生产成本明细数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产成本明细详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:detail:query')")
|
||||
@GetMapping(value = "/{detailId}")
|
||||
public AjaxResult getInfo(@PathVariable("detailId") Long detailId)
|
||||
{
|
||||
return success(costProdDetailService.selectCostProdDetailByDetailId(detailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产成本明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:detail:add')")
|
||||
@Log(title = "生产成本明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CostProdDetail costProdDetail)
|
||||
{
|
||||
return toAjax(costProdDetailService.insertCostProdDetail(costProdDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产成本明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:detail:edit')")
|
||||
@Log(title = "生产成本明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CostProdDetail costProdDetail)
|
||||
{
|
||||
return toAjax(costProdDetailService.updateCostProdDetail(costProdDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产成本明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:detail:remove')")
|
||||
@Log(title = "生产成本明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{detailIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] detailIds)
|
||||
{
|
||||
return toAjax(costProdDetailService.deleteCostProdDetailByDetailIds(detailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.cost.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.cost.domain.CostProdMetric;
|
||||
import com.ruoyi.cost.service.ICostProdMetricService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 生产指标明细Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cost/metric")
|
||||
public class CostProdMetricController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICostProdMetricService costProdMetricService;
|
||||
|
||||
/**
|
||||
* 查询生产指标明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:metric:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CostProdMetric costProdMetric)
|
||||
{
|
||||
startPage();
|
||||
List<CostProdMetric> list = costProdMetricService.selectCostProdMetricList(costProdMetric);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产指标明细列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:metric:export')")
|
||||
@Log(title = "生产指标明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CostProdMetric costProdMetric)
|
||||
{
|
||||
List<CostProdMetric> list = costProdMetricService.selectCostProdMetricList(costProdMetric);
|
||||
ExcelUtil<CostProdMetric> util = new ExcelUtil<CostProdMetric>(CostProdMetric.class);
|
||||
util.exportExcel(response, list, "生产指标明细数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产指标明细详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:metric:query')")
|
||||
@GetMapping(value = "/{metricId}")
|
||||
public AjaxResult getInfo(@PathVariable("metricId") Long metricId)
|
||||
{
|
||||
return success(costProdMetricService.selectCostProdMetricByMetricId(metricId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产指标明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:metric:add')")
|
||||
@Log(title = "生产指标明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CostProdMetric costProdMetric)
|
||||
{
|
||||
return toAjax(costProdMetricService.insertCostProdMetric(costProdMetric));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产指标明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:metric:edit')")
|
||||
@Log(title = "生产指标明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CostProdMetric costProdMetric)
|
||||
{
|
||||
return toAjax(costProdMetricService.updateCostProdMetric(costProdMetric));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产指标明细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:metric:remove')")
|
||||
@Log(title = "生产指标明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{metricIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] metricIds)
|
||||
{
|
||||
return toAjax(costProdMetricService.deleteCostProdMetricByMetricIds(metricIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.cost.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.cost.domain.CostProdReport;
|
||||
import com.ruoyi.cost.service.ICostProdReportService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 生产月报Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cost/report")
|
||||
public class CostProdReportController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICostProdReportService costProdReportService;
|
||||
|
||||
/**
|
||||
* 查询生产月报列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:report:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CostProdReport costProdReport)
|
||||
{
|
||||
startPage();
|
||||
List<CostProdReport> list = costProdReportService.selectCostProdReportList(costProdReport);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产月报列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:report:export')")
|
||||
@Log(title = "生产月报", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CostProdReport costProdReport)
|
||||
{
|
||||
List<CostProdReport> list = costProdReportService.selectCostProdReportList(costProdReport);
|
||||
ExcelUtil<CostProdReport> util = new ExcelUtil<CostProdReport>(CostProdReport.class);
|
||||
util.exportExcel(response, list, "生产月报数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产月报详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:report:query')")
|
||||
@GetMapping(value = "/{reportId}")
|
||||
public AjaxResult getInfo(@PathVariable("reportId") Long reportId)
|
||||
{
|
||||
return success(costProdReportService.selectCostProdReportByReportId(reportId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产月报
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:report:add')")
|
||||
@Log(title = "生产月报", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CostProdReport costProdReport)
|
||||
{
|
||||
return toAjax(costProdReportService.insertCostProdReport(costProdReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产月报
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:report:edit')")
|
||||
@Log(title = "生产月报", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CostProdReport costProdReport)
|
||||
{
|
||||
return toAjax(costProdReportService.updateCostProdReport(costProdReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产月报
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cost:report:remove')")
|
||||
@Log(title = "生产月报", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reportIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] reportIds)
|
||||
{
|
||||
return toAjax(costProdReportService.deleteCostProdReportByReportIds(reportIds));
|
||||
}
|
||||
}
|
||||
131
ruoyi-cost/src/main/java/com/ruoyi/cost/domain/CostItem.java
Normal file
131
ruoyi-cost/src/main/java/com/ruoyi/cost/domain/CostItem.java
Normal file
@@ -0,0 +1,131 @@
|
||||
package com.ruoyi.cost.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 成本项目配置对象 cost_item
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public class CostItem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long itemId;
|
||||
|
||||
/** 成本项目编码 */
|
||||
@Excel(name = "成本项目编码")
|
||||
private String itemCode;
|
||||
|
||||
/** 成本项目名称 */
|
||||
@Excel(name = "成本项目名称")
|
||||
private String itemName;
|
||||
|
||||
/** 成本分类 原料/能耗/辅料/设备/人工 */
|
||||
@Excel(name = "成本分类 原料/能耗/辅料/设备/人工")
|
||||
private String category;
|
||||
|
||||
/** 计量单位 */
|
||||
@Excel(name = "计量单位")
|
||||
private String unit;
|
||||
|
||||
/** 查询条件(JSON格式) */
|
||||
@Excel(name = "查询条件", readConverterExp = "J=SON格式")
|
||||
private String queryCondition;
|
||||
|
||||
/** 删除标识 0=正常 2=删除 */
|
||||
private Long delFlag;
|
||||
|
||||
public void setItemId(Long itemId)
|
||||
{
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public Long getItemId()
|
||||
{
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemCode(String itemCode)
|
||||
{
|
||||
this.itemCode = itemCode;
|
||||
}
|
||||
|
||||
public String getItemCode()
|
||||
{
|
||||
return itemCode;
|
||||
}
|
||||
|
||||
public void setItemName(String itemName)
|
||||
{
|
||||
this.itemName = itemName;
|
||||
}
|
||||
|
||||
public String getItemName()
|
||||
{
|
||||
return itemName;
|
||||
}
|
||||
|
||||
public void setCategory(String category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getCategory()
|
||||
{
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setQueryCondition(String queryCondition)
|
||||
{
|
||||
this.queryCondition = queryCondition;
|
||||
}
|
||||
|
||||
public String getQueryCondition()
|
||||
{
|
||||
return queryCondition;
|
||||
}
|
||||
|
||||
public void setDelFlag(Long delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Long getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("itemId", getItemId())
|
||||
.append("itemCode", getItemCode())
|
||||
.append("itemName", getItemName())
|
||||
.append("category", getCategory())
|
||||
.append("unit", getUnit())
|
||||
.append("remark", getRemark())
|
||||
.append("queryCondition", getQueryCondition())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
105
ruoyi-cost/src/main/java/com/ruoyi/cost/domain/CostPrice.java
Normal file
105
ruoyi-cost/src/main/java/com/ruoyi/cost/domain/CostPrice.java
Normal file
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.cost.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;
|
||||
|
||||
/**
|
||||
* 成本单价历史对象 cost_price
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public class CostPrice extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long priceId;
|
||||
|
||||
/** 成本项目ID */
|
||||
@Excel(name = "成本项目ID")
|
||||
private Long itemId;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 生效日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生效日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date effectiveDate;
|
||||
|
||||
/** 删除标识 0=正常 2=删除 */
|
||||
private Long delFlag;
|
||||
|
||||
public void setPriceId(Long priceId)
|
||||
{
|
||||
this.priceId = priceId;
|
||||
}
|
||||
|
||||
public Long getPriceId()
|
||||
{
|
||||
return priceId;
|
||||
}
|
||||
|
||||
public void setItemId(Long itemId)
|
||||
{
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public Long getItemId()
|
||||
{
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setEffectiveDate(Date effectiveDate)
|
||||
{
|
||||
this.effectiveDate = effectiveDate;
|
||||
}
|
||||
|
||||
public Date getEffectiveDate()
|
||||
{
|
||||
return effectiveDate;
|
||||
}
|
||||
|
||||
public void setDelFlag(Long delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Long getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("priceId", getPriceId())
|
||||
.append("itemId", getItemId())
|
||||
.append("price", getPrice())
|
||||
.append("effectiveDate", getEffectiveDate())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.ruoyi.cost.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;
|
||||
|
||||
/**
|
||||
* 生产成本明细对象 cost_prod_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public class CostProdDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long detailId;
|
||||
|
||||
/** 生产月报ID */
|
||||
@Excel(name = "生产月报ID")
|
||||
private Long reportId;
|
||||
|
||||
/** 班次 1=甲班 2=乙班 */
|
||||
@Excel(name = "班次 1=甲班 2=乙班")
|
||||
private String shift;
|
||||
|
||||
/** 日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date detailDate;
|
||||
|
||||
/** 成本项目ID */
|
||||
@Excel(name = "成本项目ID")
|
||||
private Long itemId;
|
||||
|
||||
/** 消耗用量 */
|
||||
@Excel(name = "消耗用量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/** 总金额 */
|
||||
@Excel(name = "总金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 删除标识 0=正常 2=删除 */
|
||||
private Long delFlag;
|
||||
|
||||
public void setDetailId(Long detailId)
|
||||
{
|
||||
this.detailId = detailId;
|
||||
}
|
||||
|
||||
public Long getDetailId()
|
||||
{
|
||||
return detailId;
|
||||
}
|
||||
|
||||
public void setReportId(Long reportId)
|
||||
{
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public Long getReportId()
|
||||
{
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public void setShift(String shift)
|
||||
{
|
||||
this.shift = shift;
|
||||
}
|
||||
|
||||
public String getShift()
|
||||
{
|
||||
return shift;
|
||||
}
|
||||
|
||||
public void setDetailDate(Date detailDate)
|
||||
{
|
||||
this.detailDate = detailDate;
|
||||
}
|
||||
|
||||
public Date getDetailDate()
|
||||
{
|
||||
return detailDate;
|
||||
}
|
||||
|
||||
public void setItemId(Long itemId)
|
||||
{
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public Long getItemId()
|
||||
{
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setUnitPrice(BigDecimal unitPrice)
|
||||
{
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice()
|
||||
{
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setDelFlag(Long delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Long getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("detailId", getDetailId())
|
||||
.append("reportId", getReportId())
|
||||
.append("shift", getShift())
|
||||
.append("detailDate", getDetailDate())
|
||||
.append("itemId", getItemId())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("amount", getAmount())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.ruoyi.cost.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;
|
||||
|
||||
/**
|
||||
* 生产指标明细对象 cost_prod_metric
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public class CostProdMetric extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long metricId;
|
||||
|
||||
/** 生产日报ID */
|
||||
@Excel(name = "生产日报ID")
|
||||
private Long reportId;
|
||||
|
||||
/** 指标编码 */
|
||||
@Excel(name = "指标编码")
|
||||
private String metricCode;
|
||||
|
||||
/** 指标名称 */
|
||||
@Excel(name = "指标名称")
|
||||
private String metricName;
|
||||
|
||||
/** 指标计算公式(如:output_weight/input_weight*100) */
|
||||
@Excel(name = "指标计算公式", readConverterExp = "如=:output_weight/input_weight*100")
|
||||
private String metricFormula;
|
||||
|
||||
/** 指标计算结果值 */
|
||||
@Excel(name = "指标计算结果值")
|
||||
private BigDecimal metricValue;
|
||||
|
||||
/** 删除标识 0=正常 2=删除 */
|
||||
private Long delFlag;
|
||||
|
||||
public void setMetricId(Long metricId)
|
||||
{
|
||||
this.metricId = metricId;
|
||||
}
|
||||
|
||||
public Long getMetricId()
|
||||
{
|
||||
return metricId;
|
||||
}
|
||||
|
||||
public void setReportId(Long reportId)
|
||||
{
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public Long getReportId()
|
||||
{
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public void setMetricCode(String metricCode)
|
||||
{
|
||||
this.metricCode = metricCode;
|
||||
}
|
||||
|
||||
public String getMetricCode()
|
||||
{
|
||||
return metricCode;
|
||||
}
|
||||
|
||||
public void setMetricName(String metricName)
|
||||
{
|
||||
this.metricName = metricName;
|
||||
}
|
||||
|
||||
public String getMetricName()
|
||||
{
|
||||
return metricName;
|
||||
}
|
||||
|
||||
public void setMetricFormula(String metricFormula)
|
||||
{
|
||||
this.metricFormula = metricFormula;
|
||||
}
|
||||
|
||||
public String getMetricFormula()
|
||||
{
|
||||
return metricFormula;
|
||||
}
|
||||
|
||||
public void setMetricValue(BigDecimal metricValue)
|
||||
{
|
||||
this.metricValue = metricValue;
|
||||
}
|
||||
|
||||
public BigDecimal getMetricValue()
|
||||
{
|
||||
return metricValue;
|
||||
}
|
||||
|
||||
public void setDelFlag(Long delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Long getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("metricId", getMetricId())
|
||||
.append("reportId", getReportId())
|
||||
.append("metricCode", getMetricCode())
|
||||
.append("metricName", getMetricName())
|
||||
.append("metricFormula", getMetricFormula())
|
||||
.append("metricValue", getMetricValue())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.ruoyi.cost.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;
|
||||
|
||||
/**
|
||||
* 生产月报对象 cost_prod_report
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public class CostProdReport extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long reportId;
|
||||
|
||||
/** 报表标题 */
|
||||
@Excel(name = "报表标题")
|
||||
private String reportTitle;
|
||||
|
||||
/** 报表日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "报表日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date reportDate;
|
||||
|
||||
/** 产线类型 acid=酸轧 galvanized=镀锌 */
|
||||
@Excel(name = "产线类型 acid=酸轧 galvanized=镀锌")
|
||||
private String lineType;
|
||||
|
||||
/** 投入量 单位:吨 */
|
||||
@Excel(name = "投入量 单位:吨")
|
||||
private BigDecimal inputWeight;
|
||||
|
||||
/** 产出量 单位:吨 */
|
||||
@Excel(name = "产出量 单位:吨")
|
||||
private BigDecimal outputWeight;
|
||||
|
||||
/** 删除标识 0=正常 2=删除 */
|
||||
private Long delFlag;
|
||||
|
||||
/** 表格配置 */
|
||||
@Excel(name = "表格配置")
|
||||
private String colConfig;
|
||||
|
||||
public void setReportId(Long reportId)
|
||||
{
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public Long getReportId()
|
||||
{
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public void setReportTitle(String reportTitle)
|
||||
{
|
||||
this.reportTitle = reportTitle;
|
||||
}
|
||||
|
||||
public String getReportTitle()
|
||||
{
|
||||
return reportTitle;
|
||||
}
|
||||
|
||||
public void setReportDate(Date reportDate)
|
||||
{
|
||||
this.reportDate = reportDate;
|
||||
}
|
||||
|
||||
public Date getReportDate()
|
||||
{
|
||||
return reportDate;
|
||||
}
|
||||
|
||||
public void setLineType(String lineType)
|
||||
{
|
||||
this.lineType = lineType;
|
||||
}
|
||||
|
||||
public String getLineType()
|
||||
{
|
||||
return lineType;
|
||||
}
|
||||
|
||||
public void setInputWeight(BigDecimal inputWeight)
|
||||
{
|
||||
this.inputWeight = inputWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getInputWeight()
|
||||
{
|
||||
return inputWeight;
|
||||
}
|
||||
|
||||
public void setOutputWeight(BigDecimal outputWeight)
|
||||
{
|
||||
this.outputWeight = outputWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getOutputWeight()
|
||||
{
|
||||
return outputWeight;
|
||||
}
|
||||
|
||||
public void setDelFlag(Long delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Long getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setColConfig(String colConfig)
|
||||
{
|
||||
this.colConfig = colConfig;
|
||||
}
|
||||
|
||||
public String getColConfig()
|
||||
{
|
||||
return colConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("reportId", getReportId())
|
||||
.append("reportTitle", getReportTitle())
|
||||
.append("reportDate", getReportDate())
|
||||
.append("lineType", getLineType())
|
||||
.append("inputWeight", getInputWeight())
|
||||
.append("outputWeight", getOutputWeight())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("colConfig", getColConfig())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostItem;
|
||||
|
||||
/**
|
||||
* 成本项目配置Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface CostItemMapper
|
||||
{
|
||||
/**
|
||||
* 查询成本项目配置
|
||||
*
|
||||
* @param itemId 成本项目配置主键
|
||||
* @return 成本项目配置
|
||||
*/
|
||||
public CostItem selectCostItemByItemId(Long itemId);
|
||||
|
||||
/**
|
||||
* 查询成本项目配置列表
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 成本项目配置集合
|
||||
*/
|
||||
public List<CostItem> selectCostItemList(CostItem costItem);
|
||||
|
||||
/**
|
||||
* 新增成本项目配置
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostItem(CostItem costItem);
|
||||
|
||||
/**
|
||||
* 修改成本项目配置
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostItem(CostItem costItem);
|
||||
|
||||
/**
|
||||
* 删除成本项目配置
|
||||
*
|
||||
* @param itemId 成本项目配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostItemByItemId(Long itemId);
|
||||
|
||||
/**
|
||||
* 批量删除成本项目配置
|
||||
*
|
||||
* @param itemIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostItemByItemIds(Long[] itemIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostPrice;
|
||||
|
||||
/**
|
||||
* 成本单价历史Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface CostPriceMapper
|
||||
{
|
||||
/**
|
||||
* 查询成本单价历史
|
||||
*
|
||||
* @param priceId 成本单价历史主键
|
||||
* @return 成本单价历史
|
||||
*/
|
||||
public CostPrice selectCostPriceByPriceId(Long priceId);
|
||||
|
||||
/**
|
||||
* 查询成本单价历史列表
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 成本单价历史集合
|
||||
*/
|
||||
public List<CostPrice> selectCostPriceList(CostPrice costPrice);
|
||||
|
||||
/**
|
||||
* 新增成本单价历史
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostPrice(CostPrice costPrice);
|
||||
|
||||
/**
|
||||
* 修改成本单价历史
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostPrice(CostPrice costPrice);
|
||||
|
||||
/**
|
||||
* 删除成本单价历史
|
||||
*
|
||||
* @param priceId 成本单价历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostPriceByPriceId(Long priceId);
|
||||
|
||||
/**
|
||||
* 批量删除成本单价历史
|
||||
*
|
||||
* @param priceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostPriceByPriceIds(Long[] priceIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostProdDetail;
|
||||
|
||||
/**
|
||||
* 生产成本明细Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface CostProdDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产成本明细
|
||||
*
|
||||
* @param detailId 生产成本明细主键
|
||||
* @return 生产成本明细
|
||||
*/
|
||||
public CostProdDetail selectCostProdDetailByDetailId(Long detailId);
|
||||
|
||||
/**
|
||||
* 查询生产成本明细列表
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 生产成本明细集合
|
||||
*/
|
||||
public List<CostProdDetail> selectCostProdDetailList(CostProdDetail costProdDetail);
|
||||
|
||||
/**
|
||||
* 新增生产成本明细
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostProdDetail(CostProdDetail costProdDetail);
|
||||
|
||||
/**
|
||||
* 修改生产成本明细
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostProdDetail(CostProdDetail costProdDetail);
|
||||
|
||||
/**
|
||||
* 删除生产成本明细
|
||||
*
|
||||
* @param detailId 生产成本明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdDetailByDetailId(Long detailId);
|
||||
|
||||
/**
|
||||
* 批量删除生产成本明细
|
||||
*
|
||||
* @param detailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdDetailByDetailIds(Long[] detailIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostProdMetric;
|
||||
|
||||
/**
|
||||
* 生产指标明细Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface CostProdMetricMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产指标明细
|
||||
*
|
||||
* @param metricId 生产指标明细主键
|
||||
* @return 生产指标明细
|
||||
*/
|
||||
public CostProdMetric selectCostProdMetricByMetricId(Long metricId);
|
||||
|
||||
/**
|
||||
* 查询生产指标明细列表
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 生产指标明细集合
|
||||
*/
|
||||
public List<CostProdMetric> selectCostProdMetricList(CostProdMetric costProdMetric);
|
||||
|
||||
/**
|
||||
* 新增生产指标明细
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostProdMetric(CostProdMetric costProdMetric);
|
||||
|
||||
/**
|
||||
* 修改生产指标明细
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostProdMetric(CostProdMetric costProdMetric);
|
||||
|
||||
/**
|
||||
* 删除生产指标明细
|
||||
*
|
||||
* @param metricId 生产指标明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdMetricByMetricId(Long metricId);
|
||||
|
||||
/**
|
||||
* 批量删除生产指标明细
|
||||
*
|
||||
* @param metricIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdMetricByMetricIds(Long[] metricIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostProdReport;
|
||||
|
||||
/**
|
||||
* 生产月报Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface CostProdReportMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产月报
|
||||
*
|
||||
* @param reportId 生产月报主键
|
||||
* @return 生产月报
|
||||
*/
|
||||
public CostProdReport selectCostProdReportByReportId(Long reportId);
|
||||
|
||||
/**
|
||||
* 查询生产月报列表
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 生产月报集合
|
||||
*/
|
||||
public List<CostProdReport> selectCostProdReportList(CostProdReport costProdReport);
|
||||
|
||||
/**
|
||||
* 新增生产月报
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostProdReport(CostProdReport costProdReport);
|
||||
|
||||
/**
|
||||
* 修改生产月报
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostProdReport(CostProdReport costProdReport);
|
||||
|
||||
/**
|
||||
* 删除生产月报
|
||||
*
|
||||
* @param reportId 生产月报主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdReportByReportId(Long reportId);
|
||||
|
||||
/**
|
||||
* 批量删除生产月报
|
||||
*
|
||||
* @param reportIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdReportByReportIds(Long[] reportIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostItem;
|
||||
|
||||
/**
|
||||
* 成本项目配置Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface ICostItemService
|
||||
{
|
||||
/**
|
||||
* 查询成本项目配置
|
||||
*
|
||||
* @param itemId 成本项目配置主键
|
||||
* @return 成本项目配置
|
||||
*/
|
||||
public CostItem selectCostItemByItemId(Long itemId);
|
||||
|
||||
/**
|
||||
* 查询成本项目配置列表
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 成本项目配置集合
|
||||
*/
|
||||
public List<CostItem> selectCostItemList(CostItem costItem);
|
||||
|
||||
/**
|
||||
* 新增成本项目配置
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostItem(CostItem costItem);
|
||||
|
||||
/**
|
||||
* 修改成本项目配置
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostItem(CostItem costItem);
|
||||
|
||||
/**
|
||||
* 批量删除成本项目配置
|
||||
*
|
||||
* @param itemIds 需要删除的成本项目配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostItemByItemIds(Long[] itemIds);
|
||||
|
||||
/**
|
||||
* 删除成本项目配置信息
|
||||
*
|
||||
* @param itemId 成本项目配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostItemByItemId(Long itemId);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostPrice;
|
||||
|
||||
/**
|
||||
* 成本单价历史Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface ICostPriceService
|
||||
{
|
||||
/**
|
||||
* 查询成本单价历史
|
||||
*
|
||||
* @param priceId 成本单价历史主键
|
||||
* @return 成本单价历史
|
||||
*/
|
||||
public CostPrice selectCostPriceByPriceId(Long priceId);
|
||||
|
||||
/**
|
||||
* 查询成本单价历史列表
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 成本单价历史集合
|
||||
*/
|
||||
public List<CostPrice> selectCostPriceList(CostPrice costPrice);
|
||||
|
||||
/**
|
||||
* 新增成本单价历史
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostPrice(CostPrice costPrice);
|
||||
|
||||
/**
|
||||
* 修改成本单价历史
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostPrice(CostPrice costPrice);
|
||||
|
||||
/**
|
||||
* 批量删除成本单价历史
|
||||
*
|
||||
* @param priceIds 需要删除的成本单价历史主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostPriceByPriceIds(Long[] priceIds);
|
||||
|
||||
/**
|
||||
* 删除成本单价历史信息
|
||||
*
|
||||
* @param priceId 成本单价历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostPriceByPriceId(Long priceId);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostProdDetail;
|
||||
|
||||
/**
|
||||
* 生产成本明细Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface ICostProdDetailService
|
||||
{
|
||||
/**
|
||||
* 查询生产成本明细
|
||||
*
|
||||
* @param detailId 生产成本明细主键
|
||||
* @return 生产成本明细
|
||||
*/
|
||||
public CostProdDetail selectCostProdDetailByDetailId(Long detailId);
|
||||
|
||||
/**
|
||||
* 查询生产成本明细列表
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 生产成本明细集合
|
||||
*/
|
||||
public List<CostProdDetail> selectCostProdDetailList(CostProdDetail costProdDetail);
|
||||
|
||||
/**
|
||||
* 新增生产成本明细
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostProdDetail(CostProdDetail costProdDetail);
|
||||
|
||||
/**
|
||||
* 修改生产成本明细
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostProdDetail(CostProdDetail costProdDetail);
|
||||
|
||||
/**
|
||||
* 批量删除生产成本明细
|
||||
*
|
||||
* @param detailIds 需要删除的生产成本明细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdDetailByDetailIds(Long[] detailIds);
|
||||
|
||||
/**
|
||||
* 删除生产成本明细信息
|
||||
*
|
||||
* @param detailId 生产成本明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdDetailByDetailId(Long detailId);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostProdMetric;
|
||||
|
||||
/**
|
||||
* 生产指标明细Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface ICostProdMetricService
|
||||
{
|
||||
/**
|
||||
* 查询生产指标明细
|
||||
*
|
||||
* @param metricId 生产指标明细主键
|
||||
* @return 生产指标明细
|
||||
*/
|
||||
public CostProdMetric selectCostProdMetricByMetricId(Long metricId);
|
||||
|
||||
/**
|
||||
* 查询生产指标明细列表
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 生产指标明细集合
|
||||
*/
|
||||
public List<CostProdMetric> selectCostProdMetricList(CostProdMetric costProdMetric);
|
||||
|
||||
/**
|
||||
* 新增生产指标明细
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostProdMetric(CostProdMetric costProdMetric);
|
||||
|
||||
/**
|
||||
* 修改生产指标明细
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostProdMetric(CostProdMetric costProdMetric);
|
||||
|
||||
/**
|
||||
* 批量删除生产指标明细
|
||||
*
|
||||
* @param metricIds 需要删除的生产指标明细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdMetricByMetricIds(Long[] metricIds);
|
||||
|
||||
/**
|
||||
* 删除生产指标明细信息
|
||||
*
|
||||
* @param metricId 生产指标明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdMetricByMetricId(Long metricId);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.cost.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.cost.domain.CostProdReport;
|
||||
|
||||
/**
|
||||
* 生产月报Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface ICostProdReportService
|
||||
{
|
||||
/**
|
||||
* 查询生产月报
|
||||
*
|
||||
* @param reportId 生产月报主键
|
||||
* @return 生产月报
|
||||
*/
|
||||
public CostProdReport selectCostProdReportByReportId(Long reportId);
|
||||
|
||||
/**
|
||||
* 查询生产月报列表
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 生产月报集合
|
||||
*/
|
||||
public List<CostProdReport> selectCostProdReportList(CostProdReport costProdReport);
|
||||
|
||||
/**
|
||||
* 新增生产月报
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCostProdReport(CostProdReport costProdReport);
|
||||
|
||||
/**
|
||||
* 修改生产月报
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCostProdReport(CostProdReport costProdReport);
|
||||
|
||||
/**
|
||||
* 批量删除生产月报
|
||||
*
|
||||
* @param reportIds 需要删除的生产月报主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdReportByReportIds(Long[] reportIds);
|
||||
|
||||
/**
|
||||
* 删除生产月报信息
|
||||
*
|
||||
* @param reportId 生产月报主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCostProdReportByReportId(Long reportId);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.cost.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cost.mapper.CostItemMapper;
|
||||
import com.ruoyi.cost.domain.CostItem;
|
||||
import com.ruoyi.cost.service.ICostItemService;
|
||||
|
||||
/**
|
||||
* 成本项目配置Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@Service
|
||||
public class CostItemServiceImpl implements ICostItemService
|
||||
{
|
||||
@Autowired
|
||||
private CostItemMapper costItemMapper;
|
||||
|
||||
/**
|
||||
* 查询成本项目配置
|
||||
*
|
||||
* @param itemId 成本项目配置主键
|
||||
* @return 成本项目配置
|
||||
*/
|
||||
@Override
|
||||
public CostItem selectCostItemByItemId(Long itemId)
|
||||
{
|
||||
return costItemMapper.selectCostItemByItemId(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成本项目配置列表
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 成本项目配置
|
||||
*/
|
||||
@Override
|
||||
public List<CostItem> selectCostItemList(CostItem costItem)
|
||||
{
|
||||
return costItemMapper.selectCostItemList(costItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成本项目配置
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCostItem(CostItem costItem)
|
||||
{
|
||||
costItem.setCreateTime(DateUtils.getNowDate());
|
||||
return costItemMapper.insertCostItem(costItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成本项目配置
|
||||
*
|
||||
* @param costItem 成本项目配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCostItem(CostItem costItem)
|
||||
{
|
||||
costItem.setUpdateTime(DateUtils.getNowDate());
|
||||
return costItemMapper.updateCostItem(costItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成本项目配置
|
||||
*
|
||||
* @param itemIds 需要删除的成本项目配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostItemByItemIds(Long[] itemIds)
|
||||
{
|
||||
return costItemMapper.deleteCostItemByItemIds(itemIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成本项目配置信息
|
||||
*
|
||||
* @param itemId 成本项目配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostItemByItemId(Long itemId)
|
||||
{
|
||||
return costItemMapper.deleteCostItemByItemId(itemId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.cost.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cost.mapper.CostPriceMapper;
|
||||
import com.ruoyi.cost.domain.CostPrice;
|
||||
import com.ruoyi.cost.service.ICostPriceService;
|
||||
|
||||
/**
|
||||
* 成本单价历史Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@Service
|
||||
public class CostPriceServiceImpl implements ICostPriceService
|
||||
{
|
||||
@Autowired
|
||||
private CostPriceMapper costPriceMapper;
|
||||
|
||||
/**
|
||||
* 查询成本单价历史
|
||||
*
|
||||
* @param priceId 成本单价历史主键
|
||||
* @return 成本单价历史
|
||||
*/
|
||||
@Override
|
||||
public CostPrice selectCostPriceByPriceId(Long priceId)
|
||||
{
|
||||
return costPriceMapper.selectCostPriceByPriceId(priceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成本单价历史列表
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 成本单价历史
|
||||
*/
|
||||
@Override
|
||||
public List<CostPrice> selectCostPriceList(CostPrice costPrice)
|
||||
{
|
||||
return costPriceMapper.selectCostPriceList(costPrice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成本单价历史
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCostPrice(CostPrice costPrice)
|
||||
{
|
||||
costPrice.setCreateTime(DateUtils.getNowDate());
|
||||
return costPriceMapper.insertCostPrice(costPrice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成本单价历史
|
||||
*
|
||||
* @param costPrice 成本单价历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCostPrice(CostPrice costPrice)
|
||||
{
|
||||
costPrice.setUpdateTime(DateUtils.getNowDate());
|
||||
return costPriceMapper.updateCostPrice(costPrice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成本单价历史
|
||||
*
|
||||
* @param priceIds 需要删除的成本单价历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostPriceByPriceIds(Long[] priceIds)
|
||||
{
|
||||
return costPriceMapper.deleteCostPriceByPriceIds(priceIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成本单价历史信息
|
||||
*
|
||||
* @param priceId 成本单价历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostPriceByPriceId(Long priceId)
|
||||
{
|
||||
return costPriceMapper.deleteCostPriceByPriceId(priceId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.cost.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cost.mapper.CostProdDetailMapper;
|
||||
import com.ruoyi.cost.domain.CostProdDetail;
|
||||
import com.ruoyi.cost.service.ICostProdDetailService;
|
||||
|
||||
/**
|
||||
* 生产成本明细Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@Service
|
||||
public class CostProdDetailServiceImpl implements ICostProdDetailService
|
||||
{
|
||||
@Autowired
|
||||
private CostProdDetailMapper costProdDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询生产成本明细
|
||||
*
|
||||
* @param detailId 生产成本明细主键
|
||||
* @return 生产成本明细
|
||||
*/
|
||||
@Override
|
||||
public CostProdDetail selectCostProdDetailByDetailId(Long detailId)
|
||||
{
|
||||
return costProdDetailMapper.selectCostProdDetailByDetailId(detailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产成本明细列表
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 生产成本明细
|
||||
*/
|
||||
@Override
|
||||
public List<CostProdDetail> selectCostProdDetailList(CostProdDetail costProdDetail)
|
||||
{
|
||||
return costProdDetailMapper.selectCostProdDetailList(costProdDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产成本明细
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCostProdDetail(CostProdDetail costProdDetail)
|
||||
{
|
||||
costProdDetail.setCreateTime(DateUtils.getNowDate());
|
||||
return costProdDetailMapper.insertCostProdDetail(costProdDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产成本明细
|
||||
*
|
||||
* @param costProdDetail 生产成本明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCostProdDetail(CostProdDetail costProdDetail)
|
||||
{
|
||||
costProdDetail.setUpdateTime(DateUtils.getNowDate());
|
||||
return costProdDetailMapper.updateCostProdDetail(costProdDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除生产成本明细
|
||||
*
|
||||
* @param detailIds 需要删除的生产成本明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostProdDetailByDetailIds(Long[] detailIds)
|
||||
{
|
||||
return costProdDetailMapper.deleteCostProdDetailByDetailIds(detailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产成本明细信息
|
||||
*
|
||||
* @param detailId 生产成本明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostProdDetailByDetailId(Long detailId)
|
||||
{
|
||||
return costProdDetailMapper.deleteCostProdDetailByDetailId(detailId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.cost.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cost.mapper.CostProdMetricMapper;
|
||||
import com.ruoyi.cost.domain.CostProdMetric;
|
||||
import com.ruoyi.cost.service.ICostProdMetricService;
|
||||
|
||||
/**
|
||||
* 生产指标明细Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@Service
|
||||
public class CostProdMetricServiceImpl implements ICostProdMetricService
|
||||
{
|
||||
@Autowired
|
||||
private CostProdMetricMapper costProdMetricMapper;
|
||||
|
||||
/**
|
||||
* 查询生产指标明细
|
||||
*
|
||||
* @param metricId 生产指标明细主键
|
||||
* @return 生产指标明细
|
||||
*/
|
||||
@Override
|
||||
public CostProdMetric selectCostProdMetricByMetricId(Long metricId)
|
||||
{
|
||||
return costProdMetricMapper.selectCostProdMetricByMetricId(metricId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产指标明细列表
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 生产指标明细
|
||||
*/
|
||||
@Override
|
||||
public List<CostProdMetric> selectCostProdMetricList(CostProdMetric costProdMetric)
|
||||
{
|
||||
return costProdMetricMapper.selectCostProdMetricList(costProdMetric);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产指标明细
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCostProdMetric(CostProdMetric costProdMetric)
|
||||
{
|
||||
costProdMetric.setCreateTime(DateUtils.getNowDate());
|
||||
return costProdMetricMapper.insertCostProdMetric(costProdMetric);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产指标明细
|
||||
*
|
||||
* @param costProdMetric 生产指标明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCostProdMetric(CostProdMetric costProdMetric)
|
||||
{
|
||||
costProdMetric.setUpdateTime(DateUtils.getNowDate());
|
||||
return costProdMetricMapper.updateCostProdMetric(costProdMetric);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除生产指标明细
|
||||
*
|
||||
* @param metricIds 需要删除的生产指标明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostProdMetricByMetricIds(Long[] metricIds)
|
||||
{
|
||||
return costProdMetricMapper.deleteCostProdMetricByMetricIds(metricIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产指标明细信息
|
||||
*
|
||||
* @param metricId 生产指标明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostProdMetricByMetricId(Long metricId)
|
||||
{
|
||||
return costProdMetricMapper.deleteCostProdMetricByMetricId(metricId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.cost.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cost.mapper.CostProdReportMapper;
|
||||
import com.ruoyi.cost.domain.CostProdReport;
|
||||
import com.ruoyi.cost.service.ICostProdReportService;
|
||||
|
||||
/**
|
||||
* 生产月报Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
@Service
|
||||
public class CostProdReportServiceImpl implements ICostProdReportService
|
||||
{
|
||||
@Autowired
|
||||
private CostProdReportMapper costProdReportMapper;
|
||||
|
||||
/**
|
||||
* 查询生产月报
|
||||
*
|
||||
* @param reportId 生产月报主键
|
||||
* @return 生产月报
|
||||
*/
|
||||
@Override
|
||||
public CostProdReport selectCostProdReportByReportId(Long reportId)
|
||||
{
|
||||
return costProdReportMapper.selectCostProdReportByReportId(reportId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产月报列表
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 生产月报
|
||||
*/
|
||||
@Override
|
||||
public List<CostProdReport> selectCostProdReportList(CostProdReport costProdReport)
|
||||
{
|
||||
return costProdReportMapper.selectCostProdReportList(costProdReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产月报
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCostProdReport(CostProdReport costProdReport)
|
||||
{
|
||||
costProdReport.setCreateTime(DateUtils.getNowDate());
|
||||
return costProdReportMapper.insertCostProdReport(costProdReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产月报
|
||||
*
|
||||
* @param costProdReport 生产月报
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCostProdReport(CostProdReport costProdReport)
|
||||
{
|
||||
costProdReport.setUpdateTime(DateUtils.getNowDate());
|
||||
return costProdReportMapper.updateCostProdReport(costProdReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除生产月报
|
||||
*
|
||||
* @param reportIds 需要删除的生产月报主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostProdReportByReportIds(Long[] reportIds)
|
||||
{
|
||||
return costProdReportMapper.deleteCostProdReportByReportIds(reportIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产月报信息
|
||||
*
|
||||
* @param reportId 生产月报主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCostProdReportByReportId(Long reportId)
|
||||
{
|
||||
return costProdReportMapper.deleteCostProdReportByReportId(reportId);
|
||||
}
|
||||
}
|
||||
100
ruoyi-cost/src/main/resources/mapper/cost/CostItemMapper.xml
Normal file
100
ruoyi-cost/src/main/resources/mapper/cost/CostItemMapper.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cost.mapper.CostItemMapper">
|
||||
|
||||
<resultMap type="CostItem" id="CostItemResult">
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
<result property="category" column="category" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="queryCondition" column="query_condition" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCostItemVo">
|
||||
select item_id, item_code, item_name, category, unit, remark, query_condition, del_flag, create_by, create_time, update_by, update_time from cost_item
|
||||
</sql>
|
||||
|
||||
<select id="selectCostItemList" parameterType="CostItem" resultMap="CostItemResult">
|
||||
<include refid="selectCostItemVo"/>
|
||||
<where>
|
||||
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||
<if test="category != null and category != ''"> and category = #{category}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="queryCondition != null and queryCondition != ''"> and query_condition = #{queryCondition}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCostItemByItemId" parameterType="Long" resultMap="CostItemResult">
|
||||
<include refid="selectCostItemVo"/>
|
||||
where item_id = #{itemId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCostItem" parameterType="CostItem" useGeneratedKeys="true" keyProperty="itemId">
|
||||
insert into cost_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="itemCode != null">item_code,</if>
|
||||
<if test="itemName != null">item_name,</if>
|
||||
<if test="category != null">category,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="queryCondition != null">query_condition,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="itemCode != null">#{itemCode},</if>
|
||||
<if test="itemName != null">#{itemName},</if>
|
||||
<if test="category != null">#{category},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="queryCondition != null">#{queryCondition},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCostItem" parameterType="CostItem">
|
||||
update cost_item
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="itemCode != null">item_code = #{itemCode},</if>
|
||||
<if test="itemName != null">item_name = #{itemName},</if>
|
||||
<if test="category != null">category = #{category},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="queryCondition != null">query_condition = #{queryCondition},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where item_id = #{itemId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCostItemByItemId" parameterType="Long">
|
||||
delete from cost_item where item_id = #{itemId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCostItemByItemIds" parameterType="String">
|
||||
delete from cost_item where item_id in
|
||||
<foreach item="itemId" collection="array" open="(" separator="," close=")">
|
||||
#{itemId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cost.mapper.CostPriceMapper">
|
||||
|
||||
<resultMap type="CostPrice" id="CostPriceResult">
|
||||
<result property="priceId" column="price_id" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="price" column="price" />
|
||||
<result property="effectiveDate" column="effective_date" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCostPriceVo">
|
||||
select price_id, item_id, price, effective_date, remark, del_flag, create_by, create_time, update_by, update_time from cost_price
|
||||
</sql>
|
||||
|
||||
<select id="selectCostPriceList" parameterType="CostPrice" resultMap="CostPriceResult">
|
||||
<include refid="selectCostPriceVo"/>
|
||||
<where>
|
||||
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||
<if test="price != null "> and price = #{price}</if>
|
||||
<if test="effectiveDate != null "> and effective_date = #{effectiveDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCostPriceByPriceId" parameterType="Long" resultMap="CostPriceResult">
|
||||
<include refid="selectCostPriceVo"/>
|
||||
where price_id = #{priceId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCostPrice" parameterType="CostPrice" useGeneratedKeys="true" keyProperty="priceId">
|
||||
insert into cost_price
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="itemId != null">item_id,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="effectiveDate != null">effective_date,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="itemId != null">#{itemId},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="effectiveDate != null">#{effectiveDate},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCostPrice" parameterType="CostPrice">
|
||||
update cost_price
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="itemId != null">item_id = #{itemId},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="effectiveDate != null">effective_date = #{effectiveDate},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where price_id = #{priceId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCostPriceByPriceId" parameterType="Long">
|
||||
delete from cost_price where price_id = #{priceId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCostPriceByPriceIds" parameterType="String">
|
||||
delete from cost_price where price_id in
|
||||
<foreach item="priceId" collection="array" open="(" separator="," close=")">
|
||||
#{priceId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cost.mapper.CostProdDetailMapper">
|
||||
|
||||
<resultMap type="CostProdDetail" id="CostProdDetailResult">
|
||||
<result property="detailId" column="detail_id" />
|
||||
<result property="reportId" column="report_id" />
|
||||
<result property="shift" column="shift" />
|
||||
<result property="detailDate" column="detail_date" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="unitPrice" column="unit_price" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCostProdDetailVo">
|
||||
select detail_id, report_id, shift, detail_date, item_id, quantity, unit_price, amount, remark, del_flag, create_by, create_time, update_by, update_time from cost_prod_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectCostProdDetailList" parameterType="CostProdDetail" resultMap="CostProdDetailResult">
|
||||
<include refid="selectCostProdDetailVo"/>
|
||||
<where>
|
||||
<if test="reportId != null "> and report_id = #{reportId}</if>
|
||||
<if test="shift != null and shift != ''"> and shift = #{shift}</if>
|
||||
<if test="detailDate != null "> and detail_date = #{detailDate}</if>
|
||||
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||||
<if test="amount != null "> and amount = #{amount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCostProdDetailByDetailId" parameterType="Long" resultMap="CostProdDetailResult">
|
||||
<include refid="selectCostProdDetailVo"/>
|
||||
where detail_id = #{detailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCostProdDetail" parameterType="CostProdDetail" useGeneratedKeys="true" keyProperty="detailId">
|
||||
insert into cost_prod_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="reportId != null">report_id,</if>
|
||||
<if test="shift != null">shift,</if>
|
||||
<if test="detailDate != null">detail_date,</if>
|
||||
<if test="itemId != null">item_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="unitPrice != null">unit_price,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="reportId != null">#{reportId},</if>
|
||||
<if test="shift != null">#{shift},</if>
|
||||
<if test="detailDate != null">#{detailDate},</if>
|
||||
<if test="itemId != null">#{itemId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="unitPrice != null">#{unitPrice},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCostProdDetail" parameterType="CostProdDetail">
|
||||
update cost_prod_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="reportId != null">report_id = #{reportId},</if>
|
||||
<if test="shift != null">shift = #{shift},</if>
|
||||
<if test="detailDate != null">detail_date = #{detailDate},</if>
|
||||
<if test="itemId != null">item_id = #{itemId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where detail_id = #{detailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCostProdDetailByDetailId" parameterType="Long">
|
||||
delete from cost_prod_detail where detail_id = #{detailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCostProdDetailByDetailIds" parameterType="String">
|
||||
delete from cost_prod_detail where detail_id in
|
||||
<foreach item="detailId" collection="array" open="(" separator="," close=")">
|
||||
#{detailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cost.mapper.CostProdMetricMapper">
|
||||
|
||||
<resultMap type="CostProdMetric" id="CostProdMetricResult">
|
||||
<result property="metricId" column="metric_id" />
|
||||
<result property="reportId" column="report_id" />
|
||||
<result property="metricCode" column="metric_code" />
|
||||
<result property="metricName" column="metric_name" />
|
||||
<result property="metricFormula" column="metric_formula" />
|
||||
<result property="metricValue" column="metric_value" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCostProdMetricVo">
|
||||
select metric_id, report_id, metric_code, metric_name, metric_formula, metric_value, remark, del_flag, create_by, create_time, update_by, update_time from cost_prod_metric
|
||||
</sql>
|
||||
|
||||
<select id="selectCostProdMetricList" parameterType="CostProdMetric" resultMap="CostProdMetricResult">
|
||||
<include refid="selectCostProdMetricVo"/>
|
||||
<where>
|
||||
<if test="reportId != null "> and report_id = #{reportId}</if>
|
||||
<if test="metricCode != null and metricCode != ''"> and metric_code = #{metricCode}</if>
|
||||
<if test="metricName != null and metricName != ''"> and metric_name like concat('%', #{metricName}, '%')</if>
|
||||
<if test="metricFormula != null and metricFormula != ''"> and metric_formula = #{metricFormula}</if>
|
||||
<if test="metricValue != null "> and metric_value = #{metricValue}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCostProdMetricByMetricId" parameterType="Long" resultMap="CostProdMetricResult">
|
||||
<include refid="selectCostProdMetricVo"/>
|
||||
where metric_id = #{metricId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCostProdMetric" parameterType="CostProdMetric" useGeneratedKeys="true" keyProperty="metricId">
|
||||
insert into cost_prod_metric
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="reportId != null">report_id,</if>
|
||||
<if test="metricCode != null">metric_code,</if>
|
||||
<if test="metricName != null">metric_name,</if>
|
||||
<if test="metricFormula != null">metric_formula,</if>
|
||||
<if test="metricValue != null">metric_value,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="reportId != null">#{reportId},</if>
|
||||
<if test="metricCode != null">#{metricCode},</if>
|
||||
<if test="metricName != null">#{metricName},</if>
|
||||
<if test="metricFormula != null">#{metricFormula},</if>
|
||||
<if test="metricValue != null">#{metricValue},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCostProdMetric" parameterType="CostProdMetric">
|
||||
update cost_prod_metric
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="reportId != null">report_id = #{reportId},</if>
|
||||
<if test="metricCode != null">metric_code = #{metricCode},</if>
|
||||
<if test="metricName != null">metric_name = #{metricName},</if>
|
||||
<if test="metricFormula != null">metric_formula = #{metricFormula},</if>
|
||||
<if test="metricValue != null">metric_value = #{metricValue},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where metric_id = #{metricId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCostProdMetricByMetricId" parameterType="Long">
|
||||
delete from cost_prod_metric where metric_id = #{metricId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCostProdMetricByMetricIds" parameterType="String">
|
||||
delete from cost_prod_metric where metric_id in
|
||||
<foreach item="metricId" collection="array" open="(" separator="," close=")">
|
||||
#{metricId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cost.mapper.CostProdReportMapper">
|
||||
|
||||
<resultMap type="CostProdReport" id="CostProdReportResult">
|
||||
<result property="reportId" column="report_id" />
|
||||
<result property="reportTitle" column="report_title" />
|
||||
<result property="reportDate" column="report_date" />
|
||||
<result property="lineType" column="line_type" />
|
||||
<result property="inputWeight" column="input_weight" />
|
||||
<result property="outputWeight" column="output_weight" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="colConfig" column="col_config" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCostProdReportVo">
|
||||
select report_id, report_title, report_date, line_type, input_weight, output_weight, remark, del_flag, create_by, create_time, update_by, update_time, col_config from cost_prod_report
|
||||
</sql>
|
||||
|
||||
<select id="selectCostProdReportList" parameterType="CostProdReport" resultMap="CostProdReportResult">
|
||||
<include refid="selectCostProdReportVo"/>
|
||||
<where>
|
||||
<if test="reportTitle != null and reportTitle != ''"> and report_title = #{reportTitle}</if>
|
||||
<if test="reportDate != null "> and report_date = #{reportDate}</if>
|
||||
<if test="lineType != null and lineType != ''"> and line_type = #{lineType}</if>
|
||||
<if test="inputWeight != null "> and input_weight = #{inputWeight}</if>
|
||||
<if test="outputWeight != null "> and output_weight = #{outputWeight}</if>
|
||||
<if test="colConfig != null and colConfig != ''"> and col_config = #{colConfig}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCostProdReportByReportId" parameterType="Long" resultMap="CostProdReportResult">
|
||||
<include refid="selectCostProdReportVo"/>
|
||||
where report_id = #{reportId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCostProdReport" parameterType="CostProdReport" useGeneratedKeys="true" keyProperty="reportId">
|
||||
insert into cost_prod_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="reportTitle != null">report_title,</if>
|
||||
<if test="reportDate != null">report_date,</if>
|
||||
<if test="lineType != null">line_type,</if>
|
||||
<if test="inputWeight != null">input_weight,</if>
|
||||
<if test="outputWeight != null">output_weight,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="colConfig != null">col_config,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="reportTitle != null">#{reportTitle},</if>
|
||||
<if test="reportDate != null">#{reportDate},</if>
|
||||
<if test="lineType != null">#{lineType},</if>
|
||||
<if test="inputWeight != null">#{inputWeight},</if>
|
||||
<if test="outputWeight != null">#{outputWeight},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="colConfig != null">#{colConfig},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCostProdReport" parameterType="CostProdReport">
|
||||
update cost_prod_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="reportTitle != null">report_title = #{reportTitle},</if>
|
||||
<if test="reportDate != null">report_date = #{reportDate},</if>
|
||||
<if test="lineType != null">line_type = #{lineType},</if>
|
||||
<if test="inputWeight != null">input_weight = #{inputWeight},</if>
|
||||
<if test="outputWeight != null">output_weight = #{outputWeight},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="colConfig != null">col_config = #{colConfig},</if>
|
||||
</trim>
|
||||
where report_id = #{reportId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCostProdReportByReportId" parameterType="Long">
|
||||
delete from cost_prod_report where report_id = #{reportId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCostProdReportByReportIds" parameterType="String">
|
||||
delete from cost_prod_report where report_id in
|
||||
<foreach item="reportId" collection="array" open="(" separator="," close=")">
|
||||
#{reportId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user