编辑银行网点代码
2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* 编辑银行网点收展服务人员
* @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++;