Commit 79923c56 authored by dahai's avatar dahai

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

parents 54c2caaf b3950453
......@@ -3,6 +3,7 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
......@@ -61,6 +62,22 @@ public class LogApi {
return total;
}
/**
* 查询解析日志
* @param fileName
* @param analysisTime
* @return
*/
@RequestMapping("selectByAnalysisLog")
@Transactional(rollbackFor = Exception.class)
public List<Map<String,Object>> selectByAnalysisLog(@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime, @RequestParam("currPage")String currPage, @RequestParam("pageSize")String pageSize){
List<Map<String,Object>> resultList = logService.selectAnalysisLog(fileName,analysisTime,Long.valueOf(currPage),Long.valueOf(pageSize));
return resultList;
}
/**
* 去除字符串中中线
* @param str
......
......@@ -98,7 +98,8 @@ public class PersonPostApi {
* @param printTime
* @return
*/
public boolean printPostList(@RequestParam("id") int id, @RequestParam("printTime") String printTime) {
@RequestMapping("updatePrintDate")
public boolean updatePrintDate(@RequestParam("id") int id, @RequestParam("printTime") String printTime) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
boolean flag=false;
try {
......
......@@ -13,8 +13,7 @@ import java.util.Map;
public interface LogMapper {
@Insert("")
public boolean insertAnalysisLog();
@Select("<script> " +
"SELECT * FROM " +
......
......@@ -58,5 +58,5 @@ public interface PersonPostMapper {
public PersonPostEntity findPostInfoById(int id);
@Update("update PERSON_POST SET PRINT_DATE=#{printDateTime} where id=#{id}")
void updateIsPrint(int id, Date printDateTime);
void updateIsPrint(@Param("id") int id, @Param("printDateTime") Date printDateTime);
}
......@@ -176,8 +176,4 @@ public interface TaskListMapper {
public boolean updateState(@Param("taskId") String taskId);
}
......@@ -12,6 +12,7 @@ public interface LogService {
public String selectNewFileLogCount(String newFileName,String cardId,String createDate,String uploadCountyCode);
public List<Map<String,Object>> selectAnalysisLog(String fileName,String analysisDate,long currPage,long pageSize);
public List<CountyDicEntity> getCountyList();
......
......@@ -25,6 +25,12 @@ public class LogServiceImpl implements LogService {
return count;
}
@Override
public List<Map<String, Object>> selectAnalysisLog(String fileName, String analysisDate,long currPage, long pageSize) {
List<Map<String,Object>> resultList = logMapper.selectAnalysisLog(fileName,analysisDate,currPage * pageSize, (currPage - 1) * pageSize + 1);
return resultList;
}
@Override
public List<CountyDicEntity> getCountyList() {
......
......@@ -47,7 +47,7 @@ angular.module('AvatarCheck', [
$location.path("/login");
}
if($rootScope.loginData.login == true){
$scope.icons = [
$rootScope.icons = [
"glyphicon glyphicon-list icon text-primary",
"fa fa-file icon text-info",
"glyphicon glyphicon-briefcase icon text-danger",
......
......@@ -55,7 +55,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
console.log(id)
$http({
method: 'GET',
url: "../api/idCard/printPostList" + urlTimeStamp(),
url: "../personPostApi/updatePrintDate" + urlTimeStamp(),
params: {
id: id,
printTime: printTime
......@@ -260,13 +260,33 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
selectAnalyseLog:function(oldPackageName,date,success){
selectAnalyseLogCount:function (oldPackageName,date,success) {
if(angular.isUndefined(oldPackageName)){
oldPackageName='';
}
$http({
method: 'GET',
url: "../LogApi/selectByAnalysisLogCount"+urlTimeStamp(),
params:{
fileName:oldPackageName,
analysisTime:date
}
}).then(function successCallback(response) {
success(response.data)
})
},
selectAnalyseLog:function(oldPackageName,date,currentPage,itemsPerPage,success){
if(angular.isUndefined(oldPackageName)){
oldPackageName='';
}
$http({
method: 'GET',
url: "../ParsingLogApi/selectParsingLog"+urlTimeStamp(),
url: "../LogApi/selectByAnalysisLog"+urlTimeStamp(),
params:{
date:date,
oldPackageData:oldPackageName
fileName:oldPackageName,
analysisTime:date,
currPage:currentPage,
pageSize:itemsPerPage
}
}).then(function successCallback(response) {
success(response.data)
......
......@@ -51,7 +51,7 @@
</td>
</tr>
</table>
<table class="table table-bordered table-hover postTable" ng-if="analyseLog">
<table class="table table-bordered table-hover postTable" ng-if="analyseLog.length>0">
<thead>
<tr>
<th>NO.</th>
......@@ -80,9 +80,12 @@
</tbody>
</table>
<div style="padding-left: 27%;" ng-if="analyseLog">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<div ng-if="analyseLog.length==0" class="box-body">
<h4>暂无数据</h4>
</div>
<div style="padding-left: 27%;" ng-if="analyseLog.length>0">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
</div>
</div>
</div>
......
......@@ -28,14 +28,20 @@ angular.module('AvatarCheck.analysisLog', ['ngRoute', 'AvatarCheck.http', 'tm.pa
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
};
$scope.paginationConf.totalItems = 50;
$scope.getAnalyseLog = function(){
HttpService.selectAnalyseLog($scope.oldPackageName,$("#datepicker").val(),function(data){
HttpService.selectAnalyseLogCount($scope.oldPackageName,$("#datepicker").val(),function (data) {
$scope.paginationConf.totalItems = data;
console.log($scope.paginationConf.totalItems)
})
HttpService.selectAnalyseLog($scope.oldPackageName,$("#datepicker").val(),$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.analyseLog = data;
console.log($scope.analyseLog)
})
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.getAnalyseLog);
});
......@@ -79,6 +79,26 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http'])
localStorageService.set('loginData', resp.data.user);
$rootScope.menuList = $rootScope.loginData.roleList[0].permissions;
console.log($scope.menuList)
$rootScope.icons = [
"glyphicon glyphicon-list icon text-primary",
"fa fa-file icon text-info",
"glyphicon glyphicon-briefcase icon text-danger",
"glyphicon glyphicon-th-large icon text-success",
"glyphicon glyphicon-stats icon text-primary-dker",
"glyphicon glyphicon-list icon text-primary",
"fa fa-file icon text-info",
"glyphicon glyphicon-briefcase icon text-danger",
"glyphicon glyphicon-th-large icon text-success",
"glyphicon glyphicon-stats icon text-primary-dker",
"glyphicon glyphicon-list icon text-primary",
"fa fa-file icon text-info",
"glyphicon glyphicon-briefcase icon text-danger",
"glyphicon glyphicon-th-large icon text-success",
"glyphicon glyphicon-stats icon text-primary-dker",
"glyphicon glyphicon-briefcase icon text-danger",
"glyphicon glyphicon-th-large icon text-success",
"glyphicon glyphicon-stats icon text-primary-dker"
]
whereToGo($rootScope.loginData.roleList[0].process)
if(userAgent.indexOf('.NET')!=-1){
window.location.reload();
......
......@@ -41,10 +41,13 @@ angular.module('AvatarCheck.packageLog', ['ngRoute', 'AvatarCheck.http', 'tm.pag
})
HttpService.selectPackageLog($scope.newPackageName,$scope.idCard,$('#datepicker').val(),$scope.county,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.packageLogData = data;
console.log($scope.packageLogData,"?")
console.log($scope.packageLogData)
})
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.getPackageLog);
......
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