示例#1
0
 /**
  * 发卡
  *
  * @author cai.yc 2012-11-20
  * @param model
  * @param query query.createCount : 生成数量,为必填项目,最大不能超过50000<br>
  *     query.cityCode : 六位城市代码,如201000<br>
  *     query.typeCode : 四位类型服务级别代码,如0102表示类型为01,服务级别为02<br>
  * @param req
  * @param res
  * @return 返回"c"含义:<br>
  *     "A0000" : 成功<br>
  *     "A0001" : 卡号剩余数量不够<br>
  *     "A0002" : 输入的发卡数量不合法可能为0,或超过500000<br>
  */
 @RequestMapping("/doCreateCard.html")
 public String doCreateCardAction(
     ModelMap model, CardQueryModel query, HttpServletRequest req, HttpServletResponse res) {
   int leftCount = cardBO.cardIdLeft(query);
   if (query.getCreateCount() == null) {
     model.put("c", "A0003");
   } else if (query.getCreateCount() <= 0 || query.getCreateCount() > 500000) {
     // 发卡数量不合法
     model.put("c", "A0002");
   } else if (leftCount < query.getCreateCount()) {
     // 剩余数量不足
     model.put("c", "A0001");
     model.put("d", leftCount);
   } else {
     // 参数合法,生成卡、激活码
     query.setCreateIp(req.getRemoteHost());
     query.setCreateUserId((String) req.getSession().getAttribute("MY120_MARKET_LOGIN_USER_INFO"));
     int result = cardBO.createCard(query);
     model.put("timestamp", query.getGmtCreate());
     model.put("cardTypeName", cardTypeBO.getCardTypeName(query.getTypeCode()));
     model.put("d", result);
     model.put("c", "A0000");
   }
   return "card/do_create_card.html";
 }
示例#2
0
 /**
  * 发卡输入页
  *
  * @author cai.yc 2012-11-20
  * @param model
  * @return
  */
 @RequestMapping("/toCreateCard.html")
 public String toCreateCardAction(ModelMap model) {
   List<CardTypeModel> cardTypeList = cardTypeBO.listAllCardType();
   model.put("cardTypeList", cardTypeList);
   return "card/to_create_card.html";
 }
示例#3
0
 /**
  * 健康卡管理页面初始化
  *
  * @param
  * @return
  * @author 王磊<*****@*****.**>
  * @since 2012-11-21上午10:12:24
  */
 @RequestMapping("/toSearchCardInfoList.html")
 public String toSearchCardInfoListAction(ModelMap model, CardQueryModel query) {
   List<CardTypeModel> cardTypeList = cardTypeBO.listAllCardType();
   model.put("cardTypeList", cardTypeList);
   return "card/to_search_card.html";
 }