|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.qmth.paper.library.business.bean.result.SelectResult;
|
|
|
import com.qmth.paper.library.business.entity.PaperArchivesType;
|
|
|
import com.qmth.paper.library.business.mapper.PaperArchivesTypeMapper;
|
|
|
import com.qmth.paper.library.business.service.PaperArchivesTypeService;
|
|
@@ -13,6 +14,8 @@ import com.qmth.paper.library.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.paper.library.common.util.ServletUtil;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 档案类型表 服务实现类
|
|
@@ -33,7 +36,7 @@ public class PaperArchivesTypeServiceImpl extends ServiceImpl<PaperArchivesTypeM
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
|
|
|
|
- PaperArchivesType archivesType = this.baseMapper.selectByArchivesType(schoolId, paperArchivesType.getArchivesTypeName());
|
|
|
+ PaperArchivesType archivesType = this.baseMapper.selectByArchivesType(schoolId, paperArchivesType.getName());
|
|
|
|
|
|
// 新增
|
|
|
if (paperArchivesType.getId() == null) {
|
|
@@ -53,7 +56,7 @@ public class PaperArchivesTypeServiceImpl extends ServiceImpl<PaperArchivesTypeM
|
|
|
} else if (!paperArchivesType.getId().equals(archivesType.getId())) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("类型名称已存在");
|
|
|
}
|
|
|
- archivesType.setArchivesTypeName(paperArchivesType.getArchivesTypeName());
|
|
|
+ archivesType.setName(paperArchivesType.getName());
|
|
|
archivesType.setUpdateId(sysUser.getId());
|
|
|
archivesType.setUpdateTime(System.currentTimeMillis());
|
|
|
return this.updateById(archivesType);
|
|
@@ -68,4 +71,10 @@ public class PaperArchivesTypeServiceImpl extends ServiceImpl<PaperArchivesTypeM
|
|
|
}
|
|
|
return this.removeById(id);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<SelectResult> queryData() {
|
|
|
+ Long schoolId = SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId()));
|
|
|
+ return this.baseMapper.queryData(schoolId);
|
|
|
+ }
|
|
|
}
|