Commit b6ec3a19 authored by suichenguang's avatar suichenguang

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

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