5 changed files with 214 additions and 13 deletions
-
8src/main/java/com/gaotao/modules/notify/controller/NewIssureController.java
-
21src/main/java/com/gaotao/modules/notify/mapper/NewIssureMapper.java
-
6src/main/java/com/gaotao/modules/notify/service/NewIssureService.java
-
161src/main/java/com/gaotao/modules/notify/service/impl/NewIssureServiceImpl.java
-
31src/main/resources/mapper/notify/NewIssureMapper.xml
@ -1,13 +1,34 @@ |
|||
package com.gaotao.modules.notify.mapper; |
|||
|
|||
import com.gaotao.modules.base.entity.SOScheduledRoutingData; |
|||
import com.gaotao.modules.notify.entity.SOIssueNotifyOrderList; |
|||
import com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListData; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
@Mapper |
|||
public interface NewIssureMapper { |
|||
|
|||
/** |
|||
* 批量保存申请单物料明细(Excel导入专用) |
|||
*/ |
|||
void batchSaveSOIssueNotifyOrderMaterialListDataForExcel(@Param("data") List<SOIssueNotifyOrderMaterialListData> data); |
|||
|
|||
/** |
|||
* 保存申请单工单明细(Excel导入专用) |
|||
*/ |
|||
int saveSOIssueNotifyOrderListForExcel(SOIssueNotifyOrderList data); |
|||
|
|||
/** |
|||
* 删除申请单物料明细(Excel导入专用) |
|||
*/ |
|||
void deleteSOIssueNotifyOrderMaterialListDataForExcel(SOIssueNotifyOrderMaterialListData data); |
|||
|
|||
/** |
|||
* 获取已保存的申请单物料明细(用于回显) |
|||
*/ |
|||
List<SOIssueNotifyOrderMaterialListData> getSOSBOMForIssureNew(SOScheduledRoutingData data); |
|||
} |
|||
@ -1,14 +1,33 @@ |
|||
<?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.gaotao.modules.notify.mapper.NewIssureMapper"> |
|||
|
|||
<select id="getSOSBOMForIssureNew" resultType="SOIssueNotifyOrderMaterialListData"> |
|||
select a.notify_no,a.site,a.item_no,a.BOM_item_no,a.component_part_no,a.qty_to_issue,a.qty_to_issue_original,a.issue_type, |
|||
a.remark |
|||
<insert id="saveSOIssueNotifyOrderListForExcel"> |
|||
insert into SOIssueNotifyOrderList(notify_no,site,item_no,fgpart_no,soorder_no,issure_qty,out_work_order_flag,need_date,release_no,sequence_no) |
|||
values(#{notifyNo},#{site},#{itemNo},#{fgPartNo},#{soorderNo},#{issureQty,jdbcType=DECIMAL},#{outWorkOrderFlag} |
|||
,#{needDate},#{releaseNo},#{sequenceNo}) |
|||
</insert> |
|||
|
|||
<delete id="deleteSOIssueNotifyOrderMaterialListDataForExcel"> |
|||
delete from SOIssueNotifyOrderMaterialList where site=#{site} and notify_no=#{notifyNo} and item_no=#{itemNo} |
|||
</delete> |
|||
|
|||
<insert id="batchSaveSOIssueNotifyOrderMaterialListDataForExcel"> |
|||
insert into SOIssueNotifyOrderMaterialList (notify_no,site,item_no,BOM_item_no,component_part_no,qty_to_issue,qty_to_issue_original,issue_type,remark) |
|||
values |
|||
<foreach collection="data" separator="," item="item"> |
|||
(#{item.notifyNo},#{item.site},#{item.itemNo},#{item.bOMItemNo},#{item.componentPartNo},#{item.qtyToIssue},0,#{item.issueType},rtrim(#{item.remark})) |
|||
</foreach> |
|||
</insert> |
|||
|
|||
<select id="getSOSBOMForIssureNew" resultType="SOIssueNotifyOrderMaterialListData"> |
|||
select a.notify_no,a.site,a.item_no,a.BOM_item_no as BOMItemNo,a.component_part_no as ComponentPartNo, |
|||
a.qty_to_issue as QtyToIssue,a.qty_to_issue_original as QtyToIssueOriginal,a.remark |
|||
from SOIssueNotifyOrderMaterialList a |
|||
where a.notify_no = #{notifyNo} |
|||
and a.site = #{site} |
|||
and a.item_no = #{itemNo} |
|||
inner join SOIssueNotifyOrderList b on a.site=b.site and a.notify_no=b.notify_no and a.item_no=b.item_no |
|||
where a.notify_no=#{notifyNo} and a.site=#{site} and b.soorder_no=#{orderNo} |
|||
and b.release_no=#{releaseNo} and b.sequence_no=#{sequenceNo} |
|||
</select> |
|||
|
|||
</mapper> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue