Commit b6ec3a19 authored by suichenguang's avatar suichenguang

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

parents d1e9e52d 1a2a80bf
package com.yxproject.start.api; package com.yxproject.start.api;
import com.yxproject.start.entity.DetailReceiptListEntity; import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.entity.ReceiptListEntity;
import com.yxproject.start.service.ReceiptService; import com.yxproject.start.service.ReceiptService;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -42,14 +43,19 @@ public class ReceiptApi { ...@@ -42,14 +43,19 @@ public class ReceiptApi {
if (countAccept == 0) { if (countAccept == 0) {
//查询特证交接单所需数据 //查询特证交接单所需数据
Map<String, Object> resultDate = receiptService.selectReceiptListDate(id); Map<String, Object> resultDate = receiptService.selectReceiptListDate(id);
String acceptNo = (String) resultDate.get("ACCEPT_NO"); ReceiptListEntity receiptListEntity = new ReceiptListEntity();
String GAJG_DM = (String) resultDate.get("GAJG_DM"); receiptListEntity.setPoliceCode(resultDate.get("GAJG_DM").toString());
int cardType = (int) resultDate.get("CARD_TYPE"); receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal)resultDate.get("CARD_TYPE")+""));
int oldCardType = (int) resultDate.get("OLD_CARD_TYPE"); if ("null".equals(resultDate.get("OLD_CARD_TYPE")+"")){
int state = 0;
int count = (int) resultDate.get("COUNT"); }else {
receiptListEntity.setOldCardTypeId(Long.valueOf(resultDate.get("OLD_CARD_TYPE")+""));
}
receiptListEntity.setFinishCount(Long.valueOf(resultDate.get("VALID_COUNT").toString()));
receiptListEntity.setQrCode(resultDate.get("GROUP_NO").toString());
receiptListEntity.setState((long)0);
//生成特证交接单 //生成特证交接单
receiptService.createReceiptList(acceptNo, GAJG_DM, count, state,cardType,oldCardType); receiptService.createReceiptList(receiptListEntity);
//查询特证详单所需数据 //查询特证详单所需数据
Map<String, Object> detailedData = receiptService.selectDetailedData(id); Map<String, Object> detailedData = receiptService.selectDetailedData(id);
...@@ -68,18 +74,23 @@ public class ReceiptApi { ...@@ -68,18 +74,23 @@ public class ReceiptApi {
} else { } else {
//查询交接单所需数据 //查询交接单所需数据
Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id); Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id);
String groupNo = (String) receiptListDate.get("GROUP_NO"); ReceiptListEntity receiptListEntity = new ReceiptListEntity();
String GAJG_DM = (String) receiptListDate.get("GAJG_DM"); receiptListEntity.setPoliceCode(receiptListDate.get("GAJG_DM").toString());
int cardType = (int) receiptListDate.get("CARD_TYPE"); receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal)receiptListDate.get("CARD_TYPE")+""));
int oldCardType = (int) receiptListDate.get("OLD_CARD_TYPE"); if ("null".equals(receiptListDate.get("OLD_CARD_TYPE")+"")){
int count = Integer.valueOf(receiptListDate.get("VALID_COUNT").toString());
int state = 0; }else {
receiptListEntity.setOldCardTypeId(Long.valueOf(receiptListDate.get("OLD_CARD_TYPE")+""));
}
receiptListEntity.setFinishCount(Long.valueOf(receiptListDate.get("VALID_COUNT").toString()));
receiptListEntity.setQrCode(receiptListDate.get("GROUP_NO").toString());
receiptListEntity.setState((long)0);
//查询这个组号是否生成了交接单 //查询这个组号是否生成了交接单
int countGroup = receiptService.selectByGroupNo(groupNo); int countGroup = receiptService.selectByGroupNo(receiptListDate.get("GROUP_NO").toString());
//没有生成交接单 //没有生成交接单
if (countGroup == 0) { if (countGroup == 0) {
//生成交接单 //生成交接单
receiptService.createReceiptList(groupNo,GAJG_DM,count,state,cardType,oldCardType); receiptService.createReceiptList(receiptListEntity);
//查询这个身份证是否生成了详单 //查询这个身份证是否生成了详单
int receiptCount = receiptService.selectReceiptById(id); int receiptCount = receiptService.selectReceiptById(id);
//没有生成交接单详单 //没有生成交接单详单
...@@ -118,10 +129,10 @@ public class ReceiptApi { ...@@ -118,10 +129,10 @@ public class ReceiptApi {
} }
} }
//查询有几个特证 //查询有几个特证
int specialCardCount = receiptService.selectSpecialCard(groupNo); int specialCardCount = receiptService.selectSpecialCard(receiptListDate.get("GROUP_NO").toString());
//减去特证个数 //减去特证个数
int finishCount = receiptService.selectCount(groupNo) - specialCardCount; int finishCount = receiptService.selectCount(receiptListDate.get("GROUP_NO").toString()) - specialCardCount;
receiptService.updateFinishCount(groupNo, finishCount); receiptService.updateFinishCount(receiptListDate.get("GROUP_NO").toString(), finishCount);
} }
......
package com.yxproject.start.mapper; package com.yxproject.start.mapper;
import com.yxproject.start.entity.DetailReceiptListEntity; import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.entity.ReceiptListEntity;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import java.util.Date; import java.util.Date;
...@@ -27,8 +28,17 @@ public interface ReceiptMapper { ...@@ -27,8 +28,17 @@ public interface ReceiptMapper {
public int selectByGroupNo(String groupNo); public int selectByGroupNo(String groupNo);
//生成交接单 //生成交接单
@Insert("INSERT INTO RECEIPT_LIST(QR_CODE,POLICE_CODE,FINISH_COUNT,STATE,CARD_TYPE_ID,OLD_CARD_TYPE_ID)VALUES(#{GROUP_NO},#{GAJG_DM},#{count},#{state},#{cardType},#{oldCardType})") @Insert("<script>" +
public boolean createReceiptList(@Param("GROUP_NO")String GROUP_NO,@Param("GAJG_DM")String GAJG_DM,@Param("count")int count,@Param("state")int state,@Param("cardType")int cardType,@Param("oldCardType")int oldCardType); " INSERT INTO RECEIPT_LIST(QR_CODE,POLICE_CODE,FINISH_COUNT,STATE,CARD_TYPE_ID" +
"<if test ='oldCardTypeId !=null'> " +
",OLD_CARD_TYPE_ID" +
"</if> " +
")VALUES(#{qrCode},#{policeCode},#{finishCount},#{state},#{cardTypeId}" +
"<if test ='oldCardTypeId !=null'> " +
",#{oldCardTypeId}" +
"</if> " +
") </script>")
public boolean createReceiptList(ReceiptListEntity receiptListEntity);
......
package com.yxproject.start.service; package com.yxproject.start.service;
import com.yxproject.start.entity.DetailReceiptListEntity; import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.entity.ReceiptListEntity;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Date; import java.util.Date;
...@@ -11,7 +12,7 @@ public interface ReceiptService { ...@@ -11,7 +12,7 @@ public interface ReceiptService {
public Map<String,Object> selectReceiptListDate(String id); public Map<String,Object> selectReceiptListDate(String id);
public boolean createReceiptList(@Param("GROUP_NO")String GROUP_NO, @Param("GAJG_DM")String GAJG_DM, @Param("count")int count,@Param("state")int state,@Param("cardType")int cardType,@Param("oldCardType")int oldCardType); public boolean createReceiptList(ReceiptListEntity receiptListEntity);
public Map<String,Object>selectDetailedData(String id); public Map<String,Object>selectDetailedData(String id);
......
package com.yxproject.start.service.impl; package com.yxproject.start.service.impl;
import com.yxproject.start.entity.DetailReceiptListEntity; import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.entity.ReceiptListEntity;
import com.yxproject.start.mapper.ReceiptMapper; import com.yxproject.start.mapper.ReceiptMapper;
import com.yxproject.start.service.ReceiptService; import com.yxproject.start.service.ReceiptService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -20,8 +21,8 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -20,8 +21,8 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @Override
public boolean createReceiptList(String GROUP_NO, String GAJG_DM, int count,int state,int cardType,int oldCardType) { public boolean createReceiptList(ReceiptListEntity receiptListEntity) {
receiptMapper.createReceiptList(GROUP_NO,GAJG_DM,count,state,cardType,oldCardType); receiptMapper.createReceiptList(receiptListEntity);
return true; return true;
} }
......
...@@ -287,13 +287,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -287,13 +287,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
selectXmlDataCount:function (startPackageNo,endPackageNo,pcs_name,startDate,endDate,success) { selectXmlDataCount:function (startId,endId,pcs_name,startDate,endDate,success) {
$http({ $http({
method: 'GET', method: 'GET',
url: "../InfoManagementApi/selectCount"+urlTimeStamp(), url: "../InfoManagementApi/selectCount"+urlTimeStamp(),
params:{ params:{
beginFileName:startPackageNo, beginFileId:startId,
endFileName:endPackageNo, endFileId:endId,
gajgMc:pcs_name, gajgMc:pcs_name,
beginDate:startDate, beginDate:startDate,
endDate:endDate endDate:endDate
...@@ -313,13 +313,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -313,13 +313,13 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
deleteProdCards:function (startPackageNo,endPackageNo,pcs_name,startDate,endDate,success) { deleteProdCards:function (startId,endId,pcs_name,startDate,endDate,success) {
$http({ $http({
method: 'GET', method: 'GET',
url: "../InfoManagementApi/deleteInfo"+urlTimeStamp(), url: "../InfoManagementApi/deleteInfo"+urlTimeStamp(),
params:{ params:{
beginFileName:startPackageNo, beginFileName:startId,
endFileName:endPackageNo, endFileName:endId,
gajgMc:pcs_name, gajgMc:pcs_name,
beginDate:startDate, beginDate:startDate,
endDate:endDate endDate:endDate
......
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
<div class="box-info"> <div class="box-info">
<table class="table table-bordered" style="margin-bottom: 0;"> <table class="table table-bordered" style="margin-bottom: 0;">
<tr> <tr>
<td>新包号:</td> <td>文件ID:</td>
<td> <td>
<input type="text" class="form-control" ng-model="startPackageNo" placeholder="起始包号"> <input type="text" class="form-control" ng-model="startId" placeholder="起始ID">
</td> </td>
<td>-</td> <td>-</td>
<td> <td>
<input type="text" class="form-control" ng-model="endPackageNo" placeholder="截至包号"> <input type="text" class="form-control" ng-model="endId" placeholder="截至ID">
</td> </td>
<td>派出所名称:</td> <td>派出所名称:</td>
...@@ -95,8 +95,8 @@ ...@@ -95,8 +95,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="item in xmlDatas"> <tr ng-repeat="item in xmlDatas | orderBy:'id'">
<td>{{$index+1}}</td> <td>{{item.id}}</td>
<td>{{item.dwdm}}</td> <td>{{item.dwdm}}</td>
<td>{{item.dwmc}}</td> <td>{{item.dwmc}}</td>
<td>{{item.recordNumber}}</td> <td>{{item.recordNumber}}</td>
......
...@@ -13,6 +13,7 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http']) ...@@ -13,6 +13,7 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http'])
$rootScope.hasOpen = false; $rootScope.hasOpen = false;
$scope.id ='id';
$('.select2').select2(); $('.select2').select2();
//Initialize Select2 Elements //Initialize Select2 Elements
...@@ -54,11 +55,11 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http']) ...@@ -54,11 +55,11 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http'])
$scope.doXmlQuery = function() { $scope.doXmlQuery = function() {
var startDate=$("#datepicker1").val(); var startDate=$("#datepicker1").val();
var endDate =$("#datepicker2").val(); var endDate =$("#datepicker2").val();
if(angular.isUndefined($scope.startPackageNo)){ if(angular.isUndefined($scope.startId)){
$scope.startPackageNo=''; $scope.startId='';
} }
if(angular.isUndefined($scope.endPackageNo)){ if(angular.isUndefined($scope.endId)){
$scope.endPackageNo=''; $scope.endId='';
} }
if(angular.isUndefined($scope.pcs_name)){ if(angular.isUndefined($scope.pcs_name)){
$scope.pcs_name=''; $scope.pcs_name='';
...@@ -66,13 +67,13 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http']) ...@@ -66,13 +67,13 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http'])
if((startDate!=''&&endDate=='')||(endDate!=''&&startDate=='')){ if((startDate!=''&&endDate=='')||(endDate!=''&&startDate=='')){
MessageService.showAlert("请选择起始日期和结束日期") MessageService.showAlert("请选择起始日期和结束日期")
}else{ }else{
console.log($scope.startPackageNo,$scope.endPackageNo,$scope.pcs_name,startDate,endDate,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage) console.log($scope.startId,$scope.endId,$scope.pcs_name,startDate,endDate,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage)
HttpService.selectXmlDataCount($scope.startPackageNo,$scope.endPackageNo,$scope.pcs_name,startDate,endDate,function(data){ HttpService.selectXmlDataCount($scope.startPackageNo,$scope.endPackageNo,$scope.pcs_name,startDate,endDate,function(data){
$scope.paginationConf.totalItems=data; $scope.paginationConf.totalItems=data;
console.log($scope.paginationConf.totalItems,"count") console.log($scope.paginationConf.totalItems,"count")
}) })
HttpService.selectXmlData($scope.startPackageNo,$scope.endPackageNo,$scope.pcs_name,startDate,endDate,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function (data) { HttpService.selectXmlData($scope.startId,$scope.endId,$scope.pcs_name,startDate,endDate,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function (data) {
$scope.xmlDatas = data; $scope.xmlDatas = data;
console.log($scope.xmlDatas) console.log($scope.xmlDatas)
}) })
...@@ -87,14 +88,14 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http']) ...@@ -87,14 +88,14 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http'])
$scope.deleteXml = function() { $scope.deleteXml = function() {
var startDate=$("#datepicker1").val(); var startDate=$("#datepicker1").val();
var endDate =$("#datepicker2").val(); var endDate =$("#datepicker2").val();
var startPackageNo = $scope.startPackageNo; var startId = $scope.startId;
var endPackageNo=$scope.endPackageNo; var endId=$scope.endId;
var pcs_name=$scope.pcs_name; var pcs_name=$scope.pcs_name;
if(angular.isUndefined(startPackageNo)){ if(angular.isUndefined(startId)){
startPackageNo=''; startId='';
} }
if(angular.isUndefined(endPackageNo)){ if(angular.isUndefined(endId)){
endPackageNo=''; endId='';
} }
if(angular.isUndefined(pcs_name)){ if(angular.isUndefined(pcs_name)){
pcs_name=''; pcs_name='';
...@@ -110,12 +111,12 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http']) ...@@ -110,12 +111,12 @@ angular.module('AvatarCheck.cardProdUpdate', ['ngRoute', 'AvatarCheck.http'])
controller: ['$scope', function ($scope) { controller: ['$scope', function ($scope) {
$scope.startDate = startDate; $scope.startDate = startDate;
$scope.endDate = endDate; $scope.endDate = endDate;
HttpService.selectXmlDataCount(startPackageNo,endPackageNo,pcs_name,startDate,endDate,function(data){ HttpService.selectXmlDataCount(startId,endId,pcs_name,startDate,endDate,function(data){
$scope.total=data; $scope.total=data;
console.log($scope.total,"count") console.log($scope.total,"count")
}) })
$scope.confirmDelete = function () { $scope.confirmDelete = function () {
HttpService.deleteProdCards(startPackageNo,endPackageNo,pcs_name,startDate,endDate, function (data) { HttpService.deleteProdCards(startId,endId,pcs_name,startDate,endDate, function (data) {
if(data){ if(data){
MessageService.showAlert("删除成功"); MessageService.showAlert("删除成功");
$scope.closeThisDialog(); $scope.closeThisDialog();
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<td ng-if="task.faileCount!=0" class="mailbox-subject" style="color: red;">{{task.faileCount}}</td> <td ng-if="task.faileCount!=0" class="mailbox-subject" style="color: red;">{{task.faileCount}}</td>
<td ng-if="task.faileCount==0" class="mailbox-subject">{{task.faileCount}}</td> <td ng-if="task.faileCount==0" class="mailbox-subject">{{task.faileCount}}</td>
<td class="mailbox-subject">{{task.recheckCount}}</td> <td class="mailbox-subject">{{task.recheckCount}}</td>
<td class="mailbox-date"><a ng-click="getPoliceList(task.policeList,task.taskId)">派出所列表</a></td> <td class="mailbox-date"><a ng-click="getPoliceList(task.policeList,task.taskId)">组号列表</a></td>
<td class="mailbox-subject"><button class="btn btn-primary">打印封条</button></td> <td class="mailbox-subject"><button class="btn btn-primary">打印封条</button></td>
</tr> </tr>
<tr ng-if="task.taskId==taskId"> <tr ng-if="task.taskId==taskId">
......
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