| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | |
| | | List<TOptometryDetailVO> temp = new ArrayList<>(); |
| | | TOptometryDetailVO t1 = new TOptometryDetailVO(); |
| | | t1.setType(3); |
| | | // t1.setBallMirror(-1.00D); |
| | | // t1.setColumnMirror(-0.10D); |
| | | // t1.setAxis("30"); |
| | | // t1.setPupilDistance("33"); |
| | | t1.setBallMirror(-1.00D); |
| | | t1.setColumnMirror(-0.10D); |
| | | t1.setAxis("30"); |
| | | t1.setPupilDistance("33"); |
| | | t1.setStatus(1); |
| | | temp.add(t1); |
| | | TOptometryDetailVO t2 = new TOptometryDetailVO(); |
| | | t2.setType(3); |
| | | // t2.setBallMirror(-1.00D); |
| | | // t2.setColumnMirror(-0.10D); |
| | | // t2.setAxis("30"); |
| | | // t2.setPupilDistance("33"); |
| | | t2.setBallMirror(-1.00D); |
| | | t2.setColumnMirror(-0.10D); |
| | | t2.setAxis("30"); |
| | | t2.setPupilDistance("33"); |
| | | t2.setStatus(2); |
| | | temp.add(t2); |
| | | TOptometryDetailVO t3 = new TOptometryDetailVO(); |
| | | t3.setType(2); |
| | | // t3.setBallMirror(-1.00D); |
| | | // t3.setColumnMirror(-0.10D); |
| | | // t3.setAxis("30"); |
| | | // t3.setPupilDistance("33"); |
| | | // t3.setCorrect("1.0"); |
| | | t3.setBallMirror(-1.00D); |
| | | t3.setColumnMirror(-0.10D); |
| | | t3.setAxis("30"); |
| | | t3.setPupilDistance("33"); |
| | | t3.setCorrect("1.0"); |
| | | t3.setStatus(1); |
| | | temp.add(t3); |
| | | TOptometryDetailVO t4 = new TOptometryDetailVO(); |
| | | t4.setType(2); |
| | | // t4.setBallMirror(-1.00D); |
| | | // t4.setColumnMirror(-0.10D); |
| | | // t4.setAxis("30"); |
| | | // t4.setPupilDistance("33"); |
| | | // t4.setCorrect("1.0"); |
| | | t4.setBallMirror(-1.00D); |
| | | t4.setColumnMirror(-0.10D); |
| | | t4.setAxis("30"); |
| | | t4.setPupilDistance("33"); |
| | | t4.setCorrect("1.0"); |
| | | t4.setStatus(2); |
| | | temp.add(t4); |
| | | TOptometryDetailVO t5 = new TOptometryDetailVO(); |
| | | t5.setType(1); |
| | | // t5.setBallMirror(-1.00D); |
| | | // t5.setColumnMirror(-0.10D); |
| | | // t5.setAxis("30"); |
| | | // t5.setAddS("50"); |
| | | // t5.setPupilHeight("50"); |
| | | // t5.setPupilDistance("33"); |
| | | // t5.setCorrect("1.0"); |
| | | t5.setBallMirror(-1.00D); |
| | | t5.setColumnMirror(-0.10D); |
| | | t5.setAxis("30"); |
| | | t5.setAddS("50"); |
| | | t5.setPupilHeight("50"); |
| | | t5.setPupilDistance("33"); |
| | | t5.setCorrect("1.0"); |
| | | t5.setStatus(1); |
| | | temp.add(t5); |
| | | TOptometryDetailVO t6 = new TOptometryDetailVO(); |
| | | t6.setType(1); |
| | | // t6.setBallMirror(-1.00D); |
| | | // t6.setColumnMirror(-0.10D); |
| | | // t6.setAxis("30"); |
| | | // t6.setAddS("50"); |
| | | // t6.setPupilHeight("50"); |
| | | // t6.setPupilDistance("33"); |
| | | // t6.setCorrect("1.0"); |
| | | t6.setBallMirror(-1.00D); |
| | | t6.setColumnMirror(-0.10D); |
| | | t6.setAxis("30"); |
| | | t6.setAddS("50"); |
| | | t6.setPupilHeight("50"); |
| | | t6.setPupilDistance("33"); |
| | | t6.setCorrect("1.0"); |
| | | t6.setStatus(2); |
| | | temp.add(t6); |
| | | |
| | |
| | | tAddOptometryVO.setTime("2025-11-11 11:11:11"); |
| | | tAddOptometryVO.setPhone("19983174515"); |
| | | tAddOptometryVO.setSn("922440578"); |
| | | String method = print(tAddOptometryVO); |
| | | List<TOrderGoodsPrintVO> tOrderGoodsPrintVOS = new ArrayList<>(); |
| | | TOrderGoodsPrintVO tOrderGoodsPrintVO1 = new TOrderGoodsPrintVO(); |
| | | tOrderGoodsPrintVO1.setColor("颜色"); |
| | | tOrderGoodsPrintVO1.setRLens("右边"); |
| | | tOrderGoodsPrintVO1.setType(0); |
| | | tOrderGoodsPrintVO1.setRefractiveIndex("1.66"); |
| | | tOrderGoodsPrintVO1.setBrandName("平拍"); |
| | | tOrderGoodsPrintVO1.setSeriesName("系列"); |
| | | tOrderGoodsPrintVO1.setModelId(0); |
| | | tOrderGoodsPrintVO1.setStatus(0); |
| | | tOrderGoodsPrintVO1.setGoodsMoney(new BigDecimal("1")); |
| | | tOrderGoodsPrintVO1.setCost(new BigDecimal("2")); |
| | | tOrderGoodsPrintVO1.setConstConfirm(new BigDecimal("3")); |
| | | tOrderGoodsPrintVO1.setRightLens("又"); |
| | | TOrderGoodsPrintVO tOrderGoodsPrintVO2 = new TOrderGoodsPrintVO(); |
| | | tOrderGoodsPrintVO2.setColor("颜色"); |
| | | tOrderGoodsPrintVO2.setLLens("左边"); |
| | | tOrderGoodsPrintVO2.setType(0); |
| | | tOrderGoodsPrintVO2.setRefractiveIndex("1.66"); |
| | | tOrderGoodsPrintVO2.setBrandName("平拍"); |
| | | tOrderGoodsPrintVO2.setSeriesName("系列"); |
| | | tOrderGoodsPrintVO2.setModelId(0); |
| | | tOrderGoodsPrintVO2.setStatus(0); |
| | | tOrderGoodsPrintVO2.setGoodsMoney(new BigDecimal("1")); |
| | | tOrderGoodsPrintVO2.setCost(new BigDecimal("2")); |
| | | tOrderGoodsPrintVO2.setConstConfirm(new BigDecimal("3")); |
| | | tOrderGoodsPrintVO2.setLeftLens("左边"); |
| | | TOrderGoodsPrintVO tOrderGoodsPrintVO3 = new TOrderGoodsPrintVO(); |
| | | tOrderGoodsPrintVO3.setColor("颜色"); |
| | | tOrderGoodsPrintVO3.setType(0); |
| | | tOrderGoodsPrintVO3.setBrandName("平拍"); |
| | | tOrderGoodsPrintVO3.setModelName("型号"); |
| | | tOrderGoodsPrintVO3.setModelId(0); |
| | | tOrderGoodsPrintVO3.setStatus(0); |
| | | tOrderGoodsPrintVO3.setGoodsMoney(new BigDecimal("1")); |
| | | tOrderGoodsPrintVO3.setCost(new BigDecimal("2")); |
| | | tOrderGoodsPrintVO3.setConstConfirm(new BigDecimal("3")); |
| | | tOrderGoodsPrintVO3.setMaterial("材质"); |
| | | tOrderGoodsPrintVOS.add(tOrderGoodsPrintVO1); |
| | | tOrderGoodsPrintVOS.add(tOrderGoodsPrintVO2); |
| | | tOrderGoodsPrintVOS.add(tOrderGoodsPrintVO3); |
| | | tAddOptometryVO.setOrderGoods(tOrderGoodsPrintVOS); |
| | | |
| | | // String method = print(tAddOptometryVO); |
| | | String method = printMatch(tAddOptometryVO); |
| | | System.out.println(method); |
| | | |
| | | |
| | |
| | | for (TOrderGoodsPrintVO orderGood : orderGoods) { |
| | | if (orderGood.getModelId()!=null){ |
| | | tOrderGoodsPrintVOS.add(orderGood); |
| | | break; |
| | | } |
| | | } |
| | | for (TOrderGoodsPrintVO orderGood : orderGoods) { |
| | | if (orderGood.getRLens()!=null){ |
| | | tOrderGoodsPrintVOS.add(orderGood); |
| | | break; |
| | | } |
| | | } |
| | | for (TOrderGoodsPrintVO orderGood : orderGoods) { |
| | | if (orderGood.getLLens()!=null){ |
| | | tOrderGoodsPrintVOS.add(orderGood); |
| | | break; |
| | | } |
| | | } |
| | | for (TOrderGoodsPrintVO tOrderGoodsPrintVO : tOrderGoodsPrintVOS) { |
| | | if (tOrderGoodsPrintVO.getModelId()!=null){ |
| | | content.append("镜架:").append(tOrderGoodsPrintVO.getBrandName()+"-").append(tOrderGoodsPrintVO.getMaterial()+"-").append(tOrderGoodsPrintVO.getModelName()).append("<BR>"); |
| | | content.append("镜架:").append(tOrderGoodsPrintVO.getBrandName()==null?" "+"-":tOrderGoodsPrintVO.getBrandName()+"-").append(tOrderGoodsPrintVO.getMaterial()==null?" "+"-":tOrderGoodsPrintVO.getMaterial()+"-").append(tOrderGoodsPrintVO.getModelName()==null?" "+"-":tOrderGoodsPrintVO.getModelName()).append("<BR>"); |
| | | continue; |
| | | } |
| | | if (tOrderGoodsPrintVO.getRLens()!=null){ |
| | | content.append("右眼镜片:").append(tOrderGoodsPrintVO.getBrandName()+"-").append(tOrderGoodsPrintVO.getSeriesName()+"-").append(tOrderGoodsPrintVO.getRefractiveIndex()).append("<BR>"); |
| | | content.append("右眼镜片:").append(tOrderGoodsPrintVO.getBrandName()==null?" "+"-":tOrderGoodsPrintVO.getBrandName()+"-").append(tOrderGoodsPrintVO.getSeriesName()==null?" "+"-":tOrderGoodsPrintVO.getSeriesName()+"-").append(tOrderGoodsPrintVO.getRefractiveIndex()==null?" "+"-":tOrderGoodsPrintVO.getRefractiveIndex()).append("<BR>"); |
| | | continue; |
| | | |
| | | } |
| | | if (tOrderGoodsPrintVO.getModelId()!=null){ |
| | | content.append("左眼镜片:").append(tOrderGoodsPrintVO.getBrandName()+"-").append(tOrderGoodsPrintVO.getSeriesName()+"-").append(tOrderGoodsPrintVO.getRefractiveIndex()).append("<BR>"); |
| | | content.append("左眼镜片:").append(tOrderGoodsPrintVO.getBrandName()==null?" "+"-":tOrderGoodsPrintVO.getBrandName()+"-").append(tOrderGoodsPrintVO.getSeriesName()==null?" "+"-":tOrderGoodsPrintVO.getSeriesName()+"-").append(tOrderGoodsPrintVO.getRefractiveIndex()==null?" "+"-":tOrderGoodsPrintVO.getRefractiveIndex()).append("<BR>"); |
| | | continue; |
| | | } |
| | | } |
| | | content.append("客户电话:").append(dto.getPhone()).append("<BR>"); |
| | | content.append("客户电话:").append(dto.getPhone()==null?"-":dto.getPhone()).append("<BR>"); |
| | | content.append("备注:").append(dto.getRemark()==null?"-":dto.getRemark()).append("<BR>"); |
| | | content.append("</BOLD>"); |
| | | |