|
@@ -138,7 +138,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
|
|
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(id);
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(id);
|
|
|
- industrialLandSupplyConsultation.setDepartment_id(user.getDepartment_id() + "");
|
|
|
|
|
|
|
+ //industrialLandSupplyConsultation.setDepartment_id(user.getDepartment_id() + "");
|
|
|
|
|
+ Department department = departmentService.findRootById(user.getDepartment_id());
|
|
|
|
|
+ industrialLandSupplyConsultation.setDepartment_id(department.getId() + "");
|
|
|
List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
|
boolean sumbitToSummary = false;
|
|
boolean sumbitToSummary = false;
|
|
|
for (IndustrialLandSupplyConsultation landSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
for (IndustrialLandSupplyConsultation landSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
@@ -157,7 +159,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (UserGroup userGroup : userGroups) {
|
|
for (UserGroup userGroup : userGroups) {
|
|
|
if (Objects.equals(userGroup.getUser_id(), user.getId())) {
|
|
if (Objects.equals(userGroup.getUser_id(), user.getId())) {
|
|
|
|
|
|
|
|
- Department department = departmentService.selectById(user.getDepartment_id());
|
|
|
|
|
|
|
+ //Department department = departmentService.selectById(user.getDepartment_id());
|
|
|
|
|
+ department = departmentService.findRootById(user.getDepartment_id());
|
|
|
if (sumbitToSummary) {
|
|
if (sumbitToSummary) {
|
|
|
entity.setApprove_status_desc(department.getName() + "已反馈");
|
|
entity.setApprove_status_desc(department.getName() + "已反馈");
|
|
|
entity.setApprove_status("a");
|
|
entity.setApprove_status("a");
|
|
@@ -171,7 +174,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
|
|
|
|
|
IndustrialLandSupplyDistribution industrialLandSupplyDistribution = new IndustrialLandSupplyDistribution();
|
|
IndustrialLandSupplyDistribution industrialLandSupplyDistribution = new IndustrialLandSupplyDistribution();
|
|
|
industrialLandSupplyDistribution.setIndustrial_land_supply_id(id);
|
|
industrialLandSupplyDistribution.setIndustrial_land_supply_id(id);
|
|
|
- industrialLandSupplyDistribution.setDepartment_id(user.getDepartment_id() + "");
|
|
|
|
|
|
|
+ //industrialLandSupplyDistribution.setDepartment_id(user.getDepartment_id() + "");
|
|
|
|
|
+ Department department = departmentService.findRootById(user.getDepartment_id());
|
|
|
|
|
+ industrialLandSupplyDistribution.setDepartment_id(department.getId() + "");
|
|
|
List<IndustrialLandSupplyDistribution> industrialLandSupplyDistributionList = industrialLandSupplyDistributionService.findListByWhere(industrialLandSupplyDistribution);
|
|
List<IndustrialLandSupplyDistribution> industrialLandSupplyDistributionList = industrialLandSupplyDistributionService.findListByWhere(industrialLandSupplyDistribution);
|
|
|
boolean sumbitToSummary = false;
|
|
boolean sumbitToSummary = false;
|
|
|
for (IndustrialLandSupplyDistribution landSupplyDistribution : industrialLandSupplyDistributionList) {
|
|
for (IndustrialLandSupplyDistribution landSupplyDistribution : industrialLandSupplyDistributionList) {
|
|
@@ -190,7 +195,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (UserGroup userGroup : userGroups) {
|
|
for (UserGroup userGroup : userGroups) {
|
|
|
if (Objects.equals(userGroup.getUser_id(), user.getId())) {
|
|
if (Objects.equals(userGroup.getUser_id(), user.getId())) {
|
|
|
|
|
|
|
|
- Department department = departmentService.selectById(user.getDepartment_id());
|
|
|
|
|
|
|
+ //Department department = departmentService.selectById(user.getDepartment_id());
|
|
|
|
|
+ department = departmentService.findRootById(user.getDepartment_id());
|
|
|
if (sumbitToSummary) {
|
|
if (sumbitToSummary) {
|
|
|
entity.setApprove_status_desc(department.getName() + "已反馈");
|
|
entity.setApprove_status_desc(department.getName() + "已反馈");
|
|
|
entity.setApprove_status("a");
|
|
entity.setApprove_status("a");
|
|
@@ -419,7 +425,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
|
|
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(id);
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(id);
|
|
|
- industrialLandSupplyConsultation.setDepartment_id(ShiroUtils.getUserEntity().getDepartment_id() + "");
|
|
|
|
|
|
|
+ //industrialLandSupplyConsultation.setDepartment_id(ShiroUtils.getUserEntity().getDepartment_id() + "");
|
|
|
|
|
+ Department department = departmentService.findRootById(ShiroUtils.getUserEntity().getDepartment_id());
|
|
|
|
|
+ industrialLandSupplyConsultation.setDepartment_id(department.getId() + "");
|
|
|
industrialLandSupplyConsultation.setDel_flag(false);
|
|
industrialLandSupplyConsultation.setDel_flag(false);
|
|
|
List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
|
for (IndustrialLandSupplyConsultation landSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
for (IndustrialLandSupplyConsultation landSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
@@ -429,14 +437,15 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
FileDown fileDown = new FileDown(feedbackAttachments.get(0).getId(), feedbackAttachments.get(0).getFile_name(), feedbackAttachments.get(0).getFile_url(), attachments.get(0).getDownload_uri());
|
|
FileDown fileDown = new FileDown(feedbackAttachments.get(0).getId(), feedbackAttachments.get(0).getFile_name(), feedbackAttachments.get(0).getFile_url(), attachments.get(0).getDownload_uri());
|
|
|
landSupplyConsultation.setFileDown(fileDown);
|
|
landSupplyConsultation.setFileDown(fileDown);
|
|
|
}
|
|
}
|
|
|
- Department department = departmentService.selectById(Integer.valueOf(landSupplyConsultation.getDepartment_id()));
|
|
|
|
|
- landSupplyConsultation.setDepartment_name(department.getName());
|
|
|
|
|
|
|
+ Department depart = departmentService.selectById(Integer.valueOf(landSupplyConsultation.getDepartment_id()));
|
|
|
|
|
+ landSupplyConsultation.setDepartment_name(depart.getName());
|
|
|
}
|
|
}
|
|
|
entity.setConsultationList(industrialLandSupplyConsultationList);
|
|
entity.setConsultationList(industrialLandSupplyConsultationList);
|
|
|
|
|
|
|
|
IndustrialLandSupplyDistribution industrialLandSupplyDistribution = new IndustrialLandSupplyDistribution();
|
|
IndustrialLandSupplyDistribution industrialLandSupplyDistribution = new IndustrialLandSupplyDistribution();
|
|
|
industrialLandSupplyDistribution.setIndustrial_land_supply_id(id);
|
|
industrialLandSupplyDistribution.setIndustrial_land_supply_id(id);
|
|
|
- industrialLandSupplyDistribution.setDepartment_id(ShiroUtils.getUserEntity().getDepartment_id() + "");
|
|
|
|
|
|
|
+ //industrialLandSupplyDistribution.setDepartment_id(ShiroUtils.getUserEntity().getDepartment_id() + "");
|
|
|
|
|
+ industrialLandSupplyDistribution.setDepartment_id(department.getId() + "");
|
|
|
industrialLandSupplyDistribution.setDel_flag(false);
|
|
industrialLandSupplyDistribution.setDel_flag(false);
|
|
|
List<IndustrialLandSupplyDistribution> industrialLandSupplyDistributionList = industrialLandSupplyDistributionService.findListByWhere(industrialLandSupplyDistribution);
|
|
List<IndustrialLandSupplyDistribution> industrialLandSupplyDistributionList = industrialLandSupplyDistributionService.findListByWhere(industrialLandSupplyDistribution);
|
|
|
for (IndustrialLandSupplyDistribution landSupplyDistribution : industrialLandSupplyDistributionList) {
|
|
for (IndustrialLandSupplyDistribution landSupplyDistribution : industrialLandSupplyDistributionList) {
|
|
@@ -454,8 +463,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
FileDown fileDown = new FileDown(attachmentList.get(0).getId(), attachmentList.get(0).getFile_name(), attachmentList.get(0).getFile_url(), attachmentList.get(0).getDownload_uri());
|
|
FileDown fileDown = new FileDown(attachmentList.get(0).getId(), attachmentList.get(0).getFile_name(), attachmentList.get(0).getFile_url(), attachmentList.get(0).getDownload_uri());
|
|
|
landSupplyDistribution.setFeedback_file(fileDown);
|
|
landSupplyDistribution.setFeedback_file(fileDown);
|
|
|
}
|
|
}
|
|
|
- Department department = departmentService.selectById(Integer.valueOf(landSupplyDistribution.getDepartment_id()));
|
|
|
|
|
- landSupplyDistribution.setDepartment_name(department.getName());
|
|
|
|
|
|
|
+ Department depart = departmentService.selectById(Integer.valueOf(landSupplyDistribution.getDepartment_id()));
|
|
|
|
|
+ landSupplyDistribution.setDepartment_name(depart.getName());
|
|
|
}
|
|
}
|
|
|
entity.setDistributionList(industrialLandSupplyDistributionList);
|
|
entity.setDistributionList(industrialLandSupplyDistributionList);
|
|
|
|
|
|
|
@@ -591,7 +600,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
consulApprovalList = approvalService.findListByWhere(approval);
|
|
consulApprovalList = approvalService.findListByWhere(approval);
|
|
|
|
|
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
- industrialLandSupplyConsultation.setDepartment_id(ShiroUtils.getUserEntity().getDepartment_id() + "");
|
|
|
|
|
|
|
+ //industrialLandSupplyConsultation.setDepartment_id(ShiroUtils.getUserEntity().getDepartment_id() + "");
|
|
|
|
|
+ Department department = departmentService.findRootById(ShiroUtils.getUserEntity().getDepartment_id());
|
|
|
|
|
+ industrialLandSupplyConsultation.setDepartment_id(department.getId() + "");
|
|
|
industrialLandSupplyConsultation.setDel_flag(false);
|
|
industrialLandSupplyConsultation.setDel_flag(false);
|
|
|
industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
|
}
|
|
}
|
|
@@ -603,7 +614,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
distApprovalList = approvalService.findListByWhere(approval);
|
|
distApprovalList = approvalService.findListByWhere(approval);
|
|
|
|
|
|
|
|
IndustrialLandSupplyDistribution industrialLandSupplyDistribution = new IndustrialLandSupplyDistribution();
|
|
IndustrialLandSupplyDistribution industrialLandSupplyDistribution = new IndustrialLandSupplyDistribution();
|
|
|
- industrialLandSupplyDistribution.setDepartment_id(ShiroUtils.getUserEntity().getDepartment_id() + "");
|
|
|
|
|
|
|
+ //industrialLandSupplyDistribution.setDepartment_id(ShiroUtils.getUserEntity().getDepartment_id() + "");
|
|
|
|
|
+ Department department = departmentService.findRootById(ShiroUtils.getUserEntity().getDepartment_id());
|
|
|
|
|
+ industrialLandSupplyDistribution.setDepartment_id(department.getId() + "");
|
|
|
industrialLandSupplyDistribution.setDel_flag(false);
|
|
industrialLandSupplyDistribution.setDel_flag(false);
|
|
|
industrialLandSupplyDistributionList = industrialLandSupplyDistributionService.findListByWhere(industrialLandSupplyDistribution);
|
|
industrialLandSupplyDistributionList = industrialLandSupplyDistributionService.findListByWhere(industrialLandSupplyDistribution);
|
|
|
}
|
|
}
|
|
@@ -924,10 +937,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// params.put("apply_name", Constant.ProjectType.PROJECT_INTELLIGENT);
|
|
// params.put("apply_name", Constant.ProjectType.PROJECT_INTELLIGENT);
|
|
|
// String templateCode = Constant.SMS_TemplateCode.RPOJECT_APPROVAL_REMIND;
|
|
// String templateCode = Constant.SMS_TemplateCode.RPOJECT_APPROVAL_REMIND;
|
|
|
|
|
|
|
|
- if (CommonUtils.isNull(approval)
|
|
|
|
|
- || Objects.equals(Constant.LandSupplyApproveStatus.PLATE_WITHDRAW, approval.getAfter_approvalstatus())
|
|
|
|
|
- || Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUBMIT, approval.getAfter_approvalstatus())) {
|
|
|
|
|
- //待属地提交 或 属地撤回 或 商务局受理员待提交--》待商务局受理员审核 或 待咨询反馈
|
|
|
|
|
|
|
+ if (CommonUtils.isNull(approval)) {
|
|
|
|
|
+ //待属地提交 --》待商务局受理员审核 或 待咨询反馈
|
|
|
|
|
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(applyId + "");
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(applyId + "");
|
|
@@ -987,7 +998,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (User user : users) {
|
|
for (User user : users) {
|
|
|
if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
|
sb.append(userGroup.getUser_id() + ",");
|
|
sb.append(userGroup.getUser_id() + ",");
|
|
|
-// String message = user.getUser_name() + ",您好。“" + company.getCompany_name() + "企业”的“" + projectName + "项目”申请需要您审核。谢谢。";
|
|
|
|
|
|
|
+// String message = user.getUser_name() +0 ",您好。“" + company.getCompany_name() + "企业”的“" + projectName + "项目”申请需要您审核。谢谢。";
|
|
|
// messages.setContent(message);
|
|
// messages.setContent(message);
|
|
|
// int[] streetArrInt = new int[1];
|
|
// int[] streetArrInt = new int[1];
|
|
|
// streetArrInt[0] = userGroup.getUser_id();
|
|
// streetArrInt[0] = userGroup.getUser_id();
|
|
@@ -1033,8 +1044,182 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
|
|
industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
|
|
|
approvalService.insertAndGetId(newApproval);
|
|
approvalService.insertAndGetId(newApproval);
|
|
|
return true;
|
|
return true;
|
|
|
|
|
+ } else if (Objects.equals(Constant.LandSupplyApproveStatus.PLATE_WITHDRAW, approval.getAfter_approvalstatus())) {
|
|
|
|
|
+ //属地撤回 --》待商务局受理员审核 或 待咨询反馈
|
|
|
|
|
+
|
|
|
|
|
+ IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
|
|
+ industrialLandSupplyConsultation.setIndustrial_land_supply_id(applyId + "");
|
|
|
|
|
+ industrialLandSupplyConsultation.setDel_flag(false);
|
|
|
|
|
+ List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
|
|
|
+ boolean sumbitToLeader = false;
|
|
|
|
|
+ if (CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
|
|
+ //如果提交了咨询信息进入待反馈 未提交直接进入商务局分管领导审核
|
|
|
|
|
+ sumbitToLeader = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ Group group = null;
|
|
|
|
|
+ newApproval.setOper_type(Constant.OperType.SUBMIT);
|
|
|
|
|
+ if (Constant.UserType.STREET.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.PLATE_WITHDRAW);
|
|
|
|
|
+ newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE);
|
|
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_1);
|
|
|
|
|
+ if (null == group) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_1 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (Constant.UserType.GOVERNMENT.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUBMIT);
|
|
|
|
|
+ //如果提交了咨询信息进入待反馈 未提交直接进入商务局分管领导审核
|
|
|
|
|
+ if (!sumbitToLeader) {
|
|
|
|
|
+ newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
|
|
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_2);
|
|
|
|
|
+ if (null == group) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_2 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_3);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_4);
|
|
|
|
|
+ if (null == group) {
|
|
|
|
|
+ //throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_3 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_4 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ List<UserGroup> userGroups = userGroupService.findByGroupId(group.getId());
|
|
|
|
|
+ List<User> users = userService.findListByWhere(new User());
|
|
|
|
|
+ StringBuffer sb = new StringBuffer("");
|
|
|
|
|
+ for (UserGroup userGroup : userGroups) {
|
|
|
|
|
+ for (User user : users) {
|
|
|
|
|
+ if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ newApproval.setNextchecker(sb.toString());
|
|
|
|
|
+ if (sb.length() == 0) {
|
|
|
|
|
+ if (Constant.UserType.STREET.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_1 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ } else if (Constant.UserType.GOVERNMENT.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ if (!sumbitToLeader) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_2 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_3 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_4 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ IndustrialLandSupplyDetail entity = new IndustrialLandSupplyDetail();
|
|
|
|
|
+ entity.setId(applyId);
|
|
|
|
|
+ if (Constant.UserType.STREET.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE);
|
|
|
|
|
+ } else if (Constant.UserType.GOVERNMENT.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ //如果提交了咨询信息进入待反馈 未提交直接进入商务局分管领导审核
|
|
|
|
|
+ if (!sumbitToLeader) {
|
|
|
|
|
+ entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ entity.setApprove_status(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
|
|
|
|
|
+ industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
|
|
|
|
|
+ approvalService.insertAndGetId(newApproval);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUBMIT, approval.getAfter_approvalstatus())) {
|
|
|
|
|
+ //商务局受理员待提交--》待商务局受理员审核 或 待咨询反馈
|
|
|
|
|
+
|
|
|
|
|
+ IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
|
|
+ industrialLandSupplyConsultation.setIndustrial_land_supply_id(applyId + "");
|
|
|
|
|
+ industrialLandSupplyConsultation.setDel_flag(false);
|
|
|
|
|
+ List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
|
|
|
+ boolean sumbitToLeader = false;
|
|
|
|
|
+ if (CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
|
|
+ //如果提交了咨询信息进入待反馈 未提交直接进入商务局分管领导审核
|
|
|
|
|
+ sumbitToLeader = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ Group group = null;
|
|
|
|
|
+ newApproval.setOper_type(Constant.OperType.SUBMIT);
|
|
|
|
|
+ if (Constant.UserType.STREET.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUBMIT);
|
|
|
|
|
+ newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE);
|
|
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_1);
|
|
|
|
|
+ if (null == group) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_1 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (Constant.UserType.GOVERNMENT.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUBMIT);
|
|
|
|
|
+ //如果提交了咨询信息进入待反馈 未提交直接进入商务局分管领导审核
|
|
|
|
|
+ if (!sumbitToLeader) {
|
|
|
|
|
+ newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
|
|
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_2);
|
|
|
|
|
+ if (null == group) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_2 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_3);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_4);
|
|
|
|
|
+ if (null == group) {
|
|
|
|
|
+ //throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_3 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_4 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ List<UserGroup> userGroups = userGroupService.findByGroupId(group.getId());
|
|
|
|
|
+ List<User> users = userService.findListByWhere(new User());
|
|
|
|
|
+ StringBuffer sb = new StringBuffer("");
|
|
|
|
|
+ for (UserGroup userGroup : userGroups) {
|
|
|
|
|
+ for (User user : users) {
|
|
|
|
|
+ if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ newApproval.setNextchecker(sb.toString());
|
|
|
|
|
+ if (sb.length() == 0) {
|
|
|
|
|
+ if (Constant.UserType.STREET.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_1 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ } else if (Constant.UserType.GOVERNMENT.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ if (!sumbitToLeader) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_2 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_3 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_4 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ IndustrialLandSupplyDetail entity = new IndustrialLandSupplyDetail();
|
|
|
|
|
+ entity.setId(applyId);
|
|
|
|
|
+ if (Constant.UserType.STREET.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE);
|
|
|
|
|
+ } else if (Constant.UserType.GOVERNMENT.equals(ShiroUtils.getUserType())) {
|
|
|
|
|
+ //如果提交了咨询信息进入待反馈 未提交直接进入商务局分管领导审核
|
|
|
|
|
+ if (!sumbitToLeader) {
|
|
|
|
|
+ entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ //entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ entity.setApprove_status(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
|
|
|
|
|
+ industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
|
|
|
|
|
+ approvalService.insertAndGetId(newApproval);
|
|
|
|
|
+ return true;
|
|
|
} else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
|
|
} else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
|
|
|
- //待商务局受理员审核 --》 待咨询反馈
|
|
|
|
|
|
|
+ //待商务局受理员审核 --》 待咨询反馈
|
|
|
|
|
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(applyId + "");
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(applyId + "");
|
|
@@ -1091,6 +1276,77 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ IndustrialLandSupplyDetail entity = new IndustrialLandSupplyDetail();
|
|
|
|
|
+ entity.setId(applyId);
|
|
|
|
|
+ if (sumbitToLeader) {
|
|
|
|
|
+ //entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ entity.setApprove_status(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ entity.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
|
|
|
|
|
+ }
|
|
|
|
|
+ entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
|
|
|
|
|
+ industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
|
|
|
|
|
+ approvalService.insertAndGetId(newApproval);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } else if (Objects.equals(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_RETURN, approval.getAfter_approvalstatus())) {
|
|
|
|
|
+ //预审退回 --》 待咨询反馈
|
|
|
|
|
+
|
|
|
|
|
+ IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
|
|
+ industrialLandSupplyConsultation.setIndustrial_land_supply_id(applyId + "");
|
|
|
|
|
+ industrialLandSupplyConsultation.setDel_flag(false);
|
|
|
|
|
+ List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
|
|
|
+ boolean sumbitToLeader = false;
|
|
|
|
|
+ if (CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
|
|
+ sumbitToLeader = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Group group = null;
|
|
|
|
|
+ newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_RETURN);
|
|
|
|
|
+ if (sumbitToLeader) {
|
|
|
|
|
+ newApproval.setOper_type(Constant.OperType.SUBMIT);
|
|
|
|
|
+ //newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE);
|
|
|
|
|
+ //group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_3);
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_4);
|
|
|
|
|
+ if (null == group) {
|
|
|
|
|
+ //throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_3 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_4 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ newApproval.setOper_type(Constant.OperType.DISTRIBUTE);
|
|
|
|
|
+ newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
|
|
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_2);
|
|
|
|
|
+ if (null == group) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_2 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ List<UserGroup> userGroups = userGroupService.findByGroupId(group.getId());
|
|
|
|
|
+ List<User> users = userService.findListByWhere(new User());
|
|
|
|
|
+ StringBuffer sb = new StringBuffer("");
|
|
|
|
|
+ for (UserGroup userGroup : userGroups) {
|
|
|
|
|
+ for (User user : users) {
|
|
|
|
|
+ if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ newApproval.setNextchecker(sb.toString());
|
|
|
|
|
+ if (sumbitToLeader) {
|
|
|
|
|
+ if (sb.length() == 0) {
|
|
|
|
|
+ //throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_3 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ //临时跳过商务领导审核
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_4 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (sb.length() == 0) {
|
|
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_2 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
IndustrialLandSupplyDetail entity = new IndustrialLandSupplyDetail();
|
|
IndustrialLandSupplyDetail entity = new IndustrialLandSupplyDetail();
|
|
|
entity.setId(applyId);
|
|
entity.setId(applyId);
|
|
|
if (sumbitToLeader) {
|
|
if (sumbitToLeader) {
|
|
@@ -1928,7 +2184,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (UserGroup userGroup : userGroups) {
|
|
for (UserGroup userGroup : userGroups) {
|
|
|
for (User user : users) {
|
|
for (User user : users) {
|
|
|
if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
|
- list.add(departmentService.selectById(user.getDepartment_id()));
|
|
|
|
|
|
|
+ //list.add(departmentService.selectById(user.getDepartment_id()));
|
|
|
|
|
+ //获取根目录部门
|
|
|
|
|
+ list.add(departmentService.findRootById(user.getDepartment_id()));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1954,7 +2212,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (UserGroup userGroup : userGroups) {
|
|
for (UserGroup userGroup : userGroups) {
|
|
|
for (User user : users) {
|
|
for (User user : users) {
|
|
|
if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
|
- list.add(departmentService.selectById(user.getDepartment_id()));
|
|
|
|
|
|
|
+ //list.add(departmentService.selectById(user.getDepartment_id()));
|
|
|
|
|
+ //获取根目录部门
|
|
|
|
|
+ list.add(departmentService.findRootById(user.getDepartment_id()));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|