Commit 199f75a2 authored by dahai's avatar dahai

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

parents f8adb49b 5214116b
...@@ -24,8 +24,10 @@ import java.nio.charset.StandardCharsets; ...@@ -24,8 +24,10 @@ import java.nio.charset.StandardCharsets;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 自主选择删除个人邮寄信息 * 自主选择删除个人邮寄信息
...@@ -51,6 +53,39 @@ public class PersonPostApi { ...@@ -51,6 +53,39 @@ public class PersonPostApi {
return null; return null;
} }
/**
* 查询备注信息
* @param jsonStr
* @return
*/
@RequestMapping("selectNote")
public List<Map<String,Object>>selectNote(@RequestBody String jsonStr){
List<Map<String,Object>> resultList = new ArrayList<>();
JSONArray jsonArray = JSONArray.fromObject(jsonStr);
for (int i=0;i<jsonArray.size();i++){
Map<String,Object> resultMap=personPostService.selectNote((int)(jsonArray.get(i)));
resultList.add(resultMap);
}
return resultList;
}
/**
* 更改备注信息
* @param jsonStr
* @return
*/
@RequestMapping("addNote")
public boolean addNote(@RequestBody String jsonStr){
JSONArray jsonArray = JSONArray.fromObject(jsonStr);
for (int i=0;i<jsonArray.size();i++){
Map<String,Object> noteMap = (Map<String, Object>) jsonArray.get(i);
personPostService.addNote(noteMap.get("id").toString(),noteMap.get("note").toString());
}
return true;
}
/** /**
* 按条件查询个人邮寄信息 * 按条件查询个人邮寄信息
* @param jsonStr * @param jsonStr
......
...@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.*; ...@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.*;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
...@@ -56,6 +57,13 @@ public interface PersonPostMapper { ...@@ -56,6 +57,13 @@ public interface PersonPostMapper {
public List<PersonPostEntity> findAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,@Param("getToCounty")String getToCounty,@Param("uploadDate")String uploadDate,@Param("firstIndex")long firstIndex,@Param("pageSize")long pageSize,@Param("emailNo")String emailNo,@Param("notNull")int notNull); public List<PersonPostEntity> findAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,@Param("getToCounty")String getToCounty,@Param("uploadDate")String uploadDate,@Param("firstIndex")long firstIndex,@Param("pageSize")long pageSize,@Param("emailNo")String emailNo,@Param("notNull")int notNull);
@Select("select ID,FIRST_WHITE,APPLICANT_NAME,NOTE from person_post where ID=#{id}")
public Map<String,Object>selectNote(@Param("id")int id);
@Update("UPDATE PERSON_POST SET NOTE = #{note} where ID = #{id}")
public boolean addNote(@Param("id")String id,@Param("note")String note);
@Select("<script> " + @Select("<script> " +
"SELECT COUNT(*) FROM PERSON_POST \n" + "SELECT COUNT(*) FROM PERSON_POST \n" +
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " + " LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
......
...@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @auther zhangyusheng * @auther zhangyusheng
...@@ -42,4 +43,9 @@ public interface PersonPostService { ...@@ -42,4 +43,9 @@ public interface PersonPostService {
public int findPersonalDataCountByImportDate(String importDate); public int findPersonalDataCountByImportDate(String importDate);
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray, String uploadDate,String emailNo); public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray, String uploadDate,String emailNo);
public Map<String,Object> selectNote(@Param("id")int id);
public boolean addNote(@Param("id")String id,@Param("note")String note);
} }
...@@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @auther zhangyusheng * @auther zhangyusheng
...@@ -132,6 +133,18 @@ public class PersonPostServiceImpl implements PersonPostService { ...@@ -132,6 +133,18 @@ public class PersonPostServiceImpl implements PersonPostService {
return list; return list;
} }
@Override
public Map<String, Object> selectNote(int id) {
Map<String, Object> resultMap = personPostMapper.selectNote(id);
return resultMap;
}
@Override
public boolean addNote(String id, String note) {
personPostMapper.addNote(id, note);
return true;
}
// /** // /**
// * 查询个人邮寄信息 // * 查询个人邮寄信息
// * @param fileName 文件名 // * @param fileName 文件名
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
.ngdialog.ngdialog-theme-default { .ngdialog.ngdialog-theme-default {
padding-bottom: 160px; padding-bottom: 160px;
padding-top: 160px; padding-top: 50px;
} }
.ngdialog.ngdialog-theme-default.ngdialog-closing .ngdialog-content { .ngdialog.ngdialog-theme-default.ngdialog-closing .ngdialog-content {
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
<tr> <tr>
<td style="text-align:left;"><strong>内件性质:</strong>{{item.natureOfTheInternal}}</td> <td style="text-align:left;"><strong>内件性质:</strong>{{item.natureOfTheInternal}}</td>
<td style="text-align:left;"><strong>内件信息:</strong>{{item.natureOfTheInformation}}</td> <td style="text-align:left;"><strong>内件信息:</strong>{{item.natureOfTheInformation}}</td>
<td style="text-align:left;"><strong>备注:</strong>{{item.note}}</td>
</tr> </tr>
</table> </table>
</div> </div>
\ No newline at end of file
<div class="ui-dialog-title">
更新备注
</div>
<div class="ui-dialog-content">
<table class="table" style="border-color: black;">
<thead>
<tr>
<th>上传受理号</th>
<th>申请人姓名</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in idAndNote">
<td>{{item.FIRST_WHITE}}</td>
<td>{{item.APPLICANT_NAME}}</td>
<td><input type="text" ng-model="item.NOTE"></td>
</tr>
</tbody>
</table>
</div>
<div class="ui-dialog-confirm">
<button type="submit" class="btn btn-info" ng-click="updateNoteData()">更新</button>
</div>
\ No newline at end of file
...@@ -119,6 +119,9 @@ ...@@ -119,6 +119,9 @@
<span class="hidden-xs" ng-bind="loginData.name"></span> <span class="hidden-xs" ng-bind="loginData.name"></span>
</a> </a>
</li> </li>
<li class="dropdown user user-menu">
<a ng-click="logout()" class="btn btn-flat" style="background-color: #0c6ba2;border: 0">退出当前用户</a>
</li>
</ul> </ul>
</div> </div>
...@@ -140,12 +143,6 @@ ...@@ -140,12 +143,6 @@
<span ng-bind="menu.name"></span> <span ng-bind="menu.name"></span>
</a> </a>
</li> </li>
<li>
<a ng-click="logout()">
<i class="glyphicon glyphicon-user"></i>
<span>退出当前用户</span>
</a>
</li>
</ul> </ul>
</section> </section>
<!-- /.sidebar --> <!-- /.sidebar -->
......
...@@ -883,6 +883,30 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -883,6 +883,30 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
}) })
},
getNoteToUpdate:function(data,success) {
var body = JSON.stringify(data);
console.log(body)
$http({
method: 'POST',
url: "../personPostApi/selectNote",
data: body,
headers: {'Content-Type': 'application/json'}
}).then(function successCallback(response) {
success(response.data)
})
},
updateTheseNote:function(data,success){
var body = JSON.stringify(data);
console.log(body)
$http({
method: 'POST',
url: "../personPostApi/addNote",
data: body,
headers: {'Content-Type': 'application/json'}
}).then(function successCallback(response) {
success(response.data)
})
} }
} }
}); });
\ No newline at end of file
...@@ -219,6 +219,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -219,6 +219,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
cache: false, cache: false,
closeByDocument:false, closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) { controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.cardsTotal=0;
$scope.confirmGoTo = go; $scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog; $rootScope.closeThis = $scope.closeThisDialog;
}] }]
...@@ -405,6 +406,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -405,6 +406,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
cache: false, cache: false,
closeByDocument:false, closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) { controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.cardsTotal=0;
$scope.confirmGoTo = go; $scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog; $rootScope.closeThis = $scope.closeThisDialog;
}] }]
...@@ -587,6 +589,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -587,6 +589,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
cache: false, cache: false,
closeByDocument:false, closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) { controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.cardsTotal=0;
$scope.confirmGoTo = go; $scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog; $rootScope.closeThis = $scope.closeThisDialog;
}] }]
...@@ -769,6 +772,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -769,6 +772,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
cache: false, cache: false,
closeByDocument:false, closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) { controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.cardsTotal=0;
$rootScope.closeThis=$scope.closeThisDialog; $rootScope.closeThis=$scope.closeThisDialog;
$scope.confirmGoTo = go; $scope.confirmGoTo = go;
}] }]
......
...@@ -72,7 +72,15 @@ ...@@ -72,7 +72,15 @@
<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span> <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
</div> </div>
</td> </td>
<td colspan="4"> <td>数据状态:</td>
<td style="text-align: left;">
<select class="form-control select2" id="notNull" ng-model="isValid">
<option value="">--请选择数据状态--</option>
<option value="1">有效记录</option>
<option value="0">无效记录</option>
</select>
</td>
<td colspan="2">
<div style="float: left"> <div style="float: left">
<button class="btn btn-primary" style="margin-right: 7px;" ng-click="doQuery()">查询</button> <button class="btn btn-primary" style="margin-right: 7px;" ng-click="doQuery()">查询</button>
<button class="btn btn-primary" style="margin-right: 7px;" ng-click="subSomething()">读卡查询</button> <button class="btn btn-primary" style="margin-right: 7px;" ng-click="subSomething()">读卡查询</button>
...@@ -117,6 +125,9 @@ ...@@ -117,6 +125,9 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="box-footer" ng-if="postData.length>0">
<button class="pull-right btn btn-primary" ng-click="addNote()">添加备注</button>
</div>
<div style="padding-left: 27%;" ng-if="postData.length>0"> <div style="padding-left: 27%;" ng-if="postData.length>0">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination> <tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div> </div>
......
...@@ -44,6 +44,7 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http ...@@ -44,6 +44,7 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd"); $scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
var getCountJson = function(){ var getCountJson = function(){
var date=$('#datepicker').val(); var date=$('#datepicker').val();
var notNull = $("#notNull").val();
var json={}; var json={};
if (angular.isDefined($scope.applicantName)) { if (angular.isDefined($scope.applicantName)) {
json.applicantName=$scope.applicantName; json.applicantName=$scope.applicantName;
...@@ -76,6 +77,11 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http ...@@ -76,6 +77,11 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
}else{ }else{
json.getToCounty=[]; json.getToCounty=[];
} }
if(notNull==''){
json.notNull = -1;
}else{
json.notNull=notNull
}
if(date=='{{choseDate}}'){ if(date=='{{choseDate}}'){
json.uploadDate=$scope.choseDate; json.uploadDate=$scope.choseDate;
}else { }else {
...@@ -85,6 +91,7 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http ...@@ -85,6 +91,7 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
} }
var getJson = function () { var getJson = function () {
var date=$('#datepicker').val(); var date=$('#datepicker').val();
var notNull = $("#notNull").val();
var json={}; var json={};
if (angular.isDefined($scope.applicantName)) { if (angular.isDefined($scope.applicantName)) {
json.applicantName=$scope.applicantName; json.applicantName=$scope.applicantName;
...@@ -122,6 +129,11 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http ...@@ -122,6 +129,11 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
}else { }else {
json.uploadDate = $("#datepicker").val(); json.uploadDate = $("#datepicker").val();
} }
if(notNull==''){
json.notNull = -1;
}else{
json.notNull=notNull
}
if($scope.paginationConf.currentPage==0){ if($scope.paginationConf.currentPage==0){
$scope.paginationConf.currentPage=1 $scope.paginationConf.currentPage=1
} }
...@@ -187,14 +199,29 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http ...@@ -187,14 +199,29 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
} }
return url + 't=' + Math.floor(Date.now()); return url + 't=' + Math.floor(Date.now());
} }
var getCount = function () {
HttpService.getRecordsCount(getCountJson(), function (data) {
$rootScope.count = data;
})
}
$scope.downloadExcel = function(){ $scope.downloadExcel = function(){
ngDialog.open({
template: 'dialogs/confirmToDownload.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope',function ($scope) {
getCount()
$scope.confirmDownload = function () {
var url = '../personPostApi/download?'; var url = '../personPostApi/download?';
var a = document.createElement("a"); var a = document.createElement("a");
document.body.appendChild(a); document.body.appendChild(a);
a.href = encodeURI(getCountAndDownloadUrl(url)); a.href = encodeURI(getCountAndDownloadUrl(url));
a.click(); a.click();
} }
}]
})
}
var postParam = { var postParam = {
idCard: '', idCard: '',
startDate: '', startDate: '',
...@@ -271,6 +298,7 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http ...@@ -271,6 +298,7 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
cache: false, cache: false,
controller: ['$scope', function ($scope) { controller: ['$scope', function ($scope) {
$scope.item = itemData; $scope.item = itemData;
console.log($scope.item)
}] }]
}); });
} }
...@@ -302,5 +330,45 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http ...@@ -302,5 +330,45 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
} }
$scope.addNote = function () {
var arr = [];
for (var i=0;i<$scope.postData.length;i++){
arr.push($scope.postData[i].id)
}
ngDialog.open({
template: 'dialogs/updateNote.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument: false,
controller: ['$scope', 'HttpService', 'MessageService', function ($scope, HttpService, MessageService) {
console.log(arr)
HttpService.getNoteToUpdate(arr,function(data) {
$scope.idAndNote = data;
console.log( $scope.idAndNote)
})
$scope.updateNoteData = function(){
var arr = [];
for (var i=0;i<$scope.idAndNote.length;i++){
var json={
id:$scope.idAndNote[i].ID,
note:$scope.idAndNote[i].NOTE
}
arr.push(json);
}
HttpService.updateTheseNote(arr,function(data) {
if(data){
$scope.closeThisDialog();
MessageService.showAlert("更新成功")
}
})
}
}]
});
}
}); });
\ No newline at end of file
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