Commit cf0ee72e authored by dahai's avatar dahai

修改添加生成交接单API

添加膜打印报表页面
parent 5ead670d
......@@ -62,12 +62,13 @@ public class ExportExcelApi {
* 导出交接单
*/
@RequestMapping("printReceiptExcelData")
public byte[] printReceiptExcelData(@RequestBody String list, HttpServletResponse response, HttpServletRequest request) {
public byte[] printReceiptExcelData(@RequestBody String list, HttpServletResponse response) {
JSONObject jsonObject = JSONObject.fromObject(list);
JSONArray jsonArray = JSONArray.fromObject(jsonObject.get("list"));
String date = jsonObject.get("date").toString();
String startDate = jsonObject.get("startDate").toString();
String endDate = jsonObject.get("endDate").toString();
String type = jsonObject.get("type").toString();
List<Map<String, Object>> mapList = receiptService.selectReceiptList(jsonArray, replaceDate(date), Long.valueOf(type));
List<Map<String, Object>> mapList = receiptService.selectReceiptList(jsonArray, replaceDate(startDate),replaceDate(endDate), Long.valueOf(type));
response.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8");
String dateTime = DateFormatUtils.format(new Date(), "yyyy_MM_dd");
......
......@@ -28,21 +28,23 @@ public class ReceiptApi {
/**
* 生成交接单 快证保存ACCEPT_NO 普通证保存GROUP_NO
*
* @param id
* @param id 证件ID
* @param name 生成人姓名
* @param beginDate 起始有效期
* @param expireDate 终止有效期
* @return
*/
@RequestMapping("createReceiptList")
@Transactional(rollbackFor = Exception.class)
public Map<String,Object> createReceiptList(@RequestParam("id") String id,@RequestParam("name") String name) {
public Map<String,Object> createReceiptList(String id,String name,String beginDate,String expireDate) {
//判断是否是特证
if (receiptService.selectSpecialCardByAcceptNo(id) == 1) {
//查询这个受理号是否生成了交接单
List<Map<String, Object>> mapList = receiptService.selectCountById(id);
List<Map<String, Object>> mapList = receiptService.selectCountById(id,beginDate,expireDate);
//判断是否生成了交接单
if (mapList.size() == 0) {
//查询特证交接单所需数据
Map<String, Object> resultDate = receiptService.selectReceiptListDate(id);
Map<String, Object> resultDate = receiptService.selectReceiptListDate(id,beginDate,expireDate);
ReceiptListEntity receiptListEntity = new ReceiptListEntity();
receiptListEntity.setPoliceCode(resultDate.get("GAJG_DM").toString());
receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal) resultDate.get("CARD_TYPE") + ""));
......@@ -58,7 +60,7 @@ public class ReceiptApi {
long S = receiptService.createReceiptList(receiptListEntity);
//查询特证详单所需数据
Map<String, Object> detailedData = receiptService.selectDetailedData2(id);
Map<String, Object> detailedData = receiptService.selectDetailedData2(id,beginDate,expireDate);
String uploadNo = (String) detailedData.get("UPLOAD_NO");
String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String name2 = (String) detailedData.get("NAME");
......@@ -87,7 +89,7 @@ public class ReceiptApi {
}
} else {
//根据身份证号查组号
String groupNo = receiptService.selectGroupNoById(id);
String groupNo = receiptService.selectGroupNoById(id,beginDate,expireDate);
//查询详单所需数据
List<Map<String, Object>> receiptListDate = receiptService.selectReceiptListDate2(groupNo);
......@@ -113,11 +115,11 @@ public class ReceiptApi {
//生成交接单
long receiptList = receiptService.createReceiptList(receiptListEntity);
for (int n = 0; n < receiptListDate.size(); n++) {
//查询这个身份证是否生成了详单
int receiptCount = receiptService.selectReceiptById(receiptListDate.get(n).get("ID_NO").toString());
//查询这个受理号是否生成了详单
int receiptCount = receiptService.selectReceiptByAcceptNo(receiptListDate.get(n).get("ACCEPT_NO").toString());
//没有生成交接单详单
if (receiptCount == 0) {
Map<String, Object> detailedData = receiptService.selectDetailedData(receiptListDate.get(n).get("ID_NO").toString());
Map<String, Object> detailedData = receiptService.selectDetailedData(receiptListDate.get(n).get("ACCEPT_NO").toString());
String uploadNo = (String) detailedData.get("UPLOAD_NO");
String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String name2 = (String) detailedData.get("NAME");
......@@ -160,11 +162,11 @@ public class ReceiptApi {
/**
* 查询交接单数据
*
* @param name 生成人姓名
* @return
*/
@RequestMapping("selectRecriptData")
public List<Map<String, Object>> selectRecriptData(@RequestParam("name")String name) {
public List<Map<String, Object>> selectRecriptData(String name) {
//返回交接单数据
List<Map<String, Object>> resultMap = receiptService.selectReceiptListOfSpecialCard(name);
for (int i = 0; i < resultMap.size(); i++) {
......@@ -189,11 +191,11 @@ public class ReceiptApi {
/**
* 根据任务单查询详细信息
*
* @param receiptId
* @param receiptId 交接单ID
* @return
*/
@RequestMapping("selectDetailList")
public List<Map<String, Object>> selectDetailList(@RequestParam("receiptId") String receiptId) {
public List<Map<String, Object>> selectDetailList( String receiptId) {
List<Map<String, Object>> resultList = receiptService.selectDetailList(receiptId);
for (int i = 0; i < resultList.size(); i++) {
String acceptNo = (String) resultList.get(i).get("ACCEPT_NO");
......@@ -209,8 +211,8 @@ public class ReceiptApi {
/**
* 数据核验--更改交接单状态
*
* @param receiptId
* @param checkName
* @param receiptId 交接单ID
* @param checkName 复核人姓名
* @return
*/
@RequestMapping("updateReceiptList")
......@@ -278,14 +280,27 @@ public class ReceiptApi {
/**
* 查询交接单
*
* @param date 复核时间
* @param startDate 复核起始时间
* @param endDate 复核结束时间
* @return
*/
@RequestMapping("queryReceiptDateByCheckDate")
public List<Map<String, Object>> queryReceiptDateByCheckDate(@RequestParam("date") String date) {
return receiptService.selectReceiptDateByCheckDate(replaceDate(date));
public List<Map<String, Object>> queryReceiptDateByCheckDate(@RequestParam("startDate") String startDate,@RequestParam("endDate") String endDate) {
return receiptService.selectReceiptDateByCheckDate(replaceDate(startDate),replaceDate(endDate));
}
/**
* 查询历史交接单
* @param startDate 交接起始时间
* @param endDate 交接结束时间
* @return
*/
@RequestMapping("queryReceiptDateByReceiptDate")
public List<Map<String, Object>> queryReceiptDateByReceiptDate(String startDate, String endDate) {
return receiptService.selectReceiptDateByReceiptDate(replaceDate(startDate),replaceDate(endDate));
}
/**
* 查询分局名称
*
......
......@@ -19,14 +19,14 @@ public interface ReceiptMapper {
"left join SPECIAL_CARD on SPECIAL_CARD.ACCEPT_NO = prod_card_t.accept_no\n" +
"left join task on task.task_id =SPECIAL_CARD.task_id \n" +
"left join GAJG_DM on subStr(prod_card_t.UPLOAD_NO,0,9)= GAJG_DM.GAJG_DM \n" +
"where prod_card_t.id_no=#{id} \n" +
"where prod_card_t.id_no=#{id} and prod_card_t.BEGIN_DATE= #{beginDate} and prod_card_t.EXPIRE_DATE = #{expireDate} \n" +
"group by prod_group_t.group_no, prod_card_t.accept_no, subStr(prod_card_t.UPLOAD_NO,0,9), GAJG_DM.GAJG_MC, task.CARD_TYPE, \n" +
"task.OLD_CARD_TYPE ")
public Map<String,Object> selectReceiptListDate(String id);
public Map<String,Object> selectReceiptListDate(@Param("id")String id,@Param("beginDate")String beginDate,@Param("expireDate")String expireDate);
//根据身份证号查组号
@Select("select subStr(ACCEPT_NO,0,8) as groupNo from prod_card_t@PROD_LINK where ID_NO=#{id}")
public List<Map<String,Object>> selectGroupNoById(String id);
@Select("select subStr(ACCEPT_NO,0,8) as groupNo from prod_card_t@PROD_LINK where ID_NO=#{id} and prod_card_t.BEGIN_DATE= #{beginDate} and prod_card_t.EXPIRE_DATE = #{expireDate} ")
public List<Map<String,Object>> selectGroupNoById(@Param("id")String id,@Param("beginDate")String beginDate,@Param("expireDate")String expireDate);
//根据组号查询普通证交接单信息
@Select("select prod_group_t.group_no,prod_card_t.accept_no,subStr(prod_card_t.UPLOAD_NO,0,9) as GAJG_DM,\n" +
......@@ -36,10 +36,10 @@ public interface ReceiptMapper {
"left join group_no on group_no.group_no = prod_group_t.group_no \n" +
"left join task on task.task_id =group_no.task_id \n" +
"left join GAJG_DM on subStr(prod_card_t.UPLOAD_NO,0,9)= GAJG_DM.GAJG_DM \n" +
"where prod_group_t.group_no=#{id} and prod_card_t.accept_no not in (select accept_no from SPECIAL_CARD ) \n" +
"where prod_group_t.group_no=#{groupNo} and prod_card_t.accept_no not in (select accept_no from SPECIAL_CARD ) \n" +
"group by prod_group_t.group_no, prod_card_t.accept_no, subStr(prod_card_t.UPLOAD_NO,0,9), GAJG_DM.GAJG_MC, task.CARD_TYPE, \n" +
"task.OLD_CARD_TYPE,prod_card_t.id_no,prod_card_t.sex_no,prod_card_t.upload_no ")
public List<Map<String,Object>> selectReceiptListDate2(String id);
public List<Map<String,Object>> selectReceiptListDate2(String groupNo);
//查询这个组号是否已经生成交接单
@Select("select id ,check_name ,GAJG_DM.GAJG_MC from receipt_list left join GAJG_DM on GAJG_DM.GAJG_DM = receipt_list.POLICE_CODE where QR_CODE=#{groupNo}")
......@@ -72,24 +72,19 @@ public interface ReceiptMapper {
"from prod_card_t@PROD_LINK\n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = subStr(prod_card_t.UPLOAD_NO,0,9) "+
"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}")
public Map<String,Object>selectDetailedData(String id);
"where PROD_CARD_T.ACCEPT_NO=#{acceptNo}")
public Map<String,Object>selectDetailedData(String acceptNo);
//根据身份证号查询交接单详单信息
@Select("select prod_card_t.upload_no," +
"PROD_CARD_T.ACCEPT_NO," +
"prod_card_t.name," +
"prod_card_t.SEX_NO,"+
"prod_card_t.id_no," +
"GAJG_DM.GAJG_MC,"+
"PROD_CARD_T.SIGN_GOVT,"+
"subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM," +
@Select("select prod_card_t.upload_no,PROD_CARD_T.ACCEPT_NO," +
"prod_card_t.name,prod_card_t.SEX_NO,prod_card_t.id_no," +
"GAJG_DM.GAJG_MC,PROD_CARD_T.SIGN_GOVT,subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM," +
"receipt_list.ID\n" +
"from prod_card_t@PROD_LINK \n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = subStr(prod_card_t.UPLOAD_NO,0,9) "+
"left join receipt_list on receipt_list.QR_CODE =prod_card_t.accept_no \n" +
"where prod_card_t.id_no=#{id}")
public Map<String,Object>selectDetailedData2(String id);
"where prod_card_t.id_no=#{id} and prod_card_t.BEGIN_DATE= #{beginDate} and prod_card_t.EXPIRE_DATE = #{expireDate}")
public Map<String,Object>selectDetailedData2(@Param("id")String id,@Param("beginDate")String beginDate,@Param("expireDate")String expireDate);
//生成交接单详单
@Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,POLICE_CODE,RECEIPT_ID,SEX,SIGN_GOVT)" +
......@@ -142,12 +137,12 @@ public interface ReceiptMapper {
public boolean updateReceiptDateByReceiptId(@Param("receiptId") String receiptId);
//根据输入id查询交接单是否生成
@Select("select id,CHECK_NAME ,GAJG_DM.GAJG_MC from receipt_list left join GAJG_DM on GAJG_DM.GAJG_DM = receipt_list.POLICE_CODE where QR_CODE=(select accept_no from prod_card_t@prod_link where id_no=#{id}) ")
public List<Map<String,Object>> selectCountById(@Param("id") String id);
@Select("select id,CHECK_NAME ,GAJG_DM.GAJG_MC from receipt_list left join GAJG_DM on GAJG_DM.GAJG_DM = receipt_list.POLICE_CODE where QR_CODE=(select accept_no from prod_card_t@prod_link where id_no=#{id} and BEGIN_DATE= #{beginDate} and EXPIRE_DATE = #{expireDate} ) ")
public List<Map<String,Object>> selectCountById(@Param("id") String id,@Param("beginDate") String beginDate,@Param("expireDate") String expireDate);
//根据输入id查询是否生成详单
@Select("select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO=(select accept_no from prod_card_t@prod_link where id_no=#{id})")
public int selectReceiptById(@Param("id") String id);
@Select("select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO= #{acceptNo}")
public int selectReceiptByAcceptNo(@Param("acceptNo") String acceptNo);
@Select("select \n" +
"count(prod_trace_t.download_no)as download,\n" +
......@@ -186,8 +181,21 @@ public interface ReceiptMapper {
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID)\n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
"left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
" where to_char(CHECK_DATE,'yyyyMMdd') = #{date}")
public List<Map<String,Object>> selectReceiptDateByCheckDate(@Param("date") String date);
" where to_char(CHECK_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} ")
public List<Map<String,Object>> selectReceiptDateByCheckDate(@Param("startDate") String startDate,@Param("endDate") String endDate);
@Select("select RECEIPT_LIST.id,RECEIPT_LIST.QR_CODE,RECEIPT_LIST.RECEIPT_DATE,RECEIPT_LIST.POLICE_CODE,decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID) CARD_TYPE_ID,\n" +
"RECEIPT_LIST.FINISH_COUNT,GAJG_DM.GAJG_DM,GAJG_DM.GAJG_MC,RECEIPT_LIST.CHECK_DATE,RECEIPT_LIST.CHECK_NAME\n" +
",CARD_TYPE_DIC.CARD_TYPE,COUNTY_DIC.COUNTY_CODE ,COUNTY_DIC.COUNTYNAME,RECEIPT_LIST.state,RECEIPT_LIST.IS_PRINT from RECEIPT_LIST \n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID)\n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
"left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
" where to_char(RECEIPT_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} ")
public List<Map<String,Object>> selectReceiptDateByReceiptDate(@Param("startDate") String startDate,@Param("endDate") String endDate);
@Select("select RECEIPT_LIST.id,RECEIPT_LIST.QR_CODE,RECEIPT_LIST.RECEIPT_DATE,RECEIPT_LIST.POLICE_CODE,decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID) CARD_TYPE_ID,\n" +
"RECEIPT_LIST.FINISH_COUNT,GAJG_DM.GAJG_DM,GAJG_DM.GAJG_MC,to_char(CHECK_DATE,'yyyyMMdd') CHECK_DATE,RECEIPT_LIST.CHECK_NAME\n" +
......@@ -195,8 +203,8 @@ public interface ReceiptMapper {
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = decode(RECEIPT_LIST.Old_CARD_TYPE_ID,null,RECEIPT_LIST.CARD_TYPE_ID,RECEIPT_LIST.Old_CARD_TYPE_ID)\n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
"left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
" where to_char(CHECK_DATE,'yyyyMMdd') = ${date} and RECEIPT_LIST.POLICE_CODE in (${string}) and CARD_TYPE_DIC.CARD_TYPE_ID=${type} ")
public List<Map<String,Object>> selectReceiptDate(@Param("date") String date,@Param("string") String string,@Param("type") long type);
" where to_char(CHECK_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} and RECEIPT_LIST.POLICE_CODE in (${string}) and CARD_TYPE_DIC.CARD_TYPE_ID=${type} ")
public List<Map<String,Object>> selectReceiptDate(@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("string") String string,@Param("type") long type);
@Select("select DETAIL_RECEIPT_LIST.* , GAJG_DM.GAJG_MC from DETAIL_RECEIPT_LIST LEFT JOIN GAJG_DM ON GAJG_DM.GAJG_DM =DETAIL_RECEIPT_LIST.POLICE_CODE where ACCEPT_NO=#{acceptNo} or card_id=#{acceptNo}")
public DetailReceiptListEntity selectDetailByAcceptNo(@Param("acceptNo") String acceptNo);
......@@ -207,13 +215,14 @@ public interface ReceiptMapper {
/**
* 更新交接单是否已打印
* @param date 查询时间
* @param string 派出所代码
* @param startDate 查询起始时间
* @param endDate 查询结束时间
* @param string 查询派出所代码
* @param type 制证类型
* @return
*/
@Update("update RECEIPT_LIST set IS_PRINT = 1 where to_char(CHECK_DATE,'yyyyMMdd') = ${date} and RECEIPT_LIST.POLICE_CODE in (${string}) and CARD_TYPE_ID=${type}")
public boolean updateReceiptDate(@Param("date") String date,@Param("string") String string,@Param("type") long type);
@Update("update RECEIPT_LIST set IS_PRINT = 1,RECEIPT_DATE = sysdate where to_char(CHECK_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} and RECEIPT_LIST.POLICE_CODE in (${string}) and CARD_TYPE_ID=${type}")
public boolean updateReceiptDate(@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("string") String string,@Param("type") long type);
@Select("select RECEIPT_LIST.POLICE_CODE,sum(RECEIPT_LIST.FINISH_COUNT),GAJG_DM.GAJG_MC from RECEIPT_LIST \n" +
"left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
......
......@@ -10,11 +10,11 @@ import java.util.Map;
public interface ReceiptService {
public Map<String,Object> selectReceiptListDate(String id);
public Map<String,Object> selectReceiptListDate(String id,String beginDate,String expireDate);
public long createReceiptList(ReceiptListEntity receiptListEntity);
public Map<String,Object>selectDetailedData(String id);
public Map<String,Object>selectDetailedData(String acceptNo);
public boolean createDetailedList(String UPLOAD_NO,String ACCEPT_NO,String NAME,String CARD_ID,String GAJG_DM,long RECEIPT_ID,String SEX,String signGovt);
......@@ -34,7 +34,9 @@ public interface ReceiptService {
public boolean updateReceiptDateByReceiptId(String receiptId);
public List<Map<String,Object>> selectReceiptDateByCheckDate(String date);
public List<Map<String,Object>> selectReceiptDateByCheckDate(String startDate,String endDate);
public List<Map<String,Object>> selectReceiptDateByReceiptDate(String startDate,String endDate);
public int selectCount(String GROUP_NO);
......@@ -43,33 +45,33 @@ public interface ReceiptService {
public List<Map<String,Object>> queryPoliceName(String policeCode);
//特证查询是否生成交接单
public List<Map<String, Object>> selectCountById(@Param("id") String id);
public List<Map<String, Object>> selectCountById(String id,String beginDate,String expireDate);
//查询是否已生成交接单详单
public int selectReceiptById(@Param("id") String id);
public int selectReceiptByAcceptNo(String acceptNo);
//复核一致,按交接单编号查询证件数量
public int selectCountByReceiptId(@Param("receiptId")String receiptId);
public int selectCountByReceiptId(String receiptId);
//符合一致,按交接单编号查询详单库数量
public int selectDetailCountByReceiptId(@Param("receiptId")String receiptId);
public int selectDetailCountByReceiptId(String receiptId);
public Map<String,Object> selectCountTime(String groupNo);
public Map<String,Object> selectTimes(String groupNo);
public DetailReceiptListEntity selectDetailByAcceptNo(@Param("acceptNo") String acceptNo);
public DetailReceiptListEntity selectDetailByAcceptNo(String acceptNo);
public boolean updateDetail(@Param("acceptNo")String accept,@Param("note")String note);
public boolean updateDetail(String accept,String note);
public List<Map<String,Object>> selectReceiptList(List<String> stringList,String date,long typeCode);
public List<Map<String,Object>> selectReceiptList(List<String> stringList,String startDate,String endDate,long typeCode);
public Map<String,Object>selectDetailedData2(String id);
public Map<String,Object>selectDetailedData2(String id,String beginDate,String expireDate);
public List<Map<String, Object>> selectReceiptListDate2(String id);
public List<Map<String, Object>> selectReceiptListDate2(String groupNo);
public String selectGroupNoById(String id);
public String selectGroupNoById(String id,String beginDate,String expireDate);
public Map<String,Object> selectCountTimeT( String groupNo);
......
......@@ -15,8 +15,8 @@ public class ReceiptServiceImpl implements ReceiptService {
private ReceiptMapper receiptMapper;
@Override
public Map<String,Object> selectReceiptListDate(String id) {
Map<String,Object> result= receiptMapper.selectReceiptListDate(id);
public Map<String,Object> selectReceiptListDate(String id,String beginDate,String expireDate) {
Map<String,Object> result= receiptMapper.selectReceiptListDate(id,beginDate,expireDate);
return result;
}
......@@ -27,8 +27,8 @@ public class ReceiptServiceImpl implements ReceiptService {
}
@Override
public Map<String, Object> selectDetailedData(String id) {
Map<String,Object> resultMap = receiptMapper.selectDetailedData(id);
public Map<String, Object> selectDetailedData(String acceptNo) {
Map<String,Object> resultMap = receiptMapper.selectDetailedData(acceptNo);
return resultMap;
}
......@@ -100,14 +100,14 @@ public class ReceiptServiceImpl implements ReceiptService {
}
@Override
public List<Map<String, Object>> selectCountById(String id) {
List<Map<String, Object>> mapList = receiptMapper.selectCountById(id);
public List<Map<String, Object>> selectCountById(String id,String beginDate,String expireDate) {
List<Map<String, Object>> mapList = receiptMapper.selectCountById(id, beginDate, expireDate);
return mapList;
}
@Override
public int selectReceiptById(String id) {
int receiptCount = receiptMapper.selectReceiptById(id);
public int selectReceiptByAcceptNo(String acceptNo) {
int receiptCount = receiptMapper.selectReceiptByAcceptNo(acceptNo);
return receiptCount;
}
......@@ -148,14 +148,21 @@ public class ReceiptServiceImpl implements ReceiptService {
}
@Override
public List<Map<String, Object>> selectReceiptDateByCheckDate(String date) {
List<Map<String, Object>> mapList = receiptMapper.selectReceiptDateByCheckDate(date);
public List<Map<String, Object>> selectReceiptDateByCheckDate(String stratDate,String endDate) {
List<Map<String, Object>> mapList = receiptMapper.selectReceiptDateByCheckDate(stratDate, endDate);
List<Map<String, Object>> mapList1 = formateMap(mapList);
return mapList1;
}
@Override
public List<Map<String, Object>> selectReceiptList(List<String> stringList, String date, long typeCode) {
public List<Map<String, Object>> selectReceiptDateByReceiptDate(String stratDate,String endDate) {
List<Map<String, Object>> mapList = receiptMapper.selectReceiptDateByReceiptDate(stratDate, endDate);
List<Map<String, Object>> mapList1 = formateMap(mapList);
return mapList1;
}
@Override
public List<Map<String, Object>> selectReceiptList(List<String> stringList, String startDate,String endDate, long typeCode) {
String str ="";
for (int i =0;i<stringList.size();i++){
if (i==stringList.size()-1){
......@@ -165,31 +172,31 @@ public class ReceiptServiceImpl implements ReceiptService {
}
}
//更改交接单已打印状态
boolean b = receiptMapper.updateReceiptDate(date, str, typeCode);
return receiptMapper.selectReceiptDate(date,str,typeCode);
boolean b = receiptMapper.updateReceiptDate(startDate,endDate, str, typeCode);
return receiptMapper.selectReceiptDate(startDate,endDate,str,typeCode);
}
@Override
public Map<String, Object> selectDetailedData2(String id) {
Map<String,Object> resultMap= receiptMapper.selectDetailedData2(id);
public Map<String, Object> selectDetailedData2(String id,String beginDate,String expireDate) {
Map<String,Object> resultMap= receiptMapper.selectDetailedData2(id,beginDate,expireDate);
return resultMap;
}
@Override
public List<Map<String, Object>> selectReceiptListDate2(String id) {
public List<Map<String, Object>> selectReceiptListDate2(String groupNo) {
List<Map<String, Object>> mapList = new ArrayList<>();
if (id ==null){
if (groupNo ==null){
}else {
mapList= receiptMapper.selectReceiptListDate2(id);
mapList= receiptMapper.selectReceiptListDate2(groupNo);
}
return mapList;
}
@Override
public String selectGroupNoById(String id) {
List<Map<String, Object>> mapList = receiptMapper.selectGroupNoById(id);
public String selectGroupNoById(String id,String beginDate,String expireDate) {
List<Map<String, Object>> mapList = receiptMapper.selectGroupNoById(id,beginDate,expireDate);
if(mapList.size()>0){
return mapList.get(0).get("GROUPNO").toString();
}else {
......
......@@ -172,6 +172,7 @@
<script src="views/uploadExcelAndSearch/uploadExcelAndSearch.js"></script>
<script src="views/task/task.js"></script>
<script src="views/receitp/receitp.js"></script>
<script src="views/report/report.js"></script>
<script src="views/addFailed/addFailed.js"></script>
<script src="views/searchCard/searchCard.js"></script>
<script src="views/createTaskList/createTaskList.js"></script>
......
......@@ -12,6 +12,7 @@ angular.module('AvatarCheck', [
'AvatarCheck.uploadExcelAndSearch',
'AvatarCheck.searchCardMsg',
'AvatarCheck.receitp',
'AvatarCheck.report',
'AvatarCheck.addFailed',
'AvatarCheck.addRest',
'AvatarCheck.searchCard',
......@@ -117,6 +118,9 @@ angular.module('AvatarCheck', [
if ($location.path() == "/receitp") {
$rootScope.tab = '/receitp';
}
if($location.path()=="/report"){
$rootScope.tab = '/report';
}
if ($location.path() == "/addFailed") {
$rootScope.tab = '/addFailed';
}
......@@ -153,6 +157,7 @@ angular.module('AvatarCheck', [
}
console.log($rootScope.tab)
$scope.getFocus = function (index) {
if(index=='/tagPrint'){
......
......@@ -971,6 +971,18 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) {
success(response.data)
})
},
getReport:function(date1,date2,success) {
$http({
method: 'GET',
url: "../ReportApi/queryFilmPrintReport"+urlTimeStamp(),
params:{
startDate:date1,
endDate:date2
}
}).then(function successCallback(response) {
success(response.data)
})
}
}
});
\ No newline at end of file
......@@ -5,62 +5,43 @@
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header">
<strong>数据报表</strong>
<strong>膜打印数据报表</strong>
<div class="box-tools pull-right">
<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="datepicker" 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="doSearchReceitp()">查询</button>
<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="choseDate2" id="datepicker2" readonly/>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 10px;" ng-click="searchReport()">查询</button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<div ng-if="receitpData.length>0">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;" >
<ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat="tab in receitpData track by $index">
<a ng-click="func($index,tab.typeCode)">
<ul style="margin: 0;padding: 0;">
<li style="font-size: 16px;">{{tab.typeName}}</li>
<li style="text-align: center;">{{tab.typeSum}}</li>
</ul>
</a>
</li>
</ul>
<div ng-if="reportData.length==1">
<h4>暂无数据</h4>
</div>
<div ng-repeat="type in receitpData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
<div ng-if="reportData.length>1">
<div class="table-responsive mailbox-messages" >
<div class="mailbox-messages">
<table class="table table-hover postTable">
<thead>
<tr>
<th><input type="checkbox" class="checkAll" ng-click="checkAll($event)"></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>
</tr>
</thead>
<tbody ng-repeat="item in type.countyList">
<tbody ng-repeat="item in reportData">
<tr style="background-color: #eee">
<td><input type="checkbox" class="checkAllPolice" value="{{item.policeList}}" ng-click="checkAllPolice($event,item.countyCode)"></td>
<td></td>
<td>{{item.countyCode}}</td>
<td style="color: #3c8dbc">{{item.countyName}}</td>
<td>{{item.countyValidCount}}</td>
<td></td>
<td></td>
</tr>
<tr ng-repeat="police in item.policeList">
<td></td>
<td>{{police.ID}}</td>
<td>{{police.GAJG_DM}}</td>
<td>{{police.GAJG_MC}}</td>
<td>{{police.FINISH_COUNT}}</td>
<td>{{police.CHECK_DATE | date:'yyyy-MM-dd hh:mm:ss'}}</td>
<td>{{police.CHECK_NAME}}</td>
<td>{{item.date}}</td>
<td style="color: #3c8dbc">{{item.pu}}</td>
<td>{{item.you}}</td>
<td>{{item.jun}}</td>
<td>{{item.kuai}}</td>
<td>{{item.fei}}</td>
</tr>
</tbody>
</table>
......
'use strict';
angular.module('AvatarCheck.report', ['ngRoute', 'AvatarCheck.http'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/report', {
templateUrl: 'views/report/report.html' + urlTimeStamp(),
controller: 'reportCtrl',
cache: false
});
}])
.controller('reportCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
//Date picker
$('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$('#datepicker2').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
todayBtn: 1,
autoclose: 1
});
$scope.choseDate1 = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.choseDate2 = $filter("date")(new Date(), "yyyy-MM-dd");
// $scope.downloadGAinfo = function(){
// var date = $("#datepicker1").val();
// var url = "../exportExcel/printExcelData?date="+date;
// var a = document.createElement("a");
// document.body.appendChild(a);
// a.href = encodeURI(url);
// a.click();
// }
//
// $scope.currentTab = 0;
// $scope.func = function (index) {
// for (var idx in $scope.cycleSheetData) {
// if (index == idx) {
// $scope.cycleSheetData[idx].isActive = true;
// } else {
// $scope.cycleSheetData[idx].isActive = false;
// }
// }
// $scope.currentTab = index;
// }
$scope.searchReport = function () {
var date1=$('#datepicker1').val();
var date2=$('#datepicker2').val();
if(date1==''){
date1= $filter("date")(new Date(), "yyyy-MM-dd");
}
if(date2==''){
date2= $filter("date")(new Date(), "yyyy-MM-dd");
}
HttpService.getReport(date1,date2,function(data){
console.log(data,"------------------------")
$scope.reportData=data;
})
}
$scope.searchReport();
// $scope.checkAll = function ($event){
// var checkAll = $event.target;
// var checkbox =$("input[type=checkbox]");
// for (var i=0;i<checkbox.length;i++){
// if(checkAll.checked) {
// checkbox[i].checked = true;
// }else {
// checkbox[i].checked = false;
// }
// }
// }
//
// $scope.printReceitp = function(typeCode) {
// var date = $('#datepicker1').val();
// var json={
// type:typeCode,
// date:date,
// list:[]
// }
// var checks = $(".checkAllPolice:checked")
// for (var i=0;i<checks.length;i++){
// for(var j=0;j<JSON.parse(checks[i].value).length;j++){
// json.list.push(JSON.parse(checks[i].value)[j].POLICE_CODE)
// }
// }
// console.log(json)
// HttpService.printReceitpData(json,function (data) {
// var blob = new Blob([data], {type: "application/vnd.ms-excel"});
// var a = document.createElement("a");
// document.body.appendChild(a);
// a.href = URL.createObjectURL(blob);
// // a.download = fileName;
// a.click();
// })
// }
});
\ 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