查看bug修复
parent
93679092de
commit
8be39e14d3
|
@ -38,15 +38,19 @@ public class ApiXgfUserController extends BaseController {
|
||||||
@RequestMapping(value = "/approvalApplication")
|
@RequestMapping(value = "/approvalApplication")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object approvalApplication() throws Exception {
|
public Object approvalApplication() throws Exception {
|
||||||
|
Map<String, Object> response = new HashMap<String, Object>();
|
||||||
try {
|
try {
|
||||||
PageData request = this.getPageData();
|
PageData request = this.getPageData();
|
||||||
xgfUserService.approvalApplication(request);
|
xgfUserService.approvalApplication(request);
|
||||||
Map<String, Object> response = new HashMap<String, Object>();
|
response.put("result", "success");
|
||||||
response.put("result", "response");
|
response.put("code","0");
|
||||||
return response;
|
return response;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new RuntimeException("系统异常");
|
response.put("result", "error");
|
||||||
|
response.put("code","9999");
|
||||||
|
response.put("msg", e.getMessage());
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,11 +120,19 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void approvalApplication(PageData request) throws Exception {
|
public void approvalApplication(PageData request) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
List<String> list = Arrays.asList(request.getString("xgf_user_ids").split(","));
|
List<String> list = Arrays.asList(request.getString("xgf_user_ids").split(","));
|
||||||
|
|
||||||
PageData condition = new PageData();
|
PageData condition = new PageData();
|
||||||
condition.put("XGF_USER_IDS", list);
|
condition.put("XGF_USER_IDS", list);
|
||||||
List<PageData> entities = xgfUserMapper.listByIds(condition);
|
List<PageData> entities = xgfUserMapper.listByIds(condition);
|
||||||
|
/* 校验所有数据是否都是正常状态 */
|
||||||
|
if (entities.stream().anyMatch(n -> !"2".equals(n.getString("STATUS")))) {
|
||||||
|
String name = entities.stream().filter(n -> !"2".equals(n.getString("STATUS"))).map( n -> n.getString("NAME")).collect(Collectors.joining(","));
|
||||||
|
throw new RuntimeException("用户[" + name + "]在系统流程中无法被打回");
|
||||||
|
}
|
||||||
|
|
||||||
for (PageData x : entities) {
|
for (PageData x : entities) {
|
||||||
x.put("VALID_FLAG", "0");
|
x.put("VALID_FLAG", "0");
|
||||||
x.put("STATUS", "1");
|
x.put("STATUS", "1");
|
||||||
|
|
Loading…
Reference in New Issue