Commit c9874151 authored by dahai's avatar dahai

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

parents baf2e9be f0722540
...@@ -200,6 +200,13 @@ public class ReadExcelApi { ...@@ -200,6 +200,13 @@ public class ReadExcelApi {
return yxjsonResponse.toJSONString(); return yxjsonResponse.toJSONString();
} }
@RequestMapping("deleteByFileId")
public String deleteFileById(@RequestParam("fileId")String fileId){
fileNameDicService.deleteFileByFileId(fileId);
return "删除成功";
}
private String replaceDate(String str){ private String replaceDate(String str){
return str.replace("-",""); return str.replace("-","");
} }
......
...@@ -73,4 +73,6 @@ public interface FileNameDicMapper { ...@@ -73,4 +73,6 @@ public interface FileNameDicMapper {
"</if> </where> </script>") "</if> </where> </script>")
public List<FileNameDicEntity> queryFileNameDicCount(@Param("uploadDate")String uploadDate,@Param("fileName") String fileName, @Param("analysisState") long analysisState); public List<FileNameDicEntity> queryFileNameDicCount(@Param("uploadDate")String uploadDate,@Param("fileName") String fileName, @Param("analysisState") long analysisState);
@Delete("DELETE FROM FILE_NAME_DIC WHERE FILE_ID = #{fileId}")
public void deleteFileAndPostData(@Param("fileId")String fileId);
} }
...@@ -50,4 +50,6 @@ public interface PersonPostMapper { ...@@ -50,4 +50,6 @@ public interface PersonPostMapper {
" <when test='uploadDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE=#{uploadDate} </when>") " <when test='uploadDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE=#{uploadDate} </when>")
public boolean deleteAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,List<String> getToCounty ,@Param("uploadDate")String uploadDate); public boolean deleteAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,List<String> getToCounty ,@Param("uploadDate")String uploadDate);
@Delete("DELETE FROM PERSON_POST WHERE FILE_ID = #{fileId}")
public void deletePersonPostByFileId(@Param("fileId")String fileId);
} }
...@@ -32,4 +32,10 @@ public interface FileNameDicService { ...@@ -32,4 +32,10 @@ public interface FileNameDicService {
* @return * @return
*/ */
public int queryFileNameDicCount(String uploadDate,String fileName, long analysisState); public int queryFileNameDicCount(String uploadDate,String fileName, long analysisState);
/**
* 根据文件id删除excel文件以及文件内的邮寄信息
* @param fileId
*/
public void deleteFileByFileId(String fileId);
} }
...@@ -2,9 +2,11 @@ package com.yxproject.start.service.impl; ...@@ -2,9 +2,11 @@ package com.yxproject.start.service.impl;
import com.yxproject.start.entity.FileNameDicEntity; import com.yxproject.start.entity.FileNameDicEntity;
import com.yxproject.start.mapper.FileNameDicMapper; import com.yxproject.start.mapper.FileNameDicMapper;
import com.yxproject.start.mapper.PersonPostMapper;
import com.yxproject.start.service.FileNameDicService; import com.yxproject.start.service.FileNameDicService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
...@@ -16,6 +18,8 @@ import java.util.List; ...@@ -16,6 +18,8 @@ import java.util.List;
public class FileNameDicServiceImpl implements FileNameDicService { public class FileNameDicServiceImpl implements FileNameDicService {
@Autowired @Autowired
private FileNameDicMapper fileNameDicMapper; private FileNameDicMapper fileNameDicMapper;
@Autowired
private PersonPostMapper personPostMapper;
@Override @Override
public void saveFileNameDic(FileNameDicEntity fileNameDicEntity) { public void saveFileNameDic(FileNameDicEntity fileNameDicEntity) {
...@@ -39,4 +43,11 @@ public class FileNameDicServiceImpl implements FileNameDicService { ...@@ -39,4 +43,11 @@ public class FileNameDicServiceImpl implements FileNameDicService {
return fileNameDicMapper.queryFileNameDicCount(uploadDate,fileName, analysisState ).size(); return fileNameDicMapper.queryFileNameDicCount(uploadDate,fileName, analysisState ).size();
} }
@Override
@Transactional
public void deleteFileByFileId(String fileId) {
fileNameDicMapper.deleteFileAndPostData(fileId);
personPostMapper.deletePersonPostByFileId(fileId);
}
} }
...@@ -81,7 +81,10 @@ ...@@ -81,7 +81,10 @@
<!-- mini logo for sidebar mini 50x50 pixels --> <!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><span><img src="newTheme/dist/img/logo.jpg" style="width:25px;height:25px;"></span></span> <span class="logo-mini"><span><img src="newTheme/dist/img/logo.jpg" style="width:25px;height:25px;"></span></span>
<!-- logo for regular state and mobile devices --> <!-- logo for regular state and mobile devices -->
<span class="logo-lg"><span>{{loginData.roleList[0].role}}</span></span> <span class="logo-lg">
<img src="newTheme/dist/img/logo.jpg" style="width:25px;height:25px;">
北京制证辅助平台
</span>
</a> </a>
<!-- Header Navbar: style can be found in header.less --> <!-- Header Navbar: style can be found in header.less -->
<!---导航左边--> <!---导航左边-->
...@@ -192,19 +195,11 @@ ...@@ -192,19 +195,11 @@
<li class="dropdown user"> <li class="dropdown user">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-user"></i> <i class="glyphicon glyphicon-user"></i>
<span class="hidden-xs">{{loginData.name}}</span> <span class="hidden-xs" ng-bind="loginData.name"></span>
</a> </a>
<ul class="dropdown-menu">
<li style="padding: 5px;">
<a ng-click="logout()" class="btn btn-default btn-flat">退出当前用户</a>
</li>
</ul>
</li> </li>
<li class="dropdown user user-menu"> <li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="padding-bottom: 11px;"> <a ng-click="logout()" class="btn btn-flat" style="background-color: #0c6ba2;border: 0">退出当前用户</a>
<img src="newTheme/dist/img/logo.jpg" class="user-image" alt="User Image">
<span style="font-size: 1.7em;">北京制证辅助平台</span>
</a>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -240,7 +235,7 @@ ...@@ -240,7 +235,7 @@
<div class="content-wrapper" ng-view style="min-height: 589px;"></div> <div class="content-wrapper" ng-view style="min-height: 589px;"></div>
<footer class="main-footer"> <footer class="main-footer">
<div class="pull-right hidden-xs"> <div class="pull-right hidden-xs">
<b>版本:</b>1.0 <b>Version:</b>1.0.1.110
</div> </div>
<strong>北京制证辅助平台</strong> <strong>北京制证辅助平台</strong>
</footer> </footer>
......
...@@ -321,6 +321,17 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -321,6 +321,17 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
}) })
},
deleteByFileId:function(fileId,success){
$http({
method: 'GET',
url: "../ReadExcel/deleteByFileId"+urlTimeStamp(),
params:{
fileId:fileId
}
}).then(function successCallback(response) {
success(response.data)
})
} }
} }
}); });
\ No newline at end of file
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<td ng-if="item.state==0">未解析</td> <td ng-if="item.state==0">未解析</td>
<td ng-if="item.state==1">已解析</td> <td ng-if="item.state==1">已解析</td>
<td> <td>
<button class="btn btn-danger" ng-click="deletePostData(item.fileId)">删除</button> <button class="btn btn-danger" ng-click="deletePostData(item.fileId,item.uploadDate)">删除</button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -68,7 +68,7 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -68,7 +68,7 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
perPageOptions: [5 ,10 ,15 ,20 ,25] perPageOptions: [5 ,10 ,15 ,20 ,25]
}; };
var date = $("#datepicker3").val();
$scope.getPostPackage = function(){ $scope.getPostPackage = function(){
console.log($scope.fileName,$scope.state,$("#datepicker3").val()) console.log($scope.fileName,$scope.state,$("#datepicker3").val())
HttpService.selectPostPackageCount($scope.fileName,$scope.state,$("#datepicker3").val(),function (data) { HttpService.selectPostPackageCount($scope.fileName,$scope.state,$("#datepicker3").val(),function (data) {
...@@ -84,8 +84,26 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -84,8 +84,26 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目 // 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.getPostPackage); $scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.getPostPackage);
$scope.deletePostData = function(fileid){ $scope.deletePostData = function(fileid,importDate){
ngDialog.open({
template: 'dialogs/confirm.html' + urlTimeStamp(),
width: 600,
cache: false,
closeByDocument:false,
controller: ['$scope', function ($scope) {
$scope.total = 1;
$scope.importDate = $filter('date')(importDate, 'yyyy-MM-dd');;
$scope.confirmDelete = function () {
HttpService.deleteByFileId(fileid, function (data) {
console.log(data)
$scope.getPostPackage(date)
$scope.closeThisDialog();
MessageService.showAlert(data);
})
};
}]
});
} }
}); });
\ 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