|
@@ -102,13 +102,13 @@ public class ProjectMaterialService extends BaseService<ProjectMaterial> {
|
|
|
|
|
|
|
|
|
|
|
|
|
//仅查询离创建时间最近且小于创建时间的
|
|
//仅查询离创建时间最近且小于创建时间的
|
|
|
- public List<ProjectMaterial> findProjectMaterialByTypeRecent(Integer projectId) {
|
|
|
|
|
|
|
+ public List<ProjectMaterial> findProjectMaterialByTypeRecent(Integer projectId, String createTime) {
|
|
|
|
|
|
|
|
Integer itemId = 0;
|
|
Integer itemId = 0;
|
|
|
|
|
|
|
|
Project project = projectService.findById(projectId);
|
|
Project project = projectService.findById(projectId);
|
|
|
if (null != project) {
|
|
if (null != project) {
|
|
|
- itemId = dictionaryItemService.findIdByTypeAndNameRecent(Constant.DictionaryType.PROJECT_NAME, project.getProject_name(), project.getCreate_time());
|
|
|
|
|
|
|
+ itemId = dictionaryItemService.findIdByTypeAndNameRecent(Constant.DictionaryType.PROJECT_NAME, project.getProject_name(), createTime);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
List<ProjectMaterial> materials = projectMaterialDao.findMaterialTemplateByType(itemId);
|
|
List<ProjectMaterial> materials = projectMaterialDao.findMaterialTemplateByType(itemId);
|
|
@@ -194,7 +194,7 @@ public class ProjectMaterialService extends BaseService<ProjectMaterial> {
|
|
|
*/
|
|
*/
|
|
|
public List<ProjectMaterial> findProjectMaterialByApplyRecent(ProjectApplication projectApply) {
|
|
public List<ProjectMaterial> findProjectMaterialByApplyRecent(ProjectApplication projectApply) {
|
|
|
//找出模板,再匹配上传材料
|
|
//找出模板,再匹配上传材料
|
|
|
- List<ProjectMaterial> materialTemplates = findProjectMaterialByTypeRecent(projectApply.getProject_id());
|
|
|
|
|
|
|
+ List<ProjectMaterial> materialTemplates = findProjectMaterialByTypeRecent(projectApply.getProject_id(), projectApply.getCreate_time());
|
|
|
for (ProjectMaterial material : materialTemplates) {
|
|
for (ProjectMaterial material : materialTemplates) {
|
|
|
ProjectMaterial existMaterial = findMaterialByApplyIdAndTemplateId(projectApply.getId(), material.getTemplate_id());
|
|
ProjectMaterial existMaterial = findMaterialByApplyIdAndTemplateId(projectApply.getId(), material.getTemplate_id());
|
|
|
if (null != existMaterial) {
|
|
if (null != existMaterial) {
|