2c1dc851654e208353bf8cc519f023a0b3e5d30f.svn-base 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. package xin.glue.ui.B;
  2. import java.util.List;
  3. import java.util.Map;
  4. import xin.glue.ui.common.blob.PosExcelEngine;
  5. import jxl.Cell;
  6. import jxl.CellType;
  7. import jxl.Sheet;
  8. import jxl.Workbook;
  9. import jxl.write.Label;
  10. import jxl.write.WritableSheet;
  11. import jxl.write.WritableWorkbook;
  12. import jxl.write.WriteException;
  13. import jxl.write.biff.RowsExceededException;
  14. public class PosCertificateSp1 extends PosExcelEngine {
  15. private int TotalCols = 44;//原始38更改为44
  16. private int TheCols = 43;//原始37改为43
  17. private String pageCoilNo = null;
  18. protected void setData(Workbook rwb, WritableWorkbook wb) throws RowsExceededException, WriteException {
  19. Sheet rs = rwb.getSheet(0);
  20. setData(wb, rs);
  21. }
  22. private void setData(WritableWorkbook wb, Sheet rs) throws WriteException, RowsExceededException {
  23. this.addRows = 0;
  24. if (pageCount > 0)
  25. wb.importSheet("sheet" + (pageCount + 1), pageCount, rs);
  26. WritableSheet sheet = wb.getSheet(pageCount++);
  27. sheet.removeRow(12);
  28. sheet.removeRow(8);
  29. setHeader(rs, sheet);
  30. setSize(rs, sheet);
  31. setSample(rs, sheet);
  32. if (dataList.size() > 3) {
  33. if (((List)dataList.get(1)).size() > 0 || ((List)dataList.get(3)).size() > 0)
  34. setData(wb, rs);
  35. }
  36. }
  37. private void setHeader(Sheet rs, WritableSheet sheet) throws WriteException, RowsExceededException {
  38. if (dataList == null || dataList.size() < 1) return;
  39. List list = (List)dataList.get(0);
  40. if (list.size() > 0) {
  41. Map row = (Map)list.get(0);
  42. Cell cell;
  43. Label label;
  44. String fieldName;
  45. for (int curCol = 2; curCol < TotalCols; curCol++) {
  46. for (int curRow = 1; curRow < 4; curRow++) {
  47. cell = rs.getCell(curCol, curRow);
  48. if (cell.getType() == CellType.EMPTY) continue;
  49. fieldName = cell.getContents().trim();
  50. if (fieldName.startsWith("[") && fieldName.endsWith("]")) {
  51. fieldName = fieldName.substring(1, fieldName.length() - 1);
  52. if (row.get(fieldName) != null) {
  53. label = (Label)sheet.getWritableCell(curCol, curRow);
  54. label.setString(row.get(fieldName).toString());
  55. }
  56. else//当结果中没有该元素时,将该格子的值置为空
  57. {
  58. label = (Label)sheet.getWritableCell(curCol, curRow);
  59. label.setString("");
  60. }
  61. }
  62. }
  63. }
  64. // 订货单位、收货单位、订单号、产品名称、标准、发行指示编号
  65. // 车号、数量合计、重量合计、证明书编号、签发日期、发货日期
  66. }
  67. }
  68. protected void addBlankRow(WritableSheet sheet, int curRow, Sheet rs, int refRow, int rows) throws WriteException {
  69. if (autoBlank) {
  70. while (rows < pageSize) {
  71. curRow = insertRow(sheet, curRow, rs, refRow);
  72. setValue(sheet, curRow, 0, String.valueOf(++rows)); // NO.
  73. }
  74. }
  75. }
  76. private void setSize(Sheet rs, WritableSheet sheet) throws WriteException, RowsExceededException {
  77. if (dataList == null || dataList.size() < 2) return;
  78. List list = (List)dataList.get(1);
  79. Cell cell;
  80. int count = 0, curRow = 7;
  81. String coilNo = null;
  82. for (int i = 0; i < list.size(); ) {
  83. Map row = (Map)list.get(i);
  84. if (!row.get("COIL_NO").toString().equals(coilNo)) {
  85. if (count > pageSize) break;
  86. coilNo = row.get("COIL_NO").toString();
  87. pageCoilNo = coilNo;
  88. curRow = insertRow(sheet, curRow, rs, 8);
  89. sheet.mergeCells(2, curRow, 5, curRow);//炉号
  90. sheet.mergeCells(6, curRow, 8, curRow); // 牌号
  91. sheet.mergeCells(9, curRow, 10, curRow); // 厚度
  92. sheet.mergeCells(11, curRow, 12, curRow); // 宽度
  93. sheet.mergeCells(13, curRow, 14, curRow); // 长度
  94. sheet.mergeCells(15, curRow, 16, curRow); // 重量
  95. sheet.mergeCells(42, curRow, 43, curRow); // 车号
  96. setValue(sheet, curRow, 0, String.valueOf(++count)); // NO.
  97. }
  98. list.remove(i);
  99. for (int curCol = 1; curCol < TheCols; curCol++) {
  100. cell = rs.getCell(curCol, 8);
  101. if (cell.getType() != CellType.EMPTY)
  102. setValue(sheet, curRow, curCol, row.get(cell.getContents().trim()));
  103. }
  104. // CHARGE_NO、SMP_NO、COIL_THK、COIL_WTK、COIL_LEN、COIL_WGT、TP
  105. setChem(rs, sheet, coilNo, curRow);
  106. }
  107. addBlankRow(sheet, curRow, rs, 8, count);
  108. for (int i = count, j = 1; i < pageSize; i++, j++) {
  109. sheet.mergeCells(2, curRow+j, 5, curRow+j);//炉号
  110. sheet.mergeCells(6, curRow + j, 8, curRow + j); // 牌号
  111. sheet.mergeCells(9, curRow + j, 10, curRow + j); // 厚度
  112. sheet.mergeCells(11, curRow + j, 12, curRow + j); // 宽度
  113. sheet.mergeCells(13, curRow + j, 14, curRow + j); // 长度
  114. sheet.mergeCells(15, curRow + j, 16, curRow + j); // 重量
  115. sheet.mergeCells(42, curRow + j, 43, curRow + j); // 车号
  116. }
  117. }
  118. //成分
  119. private void setChem(Sheet rs, WritableSheet sheet, String coilNo, int curRow) throws WriteException, RowsExceededException {
  120. if (dataList == null || dataList.size() < 3) return;
  121. List list = (List)dataList.get(2);
  122. Cell cell;
  123. Label label;
  124. int curCol;
  125. boolean canExit = false;
  126. for (int i = 0; i < list.size(); ) {
  127. Map row = (Map)list.get(i);
  128. if (row.get("COIL_NO").equals(coilNo)) {
  129. canExit = true;
  130. String chemName = row.get("CHEM_CD").toString();
  131. String DISPLAY_LEN = row.get("DISPLAY_LEN").toString();
  132. for (curCol = 18; curCol < TotalCols; curCol++) {//元素存储从18位开始
  133. cell = sheet.getCell(curCol, 5);//第5列
  134. if (cell.getContents().equals(chemName)) break;
  135. if (cell.getType() == CellType.EMPTY) {
  136. cell = rs.getCell(curCol, 5);
  137. label = new Label(curCol, 5, chemName, cell.getCellFormat());
  138. sheet.addCell(label);
  139. /*
  140. //保留位数
  141. WritableFont superscript = new WritableFont(WritableFont.ARIAL,
  142. WritableFont.DEFAULT_POINT_SIZE, WritableFont.NO_BOLD, false,
  143. UnderlineStyle.NO_UNDERLINE, Colour.BLACK,
  144. ScriptStyle.SUPERSCRIPT);
  145. WritableCellFormat superscriptFormat = new WritableCellFormat(
  146. superscript);
  147. cell = rs.getCell(curCol, 7);
  148. label = new Label(curCol, 7, DISPLAY_LEN, superscriptFormat);
  149. sheet.addCell(label);
  150. label = new Label(curCol, 7, "10", superscriptFormat);
  151. sheet.addCell(label);
  152. */
  153. /*
  154. NumberFormat dp3 = new NumberFormat("#.###");
  155. WritableCellFormat dp3cell = new WritableCellFormat(dp3);
  156. jxl.write.Number n = new jxl.write.Number(curCol, 7, 3.1TotalCols5926535,dp3cell);
  157. sheet.addCell(n);
  158. */
  159. break;
  160. }
  161. }
  162. if (curCol < TotalCols) {
  163. label = (Label)sheet.getWritableCell(curCol, curRow);
  164. label.setString(row.get("CHEM_VAL").toString());
  165. }
  166. list.remove(i);
  167. } else {
  168. if (canExit) break;
  169. i++;
  170. }
  171. }
  172. }
  173. //性能
  174. private void setSample(Sheet rs, WritableSheet sheet) throws WriteException, RowsExceededException {
  175. if (dataList == null || dataList.size() < 4) return;
  176. List list = (List)dataList.get(3);
  177. String coilNo = null, samplePos = null, qltyCD, qltyName;
  178. int curRow = 10 + this.addRows, fixedRow = 9 + this.addRows, curCol = 0;
  179. int count = 0;
  180. Cell cell;
  181. Label label;
  182. boolean canExit = false, rowChange = false;
  183. for (int i = 0; i < list.size(); ) {
  184. Map row = (Map)list.get(i);
  185. if (!row.get("COIL_NO").equals(coilNo)) {
  186. if (row.get("COIL_NO").equals(pageCoilNo))
  187. canExit = true;
  188. if (canExit && count > pageSize) break;
  189. coilNo = row.get("COIL_NO").toString();
  190. curRow = insertRow(sheet, curRow, rs, 12);
  191. setValue(sheet, curRow, 0, String.valueOf(++count)); // NO.
  192. cell = rs.getCell(1, 12); // COIL NO. -> Sample NO.
  193. setValue(sheet, curRow, 1, row.get(cell.getContents().trim()));
  194. rowChange = true;
  195. }
  196. list.remove(i);
  197. if (rowChange || !row.get("SMP_NO").equals(samplePos)) {
  198. rowChange = false;
  199. samplePos = row.get("SMP_NO").toString();
  200. cell = rs.getCell(2, 12); // Sampling Position
  201. setValue(sheet, curRow, 2, row.get(cell.getContents().trim()));
  202. cell = rs.getCell(TheCols, 12); // 交货状态
  203. setValue(sheet, curRow, TheCols, row.get(cell.getContents().trim()));
  204. }
  205. qltyCD = row.get("QLTY_CD").toString();
  206. qltyName = row.get("QLTY_CD_CFNM").toString();
  207. if ((qltyCD.equals("YS") || qltyCD.equals("TE") ||
  208. qltyCD.equals("EL") || qltyCD.equals("RA") || qltyCD.equals("YR"))) {
  209. for (curCol = 3; curCol < 6; curCol++) {
  210. if(curCol == 3&&qltyCD.equals("TE")) //取抗拉强度的方向做为试验方向
  211. {
  212. cell = rs.getCell(curCol, 12);
  213. String fangXiang = row.get(cell.getContents().trim()).toString();
  214. if("H".equals(fangXiang))//横向
  215. {
  216. fangXiang = "T";
  217. }
  218. else if("Z".equals(fangXiang))//纵向
  219. {
  220. fangXiang = "L";
  221. }
  222. setValue(sheet, curRow, curCol, fangXiang);
  223. }
  224. }
  225. for (curCol = 6; curCol < 11; curCol++) {
  226. cell = rs.getCell(curCol, 12);
  227. if (qltyCD.equals(cell.getContents().trim())) {
  228. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  229. break;
  230. }
  231. }
  232. if(qltyCD.equals("YS") )
  233. {
  234. cell = sheet.getCell(6, fixedRow+1);
  235. String ss = cell.getContents().toString();
  236. if("ReL".equals(ss))
  237. {
  238. Label ll = (Label)sheet.getWritableCell(6, fixedRow+1);
  239. ll.setString(qltyName.replaceAll("\\[矩形\\]", "").replaceAll("\\[圆形\\]", "").replaceAll("屈服强度", "") );
  240. }
  241. }
  242. else if(qltyCD.equals("EL"))
  243. {
  244. cell = sheet.getCell(8, fixedRow+1);
  245. String ss = cell.getContents().toString();
  246. if("A".equals(ss))
  247. {
  248. Label ll = (Label)sheet.getWritableCell(8, fixedRow+1);
  249. ll.setString(qltyName.replaceAll("\\[矩形\\]", "").replaceAll("\\[圆形\\]", "").replaceAll("伸长率", "") );
  250. }
  251. }
  252. }
  253. else if(qltyName.equals("非金属夹杂物A"))
  254. {
  255. cell = rs.getCell(37 , 12);
  256. setValue(sheet, curRow, 37, row.get("QLTY_VAL_WK"));
  257. }
  258. else if(qltyName.equals("非金属夹杂物B"))
  259. {
  260. cell = rs.getCell(38 , 12);
  261. setValue(sheet, curRow, 38, row.get("QLTY_VAL_WK"));
  262. }
  263. else if(qltyName.equals("非金属夹杂物C"))
  264. {
  265. cell = rs.getCell(39 , 12);
  266. setValue(sheet, curRow, 39, row.get("QLTY_VAL_WK"));
  267. }
  268. else if(qltyName.equals("非金属夹杂物D"))
  269. {
  270. cell = rs.getCell(40 , 12);
  271. setValue(sheet, curRow, 40, row.get("QLTY_VAL_WK"));
  272. }
  273. else if(qltyName.indexOf("夏比冲击剪切面积") != -1 )
  274. {
  275. cell = rs.getCell(18, 12);
  276. setValue(sheet, curRow, 18, row.get(cell.getContents().trim()));
  277. cell = rs.getCell(21, 12); // AVE
  278. setValue(sheet, curRow, 21, row.get("QLTY_VAL_WK"));
  279. setQlty(rs, sheet, coilNo, qltyCD, curRow);
  280. }
  281. else if(qltyName.equals("晶粒度"))
  282. {
  283. cell = rs.getCell(22 , 12);
  284. setValue(sheet, curRow, 22, row.get("QLTY_VAL_WK"));
  285. }
  286. else if(qltyName.equals("带状组织"))
  287. {
  288. cell = rs.getCell(23 , 12);
  289. setValue(sheet, curRow, 23, row.get("QLTY_VAL_WK"));
  290. }
  291. else if (qltyCD.equals("IM")) {
  292. if("S".equals(row.get("MS_QLTY_DIR")) ||"H".equals(row.get("MS_QLTY_DIR"))||"Z".equals(row.get("MS_QLTY_DIR")))//普通冲击
  293. {
  294. String str;
  295. for (curCol = 11; curCol < 14; curCol++) {
  296. cell = rs.getCell(curCol, 12);
  297. if(row.get(cell.getContents().trim()) != null)
  298. {
  299. str = row.get(cell.getContents().trim()).toString();
  300. }
  301. else
  302. {
  303. str = "";
  304. }
  305. if("H".equals(row.get(cell.getContents().trim())))
  306. {
  307. str = "T";
  308. }
  309. else if("Z".equals(row.get(cell.getContents().trim())))
  310. {
  311. str = "L";
  312. }
  313. setValue(sheet, curRow, curCol, str);
  314. }
  315. cell = rs.getCell(17, 12); // AVE
  316. setValue(sheet, curRow, 17, row.get("QLTY_VAL_WK"));
  317. setQlty(rs, sheet, coilNo, qltyCD, curRow);
  318. }
  319. if("L".equals(row.get("MS_QLTY_DIR"))||"X".equals(row.get("MS_QLTY_DIR")))//时效冲击
  320. {
  321. String str = "";
  322. for (curCol = 30; curCol < 33; curCol++) {
  323. cell = rs.getCell(curCol, 12);
  324. // str = row.get(cell.getContents().trim())== null ? "":row.get(cell.getContents().trim()).toString();
  325. if(row.get(cell.getContents().trim()) != null)
  326. {
  327. str = row.get(cell.getContents().trim()).toString();
  328. }
  329. else
  330. {
  331. str = "";
  332. }
  333. if("X".equals(row.get(cell.getContents().trim())))
  334. {
  335. str = "L";
  336. }
  337. else if("L".equals(row.get(cell.getContents().trim())))
  338. {
  339. str = "T";
  340. }
  341. setValue(sheet, curRow, curCol, str );
  342. }
  343. cell = rs.getCell(36, 12); // AVE
  344. setValue(sheet, curRow, 36, row.get("QLTY_VAL_WK"));
  345. setQlty(rs, sheet, coilNo, qltyCD, curRow);
  346. label = new Label(33, fixedRow, qltyName, cell.getCellFormat());
  347. label.setString(qltyName);
  348. sheet.addCell(label);
  349. }
  350. }else if (qltyCD.equals("?")) {
  351. cell = rs.getCell(18, 12);
  352. setValue(sheet, curRow, 18, row.get(cell.getContents().trim()));
  353. cell = rs.getCell(22, 12); // AVE
  354. setValue(sheet, curRow, 22, row.get("QLTY_VAL_WK"));
  355. setQlty(rs, sheet, coilNo, qltyCD, curRow);
  356. }else if (qltyCD.equals("HD")) {
  357. cell = rs.getCell(26, 12);
  358. setValue(sheet, curRow, 26, row.get(cell.getContents().trim()));
  359. cell = rs.getCell(29, 12); // AVE
  360. setValue(sheet, curRow, 29, row.get("QLTY_VAL_WK"));
  361. setQlty(rs, sheet, coilNo, qltyCD, curRow);
  362. //////////////////////////
  363. label = new Label(26, fixedRow, qltyName, cell.getCellFormat());
  364. label.setString(qltyName);
  365. sheet.addCell(label);
  366. } else if (qltyCD.equals("CB")) {
  367. cell = rs.getCell(24, 12); // CB
  368. setValue(sheet, curRow, 24, row.get("QLTY_VAL_WK"));
  369. setQlty(rs, sheet, coilNo, qltyCD, curRow);
  370. }
  371. // else if(qltyCD.equals("TT"))//----------------------------------------
  372. // else if("晶粒度".equals(qltyName))
  373. // {
  374. // cell = rs.getCell(32, 12);
  375. // setValue(sheet, curRow, 32, row.get("QLTY_VAL_WK"));
  376. // setQlty(rs, sheet, coilNo, qltyCD, curRow);
  377. // }
  378. else {
  379. // qltyName = (String)row.get("QLTY_CD_CFNM");
  380. for (curCol = 41; curCol < TheCols; curCol++) {
  381. cell = sheet.getCell(curCol, fixedRow);
  382. if (cell.getContents().equals(qltyName)) break;
  383. if (cell.getType() == CellType.EMPTY) {
  384. cell = rs.getCell(curCol, 10);
  385. label = new Label(curCol, fixedRow, qltyName, cell.getCellFormat());
  386. sheet.addCell(label);
  387. break;
  388. }
  389. }
  390. if (curCol < TotalCols)
  391. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  392. }
  393. }
  394. addBlankRow(sheet, curRow, rs, 12, count);
  395. list = (List)dataList.get(0);
  396. if (list.size() > 0) {
  397. Map row = (Map)list.get(0);
  398. label = new Label(8, 31, row.get("USERID").toString());
  399. sheet.addCell(label);
  400. // label = new Label(25, 33/*sheet.getRows()-2*/, row.get("LICENSENO").toString());
  401. // sheet.addCell(label);
  402. //System.out.println(row.get("USERID").toString());
  403. //System.out.println(this.addRows);
  404. //setValue(sheet, 5, 32, row.get("USERID").toString());
  405. }
  406. }
  407. private void setQlty(Sheet rs, WritableSheet sheet, String coilNo, String qltyCD, int curRow) {
  408. if (dataList == null || dataList.size() < 5) return;
  409. List list = (List)dataList.get(4);
  410. String qltySeq;
  411. Cell cell;
  412. int curCol = 0;
  413. boolean canExit = false;
  414. /*for (int i = 0; i < list.size(); ) {
  415. Map row = (Map)list.get(i);
  416. if (row.get("COIL_NO").equals(coilNo)) {
  417. canExit = true;
  418. String xxx = (String)row.get("QLTY_CD");
  419. if (row.get("QLTY_CD").equals(qltyCD)) {
  420. qltySeq = (String)row.get("QLTY_SEQ");
  421. if ("IM".equals(qltyCD)) {
  422. if("H".equals(row.get("MS_QLTY_DIR"))||"Z".equals(row.get("MS_QLTY_DIR")))
  423. {
  424. for (curCol = 14; curCol < 17; curCol++) {
  425. cell = rs.getCell(curCol, 12);
  426. if (cell.getContents().trim().equals(qltySeq)) {
  427. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  428. break;
  429. }
  430. }
  431. }
  432. if("L".equals(row.get("MS_QLTY_DIR"))||"X".equals(row.get("MS_QLTY_DIR")))
  433. {
  434. for (curCol = 21; curCol < 24; curCol++) {
  435. cell = rs.getCell(curCol, 12);
  436. if (cell.getContents().trim().equals(qltySeq)) {
  437. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  438. break;
  439. }
  440. }
  441. }
  442. } else if ("?".equals(qltyCD)) {
  443. for (curCol = 19; curCol < 22; curCol++) {
  444. cell = rs.getCell(curCol, 12);
  445. if (cell.getContents().trim().equals(qltySeq)) {
  446. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  447. break;
  448. }
  449. }
  450. }else if ("HD".equals(qltyCD)) {
  451. for (curCol = 26; curCol < 29; curCol++) {
  452. cell = rs.getCell(curCol, 12);
  453. if (cell.getContents().trim().equals(qltySeq)) {
  454. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  455. break;
  456. }
  457. }
  458. }
  459. list.remove(i);
  460. }
  461. } else {
  462. System.out.println("xxxxxxxxx");
  463. if (canExit) break;
  464. i++;
  465. }
  466. }*/
  467. for (int i = 0;i < list.size();i++) {
  468. Map row = (Map)list.get(i);
  469. if (row.get("COIL_NO").equals(coilNo)) {
  470. if (row.get("QLTY_CD").equals(qltyCD)) {
  471. qltySeq = (String)row.get("QLTY_SEQ");
  472. // String qltyName = row.get("QLTY_CD_CFNM").toString();
  473. if("IM".equals(qltyCD) && row.get("MS_QLTY_DIR") == null)
  474. {
  475. // System.out.println("#################"+row.get("QLTY_CD_CFNM"));
  476. for (curCol = 18; curCol < 21; curCol++) {
  477. cell = rs.getCell(curCol, 12);
  478. if (cell.getContents().trim().equals(qltySeq)) {
  479. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  480. row.put("QLTY_CD", "isUsed");
  481. break;
  482. }
  483. }
  484. }
  485. else if ("IM".equals(qltyCD)) {
  486. if("S".equals(row.get("MS_QLTY_DIR")) ||"H".equals(row.get("MS_QLTY_DIR"))||"Z".equals(row.get("MS_QLTY_DIR")))//普通冲击
  487. {
  488. for (curCol = 14; curCol < 17; curCol++) {
  489. cell = rs.getCell(curCol, 12);
  490. if (cell.getContents().trim().equals(qltySeq)) {
  491. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  492. row.put("QLTY_CD", "isUsed");
  493. break;
  494. }
  495. }
  496. }
  497. if("L".equals(row.get("MS_QLTY_DIR"))||"X".equals(row.get("MS_QLTY_DIR")))//时效冲击
  498. {
  499. for (curCol = 33; curCol < 36; curCol++) {
  500. cell = rs.getCell(curCol, 12);
  501. if (cell.getContents().trim().equals(qltySeq)) {
  502. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  503. row.put("QLTY_CD", "isUsed");
  504. break;
  505. }
  506. }
  507. }
  508. } else if ("?".equals(qltyCD)) {
  509. for (curCol = 19; curCol < 22; curCol++) {
  510. cell = rs.getCell(curCol, 12);
  511. if (cell.getContents().trim().equals(qltySeq)) {
  512. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  513. row.put("QLTY_CD", "isUsed");
  514. break;
  515. }
  516. }
  517. }else if ("HD".equals(qltyCD)) {
  518. for (curCol = 26; curCol < 29; curCol++) {
  519. cell = rs.getCell(curCol, 12);
  520. if (cell.getContents().trim().equals(qltySeq)) {
  521. setValue(sheet, curRow, curCol, row.get("QLTY_VAL_WK"));
  522. row.put("QLTY_CD", "isUsed");
  523. break;
  524. }
  525. }
  526. }
  527. }
  528. }
  529. }
  530. }
  531. }