|
@@ -548,8 +548,8 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
|
identityService.setAuthenticatedUserId(projectFilingBatch.getCurrentUser().getId());
|
|
|
Office office = projectFilingBatch.getOffice();
|
|
|
office = officeService.get(office.getId());
|
|
|
- String contentStr = "。归档项目批次【"+ projectFilingBatch.getFilingBatch()+"】待审批,归档批次编号:"+projectFilingBatch.getId() + "。报告号"+projectFilingBatch.getReportNumber();
|
|
|
- String titleStr = "归档项目批次【"+ projectFilingBatch.getFilingBatch()+"】待审批" + "报告号"+projectFilingBatch.getReportNumber();
|
|
|
+ String contentStr = "归档项目批次【"+ projectFilingBatch.getFilingBatch()+"】待审批,归档批次编号:"+projectFilingBatch.getFilingBatch() + "。报告号"+projectFilingBatch.getReportNumber();
|
|
|
+ String titleStr = "归档项目批次【"+ projectFilingBatch.getFilingBatch()+"】待审批," + "报告号"+projectFilingBatch.getReportNumber();
|
|
|
String businessKey = projectFilingBatch.getId();
|
|
|
Activity activity = new Activity();
|
|
|
WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("7854872f45b84acd893010e66a3db2c8", office);
|
|
@@ -743,7 +743,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
@Transactional(readOnly = false)
|
|
|
- public String auditSave(ProjectFilingBatch projectFilingBatch, List<User> auditUsers,String[] proInfos, String[] flags) throws Exception {
|
|
|
+ public String auditSave(ProjectFilingBatch projectFilingBatch, List<User> auditUsers,String[] projectId,String[] proInfos, String[] flags) throws Exception {
|
|
|
this.queryInfo(projectFilingBatch);
|
|
|
Integer filingStatus = projectFilingBatch.getFilingStatus();
|
|
|
String taskDefKey = projectFilingBatch.getAct().getTaskDefKey();
|
|
@@ -766,6 +766,23 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
|
comment = ("yes".equals(projectFilingBatch.getAct().getFlag())?"[同意] ":"[驳回] ");
|
|
|
}
|
|
|
|
|
|
+ //获取前端选择的项目信息
|
|
|
+ //保存要归档的项目
|
|
|
+ if(null!=projectId){
|
|
|
+ //删除现有关联的项目信息
|
|
|
+ projectFilingbatchRelationDao.deleteByFilingBatchId(projectFilingBatch.getId());
|
|
|
+ for (int i=0;i<projectId.length;i++){
|
|
|
+ String id=projectId[i].split("/")[0];
|
|
|
+ ProjectFilingbatchRelation filingbatchRelation=new ProjectFilingbatchRelation();
|
|
|
+ filingbatchRelation.setFilingBatch(projectFilingBatch.getId());
|
|
|
+ filingbatchRelation.setProjectId(id);
|
|
|
+ filingbatchRelation.setSort(i);
|
|
|
+ filingbatchRelation.setStatus(2);
|
|
|
+ filingbatchRelation.preInsert();
|
|
|
+ projectFilingbatchRelationDao.insert(filingbatchRelation);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 流程驳回修改所有项目归档状态
|
|
|
*/
|
|
@@ -960,7 +977,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
|
}
|
|
|
//审核完成提示框
|
|
|
String title = "归档批次号【"+projectFilingBatch.getFilingBatch()+"】"+ "。报告号"+projectFilingBatch.getReportNumber()+"。归档成功";
|
|
|
- String content = "归档批次号【"+projectFilingBatch.getFilingBatch()+"】" + "。报告号"+projectFilingBatch.getReportNumber()+"。归档成功,归档批次编号:"+projectFilingBatch.getId();
|
|
|
+ String content = "归档批次号【"+projectFilingBatch.getFilingBatch()+"】" + "。报告号"+projectFilingBatch.getReportNumber()+"。归档成功,归档批次编号:"+projectFilingBatch.getFilingBatch();
|
|
|
if ("yes".equals(projectFilingBatch.getAct().getFlag())) {
|
|
|
projectFilingBatch.setFilingStatus(ProjectStatusEnum.SIGNED.getValue());
|
|
|
WorkProjectNotify notify = new WorkProjectNotify();
|
|
@@ -1148,12 +1165,65 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
|
|
|
|
/**
|
|
|
* 项目归档表逻辑删除
|
|
|
- * @param filingBatch
|
|
|
+ * @param projectFilingBatch
|
|
|
*/
|
|
|
@Transactional(readOnly = false)
|
|
|
- public void delete(ProjectFilingBatch filingBatch){
|
|
|
- super.delete(filingBatch);
|
|
|
- projectFilingbatchRelationDao.updateDelFlagByFilingBatch(filingBatch.getId());
|
|
|
+ public void delete(ProjectFilingBatch projectFilingBatch){
|
|
|
+ //判定流程状态,若流程状态未完成且发起或驳回状态,则需要将当前流程进行结束处理
|
|
|
+ if(projectFilingBatch.getFilingStatus() != 5 && StringUtils.isNotBlank(projectFilingBatch.getProcessinstanceId())){
|
|
|
+ //判定流程是否存在或是否结束
|
|
|
+
|
|
|
+ WorkActivityProcess process = new WorkActivityProcess();
|
|
|
+ process.setProcessInstanceId(projectFilingBatch.getProcessinstanceId());
|
|
|
+ process.setIsApproval("0");
|
|
|
+ //List<WorkActivityProcess> processList1 = workActivityProcessService.findByProcInsId(process);
|
|
|
+ WorkActivityProcess workActivityProcess = new WorkActivityProcess();
|
|
|
+ workActivityProcess.setProcessInstanceId(projectFilingBatch.getProcessinstanceId());
|
|
|
+ List<WorkActivityProcess> processList = workActivityProcessService.findList(workActivityProcess);
|
|
|
+ WorkProjectNotify notify = new WorkProjectNotify();
|
|
|
+ notify.setNotifyId(projectFilingBatch.getId());
|
|
|
+ List<User> userList = workProjectNotifyService.readByNotifyId(notify);
|
|
|
+ if (userList!=null && userList.size()!=0) {
|
|
|
+ for (User u : userList) {
|
|
|
+ User user = UserUtils.get(u.getId());
|
|
|
+ UserUtils.pushIm(u.getId(),"申请人 "+user.getName() +",项目归档批次审批:"+projectFilingBatch.getFilingBatch() +" 强制撤销!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(processList!=null && processList.size()>0) {
|
|
|
+ for (int i = 0; i < processList.size(); i++) {
|
|
|
+ WorkActivityProcess p = processList.get(i);
|
|
|
+ if (StringUtils.isNotBlank(p.getIsApproval()) && "0".equals(p.getIsApproval())) {
|
|
|
+ p.setIsApproval("-1");
|
|
|
+ p.setDelFlag("1");
|
|
|
+ workActivityProcessDao.updateDelFlagAndIsApproval(p);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ WorkActivityProcess pro = new WorkActivityProcess();
|
|
|
+ pro.setId("");
|
|
|
+ pro.setDelFlag("0");
|
|
|
+ pro.preInsert();
|
|
|
+ pro.setRemarks("[强制撤销]");
|
|
|
+ pro.setProcessKey(processList.get(0).getProcessKey());
|
|
|
+ pro.setIsApproval("1");
|
|
|
+ pro.setProcessInstanceId(processList.get(0).getProcessInstanceId());
|
|
|
+ pro.setCount(0);
|
|
|
+ workActivityProcessDao.insert(pro);
|
|
|
+
|
|
|
+ //结束该流程,设为"撤销"状态月
|
|
|
+ ProjectFilingBatch filingBatch = new ProjectFilingBatch();
|
|
|
+ filingBatch.setId(projectFilingBatch.getId());
|
|
|
+ filingBatch.setFilingStatus(ProjectStatusEnum.RECALL.getValue());
|
|
|
+ filingBatch.preUpdate();
|
|
|
+ dao.updateProcessIdAndStatus(filingBatch);
|
|
|
+ try {
|
|
|
+ actTaskService.endProcessInstance(projectFilingBatch.getProcessinstanceId(), "项目归档批次-撤回");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ super.delete(projectFilingBatch);
|
|
|
+ projectFilingbatchRelationDao.updateDelFlagByFilingBatch(projectFilingBatch.getId());
|
|
|
}
|
|
|
|
|
|
/**
|