Commit 413f81e2 authored by dahai's avatar dahai

添加更新交接单已打印状态

parent 0c801cd6
...@@ -134,9 +134,8 @@ public class ExportExcelApi { ...@@ -134,9 +134,8 @@ public class ExportExcelApi {
fis.read(b); fis.read(b);
fis.close(); fis.close();
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setContentType("APPLICATION/OCTET-STREAM"); response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment;" + new String(outFile.getBytes(),"iso-8859-1") +".xls"); response.addHeader("Content-Disposition", "attachment;" + new String(outFile.getBytes(),"iso-8859-1") +".xls");
//
return b; return b;
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -186,7 +186,7 @@ public interface ReceiptMapper { ...@@ -186,7 +186,7 @@ public interface ReceiptMapper {
@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,RECEIPT_LIST.CHECK_DATE,RECEIPT_LIST.CHECK_NAME\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 from RECEIPT_LIST \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 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" +
...@@ -210,6 +210,16 @@ public interface ReceiptMapper { ...@@ -210,6 +210,16 @@ public interface ReceiptMapper {
@Update("update DETAIL_RECEIPT_LIST set NOTE = #{note} WHERE ACCEPT_NO=#{acceptNo}") @Update("update DETAIL_RECEIPT_LIST set NOTE = #{note} WHERE ACCEPT_NO=#{acceptNo}")
public boolean updateDetail(@Param("acceptNo")String accept,@Param("note")String note); public boolean updateDetail(@Param("acceptNo")String accept,@Param("note")String note);
/**
* 更新交接单是否已打印
* @param date 查询时间
* @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);
......
...@@ -164,6 +164,8 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -164,6 +164,8 @@ public class ReceiptServiceImpl implements ReceiptService {
str+="'"+stringList.get(i)+"',"; str+="'"+stringList.get(i)+"',";
} }
} }
//更改交接单已打印状态
boolean b = receiptMapper.updateReceiptDate(date, str, typeCode);
return receiptMapper.selectReceiptDate(date,str,typeCode); return receiptMapper.selectReceiptDate(date,str,typeCode);
} }
......
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