|
@@ -84,9 +84,9 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
public Page<ProjectFilingBatch> findPage(Page<ProjectFilingBatch> page, ProjectFilingBatch projectFilingBatch) {
|
|
public Page<ProjectFilingBatch> findPage(Page<ProjectFilingBatch> page, ProjectFilingBatch projectFilingBatch) {
|
|
//设置数据权限
|
|
//设置数据权限
|
|
if(!UserUtils.getUser().isAdmin()) {
|
|
if(!UserUtils.getUser().isAdmin()) {
|
|
- String dataScopeSql = dataScopeFilterOR(projectFilingBatch.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
|
|
|
|
|
|
+ String dataScopeSql = dataScopeFilter(projectFilingBatch.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
|
|
if(StringUtils.isBlank(dataScopeSql)){
|
|
if(StringUtils.isBlank(dataScopeSql)){
|
|
- dataScopeSql = dataScopeFilterOR(projectFilingBatch.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_WORK_RECORDS.getValue());
|
|
|
|
|
|
+ dataScopeSql = dataScopeFilter(projectFilingBatch.getCurrentUser(), "o", "u", "s", MenuStatusEnum.OVERALL_WORK_RECORDS.getValue());
|
|
}
|
|
}
|
|
projectFilingBatch.getSqlMap().put("dsf", dataScopeSql);
|
|
projectFilingBatch.getSqlMap().put("dsf", dataScopeSql);
|
|
}
|
|
}
|
|
@@ -106,6 +106,10 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
return projectFilingBatchDao.findProjectIdByFiling(id);
|
|
return projectFilingBatchDao.findProjectIdByFiling(id);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public List<ProjectFilingBatch> getProjectFilingBatchRelationList(String id){
|
|
|
|
+ return projectFilingBatchDao.getProjectFilingBatchRelationList(id);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 送审归档批次
|
|
* 送审归档批次
|
|
* @param projectFilingBatch
|
|
* @param projectFilingBatch
|
|
@@ -126,22 +130,22 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
}
|
|
}
|
|
Office office=new Office();
|
|
Office office=new Office();
|
|
office.setId(createBy.getOffice().getId());
|
|
office.setId(createBy.getOffice().getId());
|
|
- projectFilingBatch.setOffice(office);
|
|
|
|
|
|
+ projectFilingBatch.setOffice(createBy.getOffice());
|
|
|
|
+ projectFilingBatch.setCompany(createBy.getCompany());
|
|
//归档批次表添加操作
|
|
//归档批次表添加操作
|
|
if(projectFilingBatch.getFilingStatus()== ProjectStatusEnum.INVALID.getValue()){
|
|
if(projectFilingBatch.getFilingStatus()== ProjectStatusEnum.INVALID.getValue()){
|
|
- projectFilingBatch.setId(IdGen.uuid());
|
|
|
|
- dao.insert(projectFilingBatch);
|
|
|
|
|
|
+ super.save(projectFilingBatch);
|
|
}else if (oldStatus== ProjectStatusEnum.RECALL.getValue() || oldStatus== ProjectStatusEnum.REJECTED.getValue()) {
|
|
}else if (oldStatus== ProjectStatusEnum.RECALL.getValue() || oldStatus== ProjectStatusEnum.REJECTED.getValue()) {
|
|
//获取归档批次的项目信息
|
|
//获取归档批次的项目信息
|
|
List<ProjectFilingBatch> filingBatches=this.findProjectIdByFiling(projectFilingBatch.getId());
|
|
List<ProjectFilingBatch> filingBatches=this.findProjectIdByFiling(projectFilingBatch.getId());
|
|
|
|
+ //通过批次归档id和项目id删除之前的信息
|
|
for (ProjectFilingBatch filingBatch:filingBatches){
|
|
for (ProjectFilingBatch filingBatch:filingBatches){
|
|
- RuralProjectRecords ruralProjectRecords = ruralProjectRecordsDao.get(filingBatch.getProjectId());
|
|
|
|
ProjectFilingbatchRelation filingbatchRelation=new ProjectFilingbatchRelation();
|
|
ProjectFilingbatchRelation filingbatchRelation=new ProjectFilingbatchRelation();
|
|
- filingbatchRelation.setFilingBatch(filingBatch.getFilingBatch());
|
|
|
|
- filingbatchRelation.setProjectId(ruralProjectRecords.getId());
|
|
|
|
|
|
+ filingbatchRelation.setFilingBatch(filingBatch.getId());
|
|
|
|
+ filingbatchRelation.setProjectId(filingBatch.getProjectId());
|
|
projectFilingbatchRelationDao.deleteByprojectId(filingbatchRelation);
|
|
projectFilingbatchRelationDao.deleteByprojectId(filingbatchRelation);
|
|
}
|
|
}
|
|
- dao.update(projectFilingBatch);
|
|
|
|
|
|
+ super.save(projectFilingBatch);
|
|
}else{
|
|
}else{
|
|
synchronized (SYN_BYTE) {
|
|
synchronized (SYN_BYTE) {
|
|
projectFilingBatch.setFilingBatch(serialNumTplService.genSerialNum(createBy.getCompany(), ProjectFilingBatch.ARCHIVE_BATCH_TEMPLATE));
|
|
projectFilingBatch.setFilingBatch(serialNumTplService.genSerialNum(createBy.getCompany(), ProjectFilingBatch.ARCHIVE_BATCH_TEMPLATE));
|
|
@@ -153,7 +157,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
for (int i=0;i<proId.length;i++){
|
|
for (int i=0;i<proId.length;i++){
|
|
String id=proId[i].split("/")[0];
|
|
String id=proId[i].split("/")[0];
|
|
ProjectFilingbatchRelation filingbatchRelation=new ProjectFilingbatchRelation();
|
|
ProjectFilingbatchRelation filingbatchRelation=new ProjectFilingbatchRelation();
|
|
- filingbatchRelation.setFilingBatch(projectFilingBatch.getFilingBatch());
|
|
|
|
|
|
+ filingbatchRelation.setFilingBatch(projectFilingBatch.getId());
|
|
filingbatchRelation.setProjectId(id);
|
|
filingbatchRelation.setProjectId(id);
|
|
filingbatchRelation.setStatus(2);
|
|
filingbatchRelation.setStatus(2);
|
|
filingbatchRelation.preInsert();
|
|
filingbatchRelation.preInsert();
|
|
@@ -356,10 +360,18 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
//项目信息
|
|
//项目信息
|
|
projectFilingBatch.setProject(ruralProjectRecordsList);
|
|
projectFilingBatch.setProject(ruralProjectRecordsList);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 审核
|
|
|
|
+ * @param projectFilingBatch
|
|
|
|
+ * @param auditUsers
|
|
|
|
+ * @return
|
|
|
|
+ * @throws Exception
|
|
|
|
+ */
|
|
@Transactional(readOnly = false)
|
|
@Transactional(readOnly = false)
|
|
public String auditSave(ProjectFilingBatch projectFilingBatch, List<User> auditUsers) throws Exception {
|
|
public String auditSave(ProjectFilingBatch projectFilingBatch, List<User> auditUsers) throws Exception {
|
|
this.queryInfo(projectFilingBatch);
|
|
this.queryInfo(projectFilingBatch);
|
|
- int filingStatus = projectFilingBatch.getFilingStatus();
|
|
|
|
|
|
+ Integer filingStatus = projectFilingBatch.getFilingStatus();
|
|
String taskDefKey = projectFilingBatch.getAct().getTaskDefKey();
|
|
String taskDefKey = projectFilingBatch.getAct().getTaskDefKey();
|
|
if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit") ) {
|
|
if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit") ) {
|
|
actTaskService.claim(projectFilingBatch.getAct().getTaskId(), UserUtils.getUser().getId());
|
|
actTaskService.claim(projectFilingBatch.getAct().getTaskId(), UserUtils.getUser().getId());
|
|
@@ -380,14 +392,26 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
comment = ("yes".equals(projectFilingBatch.getAct().getFlag())?"[同意] ":"[驳回] ");
|
|
comment = ("yes".equals(projectFilingBatch.getAct().getFlag())?"[同意] ":"[驳回] ");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 流程驳回修改所有项目归档状态
|
|
|
|
+ */
|
|
if (!"yes".equals(projectFilingBatch.getAct().getFlag())) {
|
|
if (!"yes".equals(projectFilingBatch.getAct().getFlag())) {
|
|
projectFilingBatch.setFilingStatus(ProjectStatusEnum.REJECTED.getValue());
|
|
projectFilingBatch.setFilingStatus(ProjectStatusEnum.REJECTED.getValue());
|
|
for (RuralProjectRecords projectRecords:projectFilingBatch.getProject()){
|
|
for (RuralProjectRecords projectRecords:projectFilingBatch.getProject()){
|
|
ProjectFilingbatchRelation relation=projectFilingbatchRelationDao.getProjectId(projectRecords.getId());
|
|
ProjectFilingbatchRelation relation=projectFilingbatchRelationDao.getProjectId(projectRecords.getId());
|
|
relation.setStatus(ProjectStatusEnum.IN_APRL.getValue());
|
|
relation.setStatus(ProjectStatusEnum.IN_APRL.getValue());
|
|
- this.updateByid(relation);
|
|
|
|
|
|
+ relation.setFilingBatch(projectFilingBatch.getId());
|
|
|
|
+ projectFilingbatchRelationDao.updateStatus(relation);
|
|
|
|
+ }
|
|
|
|
+ //如果流程通过
|
|
|
|
+ }else if(!"modifyApply".equals(taskDefKey)){
|
|
|
|
+ for (RuralProjectRecords projectRecords:projectFilingBatch.getProject()){
|
|
|
|
+ ProjectFilingbatchRelation relation=projectFilingbatchRelationDao.getProjectId(projectRecords.getId());
|
|
|
|
+ //查询已存在项目归档信息,将被驳回(4)的状态的项目的del_status改为1(逻辑删除)
|
|
|
|
+ if(4 ==relation.getStatus()){
|
|
|
|
+ this.updateDelFlag(relation);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
User createUser = UserUtils.get(projectFilingBatch.getCreateBy().getId());
|
|
User createUser = UserUtils.get(projectFilingBatch.getCreateBy().getId());
|
|
@@ -706,4 +730,14 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
|
|
return "保存审核意见成功!";
|
|
return "保存审核意见成功!";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 项目归档表逻辑删除
|
|
|
|
+ * @param filingbatchRelation
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public void updateDelFlag(ProjectFilingbatchRelation filingbatchRelation){
|
|
|
|
+ projectFilingbatchRelationDao.updateDelFlag(filingbatchRelation);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|