Commit 0bca0294 authored by dahai's avatar dahai

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

parents de851599 dc184f4e
......@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.xml.crypto.Data;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -94,7 +96,6 @@ public class LogApi {
@RequestMapping("selectAnalysisData")
public List<Map<String,Object>> selectAnalysisData(@RequestParam("uploadDate")String uploadDate){
List<Map<String,Object>> resultList = logService.selectAnalysisData(replaceDate(uploadDate));
return resultList;
}
......@@ -110,6 +111,23 @@ public class LogApi {
logService.changeCardType(printDate,fileId);
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
logService.insertAnalysisDate(df.format(new Date()),fileId);
//查询XML文件信息
List<Map<String,Object>> resultList = logService.selectFileIdByUploadDate(printDate);
System.out.println("00000000000000000000"+resultList.toString());
//查询Excel文件信息
Map<String, Object> resultMap = logService.selectFileNameDic(fileId);
List<Map<String,Object>> result = new ArrayList<>();
for (int i=0; i<resultList.size();i++){
String fileName=(BigDecimal)(resultList.get(i).get("ID"))+"";
//查询证件类型计数
Map<String,Object>countMap= logService.selectCountByCardType( (BigDecimal)(resultList.get(i).get("ID"))+"");
resultMap.put("fileName",fileName);
resultMap.put("commonCount",countMap.get("PUSUM"));
resultMap.put("postCount",countMap.get("YOUSUM"));
result.add(resultMap);
logService.insertIntoAnalysis(fileId,fileName,String.valueOf(countMap.get("PUSUM")),String.valueOf(countMap.get("YOUSUM")));
}
return true;
}
......
......@@ -343,11 +343,7 @@ public class TaskListApi {
specialCardEntity.setTaskId(taskEntity.getTaskId());
specialCardService.saveSpecialCard(specialCardEntity);
}
}
}
Map<String,Object> map = new LinkedHashMap<>();
map.put("msg","成功添加快证任务单");
......
......@@ -12,7 +12,6 @@ import java.util.Map;
public interface LogMapper {
@Select("select file_name_dic.upload_date,file_name_dic.FILE_NAME,file_name_dic.FILE_ID,count(*) as count,\n" +
"file_name_dic.FORM_START_TIME,file_name_dic.FORM_DEADLINE\n" +
"from file_name_dic \n" +
......@@ -22,6 +21,7 @@ public interface LogMapper {
public List<Map<String,Object>> selectAnalysisData(@Param("uploadDate") String uploadDate);
//TODO XML的时间+post的file_id
@Update("UPDATE PREPRO_PERSON SET CARD_TYPE_ID =9 \n" +
"WHERE JMSFZSLH in (\n" +
......@@ -37,6 +37,9 @@ public interface LogMapper {
@Update(" update FILE_NAME_DIC set FILE_NAME_DIC.ANALYSIS_DATE = to_date(#{printDate},'yyyy-mm-dd hh24:mi:ss') where file_id=#{fileId} ")
public boolean insertAnalysisDate(@Param("printDate")String printDate,@Param("fileId")String fileId);
@Insert("INSERT INTO ANALYSIS (FILE_DIC_ID,FILE_ID,COMMON_CARD_COUNT,POST_CARD_COUNT) VALUES (#{fileDic},#{fileId},#{commonCardCount},#{postCardCount})")
public boolean insertIntoAnalysis(@Param("fileDic")String fileDic,@Param("fileId")String fileId,@Param("commonCardCount")String commonCardCount,@Param("postCardCount")String postCardCount);
@Select("<script> " +
"SELECT * FROM " +
......@@ -143,6 +146,19 @@ public interface LogMapper {
@Delete("delete from files where id=#{id}")
public boolean deleteFile(@Param("id")String id);
@Select("select SOURCE_FILE_NAME,id,RECORD_NUMBER from files where to_char(UPLOAD_DATE,'yyyy-mm-dd hh24:mi:ss')=#{uploadDate}")
public List<Map<String,Object>> selectFileIdByUploadDate(@Param("uploadDate")String uploadDate);
@Select("select FORM_START_TIME,FORM_DEADLINE,FILE_NAME,ANALYSIS_DATE from FILE_NAME_DIC where FILE_ID=#{fileId}")
public Map<String,Object> selectFileNameDic(@Param("fileId")String fileId);
@Select("select sum(pu) pusum,sum(you) yousum from (select decode(CARD_TYPE_ID,0,l,0) pu,decode(CARD_TYPE_ID,9,l,0) you from (select count(CARD_TYPE_ID) as l,CARD_TYPE_ID from PREPRO_PERSON where file_id =#{fileId} group by CARD_TYPE_ID))\n ")
public Map<String,Object> selectCountByCardType(@Param("fileId")String fileId);
......
......@@ -30,4 +30,12 @@ public interface LogService {
public boolean deleteFile(@Param("id")String id);
public List<String> selectId(@Param("uploadTime")String uploadTime);
public boolean insertIntoAnalysis(@Param("fileDic")String fileDic,@Param("fileId")String fileId,@Param("commonCardCount")String commonCardCount,@Param("postCardCount")String postCardCount);
public List<Map<String,Object>> selectFileIdByUploadDate(@Param("uploadDate")String uploadDate);
public Map<String,Object> selectFileNameDic(@Param("fileId")String fileId);
public Map<String,Object> selectCountByCardType(@Param("fileId")String fileName);
}
......@@ -43,7 +43,6 @@ public class ImportXmlServiceImpl implements ImportXmlService {
@Override
public List<CountDataEntity> queryPersonXml(String importDate, long maxNum, long minNum) {
return filesMapper.selectFiles(importDate,maxNum,minNum);
// return null;
}
@Override
......
......@@ -3,6 +3,7 @@ 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 com.yxproject.start.service.SelectSerialNumberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -79,4 +80,28 @@ public class LogServiceImpl implements LogService {
List<String> id= logMapper.selectId(uploadTime);
return id;
}
@Override
public boolean insertIntoAnalysis(String fileDic, String fileId, String commonCardCount, String postCardCount) {
logMapper.insertIntoAnalysis(fileDic,fileId,commonCardCount,postCardCount);
return true;
}
@Override
public List<Map<String,Object>> selectFileIdByUploadDate(String uploadDate) {
List<Map<String,Object>> result= logMapper.selectFileIdByUploadDate(uploadDate);
return result;
}
@Override
public Map<String, Object> selectFileNameDic(String fileId) {
Map<String, Object> resultMap = logMapper.selectFileNameDic(fileId);
return resultMap;
}
@Override
public Map<String, Object> selectCountByCardType(String fileName) {
Map<String,Object> result= logMapper.selectCountByCardType(fileName);
return result;
}
}
......@@ -28,7 +28,7 @@
<table class="table" style="border-color: black;">
<thead>
<tr>
<th><input type="checkbox" ng-click="selectAll(policeList,$event)" ng-checked="isSelectedAll()"></th>
<!--<th><input type="checkbox" ng-click="selectAll(policeList,$event)" ng-checked="isSelectedAll()"></th>-->
<th>组号</th>
<th>合格数量</th>
<th>不合格数量</th>
......@@ -40,7 +40,7 @@
</thead>
<tbody>
<tr ng-repeat="groups in policeList">
<td><input type="checkbox" ng-checked="isSelected(groups)" ng-click="updateSelection($event,groups)"></td>
<!--<td><input type="checkbox" ng-checked="isSelected(groups)" ng-click="updateSelection($event,groups)"></td>-->
<td>{{groups.GROUP_NO}}</td>
<td>{{groups.VALID_COUNT}}</td>
<td>{{groups.INVALID_COUNT}}</td>
......
......@@ -53,6 +53,7 @@
</ul>
</a>
</li>
<li class="pull-right" style="padding-right: 20px;"><h4>已选择数量:{{cardsTotal+groupCardsTotal}}</h4></li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -71,7 +72,7 @@
</thead>
<tbody ng-repeat="task in type.countyList| orderBy:countyCode:desc">
<tr>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.valid}}" name="{{task.countyValidCount}}" ng-click="updateSelection($event,task)"></td>
<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.groupList.length}}</td>
......@@ -84,7 +85,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h4>已选择数量:{{cardsTotal+groupCardsTotal}}</h4>
<button class="btn btn-primary" ng-click="createTaskList(type.typeCode)">创建任务单</button>
</div>
</div>
......
......@@ -27,6 +27,7 @@
</ul>
</a>
</li>
<li class="pull-right" style="padding-right: 20px;"><h5>已选择数量:{{cardsTotal}}</h5></li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -47,7 +48,7 @@
</thead>
<tbody ng-repeat="task in type.countyList| orderBy:countyCode:desc">
<tr>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.taskId}}" name="{{task.countyValidCount}}" ng-click="updateSelection($event,task)"></td>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.taskId}}" ng-click="updateSelection($event,task)"></td>
<td class="mailbox-star"><b>{{task.taskId}}</b></td>
<td class="mailbox-name"><a>{{task.countyName}}</a></td>
<td class="mailbox-subject">{{task.groupList.length}}</td>
......@@ -88,7 +89,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已下发任务量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">下发任务单</button>
</div>
</div>
......
......@@ -65,22 +65,22 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
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);
$rootScope.cardsTotal=0;
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);
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum - temp;
temp = sum;
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
//全选操作
......@@ -91,21 +91,17 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
var contact = task[i];
updateSelected(action, contact);
}
if(checkbox.checked){
$rootScope.cardsTotal=0;
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;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
$rootScope.cardsTotal =0;
temp = 0;
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
$scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0;
......
......@@ -278,12 +278,21 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
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);
$rootScope.cardsTotal=0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
//全选操作
$scope.selectAll = function (task,$event) {
......@@ -293,6 +302,16 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var contact = task[i];
updateSelected(action, contact);
}
$rootScope.cardsTotal=0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
$scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0;
......@@ -445,6 +464,16 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task);
$rootScope.cardsTotal=0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
//全选操作
$scope.selectAll = function (task,$event) {
......@@ -454,6 +483,17 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var contact = task[i];
updateSelected(action, contact);
}
$rootScope.cardsTotal=0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
$scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0;
......@@ -600,6 +640,16 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task);
$rootScope.cardsTotal = 0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
//全选操作
$scope.selectAll = function (task,$event) {
......@@ -609,6 +659,16 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var contact = task[i];
updateSelected(action, contact);
}
$rootScope.cardsTotal = 0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
$scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0;
......
......@@ -27,9 +27,7 @@
</ul>
</a>
</li>
<li style="float: right; padding-right: 30px;">
<h5>今日已转出数量:{{distributedCount}}</h5>
</li>
<li class="pull-right" style="padding-right: 20px;"><h4>已选择数量:{{cardsTotal}}</h4></li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -100,7 +98,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已转出数量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
</div>
......
......@@ -27,9 +27,7 @@
</ul>
</a>
</li>
<li style="float: right; padding-right: 30px;">
<h4>任务总数:{{total}}</h4>
</li>
<li class="pull-right" style="padding-right: 20px;"><h4>已选择数量:{{cardsTotal}}</h4></li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -94,7 +92,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已转出数量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
</div>
......
......@@ -27,8 +27,8 @@
</ul>
</a>
</li>
<li style="float: right; padding-right: 30px;">
<h4>任务总数:{{total}}</h4>
<li style="float: right; padding-right: 20px;">
<h4>任务总数:{{cardsTotal}}</h4>
</li>
</ul>
</div>
......@@ -94,7 +94,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已转出数量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
</div>
......
......@@ -25,6 +25,9 @@
</ul>
</a>
</li>
<li style="float: right; padding-right: 20px;">
<h4>任务总数:{{cardsTotal}}</h4>
</li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -99,7 +102,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已转出数量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
</div>
......
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