Commit 46d45d3e by 张祺

修改填报对象模型

parent a7ce3599
......@@ -70,6 +70,7 @@ public class DataEnterCtrl {
List<JSONObject> orgs = systemAuthService.getOrgByNos(idList);
for (JSONObject jo : orgs) {
AuthModel authModel = new AuthModel();
authModel.setObjType(Constants.OBJ_TYPE_ORG);
authModel.setName(jo.getString("name"));
authModel.setId(jo.getString("no"));
objs.add(authModel);
......
......@@ -83,6 +83,7 @@ public class ExcelTempCtrl {
systemAuthService.getOrgByNos(objIds);
for (JSONObject jo : orgs) {
AuthModel authModel = new AuthModel();
authModel.setObjType(Constants.OBJ_TYPE_ORG);
authModel.setName(jo.getString("name"));
authModel.setId(jo.getString("no"));
list.add(authModel);
......
......@@ -13,17 +13,20 @@ public class AuthModel {
private String name;
private int objType;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AuthModel authModel = (AuthModel) o;
return Objects.equals(id, authModel.id) &&
Objects.equals(name, authModel.name);
AuthModel model = (AuthModel) o;
return objType == model.objType &&
Objects.equals(id, model.id) &&
Objects.equals(name, model.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
return Objects.hash(id, name, objType);
}
}
......@@ -442,6 +442,7 @@ public class TaskServiceImpl implements TaskService {
List<JSONObject> list = systemAuthService.getOrgByNos(ids);
for (JSONObject jo : list) {
AuthModel model = new AuthModel();
model.setObjType(Constants.OBJ_TYPE_ORG);
model.setId(jo.getString("no"));
model.setName(jo.getString("name"));
models.add(model);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment