Commit b6fa0fd3 authored by dahai's avatar dahai

Merge remote-tracking branch 'origin/dev' into dev

parents c799060a 559ff0b7
...@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -32,6 +33,7 @@ public class ReceiptApi { ...@@ -32,6 +33,7 @@ public class ReceiptApi {
@RequestMapping("createReceiptList") @RequestMapping("createReceiptList")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean createReceiptList(@RequestParam("id") String id) { public boolean createReceiptList(@RequestParam("id") String id) {
try {
//判断是否是特证 //判断是否是特证
if (receiptService.selectSpecialCardByAcceptNo(id) == 1) { if (receiptService.selectSpecialCardByAcceptNo(id) == 1) {
//查询这个受理号是否生成了交接单 //查询这个受理号是否生成了交接单
...@@ -124,6 +126,10 @@ public class ReceiptApi { ...@@ -124,6 +126,10 @@ public class ReceiptApi {
int finishCount = receiptService.selectCount(groupNo) - specialCardCount; int finishCount = receiptService.selectCount(groupNo) - specialCardCount;
receiptService.updateFinishCount(groupNo, finishCount); receiptService.updateFinishCount(groupNo, finishCount);
} }
}catch (NullPointerException e){
return false;
}
return true; return true;
} }
...@@ -137,11 +143,8 @@ public class ReceiptApi { ...@@ -137,11 +143,8 @@ public class ReceiptApi {
List<Map<String,Object>> resultMap=receiptService.selectReceiptListOfSpecialCard(); List<Map<String,Object>> resultMap=receiptService.selectReceiptListOfSpecialCard();
for (int i=0;i<resultMap.size();i++){ for (int i=0;i<resultMap.size();i++){
String groupNo= (String) resultMap.get(i).get("QR_CODE"); String groupNo= (String) resultMap.get(i).get("QR_CODE");
System.out.println("1111111111111111111111111111"+groupNo);
Map<String,Object> map= receiptService.selectCountTime(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("download",map.get("download"));
// resultMap.get(i).put("",map.get(""));
resultMap.get(i).put("checkerCount",map.get("checkerCount")); resultMap.get(i).put("checkerCount",map.get("checkerCount"));
resultMap.get(i).put("electricCount",map.get("electricCount")); resultMap.get(i).put("electricCount",map.get("electricCount"));
} }
...@@ -170,6 +173,8 @@ public class ReceiptApi { ...@@ -170,6 +173,8 @@ public class ReceiptApi {
@RequestMapping("selectDetailList") @RequestMapping("selectDetailList")
public List<Map<String,Object>> selectDetailList(@RequestParam("receiptId") String receiptId){ public List<Map<String,Object>> selectDetailList(@RequestParam("receiptId") String receiptId){
List<Map<String, Object>> resultList = receiptService.selectDetailList(receiptId); List<Map<String, Object>> resultList = receiptService.selectDetailList(receiptId);
try {
for (int i=0;i<resultList.size();i++){ for (int i=0;i<resultList.size();i++){
String groupNo= (String) resultList.get(i).get("QR_CODE"); String groupNo= (String) resultList.get(i).get("QR_CODE");
Map<String,Object> map= receiptService.selectTimes(groupNo); Map<String,Object> map= receiptService.selectTimes(groupNo);
...@@ -177,7 +182,11 @@ public class ReceiptApi { ...@@ -177,7 +182,11 @@ public class ReceiptApi {
resultList.get(i).put("checkDate",map.get("checkDate")); resultList.get(i).put("checkDate",map.get("checkDate"));
resultList.get(i).put("electricDate",map.get("electricDate")); resultList.get(i).put("electricDate",map.get("electricDate"));
} }
}catch (NullPointerException e){
return new ArrayList<>();
}
return resultList; return resultList;
} }
/** /**
......
...@@ -84,7 +84,7 @@ public interface ReceiptMapper { ...@@ -84,7 +84,7 @@ public interface ReceiptMapper {
//根据交接单号查详单信息 //根据交接单号查详单信息
@Select("select * from detail_receipt_list where receipt=#{RECEIPT_ID}") @Select("select * from detail_receipt_list where receipt=#{RECEIPT_ID}")
public List<Map<String,Object>> selectDetailList(String receiptId); public List<Map<String,Object>> selectDetailList(@Param("receiptId") String receiptId);
//根据传入的交接单ID和复核人ID插入复核人、复核时间 //根据传入的交接单ID和复核人ID插入复核人、复核时间
...@@ -92,7 +92,7 @@ public interface ReceiptMapper { ...@@ -92,7 +92,7 @@ public interface ReceiptMapper {
"check_date = #{date},\n" + "check_date = #{date},\n" +
"check_name=#{checkName} \n" + "check_name=#{checkName} \n" +
"where id=#{receiptId}") "where id=#{receiptId}")
public boolean updateReceiptList(String receiptId, String checkName, Date date); public boolean updateReceiptList(@Param("receiptId") String receiptId,@Param("checkName") String checkName,@Param("date") Date date);
...@@ -131,7 +131,7 @@ public interface ReceiptMapper { ...@@ -131,7 +131,7 @@ public interface ReceiptMapper {
"prod_trace_t.ELECTRIC_WRITE_DATE as electricDate\n" + "prod_trace_t.ELECTRIC_WRITE_DATE as electricDate\n" +
"from prod_trace_t@PROD_LINK \n" + "from prod_trace_t@PROD_LINK \n" +
"WHERE subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}") "WHERE subStr(ACCEPT_NO,0,8) = #{groupNo} or ACCEPT_NO=#{groupNo}")
public Map<String,Object>selectTimes(String groupNo); public Map<String,Object>selectTimes(@Param("groupNo") String groupNo);
} }
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