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; ...@@ -3,6 +3,7 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.CountyDicEntity; import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.service.LogService; import com.yxproject.start.service.LogService;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -61,6 +62,22 @@ public class LogApi { ...@@ -61,6 +62,22 @@ public class LogApi {
return total; 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 * @param str
......
...@@ -98,7 +98,8 @@ public class PersonPostApi { ...@@ -98,7 +98,8 @@ public class PersonPostApi {
* @param printTime * @param printTime
* @return * @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"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
boolean flag=false; boolean flag=false;
try { try {
......
...@@ -13,8 +13,7 @@ import java.util.Map; ...@@ -13,8 +13,7 @@ import java.util.Map;
public interface LogMapper { public interface LogMapper {
@Insert("")
public boolean insertAnalysisLog();
@Select("<script> " + @Select("<script> " +
"SELECT * FROM " + "SELECT * FROM " +
......
...@@ -58,5 +58,5 @@ public interface PersonPostMapper { ...@@ -58,5 +58,5 @@ public interface PersonPostMapper {
public PersonPostEntity findPostInfoById(int id); public PersonPostEntity findPostInfoById(int id);
@Update("update PERSON_POST SET PRINT_DATE=#{printDateTime} where id=#{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 { ...@@ -176,8 +176,4 @@ public interface TaskListMapper {
public boolean updateState(@Param("taskId") String taskId); public boolean updateState(@Param("taskId") String taskId);
} }
...@@ -12,6 +12,7 @@ public interface LogService { ...@@ -12,6 +12,7 @@ public interface LogService {
public String selectNewFileLogCount(String newFileName,String cardId,String createDate,String uploadCountyCode); 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(); public List<CountyDicEntity> getCountyList();
......
...@@ -25,6 +25,12 @@ public class LogServiceImpl implements LogService { ...@@ -25,6 +25,12 @@ public class LogServiceImpl implements LogService {
return count; 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 @Override
public List<CountyDicEntity> getCountyList() { public List<CountyDicEntity> getCountyList() {
......
...@@ -47,7 +47,7 @@ angular.module('AvatarCheck', [ ...@@ -47,7 +47,7 @@ angular.module('AvatarCheck', [
$location.path("/login"); $location.path("/login");
} }
if($rootScope.loginData.login == true){ if($rootScope.loginData.login == true){
$scope.icons = [ $rootScope.icons = [
"glyphicon glyphicon-list icon text-primary", "glyphicon glyphicon-list icon text-primary",
"fa fa-file icon text-info", "fa fa-file icon text-info",
"glyphicon glyphicon-briefcase icon text-danger", "glyphicon glyphicon-briefcase icon text-danger",
......
...@@ -55,7 +55,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -55,7 +55,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
console.log(id) console.log(id)
$http({ $http({
method: 'GET', method: 'GET',
url: "../api/idCard/printPostList" + urlTimeStamp(), url: "../personPostApi/updatePrintDate" + urlTimeStamp(),
params: { params: {
id: id, id: id,
printTime: printTime printTime: printTime
...@@ -260,13 +260,33 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -260,13 +260,33 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) 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({ $http({
method: 'GET', method: 'GET',
url: "../ParsingLogApi/selectParsingLog"+urlTimeStamp(), url: "../LogApi/selectByAnalysisLog"+urlTimeStamp(),
params:{ params:{
date:date, fileName:oldPackageName,
oldPackageData:oldPackageName analysisTime:date,
currPage:currentPage,
pageSize:itemsPerPage
} }
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</td> </td>
</tr> </tr>
</table> </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> <thead>
<tr> <tr>
<th>NO.</th> <th>NO.</th>
...@@ -80,9 +80,12 @@ ...@@ -80,9 +80,12 @@
</tbody> </tbody>
</table> </table>
<div style="padding-left: 27%;" ng-if="analyseLog"> <div ng-if="analyseLog.length==0" class="box-body">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination> <h4>暂无数据</h4>
</div> </div>
<div style="padding-left: 27%;" ng-if="analyseLog.length>0">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -28,14 +28,20 @@ angular.module('AvatarCheck.analysisLog', ['ngRoute', 'AvatarCheck.http', 'tm.pa ...@@ -28,14 +28,20 @@ angular.module('AvatarCheck.analysisLog', ['ngRoute', 'AvatarCheck.http', 'tm.pa
itemsPerPage: 10, itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50] perPageOptions: [10, 20, 30, 40, 50]
}; };
$scope.paginationConf.totalItems = 50;
$scope.getAnalyseLog = function(){ $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; $scope.analyseLog = data;
console.log($scope.analyseLog) 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']) ...@@ -79,6 +79,26 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http'])
localStorageService.set('loginData', resp.data.user); localStorageService.set('loginData', resp.data.user);
$rootScope.menuList = $rootScope.loginData.roleList[0].permissions; $rootScope.menuList = $rootScope.loginData.roleList[0].permissions;
console.log($scope.menuList) 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) whereToGo($rootScope.loginData.roleList[0].process)
if(userAgent.indexOf('.NET')!=-1){ if(userAgent.indexOf('.NET')!=-1){
window.location.reload(); window.location.reload();
......
...@@ -41,10 +41,13 @@ angular.module('AvatarCheck.packageLog', ['ngRoute', 'AvatarCheck.http', 'tm.pag ...@@ -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){ HttpService.selectPackageLog($scope.newPackageName,$scope.idCard,$('#datepicker').val(),$scope.county,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.packageLogData = 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