Commit ba51a8b9 authored by wuzhilong's avatar wuzhilong

添加制证量导出;

更新交接单生成方式;
parent fbf59f31
......@@ -3,8 +3,6 @@ package com.yxproject.start.api;
import com.yxproject.start.dto.ReadCardDto;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.service.PersonPostService;
import com.yxproject.start.utils.Excel;
import com.yxproject.start.utils.ExportExcel;
import com.yxproject.start.utils.ReadExcel;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
......@@ -613,4 +611,109 @@ public class PersonPostApi {
logger.error("Exception 创建报表异常", e);
}
}
@RequestMapping("downloadUploadInfo")
public void expUploadInfo(HttpServletRequest request, HttpServletResponse response,
@RequestParam("strDate") String strDate, @RequestParam("endDate") String endDate) throws Exception {
String remoteAddr = request.getRemoteAddr();
MDC.put("ip", remoteAddr);
JSONArray jsonArray = new JSONArray();
try {
List<Map<String,Object>> list = personPostService.downloadUploadInfo(request, response, replaceDate(strDate),replaceDate(endDate));
String name=replaceDate(strDate)+"-"+replaceDate(endDate);
exportUploadInfoExcel(request, response, list,name);
} catch (Exception e) {
logger.error("上传时间:" + strDate + endDate );
logger.error("Exception 下载制证数据量异常", e);
}
}
/**
* 创建报表
*/
private void exportUploadInfoExcel(HttpServletRequest request, HttpServletResponse response, List<Map<String,Object>> records,String name) throws Exception {
String remoteAddr = request.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet(name);
HSSFCellStyle style = wb.createCellStyle();
style.setAlignment(HorizontalAlignment.CENTER);
HSSFRow firstRow = sheet.createRow(0);
String[] rowTitle = {"分局名称", "派出所名称", "普证数据量","个人邮寄证数据量","合计"};
for (int i = 0; i < rowTitle.length; i++) {
HSSFCell cell = firstRow.createCell(i);
cell.setCellValue(rowTitle[i]);
cell.setCellStyle(style);
}
sheet.setColumnWidth(0, (16 * 256));
sheet.setColumnWidth(1, (22 * 256));
sheet.setColumnWidth(2, (18 * 256));
sheet.setColumnWidth(3, (18 * 256));
sheet.setColumnWidth(4, (18 * 256));
for (int i = 0; i < records.size(); i++) {
HSSFRow row = sheet.createRow(i + 1);
Map<String,Object> mapInfo = records.get(i);
String pz=mapInfo.get("DD")+"";//普证
String gryj=mapInfo.get("CSTR")+"";//个人邮寄
if ("null".equals(pz)){
pz="0";
}
if ("null".equals(gryj)){
gryj="0";
}
int count= Integer.parseInt(pz)+Integer.parseInt(gryj);//合计
HSSFCell cell = row.createCell(0);
cell.setCellValue(mapInfo.get("COUNTYNAME")+"");
cell = row.createCell(1);
cell.setCellValue(mapInfo.get("DWMC")+"");
cell = row.createCell(2);
cell.setCellValue(pz);
cell = row.createCell(3);
cell.setCellValue(gryj);
cell = row.createCell(4);
cell.setCellValue(count);
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd异地制证数据量下载");
String fileName = simpleDateFormat.format(new Date()) + ".xls";
String rtn = "";
fileName = URLEncoder.encode(fileName, "UTF8");
String userAgent = request.getHeader("User-Agent");
/*针对IE或者以IE为内核的浏览器:*/
if (userAgent != null) {
userAgent = userAgent.toLowerCase();
/*IE浏览器,只能采用URLEncoder编码*/
if (userAgent.contains("msie")) {
rtn = "filename=\"" + fileName + "\"";
}
/*Opera浏览器只能采用filename**/
else if (userAgent.contains("opera")) {
rtn = "filename*=UTF-8''" + fileName;
}
/*Safari浏览器,只能采用ISO编码的中文输出*/
else if (userAgent.contains("safari")) {
rtn = "filename=\"" + new String(fileName.getBytes(StandardCharsets.UTF_8), "ISO8859-1") + "\"";
}
/*Chrome浏览器,只能采用MimeUtility编码或ISO编码的中文输出*/
// else if (userAgent.indexOf("applewebkit") != -1) {
// fileName = MimeUtility.encodeText(fileName, "UTF8", "B");
// rtn = "filename=\"" + fileName + "\"";
// }
/* FireFox浏览器,可以使用MimeUtility或filename*或ISO编码的中文输出*/
else if (userAgent.contains("mozilla")) {
rtn = "filename*=UTF-8''" + fileName;
}
}
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;" + rtn);
response.setCharacterEncoding("UTF-8");
OutputStream outputStream = response.getOutputStream();
wb.write(outputStream);
outputStream.flush();
outputStream.close();
} catch (Exception e) {
logger.error("制证数据信息:" + records);
logger.error("Exception 创建报表异常", e);
}
}
}
......@@ -159,4 +159,30 @@ public interface PersonPostMapper {
@Select("SELECT * FROM PERSON_POST WHERE FIRST_WHITE = #{acceptNo}")
public PersonPostEntity findPersonalDataByAcceptNo(String acceptNo);
@Select("select dataa.*,datab.typeid,datab.cstr from(\n" +
"select cd.COUNTYNAME,fi.DWDM DWDM,fi.dwmc,pp.CARD_TYPE_ID aa,count(pp.CARD_TYPE_ID) dd \n" +
"from prepro_person pp\n" +
"left join files fi\n" +
"on pp.FILE_ID=fi.id \n" +
"left join COUNTY_DIC cd\n" +
"on substr(dwdm,0,6)=cd.COUNTY_CODE\n" +
"where TO_CHAR(fi.UPLOAD_DATE,'yyyyMMdd') BETWEEN #{strDate} AND #{endDate}\n" +
"and pp.CARD_TYPE_ID=0\n" +
"group by cd.COUNTYNAME,fi.DWDM,fi.dwmc,pp.CARD_TYPE_ID " +
"order by fi.DWDM \n" +
") dataa\n" +
"left join\n" +
"(\n" +
"select cd.COUNTYNAME,fi.DWDM DWDM,fi.dwmc,pp.CARD_TYPE_ID typeid,count(pp.CARD_TYPE_ID) cstr \n" +
"from prepro_person pp\n" +
"left join files fi\n" +
"on pp.FILE_ID=fi.id \n" +
"left join COUNTY_DIC cd\n" +
"on substr(dwdm,0,6)=cd.COUNTY_CODE\n" +
"where TO_CHAR(fi.UPLOAD_DATE,'yyyyMMdd') BETWEEN #{strDate} AND #{endDate}\n" +
"and pp.CARD_TYPE_ID=9\n" +
"group by cd.COUNTYNAME,fi.DWDM,fi.dwmc,pp.CARD_TYPE_ID ) datab\n" +
"on dataa.DWDM=datab.DWDM")
public List<Map<String,Object>> downloadUploadInfo(@Param("strDate")String strDate, @Param("endDate")String endDate);
}
......@@ -152,7 +152,20 @@ public interface ReceiptMapper {
public int selectSpecialCardByAcceptNo(@Param("id")String id,@Param("beginDate")String beginDate,@Param("expireDate")String expireDate);
//查询未复核交接单
@Select("SELECT RECEIPT_LIST.* ,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC FROM RECEIPT_LIST LEFT JOIN PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK ON RECEIPT_LIST.POLICE_CODE=DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO where state=0 and check_name =#{name} \n")
//查询未复核交接单
@Select("SELECT RECEIPT_LIST.id ,RECEIPT_LIST.QR_CODE,RECEIPT_LIST.POLICE_CODE,RECEIPT_LIST.FINISH_COUNT,CARD_TYPE_DIC.CARD_TYPE,CARD_TYPE_DIC.CARD_TYPE_ID ," +
"DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,POLICE_DIC.POLICE_NAME FJMC,RECEIPT_LIST.state,\n" +
"count(prod_trace_t.download_no)as download, count(prod_trace_t.checker_no) as checkerCount,count(prod_trace_t.ELECTRIC_WRITER_NO)as electricCount \n" +
"FROM RECEIPT_LIST \n" +
"LEFT JOIN DETAIL_RECEIPT_LIST ON RECEIPT_LIST.ID=DETAIL_RECEIPT_LIST.RECEIPT_ID\n" +
"LEFT JOIN PRODYD_DBA.prod_trace_t@PRODYD_LINK prod_trace_t on DETAIL_RECEIPT_LIST.ACCEPT_NO=prod_trace_t.ACCEPT_NO\n" +
"LEFT JOIN PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK ON RECEIPT_LIST.POLICE_CODE=DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO\n" +
"LEFT JOIN CARD_TYPE_DIC ON RECEIPT_LIST.CARD_TYPE_ID=CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"LEFT JOIN POLICE_DIC ON POLICE_DIC.POLICE_CODE=RECEIPT_LIST.FJDM\n" +
"where state=0 and check_name =#{name} \n" +
"GROUP BY RECEIPT_LIST.id ,RECEIPT_LIST.QR_CODE,RECEIPT_LIST.POLICE_CODE,RECEIPT_LIST.FINISH_COUNT,CARD_TYPE_DIC.CARD_TYPE,CARD_TYPE_DIC.CARD_TYPE_ID ," +
"DIC_UPLOAD_UNIT_T.UNIT_NAME,POLICE_DIC.POLICE_NAME,RECEIPT_LIST.state\n" +
"order by RECEIPT_LIST.id ")
public List<Map<String,Object>>selectReceiptListOfSpecialCard (@Param("name")String name);
//根据身份证号查询普通证交接单
......@@ -162,12 +175,13 @@ public interface ReceiptMapper {
public Map<String,Object> selectReceiptList(@Param("id") String id);
//根据交接单号查详单信息
@Select("select detail_receipt_list.UPLOAD_NO,detail_receipt_list.ACCEPT_NO,detail_receipt_list.NAME,detail_receipt_list.POLICE_CODE,detail_receipt_list.CARD_ID\n" +
",detail_receipt_list.NOTE,detail_receipt_list.SIGN_GOVT,detail_receipt_list.RECEIPT_ID,detail_receipt_list.SEX,\n" +
"RECEIPT_LIST.QR_CODE,RECEIPT_LIST.RECEIPT_DATE,RECEIPT_LIST.FINISH_COUNT,POLICE_DIC.POLICE_NAME FJMC,RECEIPT_LIST.CARD_TYPE_ID \n" +
"from detail_receipt_list left join RECEIPT_LIST on detail_receipt_list.RECEIPT_ID = RECEIPT_LIST.id\n" +
"left join POLICE_DIC on POLICE_DIC.POLICE_CODE = RECEIPT_LIST.FJDM \n" +
"where receipt_id= #{receiptId} order by detail_receipt_list.ACCEPT_NO")
@Select("select detail_receipt_list.NAME, detail_receipt_list.CARD_ID,\n" +
"detail_receipt_list.ACCEPT_NO,prod_trace_t.ACCEPT_NO ACCEPT_ID, \n" +
"prod_trace_t.DOWNLOAD_DATE,prod_trace_t.ELECTRIC_WRITE_DATE,prod_trace_t.CHECK_DATE \n" +
"FROM detail_receipt_list \n" +
"LEFT JOIN PRODYD_DBA.prod_trace_t@PRODYD_LINK prod_trace_t on DETAIL_RECEIPT_LIST.ACCEPT_NO=prod_trace_t.ACCEPT_NO\n" +
"where receipt_id=#{receiptId} \n" +
"order by detail_receipt_list.ACCEPT_NO")
public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId);
//根据传入的交接单ID和复核人ID插入复核人、复核时间、更改状态
......@@ -259,7 +273,7 @@ public interface ReceiptMapper {
",CARD_TYPE_DIC.CARD_TYPE,COUNTY_DIC.COUNTY_CODE ,COUNTY_DIC.COUNTYNAME,RECEIPT_LIST.state,RECEIPT_LIST.IS_PRINT from RECEIPT_LIST \n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID)\n" +
"left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = RECEIPT_LIST.POLICE_CODE\n" +
"left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
"left join COUNTY_DIC on RECEIPT_LIST.FJDM = COUNTY_DIC.COUNTY_CODE" +
" where to_char(RECEIPT_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} order by RECEIPT_LIST.id ")
public List<Map<String,Object>> selectReceiptDateByReceiptDate(@Param("startDate") String startDate,@Param("endDate") String endDate);
......@@ -334,4 +348,37 @@ public interface ReceiptMapper {
@Select("select DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC from PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK " +
"where DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = #{policeCode} ")
public List<Map<String, Object>> selectPoliceName(@Param("policeCode") String policeCode);
@Select("select prod_card_t.upload_no,prod_card_t.accept_no,prod_card_T.ID_NO,PROD_GROUP_RELATION_T.upload_unit_no, \n" +
"DIC_UPLOAD_UNIT_T.unit_name,POLICE_DIC.POLICE_CODE COUNTY_CODE, \n" +
"POLICE_DIC.POLICE_NAME COUNTYNAME,group_no.VALID_COUNT,\n" +
"SPECIAL_CARD.SPECIAL_TYPE,SPECIAL_CARD.TASK_ID SPECIAL_TASK_ID ,TASK.TASK_ID,TASK.CARD_TYPE,TASK.OLD_CARD_TYPE,\n" +
"detail_receipt_list.RECEIPT_ID,TO_CHAR(RECEIPT_LIST.CHECK_DATE,'yyyy-MM-dd hh:MI:ss') CHECK_DATE,RECEIPT_LIST.CHECK_NAME\n" +
"from PRODYD_DBA.prod_card_t@PRODYD_LINK\n" +
"LEFT JOIN PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK on PROD_GROUP_RELATION_T.GROUP_NO = subStr(prod_card_t.ACCEPT_NO,0,8)\n" +
"LEFT JOIN PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on PROD_GROUP_RELATION_T.UPLOAD_UNIT_NO=DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO \n" +
"LEFT JOIN POLICE_DIC ON substr(PROD_GROUP_RELATION_T.upload_unit_no,0,6)= POLICE_DIC.POLICE_CODE \n" +
"LEFT JOIN group_no on PROD_GROUP_RELATION_T.GROUP_NO=GROUP_NO.GROUP_NO \n" +
"LEFT JOIN SPECIAL_CARD on substr(SPECIAL_CARD.GROUP_NO,0,8)=substr(prod_card_t.accept_no,0,8) \n" +
"LEFT JOIN TASK ON GROUP_NO.TASK_ID=TASK.TASK_ID\n" +
"LEFT JOIN detail_receipt_list ON prod_card_t.accept_no=detail_receipt_list.accept_no\n" +
"LEFT JOIN RECEIPT_LIST ON detail_receipt_list.RECEIPT_ID=RECEIPT_LIST.ID\n" +
"where 1=1 " +
"and prod_card_t.id_no= #{id} \n" +
"and prod_card_t.BEGIN_DATE= #{beginDate} \n" +
"and prod_card_t.EXPIRE_DATE = #{expireDate}\n" +
"and prod_card_t.ACCEPT_NO not like 'L%' \n" +
"ORDER BY prod_card_t.ACCEPT_NO DESC ")
public List<Map<String,Object>> selectProdAcceptNo(@Param("id") String id,@Param("beginDate") String beginDate,@Param("expireDate") String expireDate);
//生成交接单详单
@Insert("INSERT INTO DETAIL_RECEIPT_LIST(UPLOAD_NO,accept_no,name,POLICE_CODE,card_id,SIGN_GOVT,RECEIPT_ID,SEX)\n" +
"select UPLOAD_NO,ACCEPT_NO,NAME,#{policeCode},ID_NO,SIGN_GOVT,#{receiptId},SEX_NO\n" +
"from PRODYD_DBA.prod_card_t@PRODYD_LINK cardT \n" +
"where cardT.ACCEPT_NO not in \n" +
"(select ACCEPT_NO from SPECIAL_CARD \n" +
"where GROUP_NO like #{groupNo} " +
" AND SPECIAL_TYPE<> 1 ) \n" +
"and cardT.ACCEPT_NO like #{groupNo}")
public boolean createDetailReceiptList(@Param("receiptId")String receiptId,@Param("groupNo")String groupNo,@Param("policeCode")String policeCode);
}
package com.yxproject.start.service;
import com.yxproject.start.dto.ReadCardDto;
import com.yxproject.start.entity.FileNameDicEntity;
import com.yxproject.start.entity.PersonPostEntity;
import net.sf.json.JSONArray;
import org.apache.ibatis.annotations.Param;
......@@ -56,4 +55,6 @@ public interface PersonPostService {
public PersonPostEntity findPersonalDataByAcceptNo(String acceptNo);
public List<Map<String, Object>> downloadUploadInfo(HttpServletRequest request,HttpServletResponse response,String startDate,String endDate);
}
......@@ -93,4 +93,10 @@ public interface ReceiptService {
public List<Map<String,Object>> selectQrCodeByCardID(String id,String beginDate,String expireDate);
public String selectPoliceName(String policeCode);
public List<Map<String,Object>> selectProdAcceptNo(String id,String beginDate,String expireDate);
public boolean createDetailReceiptList(String receiptId,String groupNo,String policeCode);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.dto.ReadCardDto;
import com.yxproject.start.entity.FileNameDicEntity;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.mapper.FileNameDicMapper;
import com.yxproject.start.mapper.PersonPostMapper;
import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.PersonPostService;
import net.sf.json.JSONArray;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -166,7 +162,11 @@ public class PersonPostServiceImpl implements PersonPostService {
public PersonPostEntity findPersonalDataByAcceptNo(String acceptNo) {
return personPostMapper.findPersonalDataByAcceptNo(acceptNo);
}
@Override
public List<Map<String, Object>> downloadUploadInfo(HttpServletRequest request,HttpServletResponse response,String strDate,String endDate){
List<Map<String, Object>> list = personPostMapper.downloadUploadInfo(strDate,endDate);
return list;
}
// /**
// * 查询个人邮寄信息
// * @param fileName 文件名
......
......@@ -481,7 +481,15 @@ public class ReceiptServiceImpl implements ReceiptService {
}
return typeList;
}
@Override
public List<Map<String,Object>> selectProdAcceptNo(String id, String beginDate, String expireDate) {
return receiptMapper.selectProdAcceptNo(id,beginDate,expireDate);
}
@Override
public boolean createDetailReceiptList(String receiptId,String groupNo,String policeCode) {
receiptMapper.createDetailReceiptList(receiptId,groupNo,policeCode);
return true;
}
private String createGroupNoMiss(List<String> c, List<String> nsList) {
try {
String groupNo = "";
......
......@@ -29,6 +29,37 @@
</style>
<div class="content row">
<div class="col-md-12" style="margin-top:20px;">
<div class="box">
<strong class="box-header with-border">异地制证数据量导出</strong>
<div class="box box-primary">
<table class="table table-bordered">
<tr>
<td>请选择制证日期:</td>
<td>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" class="form-control pull-right" ng-model="choseDate" id="strdate" readonly/>
</div>
</td>
<td>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" class="form-control pull-right" ng-model="choseDate" id="enddate" readonly/>
</div>
</td>
<td>
<div style="float: left">
<button class="btn btn-info" ng-click="expUploadInfo()">数据导出</button>
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="box">
<strong class="box-header">格口文件上传</strong>
<div class="box-primary">
......
......@@ -19,7 +19,21 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
showPreview: true,
maxFileSize: 1024 * 30
});
//Date picker
$('#strdate').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-MM-dd',
todayBtn: 1,
autoclose: 1
});
$('#enddate').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-MM-dd',
todayBtn: 1,
autoclose: 1
});
//Date picker
$('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
......@@ -50,6 +64,18 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.expUploadInfo = function () {
var strdate=$("#strdate").val();
var enddate=$("#enddate").val();
var url = '../personPostApi/downloadUploadInfo?'+ 'strDate=' + strdate + '&'+ 'endDate=' + enddate ;
var a = document.createElement("a");
document.body.appendChild(a);
a.href = encodeURI(url);
a.click();
}
$scope.uploadExcel = function () {
var fd = new FormData();
var files = document.querySelector('input#id_file_photo_for_check').files;
......
......@@ -63,8 +63,8 @@
<td>{{item.QR_CODE}}</td>
<td>{{item.GAJG_MC}}</td>
<td>{{item.FINISH_COUNT}}</td>
<td>{{item.download}}</td>
<td>{{item.electricCount}}</td>
<td>{{item.DOWNLOAD}}</td>
<td>{{item.ELECTRICCOUNT}}</td>
<td ng-if="item.STATE==0">未复核</td>
</tr>
</tbody>
......@@ -93,28 +93,28 @@
<td>{{item.NAME}}</td>
<td>{{item.CARD_ID}}</td>
<td>
<span ng-if="item.downloadDate==null"
<span ng-if="item.DOWNLOAD_DATE==null"
style="color: red"
class="glyphicon glyphicon-remove">
</span>
<span ng-if="item.downloadDate!=null"
style="size: 6px">{{item.downloadDate | date:'MM-dd hh:mm'}}</span>
<span ng-if="item.DOWNLOAD_DATE!=null"
style="size: 6px">{{item.DOWNLOAD_DATE | date:'MM-dd hh:mm'}}</span>
</td>
<td>
<span ng-if="item.electricDate==null"
<span ng-if="item.ELECTRIC_WRITE_DATE==null"
style="color: red"
class="glyphicon glyphicon-remove">
</span>
<span ng-if="item.electricDate!=null"
style="size: 6px">{{item.electricDate| date:'MM-dd hh:mm'}}</span>
<span ng-if="item.ELECTRIC_WRITE_DATE!=null"
style="size: 6px">{{item.ELECTRIC_WRITE_DATE| date:'MM-dd hh:mm'}}</span>
</td>
<td>
<span ng-if="item.checkDate==null"
<span ng-if="item.CHECK_DATE==null"
style="color: red"
class="glyphicon glyphicon-remove">
</span>
<span ng-if="item.checkDate!=null"
style="size: 6px">{{item.checkDate| date:'MM-dd hh:mm'}}</span>
<span ng-if="item.CHECK_DATE!=null"
style="size: 6px">{{item.CHECK_DATE| date:'MM-dd hh:mm'}}</span>
</td>
</tr>
</tbody>
......
......@@ -16,8 +16,15 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.tagPrintData = data;
for(var i=0;i<$scope.tagPrintData.length;i++){
$scope.tagPrintData[i].show = false;
if($scope.tagPrintData[i].ID==id){
//打开详细
$scope.tagPrintData[i].show = true;
//给当前封签加上选中样式
$scope.tagPrintData[i].styleClass="bg-info";
//展示详单页面
$scope.showDetail($scope.tagPrintData[i]);
}
}
console.log($scope.tagPrintData)
})
};
......@@ -26,9 +33,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}else{
getPoliceListDataNotChecked();
}
$scope.acceptNo = 'ACCEPT_NO';
var postParam={
idCard:'',
startDate:'',
......@@ -43,7 +48,8 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
isShow:false,
policeData:'',
QR_CODE:'',
machineNum:''
machineNum:'',
fjmc:''
}
var getDetailListById = function (id) {
......@@ -82,7 +88,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.json.policeCode = item.POLICE_CODE;
$scope.json.count = item.FINISH_COUNT;
$scope.json.QR_CODE = item.QR_CODE;
$scope.json.machineNum = item.MACHINE_NUM;
$scope.json.fjmc = item.FJMC;
$scope.json.isShow=item.show;
getDetailListById(item.ID);
};
......@@ -112,7 +118,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.json.policeName = data.policeName;
$scope.json.count = data.count;
if(data.state===1){
$scope.json.isShow=true;
$scope.json.isShow=false;
getPoliceListDataNotChecked();
getDetailListById(data.id)
for(var i=0;i<$scope.tagPrintData.length;i++){
......@@ -274,12 +280,12 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
LODOP.SET_PRINT_PAGESIZE(1, "79mm", "49mm", "");
// LODOP.SET_PRINT_STYLE("FontName", "黑体");
//设定该条形码在纸张内的位置和大小【Top, Left,Width, Height, CodeType, CodeValue】
LODOP.ADD_PRINT_BARCODE(24,12, "78mm", "20mm", "128A", $scope.json.policeCardsList[0].ACCEPT_NO.toString());
LODOP.ADD_PRINT_BARCODE(24,12, "78mm", "20mm", "128A", $scope.json.QR_CODE);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 14);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
//设定该打印项在纸张内的位置和区域大小【Top,Left,Width,Height,strHtmlContent】
// LODOP.ADD_PRINT_HTM("24mm", "0", "80mm", "24mm", document.getElementById("tagDiv").innerHTML);
LODOP.ADD_PRINT_TEXT(107, 0, "100%", 20,$scope.json.policeCardsList[0].FJMC.toString());
LODOP.ADD_PRINT_TEXT(107, 0, "100%", 20,$scope.json.fjmc);
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
......
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