diff --git a/pom.xml b/pom.xml index f18cbd7..35ed178 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 1.21 2.3.3 1.4.6 - 2.0.34 + 2.0.50 6.4.3 2.11.0 1.4 diff --git a/win-admin/src/main/java/com/win/web/controller/base/CommandController.java b/win-admin/src/main/java/com/win/web/controller/base/CommandController.java index 15755ca..f7a333f 100644 --- a/win-admin/src/main/java/com/win/web/controller/base/CommandController.java +++ b/win-admin/src/main/java/com/win/web/controller/base/CommandController.java @@ -11,7 +11,6 @@ import com.win.system.domain.LinuxAccess; import com.win.system.domain.QadAccess; import com.win.system.service.LinuxAccessService; import com.win.system.service.QadAccessService; -import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -26,7 +25,6 @@ import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.List; -@Slf4j @RestController @RequestMapping("/command") public class CommandController { @@ -108,7 +106,6 @@ public class CommandController { jsonObject.remove("company_code"); jsonObject.remove("domain"); String inJson = "{\"" + key + "\":"+ jsonObject+"}"; - log.info("inJson: {}", inJson); return linuxAccessService.executeCommand(linuxAccess, qadAccess, traceid, inJson, domain); } diff --git a/win-admin/src/main/java/com/win/web/controller/base/ExcelController.java b/win-admin/src/main/java/com/win/web/controller/base/ExcelController.java index ce80338..9fb0d31 100644 --- a/win-admin/src/main/java/com/win/web/controller/base/ExcelController.java +++ b/win-admin/src/main/java/com/win/web/controller/base/ExcelController.java @@ -8,17 +8,20 @@ import com.alibaba.excel.write.metadata.fill.FillConfig; import com.alibaba.excel.write.metadata.fill.FillWrapper; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.win.common.annotation.Log; import com.win.common.config.WinConfig; +import com.win.common.constant.HttpStatus; import com.win.common.core.domain.AjaxResult; import com.win.common.enums.BusinessType; +import com.win.common.utils.uuid.UUID; +import com.win.system.domain.LinuxAccess; +import com.win.system.domain.QadAccess; import com.win.system.service.LinuxAccessService; import com.win.system.service.QadAccessService; -import lombok.extern.slf4j.Slf4j; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellRangeAddress; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -37,7 +40,6 @@ import java.util.ArrayList; import java.util.List; import java.util.TreeMap; -@Slf4j @RestController @RequestMapping("/excel") public class ExcelController { @@ -61,35 +63,37 @@ public class ExcelController { JSONObject jsonObject = JSONObject.parseObject(body); String orderNo = jsonObject.getString("orderNo"); String type = jsonObject.getString("type"); -// String companyCode = "LEARPROD-CCJV"; -// String interfaceName = "supplierrsexport"; -// String domain = "CCJV"; -// QueryWrapper linuxAccessQueryWrapper = new QueryWrapper<>(); -// linuxAccessQueryWrapper.eq("company_code",companyCode); -// linuxAccessQueryWrapper.eq("uri", interfaceName); -// LinuxAccess linuxAccess = linuxAccessService.getOne(linuxAccessQueryWrapper); -// if(linuxAccess == null) { -// return AjaxResult.error(HttpStatus.LINUX_ACCESS_ERROR,"linux访问控制不存在"); -// } -// QueryWrapper qadAccessQueryWrapper = new QueryWrapper<>(); -// qadAccessQueryWrapper.eq("company_code",companyCode); -// qadAccessQueryWrapper.eq("domain",domain); -// QadAccess qadAccess = qadAccessService.getOne(qadAccessQueryWrapper); -// if(qadAccess == null) { -// return AjaxResult.error(HttpStatus.QAD_ACCESS_ERROR,"QAD_ACCESS_ERROR"); -// } -// JSONArray jsonArray = new JSONArray(); -// JSONObject ttSearchCondition = new JSONObject(); -// ttSearchCondition.put("order_from", orderNo); -// ttSearchCondition.put("order_to", orderNo); -// jsonArray.add(ttSearchCondition); -// JSONObject dsSearchCondition = new JSONObject(); -// dsSearchCondition.put("ttSearchCondition", jsonArray); -// String json = dsSearchCondition.toString(); -// UUID traceid = UUID.randomUUID(); -// AjaxResult ajaxResult = linuxAccessService.executeCommand(linuxAccess, qadAccess, traceid.toString(), json, domain); -// jsonObject = JSONObject.parseObject(ajaxResult.get("msg").toString()); - jsonObject = JSONObject.parseObject("{\"dssupplierrs\":{\"ttsupplierrsheader\":[{\"schm_header_site\":\"30G1\",\"schm_header_order\":\"BES0003\",\"schm_header_vend\":\"JVRM0003\",\"schm_header_vendname\":\"Lear Besigheim\",\"schm_header_vendaddr\":\"ferdinand-porsche-strabe 274354 besigheim\",\"schm_header_vendphone\":\"\",\"schm_header_vendfax\":\"\",\"schm_header_vendcontact\":\"Lear Besigheim\",\"schm_header_cust\":\"30G1\",\"schm_header_custname\":\"ChangChun JV\",\"schm_header_custaddr\":\"\",\"schm_header_custphone\":\"\",\"schm_header_custfax\":\"\",\"schm_header_custcontact\":\"\",\"schm_header_lastrec\":\"J02709T*4681694\",\"schm_header_title\":\"SUPPLIER SCHEDULE 订单/ MATERIAL RELEASE 供应商发货日程\",\"schm_header_buyer\":\"P2\",\"schm_header_arrive_ch\":\"\",\"schm_header_arrive_us\":\"\",\"schm_header_shipto\":\"30G1\",\"schm_header_dock\":\"\",\"schm_header_rlse_id\":\"20240511-002\",\"schm_header_cr_date\":\"2024-05-11\",\"schm_header_cr_time\":\"17:34:09\",\"schm_header_eff_start\":\"2024-05-11\",\"schm_header_eff_end\":null,\"schm_header_status\":\"Success\"}],\"ttsupplierrsline\":[{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":1,\"schd_line_part\":\"2100223N\",\"schd_line_part_desc\":\"前座安全带锁扣固定螺钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1972000,\"schd_line_cum_qty\":1972000,\"schd_line_req_qty\":11,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-06-24\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":48000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":1,\"schd_line_part\":\"2100223N\",\"schd_line_part_desc\":\"前座安全带锁扣固定螺钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1972000,\"schd_line_cum_qty\":1972000,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-08-19\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":48000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":1,\"schd_line_part\":\"2100223N\",\"schd_line_part_desc\":\"前座安全带锁扣固定螺钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1972000,\"schd_line_cum_qty\":1972000,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-09-30\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":48000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":1,\"schd_line_part\":\"2100223N\",\"schd_line_part_desc\":\"前座安全带锁扣固定螺钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1972000,\"schd_line_cum_qty\":1972000,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-01-06\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":48000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":1,\"schd_line_part\":\"2100223N\",\"schd_line_part_desc\":\"前座安全带锁扣固定螺钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1972000,\"schd_line_cum_qty\":1972000,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-02-24\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":48000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":2,\"schd_line_part\":\"2100237N\",\"schd_line_part_desc\":\"后靠背安全带总成固定螺母\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":947158,\"schd_line_cum_qty\":947158,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-07-15\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":60000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":2,\"schd_line_part\":\"2100237N\",\"schd_line_part_desc\":\"后靠背安全带总成固定螺母\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":947158,\"schd_line_cum_qty\":947158,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-12-23\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":60000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":3,\"schd_line_part\":\"2200153N\",\"schd_line_part_desc\":\"波纹管D3\\\\/18\",\"schd_line_pcr_date\":null,\"schd_line_pcr_qty\":0,\"schd_line_cum_qty\":0,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":null,\"schd_line_fc_qual\":\"\",\"schd_line_qty\":0,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":5,\"schd_line_part\":\"4H0 972 081\",\"schd_line_part_desc\":\"D18波形管带子卡\",\"schd_line_pcr_date\":null,\"schd_line_pcr_qty\":0,\"schd_line_cum_qty\":0,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":null,\"schd_line_fc_qual\":\"\",\"schd_line_qty\":0,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":11,\"schd_line_part\":\"8T0 972 847 B\",\"schd_line_part_desc\":\"线束管夹D24\",\"schd_line_pcr_date\":null,\"schd_line_pcr_qty\":0,\"schd_line_cum_qty\":0,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":null,\"schd_line_fc_qual\":\"\",\"schd_line_qty\":0,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":14,\"schd_line_part\":\"N 900 880 01\",\"schd_line_part_desc\":\"螺母 M16\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":881140,\"schd_line_cum_qty\":881140,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-05-11\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":60000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-001\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":35,\"schd_line_part\":\"8W0 881 775 F\",\"schd_line_part_desc\":\"通风前靠背发泡左\",\"schd_line_pcr_date\":null,\"schd_line_pcr_qty\":0,\"schd_line_cum_qty\":0,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":null,\"schd_line_fc_qual\":\"\",\"schd_line_qty\":0,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":36,\"schd_line_part\":\"8W0 881 776 F\",\"schd_line_part_desc\":\"通风前靠背发泡右\",\"schd_line_pcr_date\":null,\"schd_line_pcr_qty\":0,\"schd_line_cum_qty\":0,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":null,\"schd_line_fc_qual\":\"\",\"schd_line_qty\":0,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":40,\"schd_line_part\":\"8W0 881 361 D\",\"schd_line_part_desc\":\"通风座椅前座发泡\",\"schd_line_pcr_date\":null,\"schd_line_pcr_qty\":0,\"schd_line_cum_qty\":0,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":null,\"schd_line_fc_qual\":\"\",\"schd_line_qty\":0,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":45,\"schd_line_part\":\"8W0 881 969 T QAU\",\"schd_line_part_desc\":\"前靠背护板带通风\",\"schd_line_pcr_date\":null,\"schd_line_pcr_qty\":0,\"schd_line_cum_qty\":0,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":null,\"schd_line_fc_qual\":\"\",\"schd_line_qty\":0,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-05-13\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-05-20\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-05-27\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-06-03\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-06-10\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-06-17\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-06-24\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-07-01\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-07-15\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":12096,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-07-22\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-07-29\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-08-05\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-08-12\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-08-19\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-08-26\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-09-02\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-09-09\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-09-16\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":5376,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-09-23\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-09-30\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":15456,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-11-18\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":4032,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-11-25\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":5376,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-12-02\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-12-09\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":5376,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-12-16\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-12-23\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-12-30\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":5376,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-01-06\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":5376,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-01-13\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":5376,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-01-20\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":5376,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-01-27\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-02-03\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":4032,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-02-10\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":5376,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-02-17\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-02-24\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-03-03\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-03-17\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-03-24\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-03-31\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-04-07\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-04-14\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":6720,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":54,\"schd_line_part\":\"4M0 881 590 4PK\",\"schd_line_part_desc\":\"靠背上端盖板\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1066478,\"schd_line_cum_qty\":1066478,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-04-21\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":2688,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":59,\"schd_line_part\":\"8W0 881 367\",\"schd_line_part_desc\":\"风扇保护帽\",\"schd_line_pcr_date\":null,\"schd_line_pcr_qty\":0,\"schd_line_cum_qty\":0,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":null,\"schd_line_fc_qual\":\"\",\"schd_line_qty\":0,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-05-20\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":2000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-06-03\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":3000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-07-15\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":3000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-08-05\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":2000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-08-26\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":2000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-09-16\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":3000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-11-18\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":3000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-12-30\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":3000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":60,\"schd_line_part\":\"4H0 941 117\",\"schd_line_part_desc\":\"胶皮钉\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":193700,\"schd_line_cum_qty\":193700,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2025-02-24\",\"schd_line_fc_qual\":\"P\",\"schd_line_qty\":3000,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-002\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":62,\"schd_line_part\":\"8W0 881 627\",\"schd_line_part_desc\":\"靠背支撑塑料\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1067400,\"schd_line_cum_qty\":1067400,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-05-13\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-001\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":62,\"schd_line_part\":\"8W0 881 627\",\"schd_line_part_desc\":\"靠背支撑塑料\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1067400,\"schd_line_cum_qty\":1067400,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-05-20\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-001\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":62,\"schd_line_part\":\"8W0 881 627\",\"schd_line_part_desc\":\"靠背支撑塑料\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1067400,\"schd_line_cum_qty\":1067400,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-05-27\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-001\"},{\"schd_line_site\":\"30G1\",\"schd_line_order\":\"BES0003\",\"schd_line_line\":62,\"schd_line_part\":\"8W0 881 627\",\"schd_line_part_desc\":\"靠背支撑塑料\",\"schd_line_pcr_date\":\"2024-05-10\",\"schd_line_pcr_qty\":1067400,\"schd_line_cum_qty\":1067400,\"schd_line_req_qty\":0,\"schd_line_vpart\":\"\",\"schd_line_date\":\"2024-06-03\",\"schd_line_fc_qual\":\"F\",\"schd_line_qty\":8064,\"schd_line_interval\":\"\",\"schd_line_time\":\"\",\"schd_line_reference\":\"\",\"schd_line_um\":\"EA\",\"schd_line_ord_mult\":1,\"schd_line_pkg_code\":\"\",\"schd_line_rlse_id\":\"20240511-001\"}]}}"); + String companyCode = "LEARPROD-CCJV"; + String interfaceName = "supplierrsexport"; + String domain = "CCJV"; + if("guowai2".equals(type)) { + interfaceName = "xxpomrpexport"; + } + QueryWrapper linuxAccessQueryWrapper = new QueryWrapper<>(); + linuxAccessQueryWrapper.eq("company_code",companyCode); + linuxAccessQueryWrapper.eq("uri", interfaceName); + LinuxAccess linuxAccess = linuxAccessService.getOne(linuxAccessQueryWrapper); + if(linuxAccess == null) { + return AjaxResult.error(HttpStatus.LINUX_ACCESS_ERROR,"linux访问控制不存在"); + } + QueryWrapper qadAccessQueryWrapper = new QueryWrapper<>(); + qadAccessQueryWrapper.eq("company_code",companyCode); + qadAccessQueryWrapper.eq("domain",domain); + QadAccess qadAccess = qadAccessService.getOne(qadAccessQueryWrapper); + if(qadAccess == null) { + return AjaxResult.error(HttpStatus.QAD_ACCESS_ERROR,"QAD_ACCESS_ERROR"); + } + JSONArray jsonArray = new JSONArray(); + JSONObject ttSearchCondition = new JSONObject(); + ttSearchCondition.put("order_from", orderNo); + ttSearchCondition.put("order_to", orderNo); + jsonArray.add(ttSearchCondition); + JSONObject dsSearchCondition = new JSONObject(); + dsSearchCondition.put("ttSearchCondition", jsonArray); + String json = dsSearchCondition.toString(); + UUID traceid = UUID.randomUUID(); + AjaxResult ajaxResult = linuxAccessService.executeCommand(linuxAccess, qadAccess, traceid.toString(), json, domain); + jsonObject = JSONObject.parseObject(ajaxResult.get("msg").toString()); jsonObject = JSONObject.parseObject(jsonObject.getString("dssupplierrs")); JSONArray headerJsonArray = JSONArray.parse(jsonObject.getString("ttsupplierrsheader")); JSONArray lineJsonArray = JSONArray.parse(jsonObject.getString("ttsupplierrsline")); @@ -115,12 +119,14 @@ public class ExcelController { main.put("schd_line_part", jsonObjectLine.getString("schd_line_part")); main.put("schd_line_um", jsonObjectLine.getString("schd_line_um")); main.put("schd_line_part_desc", jsonObjectLine.getString("schd_line_part_desc")); + main.put("schd_line_req_qty", jsonObjectLine.getIntValue("schd_line_req_qty")); + main.put("schd_line_cum_qty", jsonObjectLine.getIntValue("schd_line_cum_qty")); + main.put("schd_line_pcr_qty", jsonObjectLine.getIntValue("schd_line_pcr_qty")); } - main.put("schd_line_req_qty", main.getIntValue("schd_line_req_qty") + jsonObjectLine.getIntValue("schd_line_req_qty")); - main.put("schd_line_cum_qty", main.getIntValue("schd_line_cum_qty") + jsonObjectLine.getIntValue("schd_line_cum_qty")); - main.put("schd_line_pcr_qty", main.getIntValue("schd_line_pcr_qty") + jsonObjectLine.getIntValue("schd_line_pcr_qty")); mainMap.put(schdLineLine, main); String schdLineDate = jsonObjectLine.getString("schd_line_date"); + String schdLineDateDl = jsonObjectLine.getString("schd_line_date_dl"); + String schdLineDateTh = jsonObjectLine.getString("schd_line_date_th"); if(schdLineDate != null) { String schdLineFcQual = jsonObjectLine.getString("schd_line_fc_qual"); if("F".equals(schdLineFcQual)) { @@ -128,6 +134,8 @@ public class ExcelController { if (firm == null) { firm = new JSONObject(); firm.put("schd_line_date", schdLineDate); + firm.put("schd_line_date_dl", schdLineDateDl); + firm.put("schd_line_date_th", schdLineDateTh); } JSONObject order = new JSONObject(); order.put("schd_line_qty", jsonObjectLine.getString("schd_line_qty")); @@ -138,6 +146,8 @@ public class ExcelController { if (forecast == null) { forecast = new JSONObject(); forecast.put("schd_line_date", schdLineDate); + forecast.put("schd_line_date_dl", schdLineDateDl); + forecast.put("schd_line_date_th", schdLineDateTh); } JSONObject order = new JSONObject(); order.put("schd_line_qty", jsonObjectLine.getString("schd_line_qty")); @@ -201,11 +211,6 @@ public class ExcelController { excelWriter.fill(jsonObjectHeader, writeSheet); //order数据 excelWriter.fill(new FillWrapper("order", orderArray), fillConfig, writeSheet); - //final FillConfig fillConfig2 = FillConfig.builder().direction(WriteDirectionEnum.HORIZONTAL).forceNewRow(Boolean.TRUE).build(); - //firm数据 - //excelWriter.fill(new FillWrapper("firm", firmArray), fillConfig2, writeSheet); - //forecast数据 - //excelWriter.fill(new FillWrapper("forecast", forecastArray), fillConfig2, writeSheet); } finally { if (excelWriter != null) { excelWriter.finish(); @@ -214,36 +219,38 @@ public class ExcelController { FileInputStream inputStream = new FileInputStream(filePath + "/" + fileName); Workbook workbook = new HSSFWorkbook(inputStream); Sheet sheet = workbook.getSheetAt(0); // 获取第一个工作表 - CellStyle cellStyle1 = getCellStyle(sheet, 13, 4);//Firm标题样式 - CellStyle cellStyle2 = getCellStyle(sheet, 13, 5);//forecast标题样式 - CellStyle cellStyle3 = getCellStyle(sheet, 14, 4);//Firm日期样式 - CellStyle cellStyle4 = getCellStyle(sheet, 14, 6);//Forecast日期样式 - CellStyle cellStyle5 = getCellStyle(sheet, 15, 4);//Firm数据样式 - CellStyle cellStyle6 = getCellStyle(sheet, 15, 6);//Forecast数据样式 - CellStyle cellStyle7 = getCellStyle(sheet, 14, 5);//Forecast arrive时间样式 - Row row13 = sheet.getRow(13); + CellStyle cellStyle1 = getCellStyle(sheet, 14, 5);//Firm订标题样式 + CellStyle cellStyle2 = getCellStyle(sheet, 14, 6);//Pick Up Date提货时间 + CellStyle cellStyle3 = getCellStyle(sheet, 14, 7);//forecast标题 + CellStyle cellStyle4 = getCellStyle(sheet, 15, 5);//Firm日期样式 + CellStyle cellStyle5 = getCellStyle(sheet, 15, 7);//Forecast日期样式 + CellStyle cellStyle6 = getCellStyle(sheet, 16, 5);//Firm数据样式 + CellStyle cellStyle7 = getCellStyle(sheet, 16, 7);//Forecast数据样式 Row row14 = sheet.getRow(14); + Row row15 = sheet.getRow(15); for(int i = 0; i < firmArray.size(); i++) { - int cellIndex = 4 + i; + int cellIndex = 5 + i; JSONObject firm = firmArray.getJSONObject(i); - Cell cell13 = row13.getCell(cellIndex); - if (cell13 == null) { - cell13 = row13.createCell(cellIndex); - } - cell13.setCellValue("Firm订单"); - cell13.setCellStyle(cellStyle1); - Cell cell = row14.getCell(cellIndex); - if (cell == null) { - cell = row14.createCell(cellIndex); - } - cell.setCellValue(firm.getString("schd_line_date")); - cell.setCellStyle(cellStyle3); - //设置每个订单数据 + //设置firm标题 + Cell firmCell = row14.getCell(cellIndex); + if (firmCell == null) { + firmCell = row14.createCell(cellIndex); + } + firmCell.setCellValue("Firm订单"); + firmCell.setCellStyle(cellStyle1); + //设置firm日期 + Cell firmDateCell = row15.getCell(cellIndex); + if (firmDateCell == null) { + firmDateCell = row15.createCell(cellIndex); + } + firmDateCell.setCellValue(firm.getString("schd_line_date")); + firmDateCell.setCellStyle(cellStyle4); + //设置每个firm订单数据 for(int count = 0; count < orderArray.size(); count++) { String cellValue = ""; JSONObject object = orderArray.getJSONObject(count); JSONObject order = firm.getJSONObject(object.getString("schd_line_line")); - Row nextRow = sheet.getRow(15 + count); + Row nextRow = sheet.getRow(16 + count); Cell nextCell = nextRow.getCell(cellIndex); if (nextCell == null) { nextCell = nextRow.createCell(cellIndex); @@ -259,68 +266,76 @@ public class ExcelController { } else { nextCell.setCellValue(""); } - nextCell.setCellStyle(cellStyle5); + nextCell.setCellStyle(cellStyle6); } } + //设置forecast前的Pick Up Date 提货日期列 for(int count = 0; count < orderArray.size() + 2; count++) { - int cellIndex = 4 + firmArray.size(); - Row nextRow = sheet.getRow(13 + count); + int cellIndex = 5 + firmArray.size(); + Row nextRow = sheet.getRow(14 + count); Cell nextCell = nextRow.getCell(cellIndex); if (nextCell == null) { nextCell = nextRow.createCell(cellIndex); } nextCell.setCellValue(""); - nextCell.setCellStyle(cellStyle7); + nextCell.setCellStyle(cellStyle2); if(count == 0) { - nextCell.setCellValue("forecast 预测"); + nextCell.setCellValue("Pick Up Date 提货日期"); nextCell.setCellStyle(cellStyle2); } else if(count == 1) { - nextCell.setCellValue("Arrive " + jsonObjectHeader.getString("schm_header_arrive_us") + " date\n到达李尔" + jsonObjectHeader.getString("schm_header_arrive_ch") + "时间"); - nextCell.setCellStyle(cellStyle7); + nextCell.setCellValue("ETA " + jsonObjectHeader.getString("schm_header_arrive_us") + "\n到达" + jsonObjectHeader.getString("schm_header_arrive_ch") + "时间"); + } else { + nextCell.setCellValue(""); } } for(int i = 0; i < forecastArray.size(); i++) { - int cellIndex = 5 + firmArray.size() + i; + int cellIndex = 6 + firmArray.size() + i; + //设置forecast标题 + Cell forecastCell = row14.getCell(cellIndex); + if (forecastCell == null) { + forecastCell = row14.createCell(cellIndex); + } + if(i == 0) { + forecastCell.setCellValue("forecast 预测"); + } else { + forecastCell.setCellValue(""); + } + forecastCell.setCellStyle(cellStyle3); + //设置forecast日期 JSONObject forecast = forecastArray.getJSONObject(i); - Cell cell = row14.getCell(cellIndex); - if (cell == null) { - cell = row14.createCell(cellIndex); - } - cell.setCellValue(forecast.getString("schd_line_date")); - cell.setCellStyle(cellStyle4); - Cell cell2 = row13.getCell(cellIndex); - if (cell2 == null) { - cell2 = row13.createCell(cellIndex); - } - cell2.setCellValue(""); - cell2.setCellStyle(cellStyle2); - //设置每个订单数据 + Cell forecastDateCell = row15.getCell(cellIndex); + if (forecastDateCell == null) { + forecastDateCell = row15.createCell(cellIndex); + } + forecastDateCell.setCellValue(forecast.getString("schd_line_date")); + forecastDateCell.setCellStyle(cellStyle5); + //设置forecast每个订单数据 for(int count = 0; count < orderArray.size(); count++) { String cellValue = ""; JSONObject object = orderArray.getJSONObject(count); JSONObject order = forecast.getJSONObject(object.getString("schd_line_line")); - Row nextRow = sheet.getRow(15 + count); - Cell nextCell = nextRow.getCell(cellIndex); - if (nextCell == null) { - nextCell = nextRow.createCell(cellIndex); - } + Row nextRow = sheet.getRow(16 + count); if(order != null) { cellValue = order.getString("schd_line_qty"); } if(cellValue.equals("0")) { cellValue = ""; } + Cell nextCell = nextRow.getCell(cellIndex); + if (nextCell == null) { + nextCell = nextRow.createCell(cellIndex); + } if(!cellValue.isEmpty()) { nextCell.setCellValue(new BigDecimal(cellValue).intValue()); } else { nextCell.setCellValue(""); } - nextCell.setCellStyle(cellStyle6); + nextCell.setCellStyle(cellStyle7); } } // 合并单元格 - CellRangeAddress cellRangeAddress2 = new CellRangeAddress(13, 13, firmArray.size() + 4, firmArray.size() + forecastArray.size() + 4); - sheet.addMergedRegion(cellRangeAddress2); + CellRangeAddress cellRangeAddress3 = new CellRangeAddress(14, 14, firmArray.size() + 6, firmArray.size() + forecastArray.size() + 5); + sheet.addMergedRegion(cellRangeAddress3); inputStream.close(); FileOutputStream outputStream = new FileOutputStream(filePath + "/" + fileName); workbook.write(outputStream); @@ -354,7 +369,6 @@ public class ExcelController { final ExcelWriter excelWriter = EasyExcelFactory.write(filePath + "/" + fileName).excelType(ExcelTypeEnum.XLS).withTemplate(templateFile.getInputStream()).build(); try { final WriteSheet writeSheet = EasyExcelFactory.writerSheet().build(); - //横向添加数据 //默认纵向添加数据 FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); //基础数据 @@ -369,36 +383,32 @@ public class ExcelController { FileInputStream inputStream = new FileInputStream(filePath + "/" + fileName); Workbook workbook = new HSSFWorkbook(inputStream); Sheet sheet = workbook.getSheetAt(0); // 获取第一个工作表 - CellStyle cellStyle1 = getCellStyle(sheet, 13, 8);//Firm订单标题样式 - CellStyle cellStyle2 = getCellStyle(sheet, 13, 9);//Pick Up Date 提货时间 - CellStyle cellStyle3 = getCellStyle(sheet, 13, 10);//forecast 预测 - CellStyle cellStyle4 = getCellStyle(sheet, 14, 8);//Firm数据样式 - CellStyle cellStyle5 = getCellStyle(sheet, 14, 9);//Forecast左侧样式 - CellStyle cellStyle6 = getCellStyle(sheet, 14, 10);//Forecast数据样式 - Row row13 = sheet.getRow(13); + CellStyle cellStyle1 = getCellStyle(sheet, 14, 8);//Firm订标题样式 + CellStyle cellStyle2 = getCellStyle(sheet, 14, 9);//Pick Up Date提货时间 + CellStyle cellStyle3 = getCellStyle(sheet, 14, 10);//forecast标题 + CellStyle cellStyle4 = getCellStyle(sheet, 15, 8);//Firm日期样式 + CellStyle cellStyle5 = getCellStyle(sheet, 15, 10);//Forecast日期样式 + CellStyle cellStyle6 = getCellStyle(sheet, 16, 8);//Firm数据样式 + CellStyle cellStyle7 = getCellStyle(sheet, 16, 10);//Forecast数据样式 Row row14 = sheet.getRow(14); Row row15 = sheet.getRow(15); for(int i = 0; i < firmArray.size(); i++) { int cellIndex = 8 + i; JSONObject firm = firmArray.getJSONObject(i); - Cell cell13 = row13.getCell(cellIndex); - if (cell13 == null) { - cell13 = row13.createCell(cellIndex); - } - cell13.setCellValue("Firm订单"); - cell13.setCellStyle(cellStyle1); - Cell cell14 = row14.getCell(cellIndex); - if (cell14 == null) { - cell14 = row14.createCell(cellIndex); - } - cell14.setCellValue(""); - cell14.setCellStyle(cellStyle4); - Cell cell = row15.getCell(cellIndex); - if (cell == null) { - cell = row15.createCell(cellIndex); - } - cell.setCellValue(firm.getString("schd_line_date")); - cell.setCellStyle(cellStyle4); + //设置firm标题 + Cell firmCell = row14.getCell(cellIndex); + if (firmCell == null) { + firmCell = row14.createCell(cellIndex); + } + firmCell.setCellValue("Firm订单"); + firmCell.setCellStyle(cellStyle1); + //设置firm日期 + Cell firmDateCell = row15.getCell(cellIndex); + if (firmDateCell == null) { + firmDateCell = row15.createCell(cellIndex); + } + firmDateCell.setCellValue(firm.getString("schd_line_date")); + firmDateCell.setCellStyle(cellStyle4); //设置每个firm订单数据 for(int count = 0; count < orderArray.size(); count++) { String cellValue = ""; @@ -420,7 +430,7 @@ public class ExcelController { } else { nextCell.setCellValue(""); } - nextCell.setCellStyle(cellStyle4); + nextCell.setCellStyle(cellStyle6); } } //设置firm前的Pick Up Date 提货日期列 @@ -434,53 +444,45 @@ public class ExcelController { beforeCell.setCellStyle(cellStyle1); } //设置forecast前的Pick Up Date 提货日期列 - for(int count = 0; count < orderArray.size() + 3; count++) { + for(int count = 0; count < orderArray.size() + 2; count++) { int cellIndex = 8 + firmArray.size(); - Row nextRow = sheet.getRow(13 + count); + Row nextRow = sheet.getRow(14 + count); Cell nextCell = nextRow.getCell(cellIndex); if (nextCell == null) { nextCell = nextRow.createCell(cellIndex); } nextCell.setCellValue(""); - nextCell.setCellStyle(cellStyle5); + nextCell.setCellStyle(cellStyle2); if(count == 0) { nextCell.setCellValue("Pick Up Date 提货日期"); nextCell.setCellStyle(cellStyle2); - } else if(count == 2) { - nextCell.setCellValue("ETA " + jsonObjectHeader.getString("schm_header_arrive_us") + " \n到达" + jsonObjectHeader.getString("schm_header_arrive_ch") + " 时间"); + } else if(count == 1) { + nextCell.setCellValue("ETA " + jsonObjectHeader.getString("schm_header_arrive_us") + "\n到达" + jsonObjectHeader.getString("schm_header_arrive_ch") + "时间"); } else { nextCell.setCellValue(""); } } - //合并单元格 - CellRangeAddress cellRangeAddress2 = new CellRangeAddress(13, 14, 8 + firmArray.size(), 8 + firmArray.size()); - sheet.addMergedRegion(cellRangeAddress2); for(int i = 0; i < forecastArray.size(); i++) { int cellIndex = 9 + firmArray.size() + i; - //设置forecast日期 - JSONObject forecast = forecastArray.getJSONObject(i); - Cell cell = row15.getCell(cellIndex); - if (cell == null) { - cell = row15.createCell(cellIndex); - } - cell.setCellValue(forecast.getString("schd_line_date")); - cell.setCellStyle(cellStyle6); - Cell cell2 = row13.getCell(cellIndex); - if (cell2 == null) { - cell2 = row13.createCell(cellIndex); + //设置forecast标题 + Cell forecastCell = row14.getCell(cellIndex); + if (forecastCell == null) { + forecastCell = row14.createCell(cellIndex); } if(i == 0) { - cell2.setCellValue("forecast 预测"); + forecastCell.setCellValue("forecast 预测"); } else { - cell2.setCellValue(""); + forecastCell.setCellValue(""); } - cell2.setCellStyle(cellStyle3); - Cell cell3 = row14.getCell(cellIndex); - if (cell3 == null) { - cell3 = row14.createCell(cellIndex); + forecastCell.setCellStyle(cellStyle3); + //设置forecast日期 + JSONObject forecast = forecastArray.getJSONObject(i); + Cell forecastDateCell = row15.getCell(cellIndex); + if (forecastDateCell == null) { + forecastDateCell = row15.createCell(cellIndex); } - cell3.setCellValue(""); - cell3.setCellStyle(cellStyle6); + forecastDateCell.setCellValue(forecast.getString("schd_line_date")); + forecastDateCell.setCellStyle(cellStyle5); //设置forecast每个订单数据 for(int count = 0; count < orderArray.size(); count++) { String cellValue = ""; @@ -502,11 +504,11 @@ public class ExcelController { } else { nextCell.setCellValue(""); } - nextCell.setCellStyle(cellStyle6); + nextCell.setCellStyle(cellStyle7); } } // 合并单元格 - CellRangeAddress cellRangeAddress3 = new CellRangeAddress(13, 13, firmArray.size() + 9, firmArray.size() + forecastArray.size() + 8); + CellRangeAddress cellRangeAddress3 = new CellRangeAddress(14, 14, firmArray.size() + 9, firmArray.size() + forecastArray.size() + 8); sheet.addMergedRegion(cellRangeAddress3); inputStream.close(); FileOutputStream outputStream = new FileOutputStream(filePath + "/" + fileName); @@ -555,39 +557,43 @@ public class ExcelController { FileInputStream inputStream = new FileInputStream(filePath + "/" + fileName); Workbook workbook = new HSSFWorkbook(inputStream); Sheet sheet = workbook.getSheetAt(0); // 获取第一个工作表 - CellStyle cellStyle1 = getCellStyle(sheet, 14, 4);//日期格式 - CellStyle cellStyle2 = getCellStyle(sheet, 15, 4);//firm订单格式 - CellStyle cellStyle3 = getCellStyle(sheet, 16, 4);//数据格式 - Row row13 = sheet.getRow(13); + CellStyle cellStyle1 = getCellStyle(sheet, 15, 4);//日期样式 + CellStyle cellStyle2 = getCellStyle(sheet, 15, 5);//分隔样式 + CellStyle cellStyle3 = getCellStyle(sheet, 16, 4);//标题样式 + CellStyle cellStyle4 = getCellStyle(sheet, 17, 4);//数据样式 Row row14 = sheet.getRow(14); Row row15 = sheet.getRow(15); + Row row16 = sheet.getRow(16); for(int i = 0; i < firmArray.size(); i++) { int cellIndex = 4 + i; JSONObject firm = firmArray.getJSONObject(i); - Cell pickupCell = row13.getCell(cellIndex); + //设置提货时间 + Cell pickupCell = row14.getCell(cellIndex); if (pickupCell == null) { - pickupCell = row13.createCell(cellIndex); + pickupCell = row14.createCell(cellIndex); } - pickupCell.setCellValue(firm.getString("schd_line_date")); + pickupCell.setCellValue(firm.getString("schd_line_date_th")); pickupCell.setCellStyle(cellStyle1); - Cell arriveCell = row14.getCell(cellIndex); + //设置到货时间 + Cell arriveCell = row15.getCell(cellIndex); if (arriveCell == null) { - arriveCell = row14.createCell(cellIndex); + arriveCell = row15.createCell(cellIndex); } arriveCell.setCellValue(firm.getString("schd_line_date")); arriveCell.setCellStyle(cellStyle1); - Cell firmCell = row15.getCell(cellIndex); + //设置firm标题 + Cell firmCell = row16.getCell(cellIndex); if (firmCell == null) { - firmCell = row15.createCell(cellIndex); + firmCell = row16.createCell(cellIndex); } firmCell.setCellValue("Firm订单"); - firmCell.setCellStyle(cellStyle2); + firmCell.setCellStyle(cellStyle3); //设置每个firm订单数据 for(int count = 0; count < orderArray.size(); count++) { String cellValue = ""; JSONObject object = orderArray.getJSONObject(count); JSONObject order = firm.getJSONObject(object.getString("schd_line_line")); - Row nextRow = sheet.getRow(16 + count); + Row nextRow = sheet.getRow(17 + count); Cell nextCell = nextRow.getCell(cellIndex); if (nextCell == null) { nextCell = nextRow.createCell(cellIndex); @@ -603,13 +609,13 @@ public class ExcelController { } else { nextCell.setCellValue(""); } - nextCell.setCellStyle(cellStyle3); + nextCell.setCellStyle(cellStyle4); } } //设置分隔列 for(int count = 0; count < orderArray.size() + 3; count++) { int cellIndex = 4 + firmArray.size(); - Row sepratorRow = sheet.getRow(13 + count); + Row sepratorRow = sheet.getRow(14 + count); Cell sepratorCell = sepratorRow.getCell(cellIndex); if (sepratorCell == null) { sepratorCell = sepratorRow.createCell(cellIndex); @@ -618,28 +624,30 @@ public class ExcelController { sepratorCell.setCellStyle(cellStyle2); } //合并单元格 - CellRangeAddress cellRangeAddress2 = new CellRangeAddress(13, 14, 4 + firmArray.size(), 4 + firmArray.size()); + CellRangeAddress cellRangeAddress2 = new CellRangeAddress(14, 16, 4 + firmArray.size(), 4 + firmArray.size()); sheet.addMergedRegion(cellRangeAddress2); //设置forecast数据 for(int i = 0; i < forecastArray.size(); i++) { int cellIndex = 5 + firmArray.size() + i; - //设置forecast日期 JSONObject forecast = forecastArray.getJSONObject(i); - Cell pickupCell = row13.getCell(cellIndex); + //设置提货日期 + Cell pickupCell = row16.getCell(cellIndex); if (pickupCell == null) { - pickupCell = row13.createCell(cellIndex); + pickupCell = row14.createCell(cellIndex); } - pickupCell.setCellValue(forecast.getString("schd_line_date")); + pickupCell.setCellValue(forecast.getString("schd_line_date_th")); pickupCell.setCellStyle(cellStyle1); - Cell arriveCell = row14.getCell(cellIndex); + //设置交货日期 + Cell arriveCell = row15.getCell(cellIndex); if (arriveCell == null) { - arriveCell = row14.createCell(cellIndex); + arriveCell = row15.createCell(cellIndex); } arriveCell.setCellValue(forecast.getString("schd_line_date")); arriveCell.setCellStyle(cellStyle1); - Cell forecstCell = row15.getCell(cellIndex); + //设置forecast日期 + Cell forecstCell = row16.getCell(cellIndex); if (forecstCell == null) { - forecstCell = row15.createCell(cellIndex); + forecstCell = row16.createCell(cellIndex); } forecstCell.setCellValue("forecast"); forecstCell.setCellStyle(cellStyle3); @@ -648,7 +656,7 @@ public class ExcelController { String cellValue = ""; JSONObject object = orderArray.getJSONObject(count); JSONObject order = forecast.getJSONObject(object.getString("schd_line_line")); - Row nextRow = sheet.getRow(16 + count); + Row nextRow = sheet.getRow(17 + count); if(order != null) { cellValue = order.getString("schd_line_qty"); } @@ -664,7 +672,7 @@ public class ExcelController { } else { nextCell.setCellValue(""); } - nextCell.setCellStyle(cellStyle3); + nextCell.setCellStyle(cellStyle4); } } inputStream.close(); @@ -686,9 +694,9 @@ public class ExcelController { * @throws IOException io异常 */ private String fillGuowai2(String orderNo, JSONObject jsonObjectHeader, JSONArray orderArray, JSONArray firmArray, JSONArray forecastArray) throws IOException { - ClassPathResource templateFile = new ClassPathResource("guowai2.xlsx"); + ClassPathResource templateFile = new ClassPathResource("guowai2.xls"); String filePath = WinConfig.getUploadPath(); - String fileName = orderNo + ".xlsx"; + String fileName = orderNo + ".xls"; File file = new File(filePath); if (!file.exists()) { file.mkdirs(); @@ -697,56 +705,72 @@ public class ExcelController { if (file.exists()) { file.delete(); } - final ExcelWriter excelWriter = EasyExcelFactory.write(filePath + "/" + fileName).excelType(ExcelTypeEnum.XLSX).withTemplate(templateFile.getInputStream()).build(); + final ExcelWriter excelWriter = EasyExcelFactory.write(filePath + "/" + fileName).excelType(ExcelTypeEnum.XLS).withTemplate(templateFile.getInputStream()).build(); try { - final WriteSheet writeSheet = EasyExcelFactory.writerSheet().build(); + final WriteSheet writeSheet1 = EasyExcelFactory.writerSheet("FirmedOrder").build(); + final WriteSheet writeSheet2 = EasyExcelFactory.writerSheet("Forecast").build(); //默认纵向添加数据 FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); //基础数据 - excelWriter.fill(jsonObjectHeader, writeSheet); - //order数据 - excelWriter.fill(new FillWrapper("order", orderArray), fillConfig, writeSheet); + excelWriter.fill(jsonObjectHeader, writeSheet1); + //基础数据 + excelWriter.fill(jsonObjectHeader, writeSheet2); + //firmOrder数据 + excelWriter.fill(new FillWrapper("order", orderArray), fillConfig, writeSheet1); + //forecast + excelWriter.fill(new FillWrapper("order", orderArray), fillConfig, writeSheet2); } finally { if (excelWriter != null) { excelWriter.finish(); } } FileInputStream inputStream = new FileInputStream(filePath + "/" + fileName); - Workbook workbook = new XSSFWorkbook(inputStream); + Workbook workbook = new HSSFWorkbook(inputStream); Sheet sheet = workbook.getSheetAt(0); // 获取第一个工作表 - CellStyle cellStyle1 = getCellStyle(sheet, 14, 4);//日期格式 - CellStyle cellStyle2 = getCellStyle(sheet, 15, 4);//firm订单格式 - CellStyle cellStyle3 = getCellStyle(sheet, 16, 4);//数据格式 - Row row13 = sheet.getRow(13); - Row row14 = sheet.getRow(14); + CellStyle cellStyle1 = getCellStyle(sheet, 17, 5);//日期样式 + CellStyle cellStyle2 = getCellStyle(sheet, 18, 5);//标题样式 + CellStyle cellStyle3 = getCellStyle(sheet, 19, 5);//数据样式 Row row15 = sheet.getRow(15); + Row row16 = sheet.getRow(16); + Row row17 = sheet.getRow(17); + Row row18 = sheet.getRow(18); for(int i = 0; i < firmArray.size(); i++) { - int cellIndex = 4 + i; + int cellIndex = 5 + i; JSONObject firm = firmArray.getJSONObject(i); - Cell pickupCell = row13.getCell(cellIndex); + //设置提货时间 + Cell pickupCell = row15.getCell(cellIndex); if (pickupCell == null) { - pickupCell = row13.createCell(cellIndex); + pickupCell = row15.createCell(cellIndex); } - pickupCell.setCellValue(firm.getString("schd_line_date")); + pickupCell.setCellValue(firm.getString("schd_line_date_th")); pickupCell.setCellStyle(cellStyle1); - Cell arriveCell = row14.getCell(cellIndex); - if (arriveCell == null) { - arriveCell = row14.createCell(cellIndex); - } - arriveCell.setCellValue(firm.getString("schd_line_date")); - arriveCell.setCellStyle(cellStyle1); - Cell firmCell = row15.getCell(cellIndex); + //设置到货时间1 + Cell arriveCell1 = row16.getCell(cellIndex); + if (arriveCell1 == null) { + arriveCell1 = row16.createCell(cellIndex); + } + arriveCell1.setCellValue(firm.getString("schd_line_date_dl")); + arriveCell1.setCellStyle(cellStyle1); + //设置到货时间2 + Cell arriveCell2 = row17.getCell(cellIndex); + if (arriveCell2 == null) { + arriveCell2 = row17.createCell(cellIndex); + } + arriveCell2.setCellValue(firm.getString("schd_line_date")); + arriveCell2.setCellStyle(cellStyle1); + //设置firm标题 + Cell firmCell = row18.getCell(cellIndex); if (firmCell == null) { - firmCell = row15.createCell(cellIndex); + firmCell = row18.createCell(cellIndex); } - firmCell.setCellValue("Firm订单"); + firmCell.setCellValue(orderNo); firmCell.setCellStyle(cellStyle2); //设置每个firm订单数据 for(int count = 0; count < orderArray.size(); count++) { String cellValue = ""; JSONObject object = orderArray.getJSONObject(count); JSONObject order = firm.getJSONObject(object.getString("schd_line_line")); - Row nextRow = sheet.getRow(16 + count); + Row nextRow = sheet.getRow(19 + count); Cell nextCell = nextRow.getCell(cellIndex); if (nextCell == null) { nextCell = nextRow.createCell(cellIndex); @@ -765,49 +789,52 @@ public class ExcelController { nextCell.setCellStyle(cellStyle3); } } - //设置分隔列 - for(int count = 0; count < orderArray.size() + 3; count++) { - int cellIndex = 4 + firmArray.size(); - Row sepratorRow = sheet.getRow(13 + count); - Cell sepratorCell = sepratorRow.getCell(cellIndex); - if (sepratorCell == null) { - sepratorCell = sepratorRow.createCell(cellIndex); - } - sepratorCell.setCellValue(""); - sepratorCell.setCellStyle(cellStyle2); - } - //合并单元格 - CellRangeAddress cellRangeAddress2 = new CellRangeAddress(13, 14, 4 + firmArray.size(), 4 + firmArray.size()); - sheet.addMergedRegion(cellRangeAddress2); + Sheet sheetForecast = workbook.getSheetAt(1); // 获取第二个工作表 + CellStyle cellStyleForecast1 = getCellStyle(sheetForecast, 16, 4);//日期样式 + CellStyle cellStyleForecast2 = getCellStyle(sheetForecast, 17, 4);//标题样式 + CellStyle cellStyleForecast3 = getCellStyle(sheetForecast, 18, 4);//数据样式 + Row rowForecast14 = sheetForecast.getRow(14); + Row rowForecast15 = sheetForecast.getRow(15); + Row rowForecast16 = sheetForecast.getRow(16); + Row rowForecast17 = sheetForecast.getRow(17); //设置forecast数据 for(int i = 0; i < forecastArray.size(); i++) { - int cellIndex = 5 + firmArray.size() + i; - //设置forecast日期 + int cellIndex = 4 + i; JSONObject forecast = forecastArray.getJSONObject(i); - Cell pickupCell = row13.getCell(cellIndex); + //设置提货时间 + Cell pickupCell = rowForecast14.getCell(cellIndex); if (pickupCell == null) { - pickupCell = row13.createCell(cellIndex); - } - pickupCell.setCellValue(forecast.getString("schd_line_date")); - pickupCell.setCellStyle(cellStyle1); - Cell arriveCell = row14.getCell(cellIndex); - if (arriveCell == null) { - arriveCell = row14.createCell(cellIndex); - } - arriveCell.setCellValue(forecast.getString("schd_line_date")); - arriveCell.setCellStyle(cellStyle1); - Cell forecstCell = row15.getCell(cellIndex); - if (forecstCell == null) { - forecstCell = row15.createCell(cellIndex); - } - forecstCell.setCellValue("forecast"); - forecstCell.setCellStyle(cellStyle3); + pickupCell = rowForecast14.createCell(cellIndex); + } + pickupCell.setCellValue(forecast.getString("schd_line_date_th")); + pickupCell.setCellStyle(cellStyleForecast1); + //设置到货时间1 + Cell arriveCell1 = rowForecast15.getCell(cellIndex); + if (arriveCell1 == null) { + arriveCell1 = rowForecast15.createCell(cellIndex); + } + arriveCell1.setCellValue(forecast.getString("schd_line_date_dl")); + arriveCell1.setCellStyle(cellStyleForecast1); + //设置到货时间2 + Cell arriveCell2 = rowForecast16.getCell(cellIndex); + if (arriveCell2 == null) { + arriveCell2 = rowForecast16.createCell(cellIndex); + } + arriveCell2.setCellValue(forecast.getString("schd_line_date")); + arriveCell2.setCellStyle(cellStyleForecast1); + //设置firm标题 + Cell forecastCell = rowForecast17.getCell(cellIndex); + if (forecastCell == null) { + forecastCell = rowForecast17.createCell(cellIndex); + } + forecastCell.setCellValue("forecast"); + forecastCell.setCellStyle(cellStyleForecast2); //设置forecast每个订单数据 for(int count = 0; count < orderArray.size(); count++) { String cellValue = ""; JSONObject object = orderArray.getJSONObject(count); JSONObject order = forecast.getJSONObject(object.getString("schd_line_line")); - Row nextRow = sheet.getRow(16 + count); + Row nextRow = sheetForecast.getRow(18 + count); if(order != null) { cellValue = order.getString("schd_line_qty"); } @@ -823,7 +850,7 @@ public class ExcelController { } else { nextCell.setCellValue(""); } - nextCell.setCellStyle(cellStyle3); + nextCell.setCellStyle(cellStyleForecast3); } } inputStream.close(); diff --git a/win-admin/src/main/java/com/win/web/controller/base/ShellController.java b/win-admin/src/main/java/com/win/web/controller/base/ShellController.java index fa056fb..b2ea2bd 100644 --- a/win-admin/src/main/java/com/win/web/controller/base/ShellController.java +++ b/win-admin/src/main/java/com/win/web/controller/base/ShellController.java @@ -12,7 +12,6 @@ import com.win.system.domain.LinuxAccess; import com.win.system.domain.QadAccess; import com.win.system.service.LinuxAccessService; import com.win.system.service.QadAccessService; -import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -27,7 +26,6 @@ import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.List; -@Slf4j @RestController @RequestMapping("/shell") public class ShellController { @@ -109,7 +107,6 @@ public class ShellController { jsonObject.remove("company_code"); jsonObject.remove("domain"); String inJson = "{\"" + key + "\":"+ jsonObject+"}"; - log.info("inJson: {}", inJson); return linuxAccessService.executeShell(linuxAccess, qadAccess, traceid, inJson, domain); } diff --git a/win-admin/src/main/resources/changchun.xls b/win-admin/src/main/resources/changchun.xls index 12a12cd..f0125cc 100644 Binary files a/win-admin/src/main/resources/changchun.xls and b/win-admin/src/main/resources/changchun.xls differ diff --git a/win-admin/src/main/resources/foshan_qingdao.xls b/win-admin/src/main/resources/foshan_qingdao.xls index e674024..ffa932a 100644 Binary files a/win-admin/src/main/resources/foshan_qingdao.xls and b/win-admin/src/main/resources/foshan_qingdao.xls differ diff --git a/win-admin/src/main/resources/guowai1.xls b/win-admin/src/main/resources/guowai1.xls index 765226c..ba5f0a0 100644 Binary files a/win-admin/src/main/resources/guowai1.xls and b/win-admin/src/main/resources/guowai1.xls differ diff --git a/win-admin/src/main/resources/guowai2.xlsx b/win-admin/src/main/resources/guowai2.xlsx index 48aa2ff..aa15402 100644 Binary files a/win-admin/src/main/resources/guowai2.xlsx and b/win-admin/src/main/resources/guowai2.xlsx differ diff --git a/win-admin/src/main/resources/logback-spring.xml b/win-admin/src/main/resources/logback-spring.xml index fbe4c45..1977ada 100644 --- a/win-admin/src/main/resources/logback-spring.xml +++ b/win-admin/src/main/resources/logback-spring.xml @@ -131,8 +131,6 @@ - - @@ -140,7 +138,6 @@ - @@ -151,7 +148,6 @@ - diff --git a/win-system/src/main/java/com/win/system/service/LinuxAccessService.java b/win-system/src/main/java/com/win/system/service/LinuxAccessService.java index 48ffa6b..0f640fc 100644 --- a/win-system/src/main/java/com/win/system/service/LinuxAccessService.java +++ b/win-system/src/main/java/com/win/system/service/LinuxAccessService.java @@ -12,7 +12,6 @@ import com.win.system.domain.LinuxAccess; import com.win.system.domain.QadAccess; import com.win.system.mapper.LinuxAccessMapper; import com.win.system.mapper.QadAccessMapper; -import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -27,7 +26,6 @@ import java.time.LocalDateTime; * @author win * @date 2024-03-12 */ -@Slf4j @Service public class LinuxAccessService extends ServiceImpl implements IService { @@ -70,27 +68,27 @@ public class LinuxAccessService extends ServiceImpl" + linuxAccess.getWorkPath() + traceid + ".json"); - log.info("write json result : {}", result); + //log.info("write json result : {}", result); //写入dat.json String datJson = "\"" + linuxAccess.getWorkPath() + traceid + ".json\" \"" + linuxAccess.getQadProgramCode() + "\" \"" + linuxAccess.getOutPath() + traceid+".out.log\" \"" + qadAccess.getUserName() + "\" \"" + qadAccess.getPassword() + "\"\r\n\"" + domain + "\""; - log.info("datJson: {}", datJson); + //log.info("datJson: {}", datJson); result = shellUtil.execute(session, "touch " + linuxAccess.getWorkPath() + traceid + ".dat && echo '" + datJson + "'>" + linuxAccess.getWorkPath() + traceid+".dat"); - log.info("write dat json result : {}", result); + //log.info("write dat json result : {}", result); //写入执行文件 String pJson = "output to " + linuxAccess.getOutPath() + traceid + ".run.log.\r\n" + "input from " + linuxAccess.getWorkPath() + traceid + ".dat.\r\n" + "run " + linuxAccess.getScriptPath() + linuxAccess.getScriptProgram() + ".\r\n" + "input close.\r\n" + "output close."; - log.info("pJson: {}", pJson); + //log.info("pJson: {}", pJson); result = shellUtil.execute(session, "touch " + linuxAccess.getWorkPath() + traceid+".p && echo '"+pJson+"'>" + linuxAccess.getWorkPath() + traceid + ".p"); - log.info("write p result : {}", result); + //log.info("write p result : {}", result); //执行QAD脚本 - log.info("command : {}", linuxAccess.getScriptPath() + linuxAccess.getScriptName() + " " + linuxAccess.getWorkPath() + traceid + ".p"); + //log.info("command : {}", linuxAccess.getScriptPath() + linuxAccess.getScriptName() + " " + linuxAccess.getWorkPath() + traceid + ".p"); result = shellUtil.execute(session, linuxAccess.getScriptPath() + linuxAccess.getScriptName() + " " + linuxAccess.getWorkPath() + traceid + ".p"); - log.info("execute {} result : {}", linuxAccess.getScriptPath() + linuxAccess.getScriptName(), result); + //log.info("execute {} result : {}", linuxAccess.getScriptPath() + linuxAccess.getScriptName(), result); result = shellUtil.execute(session, "cat " + linuxAccess.getOutPath() + traceid + ".run.out.json"); - log.info("cat execute log : {}", result); + //log.info("cat execute log : {}", result); if(result.indexOf("\"SUCCESS\"") > 0) { //移动执行结果文件 shellUtil.execute(session, "mv " + linuxAccess.getOutPath() + traceid + ".run.out.json " + linuxAccess.getSuccessPath() + traceid + ".run.out.json"); @@ -126,17 +124,17 @@ public class LinuxAccessService extends ServiceImpl 0) { //移动执行结果文件 CommandUtil.exeCommand("mv " + linuxAccess.getOutPath() + traceid + ".run.out.json " + linuxAccess.getSuccessPath() + traceid + ".run.out.json"); diff --git a/win-system/src/main/java/com/win/system/service/QadAccessService.java b/win-system/src/main/java/com/win/system/service/QadAccessService.java index 63558c5..a60be66 100644 --- a/win-system/src/main/java/com/win/system/service/QadAccessService.java +++ b/win-system/src/main/java/com/win/system/service/QadAccessService.java @@ -16,7 +16,6 @@ import java.time.LocalDateTime; * @author win * @date 2024-03-13 */ -@Slf4j @Service public class QadAccessService extends ServiceImpl implements IService {