|
|
@@ -112,26 +112,27 @@ public class AdminApiController extends BaseApiController {
|
|
|
@Resource
|
|
|
private AftFileService aftFileService;
|
|
|
@Resource(name = "passwordUtil")
|
|
|
- private PasswordUtil passwordUtil;
|
|
|
+ private PasswordUtil passwordUtil;
|
|
|
@Resource
|
|
|
- private AdminService adminService;
|
|
|
-
|
|
|
+ private AdminService adminService;
|
|
|
+
|
|
|
/**
|
|
|
* 新增用户
|
|
|
+ *
|
|
|
* @param mobile
|
|
|
* @param type
|
|
|
* @param unitName
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/addNewUser", method = RequestMethod.POST)
|
|
|
- public Result addNewUser(String mobile, Integer type, String unitName){
|
|
|
+ public Result addNewUser(String mobile, Integer type, String unitName) {
|
|
|
Result res = new Result();
|
|
|
User user = userService.selectByMobieAndType(mobile, type);
|
|
|
if (null != user) {
|
|
|
res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "当前用户已注册!"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
User u = new User();
|
|
|
u.setId(UUID.randomUUID().toString());
|
|
|
u.setMobile(mobile);
|
|
|
@@ -146,7 +147,6 @@ public class AdminApiController extends BaseApiController {
|
|
|
userService.insertRegister(u, "", unitName);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 个人用户列表
|
|
|
@@ -303,7 +303,13 @@ public class AdminApiController extends BaseApiController {
|
|
|
public Result updateOrgHumanResource(OrgHumanResource orgHumanResource) {
|
|
|
Result res = new Result();
|
|
|
if (null == orgHumanResource.getId()) {
|
|
|
+ if (null != orgHumanResourceService.selectOrgHumanResourceByUidAndYear(orgHumanResource.getYear(),
|
|
|
+ orgHumanResource.getUid())){
|
|
|
+ res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "当年度人力资源情况已录入!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
orgHumanResource.setId(UUID.randomUUID().toString());
|
|
|
+ orgHumanResource.setDeletedSign(0);
|
|
|
orgHumanResourceService.insert(orgHumanResource);
|
|
|
} else {
|
|
|
orgHumanResourceService.updateByPrimaryKeySelective(orgHumanResource);
|
|
|
@@ -969,9 +975,10 @@ public class AdminApiController extends BaseApiController {
|
|
|
orgCognizanceService.updateByPrimaryKeySelective(cog);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 刪除高企认定
|
|
|
+ *
|
|
|
* @param ids
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -1113,14 +1120,14 @@ public class AdminApiController extends BaseApiController {
|
|
|
if (res.getData() != "" && res.getData() != null && null == aftFileService.selectAftFileBySign(sign)) {
|
|
|
AftFile f = new AftFile();
|
|
|
f.setId(UUID.randomUUID().toString());
|
|
|
- if ("patent_prory_statement".equals(sign)) {
|
|
|
- f.setFileName("专利代理委托书模版");
|
|
|
- f.setSign(sign);
|
|
|
- }
|
|
|
- f.setFilePath("/admin/" + fileName);
|
|
|
- f.setDeleletedSign(0);
|
|
|
- aftFileService.insert(f);
|
|
|
-
|
|
|
+ if ("patent_prory_statement".equals(sign)) {
|
|
|
+ f.setFileName("专利代理委托书模版");
|
|
|
+ f.setSign(sign);
|
|
|
+ }
|
|
|
+ f.setFilePath("/admin/" + fileName);
|
|
|
+ f.setDeleletedSign(0);
|
|
|
+ aftFileService.insert(f);
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
res.getError().add(buildError(ErrorConstants.FILE_PATTERN_ERROR, "文件格式错误,请重新上传!"));
|
|
|
@@ -1145,26 +1152,24 @@ public class AdminApiController extends BaseApiController {
|
|
|
// org团体列表
|
|
|
private Pagination<OrgListBo> getOrgList(String mobile, String email, String[] createTime, Integer number,
|
|
|
String aftUsername, Integer auditStatus, Integer pNo, Integer pSize) throws ParseException {
|
|
|
- return userService.listOrg(mobile, email, createTime, number, aftUsername, auditStatus,
|
|
|
- pNo, pSize);
|
|
|
+ return userService.listOrg(mobile, email, createTime, number, aftUsername, auditStatus, pNo, pSize);
|
|
|
}
|
|
|
|
|
|
// user个人列表
|
|
|
private Pagination<UserListBo> getUserList(String mobile, String email, String[] createTime, Integer number,
|
|
|
String aftUsername, Integer auditStatus, Integer pNo, Integer pSize) throws ParseException {
|
|
|
- return userService.listUser(mobile, email, createTime, number, aftUsername,
|
|
|
- auditStatus, pNo, pSize);
|
|
|
+ return userService.listUser(mobile, email, createTime, number, aftUsername, auditStatus, pNo, pSize);
|
|
|
}
|
|
|
-
|
|
|
- //高企详情
|
|
|
+
|
|
|
+ // 高企详情
|
|
|
private CognizanceDetailBo handleCognizanceDetail(String uid, String cid, Integer year) {
|
|
|
return orgCognizanceService.selectCognizanceDetailBo(uid, cid, year);
|
|
|
}
|
|
|
-
|
|
|
- //年报
|
|
|
+
|
|
|
+ // 年报
|
|
|
private AnnualReportBo handleAnnualReport(String uid, Integer year) {
|
|
|
return orgAnnualReportService.selectAnnualReportBo(uid, year);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private String handleFile(Result res, HttpServletRequest req, String fileName, List<MultipartFile> files,
|