Commit 0d362c60 authored by Liuxb@yingxingroup.net's avatar Liuxb@yingxingroup.net

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

parents 4f1d1e01 2a19af74
...@@ -771,12 +771,12 @@ public class ReceiptApi { ...@@ -771,12 +771,12 @@ public class ReceiptApi {
* @return * @return
*/ */
@RequestMapping("queryPoliceDataByDownLoadDate") @RequestMapping("queryPoliceDataByDownLoadDate")
public List<Map<String, Object>> queryPoliceDataByDownLoadDate(@RequestParam("startDate") String startDate,@RequestParam("endDate") String endDate, HttpServletRequest requ) { public List<Map<String, Object>> queryPoliceDataByDownLoadDate(@RequestParam("startDate") String startDate,@RequestParam("endDate") String endDate,@RequestParam("gat") String gat, HttpServletRequest requ) {
String remoteAddr = requ.getRemoteAddr(); String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr); MDC.put("ip", remoteAddr);
List <Map <String, Object>> policeData = new ArrayList <>(); List <Map <String, Object>> policeData = new ArrayList <>();
try { try {
policeData = receiptService.selectPoliceDataByDownLoadDate(replaceDate(startDate), replaceDate(endDate)); policeData = receiptService.selectPoliceDataByDownLoadDate(replaceDate(startDate), replaceDate(endDate),gat);
}catch (Exception e) { }catch (Exception e) {
logger.error("开始时间:" + startDate + "结束时间:" + endDate); logger.error("开始时间:" + startDate + "结束时间:" + endDate);
logger.error("Exception 查询公安网数据(历史)异常", e); logger.error("Exception 查询公安网数据(历史)异常", e);
......
...@@ -22,7 +22,8 @@ public interface DetailReceiptListMapper { ...@@ -22,7 +22,8 @@ public interface DetailReceiptListMapper {
*/ */
@Select("select DETAIL_RECEIPT_LIST.id,DETAIL_RECEIPT_LIST.ACCEPT_NO,DETAIL_RECEIPT_LIST.SIGN_GOVT,DETAIL_RECEIPT_LIST.NAME,DETAIL_RECEIPT_LIST.UPLOAD_NO,\n" + @Select("select DETAIL_RECEIPT_LIST.id,DETAIL_RECEIPT_LIST.ACCEPT_NO,DETAIL_RECEIPT_LIST.SIGN_GOVT,DETAIL_RECEIPT_LIST.NAME,DETAIL_RECEIPT_LIST.UPLOAD_NO,\n" +
"DETAIL_RECEIPT_LIST.sex,DETAIL_RECEIPT_LIST.CARD_ID,DETAIL_RECEIPT_LIST.POLICE_CODE,DIC_UPLOAD_UNIT_T.UNIT_NAME POLICE_NAME,to_char(RECEIPT_LIST.CHECK_DATE,'yyyyMMdd') CHECK_DATE,\n" + "DETAIL_RECEIPT_LIST.sex,DETAIL_RECEIPT_LIST.CARD_ID,DETAIL_RECEIPT_LIST.POLICE_CODE,DIC_UPLOAD_UNIT_T.UNIT_NAME POLICE_NAME,to_char(RECEIPT_LIST.CHECK_DATE,'yyyyMMdd') CHECK_DATE,\n" +
"RECEIPT_LIST.CHECK_NAME,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.OLD_CARD_TYPE_ID,PERSON_POST.WAYBILL_NUMBER,DETAIL_RECEIPT_LIST.note,RECEIPT_LIST.QR_CODE,DETAIL_RECEIPT_LIST.APPLY_PHONE \n" + "RECEIPT_LIST.CHECK_NAME,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.OLD_CARD_TYPE_ID,PERSON_POST.WAYBILL_NUMBER,DETAIL_RECEIPT_LIST.note,RECEIPT_LIST.QR_CODE,DETAIL_RECEIPT_LIST.APPLY_PHONE," +
"DETAIL_RECEIPT_LIST.ADDRESS,DETAIL_RECEIPT_LIST.GAT_ID \n" +
"from DETAIL_RECEIPT_LIST \n" + "from DETAIL_RECEIPT_LIST \n" +
"left join RECEIPT_LIST on DETAIL_RECEIPT_LIST.RECEIPT_ID = RECEIPT_LIST.ID\n" + "left join RECEIPT_LIST on DETAIL_RECEIPT_LIST.RECEIPT_ID = RECEIPT_LIST.ID\n" +
"left join PERSON_POST on PERSON_POST.FIRST_WHITE = DETAIL_RECEIPT_LIST.UPLOAD_NO\n" + "left join PERSON_POST on PERSON_POST.FIRST_WHITE = DETAIL_RECEIPT_LIST.UPLOAD_NO\n" +
......
...@@ -331,14 +331,17 @@ public interface ReceiptMapper { ...@@ -331,14 +331,17 @@ public interface ReceiptMapper {
"where DOWNLOAD_DATE is null and to_char(receipt_date,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} order by receipt_date") "where DOWNLOAD_DATE is null and to_char(receipt_date,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} order by receipt_date")
public List<Map<String, Object>> selectPoliceData(@Param("startDate") String startDate,@Param("endDate") String endDate); public List<Map<String, Object>> selectPoliceData(@Param("startDate") String startDate,@Param("endDate") String endDate);
@Select("select RECEIPT_LIST.id,QR_CODE,to_char(DOWNLOAD_DATE,'yyyyMMddHH24') receipt_date ,\n" + @Select("<script> select RECEIPT_LIST.id,QR_CODE,to_char(DOWNLOAD_DATE,'yyyyMMddHH24') receipt_date ,\n" +
"POLICE_CODE,FINISH_COUNT,RECEIPT_LIST.CARD_TYPE_ID,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,CARD_TYPE_DIC.CARD_TYPE\n" + "POLICE_CODE,FINISH_COUNT,RECEIPT_LIST.CARD_TYPE_ID,DIC_UPLOAD_UNIT_T.UNIT_NAME GAJG_MC,CARD_TYPE_DIC.CARD_TYPE\n" +
"from RECEIPT_LIST \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 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 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") "<if test = 'gat !=\"\"'> " +
public List<Map<String, Object>> selectPoliceDataByDownLoadDate(@Param("startDate") String startDate,@Param("endDate") String endDate); "AND RECEIPT_LIST.CARD_TYPE_ID in (5,7) " +
" </if>" +
" order by receipt_date </script> ")
public List<Map<String, Object>> selectPoliceDataByDownLoadDate(@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("gat") String gat);
@Select("<script> select * from DETAIL_RECEIPT_LIST " + @Select("<script> select * from DETAIL_RECEIPT_LIST " +
"where to_char(SUBMIT_DATE,'yyyyMMdd') between #{startDate} and #{endDate} " + "where to_char(SUBMIT_DATE,'yyyyMMdd') between #{startDate} and #{endDate} " +
...@@ -402,6 +405,20 @@ public interface ReceiptMapper { ...@@ -402,6 +405,20 @@ public interface ReceiptMapper {
"and cardT.ACCEPT_NO like #{groupNo}") "and cardT.ACCEPT_NO like #{groupNo}")
public boolean createDetailReceiptList(@Param("receiptId")String receiptId,@Param("groupNo")String groupNo,@Param("policeCode")String policeCode); public boolean createDetailReceiptList(@Param("receiptId")String receiptId,@Param("groupNo")String groupNo,@Param("policeCode")String policeCode);
//生成交接单详单——港澳台
@Insert("INSERT INTO DETAIL_RECEIPT_LIST(UPLOAD_NO,accept_no,name,POLICE_CODE,card_id,SIGN_GOVT,RECEIPT_ID,SEX,APPLY_PHONE,GAT_ID,ADDRESS)\n" +
"select cardT.UPLOAD_NO,cardT.ACCEPT_NO,cardT.NAME,#{policeCode},cardT.ID_NO,cardT.SIGN_GOVT,#{receiptId},cardT.SEX_NO,applyInfo.APPLY_PHONE," +
"cardT.CARD_NO,cardT.ADDR1||cardT.ADDR2||cardT.ADDR3\n" +
"from PRODYD_DBA.prod_card_t@PRODYD_LINK cardT " +
"LEFT JOIN PRODYD_DBA.PROD_APPLY_INFO_T@PRODYD_LINK applyInfo \n" +
"ON applyInfo.ACCEPT_NO = cardT.ACCEPT_NO\n" +
"where cardT.ACCEPT_NO not in \n" +
"(select ACCEPT_NO from SPECIAL_CARD \n" +
"where GROUP_NO like #{groupNo} " +
" AND SPECIAL_TYPE<> 1 ) \n" +
"and cardT.ACCEPT_NO like #{groupNo}")
public boolean createDetailReceiptList_GAT(@Param("receiptId")String receiptId,@Param("groupNo")String groupNo,@Param("policeCode")String policeCode);
//查询历史交接单详单是否存在 //查询历史交接单详单是否存在
@Select("select detail_receipt_list.UPLOAD_NO,detail_receipt_list.ACCEPT_NO,detail_receipt_list.NAME,\n" + @Select("select detail_receipt_list.UPLOAD_NO,detail_receipt_list.ACCEPT_NO,detail_receipt_list.NAME,\n" +
"detail_receipt_list.POLICE_CODE,detail_receipt_list.CARD_ID ,detail_receipt_list.NOTE,\n" + "detail_receipt_list.POLICE_CODE,detail_receipt_list.CARD_ID ,detail_receipt_list.NOTE,\n" +
......
...@@ -143,6 +143,7 @@ public interface SelectSerialNumberMapper { ...@@ -143,6 +143,7 @@ public interface SelectSerialNumberMapper {
"COUNTY_DIC.COUNTYNAME,\n" + "COUNTY_DIC.COUNTYNAME,\n" +
"COUNTY_DIC.COUNTY_CODE,\n" + "COUNTY_DIC.COUNTY_CODE,\n" +
"ACC_CARD_T.NAME,\n" + "ACC_CARD_T.NAME,\n" +
"ACC_CARD_T.UPLOAD_NO,\n" +
"ACC_CARD_T.ID_NO,\n" + "ACC_CARD_T.ID_NO,\n" +
"ACC_CARD_T.SEX_NO,\n" + "ACC_CARD_T.SEX_NO,\n" +
"AU.UNIT_NAME AS GAJG1,\n" + "AU.UNIT_NAME AS GAJG1,\n" +
...@@ -159,7 +160,7 @@ public interface SelectSerialNumberMapper { ...@@ -159,7 +160,7 @@ public interface SelectSerialNumberMapper {
public List<Map<String,Object>> selectByAcceptNoOrCardIdFromACC(String id); public List<Map<String,Object>> selectByAcceptNoOrCardIdFromACC(String id);
@Select("SELECT PROD_CARD_T.ACCEPT_NO,COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE,PROD_CARD_T.NAME,\n" + @Select("SELECT PROD_CARD_T.ACCEPT_NO,COUNTY_DIC.COUNTYNAME,COUNTY_DIC.COUNTY_CODE,PROD_CARD_T.NAME,\n" +
"PROD_CARD_T.ID_NO,PROD_CARD_T.SEX_NO,\n" + "PROD_CARD_T.ID_NO,PROD_CARD_T.UPLOAD_NO,PROD_CARD_T.SEX_NO,\n" +
"decode(CHECK_DATE, null,decode(ELECTRIC_WRITE_DATE, null,decode(DOWNLOAD_DATE, null,1,2,5)),6) state,\n" + "decode(CHECK_DATE, null,decode(ELECTRIC_WRITE_DATE, null,decode(DOWNLOAD_DATE, null,1,2,5)),6) state,\n" +
"decode(CHECK_DATE, null,decode(ELECTRIC_WRITE_DATE, null,decode(DOWNLOAD_DATE, null,EXPORT_DATE,DOWNLOAD_DATE,ELECTRIC_WRITE_DATE)),CHECK_DATE) Last_date,\n" + "decode(CHECK_DATE, null,decode(ELECTRIC_WRITE_DATE, null,decode(DOWNLOAD_DATE, null,EXPORT_DATE,DOWNLOAD_DATE,ELECTRIC_WRITE_DATE)),CHECK_DATE) Last_date,\n" +
"AU.UNIT_NAME AS GAJG1," + "AU.UNIT_NAME AS GAJG1," +
......
...@@ -1610,21 +1610,54 @@ public interface TaskListMapper { ...@@ -1610,21 +1610,54 @@ public interface TaskListMapper {
@Delete("delete task where task_id = ${taskId}") @Delete("delete task where task_id = ${taskId}")
public boolean deleteTaskByTaskId(@Param("taskId")long taskId); public boolean deleteTaskByTaskId(@Param("taskId")long taskId);
@Select("select a.card_type,a.finish_date,sum(a.valid_count) valid_count,sum(decode(a.failed_count,null,0,a.failed_count)) failed_count from (\n" + @Select("select * from (\n" +
" select task.TASK_ID,card_type,to_char(punching_date,'yyyyMMdd') finish_date ,FAILED_CARD.failed_count,\n" + " select \n" +
" a.finish_date,\n" +
" sum(decode(card_type,5,a.valid_count)) \"ga\",\n" +
" sum(decode(card_type,7,a.valid_count)) \"tw\",\n" +
" sum(decode(card_type,8,a.valid_count)) \"yd\",\n" +
" sum(decode(card_type,9,a.valid_count)) \"yj\"\n" +
" from \n" +
" ( select task.TASK_ID,card_type,to_char(punching_date,'yyyyMMdd') finish_date,\n" +
" sum(decode(group_no.VALID_COUNT,null,1,group_no.VALID_COUNT-group_no.SPECIAL_CARD_COUNT)) valid_count\n" + " sum(decode(group_no.VALID_COUNT,null,1,group_no.VALID_COUNT-group_no.SPECIAL_CARD_COUNT)) valid_count\n" +
" from task \n" + " from task \n" +
" left join group_no on task.TASK_ID = group_no.TASK_ID\n" + " left join group_no on task.TASK_ID = group_no.TASK_ID\n" +
" left join SPECIAL_CARD on task.TASK_ID = SPECIAL_CARD.TASK_ID\n" + " left join SPECIAL_CARD on task.TASK_ID = SPECIAL_CARD.TASK_ID \n" +
" left join (select TASK_ID,count(FAILED_CARD.accept_no) failed_count \n" + " where to_char(punching_date,'yyyyMMdd') BETWEEN #{startDate} and #{endDate}\n" +
" group by task.TASK_ID, card_type, to_char(punching_date,'yyyyMMdd') ) a\n" +
" group by a.finish_date ) a\n" +
" left join (\n" +
" select to_char(punching_date,'yyyyMMdd') finish_date,\n" +
" count(decode(card_type,5,card_type)) \"gaf\",\n" +
" count(decode(card_type,7,card_type)) \"twf\",\n" +
" count(decode(card_type,8,card_type)) \"ydf\",\n" +
" count(decode(card_type,9,card_type)) \"yjf\"\n" +
" from task\n" +
"left join (\n" +
" select TASK_ID,count(FAILED_CARD.accept_no) failed_count\n" +
" from FAILED_CARD group by TASK_ID\n" +
" ) FAILED_CARD on FAILED_CARD.TASK_ID = task.TASK_ID \n" +
" where to_char(punching_date,'yyyyMMdd') BETWEEN #{startDate} and #{endDate}\n" +
" group by to_char(punching_date,'yyyyMMdd')\n" +
" ) b\n" +
" on a.finish_date=b.finish_date\n" +
" left join (\n" +
" select to_char(FINISH_DATE,'yyyyMMdd') finish_date,\n" +
" count(decode(card_type,5,card_type)) \"gab\",\n" +
" count(decode(card_type,7,card_type)) \"twb\",\n" +
" count(decode(card_type,8,card_type)) \"ydb\",\n" +
" count(decode(card_type,9,card_type)) \"yjb\"\n" +
" from FAILED_CARD \n" + " from FAILED_CARD \n" +
" group by TASK_ID\n" + " left join task\n" +
" ) FAILED_CARD on FAILED_CARD.TASK_ID = task.TASK_ID\n" + " on task.TASK_ID=FAILED_CARD.TASK_ID\n" +
" where to_char(punching_date,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" + " where to_char(FINISH_DATE,'yyyyMMdd') \n" +
" group by task.TASK_ID, card_type, to_char(punching_date,'yyyyMMdd'), FAILED_CARD.failed_count\n" + " BETWEEN #{startDate} and #{endDate} \n" +
" ) a group by a.card_type, a.finish_date") " group by to_char(FINISH_DATE,'yyyyMMdd') ) c\n" +
" on a.finish_date=c.finish_date" +
" order by a.finish_date")
public List<Map<String, Object>> selectQualityCheckReport(@Param("startDate")String startDate,@Param("endDate") String endDate); public List<Map<String, Object>> selectQualityCheckReport(@Param("startDate")String startDate,@Param("endDate") String endDate);
@Select("select to_char(FINISH_DATE,'yyyyMMdd')FINISH_DATE,count(FAILED_CARD.accept_no) failed_count \n" + @Select("select to_char(FINISH_DATE,'yyyyMMdd')FINISH_DATE,count(FAILED_CARD.accept_no) failed_count \n" +
"from FAILED_CARD \n" + "from FAILED_CARD \n" +
"where to_char(FINISH_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" + "where to_char(FINISH_DATE,'yyyyMMdd') BETWEEN #{startDate} and #{endDate} \n" +
......
...@@ -90,7 +90,7 @@ public interface ReceiptService { ...@@ -90,7 +90,7 @@ public interface ReceiptService {
public List<Map<String,Object>> selectPoliceData(String startDate,String endDate); public List<Map<String,Object>> selectPoliceData(String startDate,String endDate);
public List<Map<String,Object>> selectPoliceDataByDownLoadDate(String startDate,String endDate); public List<Map<String,Object>> selectPoliceDataByDownLoadDate(String startDate,String endDate,String gat);
public List<Map<String,Object>> selectQrCodeByCardID(String id,String beginDate,String expireDate); public List<Map<String,Object>> selectQrCodeByCardID(String id,String beginDate,String expireDate);
......
...@@ -84,10 +84,17 @@ public class ImportXmlServiceImpl implements ImportXmlService { ...@@ -84,10 +84,17 @@ public class ImportXmlServiceImpl implements ImportXmlService {
writer.close(); writer.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
return false;
} }
try {
preproPersonDto.setTpPath(url); preproPersonDto.setTpPath(url);
preproPersonMapper.savePreproPersonEntity(preproPersonDto); preproPersonMapper.savePreproPersonEntity(preproPersonDto);
// preproPersonMapper.savePreproPersonCLOB(preproPersonDto); // preproPersonMapper.savePreproPersonCLOB(preproPersonDto);
}catch (Exception e){
e.printStackTrace();
return false;
}
} }
return true; return true;
} }
......
...@@ -329,8 +329,8 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -329,8 +329,8 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @Override
public List<Map<String, Object>> selectPoliceDataByDownLoadDate(String startDate, String endDate) { public List<Map<String, Object>> selectPoliceDataByDownLoadDate(String startDate, String endDate,String gat) {
List<Map<String, Object>> list = receiptMapper.selectPoliceDataByDownLoadDate(startDate, endDate); List<Map<String, Object>> list = receiptMapper.selectPoliceDataByDownLoadDate(startDate, endDate,gat);
Map<String, Object> dateMap= new LinkedHashMap<>(); Map<String, Object> dateMap= new LinkedHashMap<>();
for (Map<String, Object> map :list){ for (Map<String, Object> map :list){
if (dateMap.containsKey(map.get("RECEIPT_DATE")+"")){ if (dateMap.containsKey(map.get("RECEIPT_DATE")+"")){
...@@ -511,7 +511,12 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -511,7 +511,12 @@ public class ReceiptServiceImpl implements ReceiptService {
}; };
@Override @Override
public boolean createDetailReceiptList(String receiptId,String groupNo,String policeCode) { public boolean createDetailReceiptList(String receiptId,String groupNo,String policeCode) {
if (groupNo.substring(0,1).equals("E")){
receiptMapper.createDetailReceiptList(receiptId,groupNo,policeCode); receiptMapper.createDetailReceiptList(receiptId,groupNo,policeCode);
}else {
receiptMapper.createDetailReceiptList_GAT(receiptId,groupNo,policeCode);
}
return true; return true;
} }
private String createGroupNoMiss(List<String> c, List<String> nsList) { private String createGroupNoMiss(List<String> c, List<String> nsList) {
......
...@@ -13,10 +13,7 @@ import org.springframework.stereotype.Service; ...@@ -13,10 +13,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.*;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Service @Service
public class TaskListServiceImpl implements TaskListService { public class TaskListServiceImpl implements TaskListService {
...@@ -1253,72 +1250,37 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -1253,72 +1250,37 @@ public class TaskListServiceImpl implements TaskListService {
@Override @Override
public List<Map<String, Object>> selectQualityCheckReport(String startDate, String endDate) { public List<Map<String, Object>> selectQualityCheckReport(String startDate, String endDate) {
List<Map<String, Object>> mapList = taskListMapper.selectQualityCheckReport(startDate, endDate); List<Map<String, Object>> mapList = taskListMapper.selectQualityCheckReport(startDate, endDate);
List<Map<String, Object>> maps = taskListMapper.selectQualityCheckReportBu(startDate, endDate); int[] type_count=new int[12];
Map<String,Object> dateMap = new LinkedHashMap<>(); Map<String, Object> countMap = new LinkedHashMap<>();
Map<String,Object> stringObjectMap = new LinkedHashMap<>(); for (Map<String,Object> map :mapList) {
stringObjectMap.put("VALID_COUNT",0); type_count[0] =type_count[0]+(map.get("ga")==null?0:Integer.valueOf(map.get("ga")+""));
stringObjectMap.put("FAILED_COUNT",0); type_count[1] =type_count[1]+(map.get("gaf")==null?0:Integer.valueOf(map.get("gaf")+""));
int count =0; type_count[2] =type_count[2]+(map.get("gab")==null?0:Integer.valueOf(map.get("gab")+""));
int failedCount =0; type_count[3] =type_count[3]+(map.get("tw")==null?0:Integer.valueOf(map.get("tw")+""));
int buCount =0; type_count[4] =type_count[4]+(map.get("twf")==null?0:Integer.valueOf(map.get("twf")+""));
type_count[5] =type_count[5]+(map.get("twb")==null?0:Integer.valueOf(map.get("twb")+""));
for (Map<String,Object> map :mapList){ type_count[6] =type_count[6]+(map.get("yd")==null?0:Integer.valueOf(map.get("yd")+""));;
count+=Integer.valueOf(map.get("VALID_COUNT")+""); type_count[7] =type_count[7]+(map.get("ydf")==null?0:Integer.valueOf(map.get("ydf")+"")); ;
failedCount+=Integer.valueOf(map.get("FAILED_COUNT")+""); type_count[8] =type_count[8]+(map.get("ydb")==null?0:Integer.valueOf(map.get("ydb")+"")); ;
if (dateMap.containsKey(map.get("FINISH_DATE").toString())){ type_count[9] =type_count[9]+(map.get("yj")==null?0:Integer.valueOf(map.get("yj")+""));;
Map<String,Object> objectMap =(Map<String, Object>)dateMap.get(map.get("FINISH_DATE").toString()); type_count[10] =type_count[10]+(map.get("yjf")==null?0:Integer.valueOf(map.get("yjf")+"")); ;
objectMap.put(map.get("CARD_TYPE").toString(),map); type_count[11] =type_count[11]+(map.get("yjb")==null?0:Integer.valueOf(map.get("yjb")+"")); ;
dateMap.put(map.get("FINISH_DATE").toString(),objectMap); }
}else { countMap.put("ga",type_count[0]);
Map<String,Object> objectMap = new LinkedHashMap<>(); countMap.put("gaf",type_count[1]);
objectMap.put("0",stringObjectMap); countMap.put("gab",type_count[2]);
objectMap.put("1",stringObjectMap); countMap.put("tw",type_count[3]);
objectMap.put("2",stringObjectMap); countMap.put("twf",type_count[4]);
objectMap.put("5",stringObjectMap); countMap.put("twb",type_count[5]);
objectMap.put("6",stringObjectMap); countMap.put("yd",type_count[6]);
objectMap.put("7",stringObjectMap); countMap.put("ydf",type_count[7]);
objectMap.put("8",stringObjectMap); countMap.put("ydb",type_count[8]);
objectMap.put("9",stringObjectMap); countMap.put("yj",type_count[9]);
objectMap.put("bu",stringObjectMap); countMap.put("yjf",type_count[10]);
objectMap.put(map.get("CARD_TYPE").toString(),map); countMap.put("yjb",type_count[11]);
dateMap.put(map.get("FINISH_DATE").toString(),objectMap); countMap.put("FINISH_DATE","合计");
} mapList.add(countMap);
} return mapList;
for (Map<String,Object> map :maps){
buCount+=Integer.valueOf(map.get("FAILED_COUNT")+"");
}
for (String date :dateMap.keySet()){
for (Map<String,Object> map :maps){
if (date.equals(map.get("FINISH_DATE").toString())){
Map<String,Object> objectMap =(Map<String, Object>)dateMap.get(date);
objectMap.put("bu",map);
dateMap.put(map.get("FINISH_DATE").toString(),objectMap);
}
}
}
for (String date :dateMap.keySet()){
Map<String,Object> objectMap =(Map<String, Object>)dateMap.get(date);
List<Map<String,Object>> list = new ArrayList<>();
for (String cardType:objectMap.keySet()){
list.add((Map<String, Object>)objectMap.get(cardType));
}
dateMap.put(date,list);
}
Map<String,Object> objectMap = new LinkedHashMap<>();
objectMap.put("validCount",count);
objectMap.put("failedCount",failedCount);
objectMap.put("buCount",buCount);
dateMap.put("合计",objectMap);
List<Map<String,Object>> list = new ArrayList<>();
for(String date:dateMap.keySet()){
Map<String,Object> map = new LinkedHashMap<>();
map.put("date",date);
map.put("list",dateMap.get(date));
list.add(map);
}
return list;
} }
@Override @Override
......
...@@ -48,6 +48,8 @@ public class ExportExcel { ...@@ -48,6 +48,8 @@ public class ExportExcel {
sheet.setColumnWidth(13, 30 * 110); sheet.setColumnWidth(13, 30 * 110);
sheet.setColumnWidth(14, 30 * 110); sheet.setColumnWidth(14, 30 * 110);
sheet.setColumnWidth(15, 30 * 110); sheet.setColumnWidth(15, 30 * 110);
sheet.setColumnWidth(16, 40 * 110);
sheet.setColumnWidth(17, 80 * 110);
//第三步创建行row:添加表头0行 //第三步创建行row:添加表头0行
HSSFRow row = sheet.createRow(0); HSSFRow row = sheet.createRow(0);
HSSFCellStyle style = wb.createCellStyle();//样式 HSSFCellStyle style = wb.createCellStyle();//样式
...@@ -89,6 +91,10 @@ public class ExportExcel { ...@@ -89,6 +91,10 @@ public class ExportExcel {
cell.setCellValue("备注"); cell.setCellValue("备注");
cell = row.createCell(15); //设定值 cell = row.createCell(15); //设定值
cell.setCellValue("联系方式"); cell.setCellValue("联系方式");
cell = row.createCell(16); //设定值
cell.setCellValue("通行证号码");
cell = row.createCell(17); //设定值
cell.setCellValue("住址");
for (int i =0;i<mapList.size();i++){ for (int i =0;i<mapList.size();i++){
row = sheet.createRow(i + 1); row = sheet.createRow(i + 1);
...@@ -124,6 +130,10 @@ public class ExportExcel { ...@@ -124,6 +130,10 @@ public class ExportExcel {
cell.setCellValue("null".equals(mapList.get(i).get("NOTE")+"")?"":mapList.get(i).get("NOTE")+""); cell.setCellValue("null".equals(mapList.get(i).get("NOTE")+"")?"":mapList.get(i).get("NOTE")+"");
cell = row.createCell(15); //设定值 cell = row.createCell(15); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("APPLY_PHONE")+"")?"":mapList.get(i).get("APPLY_PHONE")+""); cell.setCellValue("null".equals(mapList.get(i).get("APPLY_PHONE")+"")?"":mapList.get(i).get("APPLY_PHONE")+"");
cell = row.createCell(16); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("GAT_ID")+"")?"":mapList.get(i).get("GAT_ID")+"");
cell = row.createCell(17); //设定值
cell.setCellValue("null".equals(mapList.get(i).get("ADDRESS")+"")?"":mapList.get(i).get("ADDRESS")+"");
} }
HSSFSheet sheet1 = wb.createSheet("公安网信息交接表"); HSSFSheet sheet1 = wb.createSheet("公安网信息交接表");
......
...@@ -1123,14 +1123,14 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -1123,14 +1123,14 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
getHistoryGongan:function(startDate,endDate,success){ getHistoryGongan:function(startDate,endDate,str,success){
console.log(startDate,endDate);
$http({ $http({
method: 'GET', method: 'GET',
url: "../ReceiptApi/queryPoliceDataByDownLoadDate"+urlTimeStamp(), url: "../ReceiptApi/queryPoliceDataByDownLoadDate"+urlTimeStamp(),
params:{ params:{
startDate:startDate, startDate:startDate,
endDate:endDate endDate:endDate,
gat:str
} }
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
......
...@@ -11,8 +11,11 @@ ...@@ -11,8 +11,11 @@
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate1" id="datepicker1" readonly/> <input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate1" id="datepicker1" readonly/>
<span></span> <span></span>
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate" id="datepicker2" readonly/> <input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate" id="datepicker2" readonly/>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 10px;" ng-click="searchHistory()">查询历史</button>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;" ng-click="doSearchGongan()">查询</button> <button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 5px;" ng-click="searchHistory('')">查询历史</button>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 5px;" ng-click="doSearchGongan()">查询</button>
<button type="button" class="btn btn-success pull-right" style="height: 30px;line-height: 17px;margin-left: 5px;" ng-click="searchHistory('gat')">查询港澳台历史</button>
</div> </div>
<!-- /.box-tools --> <!-- /.box-tools -->
</div> </div>
......
...@@ -53,7 +53,6 @@ angular.module('AvatarCheck.downloadGongan', ['ngRoute', 'AvatarCheck.http']) ...@@ -53,7 +53,6 @@ angular.module('AvatarCheck.downloadGongan', ['ngRoute', 'AvatarCheck.http'])
listStr += json.list[i] listStr += json.list[i]
} }
} }
console.log($rootScope.loginData.name)
var url = '../exportExcel/printExcelData?name='+$rootScope.loginData.name+"&isHistory="+$scope.isHistory+"&list="+listStr; var url = '../exportExcel/printExcelData?name='+$rootScope.loginData.name+"&isHistory="+$scope.isHistory+"&list="+listStr;
var a = document.createElement("a"); var a = document.createElement("a");
document.body.appendChild(a); document.body.appendChild(a);
...@@ -113,18 +112,17 @@ angular.module('AvatarCheck.downloadGongan', ['ngRoute', 'AvatarCheck.http']) ...@@ -113,18 +112,17 @@ angular.module('AvatarCheck.downloadGongan', ['ngRoute', 'AvatarCheck.http'])
$scope.gonganData[i].isActive=false; $scope.gonganData[i].isActive=false;
} }
} }
console.log($scope.gonganData,"点击查询公安网反馈");
}) })
}; };
if($rootScope.loginData.login==true){ if($rootScope.loginData.login==true){
$scope.doSearchGongan(); $scope.doSearchGongan();
} }
$scope.searchHistory = function () { $scope.searchHistory = function (str) {
$scope.isHistory = 1; $scope.isHistory = 1;
var startDate=$('#datepicker1').val(); var startDate=$('#datepicker1').val();
var endDate=$('#datepicker2').val(); var endDate=$('#datepicker2').val();
HttpService.getHistoryGongan(startDate,endDate,function(data){ HttpService.getHistoryGongan(startDate,endDate, str,function(data){
$scope.gonganHistoryData=data; $scope.gonganHistoryData=data;
for(var i=0;i<$scope.gonganHistoryData.length;i++){ for(var i=0;i<$scope.gonganHistoryData.length;i++){
if(i==$scope.currentTab){ if(i==$scope.currentTab){
...@@ -133,16 +131,16 @@ angular.module('AvatarCheck.downloadGongan', ['ngRoute', 'AvatarCheck.http']) ...@@ -133,16 +131,16 @@ angular.module('AvatarCheck.downloadGongan', ['ngRoute', 'AvatarCheck.http'])
$scope.gonganHistoryData[i].isActive=false; $scope.gonganHistoryData[i].isActive=false;
} }
} }
console.log($scope.gonganHistoryData);
}) })
} }
$scope.checkAllPolice = function ($event,date) { $scope.checkAllPolice = function ($event,date) {
console.log(date)
var checkAllPolice = $event.target; var checkAllPolice = $event.target;
var checkbox =document.getElementsByName("checkPolice"+date); var checkbox =document.getElementsByName("checkPolice"+date);
console.log(checkbox.length);
for(var i=0;i<checkbox.length;i++){ for(var i=0;i<checkbox.length;i++){
if(checkAllPolice.checked) { if(checkAllPolice.checked) {
checkbox[i].checked = true; checkbox[i].checked = true;
......
...@@ -27,48 +27,49 @@ ...@@ -27,48 +27,49 @@
<thead> <thead>
<tr> <tr>
<th style="text-align: center;">日期</th> <th style="text-align: center;">日期</th>
<th style="text-align: center;" colspan="2">快证</th> <th style="text-align: center;" colspan="3">港澳证</th>
<th style="text-align: center;" colspan="2">重做登记</th> <th style="text-align: center;" colspan="3">台湾证</th>
<th style="text-align: center;" colspan="2">港澳证</th> <th style="text-align: center;" colspan="3">异地证</th>
<th style="text-align: center;" colspan="2">台湾证</th> <th style="text-align: center;" colspan="3">异地证邮寄</th>
<th style="text-align: center;" colspan="2">异地证</th>
<th style="text-align: center;" colspan="2">补证</th>
</tr> </tr>
<tr class="tr"> <tr class="tr">
<td></td> <td></td>
<td>成品</td> <td>成品</td>
<td class="text-danger">废品</td> <td class="text-danger">废品</td>
<td class="text-success">补证</td>
<td>成品</td> <td>成品</td>
<td class="text-danger">废品</td> <td class="text-danger">废品</td>
<td class="text-success">补证</td>
<td>成品</td> <td>成品</td>
<td class="text-danger">废品</td> <td class="text-danger">废品</td>
<td class="text-success">补证</td>
<td>成品</td> <td>成品</td>
<td class="text-danger">废品</td> <td class="text-danger">废品</td>
<td>成品</td> <td class="text-success">补证</td>
<td class="text-danger">废品</td>
<td>数量</td>
</tr> </tr>
</thead> </thead>
<tbody ng-repeat="item in qualityCheckReportList | orderBy:date" style="border-top: 1px solid #f4f4f4;"> <tbody ng-repeat="item in qualityCheckReportList" style="border-top: 1px solid #f4f4f4;">
<tr ng-if="item.date!='合计'"> <tr>
<td>{{item.date | myDateFilter}}</td> <td>{{item.FINISH_DATE}}</td>
<td>{{item.list[1].VALID_COUNT}}</td> <td>{{item.ga}}</td>
<td>{{item.list[1].FAILED_COUNT}}</td> <td>{{item.gaf}}</td>
<td>{{item.list[2].VALID_COUNT}}</td> <td>{{item.gab}}</td>
<td>{{item.list[2].FAILED_COUNT}}</td> <td>{{item.tw}}</td>
<td>{{item.list[3].VALID_COUNT}}</td> <td>{{item.twf}}</td>
<td>{{item.list[3].FAILED_COUNT}}</td> <td>{{item.twb}}</td>
<td>{{item.list[5].VALID_COUNT}}</td> <td>{{item.yd}}</td>
<td>{{item.list[5].FAILED_COUNT}}</td> <td>{{item.ydf}}</td>
<td>{{item.list[6].VALID_COUNT}}</td> <td>{{item.ydb}}</td>
<td>{{item.list[6].FAILED_COUNT}}</td> <td>{{item.yj}}</td>
<td>{{item.list[8].FAILED_COUNT}}</td> <td>{{item.yjf}}</td>
<td>{{item.yjb}}</td>
</tr> </tr>
<tr ng-if="item.date=='合计'" class="bg-gray"> <tr ng-if="item.date=='total'" class="bg-gray">
<td>{{item.date}}:</td> <td>合计</td>
<td colspan="4">成品证:{{item.list.validCount}}</td> <td colspan="4">成品证:{{item.list.validCount}}</td>
<td colspan="4">废品证:{{item.list.failedCount}}</td> <td colspan="4">废品证:{{item.list.failedCount}}</td>
<td colspan="3">补证:{{item.list.buCount}}</td> <td colspan="5">补证:{{item.list.buCount}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
<th>起始有效期</th> <th>起始有效期</th>
<th>终止有效期</th> <th>终止有效期</th>
<th>上报受理单位</th> <th>上报受理单位</th>
<th>上报受理号</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -92,6 +93,7 @@ ...@@ -92,6 +93,7 @@
<td ng-if="item.EXPIRE_DATE=='长期'">{{item.EXPIRE_DATE}}</td> <td ng-if="item.EXPIRE_DATE=='长期'">{{item.EXPIRE_DATE}}</td>
<td ng-if="item.EXPIRE_DATE!='长期'">{{item.EXPIRE_DATE | myDateFilter}}</td> <td ng-if="item.EXPIRE_DATE!='长期'">{{item.EXPIRE_DATE | myDateFilter}}</td>
<td>{{item.GAJG1}}</td> <td>{{item.GAJG1}}</td>
<td>{{item.UPLOAD_NO}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
...@@ -124,6 +126,7 @@ ...@@ -124,6 +126,7 @@
<th>起始有效期</th> <th>起始有效期</th>
<th>终止有效期</th> <th>终止有效期</th>
<th>上报受理单位</th> <th>上报受理单位</th>
<th>上报受理号</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -142,6 +145,7 @@ ...@@ -142,6 +145,7 @@
<td ng-if="item.EXPIRE_DATE=='长期'">{{item.EXPIRE_DATE}}</td> <td ng-if="item.EXPIRE_DATE=='长期'">{{item.EXPIRE_DATE}}</td>
<td ng-if="item.EXPIRE_DATE!='长期'">{{item.EXPIRE_DATE | myDateFilter}}</td> <td ng-if="item.EXPIRE_DATE!='长期'">{{item.EXPIRE_DATE | myDateFilter}}</td>
<td>{{item.GAJG1}}</td> <td>{{item.GAJG1}}</td>
<td>{{item.UPLOAD_NO}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
...@@ -139,7 +139,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -139,7 +139,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}else{ }else{
MessageService.showAlert("无该证件的制证记录"); MessageService.showAlert("无该证件的制证记录");
$scope.json.isShow=false; $scope.json.isShow=false;
getPoliceListDataNotChecked(); // getPoliceListDataNotChecked();
// getDetailListById(data.id); // getDetailListById(data.id);
} }
}) })
...@@ -156,6 +156,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -156,6 +156,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
} }
if(count===$scope.json.policeCardsList.length){ if(count===$scope.json.policeCardsList.length){
MessageService.showAlert("身份证号:"+idcard+" 在本组中不存在"); MessageService.showAlert("身份证号:"+idcard+" 在本组中不存在");
break;
} }
// if(bgCount==2&&$scope.json.policeCardsList.length>=2){ // if(bgCount==2&&$scope.json.policeCardsList.length>=2){
// $scope.PreviewMytableRotate(); // $scope.PreviewMytableRotate();
......
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