Commit df1b4385 authored by suichenguang's avatar suichenguang

交接单4.5

parent c86d6e1c
......@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -32,6 +33,7 @@ public class ReceiptApi {
@RequestMapping("createReceiptList")
@Transactional(rollbackFor = Exception.class)
public boolean createReceiptList(@RequestParam("id") String id) {
try {
//判断是否是特证
if (receiptService.selectSpecialCardByAcceptNo(id) == 1) {
//查询这个受理号是否生成了交接单
......@@ -124,6 +126,10 @@ public class ReceiptApi {
int finishCount = receiptService.selectCount(groupNo) - specialCardCount;
receiptService.updateFinishCount(groupNo, finishCount);
}
}catch (NullPointerException e){
return false;
}
return true;
}
......@@ -137,11 +143,8 @@ public class ReceiptApi {
List<Map<String,Object>> resultMap=receiptService.selectReceiptListOfSpecialCard();
for (int i=0;i<resultMap.size();i++){
String groupNo= (String) resultMap.get(i).get("QR_CODE");
System.out.println("1111111111111111111111111111"+groupNo);
Map<String,Object> map= receiptService.selectCountTime(groupNo);
System.out.println("22222222222222222222222222222"+map.get("download"));
resultMap.get(i).put("download",map.get("download"));
// resultMap.get(i).put("",map.get(""));
resultMap.get(i).put("checkerCount",map.get("checkerCount"));
resultMap.get(i).put("electricCount",map.get("electricCount"));
}
......@@ -170,6 +173,8 @@ 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);
......@@ -177,7 +182,11 @@ public class ReceiptApi {
resultList.get(i).put("checkDate",map.get("checkDate"));
resultList.get(i).put("electricDate",map.get("electricDate"));
}
}catch (NullPointerException e){
return new ArrayList<>();
}
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