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; package com.yxproject.start.api;
import com.yxproject.start.entity.CardDetailedListEntity;
import com.yxproject.start.entity.DetailReceiptListEntity; import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.service.CardDetailedListService; import com.yxproject.start.service.CardDetailedListService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
...@@ -62,12 +62,13 @@ public class ExportExcelApi { ...@@ -62,12 +62,13 @@ public class ExportExcelApi {
* 导出交接单 * 导出交接单
*/ */
@RequestMapping("printReceiptExcelData") @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); JSONObject jsonObject = JSONObject.fromObject(list);
JSONArray jsonArray = JSONArray.fromObject(jsonObject.get("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(); 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.setContentType("application/x-download");
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
String dateTime = DateFormatUtils.format(new Date(), "yyyy_MM_dd"); String dateTime = DateFormatUtils.format(new Date(), "yyyy_MM_dd");
......
...@@ -28,21 +28,23 @@ public class ReceiptApi { ...@@ -28,21 +28,23 @@ public class ReceiptApi {
/** /**
* 生成交接单 快证保存ACCEPT_NO 普通证保存GROUP_NO * 生成交接单 快证保存ACCEPT_NO 普通证保存GROUP_NO
* * @param id 证件ID
* @param id * @param name 生成人姓名
* @param beginDate 起始有效期
* @param expireDate 终止有效期
* @return * @return
*/ */
@RequestMapping("createReceiptList") @RequestMapping("createReceiptList")
@Transactional(rollbackFor = Exception.class) @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) { 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) { 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 receiptListEntity = new ReceiptListEntity();
receiptListEntity.setPoliceCode(resultDate.get("GAJG_DM").toString()); receiptListEntity.setPoliceCode(resultDate.get("GAJG_DM").toString());
receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal) resultDate.get("CARD_TYPE") + "")); receiptListEntity.setCardTypeId(Long.valueOf((BigDecimal) resultDate.get("CARD_TYPE") + ""));
...@@ -58,7 +60,7 @@ public class ReceiptApi { ...@@ -58,7 +60,7 @@ public class ReceiptApi {
long S = receiptService.createReceiptList(receiptListEntity); 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 uploadNo = (String) detailedData.get("UPLOAD_NO");
String acceptNo2 = (String) detailedData.get("ACCEPT_NO"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String name2 = (String) detailedData.get("NAME"); String name2 = (String) detailedData.get("NAME");
...@@ -87,7 +89,7 @@ public class ReceiptApi { ...@@ -87,7 +89,7 @@ public class ReceiptApi {
} }
} else { } else {
//根据身份证号查组号 //根据身份证号查组号
String groupNo = receiptService.selectGroupNoById(id); String groupNo = receiptService.selectGroupNoById(id,beginDate,expireDate);
//查询详单所需数据 //查询详单所需数据
List<Map<String, Object>> receiptListDate = receiptService.selectReceiptListDate2(groupNo); List<Map<String, Object>> receiptListDate = receiptService.selectReceiptListDate2(groupNo);
...@@ -113,11 +115,11 @@ public class ReceiptApi { ...@@ -113,11 +115,11 @@ public class ReceiptApi {
//生成交接单 //生成交接单
long receiptList = receiptService.createReceiptList(receiptListEntity); long receiptList = receiptService.createReceiptList(receiptListEntity);
for (int n = 0; n < receiptListDate.size(); n++) { 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) { 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 uploadNo = (String) detailedData.get("UPLOAD_NO");
String acceptNo2 = (String) detailedData.get("ACCEPT_NO"); String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String name2 = (String) detailedData.get("NAME"); String name2 = (String) detailedData.get("NAME");
...@@ -160,11 +162,11 @@ public class ReceiptApi { ...@@ -160,11 +162,11 @@ public class ReceiptApi {
/** /**
* 查询交接单数据 * 查询交接单数据
* * @param name 生成人姓名
* @return * @return
*/ */
@RequestMapping("selectRecriptData") @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); List<Map<String, Object>> resultMap = receiptService.selectReceiptListOfSpecialCard(name);
for (int i = 0; i < resultMap.size(); i++) { for (int i = 0; i < resultMap.size(); i++) {
...@@ -189,11 +191,11 @@ public class ReceiptApi { ...@@ -189,11 +191,11 @@ public class ReceiptApi {
/** /**
* 根据任务单查询详细信息 * 根据任务单查询详细信息
* *
* @param receiptId * @param receiptId 交接单ID
* @return * @return
*/ */
@RequestMapping("selectDetailList") @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); List<Map<String, Object>> resultList = receiptService.selectDetailList(receiptId);
for (int i = 0; i < resultList.size(); i++) { for (int i = 0; i < resultList.size(); i++) {
String acceptNo = (String) resultList.get(i).get("ACCEPT_NO"); String acceptNo = (String) resultList.get(i).get("ACCEPT_NO");
...@@ -209,8 +211,8 @@ public class ReceiptApi { ...@@ -209,8 +211,8 @@ public class ReceiptApi {
/** /**
* 数据核验--更改交接单状态 * 数据核验--更改交接单状态
* *
* @param receiptId * @param receiptId 交接单ID
* @param checkName * @param checkName 复核人姓名
* @return * @return
*/ */
@RequestMapping("updateReceiptList") @RequestMapping("updateReceiptList")
...@@ -278,14 +280,27 @@ public class ReceiptApi { ...@@ -278,14 +280,27 @@ public class ReceiptApi {
/** /**
* 查询交接单 * 查询交接单
* * @param startDate 复核起始时间
* @param date 复核时间 * @param endDate 复核结束时间
* @return * @return
*/ */
@RequestMapping("queryReceiptDateByCheckDate") @RequestMapping("queryReceiptDateByCheckDate")
public List<Map<String, Object>> queryReceiptDateByCheckDate(@RequestParam("date") String date) { public List<Map<String, Object>> queryReceiptDateByCheckDate(@RequestParam("startDate") String startDate,@RequestParam("endDate") String endDate) {
return receiptService.selectReceiptDateByCheckDate(replaceDate(date)); 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 { ...@@ -296,6 +311,17 @@ public class ReceiptApi {
public List<Map<String, Object>> queryPoliceName(@RequestParam("policeCode") String policeCode) { public List<Map<String, Object>> queryPoliceName(@RequestParam("policeCode") String policeCode) {
return receiptService.queryPoliceName(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; ...@@ -5,10 +5,7 @@ import com.yxproject.start.entity.TaskList.CountCountyEntity;
import com.yxproject.start.entity.TaskList.CountGajgEntity; import com.yxproject.start.entity.TaskList.CountGajgEntity;
import com.yxproject.start.entity.TaskList.TaskListEntity; import com.yxproject.start.entity.TaskList.TaskListEntity;
import com.yxproject.start.mapper.DataAuditingMapper; import com.yxproject.start.mapper.DataAuditingMapper;
import com.yxproject.start.service.GroupNoService; import com.yxproject.start.service.*;
import com.yxproject.start.service.PreproPersonService;
import com.yxproject.start.service.SpecialCardService;
import com.yxproject.start.service.TaskListService;
import com.yxproject.start.service.impl.DataAuditingServiceImpl; import com.yxproject.start.service.impl.DataAuditingServiceImpl;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
...@@ -42,51 +39,9 @@ public class TaskListApi { ...@@ -42,51 +39,9 @@ public class TaskListApi {
private PreproPersonService preproPersonService; private PreproPersonService preproPersonService;
@Autowired @Autowired
private DataAuditingServiceImpl dataAuditingService; 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 { ...@@ -315,7 +270,7 @@ public class TaskListApi {
/** /**
* 生成快证任务单 * 生成快证任务单
* <p> *
* name 提交人姓名 * name 提交人姓名
* acceptNo 受理组号 * acceptNo 受理组号
* cardType 制证类型(原有) * cardType 制证类型(原有)
...@@ -332,6 +287,13 @@ public class TaskListApi { ...@@ -332,6 +287,13 @@ public class TaskListApi {
String cardType = jsonObject.getString("cardType"); String cardType = jsonObject.getString("cardType");
String countyCode = jsonObject.getString("countyCode"); String countyCode = jsonObject.getString("countyCode");
String name = jsonObject.getString("name"); 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))) { if ("null".equals(countyCode.substring(0, 4))) {
countyCode = "000000"; countyCode = "000000";
} }
...@@ -456,97 +418,6 @@ public class TaskListApi { ...@@ -456,97 +418,6 @@ public class TaskListApi {
return printOutCount; 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 { ...@@ -19,14 +19,14 @@ public interface ReceiptMapper {
"left join SPECIAL_CARD on SPECIAL_CARD.ACCEPT_NO = prod_card_t.accept_no\n" + "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 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" + "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" + "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 ") "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}") @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(String id); 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" + @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 { ...@@ -36,10 +36,10 @@ public interface ReceiptMapper {
"left join group_no on group_no.group_no = prod_group_t.group_no \n" + "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 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" + "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" + "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 ") "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}") @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 { ...@@ -72,24 +72,19 @@ public interface ReceiptMapper {
"from prod_card_t@PROD_LINK\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 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" + "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}") "where PROD_CARD_T.ACCEPT_NO=#{acceptNo}")
public Map<String,Object>selectDetailedData(String id); public Map<String,Object>selectDetailedData(String acceptNo);
//根据身份证号查询交接单详单信息 //根据身份证号查询交接单详单信息
@Select("select prod_card_t.upload_no," + @Select("select prod_card_t.upload_no,PROD_CARD_T.ACCEPT_NO," +
"PROD_CARD_T.ACCEPT_NO," + "prod_card_t.name,prod_card_t.SEX_NO,prod_card_t.id_no," +
"prod_card_t.name," + "GAJG_DM.GAJG_MC,PROD_CARD_T.SIGN_GOVT,subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM," +
"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" + "receipt_list.ID\n" +
"from prod_card_t@PROD_LINK \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 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" + "left join receipt_list on receipt_list.QR_CODE =prod_card_t.accept_no \n" +
"where prod_card_t.id_no=#{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(String id); 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)" + @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 { ...@@ -142,12 +137,12 @@ public interface ReceiptMapper {
public boolean updateReceiptDateByReceiptId(@Param("receiptId") String receiptId); public boolean updateReceiptDateByReceiptId(@Param("receiptId") String receiptId);
//根据输入id查询交接单是否生成 //根据输入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}) ") @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); public List<Map<String,Object>> selectCountById(@Param("id") String id,@Param("beginDate") String beginDate,@Param("expireDate") String expireDate);
//根据输入id查询是否生成详单 //根据输入id查询是否生成详单
@Select("select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO=(select accept_no from prod_card_t@prod_link where id_no=#{id})") @Select("select count(*) from DETAIL_RECEIPT_LIST where ACCEPT_NO= #{acceptNo}")
public int selectReceiptById(@Param("id") String id); public int selectReceiptByAcceptNo(@Param("acceptNo") String acceptNo);
@Select("select \n" + @Select("select \n" +
"count(prod_trace_t.download_no)as download,\n" + "count(prod_trace_t.download_no)as download,\n" +
...@@ -186,8 +181,21 @@ public interface ReceiptMapper { ...@@ -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 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 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" + "left join COUNTY_DIC on substr(RECEIPT_LIST.POLICE_CODE,0,6) = COUNTY_DIC.COUNTY_CODE" +
" where to_char(CHECK_DATE,'yyyyMMdd') = #{date}") " where to_char(CHECK_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} ")
public List<Map<String,Object>> selectReceiptDateByCheckDate(@Param("date") String date); 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" + @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" + "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 { ...@@ -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 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 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" + "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} ") " 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("date") String date,@Param("string") String string,@Param("type") long 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}") @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); public DetailReceiptListEntity selectDetailByAcceptNo(@Param("acceptNo") String acceptNo);
...@@ -207,13 +215,14 @@ public interface ReceiptMapper { ...@@ -207,13 +215,14 @@ public interface ReceiptMapper {
/** /**
* 更新交接单是否已打印 * 更新交接单是否已打印
* @param date 查询时间 * @param startDate 查询起始时间
* @param string 派出所代码 * @param endDate 查询结束时间
* @param type 制证类型 * @param string 查询派出所代码
* @param type 制证类型
* @return * @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}") @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("date") String date,@Param("string") String string,@Param("type") long 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" + @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" + "left join GAJG_DM on GAJG_DM.GAJG_DM = RECEIPT_LIST.POLICE_CODE\n" +
...@@ -222,6 +231,10 @@ public interface ReceiptMapper { ...@@ -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); 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 { ...@@ -461,29 +461,34 @@ public interface TaskListMapper {
* @param process 工序 * @param process 工序
* @return * @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" + @Select("select DISTINCT nvl(DECODE(RECEIPT_LIST.STATE,1,RECEIPT_LIST.FINISH_COUNT,0),0) finish_COUNT,\n" +
"sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count," + "count(*) police_Count,police_dic.police_code ,police_dic.police_name GAJG_MC, \n" +
"sum(decode(prod_trace_t.CHECK_DATE,null,0,1)) CHECK_count,\n" + "sum(decode(prod_trace_t.ELECTRIC_WRITER_NO,null,0,1)) e_writer_count,\n" +
"task.submit_date, task.task_id,CARD_TYPE_DIC.CARD_TYPE,\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_ID,COUNTY_DIC.COUNTY_CODE,\n" + "CARD_TYPE_DIC.CARD_TYPE, CARD_TYPE_DIC.CARD_TYPE_ID,COUNTY_DIC.COUNTY_CODE, COUNTY_DIC.COUNTYNAME, \n" +
"COUNTY_DIC.COUNTYNAME, group_no.VALID_COUNT,group_no.INVALID_COUNT,\n" + "group_no.VALID_COUNT,group_no.INVALID_COUNT, group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, \n" +
"group_no.SPECIAL_CARD_COUNT,group_no.GROUP_NO, nvl(fc.faileCount,0) faileCount\n" + "fc.faileCount faileCount from group_no \n" +
"from group_no left join task on group_no.task_id= task.TASK_ID\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 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 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" + "left join (\n" +
"group by accept_no ) fc on substr(fc.accept_no,0,8) = group_no.group_no \n" + " select substr(accept_no,0,8) group_no, sum(decode(accept_no,null,0,1)) faileCount \n" +
"left join prod_trace_t@PROD_LINK on SUBSTR(prod_trace_t.ACCEPT_NO,0,8) = group_no.GROUP_NO\n" + " from FAILED_CARD \n" +
"left join prod_card_t@PROD_LINK on prod_trace_t.ACCEPT_NO =prod_card_t.ACCEPT_NO\n" + " where FAILED_CARD.state <=#{process2} and FAILED_CARD.state != FAILED_CARD.INITIATOR \n" +
// "left join GAJG_DM on GAJG_DM.GAJG_DM = substr(prod_card_t.upload_no,0,9)\n" + " and accept_no not in (select accept_no from special_card ) \n" +
"left join PROD_GROUP_T@PROD_LINK on PROD_GROUP_T.group_no =group_no.GROUP_NO " + " 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 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 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 " + "left join RECEIPT_LIST on RECEIPT_LIST.QR_CODE = group_no.GROUP_NO \n" +
"where task.TASK_STATE_ID = #{process} \n" + "where task.TASK_STATE_ID = #{process} and prod_trace_t.ACCEPT_NO NOT IN (select SPECIAL_CARD.ACCEPT_NO from SPECIAL_CARD) \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" + "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" + "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); public List<Map<String,Object>> selectByCountyAtAuxiliary_common5(@Param("process") long process,@Param("process2") long process2);
......
...@@ -2,7 +2,6 @@ package com.yxproject.start.service; ...@@ -2,7 +2,6 @@ package com.yxproject.start.service;
import com.yxproject.start.entity.DetailReceiptListEntity; import com.yxproject.start.entity.DetailReceiptListEntity;
import com.yxproject.start.entity.ReceiptListEntity; import com.yxproject.start.entity.ReceiptListEntity;
import org.apache.ibatis.annotations.Param;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -10,11 +9,11 @@ import java.util.Map; ...@@ -10,11 +9,11 @@ import java.util.Map;
public interface ReceiptService { 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 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); 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 { ...@@ -34,7 +33,9 @@ public interface ReceiptService {
public boolean updateReceiptDateByReceiptId(String receiptId); 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); public int selectCount(String GROUP_NO);
...@@ -43,36 +44,38 @@ public interface ReceiptService { ...@@ -43,36 +44,38 @@ public interface ReceiptService {
public List<Map<String,Object>> queryPoliceName(String policeCode); 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> selectCountTime(String groupNo);
public Map<String,Object> selectTimes(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 Map<String,Object> selectCountTimeT( String groupNo);
public List<Map<String,Object>> selectReceiptReport( String startDate,String endDate,String name); 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 { ...@@ -15,8 +15,8 @@ public class ReceiptServiceImpl implements ReceiptService {
private ReceiptMapper receiptMapper; private ReceiptMapper receiptMapper;
@Override @Override
public Map<String,Object> selectReceiptListDate(String id) { public Map<String,Object> selectReceiptListDate(String id,String beginDate,String expireDate) {
Map<String,Object> result= receiptMapper.selectReceiptListDate(id); Map<String,Object> result= receiptMapper.selectReceiptListDate(id,beginDate,expireDate);
return result; return result;
} }
...@@ -27,8 +27,8 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -27,8 +27,8 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @Override
public Map<String, Object> selectDetailedData(String id) { public Map<String, Object> selectDetailedData(String acceptNo) {
Map<String,Object> resultMap = receiptMapper.selectDetailedData(id); Map<String,Object> resultMap = receiptMapper.selectDetailedData(acceptNo);
return resultMap; return resultMap;
} }
...@@ -100,14 +100,14 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -100,14 +100,14 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @Override
public List<Map<String, Object>> selectCountById(String id) { public List<Map<String, Object>> selectCountById(String id,String beginDate,String expireDate) {
List<Map<String, Object>> mapList = receiptMapper.selectCountById(id); List<Map<String, Object>> mapList = receiptMapper.selectCountById(id, beginDate, expireDate);
return mapList; return mapList;
} }
@Override @Override
public int selectReceiptById(String id) { public int selectReceiptByAcceptNo(String acceptNo) {
int receiptCount = receiptMapper.selectReceiptById(id); int receiptCount = receiptMapper.selectReceiptByAcceptNo(acceptNo);
return receiptCount; return receiptCount;
} }
...@@ -148,14 +148,21 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -148,14 +148,21 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @Override
public List<Map<String, Object>> selectReceiptDateByCheckDate(String date) { public List<Map<String, Object>> selectReceiptDateByCheckDate(String stratDate,String endDate) {
List<Map<String, Object>> mapList = receiptMapper.selectReceiptDateByCheckDate(date); List<Map<String, Object>> mapList = receiptMapper.selectReceiptDateByCheckDate(stratDate, endDate);
List<Map<String, Object>> mapList1 = formateMap(mapList); List<Map<String, Object>> mapList1 = formateMap(mapList);
return mapList1; return mapList1;
} }
@Override @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 =""; String str ="";
for (int i =0;i<stringList.size();i++){ for (int i =0;i<stringList.size();i++){
if (i==stringList.size()-1){ if (i==stringList.size()-1){
...@@ -165,31 +172,31 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -165,31 +172,31 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
} }
//更改交接单已打印状态 //更改交接单已打印状态
boolean b = receiptMapper.updateReceiptDate(date, str, typeCode); boolean b = receiptMapper.updateReceiptDate(startDate,endDate, str, typeCode);
return receiptMapper.selectReceiptDate(date,str,typeCode); return receiptMapper.selectReceiptDate(startDate,endDate,str,typeCode);
} }
@Override @Override
public Map<String, Object> selectDetailedData2(String id) { public Map<String, Object> selectDetailedData2(String id,String beginDate,String expireDate) {
Map<String,Object> resultMap= receiptMapper.selectDetailedData2(id); Map<String,Object> resultMap= receiptMapper.selectDetailedData2(id,beginDate,expireDate);
return resultMap; return resultMap;
} }
@Override @Override
public List<Map<String, Object>> selectReceiptListDate2(String id) { public List<Map<String, Object>> selectReceiptListDate2(String groupNo) {
List<Map<String, Object>> mapList = new ArrayList<>(); List<Map<String, Object>> mapList = new ArrayList<>();
if (id ==null){ if (groupNo ==null){
}else { }else {
mapList= receiptMapper.selectReceiptListDate2(id); mapList= receiptMapper.selectReceiptListDate2(groupNo);
} }
return mapList; return mapList;
} }
@Override @Override
public String selectGroupNoById(String id) { public String selectGroupNoById(String id,String beginDate,String expireDate) {
List<Map<String, Object>> mapList = receiptMapper.selectGroupNoById(id); List<Map<String, Object>> mapList = receiptMapper.selectGroupNoById(id,beginDate,expireDate);
if(mapList.size()>0){ if(mapList.size()>0){
return mapList.get(0).get("GROUPNO").toString(); return mapList.get(0).get("GROUPNO").toString();
}else { }else {
...@@ -220,6 +227,19 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -220,6 +227,19 @@ public class ReceiptServiceImpl implements ReceiptService {
return receiptMapper.selectReceiptReport(startDate, endDate, name); 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) { private List<Map<String, Object>> formateMap(List<Map<String, Object>> maplist) {
Map<String, Object> typeMap = new LinkedHashMap<>(); Map<String, Object> typeMap = new LinkedHashMap<>();
for (Map o : maplist) { for (Map o : maplist) {
......
...@@ -172,6 +172,7 @@ ...@@ -172,6 +172,7 @@
<script src="views/uploadExcelAndSearch/uploadExcelAndSearch.js"></script> <script src="views/uploadExcelAndSearch/uploadExcelAndSearch.js"></script>
<script src="views/task/task.js"></script> <script src="views/task/task.js"></script>
<script src="views/receitp/receitp.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/addFailed/addFailed.js"></script>
<script src="views/searchCard/searchCard.js"></script> <script src="views/searchCard/searchCard.js"></script>
<script src="views/createTaskList/createTaskList.js"></script> <script src="views/createTaskList/createTaskList.js"></script>
......
...@@ -12,6 +12,7 @@ angular.module('AvatarCheck', [ ...@@ -12,6 +12,7 @@ angular.module('AvatarCheck', [
'AvatarCheck.uploadExcelAndSearch', 'AvatarCheck.uploadExcelAndSearch',
'AvatarCheck.searchCardMsg', 'AvatarCheck.searchCardMsg',
'AvatarCheck.receitp', 'AvatarCheck.receitp',
'AvatarCheck.report',
'AvatarCheck.addFailed', 'AvatarCheck.addFailed',
'AvatarCheck.addRest', 'AvatarCheck.addRest',
'AvatarCheck.searchCard', 'AvatarCheck.searchCard',
...@@ -117,6 +118,9 @@ angular.module('AvatarCheck', [ ...@@ -117,6 +118,9 @@ angular.module('AvatarCheck', [
if ($location.path() == "/receitp") { if ($location.path() == "/receitp") {
$rootScope.tab = '/receitp'; $rootScope.tab = '/receitp';
} }
if($location.path()=="/report"){
$rootScope.tab = '/report';
}
if ($location.path() == "/addFailed") { if ($location.path() == "/addFailed") {
$rootScope.tab = '/addFailed'; $rootScope.tab = '/addFailed';
} }
...@@ -153,6 +157,7 @@ angular.module('AvatarCheck', [ ...@@ -153,6 +157,7 @@ angular.module('AvatarCheck', [
} }
console.log($rootScope.tab) console.log($rootScope.tab)
$scope.getFocus = function (index) { $scope.getFocus = function (index) {
if(index=='/tagPrint'){ if(index=='/tagPrint'){
......
...@@ -971,6 +971,18 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -971,6 +971,18 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) 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 @@ ...@@ -5,62 +5,43 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<strong>数据报表</strong> <strong>膜打印数据报表</strong>
<div class="box-tools pull-right"> <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/> <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/> ——
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 10px;" ng-click="searchHistory()">查询历史</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="choseDate2" id="datepicker2" readonly/>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;" ng-click="doSearchReceitp()">查询</button> <button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 10px;" ng-click="searchReport()">查询</button>
</div> </div>
<!-- /.box-tools --> <!-- /.box-tools -->
</div> </div>
<!-- /.box-header --> <!-- /.box-header -->
<div class="box-body"> <div class="box-body">
<div ng-if="receitpData.length>0"> <div ng-if="reportData.length==1">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;" > <h4>暂无数据</h4>
<ul class="nav nav-tabs"> </div>
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat="tab in receitpData track by $index"> <div ng-if="reportData.length>1">
<a ng-click="func($index,tab.typeCode)">
<ul style="margin: 0;padding: 0;"> <div class="table-responsive mailbox-messages" >
<li style="font-size: 16px;">{{tab.typeName}}</li>
<li style="text-align: center;">{{tab.typeSum}}</li>
</ul>
</a>
</li>
</ul>
</div>
<div ng-repeat="type in receitpData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
<div class="mailbox-messages"> <div class="mailbox-messages">
<table class="table table-hover postTable"> <table class="table table-hover postTable">
<thead> <thead>
<tr> <tr>
<th><input type="checkbox" class="checkAll" ng-click="checkAll($event)"></th> <th>打印日期</th>
<th>NO.</th> <th>大批证</th>
<th>派出所代码</th> <th>邮寄证</th>
<th>派出所名称</th> <th>军人证</th>
<th>证件数量</th> <th>快证</th>
<th>复核时间</th> <th>废证</th>
<th>复核人姓名</th>
</tr> </tr>
</thead> </thead>
<tbody ng-repeat="item in type.countyList"> <tbody ng-repeat="item in reportData">
<tr style="background-color: #eee"> <tr style="background-color: #eee">
<td><input type="checkbox" class="checkAllPolice" value="{{item.policeList}}" ng-click="checkAllPolice($event,item.countyCode)"></td> <td>{{item.date}}</td>
<td></td> <td style="color: #3c8dbc">{{item.pu}}</td>
<td>{{item.countyCode}}</td> <td>{{item.you}}</td>
<td style="color: #3c8dbc">{{item.countyName}}</td> <td>{{item.jun}}</td>
<td>{{item.countyValidCount}}</td> <td>{{item.kuai}}</td>
<td></td> <td>{{item.fei}}</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>
</tr> </tr>
</tbody> </tbody>
</table> </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