Commit e903287e authored by suichenguang's avatar suichenguang

交接单

parent 2cc1455c
......@@ -183,18 +183,15 @@ public class ReceiptApi {
@RequestMapping("selectDetailList")
public List<Map<String,Object>> selectDetailList(@RequestParam("receiptId") String receiptId){
List<Map<String, Object>> resultList = receiptService.selectDetailList(receiptId);
try {
for (int i=0;i<resultList.size();i++){
String groupNo= (String) resultList.get(i).get("QR_CODE");
Map<String,Object> map= receiptService.selectTimes(groupNo);
resultList.get(i).put("downloadDate",map.get("downloadDate"));
resultList.get(i).put("checkDate",map.get("checkDate"));
resultList.get(i).put("electricDate",map.get("electricDate"));
String acceptNo= (String) resultList.get(i).get("ACCEPT_NO");
Map<String,Object> map= receiptService.selectTimes(acceptNo);
resultList.get(i).put("downloadDate",map.get("DOWNLOADDATE"));
resultList.get(i).put("checkDate",map.get("CHECKDATE"));
resultList.get(i).put("electricDate",map.get("ELECTRICDATE"));
}
}catch (NullPointerException e){
return new ArrayList<>();
}
return resultList;
}
......
......@@ -114,7 +114,7 @@ public interface ReceiptMapper {
//根据交接单号查详单信息
@Select("select * from detail_receipt_list where receipt_id=#{receiptId}")
public Map<String,Object> selectDetailList(@Param("receiptId") String receiptId);
public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId);
//根据传入的交接单ID和复核人ID插入复核人、复核时间
......@@ -149,8 +149,12 @@ public interface ReceiptMapper {
"WHERE subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}")
public Map<String,Object> selectCountTime(@Param("groupNo") String groupNo);
@Select("select * from DETAIL_RECEIPT_LIST\n" +
"WHERE RECEIPT_ID = #{groupNo}")
@Select("select \n" +
"prod_trace_t.DOWNLOAD_DATE as downloadDate,\n" +
"prod_trace_t.CHECK_DATE as checkDate,\n" +
"prod_trace_t.ELECTRIC_WRITE_DATE as electricDate\n" +
"from prod_trace_t@PROD_LINK " +
"WHERE ACCEPT_NO=#{groupNo}")
public Map<String,Object> selectTimes(@Param("groupNo") String groupNo);
@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" +
......
......@@ -71,8 +71,8 @@ public class ReceiptServiceImpl implements ReceiptService {
}
@Override
public Map<String, Object> selectDetailList(String receiptId) {
Map<String, Object> resultList = receiptMapper.selectDetailList(receiptId);
public List<Map<String, Object>> selectDetailList(String receiptId) {
List<Map<String, Object>> resultList = receiptMapper.selectDetailList(receiptId);
return resultList;
}
......
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