|
|
@@ -187,6 +187,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
Approval approval = new Approval();
|
|
|
approval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY);
|
|
|
approval.setApply_id(Integer.parseInt(entity.getId()));
|
|
|
+ approval.setType(Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY);
|
|
|
List<Approval> approvalList = approvalService.findListByWhere(approval);
|
|
|
if (!CollectionUtils.isEmpty(approvalList)) {
|
|
|
Approval approve = approvalList.get(approvalList.size() - 1);
|
|
|
@@ -203,6 +204,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
try {
|
|
|
Date d1 = DateUtil.parseTimeStringToDate(entity.getUpdate_time(), "yyyy-MM-dd hh:mm:ss");
|
|
|
Date d2 = DateUtil.parseTimeStringToDate(dealTime, "yyyy-MM-dd hh:mm:ss");
|
|
|
+ if(CommonUtils.isNull(entity.getUpdate_time())){
|
|
|
+ dealTime = null;
|
|
|
+ }else
|
|
|
if (d2.before(d1)) {
|
|
|
dealTime = null;
|
|
|
}
|
|
|
@@ -264,6 +268,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
Approval approval = new Approval();
|
|
|
approval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.LAND_SUPPLY_PENDIND_SUMMARY);
|
|
|
approval.setApply_id(Integer.parseInt(entity.getId()));
|
|
|
+ approval.setType(Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY);
|
|
|
List<Approval> approvalList = approvalService.findListByWhere(approval);
|
|
|
if (!CollectionUtils.isEmpty(approvalList)) {
|
|
|
Approval approve = approvalList.get(approvalList.size() - 1);
|
|
|
@@ -644,6 +649,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
Approval approval = new Approval();
|
|
|
approval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY);
|
|
|
approval.setApply_id(Integer.parseInt(id));
|
|
|
+ approval.setType(Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY);
|
|
|
List<Approval> approvalList = approvalService.findListByWhere(approval);
|
|
|
if (!CollectionUtils.isEmpty(approvalList)) {
|
|
|
Approval approve = approvalList.get(approvalList.size() - 1);
|
|
|
@@ -651,7 +657,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// entity.setSummary_remain_time(DateUtil.getTimeDiffStr(approve.getCreate_time(), days));
|
|
|
String dealTime = null;
|
|
|
approval = new Approval();
|
|
|
- approval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
|
|
|
+ approval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUMMARY);
|
|
|
approval.setApply_id(Integer.parseInt(id));
|
|
|
approval.setCreate_by(ShiroUtils.getUserId());
|
|
|
List<Approval> approvals = approvalService.findListByWhere(approval);
|
|
|
@@ -660,6 +666,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
try {
|
|
|
Date d1 = DateUtil.parseTimeStringToDate(entity.getUpdate_time(), "yyyy-MM-dd hh:mm:ss");
|
|
|
Date d2 = DateUtil.parseTimeStringToDate(dealTime, "yyyy-MM-dd hh:mm:ss");
|
|
|
+ if(CommonUtils.isNull(entity.getUpdate_time())){
|
|
|
+ dealTime = null;
|
|
|
+ }else
|
|
|
if (d2.before(d1)) {
|
|
|
dealTime = null;
|
|
|
}
|
|
|
@@ -801,12 +810,15 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
//文件
|
|
|
List<Attachment> feedbackAttachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_FEEDBACK, landSupplyConsultation.getId(), null);
|
|
|
if (null != feedbackAttachments && feedbackAttachments.size() > 0) {
|
|
|
- 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(), feedbackAttachments.get(0).getDownload_uri());
|
|
|
landSupplyConsultation.setFileDown(fileDown);
|
|
|
}
|
|
|
Department depart = departmentService.selectById(Integer.valueOf(landSupplyConsultation.getDepartment_id()));
|
|
|
landSupplyConsultation.setDepartment_name(depart.getName());
|
|
|
//是否同意
|
|
|
+ if (landSupplyConsultation.getIsAgree() == null && landSupplyConsultation.getIsDefault()) {
|
|
|
+ landSupplyConsultation.setIsAgree(true);
|
|
|
+ }
|
|
|
if (landSupplyConsultation.getIsAgree() != null) {
|
|
|
String feedback = landSupplyConsultation.getFeedback() == null ? "" : landSupplyConsultation.getFeedback();
|
|
|
String str = "";
|
|
|
@@ -1037,6 +1049,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// consulFlag = true;
|
|
|
// break;
|
|
|
consulNum1++;
|
|
|
+ if(CommonUtils.isNotNull(industrialLandSupplyConsultation.getFeedback_time())){
|
|
|
+ consulNum2++;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//是否回答
|
|
|
@@ -1052,7 +1067,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
if (d1.before(d2)) {
|
|
|
// consulApproveFlag = true;
|
|
|
// break;
|
|
|
- consulNum2++;
|
|
|
+ //consulNum2++;
|
|
|
}
|
|
|
} catch (ParseException e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -1069,6 +1084,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// distFlag = true;
|
|
|
// break;
|
|
|
distNum1++;
|
|
|
+ if(CommonUtils.isNotNull(industrialLandSupplyDistribution.getUpdate_time())){
|
|
|
+ distNum2++;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//是否回答
|
|
|
@@ -1081,7 +1099,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
if (d1.before(d2)) {
|
|
|
// distApproveFlag = true;
|
|
|
// break;
|
|
|
- distNum2++;
|
|
|
+ //distNum2++;
|
|
|
}
|
|
|
} catch (ParseException e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -1241,7 +1259,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (String departmentId : defaultList) {
|
|
|
if (departmentId != null && departmentId != "") {
|
|
|
boolean flag = true;
|
|
|
- if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
+ //这里的逻辑是 如果勾选就把填写的咨询变为默认 但是现在是勾选单独生成一条咨询
|
|
|
+ /*if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
for (IndustrialLandSupplyConsultation industrialLandSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
if (departmentId.equals(industrialLandSupplyConsultation.getDepartment_id())) {
|
|
|
industrialLandSupplyConsultation.setIsDefault(true);
|
|
|
@@ -1249,10 +1268,11 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
if (flag) {
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
industrialLandSupplyConsultation.setIsDefault(true);
|
|
|
+ //industrialLandSupplyConsultation.setIsAgree(true);
|
|
|
industrialLandSupplyConsultation.setIndustrial_land_supply_id(apply.getId() + "");
|
|
|
industrialLandSupplyConsultation.setConsultation_time(dateTime);
|
|
|
industrialLandSupplyConsultation.setDepartment_id(departmentId);
|
|
|
@@ -1263,6 +1283,10 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
+ for (IndustrialLandSupplyConsultation industrialLandSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
+ industrialLandSupplyConsultation.setIsDefault(false);
|
|
|
+ //industrialLandSupplyConsultation.setIsAgree(true);
|
|
|
+ }
|
|
|
industrialLandSupplyConsultationService.saveList(industrialLandSupplyConsultationList);
|
|
|
}
|
|
|
//如果是发布,进提交流程
|
|
|
@@ -1353,7 +1377,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (String departmentId : defaultList) {
|
|
|
if (departmentId != null && departmentId != "") {
|
|
|
boolean flag = true;
|
|
|
- if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
+ //这里的逻辑是 如果勾选就把填写的咨询变为默认 但是现在是勾选单独生成一条咨询
|
|
|
+ /*if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
for (IndustrialLandSupplyConsultation industrialLandSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
if (departmentId.equals(industrialLandSupplyConsultation.getDepartment_id())) {
|
|
|
industrialLandSupplyConsultation.setIsDefault(true);
|
|
|
@@ -1361,7 +1386,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
if (flag) {
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
industrialLandSupplyConsultation.setIsDefault(true);
|
|
|
@@ -1375,6 +1400,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
+ for (IndustrialLandSupplyConsultation industrialLandSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
+ industrialLandSupplyConsultation.setIsDefault(false);
|
|
|
+ }
|
|
|
industrialLandSupplyConsultationService.saveList(industrialLandSupplyConsultationList);
|
|
|
}
|
|
|
}
|
|
|
@@ -3354,7 +3382,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (String departmentId : defaultList) {
|
|
|
if (departmentId != null) {
|
|
|
boolean flag = true;
|
|
|
- if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
+ //这里的逻辑是 如果勾选就把填写的咨询变为默认 但是现在是勾选单独生成一条咨询
|
|
|
+ /*if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
for (IndustrialLandSupplyConsultation industrialLandSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
if (industrialLandSupplyConsultation.getIsDefault() &&
|
|
|
Objects.equals(industrialLandSupplyConsultation.getDepartment_id(), departmentId)) {
|
|
|
@@ -3362,7 +3391,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
flag = false;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
if (flag) {
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
industrialLandSupplyConsultation.setIsDefault(true);
|
|
|
@@ -3376,8 +3405,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
+ for (IndustrialLandSupplyConsultation industrialLandSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
+ industrialLandSupplyConsultation.setIsDefault(false);
|
|
|
+ }
|
|
|
industrialLandSupplyConsultationService.saveList(industrialLandSupplyConsultationList);
|
|
|
}
|
|
|
+ Approval approval = approvalService.getLatestApproval(apply.getId(), Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY);
|
|
|
+ approval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK);
|
|
|
+ approvalService.updateSelective(approval);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -3609,7 +3644,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (String departmentId : defaultList) {
|
|
|
if (departmentId != null && departmentId != "") {
|
|
|
boolean flag = true;
|
|
|
- if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
+ //这里的逻辑是 如果勾选就把填写的咨询变为默认 但是现在是勾选单独生成一条咨询
|
|
|
+ /*if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
for (IndustrialLandSupplyConsultation industrialLandSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
if (departmentId.equals(industrialLandSupplyConsultation.getDepartment_id())) {
|
|
|
industrialLandSupplyConsultation.setIsDefault(true);
|
|
|
@@ -3617,7 +3653,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
if (flag) {
|
|
|
IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
|
|
|
industrialLandSupplyConsultation.setIsDefault(true);
|
|
|
@@ -3631,6 +3667,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
+ for (IndustrialLandSupplyConsultation industrialLandSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
+ industrialLandSupplyConsultation.setIsDefault(false);
|
|
|
+ }
|
|
|
industrialLandSupplyConsultationService.saveList(industrialLandSupplyConsultationList);
|
|
|
}
|
|
|
//直接提交申请,添加流程信息
|