Commit 822cd78e authored by dahai's avatar dahai

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

parents a1349869 b9605950
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.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("LogApi")
public class LogApi {
@Autowired
private LogService logService;
@RequestMapping("createAnalysisLog")
public boolean createAnalysisLog(HttpServletResponse response) {
return true;
}
/**
* 查询新包生成日志
* @param newFileName 新文件名
* @param cardId 身份证号
* @param createDate 生成时间
* @param uploadCountyCode 上传地区
* @param currPage 页数
* @param pageSize 行数
* @return
*/
@RequestMapping("selectNewFilesLog")
public List<Map<String,Object>> selectNewFilesLog (@RequestParam("newFileName")String newFileName, @RequestParam("cardId")String cardId, @RequestParam("createDate")String createDate, @RequestParam("uploadCountyCode")String uploadCountyCode, @RequestParam("currPage")String currPage, @RequestParam("pageSize")String pageSize){
List<Map<String,Object>> result = logService.selectNewFilesLog(newFileName,cardId,createDate,uploadCountyCode, Long.valueOf(currPage),Long.valueOf(pageSize));
return result;
}
@RequestMapping("selectCountyList")
public List<CountyDicEntity> selectCountyList(){
List<CountyDicEntity> list = logService.getCountyList();
return list;
}
}
......@@ -202,9 +202,11 @@ public class ReadExcelApi {
@RequestMapping("deleteByFileId")
public String deleteFileById(@RequestParam("fileId")String fileId){
public Map<String,String> deleteFileById(@RequestParam("fileId")String fileId){
fileNameDicService.deleteFileByFileId(fileId);
return "删除成功";
Map<String,String> map = new HashMap<>();
map.put("msg","删除成功");
return map;
}
private String replaceDate(String str){
......
package com.yxproject.start.mapper;
import com.yxproject.start.entity.CountyDicEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
@Mapper
public interface LogMapper {
@Insert("")
public boolean insertAnalysisLog();
@Select("")
public List<Map<String,Object>> selectAnalysisLog(String fileName,String analysisDate);
@Select("<script> " +
"SELECT * FROM " +
" ( " +
" SELECT A.*, ROWNUM RN " +
" FROM (SELECT NEW_FILE_NAME,CREATE_DATE,RECORD_NUMBER,DWDM,DWMC FROM NEW_FILES " +
" LEFT JOIN PREPRO_PERSON ON NEW_FILES.ID = PREPRO_PERSON.NEW_FILE_ID" +
" where 1=1 " +
" <if test='newFileName !=\"\"' >" +
" and NEW_FILES.NEW_FILE_NAME=#{newFileName} " +
" </if>" +
" <if test='uploadCountyCode != -1' >" +
" and NEW_FILES.DWDM=#{uploadCountyCode}" +
" </if>" +
" <if test='createDate !=\"\"' >" +
" and substr(NEW_FILES.CREATE_DATE,0,8)=#{createDate}" +
" </if>" +
" <if test='cardId !=\"\"' >" +
" and PREPRO_PERSON.GMSFHM=#{cardId} " +
" </if>" +
" ) " +
" A" +
" )" +
" WHERE RN BETWEEN #{end} AND #{begin}" +
"</script>")
public List<Map<String,Object>> selectNewFilesLog(@Param("newFileName") String newFileName, @Param("cardId") String cardId, @Param("createDate") String createDate,@Param("uploadCountyCode") String uploadCountyName, @Param("begin") long begin, @Param("end") long end);
@Select("select * from COUNTY_DIC")
public List<CountyDicEntity> getCountyListData();
}
package com.yxproject.start.service;
import com.yxproject.start.entity.CountyDicEntity;
import java.util.List;
import java.util.Map;
public interface LogService {
public List<Map<String,Object>> selectNewFilesLog(String newFileName,String cardId,String createDate,String uploadCountyCode,long currPage,long pageSize);
public List<CountyDicEntity> getCountyList();
}
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.CountyDicEntity;
import com.yxproject.start.mapper.LogMapper;
import com.yxproject.start.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class LogServiceImpl implements LogService {
@Autowired
private LogMapper logMapper;
@Override
public List<Map<String, Object>> selectNewFilesLog(String newFileName, String cardId, String createDate, String uploadCountyCode, long currPage, long pageSize) {
List<Map<String, Object>> resultMap= logMapper.selectNewFilesLog(newFileName,cardId,createDate,uploadCountyCode,currPage * pageSize, (currPage - 1) * pageSize + 1);
return resultMap;
}
@Override
public List<CountyDicEntity> getCountyList() {
return logMapper.getCountyListData();
}
}
<div class="ui-dialog-title">
派出所数量详情
组号详情
</div>
<div class="ui-dialog-content">
<table class="table table-responsive" style="border-color: black;">
<table class="table" style="border-color: black;">
<thead>
<tr>
<th>派出所名称</th>
<th>数据核验数量</th>
<th>打印卸载数量</th>
<th>质检数量</th>
<th>废证数量</th>
<th>组号</th>
<th>合格数量</th>
<th>不合格数量</th>
<th>组状态</th>
<th>核验提交时间</th>
<th>核验人</th>
<th>装库日期</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in policeList">
<td>{{item.policeName}}</td>
<td>{{item.dataCheckCount}}</td>
<td>{{item.printCount}}</td>
<td>{{item.qualityCheckCount}}</td>
<td>{{item.failedCount}}</td>
<tr ng-repeat="groups in policeList">
<td>{{groups.GROUP_NO}}</td>
<td>{{groups.VALID_COUNT}}</td>
<td>{{groups.INVALID_COUNT}}</td>
<td ng-if="groups.DEAL_FLAG==0">未处理</td>
<td ng-if="groups.DEAL_FLAG==1||groups.DEAL_FLAG==2">处理中</td>
<td ng-if="groups.DEAL_FLAG==3">可以转出</td>
<td>{{groups.SUBMIT_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{groups.SUBMIT_CODE}}</td>
<td>{{groups.IMPORT_TIME | date:'yyyy-MM-dd'}}</td>
</tr>
</tbody>
</table>
......
......@@ -113,85 +113,6 @@
<!--导航右边-->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less-->
<li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-success">4</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 4 messages</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- start message -->
<a href="#">
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li><!-- start message -->
<a href="#">
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li><!-- start message -->
<a href="#">
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li><!-- start message -->
<a href="#">
<p>Why not buy a new awesome theme?</p>
</a>
</li>
</ul>
</li>
<li class="footer"><a href="#">See All Messages</a></li>
</ul>
</li>
<!-- Notifications: style can be found in dropdown.less -->
<li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-warning">10</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 10 notifications</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li>
<a href="#">
<i class="fa fa-users text-aqua"></i> 5 new members joined today
</a>
</li>
<li>
<a href="#">
<i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
page and may cause design problems
</a>
</li>
<li>
<a href="#">
<i class="fa fa-users text-red"></i> 5 new members joined
</a>
</li>
<li>
<a href="#">
<i class="fa fa-shopping-cart text-green"></i> 25 sales made
</a>
</li>
<li>
<a href="#">
<i class="fa fa-user text-red"></i> You changed your username
</a>
</li>
</ul>
</li>
<li class="footer"><a href="#">View all</a></li>
</ul>
</li>
<li class="dropdown user">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-user"></i>
......
......@@ -83,7 +83,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
getCountyListData: function (success) {
$http({
method: 'GET',
url: "../api/idCard/districts" + urlTimeStamp()
url: "../LogApi/selectCountyList" + urlTimeStamp()
}).then(function successCallback(response) {
success(response.data)
})
......@@ -297,15 +297,28 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
selectPackageLog:function(newPackageName,idCard,date,county,success){
// selectPackageLogCount:
selectPackageLog:function(newPackageName,idCard,date,county,currentPage,itemsPerPage,success){
if(angular.isUndefined(newPackageName)){
newPackageName='';
}
if(angular.isUndefined(idCard)){
idCard='';
}
if(angular.isUndefined(county)){
county = -1;
}
console.log(newPackageName,idCard,date,county)
$http({
method: 'GET',
url: "../CreatePackageApi/selectPackageData"+urlTimeStamp(),
url: "../LogApi/selectNewFilesLog"+urlTimeStamp(),
params:{
newPackageName:newPackageName,
idCard:idCard,
newFileName:newPackageName,
cardId:idCard,
createDate:date,
readCounty:county
uploadCountyCode:county,
currPage:currentPage,
pageSize:itemsPerPage
}
}).then(function successCallback(response) {
success(response.data)
......@@ -323,6 +336,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
})
},
deleteByFileId:function(fileId,success){
console.log(fileId)
$http({
method: 'GET',
url: "../ReadExcel/deleteByFileId"+urlTimeStamp(),
......@@ -330,6 +344,21 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
fileId:fileId
}
}).then(function successCallback(response) {
console.log(response.data)
success(response.data)
})
},
getTaskListToCreate:function(date,success){
console.log($rootScope.loginData.roleList[0].process,date)
$http({
method: 'GET',
url: "../TaskList/queryByCountyAtACCU"+urlTimeStamp(),
params:{
process:$rootScope.loginData.roleList[0].process,
date:date
}
}).then(function successCallback(response) {
console.log(response.data)
success(response.data)
})
}
......
......@@ -15,53 +15,58 @@
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;">
<ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat="tab in cycleSheetData track by $index">
<a ng-click="func($index,tab.typeCode)">
<ul style="margin: 0;padding: 0;">
<li style="font-size: 16px;">{{tab.typeName}}</li>
<li style="text-align: center;">{{tab.typeSum}}</li>
</ul>
</a>
</li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
<table class="table table-hover table-striped">
<thead>
<tr>
<th><input type="checkbox"></th>
<th>保存日期</th>
<th>地区</th>
<th>组数</th>
<th>受理组号</th>
<th>合格数量</th>
<th>不合格数量</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="task in type.countyList">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td class="mailbox-star"><b>{{task.saveDate}}</b></td>
<td class="mailbox-name"><a>{{task.county}}</a></td>
<td class="mailbox-subject">{{task.groupCount}}</td>
<td class="mailbox-subject">{{task.groupNo}}</td>
<td class="mailbox-attachment">{{task.valid}}</td>
<td class="mailbox-date">{{task.invalid}}</td>
<td class="mailbox-date"><a ng-click="getPoliceList(task.taskId)">派出所列表</a></td>
</tr>
<div ng-if="cycleSheetData.length>0">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;">
<ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat="tab in cycleSheetData track by $index">
<a ng-click="func($index,tab.typeCode)">
<ul style="margin: 0;padding: 0;">
<li style="font-size: 16px;">{{tab.typeName}}</li>
<li style="text-align: center;">{{tab.typeSum}}</li>
</ul>
</a>
</li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
<table class="table table-hover table-striped">
<thead>
<tr>
<th><input type="checkbox"></th>
<th>保存日期</th>
<th>地区</th>
<th>组数</th>
<th>受理组号</th>
<th>合格数量</th>
<th>不合格数量</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="task in type.countyList">
<td><input type="checkbox" class="icheckbox_flat-blue"></td>
<td class="mailbox-star"><b>{{task.saveDate | date:'yyyy-MM-dd'}}</b></td>
<td class="mailbox-name"><a>{{task.countyName}}</a></td>
<td class="mailbox-subject">{{task.groupCount}}</td>
<td class="mailbox-subject">{{task.groupNum}}</td>
<td class="mailbox-attachment">{{task.countyValidCount}}</td>
<td class="mailbox-date">{{task.countyInvalidCount}}</td>
<td class="mailbox-date"><a ng-click="getPoliceList(task.groupList)">组号列表</a></td>
</tr>
</tbody>
</table>
<!-- /.table -->
</div>
</tbody>
</table>
<!-- /.table -->
</div>
</div>
<div ng-if="cycleSheetData.length==0">
<h4>暂无数据</h4>
</div>
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
<div class="box-footer" style="text-align: right;">
<div class="box-footer" style="text-align: right;" ng-if="cycleSheetData.length>0">
<button class="btn btn-primary">创建任务单</button>
<button class="btn btn-primary">下发任务单</button>
</div>
......
......@@ -22,64 +22,24 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.cycleSheetData = [
{
typeCode: '1',
typeName: '普通证',
typeSum: 300,
isActive: 'true',
countyList: [
{
saveDate: '20190228',
county: '朝阳区',
groupCount:5,
groupNo: '00234653-03687587',
valid: 240,
invalid: 0
},
{
saveDate: '20190228',
county: '海淀区',
groupCount:6,
groupNo: '00234653-03687588',
valid: 280,
invalid: 2
},
{
saveDate: '20190228',
county: '海淀区',
groupCount:6,
groupNo: '00234653-03687588',
valid: 280,
invalid: 2
}
]
},
{
typeCode: '9',
typeName: '邮寄证',
typeSum: 500,
isActive: 'false',
countyList: [
{
saveDate: '20190228',
county: '朝阳区',
groupCount:5,
groupNo: '00234653-03687587',
valid: 240,
invalid: 0
},
{
saveDate: '20190228',
county: '海淀区',
groupCount:6,
groupNo: '00234653-03687588',
valid: 280,
invalid: 2
$scope.searchCurrent = function(){
HttpService.getTaskListToCreate($('#datepicker').val(),function(data){
$scope.cycleSheetData = data;
for(var i=0;i<$scope.cycleSheetData.length;i++){
if(i==$scope.currentTab){
$scope.cycleSheetData[i].isActive=true;
}else{
$scope.cycleSheetData[i].isActive=false;
}
]
}
]
}
console.log($scope.cycleSheetData)
})
}
$scope.searchCurrent();
$scope.currentTab = 0;
$scope.func = function (index) {
for (var idx in $scope.cycleSheetData) {
......@@ -92,27 +52,14 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.currentTab = index;
}
$scope.getPoliceList = function(taskId){
$scope.getPoliceList = function(groupList){
ngDialog.open({
template: 'dialogs/policeList.html' + urlTimeStamp(),
width: 600,
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', function ($scope) {
$scope.policeList = [
{
policeName:'东城派出所',
dataCheckCount:100,
printCount:0,
qualityCheckCount:0
},
{
policeName:'西城派出所',
dataCheckCount:200,
printCount:0,
qualityCheckCount:0
},
]
$scope.policeList =groupList;
}]
});
}
......
......@@ -57,7 +57,9 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
fd.append('file', files[i]);
}
HttpService.uploadExcelFile($("#datepicker1").val(),$("#datepicker2").val(),fd,function (data) {
console.log("导入项目的返回结果:",data)
if(data){
MessageService.showAlert("上传成功")
}
})
}
}
......@@ -68,9 +70,7 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
perPageOptions: [5 ,10 ,15 ,20 ,25]
};
var date = $("#datepicker3").val();
$scope.getPostPackage = function(){
console.log($scope.fileName,$scope.state,$("#datepicker3").val())
HttpService.selectPostPackageCount($scope.fileName,$scope.state,$("#datepicker3").val(),function (data) {
$scope.paginationConf.totalItems = data.respData.string;
console.log($scope.paginationConf.totalItems)
......@@ -81,6 +81,7 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
})
}
var reGetPostData = $scope.getPostPackage;
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.getPostPackage);
......@@ -92,13 +93,12 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
closeByDocument:false,
controller: ['$scope', function ($scope) {
$scope.total = 1;
$scope.importDate = $filter('date')(importDate, 'yyyy-MM-dd');;
$scope.importDate = $filter('myDateFilter')(importDate, 'yyyy-MM-dd');;
$scope.confirmDelete = function () {
HttpService.deleteByFileId(fileid, function (data) {
console.log(data)
$scope.getPostPackage(date)
MessageService.showAlert(data.msg);
$scope.closeThisDialog();
MessageService.showAlert(data);
reGetPostData();
})
};
......
......@@ -57,7 +57,9 @@
</td>
<td>上传地区:</td>
<td>
<input type="text" class="form-control" placeholder="上传地区名称" ng-model="county"/>
<select class="form-control select2" id="print" ng-model="county">
<option ng-repeat="item in countyList" value="item.countycode">{{item.countyname}}</option>
</select>
</td>
<td><button class="btn btn-primary" ng-click="getPackageLog()">查询</button></td>
</tr>
......
......@@ -12,6 +12,10 @@ angular.module('AvatarCheck.packageLog', ['ngRoute', 'AvatarCheck.http', 'tm.pag
.controller('packageLogCtrl', function ($scope, $rootScope, HttpService, $interval, MessageService, $timeout, $filter, ngDialog) {
HttpService.getCountyListData(function(data) {
$scope.countyList = data;
console.log($scope.countyList)
})
//Date picker
$('#datepicker').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
......@@ -28,15 +32,20 @@ angular.module('AvatarCheck.packageLog', ['ngRoute', 'AvatarCheck.http', 'tm.pag
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
};
$scope.paginationConf.totalItems = 50;
$scope.getPackageLog = function(){
HttpService.selectPackageLog($scope.newPackageName,$scope.idCard,$('#datepicker').val(),$scope.county,function(data){
HttpService.selectPackageLogCount($scope.newPackageName,$scope.idCard,$('#datepicker').val(),$scope.county,function (data) {
$scope.paginationConf.totalItems = data.totalCount;
console.log($scope.paginationConf.totalItems)
})
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,"?")
})
}
});
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