feat(cost): 添加数据源注解和批量操作功能
- 为CostItemService、CostPriceService、CostProdDetailService、CostProdMetricService添加@DataSource注解 - 在CostProdDetailController中新增批量保存生产成本明细接口 - 实现CostProdDetailService的batchSaveWithDelete方法支持先删除再插入 - 添加CostProdDetailBo批量操作参数对象 - 在CostProdReportService中实现copyReport功能支持复制生产月报 - 配置数据源类型为KLP确保数据库连接正确 - 添加相应的映射器方法和SQL模板支持批量插入操作
This commit is contained in:
@@ -107,4 +107,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{detailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="detailId">
|
||||
insert into cost_prod_detail (report_id, shift, detail_date, item_id, quantity, unit_price, amount, remark, del_flag, create_by, create_time, update_by, update_time) values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.reportId}, #{item.shift}, #{item.detailDate}, #{item.itemId}, #{item.quantity}, #{item.unitPrice}, #{item.amount}, #{item.remark}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user