|
|
|
@ -12,10 +12,7 @@ import com.gaotao.modules.api.entity.IfsInventoryPart; |
|
|
|
import com.gaotao.modules.api.service.IfsApiService; |
|
|
|
import com.gaotao.modules.api.service.impl.IfsApiServiceImpl; |
|
|
|
import com.gaotao.modules.base.entity.SOScheduledRoutingData; |
|
|
|
import com.gaotao.modules.notify.entity.SOIssueNotifyHeaderData; |
|
|
|
import com.gaotao.modules.notify.entity.SOIssueNotifyOrderList; |
|
|
|
import com.gaotao.modules.notify.entity.SOIssueNotifyOrderListData; |
|
|
|
import com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListData; |
|
|
|
import com.gaotao.modules.notify.entity.*; |
|
|
|
import com.gaotao.modules.notify.entity.vo.ShopOrderMaterialVo; |
|
|
|
import com.gaotao.modules.notify.entity.vo.ShopOrderVo; |
|
|
|
import com.gaotao.modules.notify.mapper.IssureNotifyMapper; |
|
|
|
@ -632,4 +629,57 @@ public class IssureNotifyServiceImpl implements IssureNotifyService { |
|
|
|
} |
|
|
|
return true; |
|
|
|
}*/ |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 检查用户是否有未下达的shoporder申请单 - rqrq |
|
|
|
* @param data 查询条件 |
|
|
|
* @return SOIssueNotifyHeaderData |
|
|
|
* @author rqrq |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public SOIssueNotifyHeaderData checkUserHasUnissueShopOrder(SOIssueNotifyHeaderData data) { |
|
|
|
System.out.println("开始检查用户是否有未下达的shoporder申请单 - rqrq,site=" + data.getSite() + ", username=" + data.getUsername()); |
|
|
|
|
|
|
|
// 调用Mapper查询用户是否有状态为UNISSUE且ordertype=shoporder的数据 - rqrq |
|
|
|
SOIssueNotifyHeaderData result = issureNotifyMapper.checkUserHasUnissueShopOrder(data); |
|
|
|
|
|
|
|
if (result != null) { |
|
|
|
System.out.println("用户有未下达的shoporder申请单 - rqrq,notifyNo=" + result.getNotifyNo()); |
|
|
|
} else { |
|
|
|
System.out.println("用户没有未下达的shoporder申请单 - rqrq"); |
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 取消下达申请单(更新status为UNISSUE) - rqrq |
|
|
|
* @param data 申请单数据 |
|
|
|
* @author rqrq |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void cancelIssueNotify(SOIssueNotifyHeaderData data) { |
|
|
|
System.out.println("开始取消下达申请单 - rqrq,notifyNo=" + data.getNotifyNo() + ", site=" + data.getSite()); |
|
|
|
|
|
|
|
// 查询申请单信息,检查是否已推送WCS - rqrq |
|
|
|
QueryWrapper<SOIssueNotifyHeader> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.eq("site", data.getSite()); |
|
|
|
queryWrapper.eq("notify_no", data.getNotifyNo()); |
|
|
|
SOIssueNotifyHeader notifyHeader = issureNotifyMapper.selectOne(queryWrapper); |
|
|
|
|
|
|
|
if (notifyHeader == null) { |
|
|
|
throw new RuntimeException("申请单不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
// 判断是否已推送WCS,如果已推送则不允许取消下达 - rqrq |
|
|
|
if (!"未推送".equals(notifyHeader.getPushWcsFlag())) { |
|
|
|
throw new RuntimeException("申请单已推送WCS,不允许取消下达"); |
|
|
|
} |
|
|
|
|
|
|
|
// 更新申请单状态为UNISSUE - rqrq |
|
|
|
issureNotifyMapper.cancelIssueNotify(data); |
|
|
|
|
|
|
|
System.out.println("取消下达申请单完成 - rqrq"); |
|
|
|
} |
|
|
|
} |