From d3e33534060cb52e0833f09f45e0e6b7818e7ce3 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Tue, 12 Aug 2025 15:25:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecss/controller/CoDelController.java | 10 +- .../sys/modules/ecss/mapper/CoDelMapper.java | 4 - .../modules/ecss/service/CoDelService.java | 4 +- .../ecss/service/impl/CoDelServiceImpl.java | 209 ++++-------------- .../resources/mapper/ecss/CoDelMapper.xml | 34 +-- 5 files changed, 41 insertions(+), 220 deletions(-) diff --git a/src/main/java/com/xujie/sys/modules/ecss/controller/CoDelController.java b/src/main/java/com/xujie/sys/modules/ecss/controller/CoDelController.java index c157d42f..72507973 100644 --- a/src/main/java/com/xujie/sys/modules/ecss/controller/CoDelController.java +++ b/src/main/java/com/xujie/sys/modules/ecss/controller/CoDelController.java @@ -61,8 +61,8 @@ public class CoDelController { @PostMapping("/saveEcssCoDelNotifyByExcel") public R saveEcssCoDelNotifyByExcel(@RequestParam(value = "file") MultipartFile file, @ModelAttribute EcssCoDelNotifyHeaderData data){ - coDelService.saveEcssCoDelNotifyByExcel(file, data); - return R.ok(); + Map> resultMap = coDelService.saveEcssCoDelNotifyByExcel(file, data); + return R.ok().put("resultMap", resultMap); } @PostMapping("/modifyNotifyDetailByExcel") @@ -199,12 +199,6 @@ public class CoDelController { return R.ok(); } - @PostMapping("/searchCoDelPalletData") - @ResponseBody - public R searchCoDelPalletData(@RequestBody EcssCoDelNotifyHeaderData inData){ - List rows =coDelService.searchCoDelPalletData(inData); - return R.ok().put("rows", rows); - } @PostMapping("/selectBoxList") @ResponseBody diff --git a/src/main/java/com/xujie/sys/modules/ecss/mapper/CoDelMapper.java b/src/main/java/com/xujie/sys/modules/ecss/mapper/CoDelMapper.java index f53396b4..aa036578 100644 --- a/src/main/java/com/xujie/sys/modules/ecss/mapper/CoDelMapper.java +++ b/src/main/java/com/xujie/sys/modules/ecss/mapper/CoDelMapper.java @@ -97,8 +97,6 @@ public interface CoDelMapper { @Param("codeType")String codeType, @Param("list") List list); - List searchCoDelPalletData(EcssCoDelNotifyHeaderData inData); - List searchCoDelPalletDataNew(EcssCoDelNotifyHeaderData inData); void saveCodelPalletHeader(EcssCoDelPalletHeader inData); @@ -175,8 +173,6 @@ public interface CoDelMapper { List exportCoDelPalletDetail(EcssCoDelNotifyHeaderData data); - List exportPalletHeaderData(EcssCoDelNotifyHeaderData inData); - void updateEcssDeclarationHeader(EcssDeclarationHeaderData data); void updateEcssCoDelNotifyDetail(EcssCoDelNotifyDetailData data); diff --git a/src/main/java/com/xujie/sys/modules/ecss/service/CoDelService.java b/src/main/java/com/xujie/sys/modules/ecss/service/CoDelService.java index 0afba1ee..0a617399 100644 --- a/src/main/java/com/xujie/sys/modules/ecss/service/CoDelService.java +++ b/src/main/java/com/xujie/sys/modules/ecss/service/CoDelService.java @@ -22,7 +22,7 @@ public interface CoDelService { PageUtils searchEcssCoDelNotifyHeaderForCK(EcssCoDelNotifyHeaderData data); PageUtils searchEcssCoDelNotifyHeaderForDanZheng(EcssCoDelNotifyHeaderData data); List searchEcssCoDelNotifyDetail(EcssCoDelNotifyHeaderData data); - void saveEcssCoDelNotifyByExcel(MultipartFile file, EcssCoDelNotifyHeaderData data); + Map> saveEcssCoDelNotifyByExcel(MultipartFile file, EcssCoDelNotifyHeaderData data); void updateEcssDelHeader(EcssCoDelNotifyHeaderData data); @@ -54,8 +54,6 @@ public interface CoDelService { void deleteHsCode(EcssHsCodeData data); - List searchCoDelPalletData(EcssCoDelNotifyHeaderData inData); - List searchCoDelPalletDataNew(EcssCoDelNotifyHeaderData inData); List selectBoxList(EcssCoDelNotifyHeaderData inData); diff --git a/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java b/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java index 572d5235..9247df17 100644 --- a/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java +++ b/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java @@ -31,7 +31,6 @@ import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.shiro.SecurityUtils; -import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.ClassPathResource; import org.springframework.stereotype.Service; @@ -92,14 +91,12 @@ public class CoDelServiceImpl implements CoDelService { @Override @Transactional - public void saveEcssCoDelNotifyByExcel(MultipartFile file, EcssCoDelNotifyHeaderData inData) { + public Map> saveEcssCoDelNotifyByExcel(MultipartFile file, EcssCoDelNotifyHeaderData inData) { SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); String site = coDelMapper.getSiteByBu(inData.getBuNo()); List excelList = new ArrayList<>(); - try { - // 转流 - InputStream is = file.getInputStream(); - // 读取工作簿 + + try (InputStream is = file.getInputStream()) { XSSFWorkbook workbook = new XSSFWorkbook(is); importNotifyExcel(inData, workbook, site, currentUser, excelList); } catch (NullPointerException e) { @@ -108,19 +105,32 @@ public class CoDelServiceImpl implements CoDelService { throw new RuntimeException("导入失败:" + e.getMessage()); } - // 使用 groupingBy 进行分组 + // 成功和失败列表 + List successList = new ArrayList<>(); + List failList = new ArrayList<>(); + + // 使用 groupingBy 分组 Map> groupedByReadyDateAndCmcInvoice = excelList.stream() .collect(Collectors.groupingBy(data -> data.getReadyDate() + "-" + data.getCmcInvoice())); // 每个分组创建一个销售发货单 groupedByReadyDateAndCmcInvoice.forEach((key, list) -> { + String cmcInvoice = list.get(0).getCmcInvoice(); String transNo; - //测试下有没有发票号已经录入并且转化了 - List checkIfHasHeader = coDelMapper.checkIfHasHeader(list.get(0).getCmcInvoice()); - if (checkIfHasHeader.size() == 0) { + + // 检查是否已经存在 + List checkIfHasHeader = coDelMapper.checkIfHasHeader(cmcInvoice); + if (!checkIfHasHeader.isEmpty()) { + failList.add("发票号:" + cmcInvoice + " 已经生成发货通知单"); + return; // 跳过当前分组,继续下一个 + } + + try { + // 新建头 EcssCoDelNotifyHeader headerList = new EcssCoDelNotifyHeader(); coDelMapper.updateTransNo(list.get(0).getSite(), "EC"); transNo = coDelMapper.getTransNo(list.get(0).getSite(), "EC"); + headerList.setDelNo(transNo); headerList.setSite(list.get(0).getSite()); headerList.setBuNo(list.get(0).getBuNo()); @@ -134,25 +144,32 @@ public class CoDelServiceImpl implements CoDelService { headerList.setOverseasShipper(inData.getOverseasShipper()); headerList.setOverseasAddress(inData.getOverseasAddress()); headerList.setCnative(inData.getCnative()); - headerList.setCmcInvoice(list.get(0).getCmcInvoice()); + headerList.setCmcInvoice(cmcInvoice); headerList.setCreateBy(inData.getUsername()); coDelMapper.saveEcssCoDelNotifyHeader(headerList); - } else { - // if("Y".equals(checkIfHasHeader.get(0).getErpFlag())){ - throw new RuntimeException("发票号:" + list.get(0).getCmcInvoice() + "已经生成了发货通知单,请先删除!"); - // } - } + // 明细 + for (int i = 0; i < list.size(); i++) { + list.get(i).setDelNo(transNo); + list.get(i).setItemNo(i + 1); + } + coDelMapper.batchSaveEcssCoDelNotifyDetail(list); - for (int i = 0; i < list.size(); i++) { - list.get(i).setDelNo(transNo); - list.get(i).setItemNo(i + 1); + // 加入成功列表 + successList.add("发票号:" + cmcInvoice + " 导入成功"); + } catch (Exception e) { + failList.add("发票号:" + cmcInvoice + " 导入失败,原因:" + e.getMessage()); } - coDelMapper.batchSaveEcssCoDelNotifyDetail(list); }); + // 返回结果 + Map> resultMap = new HashMap<>(); + resultMap.put("success", successList); + resultMap.put("fail", failList); + return resultMap; } + private void importNotifyExcel(EcssCoDelNotifyHeaderData inData, XSSFWorkbook workbook, String site, SysUserEntity currentUser, List excelList) { for (int s = 0; s < workbook.getNumberOfSheets(); s++) { @@ -294,9 +311,6 @@ public class CoDelServiceImpl implements CoDelService { @Override public void deleteEcssDelHeader(EcssCoDelNotifyHeaderData data) { List checkEcssCoDelNotifyDetail = coDelMapper.searchEcssCoDelNotifyDetail(data); - /* if (checkEcssCoDelNotifyDetail.size() > 0) { - throw new RuntimeException("该发货通知单下有明细无法删除!"); - }*/ coDelMapper.deleteEcssDelHeader(data); for (EcssCoDelNotifyDetailData detailData : checkEcssCoDelNotifyDetail){ coDelMapper.deleteEcssDelDetail(detailData); @@ -419,9 +433,6 @@ public class CoDelServiceImpl implements CoDelService { if (checkHeader.isEmpty()) { throw new RuntimeException("不存在该发货通知单请刷新界面"); } - /* if (!"已计划".equals(checkHeader.get(0).getNotifyStatus())) { - throw new RuntimeException("发货通知单状态不为已计划,无法修改。"); - }*/ SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); List parts = coDelMapper.getPartNo(data.getSite(), data.getPn(),currentUser.getUsername(),data.getBuNo()); if (parts.isEmpty()) { @@ -485,9 +496,6 @@ public class CoDelServiceImpl implements CoDelService { if (checkHeader.isEmpty()) { throw new RuntimeException("不存在该发货通知单请刷新界面"); } - /* if (!"已计划".equals(checkHeader.get(0).getNotifyStatus())) { - throw new RuntimeException("发货通知单状态不为已计划,无法删除。"); - }*/ data.setQty(BigDecimal.ZERO); data.setModifyFlag(true); data.setStatus("取消发货"); @@ -622,9 +630,6 @@ public class CoDelServiceImpl implements CoDelService { if (checkHeader.isEmpty()) { throw new RuntimeException("不存在该发货通知单请刷新界面"); } - /* if (!"仓库已确认".equals(checkHeader.get(0).getNotifyStatus())) { - throw new RuntimeException("发货通知单状态不为仓库已确认,请刷新页面。"); - }*/ coDelMapper.updateEcssDel(data); } @@ -788,11 +793,6 @@ public class CoDelServiceImpl implements CoDelService { } } - @Override - public List searchCoDelPalletData(EcssCoDelNotifyHeaderData inData) { - return coDelMapper.searchCoDelPalletData(inData); - } - @Override public List selectBoxList(EcssCoDelNotifyHeaderData inData) { return coDelMapper.selectBoxList(inData); @@ -832,9 +832,6 @@ public class CoDelServiceImpl implements CoDelService { EcssCoDelPalletData excelData = new EcssCoDelPalletData(); // 获得该行 XSSFRow row = sheet.getRow(j); - /* if ((inData.getWalMartOrderFlag()==null || inData.getWalMartOrderFlag().equals("N")) && row.getCell(0) == null) { - throw new RuntimeException("第" + j + "行的序号不能为空!"); - }*/ if (row.getCell(1) != null && !inData.getCmcInvoice().equals(row.getCell(1).getStringCellValue())) { throw new RuntimeException("第" + j + "行的发票号与发货通知单的发票号不一致!"); } @@ -844,12 +841,10 @@ public class CoDelServiceImpl implements CoDelService { if (row.getCell(7) == null) { throw new RuntimeException("第" + j + "行的数量不能为空!"); } - //excelData.setSeqNo((inData.getWalMartOrderFlag()!=null && inData.getWalMartOrderFlag().equals("Y"))?j:getIntegerCellValue(row, 0)); // 为对象赋值 excelData.setSite(inData.getSite()); // site excelData.setBuNo(inData.getBuNo()); // bu excelData.setDelNo(inData.getDelNo()); - // excelData.setPalletRemark(getStringCellValue(row, 2)); excelData.setPoNo(getStringCellValue(row, 5)); excelData.setPn(getStringCellValue(row, 6)); List parts = coDelMapper.getPartNo(excelData.getSite(), excelData.getPn(),currentUser.getUsername(),inData.getBuNo()); @@ -860,11 +855,6 @@ public class CoDelServiceImpl implements CoDelService { excelData.setQty(getNumericCellValueOrDefault(row, 7)); excelData.setBoxQty(getNumericCellValueOrDefault(row, 2)); excelData.setRolls(getNumericCellValueOrDefault(row, 8)); - //excelData.setPalletQty(getIntegerCellValue(row, 8)); - //excelData.setLength(getNumericCellValueOrDefault(row, 9)); - //excelData.setWidth(getNumericCellValueOrDefault(row, 10)); - //excelData.setHeight(getNumericCellValueOrDefault(row, 11)); - //excelData.setVolume(getNumericCellValueOrDefault(row, 12)); excelData.setGrossWeight(getNumericCellValueOrDefault(row, 3)); excelData.setNetWeight(getNumericCellValueOrDefault(row, 4)); if (excelData.getBoxQty() == null && excelData.getGrossWeight() == null && excelData.getNetWeight() == null) { @@ -903,98 +893,11 @@ public class CoDelServiceImpl implements CoDelService { palletListMap2.put(itemData.getGroupSeqNo(),palletDataList); } } - /*if (inData.getWalMartOrderFlag()!=null && inData.getWalMartOrderFlag().equals("Y")) { - for (EcssCoDelPalletData itemData : excelList){ - if (palletListMap.containsKey(itemData.getSeqNo())) { - palletListMap.get(itemData.getSeqNo()).add(itemData); - } else { - List palletDataList = new ArrayList<>(); - palletDataList.add(itemData); - palletListMap.put(itemData.getSeqNo(),palletDataList); - } - } - } else { - *//* if (excelList.get(0).getPalletQty() == null || excelList.get(0).getPalletQty() == 0) { - throw new RuntimeException("导入失败:第一行的托数不能为0!"); - }*//* - for (EcssCoDelPalletData itemData : excelList){ - if (palletListMap2.containsKey(itemData.getGroupSeqNo())) { - palletListMap2.get(itemData.getGroupSeqNo()).add(itemData); - } else { - List palletDataList = new ArrayList<>(); - palletDataList.add(itemData); - palletListMap2.put(itemData.getGroupSeqNo(),palletDataList); - } - } - }*/ EcssWalMartOrder task = new EcssWalMartOrder(); List headerList = new ArrayList<>(); List boxList = new ArrayList<>(); List detailList = new ArrayList<>(); int seqNo = 0; - // palletListMap里每一个key生成一个EcssCoDelPalletHeaderData,每一个value生成一组EcssCoDelPalletDetailData - /*for (Map.Entry> entry : palletListMap.entrySet()) { - seqNo++; - EcssCoDelPalletHeaderData headerData = new EcssCoDelPalletHeaderData(); - headerData.setSite(inData.getSite()); - headerData.setBuNo(inData.getBuNo()); - headerData.setDelNo(inData.getDelNo()); - headerData.setSeqNo(seqNo); - headerData.setPalletNo(inData.getDelNo() + "-" + String.format("%03d", seqNo)); - headerData.setPalletQty(entry.getValue().get(0).getPalletQty()); - headerData.setPalletRemark(entry.getValue().get(0).getPalletRemark()); - headerData.setLength(entry.getValue().get(0).getLength()); - headerData.setWidth(entry.getValue().get(0).getWidth()); - headerData.setHeight(entry.getValue().get(0).getHeight()); - headerData.setVolume(entry.getValue().get(0).getVolume()); - headerData.setCreateBy(currentUser.getUsername()); - int i=0; - BigDecimal totalGrossWeight = new BigDecimal(0); - BigDecimal boxQty = new BigDecimal(0); - for (EcssCoDelPalletData thisData : entry.getValue()) { - EcssCoDelPalletDetailData detailData = new EcssCoDelPalletDetailData(); - detailData.setSite(thisData.getSite()); - detailData.setBuNo(thisData.getBuNo()); - detailData.setDelNo(thisData.getDelNo()); - detailData.setSeqNo(seqNo); - detailData.setItemNo(i + 1); - i++; - detailData.setPartNo(thisData.getPartNo()); - detailData.setPn(thisData.getPn()); - detailData.setQty(thisData.getQty()); - task.setSku(detailData.getPn()); - task.setQty(detailData.getQty()); - List orderDataList = sqlSession.selectList("ecssMapper" + "." + "searchWalMartOrderList", task); - totalGrossWeight = totalGrossWeight.add(orderDataList.isEmpty()? new BigDecimal(0):orderDataList.get(0).getGrossWeight()); - detailData.setPoNo(thisData.getPoNo()); - if (thisData.getBoxQty()!=null && thisData.getBoxQty().intValue()>0) { - detailData.setBoxQty(thisData.getBoxQty()); - } else { - String partNo = thisData.getPartNo(); - // 关务物料属性 - List propertiesValues = coDelMapper.getPropertiesListByTypeAndCodeNo( - inData.getSite(), "ECSSPART","BG001",inData.getBuNo(),partNo); - // 每一个物料加属性对应一个属性,用来下面遍历发货通知单明细时获取具体属性值 - Map> partNoAndItemNoMap = propertiesValues.stream() - .collect(Collectors.groupingBy(PartSubPropertiesValue::getPropertiesItemNo)); - PartSubPropertiesValueData propertiesRollQty = partNoAndItemNoMap.get("ROLLQTY")==null? null:partNoAndItemNoMap.get("ROLLQTY").get(0);//每卷数量 - PartSubPropertiesValueData propertiesBoxRolls = partNoAndItemNoMap.get("BOXROLLS")==null? null:partNoAndItemNoMap.get("BOXROLLS").get(0);//每箱卷数 - if (propertiesRollQty==null||propertiesBoxRolls==null) { - throw new RuntimeException("请先维护物料["+detailData.getPn()+"]的每卷数量和每箱卷数!"); - } - detailData.setBoxQty(detailData.getQty().divide( - BigDecimal.valueOf(((double) propertiesRollQty.getNumValue().intValue() * propertiesBoxRolls.getNumValue().intValue())),2, BigDecimal.ROUND_HALF_UP)); - } - detailData.setRolls(thisData.getRolls()); - detailData.setCreateBy(currentUser.getUsername()); - detailList.add(detailData); - boxQty = boxQty.add(detailData.getBoxQty()!=null?detailData.getBoxQty():new BigDecimal(0)); - } - BigDecimal netWeight = totalGrossWeight.intValue()>0?totalGrossWeight.subtract(boxQty.divide(BigDecimal.valueOf(2),2,RoundingMode.HALF_UP)):new BigDecimal(0); - headerData.setGrossWeight(totalGrossWeight); - headerData.setNetWeight(netWeight); - headerList.add(headerData); - }*/ for (Map.Entry> entry : palletListMap2.entrySet()) { seqNo++; EcssCoDelBoxListData boxListData = new EcssCoDelBoxListData(); @@ -1026,9 +929,6 @@ public class CoDelServiceImpl implements CoDelService { detailList.add(detailData); } } - /*for (EcssCoDelPalletHeaderData ecssCoDelPalletHeaderData : headerList) { - coDelMapper.saveCodelPalletHeader(ecssCoDelPalletHeaderData); - }*/ for (EcssCoDelBoxListData boxData : boxList) { coDelMapper.saveCodelBoxList(boxData); } @@ -2262,7 +2162,6 @@ public class CoDelServiceImpl implements CoDelService { list.add(detailData); palletListMap.put(detailData.getPartNo(), list); } - //totalQty = totalQty + detailData.getQty().intValue(); } int seqNo = 1; StringBuilder partNos = new StringBuilder(); @@ -2294,36 +2193,6 @@ public class CoDelServiceImpl implements CoDelService { PartSubPropertiesValueData propertiesRollQty = partNoAndItemNoMap.get("ROLLQTY").get(0);//每卷数量 PartSubPropertiesValueData propertiesBoxRolls = partNoAndItemNoMap.get("BOXROLLS").get(0);//每箱卷数 PartSubPropertiesValueData propertiesBoxWeight = partNoAndItemNoMap.get("BOXWEIGHT").get(0);//箱重量 - /*EcssCoDelPalletHeaderData headerData = new EcssCoDelPalletHeaderData(); - BeanUtils.copyProperties(inData, headerData); - headerData.setSeqNo(seqNo+seq); - seq++; - headerData.setPalletNo(inData.getDelNo() + "-" + String.format("%03d", headerData.getSeqNo())); - headerData.setCreateBy(currentUser.getUsername()); - headerData.setCreateDate(new Date()); - headerData.setUpdateBy(currentUser.getUsername()); - headerData.setUpdateDate(new Date()); - headerData.setAddFlag(0); - headerData.setLength(palletData.getLength()); - headerData.setWidth(palletData.getWidth()); - headerData.setHeight(inData.getHeight()); - int totalQty = 0; - for (EcssCoDelNotifyDetailData detailData : palletListMap.get(partNo)) { - totalQty = totalQty + detailData.getQty().intValue(); - } - // 每托层数*箱高+底座高 - headerData.setVolume(headerData.getLength().multiply(headerData.getWidth()).multiply(headerData.getHeight())); - BigDecimal boxWeight = BigDecimal.valueOf(propertiesBoxWeight.getNumValue());// 箱的重量 - // Total Qty / 每箱EA - BigDecimal noCartons = BigDecimal.valueOf(totalQty/((double) propertiesRollQty.getNumValue().intValue() * propertiesBoxRolls.getNumValue().intValue())); - // 箱重量:物料维护里取 - BigDecimal grossWeight = noCartons.multiply(boxWeight); - // Net Weight = Gross Weight - No of Cartons/2 - BigDecimal netWeight = grossWeight.subtract(noCartons.divide(BigDecimal.valueOf(2))); - // 如果是沃尔玛订单可以根据料号和发货数量直接取维护好的净重、毛重 - headerData.setGrossWeight(grossWeight); - headerData.setNetWeight(netWeight); - coDelMapper.saveCodelPalletHeader(headerData);*/ int totalQty = 0; for (EcssCoDelNotifyDetailData detailData : palletListMap.get(partNo)) { totalQty = totalQty + detailData.getQty().intValue(); @@ -2463,10 +2332,6 @@ public class CoDelServiceImpl implements CoDelService { } } - // 处理栈板记录 - /* palletHeaderSave(inData.getSite(), inData.getBuNo(), inData.getDelNo(), - inData.getPalletRecords(), currentUser);*/ - //将发货通知单modifyFlag变更为false notifyHeader.setModifyFlag(false); coDelMapper.updateEcssDelHeaderForModify(notifyHeader); coDelMapper.updateEcssDelDetailForModify(notifyHeader); diff --git a/src/main/resources/mapper/ecss/CoDelMapper.xml b/src/main/resources/mapper/ecss/CoDelMapper.xml index 011c59af..c16c28e9 100644 --- a/src/main/resources/mapper/ecss/CoDelMapper.xml +++ b/src/main/resources/mapper/ecss/CoDelMapper.xml @@ -1,27 +1,10 @@ - - - - - - - - - - - - - - - - - - - insert into ecss_CoDelPalletHeader (site,bu_no,delNo,seq_no,pallet_no,pallet_qty,[length],width,height,volume,gross_weight,net_weight,pallet_remark,create_by, create_date,pallet) @@ -828,13 +803,6 @@ left join ecss_CoDelNotifyHeader noHeader on a.site=noHeader.site and a.delNo=no where a.site=#{site} and a.bu_no=#{buNo} and a.delNo=#{delNo} and b.site is not null GROUP BY b.part_no - - update ecss_declaration_header set upc=#{upc},so=#{so},origin=#{origin},pallet_weight=#{palletWeight},material=#{material},