Commit 895de230 authored by dahai's avatar dahai

push

parent 4cff9553
...@@ -61,13 +61,11 @@ public class ExportExcelApi { ...@@ -61,13 +61,11 @@ public class ExportExcelApi {
* 导出交接单 * 导出交接单
*/ */
@RequestMapping("printReceiptExcelData") @RequestMapping("printReceiptExcelData")
public Map<String, Object> printReceiptExcelData(@RequestBody String list, HttpServletResponse response) { public Map<String, Object> printReceiptExcelData(@RequestBody String list) {
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 startDate = jsonObject.get("startDate").toString();
String endDate = jsonObject.get("endDate").toString();
String type = jsonObject.get("type").toString(); String type = jsonObject.get("type").toString();
Map<String, Object> map = receiptService.selectReceiptList(jsonArray, replaceDate(startDate), replaceDate(endDate), Long.valueOf(type)); Map<String, Object> map = receiptService.selectReceiptList(jsonArray, 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");
......
...@@ -227,8 +227,8 @@ public interface ReceiptMapper { ...@@ -227,8 +227,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 RECEIPT_LIST.POLICE_CODE in (${string}) and CARD_TYPE_DIC.CARD_TYPE_ID=${type} and receipt_date is null and to_char(CHECK_DATE,'yyyyMMddhhmmss') BETWEEN ${startDate} and ${endDate} ") " where RECEIPT_LIST.id in (${string}) and CARD_TYPE_DIC.CARD_TYPE_ID=${type} and receipt_date is null ")
public List<Map<String,Object>> selectReceiptDate(@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("string") String string,@Param("type") long type); public List<Map<String,Object>> selectReceiptDate(@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);
...@@ -239,14 +239,12 @@ public interface ReceiptMapper { ...@@ -239,14 +239,12 @@ public interface ReceiptMapper {
/** /**
* 更新交接单是否已打印 * 更新交接单是否已打印
* @param startDate 查询起始时间
* @param endDate 查询结束时间
* @param string 查询派出所代码 * @param string 查询派出所代码
* @param type 制证类型 * @param type 制证类型
* @return * @return
*/ */
@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} and receipt_date is null") @Update("update RECEIPT_LIST set IS_PRINT = 1,RECEIPT_DATE = sysdate where RECEIPT_LIST.id in (${string}) and CARD_TYPE_ID=${type} and receipt_date is null")
public boolean updateReceiptDate(@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("string") String string,@Param("type") long type); public boolean updateReceiptDate(@Param("string") String string,@Param("type") long type);
@Select("select RECEIPT_LIST.POLICE_CODE,sum(RECEIPT_LIST.FINISH_COUNT) FINISH_COUNT,GAJG_DM.GAJG_MC from RECEIPT_LIST \n" + @Select("select RECEIPT_LIST.POLICE_CODE,sum(RECEIPT_LIST.FINISH_COUNT) 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" +
......
...@@ -64,7 +64,7 @@ public interface ReceiptService { ...@@ -64,7 +64,7 @@ public interface ReceiptService {
public boolean updateDetail(String accept,String note); public boolean updateDetail(String accept,String note);
public Map<String, Object> selectReceiptList(List<String> stringList,String startDate,String endDate,long typeCode); public Map<String, Object> selectReceiptList(List<Integer> stringList,long typeCode);
public Map<String,Object>selectDetailedData2(String id,String beginDate,String expireDate); public Map<String,Object>selectDetailedData2(String id,String beginDate,String expireDate);
......
...@@ -165,19 +165,19 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -165,19 +165,19 @@ public class ReceiptServiceImpl implements ReceiptService {
} }
@Override @Override
public Map<String, Object> selectReceiptList(List<String> stringList, String startDate,String endDate, long typeCode) { public Map<String, Object> selectReceiptList(List<Integer> stringList, 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){
str+="'"+stringList.get(i)+"'"; str+=stringList.get(i);
}else { }else {
str+="'"+stringList.get(i)+"',"; str+=stringList.get(i)+",";
} }
} }
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
//更改交接单已打印状态 //更改交接单已打印状态
List<Map<String, Object>> mapList = receiptMapper.selectReceiptDate(startDate, endDate, str, typeCode); List<Map<String, Object>> mapList = receiptMapper.selectReceiptDate( str, typeCode);
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
if ("null".equals(mapList.get(0).get("RECEIPT_DATE")+"")){ if ("null".equals(mapList.get(0).get("RECEIPT_DATE")+"")){
map.put("date",simpleDateFormat.format(new Date())); map.put("date",simpleDateFormat.format(new Date()));
...@@ -191,9 +191,7 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -191,9 +191,7 @@ public class ReceiptServiceImpl implements ReceiptService {
map.put("list",mapList); map.put("list",mapList);
map.put("total",total); map.put("total",total);
boolean b = receiptMapper.updateReceiptDate(startDate,endDate, str, typeCode); boolean b = receiptMapper.updateReceiptDate( str, typeCode);
// return receiptMapper.selectReceiptDate(startDate,endDate,str,typeCode);
return map; return map;
} }
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<td class="mailbox-subject">{{task.groupNum}}</td> <td class="mailbox-subject">{{task.groupNum}}</td>
<td class="mailbox-subject">{{task.countyValidCount-task.specialCount}}</td> <td class="mailbox-subject">{{task.countyValidCount-task.specialCount}}</td>
<td class="mailbox-subject">{{task.specialCount}}</td> <td class="mailbox-subject">{{task.specialCount}}</td>
<td class="mailbox-subject">{{task.checkCount}}</td> <td class="mailbox-subject">{{task.recheckCount}}</td>
<td class="mailbox-date"><a <td class="mailbox-date"><a
ng-click="getPoliceList(task.groupList,task.taskId)">组号列表</a></td> ng-click="getPoliceList(task.groupList,task.taskId)">组号列表</a></td>
<td class="mailbox-subject"> <td class="mailbox-subject">
......
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