|
@@ -57,6 +57,7 @@ import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
|
|
|
import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
|
|
|
import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsAlter;
|
|
|
import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReported;
|
|
|
+import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
|
|
|
import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
|
|
|
import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsAlterService;
|
|
|
import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
|
|
@@ -214,6 +215,7 @@ import org.activiti.engine.HistoryService;
|
|
|
import org.activiti.engine.history.HistoricProcessInstance;
|
|
|
import org.activiti.engine.runtime.ProcessInstance;
|
|
|
import org.activiti.engine.task.Task;
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
@@ -908,6 +910,45 @@ public class WorkProjectNotifyController extends BaseController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 批量只读通知信息
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "readRows")
|
|
|
+ @ResponseBody
|
|
|
+ public Map<String,Object> readRows(String ids) {
|
|
|
+ Map map = new HashMap();
|
|
|
+ String idArray[] =ids.split(",");
|
|
|
+ for(String id : idArray){
|
|
|
+ workProjectNotifyService.readNotify(workProjectNotifyService.get(id));
|
|
|
+ }
|
|
|
+ map.put("code",1);
|
|
|
+ map.put("msg","通知信息批量只读成功");
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 全部只读通知信息
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "readAll")
|
|
|
+ @ResponseBody
|
|
|
+ public Map<String,Object> readAll(WorkProjectNotify workProjectNotify,HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ Map map = new HashMap();
|
|
|
+ User user = UserUtils.getUser();
|
|
|
+ workProjectNotify.setUser(user);
|
|
|
+ workProjectNotify.setStatus("0");
|
|
|
+ workProjectNotify.setRemarks("待通知");
|
|
|
+ workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
|
|
|
+ List<WorkProjectNotify> notifyList = workProjectNotifyService.findList(workProjectNotify);
|
|
|
+ if(notifyList.size()>0){
|
|
|
+ for(WorkProjectNotify notify : notifyList){
|
|
|
+ workProjectNotifyService.readNotify(workProjectNotifyService.get(notify.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ map.put("code",1);
|
|
|
+ map.put("msg","通知信息全部只读成功");
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 已读通知列表页面
|
|
|
*/
|
|
|
@RequestMapping(value = {"listReadShow"})
|
|
@@ -1215,7 +1256,7 @@ public class WorkProjectNotifyController extends BaseController {
|
|
|
//通过通知信息id获取项目登记对象
|
|
|
ProjectRecords projectRecords = projectRecordsService.get(workProjectNotify.getNotifyId());
|
|
|
RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(workProjectNotify.getNotifyId());
|
|
|
- if (projectRecords != null && StringUtils.isNotBlank(projectRecords.getId())) {
|
|
|
+ if (projectRecords != null && "3".equals(projectRecords.getProjectType())) {
|
|
|
projectRecordsService.queryProjectDetail(projectRecords);
|
|
|
flag = true;
|
|
|
}
|
|
@@ -3228,6 +3269,28 @@ public class WorkProjectNotifyController extends BaseController {
|
|
|
model.addAttribute("processInstanceId", processInstanceId);
|
|
|
return "modules/workprojectnotify/workProjectNotifyTask";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除项目
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "deleteNotify")
|
|
|
+ @ResponseBody
|
|
|
+ public Map<String,String> deleteNotify(WorkProjectNotify workProjectNotify, RedirectAttributes redirectAttributes) {
|
|
|
+ Map map = new HashMap();
|
|
|
+ if (workProjectNotify.getType().equals("39")) { //项目登记
|
|
|
+ RuralProjectRecords projectRecords = ruralProjectRecordsService.get(workProjectNotify.getNotifyId());
|
|
|
+ int status = projectRecords.getProjectStatus();
|
|
|
+ if(status== ProjectStatusEnum.TSTORE.getValue()||status== ProjectStatusEnum.REJECTED.getValue()||status== ProjectStatusEnum.RECALL.getValue()){
|
|
|
+ ruralProjectRecordsService.delete(projectRecords);
|
|
|
+ map.put("code",1);
|
|
|
+ map.put("msg","作废项目成功");
|
|
|
+ }else{
|
|
|
+ map.put("code",0);
|
|
|
+ map.put("msg","作废项目失败,只有“暂存”、“驳回”、“撤回”状态的项目才能作废");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|