Commit f64f055d authored by dahai's avatar dahai

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

parents c0327450 752fd9b0
......@@ -17,15 +17,6 @@ import java.util.Map;
public class LogApi {
@Autowired
private LogService logService;
@RequestMapping("createAnalysisLog")
public boolean createAnalysisLog(HttpServletResponse response) {
return true;
}
/**
* 查询新包生成日志
* @param newFileName 新文件名
......@@ -70,13 +61,50 @@ public class LogApi {
* @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));
List<Map<String,Object>> resultList = logService.selectAnalysisLog(fileName,replaceDate(analysisTime),Long.valueOf(currPage),Long.valueOf(pageSize));
return resultList;
}
/**
* 查询解析日志总数
* @param fileName
* @param analysisTime
* @return
*/
@RequestMapping("selectAnalysisLogCount")
public String selectAnalysisLogCount (@RequestParam("fileName")String fileName,@RequestParam("analysisTime")String analysisTime){
String total = logService.selectAnalysisLogCount(fileName,replaceDate(analysisTime));
return total;
}
/**
* 根据导入时间查询解析数据
* @param uploadName
* @return
*/
@RequestMapping("selectAnalysisData")
public List<Map<String,Object>> selectAnalysisData(@RequestParam("uploadName")String uploadName){
List<Map<String,Object>> resultList = logService.selectAnalysisData(replaceDate(uploadName));
return resultList;
}
/**
* 解析
* @param printDate
* @param latticeMouthInformation
* @return
*/
@RequestMapping("analysis")
@Transactional(rollbackFor = Exception.class)
public boolean analysis(@RequestParam("printDate")String printDate,@RequestParam("latticeMouthInformation")String latticeMouthInformation){
logService.changeCardType(replaceDate(printDate),latticeMouthInformation);
logService.insertAnalysisDate(replaceDate(printDate),latticeMouthInformation);
return true;
}
/**
* 去除字符串中中线
......
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 org.apache.ibatis.annotations.*;
import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
......@@ -14,6 +13,34 @@ public interface LogMapper {
@Select("select distinct FILES.UPLOAD_DATE,PERSON_POST.LATTICE_MOUTH_INFORMATION,FILES.RECORD_NUMBER,FILE_NAME_DIC.FORM_START_TIME,FILE_NAME_DIC.FORM_DEADLINE\n" +
"from PREPRO_PERSON \n" +
"left join FILES on PREPRO_PERSON.FILE_ID =FILES.ID\n" +
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID\n" +
"where FILES.CREATE_TIME = #{uploadDate}" +
"AND FILE_NAME_DIC.STATE=0")
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate);
@Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" +
"WHERE JMSFZSLH = (\n" +
"SELECT PREPRO_PERSON.JMSFZSLH \n" +
"FROM PREPRO_PERSON \n" +
"LEFT JOIN PERSON_POST ON PERSON_POST.FIRST_WHITE = PREPRO_PERSON.JMSFZSLH\n" +
"WHERE PERSON_POST.PRINT_DATE =#{printDate} AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation}\n" +
")")
public boolean changeCardType(@Param("printDate")String printDate,@Param("latticeMouthInformation")String latticeMouthInformation);
@Insert("INSERT INTO FILE_NAME_DIC ( FILE_NAME_DIC.ANALYSIS_DATE\n" +
") SELECT FILE_NAME_DIC.ANALYSIS_DATE \n" +
"FROM FILE_NAME_DIC\n" +
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID = PERSON_POST.FILE_ID\n" +
"WHERE PERSON_POST.PRINT_DATE=#{printDate} AND PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} ")
public boolean insertAnalysisDate(@Param("printDate")String printDate,@Param("latticeMouthInformation")String latticeMouthInformation);
@Select("<script> " +
"SELECT * FROM " +
......@@ -93,4 +120,22 @@ public interface LogMapper {
"</script>")
public String selectNewFileLogCount(@Param("newFileName") String newFileName, @Param("cardId") String cardId, @Param("createDate") String createDate,@Param("uploadCountyCode") String uploadCountyName);
@Select("<script> " +
"SELECT COUNT(*) FROM FILE_NAME_DIC \n" +
"LEFT JOIN PERSON_POST ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
"LEFT JOIN FILES ON FILES.ID=FILE_NAME_DIC.FILE_ID " +
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = person_post.FIRST_WHITE " +
" where 1=1 " +
" <if test='fileName !=\"\"' >" +
" and NEW_FILES.NEW_FILE_NAME=#{fileName} " +
" </if>" +
" <if test='analysisTime != -1' >" +
" and NEW_FILES.DWDM=#{analysisTime}" +
" </if>" +
"group by FILE_NAME_DIC.FILE_NAME, FILE_NAME_DIC.FORM_START_TIME, " +
"FILE_NAME_DIC.FORM_DEADLINE, PERSON_POST.LATTICE_MOUTH_INFORMATION, " +
"FILE_NAME_DIC.ANALYSIS_DATE, FILES.RECORD_NUMBER" +
"</script>")
public String selectAnalysisLogCount(@Param("fileName")String fileName, @Param("analysisTime")String analysisTime);
}
......@@ -14,6 +14,13 @@ public interface LogService {
public List<Map<String,Object>> selectAnalysisLog(String fileName,String analysisDate,long currPage,long pageSize);
public String selectAnalysisLogCount(String fileName,String analysisDate);
public List<CountyDicEntity> getCountyList();
public List<Map<String,Object>> selectAnalysisData(String uploadDate);
public boolean changeCardType(String printDate,String latticeMouthInformation);
public boolean insertAnalysisDate(String printDate,String latticeMouthInformation);
}
......@@ -31,9 +31,32 @@ public class LogServiceImpl implements LogService {
return resultList;
}
@Override
public String selectAnalysisLogCount(String fileName, String analysisDate) {
String count= logMapper.selectAnalysisLogCount(fileName,analysisDate);
return count;
}
@Override
public List<CountyDicEntity> getCountyList() {
return logMapper.getCountyListData();
}
@Override
public List<Map<String, Object>> selectAnalysisData(String uploadDate) {
return logMapper.selectAnalysisData(uploadDate);
}
@Override
public boolean changeCardType(String printDate, String latticeMouthInformation) {
logMapper.changeCardType(printDate,latticeMouthInformation);
return true;
}
@Override
public boolean insertAnalysisDate(String printDate, String latticeMouthInformation) {
logMapper.insertAnalysisDate(printDate,latticeMouthInformation);
return true;
}
}
<style>
.table th, .table td {
text-align: center;
vertical-align: middle!important;
}
.ul li{
cursor: pointer;
}
.page-list .pagination {float:left;}
.page-list .pagination span {cursor: pointer;}
.page-list .pagination .separate span{cursor: default; border-top:none;border-bottom:none;}
.page-list .pagination .separate span:hover {background: none;}
.page-list .page-total {float:left; margin: 25px 20px;}
.page-list .page-total input, .page-list .page-total select{height: 26px; border: 1px solid #ddd;}
.page-list .page-total input {width: 40px; padding-left:3px;}
.page-list .page-total select {width: 50px;}
.page-list:after {
display: block;
clear: both;
content: ""
}
.page-list{
zoom: 1
}
</style>
<div class="ui-dialog-title">
组号详情
</div>
......@@ -6,6 +31,7 @@
<table class="table" style="border-color: black;">
<thead>
<tr>
<th><input type="checkbox"></th>
<th>组号</th>
<th>合格数量</th>
<th>不合格数量</th>
......@@ -17,6 +43,7 @@
</thead>
<tbody>
<tr ng-repeat="groups in policeList">
<td><input type="checkbox"></td>
<td>{{groups.GROUP_NO}}</td>
<td>{{groups.VALID_COUNT}}</td>
<td>{{groups.INVALID_COUNT}}</td>
......@@ -30,4 +57,7 @@
</tr>
</tbody>
</table>
<div style="padding-left: 27%;">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
</div>
\ No newline at end of file
......@@ -219,6 +219,31 @@ angular.module('AvatarCheck', [
return permanentPositionDate;
}
}
})
;
}).filter('myDate2StringFilter', function() { //可以注入依赖
return function Format(datetime,fmt) {
if (parseInt(datetime)==datetime) {
if (datetime.length==10) {
datetime=parseInt(datetime)*1000;
} else if(datetime.length==13) {
datetime=parseInt(datetime);
}
}
datetime=new Date(datetime);
var o = {
"M+" : datetime.getMonth()+1, //月份
"d+" : datetime.getDate(), //日
"h+" : datetime.getHours(), //小时
"m+" : datetime.getMinutes(), //分
"s+" : datetime.getSeconds(), //秒
"q+" : Math.floor((datetime.getMonth()+3)/3), //季度
"S" : datetime.getMilliseconds() //毫秒
};
if(/(y+)/.test(fmt))
fmt=fmt.replace(RegExp.$1, (datetime.getFullYear()+"").substr(4 - RegExp.$1.length));
for(var k in o)
if(new RegExp("("+ k +")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
return fmt;
}
});
......@@ -404,6 +404,33 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
console.log(response.data)
success(response.data)
})
},
getGroupListData:function(saveDate,countyCode,typeCode,currPage,pageSize,success){
$http({
method: 'GET',
url: "../TaskList/queryByGroupNoAtACCU"+urlTimeStamp(),
params:{
date:saveDate,
typeCode:typeCode,
countyCode:countyCode,
currPage:currPage,
pageSize:pageSize
}
}).then(function successCallback(response) {
console.log(response.data)
success(response.data)
})
},
createTask:function(data,success){
var body = JSON.stringify(data);
$http({
method: 'POST',
url: "../TaskList/createTask",
data: body,
headers: {'Content-Type': 'application/json'}
}).then(function successCallback(response) {
success(response.data)
})
}
}
});
\ No newline at end of file
<style>
.table th, .table td {
text-align: center;
vertical-align: middle!important;
}
.ul li{
cursor: pointer;
}
.page-list .pagination {float:left;}
.page-list .pagination span {cursor: pointer;}
.page-list .pagination .separate span{cursor: default; border-top:none;border-bottom:none;}
.page-list .pagination .separate span:hover {background: none;}
.page-list .page-total {float:left; margin: 25px 20px;}
.page-list .page-total input, .page-list .page-total select{height: 26px; border: 1px solid #ddd;}
.page-list .page-total input {width: 40px; padding-left:3px;}
.page-list .page-total select {width: 50px;}
.page-list:after {
display: block;
clear: both;
content: ""
}
.page-list{
zoom: 1
}
</style>
<div class="content row">
<div class="col-md-12" style="margin-top:20px;">
<div class="row">
......@@ -17,48 +43,52 @@
<div class="box-body">
<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>
<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>
<table class="table table-hover">
<thead>
<tr>
<th><input type="checkbox" ng-click="selectAll(type.countyList,$event)" ng-checked="isSelectedAll($index)"></th>
<th>保存日期</th>
<th>地区</th>
<th>组数</th>
<th>受理组号</th>
<th>合格数量</th>
<th>不合格数量</th>
<th></th>
</tr>
</thead>
<tbody ng-repeat="task in type.countyList">
<tr>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.valid}}" ng-click="updateSelection($event,task)"></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.countyCode,type.typeCode)">组号列表</a></td>
</tr>
</tbody>
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<button class="btn btn-primary" ng-click="createTaskList(type.typeCode)">创建任务单</button>
<button class="btn btn-primary">下发任务单</button>
</div>
</div>
</tbody>
</table>
<!-- /.table -->
</div>
</div>
<div ng-if="cycleSheetData.length==0">
<h4>暂无数据</h4>
......@@ -66,10 +96,7 @@
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
<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>
</div>
<!-- /. box -->
</div>
......
......@@ -20,6 +20,8 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
autoclose: 1
});
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
......@@ -52,17 +54,110 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.currentTab = index;
}
$scope.getPoliceList = function(groupList){
$scope.getPoliceList = function(countyCode,typeCode){
ngDialog.open({
template: 'dialogs/policeList.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', function ($scope) {
$scope.policeList =groupList;
controller: ['$scope', 'HttpService',function ($scope,HttpService) {
console.log($('#datepicker').val(),countyCode,typeCode);
$scope.paginationConf = {
currentPage: 1,
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
};
var getGroupInfoList = function () {
HttpService.getGroupListData($('#datepicker').val(),countyCode,typeCode,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.paginationConf.totalItems = data.count;
$scope.policeList =data.groupList;
})
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', getGroupInfoList);
}]
});
}
//创建变量用来保存选中结果
$scope.selected = [];
var updateSelected = function (action, task) {
if (action === 'add' && $scope.selected.indexOf(task) === -1) {
$scope.selected.push(task);
}
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
var temp = 0;
$rootScope.cardsTotal = 0;
$scope.updateSelection = function ($event, task) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task);
var sum = 0;
var checks = document.getElementsByClassName("checkOneBox");
for (var i=0;i<checks.length;i++){
if (checks[i].checked) {
sum += parseInt(checks[i].value);
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum - temp;
temp = sum;
};
//全选操作
$scope.selectAll = function (task,$event) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
for (var i = 0; i < task.length; i++) {
var contact = task[i];
updateSelected(action, contact);
}
if(checkbox.checked){
var sum = 0;
var checks = document.getElementsByClassName("checkOneBox");
for (var i = 0; i < checks.length; i++) {
sum += parseInt(checks[i].value);
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum - temp;
temp = sum;
}else{
$rootScope.cardsTotal =0;
temp = 0;
}
};
$scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0;
};
$scope.isSelectedAll = function (index) {
return $scope.selected.length === $scope.cycleSheetData[index].countyList.length > 0;
};
$scope.createTaskList = function(typeCode){
var arr = [];
for (var i=0;i<$scope.selected.length;i++){
var json = {
countyCode:$scope.selected[i].countyCode,
typeCode:typeCode
}
arr.push(json);
}
var groupList = [];
var map = {
date:$('#datepicker').val(),
name:$rootScope.loginData.name,
countyList:arr,
groupList:groupList
}
HttpService.createTask(map,function(data){
console.log(data);
})
}
});
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