This commit is contained in:
lijiaqi 2022-09-06 16:43:15 +08:00
parent 3843ee510a
commit 4f571895de
4 changed files with 34 additions and 31 deletions

View File

@ -180,14 +180,14 @@ public class ApiContactDbController extends ApiBaseController {
render(ret);
}
@ApiOperation("是否通过")
@PutMapping("evaluate/status/{id}/{status")
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "常委会联系代表id"), @ApiImplicitParam(name = "status", value =
"是否通过: 1通过0不通过")})
public void evaluateStatus(@PathVariable("id") String id,@PathVariable("status") Integer status) {
Ret ret = contactDbService.evaluateStatus(id,status,getApiUser());
render(ret);
}
// @ApiOperation("是否通过")
// @PutMapping("evaluate/status/{id}/{status")
// @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "常委会联系代表id"), @ApiImplicitParam(name = "status", value =
// "是否通过: 1通过0不通过")})
// public void evaluateStatus(@PathVariable("id") String id,@PathVariable("status") Integer status) {
// Ret ret = contactDbService.evaluateStatus(id,status,getApiUser());
// render(ret);
// }
@ApiOperation("通知")
@PostMapping("send_msg/{id}")

View File

@ -130,7 +130,9 @@ public class ApiUserController extends ApiBaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页"),
@ApiImplicitParam(name = "size", value = "显示条数"),
@ApiImplicitParam(name = "type", value = "不传为全部,传多个以英文逗号分隔 admin县级人大工作人员 street乡镇负责人 contact联络站负责人 rddb各级人大代表 voter选民用户"),
@ApiImplicitParam(name = "type", value = "不传为全部,传多个以英文逗号分隔 admin县级人大工作人员 street乡镇负责人 cwhld 常委会领导 " +
"contact联络站负责人" +
" rddb各级人大代表 voter选民用户"),
@ApiImplicitParam(name = "userName", value = "用户名")
})
@DynamicResponseParameters(properties = {
@ -145,6 +147,7 @@ public class ApiUserController extends ApiBaseController {
if (type.contains("voter")) consumer.or().eq("account_type", "voter");
if (type.contains("street")) consumer.or().eq("account_type", "street");
if (type.contains("contact")) consumer.or().eq("account_type", "contact");
if (type.contains("cwhld")) consumer.or().eq("account_type", "cwhld");
});
}
if (StringUtils.isNotBlank(userName)) wrapper.like("user_name", userName);

View File

@ -181,10 +181,10 @@ public class ContactDb extends BaseEntity{
@ApiModelProperty(value = "admin机关办公/ rddb代表/ voter选民 多个用英文逗号间隔")
private String obj;
/**
* 是否通过
*/
@ApiModelProperty(value = "是否通过")
private Boolean status;
// /**
// * 是否通过
// */
// @ApiModelProperty(value = "是否通过")
// private Boolean status;
}

View File

@ -263,23 +263,23 @@ public class ContactDbService extends BaseService<ContactDbMapper, ContactDb> {
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb));
}
public Ret evaluateStatus(String id, Integer status, User loginUser) {
ContactDb contactDb = getById(id);
Assert.notNull(contactDb, "未找到该记录");
if (!loginUser.getId().equals(contactDb.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
if (ContactDb.STATE_CONFERENCE != contactDb.getState())
throw new ResultException(Ret.fail("当前环节不能提交该信息"));
if (status == 0) {
contactDb.setState(ContactDb.STATE_END);
contactDb.setStatus(false);
} else if (status == 1) {
contactDb.setStatus(false);
} else {
return Ret.fail("status传输数据有误");
}
boolean flag = saveOrUpdate(contactDb);
return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb));
}
// public Ret evaluateStatus(String id, Integer status, User loginUser) {
// ContactDb contactDb = getById(id);
// Assert.notNull(contactDb, "未找到该记录");
// if (!loginUser.getId().equals(contactDb.getCreatedId())) return Ret.fail("您不是创建人,不能操作");
// if (ContactDb.STATE_CONFERENCE != contactDb.getState())
// throw new ResultException(Ret.fail("当前环节不能提交该信息"));
// if (status == 0) {
// contactDb.setState(ContactDb.STATE_END);
// contactDb.setStatus(false);
// } else if (status == 1) {
// contactDb.setStatus(false);
// } else {
// return Ret.fail("status传输数据有误");
// }
// boolean flag = saveOrUpdate(contactDb);
// return !flag ? Ret.fail("操作失败") : Ret.ok().data(ContactDbWrapper.build().entityVO(contactDb));
// }
public Ret sendMsg(String id, User loginUser) {
ContactDb contactDb = getById(id);