Commit 476a0f64 authored by dahai's avatar dahai

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

parents d6eab145 05ac72f8
...@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
...@@ -44,44 +45,46 @@ public class ReceiptApi { ...@@ -44,44 +45,46 @@ public class ReceiptApi {
//查询特证详单所需数据 //查询特证详单所需数据
Map<String,Object> detailedData= receiptService.selectDetailedData(id); Map<String,Object> detailedData= receiptService.selectDetailedData(id);
String uploadNo = (String) detailedData.get("UPLOAD_NO"); String uploadNo = (String) detailedData.get("UPLOAD_NO");
String fileName = (String) detailedData.get("FILE_NAME"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String gajg_dm = (String) detailedData.get("GAJG_DM");
String cardId = (String) detailedData.get("CARD_ID");
String receiptId = (String) detailedData.get("RECIPT_ID");
String name = (String) detailedData.get("NAME"); String name = (String) detailedData.get("NAME");
String cardId = (String) detailedData.get("CARD_ID");
String gajg_dm = (String) detailedData.get("GAJG_DM");
int receiptId =Integer.parseInt((BigDecimal)detailedData.get("ID")+"");
//生成特证详单 //生成特证详单
receiptService.createDetailedList(uploadNo,fileName,gajg_dm,cardId,receiptId,name); System.out.println("22222222222222222222Name:"+name);
receiptService.createDetailedList(uploadNo,acceptNo2,name,id,gajg_dm,receiptId);
}else { }else {
//查询交接单所需数据 //查询交接单所需数据
Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id); Map<String, Object> receiptListDate = receiptService.selectReceiptListDate(id);
String groupNo = (String) receiptListDate.get("GROUP_NO"); String groupNo = (String) receiptListDate.get("GROUP_NO");
String GAJG_DM = (String) receiptListDate.get("GAJG_DM"); String GAJG_DM = (String) receiptListDate.get("GAJG_DM");
int count = (int) receiptListDate.get("COUNT");
int count = Integer.valueOf(receiptListDate.get("VALID_COUNT").toString()) ;
//查询这个组号是否生成了交接单 //查询这个组号是否生成了交接单
int countGroup = receiptService.selectByGroupNo(groupNo); int countGroup = receiptService.selectByGroupNo(groupNo);
if (countGroup == 0) { if (countGroup == 0) {
//生成交接单 Map<String,Object> detailedData= receiptService.selectDetailedData(id);
receiptService.createReceiptList(groupNo, GAJG_DM, count);
Map<String, Object> detailedData = receiptService.selectDetailedData(id);
String uploadNo = (String) detailedData.get("UPLOAD_NO"); String uploadNo = (String) detailedData.get("UPLOAD_NO");
String fileName = (String) detailedData.get("FILE_NAME"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String gajg_dm = (String) detailedData.get("GAJG_DM");
String cardId = (String) detailedData.get("CARD_ID");
String receiptId = (String) detailedData.get("RECIPT_ID");
String name = (String) detailedData.get("NAME"); String name = (String) detailedData.get("NAME");
//生成详单 String cardId = (String) detailedData.get("CARD_ID");
receiptService.createDetailedList(uploadNo, fileName, gajg_dm, cardId, receiptId, name); String gajg_dm = (String) detailedData.get("GAJG_DM");
int receiptId =Integer.parseInt((BigDecimal)detailedData.get("ID")+"");
//生成特证详单
System.out.println("22222222222222222222Name:"+name);
receiptService.createDetailedList(uploadNo,acceptNo2,name,id,gajg_dm,receiptId);
} else { } else {
//查询交接单详单数据 //查询交接单详单数据
Map<String, Object> detailedData = receiptService.selectDetailedData(id); Map<String,Object> detailedData= receiptService.selectDetailedData(id);
System.out.println(String.valueOf("0000000000000000"+detailedData));
String uploadNo = (String) detailedData.get("UPLOAD_NO"); String uploadNo = (String) detailedData.get("UPLOAD_NO");
String fileName = (String) detailedData.get("FILE_NAME"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String gajg_dm = (String) detailedData.get("GAJG_DM");
String cardId = (String) detailedData.get("CARD_ID");
String receiptId = (String) detailedData.get("RECIPT_ID");
String name = (String) detailedData.get("NAME"); String name = (String) detailedData.get("NAME");
//生成详单 String gajg_dm = (String) detailedData.get("GAJG_DM");
receiptService.createDetailedList(uploadNo, fileName, gajg_dm, cardId, receiptId, name); int receiptId =Integer.parseInt((BigDecimal)detailedData.get("ID")+"");
//生成特证详单
receiptService.createDetailedList(uploadNo,acceptNo2,name,id,gajg_dm,receiptId);
System.out.println(receiptId);
} }
//查询有几个 //查询有几个
int specialCardCount =receiptService.selectSpecialCard(groupNo); int specialCardCount =receiptService.selectSpecialCard(groupNo);
......
...@@ -28,18 +28,21 @@ public interface ReceiptMapper { ...@@ -28,18 +28,21 @@ public interface ReceiptMapper {
//根据身份证号查询交接单详单信息 //根据身份证号查询交接单详单信息
@Select("select prod_card_t.upload_no,prepro_person.file_id,subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM,\n" + @Select("select prod_card_t.upload_no," +
"prod_card_t.id_no,receipt_list.ID,prod_card_t.name\n" + "PROD_CARD_T.ACCEPT_NO," +
"prod_card_t.name," +
"prod_card_t.id_no," +
"subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM," +
"receipt_list.ID\n" +
"from prod_card_t@PROD_LINK\n" + "from prod_card_t@PROD_LINK\n" +
"left join prepro_person on prod_card_t.upload_no= prepro_person.jmsfzslh\n" +
"left join receipt_list on receipt_list.QR_CODE = subStr(prod_card_t.accept_no,0,8)\n" + "left join receipt_list on receipt_list.QR_CODE = subStr(prod_card_t.accept_no,0,8)\n" +
"where prod_card_t.id_no=#{id}") "where prod_card_t.id_no=#{id}")
public Map<String,Object>selectDetailedData(String id); public Map<String,Object>selectDetailedData(String id);
//生成交接单详单 //生成交接单详单
@Insert("INSERT INTO CARD_DETAILED_LIST (UPLOAD_NO,FILE_NAME,POLICE_CODE,CARD_ID,RECIPT_ID,NAME)" + @Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,SIGN_GOVT,RECEIPT_ID)" +
"VALUES(#{UPLOAD_NO},#{FILE_NAME},#{GAJG_DM},#{CARD_ID},#{RECIPT_ID},#{NAME})") "VALUES(#{UPLOAD_NO},#{ACCEPT_NO},#{NAME},#{CARD_ID},#{GAJG_DM},#{RECEIPT_ID})")
public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("FILE_NAME")String FILE_NAME,@Param("GAJG_DM")String GAJG_DM,@Param("CARD_ID")String CARD_ID,@Param("RECIPT_ID")String RECIPT_ID,@Param("NAME")String NAME); public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("ACCEPT_NO")String ACCEPT_NO,@Param("NAME")String NAME,@Param("CARD_ID")String CARD_ID,@Param("GAJG_DM")String GAJG_DM,@Param("RECEIPT_ID")int RECEIPT_ID);
......
...@@ -14,7 +14,7 @@ public interface ReceiptService { ...@@ -14,7 +14,7 @@ public interface ReceiptService {
public Map<String,Object>selectDetailedData(String id); public Map<String,Object>selectDetailedData(String id);
public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("FILE_NAME")String FILE_NAME,@Param("GAJG_DM")String GAJG_DM,@Param("CARD_ID")String CARD_ID,@Param("RECEIPT_ID")String RECIPT_ID,@Param("NAME")String NAME); public boolean createDetailedList(@Param("UPLOAD_NO")String UPLOAD_NO,@Param("ACCEPT_NO")String ACCEPT_NO,@Param("NAME")String NAME,@Param("CARD_ID")String CARD_ID,@Param("GAJG_DM")String GAJG_DM,@Param("RECEIPT_ID")int RECEIPT_ID);
public int selectSpecialCard(String GROUP_NO); public int selectSpecialCard(String GROUP_NO);
......
...@@ -33,8 +33,8 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -33,8 +33,8 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @Override
public boolean createDetailedList(String UPLOAD_NO, String FILE_NAME, String GAJG_DM, String CARD_ID, String RECIPT_ID, String NAME) { public boolean createDetailedList(String UPLOAD_NO, String ACCEPT_NO, String NAME, String CARD_ID, String GAJG_DM, int RECEIPT_ID) {
receiptMapper.createDetailedList(UPLOAD_NO,FILE_NAME,GAJG_DM,CARD_ID,RECIPT_ID,NAME); receiptMapper.createDetailedList(UPLOAD_NO,ACCEPT_NO,NAME,CARD_ID,GAJG_DM,RECEIPT_ID);
return true; return true;
} }
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
<select class="form-control select2" id="packageType" <select class="form-control select2" id="packageType"
ng-model="packageType"> ng-model="packageType">
<option value="">--请选择禁用状态--</option> <option value="">--请选择禁用状态--</option>
<option value="1"></option> <option value="0"></option>
<option value="-1"></option> <option value="1"></option>
</select> </select>
</td> </td>
<td>制证包上传时间:</td> <td>制证包上传时间:</td>
...@@ -87,40 +87,42 @@ ...@@ -87,40 +87,42 @@
<div class="box box-default"> <div class="box box-default">
<strong class="box-header with-border">制证信息详情</strong> <strong class="box-header with-border">制证信息详情</strong>
<div class="box-info" style="padding: 10px;"> <div class="box-info" style="padding: 10px;">
<table class="table table-bordered table-hover" ng-if="packageData"> <div ng-if="packageData.length>0">
<thead> <table class="table table-bordered table-hover">
<tr> <thead>
<th>NO.</th> <tr>
<th>上传受理号</th> <th>NO.</th>
<th>姓名</th> <th>上传受理号</th>
<th>身份证号</th> <th>姓名</th>
<th>原包号</th> <th>身份证号</th>
<th>新包号</th> <th>原包号</th>
<th>制证类型</th> <th>新包号</th>
<th>禁用</th> <th>制证类型</th>
</tr> <th>禁用</th>
</thead> </tr>
<tbody> </thead>
<tr ng-repeat="item in packageData"> <tbody>
<td>1</td> <tr ng-repeat="item in packageData">
<td>411032546565445</td> <td>1</td>
<td>张三</td> <td>411032546565445</td>
<td>130133195608240013</td> <td>张三</td>
<td>1321454113</td> <td>130133195608240013</td>
<td>1213134556</td> <td>1321454113</td>
<td>普通证</td> <td>1213134556</td>
<td> <td>普通证</td>
<input type="radio" name="isPackage" value="1" checked> <td>
<input type="radio" name="isPackage" value="2"> <input type="radio" name="isPackage" value="1" checked>
</td> <input type="radio" name="isPackage" value="2">
</tr> </td>
</tbody> </tr>
</table> </tbody>
<p style="color:#9f191f;" ng-if="packageData"><span style="margin-right: 15px;">普通证:3000</span><span style="margin-right: 15px;">邮寄证:2000</span><span>禁用数:2</span></p> </table>
<div style="padding-left: 27%;" ng-if="packageData"> <p style="color:#9f191f;"><span style="margin-right: 15px;">普通证:3000</span><span style="margin-right: 15px;">邮寄证:2000</span><span>禁用数:2</span></p>
<div style="padding-left: 27%;">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination> <tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div> </div>
<h3 ng-if="postData.length==0">暂无记录。</h3> </div>
<h4 ng-if="packageData.length==0">暂无记录。</h4>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -35,9 +35,10 @@ angular.module('AvatarCheck.cardProdPackage', ['ngRoute', 'AvatarCheck.http', 't ...@@ -35,9 +35,10 @@ angular.module('AvatarCheck.cardProdPackage', ['ngRoute', 'AvatarCheck.http', 't
itemsPerPage: 10, itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50] perPageOptions: [10, 20, 30, 40, 50]
}; };
$scope.paginationConf.totalItems = 50;
$scope.doPackageQuery=function(){ $scope.doPackageQuery=function(){
var date = $("#datepicker").val();
var packageType = $("#packageType").val();
if(angular.isUndefined($scope.uploadNo)){ if(angular.isUndefined($scope.uploadNo)){
$scope.uploadNo=''; $scope.uploadNo='';
} }
...@@ -56,19 +57,27 @@ angular.module('AvatarCheck.cardProdPackage', ['ngRoute', 'AvatarCheck.http', 't ...@@ -56,19 +57,27 @@ angular.module('AvatarCheck.cardProdPackage', ['ngRoute', 'AvatarCheck.http', 't
if(angular.isUndefined($scope.typeCode)){ if(angular.isUndefined($scope.typeCode)){
$scope.typeCode=''; $scope.typeCode='';
} }
if(angular.isUndefined($scope.packageType)){ if(angular.isUndefined(packageType)){
$scope.packageType=''; packageType='';
} }
var date = $("#datepicker").val();
if (date==''){ if (date==''){
date=$filter("date")(new Date(), "yyyy-MM-dd"); date=$filter("date")(new Date(), "yyyy-MM-dd");
} }
HttpService.getPackageData($scope.uploadNo,$scope.idCard,$scope.oldPackageNo,$scope.newPackageNo,$scope.sljg, HttpService.getPackageData($scope.uploadNo,$scope.idCard,$scope.oldPackageNo,$scope.newPackageNo,$scope.sljg,
$scope.typeCode,$scope.packageType,date,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data) { $scope.typeCode,packageType,date,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data) {
$scope.paginationConf.totalItems=data.total; $scope.paginationConf.totalItems=data.total;
$scope.simpleCardCount = data.puSum;
$scope.postCardCount = data.youSum;
$scope.packageData = data.list; $scope.packageData = data.list;
console.log(data) console.log(data)
}) })
} }
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', $scope.doPackageQuery);
$scope.downloadXml = function(){
}
}); });
\ 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