Commit 799c0320 authored by dahai's avatar dahai

修改生成交接单详单 返回值   添加count  policeName属性

parent f24a0913
......@@ -90,6 +90,8 @@ public class ReceiptApi {
receiptService.createDetailedList(uploadNo, acceptNo2, name2, id, gajg_dm, receiptId, sex, signGovt);
map.put("show",true);
map.put("state",1);
map.put("count",1);
map.put("policeName",receiptService.selectPoliceName(gajg_dm));
map.put("msg","生成交接单");
map.put("id",S);
}catch (Exception e){
......@@ -107,6 +109,7 @@ public class ReceiptApi {
map.put("qrCode",(list.size()>0?list.get(0).get("QR_CODE"):null));
map.put("id",mapList.get(0).get("ID"));
map.put("checkName",mapList.get(0).get("CHECK_NAME"));
map.put("count",1);
map.put("policeName",mapList.get(0).get("GAJG_MC"));
}catch (Exception e){
logger.error("证件ID:" + id + "生成人姓名:" + name + "起始有效期:" + beginDate + "截止有效期" + expireDate);
......@@ -153,23 +156,28 @@ public class ReceiptApi {
//查询这个受理号是否生成了详单
int receiptCount = receiptService.selectReceiptByAcceptNo(receiptListDate.get(n).get("ACCEPT_NO").toString());
//没有生成交接单详单
Map<String, Object> detailedData = receiptService.selectDetailedData(receiptListDate.get(n).get("ACCEPT_NO").toString());
String uploadNo = (String) detailedData.get("UPLOAD_NO");
String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String name2 = (String) detailedData.get("NAME");
String sex = (String) detailedData.get("SEX_NO");
String signGovt = (String) detailedData.get("SIGN_GOVT");
String gajg_dm = (String) detailedData.get("GAJG_DM");
map.put("policeName",receiptService.selectPoliceName(gajg_dm));
if (receiptCount == 0) {
Map<String, Object> detailedData = receiptService.selectDetailedData(receiptListDate.get(n).get("ACCEPT_NO").toString());
String uploadNo = (String) detailedData.get("UPLOAD_NO");
String acceptNo2 = (String) detailedData.get("ACCEPT_NO");
String name2 = (String) detailedData.get("NAME");
String sex = (String) detailedData.get("SEX_NO");
String signGovt = (String) detailedData.get("SIGN_GOVT");
String gajg_dm = (String) detailedData.get("GAJG_DM");
int receiptId = Integer.parseInt((BigDecimal) detailedData.get("ID") + "");
//生成详单
receiptService.createDetailedList(uploadNo, acceptNo2, name2, receiptListDate.get(n).get("ID_NO").toString(), gajg_dm, receiptId, sex, signGovt);
} else {
//不做操作
}
}
map.put("show",true);
map.put("state",1);
map.put("count",receiptListDate.size());
map.put("id",receiptList);
}catch (Exception e){
logger.error("证件ID:" + id + "生成人姓名:" + name + "起始有效期:" + beginDate + "截止有效期" + expireDate);
......@@ -185,6 +193,7 @@ public class ReceiptApi {
map.put("id",mapList.get(0).get("ID"));
List<Map<String, Object>> list = receiptService.selectQrCodeByCardID(id, beginDate, expireDate);
map.put("qrCode",(list.size()>0?list.get(0).get("QR_CODE"):null));
map.put("count",receiptListDate.size());
map.put("checkName",mapList.get(0).get("CHECK_NAME"));
map.put("policeName",mapList.get(0).get("GAJG_MC"));
}catch (Exception e){
......
......@@ -282,4 +282,7 @@ public interface ReceiptMapper {
"where DETAIL_RECEIPT_LIST.CARD_ID = #{id}")
public List<Map<String, Object>> selectQrCodeByCardID(@Param("id") String id, @Param("beginDate")String beginDate, @Param("expireDate")String expireDate);
@Select("select * from GAJG_DM where GAJG_DM = #{policeCode} ")
public List<Map<String, Object>> selectPoliceName(@Param("policeCode") String policeCode);
}
......@@ -87,4 +87,6 @@ public interface ReceiptService {
public List<Map<String,Object>> selectPoliceDataByDownLoadDate(String startDate,String endDate);
public List<Map<String,Object>> selectQrCodeByCardID(String id,String beginDate,String expireDate);
public String selectPoliceName(String policeCode);
}
......@@ -353,7 +353,16 @@ public class ReceiptServiceImpl implements ReceiptService {
List<Map<String, Object>> list = receiptMapper.selectQrCodeByCardID(id, beginDate, expireDate);
return list;
}
@Override
public String selectPoliceName(String policeCode) {
List<Map<String, Object>> list = receiptMapper.selectPoliceName(policeCode);
if (list.size()>0){
return list.get(0).get("GAJG_MC").toString();
}else {
return null ;
}
}
private List<Map<String, Object>> formateMap(List<Map<String, Object>> maplist) {
Map<String, Object> typeMap = new LinkedHashMap<>();
......
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