编辑银行网点代码 2.21 KB
 /**
     * 编辑银行网点收展服务人员
     * @param bankCode
     * @param empNo
     * @return
     */
    @RequestMapping("modifyBankEmp")
    @ResponseBody
    public ServerResponse<Map<String, String>> modiyfBankEmp (String bankCode,String empNo){
        if(StringUtils.isEmpty(bankCode)){
            return ServerResponse.createByErrorMessage("银行网点代码不能为空");
        }
        if(StringUtils.isEmpty(empNo)){
            return ServerResponse.createByErrorMessage("收展服务人员代码不能为空");
        }
        JSONObject retjson=new JSONObject();
        Map<String,String> paramMap=new HashMap<String,String>();
        Map<String,String> retMap=new HashMap<String,String>();
        retMap.put("isFlag", MyConstant.ISPASS_NO);
        retMap.put("msg", "系统繁忙");
        paramMap.put(bankCode,empNo);
        try
        {
            retjson=ruleDealService.addBankEmp(paramMap);
            if(retjson!=null){
                retMap.put("msg", retjson.getString("msg"));
                if(Integer.parseInt(retjson.getString("success"))>0){
                    retMap.put("isFlag", MyConstant.ISPASS_YES);
                }
            }
            
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        return ServerResponse.createBySuccess(retMap);
    }
    
    
    
    
    
    
     //若存在该银行网点则更新服务人员,不存在则新增
                GrasBankEmp grasBankEmpInfo= oracleRuleDealService.queryGrasBankEmp(currentBankCode);
                if(grasBankEmpInfo!=null){
                    GrasBankEmp grasBankEmp=new GrasBankEmp();
                    grasBankEmp.setEmpNo(currentEmpNo);
                    grasBankEmp.setPkSerial(grasBankEmpInfo.getPkSerial());
                    oracleRuleDealService.modifyBankServicerByPkSerial(grasBankEmp);
                   /* numFail++;
                    sbMsg.append("银行网点代码:").append(currentBankCode).append("失败原因:").append("该银行网点已存在;");
                    continue;*/
                }else{
                    oracleRuleDealService.addBankEmp(gasBankEmp);
                }
                numSuccess++;