Beispiel #1
0
 def post(self, request) -> JsonResponse:
     logger.info("helpme accept post info")
     post_info = self.parse_ReceivedData(request)
     # handle post data is empty
     if len(post_info.err) > 0:
         logger.info(post_info.err)
         return JsonResponse(post_info.err)
     # instantiation hd_interface/Hd_EMW025....
     logger.info("helpme instantiation hd_interface and hd saving")
     hdsave = HD.hd_interface()
     # multiple equals is used to storage
     hdsave.name = post_info.name
     hdsave.idcard = post_info.idcard
     hdsave.token = post_info.token
     hdsave.phone = post_info.phone
     hdsave.flag = post_info.flag
     hdsave.seqId = post_info.seqId
     logger.info(
         f"helpme accepted arguments:{hdsave.name},{hdsave.idcard},{hdsave.token},{hdsave.phone},{hdsave.flag}"
     )
     # 2017/10/24/10:20 => add storage in helpMe's database
     res = hdsave.main()
     # store emd008 details in database boshidun.
     hdsave.emd008_details_storage(flag="HM")
     logger.info(res.get("retmessage"))
     return JsonResponse(res)
Beispiel #2
0
 def post(self,request)->JsonResponse:
     post_info = self.parse_ReceivedData(request)
     hd = HD.hd_interface()
     hd.phone = post_info.phone
     hd.flag = post_info.flag
     hd.name = post_info.name
     hd.idcard = post_info.idcard
     hd.seqId = post_info.seqId
     res = hd.hd_illegal_info()
     logger.info("Accepted_Query EMW018 illegalinfo")
     return JsonResponse(res)
Beispiel #3
0
 def post(self,request)->JsonResponse:
     post_info = self.parse_ReceivedData(request)
     hd = HD.hd_interface()
     hd.flag = post_info.flag
     hd.phone = post_info.phone
     hd.name = post_info.name
     hd.idcard = post_info.idcard
     hd.seqId = post_info.seqId
     res1 = hd.ssd_webloan()
     # storage cfd_hy_webloan_detail;cfd_hd_creditregistration
     res2 = hd.hd_webloan()
     res3 = hd.hd_webloandetail()
     if res1.get(self.retcode_name) == res2.get(self.retcode_name) \
             == res3.get(self.retcode_name) == self.retcode_success:
         return_res = self.SUCCESS
     else:
         return_res = self.FAILED
     logger.info("Accepted_Query EMR004 贷款申请次数")
     return JsonResponse(return_res)