Commit 5690c71e authored by suichenguang's avatar suichenguang

交接单

parent 3a47ec68
...@@ -53,13 +53,13 @@ public class ReceiptApi { ...@@ -53,13 +53,13 @@ public class ReceiptApi {
receiptListEntity.setOldCardTypeId(Long.valueOf(resultDate.get("OLD_CARD_TYPE")+"")); receiptListEntity.setOldCardTypeId(Long.valueOf(resultDate.get("OLD_CARD_TYPE")+""));
} }
receiptListEntity.setFinishCount(Long.valueOf(resultDate.get("VALID_COUNT").toString())); receiptListEntity.setFinishCount(Long.valueOf(resultDate.get("VALID_COUNT").toString()));
receiptListEntity.setQrCode(resultDate.get("GROUP_NO").toString()); receiptListEntity.setQrCode(resultDate.get("ACCEPT_NO").toString());
receiptListEntity.setState((long)0); receiptListEntity.setState((long)0);
//生成特证交接单 //生成特证交接单
receiptService.createReceiptList(receiptListEntity); Boolean S= receiptService.createReceiptList(receiptListEntity);
//查询特证详单所需数据 //查询特证详单所需数据
Map<String, Object> detailedData = receiptService.selectDetailedData(id); Map<String, Object> detailedData = receiptService.selectDetailedData2(id);
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 name = (String) detailedData.get("NAME"); String name = (String) detailedData.get("NAME");
......
...@@ -20,7 +20,11 @@ public interface ReceiptMapper { ...@@ -20,7 +20,11 @@ public interface ReceiptMapper {
"left join group_no on prod_group_t.group_no = group_no.group_no \n"+ "left join group_no on prod_group_t.group_no = group_no.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_card_t.id_no=#{id}") "where" +
"<if test ='id !=null'> " +
" prod_card_t.id_no=#{id}" +
"</if> " +
"")
public Map<String,Object> selectReceiptListDate(String id); public Map<String,Object> selectReceiptListDate(String id);
//查询这个组号是否已经生成交接单 //查询这个组号是否已经生成交接单
...@@ -42,6 +46,7 @@ public interface ReceiptMapper { ...@@ -42,6 +46,7 @@ public interface ReceiptMapper {
//根据身份证号查询交接单详单信息 //根据身份证号查询交接单详单信息
@Select("select prod_card_t.upload_no," + @Select("select prod_card_t.upload_no," +
"PROD_CARD_T.ACCEPT_NO," + "PROD_CARD_T.ACCEPT_NO," +
...@@ -55,6 +60,22 @@ public interface ReceiptMapper { ...@@ -55,6 +60,22 @@ public interface ReceiptMapper {
"where prod_card_t.id_no=#{id}") "where prod_card_t.id_no=#{id}")
public Map<String,Object>selectDetailedData(String id); public Map<String,Object>selectDetailedData(String id);
//根据身份证号查询交接单详单信息
@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," +
"subStr(prod_card_t.UPLOAD_NO,0,9) AS GAJG_DM," +
"receipt_list.ID\n" +
"from prod_card_t@PROD_LINK\n" +
"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);
//生成交接单详单 //生成交接单详单
@Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,POLICE_CODE,RECEIPT_ID)" + @Insert("INSERT INTO DETAIL_RECEIPT_LIST (UPLOAD_NO,accept_no,name,card_id,POLICE_CODE,RECEIPT_ID)" +
"VALUES(#{UPLOAD_NO},#{ACCEPT_NO},#{NAME},#{CARD_ID},#{GAJG_DM},#{RECEIPT_ID})") "VALUES(#{UPLOAD_NO},#{ACCEPT_NO},#{NAME},#{CARD_ID},#{GAJG_DM},#{RECEIPT_ID})")
...@@ -94,7 +115,7 @@ public interface ReceiptMapper { ...@@ -94,7 +115,7 @@ public interface ReceiptMapper {
//根据交接单号查详单信息 //根据交接单号查详单信息
@Select("select * from detail_receipt_list where receipt=#{RECEIPT_ID}") @Select("select * from detail_receipt_list where receipt=#{receiptId}")
public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId); public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId);
......
...@@ -65,4 +65,6 @@ public interface ReceiptService { ...@@ -65,4 +65,6 @@ public interface ReceiptService {
public List<Map<String,Object>> selectReceiptList(List<String> stringList,String date,long typeCode); public List<Map<String,Object>> selectReceiptList(List<String> stringList,String date,long typeCode);
public Map<String,Object>selectDetailedData2(String id);
} }
...@@ -168,6 +168,12 @@ public class ReceiptServiceImpl implements ReceiptService { ...@@ -168,6 +168,12 @@ public class ReceiptServiceImpl implements ReceiptService {
return receiptMapper.selectReceiptDate(date,str,typeCode); return receiptMapper.selectReceiptDate(date,str,typeCode);
} }
@Override
public Map<String, Object> selectDetailedData2(String id) {
Map<String,Object> resultMap= receiptMapper.selectDetailedData2(id);
return resultMap;
}
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) {
......
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