@ -1,27 +1,44 @@
package com.gaotao.modules.outsourcing.service.impl ;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper ;
import com.baomidou.mybatisplus.core.metadata.IPage ;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page ;
import com.gaotao.common.utils.PageUtils ;
import com.gaotao.modules.api.entity.IfsInventoryPart ;
import com.gaotao.modules.api.entity.IfsShopOrder ;
import com.gaotao.modules.api.entity.issueAndReturnVo.POLineSupplierMaterialVo ;
import com.gaotao.modules.api.entity.issueAndReturnVo.PurchaseOrderLineVo ;
import com.gaotao.modules.api.entity.issueAndReturnVo.PurchaseOrderVo ;
import com.gaotao.modules.api.service.IfsApiIssueAndReturnService ;
import com.gaotao.modules.notify.entity.SOIssueNotifyHeaderData ;
import com.gaotao.modules.notify.entity.SOIssueNotifyOrderListData ;
import com.gaotao.modules.api.service.IfsApiService ;
import com.gaotao.modules.base.entity.SOScheduledRoutingData ;
import com.gaotao.modules.notify.entity.* ;
import com.gaotao.modules.notify.entity.dto.GroupKey ;
import com.gaotao.modules.notify.entity.dto.NewSoIssueNotifyDto ;
import com.gaotao.modules.notify.entity.dto.ShoporderAndMaterialDto ;
import com.gaotao.modules.notify.entity.vo.ShopOrderAndMaterialVo ;
import com.gaotao.modules.notify.entity.vo.ShopOrderMaterialVo ;
import com.gaotao.modules.outsourcing.dao.OutsourcingNotifyMapper ;
import com.gaotao.modules.outsourcing.entity.dto.IfsOutsourcingOrderDto ;
import com.gaotao.modules.outsourcing.entity.dto.OutsourcingIssueNotifyDto ;
import com.gaotao.modules.outsourcing.entity.vo.OutsourcingAndMaterialVo ;
import com.gaotao.modules.outsourcing.service.OutsourcingNotifyService ;
import com.gaotao.modules.sys.entity.SysUserEntity ;
import com.gaotao.modules.trans.entity.TransNoControl ;
import com.gaotao.modules.trans.service.Consts ;
import com.gaotao.modules.trans.service.TransNoControlService ;
import org.apache.commons.lang.StringUtils ;
import org.apache.shiro.SecurityUtils ;
import org.springframework.beans.BeanUtils ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.stereotype.Service ;
import org.springframework.transaction.annotation.Transactional ;
import java.util.Date ;
import java.util.List ;
import java.math.BigDecimal ;
import java.text.SimpleDateFormat ;
import java.util.* ;
import java.util.stream.Collectors ;
@Service
public class OutsourcingNotifyServiceImpl implements OutsourcingNotifyService {
@ -31,6 +48,8 @@ public class OutsourcingNotifyServiceImpl implements OutsourcingNotifyService {
private TransNoControlService transNoService ;
@Autowired
private IfsApiIssueAndReturnService ifsApiIssueAndReturnService ;
@Autowired
private IfsApiService ifsApiService ;
@Override
public SOIssueNotifyHeaderData getUserNotifyPo ( SOIssueNotifyHeaderData data ) {
SOIssueNotifyHeaderData headerData = outsourcingNotifyMapper . getUserNotifyPo ( data ) ;
@ -72,17 +91,376 @@ public class OutsourcingNotifyServiceImpl implements OutsourcingNotifyService {
}
@Override
public List < ShopOrder AndMaterialVo> getShopOrderAndMaterialByShoporder ( IfsOutsourcingOrderDto data ) throws Exception {
public List < Outsourcing AndMaterialVo> getShopOrderAndMaterialByShoporder ( IfsOutsourcingOrderDto data ) throws Exception {
List < PurchaseOrderVo > purchaseOrder = ifsApiIssueAndReturnService . getPurchaseOrder ( data . getOutsourcingNo ( ) , data . getSite ( ) ) ;
List < PurchaseOrderLineVo > purchaseOrderLine = ifsApiIssueAndReturnService . getPurchaseOrderLine ( data . getOutsourcingNo ( ) , data . getSite ( ) ) ;
List < OutsourcingAndMaterialVo > resultList = new ArrayList < > ( ) ;
if ( purchaseOrderLine ! = null & & purchaseOrderLine . size ( ) > 0 ) {
List < POLineSupplierMaterialVo > poLineSupplierMaterial = ifsApiIssueAndReturnService . getPOLineSupplierMaterial ( data . getOutsourcingNo ( ) , data . getSite ( ) ) ;
for ( POLineSupplierMaterialVo materialVo : poLineSupplierMaterial ) {
/ / 建立 purchaseOrderLine 的索引 , 用于快速查找
/ / key : orderNo + "|" + site + "|" + releaseNo + "|" + lineNo
Map < String , PurchaseOrderLineVo > purchaseOrderLineMap = purchaseOrderLine . stream ( )
. collect ( Collectors . toMap (
line - > line . getOrderNo ( ) + "|" + line . getSite ( ) + "|" +
( line . getReleaseNo ( ) ! = null ? line . getReleaseNo ( ) : "" ) + "|" +
( line . getLineNo ( ) ! = null ? line . getLineNo ( ) : "" ) ,
line - > line ,
( existing , replacement ) - > existing
) ) ;
/ / 建立 purchaseOrder 的索引 , 用于快速查找
/ / key : orderNo + "|" + site
Map < String , PurchaseOrderVo > purchaseOrderMap = purchaseOrder . stream ( )
. collect ( Collectors . toMap (
order - > order . getOrderNo ( ) + "|" + order . getSite ( ) ,
order - > order ,
( existing , replacement ) - > existing
) ) ;
/ / 遍历最小的子类 poLineSupplierMaterial , 关联父类数据
for ( POLineSupplierMaterialVo materialVo : poLineSupplierMaterial ) {
/ / 构建查找 purchaseOrderLine 的 key
/ / 关联条件 : 子类的orderNo = 父类的orderNo 且 子类的contract = 父类的site 且 子类releaseNo = 父类releaseNo 且 子类lineItemNo = 父类lineNo
String lineKey = materialVo . getOrderNo ( ) + "|" +
( materialVo . getContract ( ) ! = null ? materialVo . getContract ( ) : "" ) + "|" +
( materialVo . getReleaseNo ( ) ! = null ? materialVo . getReleaseNo ( ) : "" ) + "|" +
( materialVo . getLineItemNo ( ) ! = null ? materialVo . getLineItemNo ( ) : "" ) ;
PurchaseOrderLineVo matchedLine = purchaseOrderLineMap . get ( lineKey ) ;
if ( matchedLine ! = null ) {
/ / 通过 purchaseOrderLine 查找 purchaseOrder
/ / 关联条件 : purchaseOrderLine . orderNo = purchaseOrder . orderNo 且 purchaseOrderLine . site = purchaseOrder . site
String orderKey = matchedLine . getOrderNo ( ) + "|" + matchedLine . getSite ( ) ;
PurchaseOrderVo matchedOrder = purchaseOrderMap . get ( orderKey ) ;
/ / 创建返回对象
OutsourcingAndMaterialVo vo = new OutsourcingAndMaterialVo ( ) ;
/ / 从最小的子类 poLineSupplierMaterial 复制数据
BeanUtils . copyProperties ( materialVo , vo ) ;
/ * vo . setOrderNo ( materialVo . getOrderNo ( ) ) ;
vo . setReleaseNo ( materialVo . getReleaseNo ( ) ) ;
vo . setContract ( materialVo . getContract ( ) ) ;
vo . setLineNo ( materialVo . getLineNo ( ) ) ;
if ( materialVo . getLineItemNo ( ) ! = null ) {
try {
vo . setLineItemNo ( materialVo . getLineItemNo ( ) ) ;
} catch ( NumberFormatException e ) {
/ / 如果转换失败 , 设置为null
vo . setLineItemNo ( null ) ;
}
}
vo . setComponentPartNo ( materialVo . getComponentPartNo ( ) ) ;
vo . setComponentPartDescription ( materialVo . getComponentPartDescription ( ) ) ;
vo . setQtyRequired ( materialVo . getQtyRequired ( ) ) ;
vo . setReservedQty ( materialVo . getReservedQty ( ) ) ;
vo . setQtyIssued ( materialVo . getQtyIssued ( ) ) ;
vo . setUom ( materialVo . getUom ( ) ) ;
if ( materialVo . getDateRequired ( ) ! = null ) {
SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy-MM-dd" ) ;
vo . setDateRequired ( materialVo . getDateRequired ( ) ) ;
} * /
/ / 从 purchaseOrderLine 复制数据
vo . setConvFactor ( matchedLine . getConvFactor ( ) ) ;
vo . setDescription ( matchedLine . getDescription ( ) ) ;
vo . setInventoryQty ( matchedLine . getInventoryQty ( ) ) ;
vo . setInventoryUOM ( matchedLine . getInventoryUOM ( ) ) ;
vo . setInvQtyToReceive ( matchedLine . getInvQtyToReceive ( ) ) ;
if ( matchedLine . getPartNo ( ) ! = null ) {
vo . setPartNo ( matchedLine . getPartNo ( ) ) ;
}
if ( matchedLine . getPlannedDeliveryDate ( ) ! = null ) {
vo . setPlannedDeliveryDate ( matchedLine . getPlannedDeliveryDate ( ) ) ;
}
vo . setPurchaseQty ( matchedLine . getPurchaseQty ( ) ) ;
vo . setPurchaseUOM ( matchedLine . getPurchaseUOM ( ) ) ;
vo . setQtyToReceive ( matchedLine . getQtyToReceive ( ) ) ;
vo . setReceiveCase ( matchedLine . getReceiveCase ( ) ) ;
vo . setReceiveCaseDB ( matchedLine . getReceiveCaseDB ( ) ) ;
if ( matchedLine . getStatus ( ) ! = null ) {
vo . setStatus ( matchedLine . getStatus ( ) ) ;
}
vo . setSite ( matchedLine . getSite ( ) ) ;
vo . setOrderStatus ( matchedLine . getOrderStatus ( ) ) ;
vo . setInventoryPartDB ( matchedLine . getInventoryPartDB ( ) ) ;
vo . setDemandCode ( matchedLine . getDemandCode ( ) ) ;
vo . setDemandCodeDB ( matchedLine . getDemandCodeDB ( ) ) ;
/ / 从 purchaseOrder 复制数据 ( 如果需要 )
if ( matchedOrder ! = null ) {
if ( StringUtils . isBlank ( vo . getStatus ( ) ) & & matchedOrder . getStatus ( ) ! = null ) {
vo . setStatus ( matchedOrder . getStatus ( ) ) ;
}
if ( matchedOrder . getObjstate ( ) ! = null ) {
vo . setObjstate ( matchedOrder . getObjstate ( ) ) ;
}
if ( matchedOrder . getAuthorizationRequired ( ) ! = null ) {
vo . setAuthorizationRequired ( matchedOrder . getAuthorizationRequired ( ) ) ;
}
vo . setSupplierNo ( matchedOrder . getSupplierNo ( ) ) ;
vo . setSupplierName ( matchedOrder . getSupplierName ( ) ) ;
vo . setReceiptDate ( matchedOrder . getReceiptDate ( ) ) ;
vo . setBuyerCode ( matchedOrder . getBuyerCode ( ) ) ;
vo . setAddress1 ( matchedOrder . getAddress1 ( ) ) ;
vo . setAddress2 ( matchedOrder . getAddress2 ( ) ) ;
vo . setAddress3 ( matchedOrder . getAddress3 ( ) ) ;
vo . setAddress4 ( matchedOrder . getAddress4 ( ) ) ;
vo . setAddress5 ( matchedOrder . getAddress5 ( ) ) ;
vo . setAddress6 ( matchedOrder . getAddress6 ( ) ) ;
vo . setCity ( matchedOrder . getCity ( ) ) ;
vo . setZipCode ( matchedOrder . getZipCode ( ) ) ;
vo . setCity ( matchedOrder . getCity ( ) ) ;
}
resultList . add ( vo ) ;
}
}
}
return resultList ;
}
@Override
public void deleteOutsourcingNotifyHeader ( SOIssueNotifyHeaderData data ) {
outsourcingNotifyMapper . deleteOutsourcingNotifyHeader ( data ) ;
}
@Transactional
@Override
public String saveNewOutsourcingIssueNotify ( OutsourcingIssueNotifyDto data ) throws Exception {
if ( data . getMaterialList ( ) ! = null & & data . getMaterialList ( ) . size ( ) > 0 ) {
Map < GroupKey , List < OutsourcingAndMaterialVo > > mainGroupMap = data . getMaterialList ( ) . stream ( )
. collect ( Collectors . groupingBy (
dto - > new GroupKey (
dto . getOrderNo ( ) ,
dto . getReleaseNo ( ) ,
dto . getLineItemNo ( )
)
) ) ;
/ / 用于存储最终结果 : 父集合和子集合
List < SOIssueNotifyOrderList > parentList = new ArrayList < > ( ) ;
List < SOIssueNotifyOrderMaterialList > childList = new ArrayList < > ( ) ;
int num = 0 ;
BigDecimal nextItem = BigDecimal . ZERO ;
/ / 步骤2 : 遍历每个分组 , 生成父对象和子对象
for ( Map . Entry < GroupKey , List < OutsourcingAndMaterialVo > > entry : mainGroupMap . entrySet ( ) ) {
GroupKey groupKey = entry . getKey ( ) ;
List < OutsourcingAndMaterialVo > groupDtos = entry . getValue ( ) ;
/ / 2 . 1 生成父对象的唯一 itemNo ( 确保全局唯一 , 这里用 UUID 简化 )
if ( num = = 0 ) {
SOIssueNotifyOrderList parentData = new SOIssueNotifyOrderList ( ) ;
parentData . setSite ( data . getSite ( ) ) ;
parentData . setNotifyNo ( data . getNotifyNo ( ) ) ;
nextItem = outsourcingNotifyMapper . getNextItemForSOIssueNotifyOrderList ( parentData ) ;
} else {
nextItem = nextItem . add ( BigDecimal . ONE ) ;
}
/ / 2 . 2 构建SOIssueNotifyOrderList
SOIssueNotifyOrderList parent = buildParent ( data . getNotifyNo ( ) , data . getSite ( ) , groupKey , groupDtos , nextItem ) ;
parentList . add ( parent ) ;
/ / 2 . 3 遍历分组内的 dto , 按 lineItemNo 生成子对象 ( SOIssueNotifyOrderMaterialList )
List < SOIssueNotifyOrderMaterialList > children = buildChildren ( data . getNotifyNo ( ) , data . getSite ( ) , groupDtos , nextItem , parent . getOrderType ( ) ) ;
childList . addAll ( children ) ;
num + + ;
}
List < String > items = new ArrayList < > ( ) ;
/ / 保存父类
for ( SOIssueNotifyOrderList parentItem : parentList ) {
IfsInventoryPart inventoryPart = new IfsInventoryPart ( ) ;
inventoryPart . setSite ( parentItem . getSite ( ) ) ;
inventoryPart . setPartNo ( parentItem . getFgPartNo ( ) ) ;
List < IfsInventoryPart > rows = null ;
try {
rows = ifsApiService . getIfsInventoryPart ( inventoryPart ) ;
} catch ( Exception e ) {
throw new RuntimeException ( e ) ;
}
String productionArea ;
if ( parentItem . getFgPartNo ( ) . startsWith ( "3" ) | | parentItem . getFgPartNo ( ) . startsWith ( "7" ) ) {
productionArea = "Z112" ;
} else {
productionArea = outsourcingNotifyMapper . getProductAreaByPlanner ( parentItem . getSite ( ) , rows . get ( 0 ) . getPlannerBuyer ( ) ) ;
}
parentItem . setProductionArea ( productionArea ! = null ? productionArea : "Z301" ) ;
parentItem . setPushWmsFlag ( "N" ) ;
parentItem . setTransportFlag ( "N" ) ;
parentItem . setOutWorkOrderFlag ( "N" ) ;
int i = outsourcingNotifyMapper . saveSOIssueNotifyOrderList ( parentItem ) ;
items . add ( parentItem . getItemNo ( ) . toString ( ) ) ;
}
/ / 保存子类
outsourcingNotifyMapper . deleteSOIssueNotifyOrderMaterialInList ( data . getNotifyNo ( ) , data . getSite ( ) , items ) ;
outsourcingNotifyMapper . batchSaveSOIssueNotifyOrderMaterialList ( childList ) ;
return "200" ;
} else {
throw new RuntimeException ( "物料列表不能为空" ) ;
}
}
private static SOIssueNotifyOrderList buildParent ( String notifyNo , String site , GroupKey groupKey , List < OutsourcingAndMaterialVo > groupDtos , BigDecimal parentItemNo ) {
SOIssueNotifyOrderList parent = new SOIssueNotifyOrderList ( ) ;
parent . setNotifyNo ( notifyNo ) ;
parent . setSite ( site ) ;
parent . setItemNo ( parentItemNo ) ;
parent . setSoorderNo ( groupKey . getOrderNo ( ) ) ;
parent . setReleaseNo ( groupKey . getReleaseNo ( ) ) ;
parent . setSequenceNo ( groupKey . getSequenceNo ( ) ) ;
/ / 从分组内第一个 dto 提取共同属性 ( 假设同一分组内这些属性一致 )
OutsourcingAndMaterialVo firstDto = groupDtos . get ( 0 ) ;
parent . setFgPartNo ( firstDto . getPartNo ( ) ) ;
parent . setNeedDate ( firstDto . getPlannedDeliveryDate ( ) ) ;
parent . setTransportFlag ( "N" ) ;
parent . setOrderType ( "poorder" ) ;
return parent ;
}
/ * *
* 构建子对象列表 ( SOIssueNotifyOrderMaterialList ) , 关联父对象的 itemNo
* /
private static List < SOIssueNotifyOrderMaterialList > buildChildren ( String notifyNo , String site , List < OutsourcingAndMaterialVo > groupDtos , BigDecimal parentItemNo , String parentType ) {
return groupDtos . stream ( )
. map ( dto - > {
SOIssueNotifyOrderMaterialList child = new SOIssueNotifyOrderMaterialList ( ) ;
child . setNotifyNo ( notifyNo ) ;
child . setSite ( site ) ;
child . setItemNo ( parentItemNo ) ;
/ / 设置细分核心字段 ( lineItemNo )
child . setBOMItemNo ( dto . getLineItemNo ( ) . toString ( ) ) ;
/ / 提取详细属性
child . setComponentPartNo ( dto . getComponentPartNo ( ) ) ;
child . setQtyToIssue ( dto . getApplyQty ( ) ) ;
if ( dto . getApplyQty ( ) ! = null ) {
child . setQtyToIssueOriginal ( dto . getApplyQty ( ) ) ;
}
child . setIssueType ( "BOM物料" ) ;
if ( StringUtils . isNotBlank ( parentType ) ) {
child . setOrderType ( parentType ) ;
} else {
child . setOrderType ( "shoporder" ) ;
}
return child ;
} )
/ / 按 lineItemNo 排序 ( 可选 , 确保子项顺序 )
. sorted ( Comparator . comparing ( SOIssueNotifyOrderMaterialList : : getBOMItemNo ) )
. collect ( Collectors . toList ( ) ) ;
}
@Override
public List < SOIssueNotifyOrderMaterialListData > getOutsouringForIssureNew ( SOScheduledRoutingData data ) throws Exception {
IfsShopOrder apiData = new IfsShopOrder ( ) ;
apiData . setSite ( data . getSite ( ) ) ;
apiData . setOrderNo ( data . getOrderNo ( ) ) ;
/ / 获取IFS SOBOM
List < POLineSupplierMaterialVo > poLineSupplierMaterial = ifsApiIssueAndReturnService . getPOLineSupplierMaterial ( apiData . getOrderNo ( ) , apiData . getSite ( ) ) ;
/ / 获取已有信息
List < SOIssueNotifyOrderMaterialListData > list = outsourcingNotifyMapper . getSOSBOMForIssureNew ( data ) ;
List < SOIssueNotifyOrderMaterialListData > result = new ArrayList < > ( ) ;
for ( int i = 0 ; i < poLineSupplierMaterial . size ( ) ; i + + ) {
SOIssueNotifyOrderMaterialListData entity = new SOIssueNotifyOrderMaterialListData ( ) ;
entity . setSite ( data . getSite ( ) ) ;
entity . setNotifyNo ( data . getNotifyNo ( ) ) ;
entity . setItemNo ( BigDecimal . valueOf ( data . getItemNo ( ) ) ) ;
entity . setBOMItemNo ( poLineSupplierMaterial . get ( i ) . getLineItemNo ( ) . toString ( ) ) ;
entity . setQtyRequired ( poLineSupplierMaterial . get ( i ) . getQtyRequired ( ) ) ;
entity . setComponentPartNo ( poLineSupplierMaterial . get ( i ) . getComponentPartNo ( ) ) ;
entity . setComponentPartDesc ( poLineSupplierMaterial . get ( i ) . getComponentPartDescription ( ) ) ;
entity . setIssueType ( "BOM物料" ) ;
if ( ! list . isEmpty ( ) ) {
SOIssueNotifyOrderMaterialListData selectOne = list . stream ( )
. filter ( item - >
entity . getBOMItemNo ( ) . equals ( item . getBOMItemNo ( ) ) & &
entity . getComponentPartNo ( ) . equals ( item . getComponentPartNo ( ) )
)
. findFirst ( )
. orElse ( null ) ;
if ( selectOne ! = null ) {
entity . setQtyToIssue ( selectOne . getQtyToIssue ( ) ) ;
entity . setQtyToIssueOriginal ( selectOne . getQtyToIssueOriginal ( ) ) ;
entity . setRemark ( selectOne . getRemark ( ) ) ;
}
}
result . add ( entity ) ;
}
return result ;
}
@Override
public void saveMaterialDetail ( List < SOIssueNotifyOrderMaterialListData > data ) {
outsourcingNotifyMapper . deleteOutNotifyOrderMaterialListData ( data . get ( 0 ) ) ;
for ( int i = 0 ; i < data . size ( ) ; i + + ) {
data . get ( i ) . setIssueType ( "BOM物料" ) ;
data . get ( i ) . setItemNo ( data . get ( 0 ) . getItemNo ( ) ) ;
if ( data . get ( i ) . getQtyToIssue ( ) ! = null ) {
data . get ( i ) . setQtyToIssueOriginal ( data . get ( i ) . getQtyToIssue ( ) ) ;
}
}
return null ;
outsourcingNotifyMapper . batchSaveOutNotifyOrderMaterialListData ( data ) ;
}
@Override
public void deleteNotifySOS ( SOIssueNotifyOrderListData data ) {
outsourcingNotifyMapper . deleteNotifySOS ( data ) ;
SOIssueNotifyOrderMaterialListData deleteData = new SOIssueNotifyOrderMaterialListData ( ) ;
deleteData . setNotifyNo ( data . getNotifyNo ( ) ) ;
deleteData . setSite ( data . getSite ( ) ) ;
deleteData . setItemNo ( data . getItemNo ( ) ) ;
outsourcingNotifyMapper . deleteSOIssueNotifyOrderMaterialListData ( deleteData ) ;
}
@Override
public void xiadaNotifyHeader ( SOIssueNotifyHeaderData data ) {
outsourcingNotifyMapper . xiadaNotifyHeader ( data ) ;
}
@Override
public PageUtils searchNotifyHeaderNew ( SOIssueNotifyHeaderData data ) {
System . out . println ( "开始查询申请单主表 - AI制作" ) ;
Page < SOIssueNotifyHeaderData > page = new Page < > ( data . getPage ( ) , data . getLimit ( ) ) ;
/ / 按照原有模式进行分页查询
IPage < SOIssueNotifyHeaderData > resultList = outsourcingNotifyMapper . searchNotifyHeaderNew ( page , data ) ;
PageUtils pageResult = new PageUtils ( resultList ) ;
System . out . println ( "查询申请单主表完成,共" + resultList . getTotal ( ) + "条记录" ) ;
return pageResult ;
}
@Override
public void deleteNotifySOSPlus ( SOIssueNotifyOrderListData data ) throws Exception {
QueryWrapper < SOIssueNotifyHeader > queryWrapper = new QueryWrapper < > ( ) ;
queryWrapper . eq ( "notify_no" , data . getNotifyNo ( ) ) ;
queryWrapper . eq ( "site" , data . getSite ( ) ) ;
SOIssueNotifyHeader soIssueNotifyHeader = outsourcingNotifyMapper . selectOne ( queryWrapper ) ;
if ( ! "未推送" . equals ( soIssueNotifyHeader . getPushWcsFlag ( ) ) ) {
throw new Exception ( "当前行不是未推送状态,不能删除!" ) ;
}
outsourcingNotifyMapper . deleteNotifySOS ( data ) ;
SOIssueNotifyOrderMaterialListData deleteData = new SOIssueNotifyOrderMaterialListData ( ) ;
deleteData . setNotifyNo ( data . getNotifyNo ( ) ) ;
deleteData . setSite ( data . getSite ( ) ) ;
deleteData . setItemNo ( data . getItemNo ( ) ) ;
outsourcingNotifyMapper . deleteSOIssueNotifyOrderMaterialListData ( deleteData ) ;
}
}