Commit 381f95ac authored by liuxinben's avatar liuxinben

Merge remote-tracking branch 'origin/dev' into dev

parents f089ede8 33bc4a52
......@@ -40,23 +40,22 @@ public class ExportExcelApi {
* 导出公安网数据
*/
@RequestMapping("printExcelData")
public byte[] printExcelData(@RequestParam("list") List<Integer> list, @RequestParam("name")String name, @RequestParam("isHistory")String isHistory, HttpServletResponse response, HttpServletRequest requ) {
public void printExcelData(@RequestParam("list") List<Integer> list, @RequestParam("name")String name, @RequestParam("isHistory")String isHistory, HttpServletResponse response, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
List<Map<String, Object>> list1 = detailReceiptListService.selectPoliceDataById(list);
List<Map<String, Object>> mapList = detailReceiptListService.selectPostDetails(list, name,isHistory);
response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8");
//使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String fout = ExportExcel.exportExcelDate(mapList,list1,response,requ);
try {
return inputStream2byte(fout);
} catch (IOException e) {
ExportExcel.exportExcelDate(mapList,list1,response,requ);
} catch (Exception e) {
e.printStackTrace();
logger.error("导出文件名:" + fout);
logger.error("导出公安网数据异常");
logger.error("IOException 导出公安网数据IO异常", e);
}
return null;
}
/**
......
......@@ -2,6 +2,7 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.service.LogService;
import com.yxproject.start.service.PersonPostService;
import org.apache.log4j.Logger;
import org.apache.log4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -23,6 +24,8 @@ import static com.yxproject.start.utils.YXStringUtils.getCurrentDate2String;
public class LogApi {
@Autowired
private LogService logService;
@Autowired
private PersonPostService personPostService;
Logger logger= Logger.getLogger(LogApi.class);
......@@ -227,6 +230,16 @@ public class LogApi {
List <Map <String, Object>> resultList=logService.selectFileIdByUploadDate(printDate);
//查询身份数据
List <Map <String, Object>> dataList=logService.selectPersonPostUnanalysis(printDate);
//添加受理号匹配,出生日期不匹配订单
List <Map <String, Object>> invalidList=logService.selectInvalidPersonPost(printDate);
for (int i = 0; i < invalidList.size(); i++) {
Map<String, Object> noteMap = invalidList.get(i);
String uploadNo=noteMap.get("JMSFZSLH").toString();
String note= "出生日期填写不符!办证人信息:"+noteMap.get("XM").toString()+"-"+noteMap.get("CSRQ").toString();
String name="system";
personPostService.cancelPostByAcceptNo(uploadNo,note,name);
}
//todo 获取所有的已解析的文件id
List <Map <String, Object>> analysusList = new ArrayList<>();
//将身份数据插入到邮寄表中
......
......@@ -46,7 +46,8 @@ public interface LogMapper {
"FROM PERSON_POST \n" +
"LEFT JOIN PREPRO_PERSON ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"LEFT JOIN FILES ON FILES.ID=PREPRO_PERSON.FILE_ID "+
"WHERE TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} )")
"WHERE PERSON_POST.BIRTH_DATE = PREPRO_PERSON.CSRQ " +
"AND TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} )")
public boolean changeCardTypeByPrintDate(@Param("printDate")String printDate);
@Update(" update FILE_NAME_DIC set FILE_NAME_DIC.ANALYSIS_DATE = #{printDate} where file_id=#{fileId} ")
......@@ -56,7 +57,8 @@ public interface LogMapper {
" where file_id IN (SELECT DISTINCT PERSON_POST.file_id FROM PERSON_POST " +
" LEFT JOIN PREPRO_PERSON ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH " +
" LEFT JOIN FILES ON FILES.ID=PREPRO_PERSON.FILE_ID " +
" WHERE TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} ) ")
" WHERE PERSON_POST.BIRTH_DATE = PREPRO_PERSON.CSRQ " +
" AND TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{printDate} ) ")
public boolean insertAnalysisDateByPrintDate(@Param("analysisDate")String analysisDate,@Param("printDate")String printDate);
/**
......@@ -208,6 +210,17 @@ public interface LogMapper {
"and TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{uploadDate}")
public List<Map<String, Object>> selectPersonPostUnanalysis(@Param("uploadDate")String uploadDate);
@Select("select DISTINCT PREPRO_PERSON.JMSFZSLH,PREPRO_PERSON.XM,PREPRO_PERSON.CSRQ \n" +
"FROM PERSON_POST " +
"LEFT JOIN PREPRO_PERSON ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH \n" +
"LEFT JOIN FILES ON FILES.ID = PREPRO_PERSON.FILE_ID \n" +
"WHERE PERSON_POST.STATE1=3 \n" +
"AND PERSON_POST.BIRTH_DATE <> PREPRO_PERSON.CSRQ \n" +
"and TO_CHAR(FILES.UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{uploadDate}")
public List<Map<String, Object>> selectInvalidPersonPost(@Param("uploadDate")String uploadDate);
//身份数据插入person_post
@Update("UPDATE PERSON_POST SET ID_CARD=#{cardId},ACCEPT_THE_MATTER=#{issuing},BEGIN_USEFUL_LIFE=#{beginDate},VALID_PERIOD_END=#{endDate},STATE1=0 where PERSON_POST.FIRST_WHITE=#{firstWhite}")
public boolean insertIdData(@Param("cardId")String cardId,@Param("issuing") String issuing,@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("firstWhite")String firstWhite );
......
......@@ -51,7 +51,7 @@ public interface PersonPostMapper {
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty}) </when>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between ${startDate} and ${endDate} </when>" +
" <when test='printDate!=\"\"'> and to_char(PERSON_POST.print_Date,'yyyyMMdd') = ${printDate} </when>" +
"order by PERSON_POST.id ) " +
"order by substr(PERSON_POST.first_white,10,13) ) " +
"A" +
")" +
"WHERE RN BETWEEN ${pageSize} AND ${firstIndex}" +
......@@ -149,7 +149,7 @@ public interface PersonPostMapper {
@Insert("INSERT INTO AUDLIT_FAILURE (UPLOAD_NO,UP_TIUME,REMARKS,NAME) VALUES (#{uploadNo},SYSDATE,#{remarks},#{name})")
public boolean cancelPostByAcceptNo(@Param("uploadNo")String uploadNo, @Param("remarks")String remarks, @Param("name")String name);
@Select("SELECT af.*,pp.APPLICANT_NAME,pp.NATURE_OF_THE_INFORMATION,pp.RECIPIENT_NAME,pp.RECIPIENT_ADDRESS,pp.RECIPIENT_PHONE FROM AUDLIT_FAILURE af\n" +
@Select("SELECT af.*,pp.APPLICANT_NAME,pp.NATURE_OF_THE_INFORMATION,pp.RECIPIENT_NAME,pp.RECIPIENT_ADDRESS,pp.RECIPIENT_PHONE,pp.ORDER_NUMBER FROM AUDLIT_FAILURE af\n" +
"left join PERSON_POST pp \n" +
"on af.UPLOAD_NO=pp.FIRST_WHITE " +
"WHERE TO_CHAR(UP_TIUME,'yyyyMMdd') BETWEEN #{beginDate} AND #{endDate}")
......
......@@ -50,6 +50,8 @@ public interface LogService {
public List<Map<String,Object>> selectPersonPostUnanalysis(@Param("uploadDate")String uploadDate);
public List<Map<String,Object>> selectInvalidPersonPost(@Param("uploadDate")String uploadDate);
public boolean insertIdData(String cardId, String issuing,String beginDate,String endDate,String firstWhite );
public boolean updateNullIdDate(String fileId );
......
......@@ -157,6 +157,11 @@ public class LogServiceImpl implements LogService {
return logMapper.selectPersonPostUnanalysis(uploadDate);
}
@Override
public List<Map<String, Object>> selectInvalidPersonPost(String uploadDate) {
return logMapper.selectInvalidPersonPost(uploadDate);
}
@Override
public boolean insertIdData(String cardId, String issuing, String beginDate, String endDate,String firstWhite) {
logMapper.insertIdData(cardId,issuing,beginDate,endDate,firstWhite);
......
......@@ -24,9 +24,8 @@ public class ExportExcel {
/**
* 导出公安网信息
* @param mapList 公安网信息
* @return
*/
public static String exportExcelDate(List<Map<String,Object>> mapList, List<Map<String,Object>> list, HttpServletResponse response, HttpServletRequest request){
public static void exportExcelDate(List<Map<String,Object>> mapList, List<Map<String,Object>> list, HttpServletResponse response, HttpServletRequest request){
//第一步创建workbook
HSSFWorkbook wb = new HSSFWorkbook();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
......@@ -171,9 +170,8 @@ public class ExportExcel {
cell1.setCellValue("null".equals(list.get(i).get("RECEIPT_DATE") + "") ? "" : list.get(i).get("RECEIPT_DATE") + "");
}
//第六步将生成excel文件保存到指定路径下
FileOutputStream fout = null;
try {
String fileName = "公安网签收"+getCurrentDate2String("yyyy-MM-dd")+"_"+mapList.size() + ".xls";
String fileName = "异地签收"+getCurrentDate2String("yyyy-MM-dd")+"_"+mapList.size() + ".xls";
String rtn = "";
fileName = URLEncoder.encode(fileName, "UTF8");
String userAgent = request.getHeader("User-Agent");
......@@ -192,11 +190,6 @@ public class ExportExcel {
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;
......@@ -205,17 +198,13 @@ public class ExportExcel {
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;" + rtn);
response.setCharacterEncoding("UTF-8");
// fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
fout = new FileOutputStream("D:\\Excel\\" +"公安网签收"+getCurrentDate2String("yyyy-MM-dd")+"_"+mapList.size()+".xls");
OutputStream fout = response.getOutputStream();
wb.write(fout);
fout.flush();
fout.close();
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("Excel文件生成成功..." + new Date());
// return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
return "D:\\Excel\\" +"公安网签收"+getCurrentDate2String("yyyy-MM-dd")+"_"+mapList.size()+".xls";
}
......
......@@ -17,7 +17,7 @@
<tr>
<td style="text-align:left;"><strong>订单状态:</strong>{{item.orderState}}</td>
<td style="text-align:left;"><strong>openid:</strong>{{item.openid}}</td>
<td style="text-align:left;"><strong>申请人姓名:</strong>{{item.applicantName}}</td>
<td style="text-align:left;"><strong>内件性质:</strong>{{item.natureOfTheInternal}}</td>
</tr>
<tr>
<td style="text-align:left;"><strong>*寄件人姓名:</strong>{{item.senderName}}</td>
......@@ -40,9 +40,12 @@
<td style="text-align:left;"><strong>格口信息:</strong>{{item.latticeMouthInformation}}</td>
</tr>
<tr>
<td style="text-align:left;"><strong>内件性质:</strong>{{item.natureOfTheInternal}}</td>
<td style="text-align:left;"><strong>内件信息:</strong>{{item.natureOfTheInformation}}</td>
<td style="text-align:left;"><strong>备注:</strong>{{item.note}}</td>
<td style="text-align:left;"><strong>申请人姓名:</strong>{{item.applicantName}}</td>
<td style="text-align:left;"><strong>出生日期:</strong>{{item.birthDate|date:'yyyy-MM-dd'}}</td>
</tr>
<tr>
<td colspan="3" style="text-align:left;"><strong>备注:</strong><h4>{{item.note}}</h4></td>
</tr>
</table>
</div>
\ No newline at end of file
......@@ -1904,7 +1904,6 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
})
},
loadCertificationDiagram: function (date,success, failed) {
console.log(date);
$http({method: 'post',
url: "../Cartogram/findCardDetailedList"+urlTimeStamp(),
data:date
......
......@@ -10,10 +10,10 @@ var urlTimeStamp = function () {
//条形统计图 建立
var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
var body = {
color: ['#003366', '#006699', '#4cabce', '#e5323e'],
color: ['#003366', '#006699', '#4cabce', '#00a65a', '#e5323e'],
title : {
text: ' 北京市公安局 '+data.date+' 年异地证制证生产情况',
subtext: '人次数量'
subtext: '人次/数量'
},
//提示框组件
tooltip: {
......@@ -24,7 +24,7 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
type: 'scroll',
orient: 'horizontal',
x: 'right',
data: ['异地证','港澳','台湾','废证']
data: ['异地证','港澳','台湾','个人邮寄','废证']
},
//拖拽时,是否实时更新。
calculable: true,
......@@ -69,6 +69,12 @@ var buildDiagramDataCheckItemRatioProv = function (labelprov, data) {
label: labelprov,
data: data.tw
},
{
name: '个人邮寄',
type: 'bar',
label: labelprov,
data: data.gr
},
{
name: '废证',
type: 'bar',
......
......@@ -117,6 +117,7 @@
<thead>
<tr>
<th>NO.</th>
<th>订单号</th>
<th>上传受理号</th>
<th>提交人</th>
<th>提交时间</th>
......@@ -132,6 +133,7 @@
<tbody>
<tr ng-repeat="item in afInfo | orderBy:'ID'">
<td>{{$index+1}}</td>
<td>{{item.ORDER_NUMBER}}</td>
<td>{{item.UPLOAD_NO}}</td>
<td>{{item.NAME}}</td>
<td>{{item.UP_TIUME | date:'yyyy-MM-dd HH:mm:ss'}}</td>
......
......@@ -121,8 +121,8 @@ angular.module("AvatarCheck.confirmNotDeliveredInfo",['ngRoute', 'AvatarCheck.ht
LODOP.SET_PRINT_STYLEA(4, "Bold", 1);
LODOP.SET_PRINT_STYLEA(4, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(4, "FontSize", 12);
LODOP.PREVIEW();
// LODOP.PRINT();
// LODOP.PREVIEW();
LODOP.PRINT();
}
//接收并打印标签
......
......@@ -56,10 +56,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
$scope.postMsgDetail = [];
HttpService.doPostAndGetData(postData, function (data) {
$scope.postMsgDetail = data;
console.log("postData:",postData)
console.log("$scope.postMsgDetail:", $scope.postMsgDetail)
$timeout(function () {
console.log("????"+$scope.postMsgDetail.length == 1&&$scope.postMsgDetail[$scope.idx].printDate == null&&flag == true&&$scope.postMsgDetail[0].idCard==postData.idCard)
if ($scope.postMsgDetail.length == 1&&$scope.postMsgDetail[$scope.idx].printDate == null&&flag == true&&$scope.postMsgDetail[0].idCard==postData.idCard){
$scope.PreviewMytableRotate();
}
......@@ -90,7 +87,6 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
$scope.idx = 0;
$scope.changeIndex = function (index) {
$scope.idx = index;
console.log($scope.idx)
}
var nation_data = [
......@@ -196,12 +192,9 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
// myform.newaddress.value = aaa.sNewAddress;
myform.Base64.value = document.getElementById("aaa").PhotoBuffer;
// myform.fp.value = aaa.sFpState;
var imgSrc = "data:image/jpg;base64," + myform.Base64.value;
var imgSrc = "data:image/jpg;base64," + myform.Base64.value;
$("#imgDetail").attr("src", imgSrc);
postData.idCard = myform.id.value;
postData.idCard = myform.id.value;
postData.startDate = myform.yxqstart.value;
postData.endDate = myform.yxqend.value;
doPost(flag)
......@@ -220,6 +213,7 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
$scope.startReading = function () {
$rootScope.tab = '/searchCardMsg';
$rootScope.close = 1;
$scope.postMsgDetail = [];
subSomething();
};
$scope.endReading = function () {
......@@ -300,7 +294,6 @@ angular.module('AvatarCheck.searchCardMsg', ['ngRoute', 'AvatarCheck.http'])
LODOP.SET_PRINT_STYLEA(0, "AngleOfPageInside", 0);
// LODOP.PREVIEW();
if(LODOP.PRINT()){
console.log($scope.postMsgDetail[$scope.idx].sqrxm,$scope.postMsgDetail)
var id = document.getElementsByClassName("minimal")[$scope.idx].value;
HttpService.setPrintTime(id, $scope.currentTime, function (data) {
$scope.printResult = $scope.postMsgDetail[$scope.idx].applicantName+" 打印完成";
......
......@@ -145,7 +145,7 @@
<table class="table table-bordered table-hover" ng-if="postData.length>0">
<thead>
<tr>
<!--<th>NO.</th>-->
<th>NO.</th>
<th>订单号</th>
<th>正-反向邮件号</th>
<th>受理号</th>
......@@ -159,8 +159,8 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="item in postData | orderBy:item.id">
<!--<td>{{item.id}}</td>-->
<tr ng-repeat="item in postData">
<td>{{$index+1}}</td>
<td>{{item.orderNumber}}</td>
<td>{{item.waybillNumber}} -
{{item.backWaybillNumber}}
......
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