Commit e3d51fef authored by ad's avatar ad

Merge branch 'dev' of…

Merge branch 'dev' of http://121.22.111.250:8000/YX_IDENT_auxiliary/YX_IDENT_beijing_auxiliary into dev
parents b5f23a96 5dd67ead
package com.yxproject.start.api;
import com.yxproject.start.entity.CardDetailedListEntity;
import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.service.CardDetailedListService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......
......@@ -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.replaceAll(" ", "").replaceAll(":", "")),replaceDate(endDate.replaceAll(" ", "").replaceAll(":", "")));
}
/**
* 查询历史交接单
* @param startDate 交接起始时间
* @param endDate 交接结束时间
* @return
*/
@RequestMapping("queryReceiptDateByReceiptDate")
public List<Map<String, Object>> queryReceiptDateByReceiptDate(String startDate, String endDate) {
return receiptService.selectReceiptDateByReceiptDate(replaceDate(startDate.replaceAll(" ", "").replaceAll(":", "")),replaceDate(endDate.replaceAll(" ", "").replaceAll(":", "")));
}
/**
* 查询分局名称
*
......@@ -296,6 +311,17 @@ public class ReceiptApi {
public List<Map<String, Object>> queryPoliceName(@RequestParam("policeCode") String policeCode) {
return receiptService.queryPoliceName(policeCode);
}
/**
* 字符串去除空格
*
* @param str 原始字符串
* @return 返回新的字符串
*/
private String replaceNullString(String str) {
if (str == "") {
return null;
} else return str;
}
/**
* 去除字符串中中线
......
......@@ -5,10 +5,7 @@ import com.yxproject.start.entity.TaskList.CountCountyEntity;
import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity;
import com.yxproject.start.mapper.DataAuditingMapper;
import com.yxproject.start.service.GroupNoService;
import com.yxproject.start.service.PreproPersonService;
import com.yxproject.start.service.SpecialCardService;
import com.yxproject.start.service.TaskListService;
import com.yxproject.start.service.*;
import com.yxproject.start.service.impl.DataAuditingServiceImpl;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
......@@ -42,51 +39,9 @@ public class TaskListApi {
private PreproPersonService preproPersonService;
@Autowired
private DataAuditingServiceImpl dataAuditingService;
@Autowired
private ReceiptService receiptService;
// /**
// * 查询以区为单位的制证数量
// * 受理库
// *
// * @param submitDate
// * @return
// */
// @RequestMapping("selectByCounty")
// public JSONObject selectByCounty(@RequestParam(value = "submitDate") String submitDate) {
// List<CountCountyEntity> resultList = taskListService.selectByCounty(submitDate);
// JSONObject resultJson = JSONObject.fromObject(resultList);
// return resultJson;
// }
//
// /**
// * 查询以派出所为单位的制证数量
// * 受理库
// *
// * @param submitDate
// * @param countyCode
// * @return
// */
// @RequestMapping("selectByGajg")
// public JSONObject selectByGajg(@RequestParam(value = "submitDate") String submitDate, @RequestParam(value = "countyCode") String countyCode) {
// List<CountGajgEntity> resultList = taskListService.selectByGajg(submitDate, countyCode);
// JSONObject resultJson = JSONObject.fromObject(resultList);
// return resultJson;
// }
//
// /**
// * 生成任务单
// * 受理库
// *
// * @param submitDate
// * @param countyCode
// * @param Gajg
// * @return
// */
// @RequestMapping("createTaskList")
// public boolean createTaskList(@RequestParam(value = "submitDate") String submitDate, @RequestParam(value = "countyCode") String countyCode, @RequestParam(value = "Gajg") String Gajg) {
// List<TaskListEntity> resultList = taskListService.selectACCU(submitDate, countyCode, Gajg);
// taskListService.createTaskList(resultList);
// return true;
// }
/**
* 更改任务单状态
......@@ -315,7 +270,7 @@ public class TaskListApi {
/**
* 生成快证任务单
* <p>
*
* name 提交人姓名
* acceptNo 受理组号
* cardType 制证类型(原有)
......@@ -332,6 +287,13 @@ public class TaskListApi {
String cardType = jsonObject.getString("cardType");
String countyCode = jsonObject.getString("countyCode");
String name = jsonObject.getString("name");
// 判断是否添加快证 通过受理号查询交接单详情数量
List<DetailReceiptListEntity> detailReceiptListEntityList = receiptService.queryReceipt(acceptNo);
if (detailReceiptListEntityList.size()!=0){
Map<String, Object> map = new LinkedHashMap<>();
map.put("msg", "证件已经生成交接单,无法加入快证");
return map;
}
if ("null".equals(countyCode.substring(0, 4))) {
countyCode = "000000";
}
......@@ -456,97 +418,6 @@ public class TaskListApi {
return printOutCount;
}
// /**
// *
// * @param date
// * @param state
// * @return
// */
// @RequestMapping("selectCountHistory")
// public int selectCountHistory(@RequestParam("date")String date,@RequestParam("state")String state){
// int count=0;
// int count1;
// int count2;
// String c1;
// String c2;
// switch (state){
// case "1":
// c1=taskListService.selectCountIssue(date);
// c2=taskListService.selectCountConcora2(date);
// if (c2==null||c2.equals("")){
// c2="0";
// }
// count1= Integer.parseInt(c1);
// count2= Integer.parseInt(c2);
// count = count1+count2;
// return count;
//
// case "2":
// c1=taskListService.selectCountPrintOut(date);
// c2=taskListService.selectCountPrintOut2(date);
// if (c2==null||c2.equals("")){
// c2="0";
// }
// count1 =Integer.parseInt(c1);
// count2=Integer.parseInt(c2);
// count = count1+count2;
// return count;
// case "3":
// c1=taskListService.selectCountPosition(date);
// c2=taskListService.selectCountPosition2(date);
// if (c2==null||c2.equals("")){
// c2="0";
// }
// count1=Integer.parseInt(c1);
// count2=Integer.parseInt(c2);
// count = count1+count2;
// return count;
// case "4":
// c1=taskListService.selectCountConcora(date);
// c2=taskListService.selectCountConcora2(date);
// if (c2==null||c2.equals("")){
// c2="0";
// }
// count1 = Integer.parseInt(c1);
// count2= Integer.parseInt(c2);
// count = count1+count2;
// return count;
// case "5":
// c1=taskListService.selectCountPunching(date);
// c2=taskListService.selectCountPunching2(date);
// if (c2==null||c2.equals("")){
// c2="0";
// }
// count1 =Integer.parseInt(c1);
// count2=Integer.parseInt(c2);
// count = count1+count2;
// return count;
// case "6":
// c1=taskListService.selectCountSorting(date);
// c2=taskListService.selectCountSorting2(date);
// if (c2==null||c2.equals("")){
// c2="0";
// }
// count1=Integer.parseInt(c1);
// count2=Integer.parseInt(c2);
// count =count1+count2;
// return count;
// case "7":
// c1=taskListService.selectCountQuality(date);
// c2=taskListService.selectCountQuality2(date);
// if (c2==null||c2.equals("")){
// c2="0";
// }
// count1=Integer.parseInt(c1);
// count2=Integer.parseInt(c2);
// count=count1+count2;
// return count;
// }
// return count;
// }
/**
* 去除字符串中中线
*
......
......@@ -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" +
......@@ -222,6 +231,10 @@ public interface ReceiptMapper {
public List<Map<String,Object>> selectReceiptReport(@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("name") String name);
@Select("select * from DETAIL_RECEIPT_LIST where ACCEPT_NO =#{acceptNo} ")
public List<DetailReceiptListEntity> queryReceipt(String acceptNo);
}
......@@ -461,29 +461,34 @@ public interface TaskListMapper {
* @param process 工序
* @return
*/
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,count(*) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC,\n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count," +
"sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,\n" +
"task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,\n" +
"CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE,\n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" +
"group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, nvl(fc.faileCount,0) faileCount\n" +
"from group_no left join task on group_no.task_id= task.TASK_ID\n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE\n" +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE\n" +
"left join (select accept_no, nvl(count(*),0) faileCount from FAILED_CARD where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR and accept_no not in (select accept_no from special_card ) \n" +
"group by accept_no ) fc on substr(fc.accept_no,0,8) = group_no.group_no \n" +
"left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n" +
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n" +
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\n" +
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO " +
@Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,\n" +
"count(*) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC, \n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,\n" +
"sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count, task.submit_date, task.task_id,\n" +
"CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, \n" +
"group_no.VALID_COUNT,group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, \n" +
"fc.faileCount faileCount from group_no \n" +
"left join task on group_no.task_id= task.TASK_ID \n" +
"left join CARD_TYPE_DIC on CARD_TYPE_DIC.CARD_TYPE_ID = task.CARD_TYPE \n" +
"left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = task.COUNTY_CODE \n" +
"left join (\n" +
" select substr(accept_no,0,8) group_no, sum(decode(accept_no,null,0,1)) faileCount \n" +
" from FAILED_CARD \n" +
" where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR \n" +
" and accept_no not in (select accept_no from special_card ) \n" +
" group by substr(accept_no,0,8) ) fc \n" +
" on fc.group_no= group_no.group_no \n" +
"left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO \n" +
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO \n" +
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO \n" +
"left join PROD_GROUP_RELATION_T@PROD_LINK on PROD_GROUP_T.group_no = PROD_GROUP_RELATION_T.group_no\n" +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12)\n" +
" left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO " +
"where task.TASK_STATE_ID = #{process} \n" +
"and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE,\n" +
"left join police_dic on police_dic.police_code = substr(PROD_GROUP_RELATION_T.ORIGINAL_NO,0,12) \n" +
"left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO \n" +
"where task.TASK_STATE_ID = #{process} and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) \n" +
"group by task.submit_date, task.task_id, CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID, COUNTY_DIC.COUNTY_CODE, \n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT, group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT, group_no.GROUP_NO, \n" +
"nvl(fc.faileCount,0),police_dic.police_code,police_dic.police_name,nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) order by group_no.GROUP_NO")
"nvl(fc.faileCount,0), police_dic.police_code, police_dic.police_name, nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0), fc.faileCount \n" +
"order by group_no.GROUP_NO")
public List<Map<String,Object>> selectByCountyAtAuxiliary_common5(@Param("process") long process,@Param("process2") long process2);
......
......@@ -2,7 +2,6 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.entity.ReceiptListEntity;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
......@@ -10,11 +9,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 +33,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,36 +44,38 @@ 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);
public List<Map<String,Object>> selectReceiptReport( String startDate,String endDate,String name);
public List<DetailReceiptListEntity> queryReceipt( String acceptNo);
}
......@@ -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 {
......@@ -220,6 +227,19 @@ public class ReceiptServiceImpl implements ReceiptService {
return receiptMapper.selectReceiptReport(startDate, endDate, name);
}
/**
* 查询是否存在交接单详单
*
* @param acceptNo 受理号
* @return
*/
@Override
public List<DetailReceiptListEntity> queryReceipt( String acceptNo) {
return receiptMapper.queryReceipt(acceptNo);
}
private List<Map<String, Object>> formateMap(List<Map<String, Object>> maplist) {
Map<String, Object> typeMap = new LinkedHashMap<>();
for (Map o : maplist) {
......
......@@ -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