Commit 1e75f4ed authored by dahai's avatar dahai

push

parent 537285e5
......@@ -49,8 +49,14 @@ public class ReceiptApi {
//查询特证交接单所需数据
Map<String, Object> resultDate = receiptService.selectReceiptListDate(id,replaceDate(beginDate),replaceDate(expireDate));
ReceiptListEntity receiptListEntity = new ReceiptListEntity();
Long card_type = Long.valueOf((BigDecimal) resultDate.get("CARD_TYPE") + "");
receiptListEntity.setCardTypeId(card_type);
if (card_type==9){
receiptListEntity.setPoliceCode("110001580800");
}else {
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") + ""));
......
......@@ -18,7 +18,7 @@ public interface DataAuditingMapper {
public boolean saveDataAuditingEntity(DataAuditingEntity dataAuditingEntity);
@Select("select a.POLICE_SUBSTATION,a.VALID_COUNT,B.INVALID_COUNT from (select substr(UPLOAD_NO,0,9) POLICE_SUBSTATION ,count(UPLOAD_NO) VALID_COUNT \n" +
@Select("select a.POLICE_SUBSTATION,nvl(a.VALID_COUNT,0) VALID_COUNT,nvl(B.INVALID_COUNT,0) INVALID_COUNT from (select substr(UPLOAD_NO,0,9) POLICE_SUBSTATION ,count(UPLOAD_NO) VALID_COUNT \n" +
" from ACC_CARD_T@ACCUYD_LINK\n" +
" where ACCEPT_NO not in (\n" +
" select ACCEPT_NO from ACC_ERROR_INFO_T@ACCUYD_LINK)\n" +
......@@ -35,7 +35,7 @@ public interface DataAuditingMapper {
@Select("<script>" +
"select nvl(GAJG_DM.GAJG_MC,'000000000') GAJG_MC,DATA_AUDITING.POLICE_SUBSTATION,sum(DATA_AUDITING.VALID_COUNT) VALID_COUNT,\n" +
"sum(DATA_AUDITING.INVALID_COUNT) inVALID_COUNT,to_char(DATA_AUDITING.SUBMIT_DATE,'yyyyMMdd') SUBMIT_DATE,CARD_TYPE_DIC.CARD_TYPE,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID from DATA_AUDITING \n" +
"CARD_TYPE_DIC.CARD_TYPE_ID, 1-(sum(DATA_AUDITING.VALID_COUNT)/(sum(DATA_AUDITING.VALID_COUNT)+sum(DATA_AUDITING.inVALID_COUNT))) Failure_rate from DATA_AUDITING \n" +
"left join TASK on TASK.TASK_ID = DATA_AUDITING.TASK_ID\n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = TASK.CARD_TYPE " +
"left join GAJG_DM on GAJG_DM.GAJG_DM = DATA_AUDITING.POLICE_SUBSTATION\n" +
......
......@@ -36,7 +36,17 @@ public class DataAuditingServiceImpl implements DataAuditingService {
}
@Override
public List<Map<String, Object>> selectDataAuditingReport(String startDate,String endDate,String policeName,String policeCode) {
List<Map<String, Object>> maps = dataAuditingMapper.selectDataAuditingReport("'" + startDate + "'", "'" + endDate + "'", "'" + policeName + "%'", "'" + policeCode + "%'");
if ("".equals(policeName)){
policeName=null;
}else {
policeName="'" + policeName + "%'";
}
if ("".equals(policeCode)){
policeCode=null;
}else {
policeCode="'" + policeCode + "%'";
}
List<Map<String, Object>> maps = dataAuditingMapper.selectDataAuditingReport("'" + startDate + "'", "'" + endDate + "'", policeName, policeCode);
Map<String,Object> sumMap = new LinkedHashMap<>();
int validCount =0;
int invalidCount =0;
......@@ -44,11 +54,14 @@ public class DataAuditingServiceImpl implements DataAuditingService {
validCount+=Integer.valueOf(map.get("VALID_COUNT").toString());
invalidCount+=Integer.valueOf(map.get("INVALID_COUNT").toString());
}
if (maps.size()>0){
sumMap.put("VALID_COUNT",validCount);
sumMap.put("INVALID_COUNT",invalidCount);
sumMap.put("GAJG_MC","北京制证中心");
sumMap.put("POLICE_SUBSTATION","合计");
sumMap.put("FAILURE_RATE",1-validCount/(validCount+invalidCount));
maps.add(sumMap);
}
return maps;
}
}
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