Commit 02152b5f authored by dahai's avatar dahai

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

parents 513d0686 d6fc876c
......@@ -3,7 +3,9 @@ package com.yxproject.start.api;
import com.yxproject.start.dto.ReadCardDto;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.service.PersonPostService;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -74,12 +76,11 @@ public class PersonPostApi {
String orderNumber = jsonObject.getString("orderNumber");
String state = jsonObject.getString("state");
String latticeMouthInformation = jsonObject.getString("latticeMouthInformation");
List<String> getToCounty = new ArrayList<>();
getToCounty.add(jsonObject.getString("getToCounty"));
String uploadDate = jsonObject.getString("uploadDate");
JSONArray jsonArray =(JSONArray)jsonObject.get("getToCounty");
String uploadDate =replaceDate(jsonObject.getString("uploadDate"));
String firstIndex = jsonObject.getString("firstIndex");
String pageSize = jsonObject.getString("pageSize");
List<PersonPostEntity> list = personPostService.findPersonalData(applicantName,orderNumber,state,latticeMouthInformation,getToCounty,uploadDate,firstIndex,pageSize);
List<PersonPostEntity> list = personPostService.findPersonalData(applicantName,orderNumber,state,latticeMouthInformation,jsonArray,uploadDate,firstIndex,pageSize);
return list;
}
......@@ -128,4 +129,14 @@ public class PersonPostApi {
}
return flag;
}
/**
* 去除字符串中中线
* @param str
* @return
*/
private String replaceDate(String str){
return str.replace("-","");
}
}
......@@ -33,20 +33,23 @@ public interface PersonPostMapper {
"SELECT * FROM " +
"( " +
"SELECT A.*, ROWNUM RN " +
" from (SELECT * FROM PERSON_POST " +
" from (SELECT PERSON_POST.ORDER_NUMBER,PERSON_POST.WAYBILL_NUMBER,PERSON_POST.BACK_WAYBILL_NUMBER,PROD_CARD_T.ACCEPT_NO,PERSON_POST.APPLICANT_NAME,PERSON_POST.RECIPIENT_PHONE,PERSON_POST.RECIPIENT_ADDRESS,PERSON_POST.PRINT_DATE" +
" FROM PERSON_POST " +
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID" +
" LEFT JOIN PREPRO_PERSON ON PERSON_POST.ID_CARD=PREPRO_PERSON.GMSFHM" +
" LEFT JOIN PROD_CARD_T@PROD_LINK ON PROD_CARD_T.UPLOAD_NO = PREPRO_PERSON.JMSFZSLH" +
" WHERE 1=1" +
" <when test='applicantName!=null'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
" <when test='orderNumber!=null'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>" +
" <when test='state!=null'> and PERSON_POST.STATE=#{state} </when>" +
" <when test='latticeMouthInformation!=null'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>" +
" <when test='state!=\"\"'> and PERSON_POST.STATE=#{state} </when>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=null'> and PERSON_POST.GET_TO_COUNTY in ( #{getToCounty} ) </when>" +
" <when test='uploadDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE=#{uploadDate} </when>" +
// "PERSON_POST limit #{firstIndex},#{pageSize}"
" <when test='uploadDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8)=#{uploadDate} </when>" +
") " +
"A" +
")" +
"WHERE RN BETWEEN #{firstIndex} AND #{pageSize}" +
"WHERE RN BETWEEN #{pageSize} AND #{firstIndex}" +
"</script>")
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);
......@@ -62,7 +65,7 @@ public interface PersonPostMapper {
" <when test='getToCounty!=null'> and PERSON_POST.GET_TO_COUNTY in ( #{getToCounty} ) </when>" +
" <when test='uploadDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE=#{uploadDate} </when>" +
"</script>")
public int findPersonalDataCount(String applicantName, String orderNumber, String state, String latticeMouthInformation, List<String> getToCounty, String uploadDate);
public int findPersonalDataCount( @Param("applicantName")String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("uploadDate") String uploadDate);
......
......@@ -7,6 +7,7 @@ import com.yxproject.start.mapper.FileNameDicMapper;
import com.yxproject.start.mapper.PersonPostMapper;
import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.PersonPostService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -57,9 +58,9 @@ public class PersonPostServiceImpl implements PersonPostService {
long pageSizeLong = Long.valueOf(pageSize);
for (int i = 0;i<getToCounty.size();i++){
if (i==getToCounty.size()-1){
str+="'"+getToCounty.get(i);
str+="'"+getToCounty.get(i)+"'";
}else {
str+="'"+getToCounty.get(i)+",";
str+="'"+getToCounty.get(i)+"',";
}
}
List<PersonPostEntity> list = personPostMapper.findAllPersonalData(applicantName,orderNumber,state,latticeMouthInformation,str,uploadDate,firstIndexLong * pageSizeLong,(firstIndexLong - 1) * pageSizeLong + 1);
......@@ -87,7 +88,7 @@ public class PersonPostServiceImpl implements PersonPostService {
}
@Override
public int findPersonalDataCount(String applicantName, String orderNumber, String state, String latticeMouthInformation, List<String> getToCounty, String uploadDate) {
public int findPersonalDataCount(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("uploadDate") String uploadDate) {
int count=personPostMapper.findPersonalDataCount(applicantName,orderNumber,state,latticeMouthInformation,getToCounty,uploadDate);
return count;
}
......
......@@ -133,7 +133,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
getRecordsCount: function (data, success) {
var body = JSON.stringify(data);
$http({
method: 'GET',
method: 'POST',
url: "../personPostApi/findPersonalDataCount",
data:body,
headers: {'Content-Type': 'application/json'}
......@@ -153,6 +153,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
})
},
uploadPackage:function(fd,success){
console.log(fd)
$http({
method: 'POST',
url: "../importXML/getXMLToCheck",
......@@ -184,6 +185,9 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
},
selectXmlPackageCount:function(date,success){
if(date==''){
date=$filter("date")(new Date(), "yyyy-MM-dd");
}
$http({
method: 'GET',
url: "../importXML/queryPersonXMLCount"+urlTimeStamp(),
......@@ -195,6 +199,10 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
})
},
selectXmlPackage:function(date,currentPage,itemsPerPage,success){
if(date==''){
date=$filter("date")(new Date(), "yyyy-MM-dd");
}
console.log(date,currentPage,itemsPerPage)
$http({
method: 'GET',
url: "../importXML/queryPersonXML"+urlTimeStamp(),
......@@ -372,7 +380,7 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
if(date==""){
date=$filter("date")(new Date(), "yyyy-MM-dd");
}
console.log(newPackageName,idCard,date,county)
console.log(newPackageName,idCard,date,county,currentPage,itemsPerPage)
$http({
method: 'GET',
url: "../LogApi/selectNewFilesLog"+urlTimeStamp(),
......@@ -413,6 +421,9 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
})
},
getTaskListToCreate:function(date,success){
if(date==''){
date=$filter("date")(new Date(), "yyyy-MM-dd");
}
console.log($rootScope.loginData.roleList[0].process,date)
$http({
method: 'GET',
......
......@@ -41,9 +41,6 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
}
$scope.searchCurrent();
var reGet = function () {
$scope.searchCurrent();
}
$scope.currentTab = 0;
$scope.func = function (index) {
......@@ -163,8 +160,8 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
console.log(map)
HttpService.createTask(map,function(data){
MessageService.showAlert("创建成功")
console.log(reGet)
reGet();
console.log($scope.searchCurrent)
$scope.searchCurrent();
})
}else{
MessageService.showAlert("请选择创建任务单的组")
......
......@@ -14,7 +14,6 @@ angular.module('AvatarCheck.packageLog', ['ngRoute', 'AvatarCheck.http', 'tm.pag
HttpService.getCountyListData(function(data) {
$scope.countyList = data;
console.log($scope.countyList)
})
//Date picker
$('#datepicker').datetimepicker({
......@@ -35,14 +34,12 @@ angular.module('AvatarCheck.packageLog', ['ngRoute', 'AvatarCheck.http', 'tm.pag
$scope.getPackageLog = function(){
HttpService.selectPackageLogCount($scope.newPackageName,$scope.idCard,$('#datepicker').val(),$scope.county,function (data) {
console.log($scope.newPackageName,$scope.idCard,$('#datepicker').val())
$scope.paginationConf.totalItems = data;
console.log($scope.paginationConf.totalItems)
console.log($scope.paginationConf.totalItems,"$scope.paginationConf.totalItems")
})
HttpService.selectPackageLog($scope.newPackageName,$scope.idCard,$('#datepicker').val(),$scope.county,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
console.log($scope.newPackageName,$scope.idCard,$('#datepicker').val())
$scope.packageLogData = data;
console.log($scope.packageLogData)
console.log($scope.packageLogData,"$scope.packageLogData")
})
}
......
......@@ -101,8 +101,8 @@
</div>
</div>
<div ng-if="cycleSheetData.length==0">
<h4>暂无数据</h4>
</div>
<h4>暂无数据</h4>
</div>
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
......
......@@ -104,6 +104,9 @@
</div>
<!-- /.mail-box-messages -->
</div>
<div ng-if="cycleSheetData.length==0">
<h4>暂无数据</h4>
</div>
</div>
<!-- /.box-body -->
</div>
......
......@@ -116,9 +116,9 @@
</tr>
</tbody>
</table>
<div style="padding-left: 27%;">
<tm-pagination ng-if="show" conf="paginationConf" class="ul"></tm-pagination>
</div>
<div style="padding-left: 27%;" ng-if="postData.length>0">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<h4 ng-if="postData.length==0">暂无记录。</h4>
</div>
</div>
......
......@@ -38,7 +38,6 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
};
$scope.show = true;
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
var getCountJson = function(){
var json={};
......@@ -72,7 +71,6 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
return json;
}
var getJson = function () {
console.log($scope.paginationConf.currentPage+1,"in")
var json={};
if (angular.isDefined($scope.applicantName)) {
json.applicantName=$scope.applicantName;
......@@ -101,17 +99,17 @@ angular.module('AvatarCheck.uploadExcelAndSearch', ['ngRoute', 'AvatarCheck.http
json.getToCounty=[];
}
json.uploadDate = $("#datepicker").val();
json.firstIndex=$scope.paginationConf.currentPage+1;
json.firstIndex=$scope.paginationConf.currentPage;
json.pageSize=$scope.paginationConf.itemsPerPage;
return json;
}
$scope.postData = [];
$scope.paginationConf.totalItems = 0
$scope.doQuery = function () {
$scope.show = true;
// HttpService.getRecordsCount(getCountJson, function (data) {
// $scope.paginationConf.totalItems = data;
// })
HttpService.getRecordsCount(getCountJson(), function (data) {
$scope.paginationConf.totalItems = data;
console.log(data)
})
HttpService.searchPostData(getJson(), function (data) {
$scope.postData = data;
console.log(data)
......
......@@ -94,12 +94,12 @@
</tr>
</tbody>
</table>
<div style="padding-left: 27%;">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<div class="box-body" ng-if="xmlPackageData.length==0">
<h4>暂无记录。</h4>
</div>
<div ng-if="xmlPackageData.length>0">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
<div class="row" style="padding:0 25px;" ng-if="postMsgDetail.length>0">
<div class="col-md-11"></div>
<div class="col-md-1" style="text-align: right;">
......
......@@ -84,17 +84,15 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
perPageOptions: [10, 20, 30, 40, 50]
};
$scope.getXmlPackage = function(){
console.log($("#datepicker").val())
HttpService.selectXmlPackageCount($("#datepicker").val(),function(data){
$scope.paginationConf.totalItems = data.respData.string;
console.log($scope.paginationConf.totalItems,"$scope.paginationConf.totalItems")
})
HttpService.selectXmlPackage($("#datepicker").val(),$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.xmlPackageData = data.respData;
console.log("$scope.xmlPackageData:",$scope.xmlPackageData)
console.log($scope.xmlPackageData,"$scope.xmlPackageData")
})
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.getXmlPackage);
......
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