Commit 0f4bce32 authored by wuzhilong's avatar wuzhilong

更新制证包生成:添加民族文字制证包解析和下载;

公安网反馈下载:更新派出所代码,派出所名称;
本地dblink改为yddblink
parent 18fbaf7a
......@@ -59,6 +59,7 @@ public class ReceiptApi {
List <Map <String, Object>> mapList=receiptService.selectCountById(id, replaceDate(beginDate), replaceDate(expireDate));
//判断是否生成了交接单
if(mapList.size() == 0){
//特征生成交接单
try {
//查询特证交接单所需数据(制证库)
Map <String, Object> resultDate=receiptService.selectReceiptListDate(id, replaceDate(beginDate), replaceDate(expireDate));
......@@ -66,8 +67,8 @@ public class ReceiptApi {
//邮寄证的单位代码设为人口大队的
Long card_type=Long.valueOf((BigDecimal) resultDate.get("CARD_TYPE") + "");
receiptListEntity.setCardTypeId(card_type);
if(card_type == 9){
receiptListEntity.setPoliceCode("110001580800");
if(card_type == 1||card_type == 2||card_type == 9){
receiptListEntity.setPoliceCode("110000000000");
} else {
receiptListEntity.setPoliceCode(resultDate.get("GAJG_DM").toString());
}
......@@ -83,12 +84,15 @@ public class ReceiptApi {
//生成特证交接单
long S=receiptService.createReceiptList(receiptListEntity);
//查询特证详单所需数据(盈信库)
Map <String, Object> detailedData=receiptService.selectDetailedData2(id, replaceDate(beginDate), replaceDate(expireDate));
String gajg_dm=(String) detailedData.get("GAJG_DM");
if (gajg_dm == null || "".equals(gajg_dm.trim())){
detailedData = receiptService.selectDetailedData3(id, replaceDate(beginDate), replaceDate(expireDate));
gajg_dm=(String) detailedData.get("GAJG_DM");
}
// Map <String, Object> detailedData=receiptService.selectDetailedData2(id, replaceDate(beginDate), replaceDate(expireDate));
// String gajg_dm=(String) detailedData.get("GAJG_DM");
// if (gajg_dm == null || "".equals(gajg_dm.trim())){
//直接从制证库查询数据
Map <String, Object> detailedData = receiptService.selectDetailedData3(id, replaceDate(beginDate), replaceDate(expireDate));
// gajg_dm=(String) detailedData.get("GAJG_DM");
// }
//交接单与详单使用同一个派出所代码
String gajg_dm=receiptListEntity.getPoliceCode();
String uploadNo=(String) detailedData.get("UPLOAD_NO");
String acceptNo2=(String) detailedData.get("ACCEPT_NO");
String name2=(String) detailedData.get("NAME");
......@@ -127,6 +131,7 @@ public class ReceiptApi {
return map;
}
} else {
//不是特征,普证、邮寄证保存交接单
try {
//根据身份证号查组号
String groupNo=receiptService.selectGroupNoById(id, replaceDate(beginDate), replaceDate(expireDate));
......@@ -164,12 +169,14 @@ public class ReceiptApi {
//查询这个受理号是否生成了详单
int receiptCount=receiptService.selectReceiptByAcceptNo(receiptListDate.get(n).get("ACCEPT_NO").toString());
//没有生成交接单详单
Map <String, Object> detailedData=receiptService.selectDetailedData(receiptListDate.get(n).get("ACCEPT_NO").toString());
String gajg_dm=(String) detailedData.get("GAJG_DM");
if (gajg_dm == null || "".equals(gajg_dm.trim())){
detailedData = receiptService.selectDetailedData4(receiptListDate.get(n).get("ACCEPT_NO").toString());
gajg_dm=(String) detailedData.get("GAJG_DM");
}
// Map <String, Object> detailedData=receiptService.selectDetailedData(receiptListDate.get(n).get("ACCEPT_NO").toString());
// String gajg_dm=(String) detailedData.get("GAJG_DM");
// if (gajg_dm == null || "".equals(gajg_dm.trim())){
Map <String, Object> detailedData = receiptService.selectDetailedData4(receiptListDate.get(n).get("ACCEPT_NO").toString());
// gajg_dm=(String) detailedData.get("GAJG_DM");
// }
//交接单和详单使用同一个派出所代码
String gajg_dm=receiptListEntity.getPoliceCode();
String uploadNo=(String) detailedData.get("UPLOAD_NO");
String acceptNo2=(String) detailedData.get("ACCEPT_NO");
String name2=(String) detailedData.get("NAME");
......
......@@ -48,7 +48,7 @@ public interface DetailReceiptListMapper {
"POLICE_CODE,FINISH_COUNT,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,CARD_TYPE_DIC.CARD_TYPE\n" +
"from RECEIPT_LIST \n" +
"left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = RECEIPT_LIST.POLICE_CODE\n" +
"left join CARD_TYPE_DIC on RECEIPT_LIST.CARD_TYPE_ID = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"left join CARD_TYPE_DIC on decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID) = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"where RECEIPT_LIST.id in (${str}) order by receipt_date")
public List<Map<String, Object>> selectPoliceDataById(@Param("str") String str);
......
......@@ -47,7 +47,7 @@ public interface GroupNoMapper {
* @param groupNo 组号信息
* @return
*/
@Select("select DISTINCT decode(substr(upload_no,18,1),8,8,decode(substr(ORIGINAL_NO,21,1),6,5,substr(ORIGINAL_NO,21,1))) card_type_id, ACC_GROUP_T.group_no ,ACC_GROUP_T.valid_count,ACC_GROUP_T.invalid_count, '000000' county_code\n" +
@Select("select DISTINCT decode(substr(ORIGINAL_NO,21,1),6,5,substr(ORIGINAL_NO,21,1)) card_type_id, ACC_GROUP_T.group_no ,ACC_GROUP_T.valid_count,ACC_GROUP_T.invalid_count, '000000' county_code\n" +
"from ACCYD_DBA.ACC_CARD_T@ACCUYD_LINK \n" +
"left join PREPRO_PERSON on PREPRO_PERSON.JMSFZSLH = acc_card_t.upload_no \n" +
"left join ACCYD_DBA.ACC_GROUP_T@ACCUYD_LINK on substr(acc_card_t.accept_no,0,8) = ACC_GROUP_T.group_no " +
......@@ -66,7 +66,7 @@ public interface GroupNoMapper {
* @return
*/
//todo
@Select("select DISTINCT decode(substr(ORIGINAL_NO,3,2),'99',6,substr(ORIGINAL_NO,21,1)) card_type_id, \n" +
@Select("select DISTINCT decode(substr(ORIGINAL_NO,21,1),'6',5,substr(ORIGINAL_NO,21,1)) card_type_id, \n" +
"PROD_GROUP_T.group_no ,\n" +
"PROD_GROUP_T.valid_count,\n" +
"PROD_GROUP_T.invalid_count, \n" +
......@@ -79,7 +79,7 @@ public interface GroupNoMapper {
"left join PRODYD_DBA.PROD_GROUP_RELATION_T@PRODYD_LINK \n" +
"on PROD_GROUP_RELATION_T.group_no =PROD_GROUP_T.group_no \n" +
"left join CARD_TYPE_DIC \n" +
"on decode(substr(ORIGINAL_NO,3,2),'99',6,substr(ORIGINAL_NO,21,1)) = CARD_TYPE_DIC.CARD_TYPE_ID \n" +
"on decode(substr(ORIGINAL_NO,21,1),'6',5,substr(ORIGINAL_NO,21,1)) = CARD_TYPE_DIC.CARD_TYPE_ID \n" +
"where PROD_GROUP_T.group_no in (${groupNo}) ")
public List<Map<String,Object>> selectGroupAtPRODUByGroupNo(@Param("groupNo") String groupNo);
......
......@@ -44,8 +44,8 @@ public interface PersonPostMapper {
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=${orderNumber} </when>" +
" <if test='state== 0 '> and PERSON_POST.print_date is null </if>" +
" <if test='state== 1 '> and PERSON_POST.print_date is not null </if>" +
" <if test='notNull== 1 '> and PREPRO_PERSON.JMSFZSLH is not null </if>" +
" <if test='notNull== 0 '> and PREPRO_PERSON.JMSFZSLH is null </if>" +
" <if test='notNull== 1 '> and PERSON_POST.ID_card is not null </if>" +
" <if test='notNull== 0 '> and PERSON_POST.ID_card is null </if>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=${latticeMouthInformation} </when>" +
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty}) </when>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between ${startDate} and ${endDate} </when>" +
......@@ -74,8 +74,8 @@ public interface PersonPostMapper {
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>" +
" <when test='state== 0 '> and PERSON_POST.print_date is null </when>" +
" <when test='state== 1 '> and PERSON_POST.print_date is not null </when>" +
" <if test='notNull== 1 '> and PERSON_POST.FIRST_WHITE is not null </if>" +
" <if test='notNull== 0 '> and PERSON_POST.FIRST_WHITE is null </if>" +
" <if test='notNull== 1 '> and PERSON_POST.ID_card is not null </if>" +
" <if test='notNull== 0 '> and PERSON_POST.ID_card is null </if>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty} ) </when>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </when>" +
......
......@@ -289,7 +289,8 @@ public interface ReceiptMapper {
"from RECEIPT_LIST \n" +
"left join PRODYD_DBA.DIC_UPLOAD_UNIT_T@PRODYD_LINK on DIC_UPLOAD_UNIT_T.UPLOAD_UNIT_NO = RECEIPT_LIST.POLICE_CODE\n" +
"left join CARD_TYPE_DIC on RECEIPT_LIST.CARD_TYPE_ID = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"where to_char(DOWNLOAD_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate}")
"where to_char(DOWNLOAD_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate}" +
" order by receipt_date")
public List<Map<String, Object>> selectPoliceDataByDownLoadDate(@Param("startDate") String startDate,@Param("endDate") String endDate);
@Select("<script> select * from DETAIL_RECEIPT_LIST " +
......
......@@ -25,7 +25,7 @@ public interface TaskListMapper {
@Select("select DISTINCT CARD_TYPE_DIC.*, ACC_GROUP_T.* ,'000000' COUNTY_CODE,'0000' COUNTYNAME from ACCYD_DBA.ACC_CARD_T@ACCUYD_LINK \n" +
"left join ACCYD_DBA.ACC_GROUP_T@ACCUYD_LINK on substr(acc_card_t.accept_no,0,8) = ACC_GROUP_T.group_no\n" +
"left join ACCYD_DBA.ACC_GROUP_RELATION_T@ACCUYD_LINK on ACC_GROUP_RELATION_T.group_no =ACC_GROUP_T.group_no\n" +
"left join CARD_TYPE_DIC on decode(decode(substr(ORIGINAL_NO,21,1),6,5,substr(ORIGINAL_NO,21,1))) = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"left join CARD_TYPE_DIC on decode(substr(ORIGINAL_NO,21,1),6,5,substr(ORIGINAL_NO,21,1)) = CARD_TYPE_DIC.CARD_TYPE_ID\n" +
"where " +
"ACC_GROUP_T.group_no not in (select group_no from group_no)\n" +
"and to_char(ACC_GROUP_T.IMPORT_TIME,'yyyyMMdd')=#{submitDate} \n" +
......
......@@ -149,7 +149,13 @@ public class ExportExcel {
cell1 = row1.createCell(0); //设定值
cell1.setCellValue("null".equals(list.get(i).get("QR_CODE") + "") ? "" : list.get(i).get("QR_CODE") + "");
cell1 = row1.createCell(1); //设定值
cell1.setCellValue("null".equals(list.get(i).get("POLICE_CODE") + "") ? "" : list.get(i).get("POLICE_CODE") + "");
// cell1.setCellValue("null".equals(list.get(i).get("POLICE_CODE") + "") ? "" : list.get(i).get("POLICE_CODE") + "");
//更改个人邮寄单位代码,使用北京市公安局代码
String POLICE_CODE="null".equals(list.get(i).get("POLICE_CODE") + "") ? "" : list.get(i).get("POLICE_CODE") + "";
if ("110001580800".equals(POLICE_CODE)){
POLICE_CODE="110000000000";
}
cell1.setCellValue(POLICE_CODE);
cell1 = row1.createCell(2); //设定值
cell1.setCellValue("null".equals(list.get(i).get("GAJG_MC") + "") ? "" : list.get(i).get("GAJG_MC") + "");
cell1 = row1.createCell(3); //设定值
......
......@@ -57,7 +57,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.selected = [];
$scope.isHistory=0;
var date = $('#datepicker').val();
if(date=='{{choseDate}}'){
if(date=='{{choseDate}}'||date.length<1){
date=$scope.choseDate;
}
HttpService.getTaskListToCreate(date,function(data){
......
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