2019第一个博客
cccccccc
jhjchjhdsjfajdjjdahkj
@PiccTransactional
public Map<String,Object> dealAnnuityPay(AnnuityPay annuityPay,HttpServletRequest request) throws SystemException {
LoginUser sessionUser = WebUtils.getBaseLoginUser(request);//当前登录用户
Map<String,Object> resultMap=new HashMap<>();
if(annuityPay==null){
resultMap.put(“isCheckFile”,false);
resultMap.put(“errorContent”,“传值为空!”);
resultMap.put(“allSucess”,false);
throw new SystemException(“传值为空!”);
}
//判断缴费申请是增加还是修改
String applyCode;
boolean isAddFlag=false;
if (!StringUtils.isBlank(annuityPay.getApplyCode())){
//如果是修改,根据申请编号更新申请数据
applyCode=annuityPay.getApplyCode();
}else {
//如果是新增,生成统一申请编号
applyCode = AcceptApplyType.JFSQ.getCode() + DateUtils.getDateTimeStr()+ DataUtils.getRandomNumber(4);
isAddFlag=true;
}
//0 校验文件信息
ResponseInfo fileCheckResult;
try{
resultMap=annuityFileCheckCommonUtils.checkInformation(annuityPay.getApplyAndFileList(),AcceptApplyType.JFSQ.getCode(),annuityPay,isAddFlag);
if (!(boolean)resultMap.get(“isSuccess”)) {
logger.error(“文件校验失败!”,resultMap);
resultMap.put(“allSucess”,false);
return resultMap;
}
}catch (Exception e){
logger.error("文件校验失败 ",e);
resultMap.put(“isCheckFile”,false);
resultMap.put(“errorContent”,e.getMessage());
resultMap.put(“allSucess”,false);
throw new SystemException(“文件校验失败!”);
}
//1 保存上传文件数据信息
ResponseInfo resultResponseInfo;
if(!isAddFlag){
//修改
resultResponseInfo=annuitySaveFileCommonUtils.saveFileMessage(false,annuityPay.getApplyAndFileList(),applyCode,sessionUser.getAccountHolderCode());
if (StringUtils.equals(resultResponseInfo.getCallFlag(), CallFlagEnum.FAILED.value())) {
logger.error(“保存文件”,resultResponseInfo.getErrorContent());
resultMap.put(“isCheckFile”,false);
resultMap.put(“errorContent”,resultResponseInfo.getErrorContent());
resultMap.put(“allSucess”,false);
throw new SystemException(resultResponseInfo.getErrorContent());
}
}else{