diff --git a/.gitignore b/.gitignore index dd851b6..2f557a5 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ target # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +/src/test/ diff --git a/src/main/java/com/gaotao/modules/inboundNotification/config/AsyncConfig.java b/src/main/java/com/gaotao/modules/inboundNotification/config/AsyncConfig.java deleted file mode 100644 index ad28408..0000000 --- a/src/main/java/com/gaotao/modules/inboundNotification/config/AsyncConfig.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.gaotao.modules.inboundNotification.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.EnableAsync; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; - -import java.util.concurrent.Executor; - -/** - * 异步任务配置 - */ -@Configuration -@EnableAsync -public class AsyncConfig { - - @Bean("taskExecutor") - public Executor taskExecutor() { - ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); - executor.setCorePoolSize(5); - executor.setMaxPoolSize(10); - executor.setQueueCapacity(100); - executor.setThreadNamePrefix("InboundAsync-"); - executor.initialize(); - return executor; - } -} \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/otherOutbound/controller/OtherOutboundController.java b/src/main/java/com/gaotao/modules/otherOutbound/controller/OtherOutboundController.java new file mode 100644 index 0000000..53ac343 --- /dev/null +++ b/src/main/java/com/gaotao/modules/otherOutbound/controller/OtherOutboundController.java @@ -0,0 +1,210 @@ +package com.gaotao.modules.otherOutbound.controller; + +import com.gaotao.common.utils.R; +import com.gaotao.modules.otherOutbound.service.OtherOutboundService; +import com.gaotao.modules.sys.controller.AbstractController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * 其他出库控制器 + * 数据来源:return_notification_head/detail表(类型为其他出库) + */ +@RestController +@RequestMapping("/otherOutbound") +@Api(tags = "其他出库管理") +public class OtherOutboundController extends AbstractController { + + @Autowired + private OtherOutboundService otherOutboundService; + + /** + * 获取其他出库单列表 + * 数据来源:return_notification_head表,类型为其他出库 + */ + @PostMapping("/getOutboundList") + @ApiOperation("获取其他出库单列表") + public R getOutboundList(@RequestBody Map params) { + try { + String site = (String) params.get("site"); + String warehouseId = (String) params.get("warehouseId"); + String searchCode = (String) params.get("searchCode"); + String status = (String) params.get("status"); + + if (warehouseId == null || warehouseId.trim().isEmpty()) { + return R.error("仓库ID不能为空"); + } + + // 默认状态为待出库 + if (status == null || status.trim().isEmpty()) { + status = "待出库"; + } + + logger.info("获取其他出库单列表,站点: {}, 仓库: {}, 搜索码: {}, 状态: {}", + site, warehouseId, searchCode, status); + + List> list = otherOutboundService.getOutboundList( + site, warehouseId, searchCode, status); + + return R.ok().put("data", list); + } catch (Exception e) { + logger.error("获取其他出库单列表失败", e); + return R.error("获取数据失败: " + e.getMessage()); + } + } + + /** + * 获取其他出库单详情 + */ + @PostMapping("/getOutboundDetails") + @ApiOperation("获取其他出库单详情") + public R getOutboundDetails(@RequestBody Map params) { + try { + String outboundNo = (String) params.get("outboundNo"); + String buNo = (String) params.get("buNo"); + String warehouseId = (String) params.get("warehouseId"); + String site = (String) params.get("site"); + + if (outboundNo == null || outboundNo.trim().isEmpty()) { + return R.error("出库单号不能为空"); + } + + if (warehouseId == null || warehouseId.trim().isEmpty()) { + return R.error("仓库ID不能为空"); + } + + Map result = otherOutboundService.getOutboundDetails( + outboundNo, buNo, warehouseId, site); + + if (result == null || result.isEmpty()) { + return R.error("未找到出库单详情"); + } + + return R.ok().put("data", result); + } catch (Exception e) { + logger.error("获取其他出库单详情失败", e); + return R.error("获取详情失败: " + e.getMessage()); + } + } + + /** + * 验证标签与其他出库单是否匹配,并检查库存 + */ + @PostMapping("/validateLabelWithOutbound") + @ApiOperation("验证标签与出库单匹配") + public R validateLabelWithOutbound(@RequestBody Map params) { + try { + String labelCode = (String) params.get("labelCode"); + String outboundNo = (String) params.get("outboundNo"); + String warehouseId = (String) params.get("warehouseId"); + String site = (String) params.get("site"); + String buNo = (String) params.get("buNo"); + + if (labelCode == null || labelCode.trim().isEmpty()) { + return R.error("标签条码不能为空"); + } + + if (outboundNo == null || outboundNo.trim().isEmpty()) { + return R.error("出库单号不能为空"); + } + + Map result = otherOutboundService.validateLabelWithOutbound( + labelCode, outboundNo, warehouseId, site, buNo); + + return R.ok().put("data", result); + } catch (Exception e) { + logger.error("其他出库标签验证失败", e); + return R.error(e.getMessage()); + } + } + + /** + * 确认其他出库 + * 系统逻辑: + * 1. 更新库存表中的标签状态 + * 2. 更改return_notification_head表中的单据状态为"已出库" + * 3. 生成WMS出库记录:Transheader... + * 4. 异步调用ERP接口回传数据 + */ + @PostMapping("/confirmOtherOutbound") + @ApiOperation("确认其他出库") + public R confirmOtherOutbound(@RequestBody Map params) { + try { + String site = (String) params.get("site"); + String buNo = (String) params.get("buNo"); + String outboundNo = (String) params.get("outboundNo"); + String warehouseId = (String) params.get("warehouseId"); + List> labels = (List>) params.get("labels"); + + if (outboundNo == null || outboundNo.trim().isEmpty()) { + return R.error("出库单号不能为空"); + } + + if (warehouseId == null || warehouseId.trim().isEmpty()) { + return R.error("仓库ID不能为空"); + } + + if (labels == null || labels.isEmpty()) { + return R.error("标签列表不能为空"); + } + + // 验证标签数据完整性 + for (Map label : labels) { + String labelCode = (String) label.get("labelCode"); + if (labelCode == null || labelCode.trim().isEmpty()) { + return R.error("标签条码不能为空"); + } + } + + boolean success = otherOutboundService.confirmOtherOutbound( + site, buNo, outboundNo, warehouseId, labels); + + if (success) { + return R.ok("出库成功"); + } else { + return R.error("出库失败"); + } + } catch (Exception e) { + logger.error("其他出库失败", e); + return R.error("出库失败: " + e.getMessage()); + } + } + + /** + * 获取其他出库单物料清单 + * 根据site、buNo、outboundNo从return_notification_detail表获取物料信息 + */ + @PostMapping("/getMaterialList") + @ApiOperation("获取物料清单") + public R getMaterialList(@RequestBody Map params) { + try { + String site = (String) params.get("site"); + String buNo = (String) params.get("buNo"); + String outboundNo = (String) params.get("outboundNo"); + + if (site == null || site.trim().isEmpty()) { + return R.error("站点不能为空"); + } + + if (buNo == null || buNo.trim().isEmpty()) { + return R.error("业务单元不能为空"); + } + + if (outboundNo == null || outboundNo.trim().isEmpty()) { + return R.error("出库单号不能为空"); + } + + List> materialList = otherOutboundService.getMaterialList(site, buNo, outboundNo); + + return R.ok().put("data", materialList); + } catch (Exception e) { + logger.error("获取其他出库物料清单失败", e); + return R.error("获取物料清单失败: " + e.getMessage()); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/otherOutbound/dao/OtherOutboundMapper.java b/src/main/java/com/gaotao/modules/otherOutbound/dao/OtherOutboundMapper.java new file mode 100644 index 0000000..dedb253 --- /dev/null +++ b/src/main/java/com/gaotao/modules/otherOutbound/dao/OtherOutboundMapper.java @@ -0,0 +1,101 @@ +package com.gaotao.modules.otherOutbound.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +@Mapper +public interface OtherOutboundMapper extends BaseMapper { + + /** + * 获取其他出库单列表 + * @param site 站点 + * @param warehouseId 仓库ID + * @param searchCode 搜索条件 + * @param status 状态 + * @return 出库单列表 + */ + List> getOutboundList(@Param("site") String site, + @Param("warehouseId") String warehouseId, + @Param("searchCode") String searchCode, + @Param("status") String status); + + /** + * 获取其他出库单详情 + * @param outboundNo 出库单号 + * @param buNo 业务单元 + * @param warehouseId 仓库ID + * @param site 站点 + * @return 出库单详情 + */ + Map getOutboundDetails(@Param("outboundNo") String outboundNo, + @Param("buNo") String buNo, + @Param("warehouseId") String warehouseId, + @Param("site") String site); + + /** + * 验证标签与其他出库单是否匹配 + * @param labelCode 标签条码 + * @param outboundNo 出库单号 + * @param warehouseId 仓库ID + * @param site 站点 + * @param buNo 业务单元 + * @return 标签信息 + */ + Map validateLabelWithOutbound(@Param("labelCode") String labelCode, + @Param("outboundNo") String outboundNo, + @Param("warehouseId") String warehouseId, + @Param("site") String site, + @Param("buNo") String buNo); + + /** + * 更新库存表中的标签状态 + * @param labelCodes 标签条码列表 + * @param status 状态 + * @param site 站点 + * @param buNo 业务单元 + * @return 更新行数 + */ + int updateInventoryStatus(@Param("labelCodes") List labelCodes, + @Param("status") String status, + @Param("site") String site, + @Param("buNo") String buNo); + + /** + * 更新出库单状态 + * @param outboundNo 出库单号 + * @param status 状态 + * @param site 站点 + * @param buNo 业务单元 + * @return 更新行数 + */ + int updateOutboundStatus(@Param("outboundNo") String outboundNo, + @Param("status") String status, + @Param("site") String site, + @Param("buNo") String buNo); + + /** + * 检查出库单的所有标签是否都已出库 + * @param outboundNo 出库单号 + * @param site 站点 + * @param buNo 业务单元 + * @return 统计信息:totalLabels总标签数,outboundLabels已出库标签数 + */ + Map checkAllLabelsOutbound(@Param("outboundNo") String outboundNo, + @Param("site") String site, + @Param("buNo") String buNo); + + /** + * 获取其他出库单物料清单 + * @param site 站点 + * @param buNo 业务单元 + * @param outboundNo 出库单号 + * @return 物料清单 + */ + List> getMaterialList(@Param("site") String site, + @Param("buNo") String buNo, + @Param("outboundNo") String outboundNo); +} \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/otherOutbound/service/OtherOutboundService.java b/src/main/java/com/gaotao/modules/otherOutbound/service/OtherOutboundService.java new file mode 100644 index 0000000..336f3e8 --- /dev/null +++ b/src/main/java/com/gaotao/modules/otherOutbound/service/OtherOutboundService.java @@ -0,0 +1,71 @@ +package com.gaotao.modules.otherOutbound.service; + +import java.util.List; +import java.util.Map; + +/** + * 其他出库服务接口 + * 数据来源:return_notification_head/detail表(类型为其他出库) + */ +public interface OtherOutboundService { + + /** + * 获取其他出库单列表 + * 数据来源:return_notification_head表,类型为其他出库 + * @param site 站点 + * @param warehouseId 仓库ID + * @param searchCode 搜索条件 + * @param status 状态 + * @return 出库单列表 + */ + List> getOutboundList(String site, String warehouseId, String searchCode, String status); + + /** + * 获取其他出库单详情 + * 数据来源:return_notification_head表,关联库存表统计 + * @param outboundNo 出库单号 + * @param buNo 业务单元 + * @param warehouseId 仓库ID + * @param site 站点 + * @return 出库单详情 + */ + Map getOutboundDetails(String outboundNo, String buNo, String warehouseId, String site); + + /** + * 验证标签与其他出库单是否匹配,并检查库存 + * 从库存表验证标签信息 + * @param labelCode 标签条码 + * @param outboundNo 出库单号 + * @param warehouseId 仓库ID + * @param site 站点 + * @param buNo 业务单元 + * @return 标签信息 + */ + Map validateLabelWithOutbound(String labelCode, String outboundNo, + String warehouseId, String site, String buNo); + + /** + * 确认其他出库 + * 1. 更新库存表中的标签状态 + * 2. 更新return_notification_head表状态 + * 3. 生成出库事务记录 + * @param site 站点 + * @param buNo 业务单元 + * @param outboundNo 出库单号 + * @param warehouseId 仓库ID + * @param labels 标签列表 + * @return 处理结果 + */ + boolean confirmOtherOutbound(String site, String buNo, String outboundNo, + String warehouseId, List> labels); + + /** + * 获取其他出库单物料清单 + * 数据来源:return_notification_detail表,关联库存表 + * @param site 站点 + * @param buNo 业务单元 + * @param outboundNo 出库单号 + * @return 物料清单 + */ + List> getMaterialList(String site, String buNo, String outboundNo); +} \ No newline at end of file diff --git a/src/main/java/com/gaotao/modules/otherOutbound/service/impl/OtherOutboundServiceImpl.java b/src/main/java/com/gaotao/modules/otherOutbound/service/impl/OtherOutboundServiceImpl.java new file mode 100644 index 0000000..a073994 --- /dev/null +++ b/src/main/java/com/gaotao/modules/otherOutbound/service/impl/OtherOutboundServiceImpl.java @@ -0,0 +1,265 @@ +package com.gaotao.modules.otherOutbound.service.impl; + +import com.gaotao.modules.otherOutbound.dao.OtherOutboundMapper; +import com.gaotao.modules.otherOutbound.service.OtherOutboundService; +import com.gaotao.modules.inventoryStock.service.InventoryStockService; +import com.gaotao.modules.trans.entity.TransDetail; +import com.gaotao.modules.trans.entity.TransDetailDto; +import com.gaotao.modules.trans.entity.TransHeader; +import com.gaotao.modules.trans.service.TransDetailService; +import com.gaotao.modules.trans.service.TransHeaderService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 其他出库服务实现类 + */ +@Service +public class OtherOutboundServiceImpl implements OtherOutboundService { + + private static final Logger logger = LoggerFactory.getLogger(OtherOutboundServiceImpl.class); + + @Autowired + private OtherOutboundMapper otherOutboundMapper; + + @Autowired + private InventoryStockService inventoryStockService; + + @Autowired + private TransHeaderService transHeaderService; + + @Autowired + private TransDetailService transDetailService; + + @Override + public List> getOutboundList(String site, String warehouseId, String searchCode, String status) { + try { + logger.info("获取其他出库单列表,站点: {}, 仓库: {}, 搜索码: {}, 状态: {}", + site, warehouseId, searchCode, status); + + List> list = otherOutboundMapper.getOutboundList(site, warehouseId, searchCode, status); + + logger.info("获取其他出库单列表成功,共{}条记录", list != null ? list.size() : 0); + return list != null ? list : new ArrayList<>(); + } catch (Exception e) { + logger.error("获取其他出库单列表失败", e); + throw new RuntimeException("获取出库单列表失败: " + e.getMessage()); + } + } + + @Override + public Map getOutboundDetails(String outboundNo, String buNo, String warehouseId, String site) { + try { + logger.info("获取其他出库单详情,出库单号: {}, 业务单元: {}, 仓库: {}, 站点: {}", + outboundNo, buNo, warehouseId, site); + + Map details = otherOutboundMapper.getOutboundDetails(outboundNo, buNo, warehouseId, site); + + if (details != null) { + logger.info("获取其他出库单详情成功"); + } else { + logger.warn("未找到出库单详情"); + } + + return details; + } catch (Exception e) { + logger.error("获取其他出库单详情失败", e); + throw new RuntimeException("获取出库单详情失败: " + e.getMessage()); + } + } + + @Override + public Map validateLabelWithOutbound(String labelCode, String outboundNo, + String warehouseId, String site, String buNo) { + try { + logger.info("验证标签与其他出库单匹配,标签: {}, 出库单: {}, 仓库: {}, 站点: {}, 业务单元: {}", + labelCode, outboundNo, warehouseId, site, buNo); + + Map result = otherOutboundMapper.validateLabelWithOutbound( + labelCode, outboundNo, warehouseId, site, buNo); + + if (result == null || result.isEmpty()) { + throw new RuntimeException("该标签与出库单不匹配或标签状态不正确"); + } + + // 检查标签状态,只有"在库"状态的标签才能出库 + String labelStatus = (String) result.get("status"); + if (!"在库".equals(labelStatus)) { + throw new RuntimeException("标签状态为:" + labelStatus + ",无法出库"); + } + + logger.info("标签验证成功,物料编码: {}, 数量: {}", + result.get("partNo"), result.get("quantity")); + + return result; + } catch (Exception e) { + logger.error("验证标签与其他出库单匹配失败", e); + throw new RuntimeException(e.getMessage()); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean confirmOtherOutbound(String site, String buNo, String outboundNo, + String warehouseId, List> labels) { + logger.info("开始确认其他出库,出库单号: {}, 仓库ID: {}, 标签数量: {}", + outboundNo, warehouseId, labels.size()); + try { + // 1. 更新库存表中的标签状态为"已出库" + List labelCodes = new ArrayList<>(); + for (Map label : labels) { + labelCodes.add((String) label.get("labelCode")); + } + + int updatedLabels = otherOutboundMapper.updateInventoryStatus(labelCodes, "已出库", site, buNo); + if (updatedLabels != labelCodes.size()) { + throw new RuntimeException("部分标签状态更新失败"); + } + + // 2. 检查是否所有标签都已出库,决定是否更新出库单状态 + Map labelStats = otherOutboundMapper.checkAllLabelsOutbound(outboundNo, site, buNo); + if (labelStats != null) { + Integer totalLabels = (Integer) labelStats.get("totalLabels"); + Integer outboundLabels = (Integer) labelStats.get("outboundLabels"); + + logger.info("出库单 {} 标签统计: 总标签数={}, 已出库标签数={}", outboundNo, totalLabels, outboundLabels); + + // 只有当所有标签都已出库时,才更新出库单状态为"已完成" + if (totalLabels != null && outboundLabels != null && totalLabels.equals(outboundLabels) && totalLabels > 0) { + int updatedHead = otherOutboundMapper.updateOutboundStatus(outboundNo, "已完成", site, buNo); + if (updatedHead > 0) { + logger.info("出库单 {} 所有标签已出库,状态更新为已完成", outboundNo); + } + } else { + logger.info("出库单 {} 还有标签未出库,保持待出库状态", outboundNo); + } + } + + // 3. 生成出库事务记录 + generateOutboundTransaction(outboundNo, warehouseId, labels, site); + + // 4. 异步调用ERP接口(这里可以发送消息到队列) + //asyncCallErpInterface(outboundNo, labels); + + logger.info("其他出库确认完成,出库单号: {}", outboundNo); + return true; + } catch (Exception e) { + logger.error("其他出库确认失败,出库单号: {}, 错误信息: {}", outboundNo, e.getMessage(), e); + throw new RuntimeException("出库确认失败: " + e.getMessage(), e); + } + } + + @Override + public List> getMaterialList(String site, String buNo, String outboundNo) { + logger.info("获取其他出库物料清单,站点: {}, 业务单元: {}, 出库单号: {}", site, buNo, outboundNo); + + try { + List> materialList = otherOutboundMapper.getMaterialList(site, buNo, outboundNo); + + if (materialList == null) { + materialList = new ArrayList<>(); + } + + logger.info("获取其他出库物料清单成功,站点: {}, 业务单元: {}, 出库单号: {}, 记录数: {}", + site, buNo, outboundNo, materialList.size()); + + return materialList; + } catch (Exception e) { + logger.error("获取其他出库物料清单失败,站点: {}, 业务单元: {}, 出库单号: {}, 错误信息: {}", + site, buNo, outboundNo, e.getMessage(), e); + throw new RuntimeException("获取物料清单失败: " + e.getMessage(), e); + } + } + + /** + * 生成出库事务记录 + */ + private void generateOutboundTransaction(String outboundNo, String warehouseId, List> labels, String site) { + logger.info("开始生成出库事务记录,出库单号: {}", outboundNo); + + // 构建TransDetailDto对象 + TransDetailDto transDetailDto = new TransDetailDto(); + transDetailDto.setSite(site); // 站点 + transDetailDto.setRemark("其他出库 - " + outboundNo); + transDetailDto.setOrderref1(outboundNo); // 出库单号 + transDetailDto.setOrderref3(warehouseId); // 仓库ID + + // 使用TransHeaderService的genTrans方法生成事务头 + TransHeader transHeader = transHeaderService.genTrans(transDetailDto, "OUT", warehouseId); + + if (transHeader == null) { + throw new RuntimeException("生成事务头记录失败"); + } + + logger.info("事务头记录生成成功,事务单号: {}", transHeader.getTransno()); + + // 生成事务明细记录 + generateTransactionDetails(transHeader.getTransno(), labels, site); + + logger.info("出库事务记录生成完成,事务单号: {}, 出库单号: {}, 明细记录数: {}", + transHeader.getTransno(), outboundNo, labels.size()); + } + + /** + * 生成事务明细记录 + */ + private void generateTransactionDetails(String transNo, List> labels, String site) { + logger.info("开始生成事务明细记录,事务单号: {}, 明细数量: {}", transNo, labels.size()); + + List transDetailList = new ArrayList<>(); + double itemNo = 1.0; // 行号从1开始 + + for (Map label : labels) { + String labelCode = (String) label.get("labelCode"); + Object quantityObj = label.get("quantity"); + String batchNo = (String) label.get("batchNo"); + String partNo = (String) label.get("partNo"); + + // 转换数量 + BigDecimal quantity = BigDecimal.ZERO; + if (quantityObj != null) { + if (quantityObj instanceof BigDecimal) { + quantity = (BigDecimal) quantityObj; + } else if (quantityObj instanceof Number) { + quantity = new BigDecimal(quantityObj.toString()); + } else { + quantity = new BigDecimal(quantityObj.toString()); + } + } + + // 构建事务明细记录 + TransDetail transDetail = new TransDetail(); + transDetail.setSite(site); // 站点 + transDetail.setTransno(transNo); + transDetail.setItemno(itemNo); + transDetail.setPartno(partNo); + transDetail.setTransqty(quantity); + transDetail.setBatchno(batchNo); + transDetail.setDirection("-"); // 出库方向 + transDetail.setOrderref1(labelCode); // 标签条码 + transDetail.setOrderref2(partNo); // 物料编码 + transDetail.setOrderref3(batchNo); // 批次号 + transDetail.setRemark("其他出库 - 标签: " + labelCode); + + transDetailList.add(transDetail); + itemNo += 1.0; // 行号递增 + } + + // 批量保存事务明细记录 + if (!transDetailList.isEmpty()) { + boolean success = transDetailService.saveBatch(transDetailList); + if (!success) { + throw new RuntimeException("事务明细记录保存失败"); + } + logger.info("事务明细记录生成成功,共生成 {} 条明细记录", transDetailList.size()); + } + } +} \ No newline at end of file diff --git a/src/main/resources/mapper/otherOutbound/OtherOutboundMapper.xml b/src/main/resources/mapper/otherOutbound/OtherOutboundMapper.xml new file mode 100644 index 0000000..2d17835 --- /dev/null +++ b/src/main/resources/mapper/otherOutbound/OtherOutboundMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + UPDATE inventory_stock + SET status = #{status}, + updated_date = GETDATE(), + updated_by = 'SYSTEM' + WHERE roll_no IN + + #{labelCode} + + AND site = #{site} + AND bu_no = #{buNo} + + + + + UPDATE outbound_notification_head + SET order_status = #{status}, + updated_date = GETDATE(), + updated_by = 'SYSTEM' + WHERE order_no = #{outboundNo} + AND site = #{site} + AND bu_no = #{buNo} + AND order_type = '其他出库' + + + + + + + + + \ No newline at end of file