1.調整格口報表

2.解析xml添加日志輸出
3.廢証修改顯示邏輯
parent 812c3bb3
...@@ -535,7 +535,7 @@ public class PersonPostApi { ...@@ -535,7 +535,7 @@ public class PersonPostApi {
sheet.setColumnWidth(17, (int) ((14.64 + 0.72) * 256)); sheet.setColumnWidth(17, (int) ((14.64 + 0.72) * 256));
sheet.setColumnWidth(18, (int) ((8.55 + 0.72) * 256)); sheet.setColumnWidth(18, (int) ((8.55 + 0.72) * 256));
sheet.setColumnWidth(19, (int) ((6.64 + 0.72) * 256)); sheet.setColumnWidth(19, (int) ((6.64 + 0.72) * 256));
sheet.setColumnWidth(20, (int) ((8.55 + 0.72) * 256)); sheet.setColumnWidth(20, (int) ((19.55 + 0.72) * 256));
for (int i = 0; i < records.size(); i++) { for (int i = 0; i < records.size(); i++) {
HSSFRow row = sheet.createRow(i + 1); HSSFRow row = sheet.createRow(i + 1);
PersonPostEntity personPostEntity = records.get(i); PersonPostEntity personPostEntity = records.get(i);
...@@ -569,6 +569,8 @@ public class PersonPostApi { ...@@ -569,6 +569,8 @@ public class PersonPostApi {
cell.setCellValue("6"); cell.setCellValue("6");
cell = row.createCell(17); cell = row.createCell(17);
cell.setCellValue(personPostEntity.getBackWaybillNumber()); cell.setCellValue(personPostEntity.getBackWaybillNumber());
cell = row.createCell(20);
cell.setCellValue(personPostEntity.getLatticeMouthInformation());
} }
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日生产导出"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日生产导出");
String fileName = simpleDateFormat.format(new Date()) + ".xls"; String fileName = simpleDateFormat.format(new Date()) + ".xls";
......
...@@ -82,6 +82,7 @@ public class ReadXmlApi { ...@@ -82,6 +82,7 @@ public class ReadXmlApi {
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) requ; MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) requ;
Iterator<String> iter = multiRequest.getFileNames(); Iterator<String> iter = multiRequest.getFileNames();
while (iter.hasNext()) { while (iter.hasNext()) {
System.out.println("开始获取整体文件信息! "+new Date().getTime());
List<MultipartFile> fileRows = multiRequest.getFiles(iter.next().toString()); List<MultipartFile> fileRows = multiRequest.getFiles(iter.next().toString());
for (MultipartFile item : fileRows) { for (MultipartFile item : fileRows) {
try { try {
...@@ -92,11 +93,16 @@ public class ReadXmlApi { ...@@ -92,11 +93,16 @@ public class ReadXmlApi {
if (StringUtils.isBlank(filename)) { if (StringUtils.isBlank(filename)) {
continue; continue;
} }
logger.error("获取"+filename+"文件信息! "+new Date().getTime());
InputStream in = item.getInputStream(); InputStream in = item.getInputStream();
String str = YXStringUtils.inputStream2String(in, "utf-8"); String str = YXStringUtils.inputStream2String(in, "utf-8");
in.close(); in.close();
IDCardFactory idCardFactory = new IDCardFactory(); IDCardFactory idCardFactory = new IDCardFactory();
Boolean aBoolean = idcardsFactory(idCardFactory.extractIDCard(str, date)); logger.error("开始解析"+filename+"文件! "+new Date().getTime());
Map<String, Object> objectMap = idCardFactory.extractIDCard(str, date);
logger.error("开始存储"+filename+"文件! "+new Date().getTime());
Boolean aBoolean = idcardsFactory(objectMap);
logger.error("存储"+filename+"文件完成! "+new Date().getTime());
if (!aBoolean){ if (!aBoolean){
errList.add("上传文件名:" + filename+",文件上传失败"); errList.add("上传文件名:" + filename+",文件上传失败");
continue; continue;
...@@ -148,6 +154,7 @@ public class ReadXmlApi { ...@@ -148,6 +154,7 @@ public class ReadXmlApi {
map.put("code","500"); map.put("code","500");
map.put("errMsg",errList); map.put("errMsg",errList);
} }
logger.error("所有文件上传完成! "+new Date().getTime());
return map; return map;
} }
......
...@@ -946,9 +946,9 @@ public interface TaskListMapper { ...@@ -946,9 +946,9 @@ public interface TaskListMapper {
* 辅助库 废证 * 辅助库 废证
* @return * @return
*/ */
@Select("select FAILED_CARD.work_group,FAILED_CARD.FAILED_CARD_ID task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" + @Select("select NVL(FAILED_CARD.work_group,TASK.work_group) work_group,FAILED_CARD.FAILED_CARD_ID task_id,task.COUNTY_CODE,task.SUBMIT_DATE,task.SUBMIT_NAME,task.ISSUED_DATE,task.ISSUED_NAME,\n" +
"FAILED_CARD.PRINT_DATE PRINT_OUT_DATE,'' PRINT_OUT_NAME,'废证' CARD_TYPE ,'100' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, \n" + "FAILED_CARD.PRINT_DATE PRINT_OUT_DATE,'' PRINT_OUT_NAME,'废证' CARD_TYPE ,'100' CARD_TYPE_ID,COUNTY_DIC.COUNTYNAME, \n" +
"1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,FAILED_CARD.ACCEPT_NO GROUP_NO ,FAILED_CARD.work_group from FAILED_CARD \n" + "1 VALID_COUNT,0 INVALID_COUNT, 0 SPECIAL_CARD_COUNT,FAILED_CARD.ACCEPT_NO GROUP_NO from FAILED_CARD \n" +
"left join task on FAILED_CARD.task_id= task.TASK_ID \n" + "left join task on FAILED_CARD.task_id= task.TASK_ID \n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE \n" + "left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE \n" +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" + "left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
...@@ -1276,7 +1276,7 @@ public interface TaskListMapper { ...@@ -1276,7 +1276,7 @@ public interface TaskListMapper {
"task.submit_date,FAILED_CARD.failed_card_id task_id,'废证' CARD_TYPE,'100' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" + "task.submit_date,FAILED_CARD.failed_card_id task_id,'废证' CARD_TYPE,'100' CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" + "COUNTY_DIC.COUNTYNAME, 1 VALID_COUNT, 0 INVALID_COUNT,0 SPECIAL_CARD_COUNT,\n" +
"FAILED_CARD.ACCEPT_NO group_No, 0 faileCount\n" + "FAILED_CARD.ACCEPT_NO group_No, 0 faileCount\n" +
",FAILED_CARD.work_group,prod_card_t.id_no,prod_card_t.name,decode(ALLOT_DATE,null,decode(FINISH_DATE,null,decode(FAILED_CARD.POSITION_DATE,null,decode(PRINT_DATE,null,FAILED_CARD.SUBMIT_DATE,PRINT_DATE),FAILED_CARD.POSITION_DATE),FINISH_DATE),ALLOT_DATE) last_date " + ",NVL(FAILED_CARD.work_group,TASK.work_group) work_group,prod_card_t.id_no,prod_card_t.name,decode(ALLOT_DATE,null,decode(FINISH_DATE,null,decode(FAILED_CARD.POSITION_DATE,null,decode(PRINT_DATE,null,FAILED_CARD.SUBMIT_DATE,PRINT_DATE),FAILED_CARD.POSITION_DATE),FINISH_DATE),ALLOT_DATE) last_date " +
" from FAILED_CARD left join task on FAILED_CARD.task_id= task.TASK_ID\n" + " from FAILED_CARD left join task on FAILED_CARD.task_id= task.TASK_ID\n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n" + "left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n" +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" + "left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
...@@ -1286,7 +1286,7 @@ public interface TaskListMapper { ...@@ -1286,7 +1286,7 @@ public interface TaskListMapper {
"where FAILED_CARD.STATE =#{process} and FAILED_CARD.STATE!=FAILED_CARD.INITIATOR \n" + "where FAILED_CARD.STATE =#{process} and FAILED_CARD.STATE!=FAILED_CARD.INITIATOR \n" +
"group by 0, substr(prod_card_t.upload_no,0,9), DIC_UPLOAD_UNIT_T.UNIT_NAME, task.submit_date, FAILED_CARD.failed_card_id, \n" + "group by 0, substr(prod_card_t.upload_no,0,9), DIC_UPLOAD_UNIT_T.UNIT_NAME, task.submit_date, FAILED_CARD.failed_card_id, \n" +
"'废证', '100', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, FAILED_CARD.ACCEPT_NO, 0\n" + "'废证', '100', COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, 1, 0, 0, FAILED_CARD.ACCEPT_NO, 0\n" +
",FAILED_CARD.work_group,prod_card_t.id_no,prod_card_t.name,decode(ALLOT_DATE,null,decode(FINISH_DATE,null,decode(FAILED_CARD.POSITION_DATE,null,decode(PRINT_DATE,null,FAILED_CARD.SUBMIT_DATE,PRINT_DATE),FAILED_CARD.POSITION_DATE),FINISH_DATE),ALLOT_DATE) order by FAILED_CARD.FAILED_CARD_ID") ",NVL(FAILED_CARD.work_group,TASK.work_group) ,prod_card_t.id_no,prod_card_t.name,decode(ALLOT_DATE,null,decode(FINISH_DATE,null,decode(FAILED_CARD.POSITION_DATE,null,decode(PRINT_DATE,null,FAILED_CARD.SUBMIT_DATE,PRINT_DATE),FAILED_CARD.POSITION_DATE),FINISH_DATE),ALLOT_DATE) order by FAILED_CARD.FAILED_CARD_ID")
public List<Map<String,Object>> selectByCountyAtAuxiliary_failed3(@Param("process") long process); public List<Map<String,Object>> selectByCountyAtAuxiliary_failed3(@Param("process") long process);
......
...@@ -7,6 +7,7 @@ import com.yxproject.start.entity.PreproPersonEntity; ...@@ -7,6 +7,7 @@ import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.FilesMapper; import com.yxproject.start.mapper.FilesMapper;
import com.yxproject.start.mapper.PreproPersonMapper; import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.ImportXmlService; import com.yxproject.start.service.ImportXmlService;
import org.apache.log4j.Logger;
import org.dom4j.Document; import org.dom4j.Document;
import org.dom4j.DocumentHelper; import org.dom4j.DocumentHelper;
import org.dom4j.Element; import org.dom4j.Element;
...@@ -30,6 +31,9 @@ import java.util.List; ...@@ -30,6 +31,9 @@ import java.util.List;
*/ */
@Service @Service
public class ImportXmlServiceImpl implements ImportXmlService { public class ImportXmlServiceImpl implements ImportXmlService {
Logger logger= Logger.getLogger(ImportXmlServiceImpl.class);
@Autowired @Autowired
private PreproPersonMapper preproPersonMapper; private PreproPersonMapper preproPersonMapper;
@Autowired @Autowired
...@@ -88,7 +92,10 @@ public class ImportXmlServiceImpl implements ImportXmlService { ...@@ -88,7 +92,10 @@ public class ImportXmlServiceImpl implements ImportXmlService {
} }
try { try {
preproPersonDto.setTpPath(url); preproPersonDto.setTpPath(url);
preproPersonMapper.savePreproPersonEntity(preproPersonDto); boolean b = preproPersonMapper.savePreproPersonEntity(preproPersonDto);
if (!b){
logger.error(preproPersonDto.getFileId()+"存儲失敗!");
}
// preproPersonMapper.savePreproPersonCLOB(preproPersonDto); // preproPersonMapper.savePreproPersonCLOB(preproPersonDto);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
......
...@@ -423,7 +423,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -423,7 +423,7 @@ public class TaskListServiceImpl implements TaskListService {
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast4(process, process - 1); List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast4(process, process - 1);
//查询余证组号列表 在辅助库、制证库中 //查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind4(process, process - 1); List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind4(process, process - 1);
//查询证组号列表 在辅助库、制证库中 //查询证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed3(process - 1); List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed3(process - 1);
list = formateMap5(mapList_common); list = formateMap5(mapList_common);
list.addAll(formateMap5(mapList_fast)); list.addAll(formateMap5(mapList_fast));
...@@ -506,7 +506,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -506,7 +506,7 @@ public class TaskListServiceImpl implements TaskListService {
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast2(process, process - 1, Long.valueOf(workGroup)); List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast2(process, process - 1, Long.valueOf(workGroup));
//查询余证组号列表 在辅助库、制证库中 //查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind2(process, process - 1, Long.valueOf(workGroup)); List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind2(process, process - 1, Long.valueOf(workGroup));
//查询证组号列表 在辅助库、制证库中 //查询证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed2(process - 1, Long.valueOf(workGroup)); List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed2(process - 1, Long.valueOf(workGroup));
list = formateMap2(mapList_common); list = formateMap2(mapList_common);
...@@ -556,7 +556,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -556,7 +556,7 @@ public class TaskListServiceImpl implements TaskListService {
List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast5(process, process - 1); List<Map<String, Object>> mapList_fast = taskListMapper.selectByCountyAtAuxiliary_fast5(process, process - 1);
//查询余证组号列表 在辅助库、制证库中 //查询余证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind5(process, process - 1); List<Map<String, Object>> mapList_remaind = taskListMapper.selectByCountyAtAuxiliary_remaind5(process, process - 1);
//查询证组号列表 在辅助库、制证库中 //查询证组号列表 在辅助库、制证库中
List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed5(process - 1); List<Map<String, Object>> mapList_failed = taskListMapper.selectByCountyAtAuxiliary_failed5(process - 1);
list = formateMap2(mapList_common); list = formateMap2(mapList_common);
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WEB打印控件LODOP的样例十五:打印有页头页尾的表格</title>
<script language="javascript" src="components/js/LodopFuncs.js"></script>
</head>
<body>
<div id="div1">
<table cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:0px dashed #000;width:74mm;font-family:'黑体';">
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border-top:1px dashed #000;border-left:1px dashed #000;border-right:1px dashed #000;border-collapse:collapse;height:11mm">
<tr>
<td style="border:0px dashed #000;width:37mm">
</td>
<td style="width:35mm">
<span style="font-size:7mm; position: absolute;top:1mm;left: 45mm;font-family:'黑体';">标准快递</span>
<span style="font-size:2mm; position: absolute;top:9mm;left: 39mm;">时间:2022-07-28 13:56:17</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border-top:1px dashed #000;border-left:1px dashed #000;border-right:1px dashed #000;border-collapse:collapse;height:17mm">
<tr>
<td style="border:0px dashed #000;width:72mm">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="height:16mm;border-left:1px dashed #000;border-right:2px solid #000;">
<tr>
<td style="border-top:1px dashed #000;border-bottom:1px dashed #000;width:37mm;font-size: 3mm;">
<p style="position:absolute;top:26mm;left:1.5mm;">寄件:吕兰兰</p>
<p style="position:absolute;top:29mm;left:10mm;">15825898734</p>
<span style="position:absolute;top:35mm;left:10mm;width:27.5mm;">北京市大兴区西红门镇团河路如家快捷酒店旁二楼</span>
</td>
<td style="border:2px solid #000;border-right:0px;width:35mm;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border:1px dashed #000;border-top:none;border-collapse:collapse;height:17mm">
<tr>
<td style="border-right:1px dashed #000;border-left:1px dashed #000;border-bottom:1px dashed #000;width:72mm">
<p style="font-size: 3mm; position:absolute;top:42mm;left:1.5mm;">收件:<span style="font-size: 4mm;">北京人口管理总队&nbsp;&nbsp;01087682315</span></p>
<span style="position:absolute;top:49mm;left:10mm;width:63.5mm;font-size: 4mm;">北京市丰台区成寿寺路甲19号</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border:1px dashed #000;border-top:none;border-collapse:collapse;height:15mm;font-size: 3mm;">
<tr>
<td style="border-right:1px dashed #000;border-left:1px dashed #000;border-bottom:1px dashed #000;width:29mm;">
<p style="position:absolute;top:60mm;left:1.5mm;">付款方式:</p>
<p style="position:absolute;top:64mm;left:1.5mm;">计费重量(KG):0.1</p>
<p style="position:absolute;top:68mm;left:1.5mm;">报价金额(元):</p>
</td>
<td style="border-right:1px dashed #000;border-bottom:1px dashed #000;width:43mm">
<p style="position:absolute;top:60mm;left:31mm;">收件人\代收人:</p>
<p style="position:absolute;top:64mm;left:31mm;">签收时间:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<span style="position:absolute;top:71mm;left:31mm;font-size: 2mm;width:40mm;">快件送达收货人地址,经收件人或收件人允许的代收人签字,视为送达。</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border:1px dashed #000;border-top:none;border-collapse:collapse;height:11mm">
<tr>
<td style="border:1px dashed #000;border-top:0;width:72mm">
<span style="position:absolute;top:76mm;left:1.5mm;font-size:7mm;">1&nbsp;收货单(返单)</span>
</td>
</tr>
</table>
<td>
</tr>
<tr>
<td style="height:4mm"></td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border:1px dashed #000;border-collapse:collapse;height:15mm">
<tr>
<td style="border-right:1px dashed #000;width:72mm"></td>
</tr>
</table>
<td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border:1px dashed #000;border-top:none;border-collapse:collapse;height:11mm;font-size: 3mm;">
<tr>
<td style="border-right:1px dashed #000;width:72mm">
<p style="position:absolute;top:104mm;left:2mm;width:72mm">寄件:</p>
<p style="position:absolute;top:104mm;left:11mm;width:60mm;">吕兰兰&nbsp;15825898734</p>
<p style="position:absolute;top:107mm;left:11mm;width:60mm;">北京市大兴区西红门镇团河路如家快捷酒店旁二楼</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border:1px dashed #000;border-top:none;border-collapse:collapse;height:11mm;font-size: 3mm;">
<tr>
<td style="border:0px dashed #000;width:72mm">
<p style="position:absolute;top:115mm;left:2mm;">收件:</p>
<p style="position:absolute;top:115mm;left:11mm;width:60mm;">北京人口管理总队&nbsp;01087682315</p>
<p style="position:absolute;top:118mm;left:11mm;width:60mm;">北京市丰台区成寿寺路甲19号</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border:1px dashed #000;border-top:none;border-collapse:collapse;height:11mm">
<tr>
<td style="border-right:1px dashed #000;width:57mm">
<span style="position:absolute;top:128mm;left:1.5mm;font-size:7mm;">1&nbsp;收货单(返单)</span>
</td>
<td style="border:0px dashed #000;width:15mm"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" style="border:1px dashed #000;border-top:none;border-collapse:collapse;height:6mm">
<tr>
<td style="border-right:1px dashed #000;width:57mm">
<span style="font-size: 3mm; margin-left: 1mm;">网址:www.ems.com.cn</span>
<span style="font-size: 3mm; margin-left: 1mm;">客服电话:11183</span>
</td>
<td style="border:0px dashed #000;width:15mm"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<hr/>
<a href="javascript:PreviewMytable()">预览</a>, <a href="javascript:PreviewMytableRotate()">预览(翻转)</a>
<script language="javascript" type="text/javascript">
var LODOP; //声明为全局变量
var iRadioValue=1;
function PreviewMytable(){
LODOP=getLodop();
LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_预览打印表格");
LODOP.SET_PRINT_PAGESIZE(1,"76mm","149mm","");
LODOP.ADD_PRINT_TABLE('1.5mm', '1.5mm', '74mm', '148mm',document.getElementById("div1").innerHTML);
LODOP.ADD_PRINT_BARCODE('13mm', '3mm','70mm','16mm', "128A",'1258343936501');
LODOP.SET_PRINT_STYLEA(1, "FontSize", 10);
LODOP.ADD_PRINT_BARCODE('93mm','5mm', '50mm','14mm', "128A",'1258343936501');
LODOP.SET_PRINT_STYLEA(2, "FontSize", 10);
LODOP.SET_PRINT_STYLEA(0,"TableHeightScope",iRadioValue);
LODOP.SET_PRINT_STYLEA(0,"AngleOfPageInside",0);
LODOP.PREVIEW();
};
function PreviewMytableRotate(){
LODOP=getLodop();
LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_预览打印表格");
LODOP.SET_PRINT_PAGESIZE(1,"76mm","149mm","");
LODOP.ADD_PRINT_TABLE('1.5mm', '1.5mm', '74mm', '148mm',document.getElementById("div1").innerHTML);
LODOP.ADD_PRINT_BARCODE('3mm', '33mm','42mm','18mm', "128A",'12345');
LODOP.SET_PRINT_STYLEA(1, "FontSize", 10);
LODOP.ADD_PRINT_BARCODE('93mm','5mm', '50mm','14mm', "128A",'12345');
LODOP.SET_PRINT_STYLEA(2, "FontSize", 10);
LODOP.SET_PRINT_STYLEA(0,"TableHeightScope",iRadioValue);
LODOP.SET_PRINT_STYLEA(0,"AngleOfPageInside",180);
LODOP.PREVIEW();
};
</script>
</body>
</html>
This diff is collapsed.
...@@ -16,7 +16,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -16,7 +16,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
idCard: '', idCard: '',
startDate: '', startDate: '',
endDate: '' endDate: ''
} };
var getNowFormatDate = function () { var getNowFormatDate = function () {
var date = new Date(); var date = new Date();
...@@ -46,7 +46,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -46,7 +46,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
+ " " + hours + seperator2 + minutes + " " + hours + seperator2 + minutes
+ seperator2 + seconds; + seperator2 + seconds;
return currentdate; return currentdate;
} };
$scope.currentTime = getNowFormatDate(); $scope.currentTime = getNowFormatDate();
...@@ -66,13 +66,12 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -66,13 +66,12 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
//测试打印快递单 //测试打印快递单
// $scope.test=function () { // $scope.test=function () {
// var ss = { // var ss = {
// idCard: '220181199312140025', // idCard: '360124199610210611',
// startDate: '20210625', // startDate: '20160212',
// endDate: '20410625' // endDate: '20260212'
// } // }
// HttpService.doPostAndGetData(ss, function (data) { // HttpService.doPostAndGetData(ss, function (data) {
// $scope.postMsgDetail = data; // $scope.postMsgDetail = data;
// console.log("$scope.postMsgDetail:",ss, $scope.postMsgDetail);
// var flag=true; // var flag=true;
// $timeout(function () { // $timeout(function () {
// if ($scope.postMsgDetail.length == 1&&flag == true && $scope.postMsgDetail[$scope.idx].printDate == null&&$scope.postMsgDetail[$scope.idx].idCard==ss.idCard) { // if ($scope.postMsgDetail.length == 1&&flag == true && $scope.postMsgDetail[$scope.idx].printDate == null&&$scope.postMsgDetail[$scope.idx].idCard==ss.idCard) {
...@@ -86,7 +85,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -86,7 +85,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
$scope.idx = 0; $scope.idx = 0;
$scope.changeIndex = function (index) { $scope.changeIndex = function (index) {
$scope.idx = index; $scope.idx = index;
} };
var nation_data = [ var nation_data = [
{id: 1, name: '汉族'}, {id: 1, name: '汉族'},
...@@ -144,8 +143,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -144,8 +143,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
{id: 53, name: '赫哲族'}, {id: 53, name: '赫哲族'},
{id: 54, name: '门巴族'}, {id: 54, name: '门巴族'},
{id: 55, name: '珞巴族'}, {id: 55, name: '珞巴族'},
{id: 56, name: '基诺族'}, {id: 56, name: '基诺族'}
]; ];
var open = function () { var open = function () {
var flag = 0; var flag = 0;
...@@ -210,18 +208,16 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -210,18 +208,16 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
}; };
$scope.startReading = function () { $scope.startReading = function () {
$rootScope.tab = '/searchCardMsg';
$rootScope.close = 1;
$scope.postMsgDetail = [];
postData = { postData = {
idCard: '', idCard: '',
startDate: '', startDate: '',
endDate: '' endDate: ''
} };
$rootScope.tab = '/searchCardMsg';
$rootScope.close = 1;
subSomething(); subSomething();
}; };
$scope.endReading = function () { $scope.endReading = function () {
$rootScope.tab = '/searchCardMsg1';
$rootScope.close = 0; $rootScope.close = 0;
}; };
...@@ -231,7 +227,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -231,7 +227,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
var LODOP1 = getLodop(); var LODOP1 = getLodop();
LODOP1.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", ""); LODOP1.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", "");
LODOP1.PRINT_INIT("实物返单"); LODOP1.PRINT_INIT("实物返单");
LODOP1.SET_PRINT_PAGESIZE(1, "100mm", "150mm", ""); LODOP1.SET_PRINT_PAGESIZE(1, "76mm", "150mm", "");
LODOP1 = getLodop(document.getElementById('LODOP1'), document.getElementById('LODOP_EM1')); LODOP1 = getLodop(document.getElementById('LODOP1'), document.getElementById('LODOP_EM1'));
//分辨率2880*1620 //分辨率2880*1620
// LODOP1.ADD_PRINT_BARCODE(20, 185, 236, 56, "128A", $scope.postMsgDetail[$scope.idx].yjh); // LODOP1.ADD_PRINT_BARCODE(20, 185, 236, 56, "128A", $scope.postMsgDetail[$scope.idx].yjh);
...@@ -251,11 +247,11 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -251,11 +247,11 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
// LODOP1.ADD_PRINT_BARCODE(290, 48, 70, 20, "128A", $scope.postMsgDetail[$scope.idx].sequence); // LODOP1.ADD_PRINT_BARCODE(290, 48, 70, 20, "128A", $scope.postMsgDetail[$scope.idx].sequence);
// LODOP1.ADD_PRINT_TABLE(13, 2, 960, 1400, document.getElementById("div3").innerHTML); // LODOP1.ADD_PRINT_TABLE(13, 2, 960, 1400, document.getElementById("div3").innerHTML);
//(2019-07-01 改) //(2019-07-01 改)
LODOP1.ADD_PRINT_BARCODE('3mm', '48mm', '61mm', '18mm',"128A",$scope.postMsgDetail[$scope.idx].waybillNumber); LODOP1.ADD_PRINT_BARCODE('14mm', '18mm', '52mm', '10mm',"128A",$scope.postMsgDetail[$scope.idx].waybillNumber);
LODOP1.ADD_PRINT_BARCODE('69.5mm', '16mm', '25mm', '7mm', "128A",$scope.postMsgDetail[$scope.idx].fileId); LODOP1.ADD_PRINT_BARCODE('72mm', '16mm', '25mm', '7mm', "128A",$scope.postMsgDetail[$scope.idx].fileId);
LODOP1.ADD_PRINT_BARCODE('93mm', '5mm', '50mm', '14mm',"128A",$scope.postMsgDetail[$scope.idx].waybillNumber); LODOP1.ADD_PRINT_BARCODE('97mm', '3.5mm', '72mm', '11mm',"128A",$scope.postMsgDetail[$scope.idx].waybillNumber);
// LODOP1.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page"); // LODOP1.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
LODOP1.ADD_PRINT_TABLE('1.5mm', '1.5mm', '98mm', '148mm', document.getElementById("div3").innerHTML); LODOP1.ADD_PRINT_TABLE('1.5mm', '1.5mm', '74mm', '148mm', document.getElementById("div3").innerHTML);
LODOP1.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Width:100%;Height:100%"); LODOP1.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Width:100%;Height:100%");
LODOP1.SET_PRINT_STYLEA(1, "FontSize", 10); LODOP1.SET_PRINT_STYLEA(1, "FontSize", 10);
LODOP1.SET_PRINT_STYLEA(2, "FontSize", 5); LODOP1.SET_PRINT_STYLEA(2, "FontSize", 5);
...@@ -270,7 +266,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -270,7 +266,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", ""); LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", "");
LODOP.SET_PRINT_STYLE("FontName", "黑体"); LODOP.SET_PRINT_STYLE("FontName", "黑体");
LODOP.PRINT_INIT("标准快递"); LODOP.PRINT_INIT("标准快递");
LODOP.SET_PRINT_PAGESIZE(1, "100mm", "150mm", ""); LODOP.SET_PRINT_PAGESIZE(1, "76mm", "150mm", "");
LODOP = getLodop(document.getElementById('LODOP1'), document.getElementById('LODOP_EM1')); LODOP = getLodop(document.getElementById('LODOP1'), document.getElementById('LODOP_EM1'));
LODOP.SET_PRINT_STYLE("FontName", "黑体"); LODOP.SET_PRINT_STYLE("FontName", "黑体");
//分辨率2880*1620 //分辨率2880*1620
...@@ -287,9 +283,9 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -287,9 +283,9 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
// LODOP.ADD_PRINT_BARCODE(20, 185, 242, 60, "128A", $scope.postMsgDetail[$scope.idx].fxyjh); // LODOP.ADD_PRINT_BARCODE(20, 185, 242, 60, "128A", $scope.postMsgDetail[$scope.idx].fxyjh);
// LODOP.ADD_PRINT_BARCODE(380, 13, 236, 40, "128A", $scope.postMsgDetail[$scope.idx].fxyjh); // LODOP.ADD_PRINT_BARCODE(380, 13, 236, 40, "128A", $scope.postMsgDetail[$scope.idx].fxyjh);
//(2019-07-01 改) //(2019-07-01 改)
LODOP.ADD_PRINT_BARCODE('3mm', '48mm','61mm','18mm', "128A",$scope.postMsgDetail[$scope.idx].backWaybillNumber); LODOP.ADD_PRINT_BARCODE('13mm', '3mm','70mm','16mm', "128A",$scope.postMsgDetail[$scope.idx].backWaybillNumber);
LODOP.ADD_PRINT_BARCODE('93mm','5mm', '50mm','14mm', "128A",$scope.postMsgDetail[$scope.idx].backWaybillNumber); LODOP.ADD_PRINT_BARCODE('93mm','5mm', '50mm','14mm', "128A",$scope.postMsgDetail[$scope.idx].backWaybillNumber);
LODOP.ADD_PRINT_TABLE('1.5mm', '1.5mm', '98mm', '148mm', document.getElementById("div1").innerHTML); LODOP.ADD_PRINT_TABLE('1.5mm', '1.5mm', '74mm', '148mm', document.getElementById("div1").innerHTML);
// LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page"); // LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Full-Page");
LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Width:100%;Height:100%"); LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT", "Width:100%;Height:100%");
LODOP.SET_PRINT_STYLEA(1, "FontSize", 10); LODOP.SET_PRINT_STYLEA(1, "FontSize", 10);
...@@ -302,11 +298,10 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http']) ...@@ -302,11 +298,10 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
HttpService.setPrintTime(id, $scope.currentTime, function (data) { HttpService.setPrintTime(id, $scope.currentTime, function (data) {
$scope.printResult = $scope.postMsgDetail[$scope.idx].applicantName+" 打印完成"; $scope.printResult = $scope.postMsgDetail[$scope.idx].applicantName+" 打印完成";
}) })
}else {
MessageService.showAlert("打印状态更新失败,请重新打印面单!")
} }
} }
}; };
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment