项目评估流程
This commit is contained in:
+10
@@ -49,6 +49,16 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
map.put("notMaintenance",notMaintenanceList);
|
||||
return Result.success("200",map);
|
||||
}
|
||||
|
||||
@GetMapping("/queryProjectWorkFlow")
|
||||
@ApiOperation("车型/项目库")
|
||||
public ResponseMessage queryMaintenanceProjectWorkFlow(@RequestParam(defaultValue = "1", value = "Page")int Page, @RequestParam(defaultValue = "10", value = "PageSize") int PageSize,
|
||||
SarStandProjectLibraryDto sarDto) {
|
||||
IPage<SarStandProjectLibrary> MaintenanceList = sarStandProjectLibraryService.queryMaintenanceProject(Page,PageSize,sarDto);
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("Maintenance",MaintenanceList);
|
||||
return Result.success("200",map);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
|
||||
+2
@@ -22,4 +22,6 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
|
||||
void batchInsert(@Param("list") List<StandProjectRelationDto> list);
|
||||
List<SarStandProjectLibrary> selectPages(@Param("page")Integer page, @Param("size")Integer size,@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
Integer selectCount(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
List<SarStandProjectLibrary> selectPagesWorkFlow(@Param("page")Integer page, @Param("size")Integer size,@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
Integer selectCountWorkFlow(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
|
||||
}
|
||||
|
||||
+1
@@ -8,6 +8,7 @@ import java.util.List;
|
||||
|
||||
public interface SarStandProjectLibraryService {
|
||||
IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
IPage<SarStandProjectLibrary> queryMaintenanceProjectWorkFlow(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||
List<SarStandProjectLibrary> queryById(String id);
|
||||
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize);
|
||||
|
||||
+47
-7
@@ -68,6 +68,35 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
|
||||
}
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryMaintenanceProjectWorkFlow(int current, int pageSize,
|
||||
SarStandProjectLibraryDto sarDto) {
|
||||
SarStandProjectLibrary sar = new SarStandProjectLibrary();
|
||||
sar.setProjectPlatfor(sarDto.getProjectPlatfor());
|
||||
sar.setProjectNumber(sarDto.getProjectNumber());
|
||||
sar.setProjectName(sarDto.getProjectName());
|
||||
sar.setProjectClassification(sarDto.getProjectClassification());
|
||||
sar.setProjectStatus(sarDto.getProjectStatus());
|
||||
sar.setProjectGroup(sarDto.getProjectGroup());
|
||||
sar.setCurrentNode(sarDto.getCurrentNode());
|
||||
sar.setProjectLevel(sarDto.getProjectLevel());
|
||||
sar.setProjectManager(sarDto.getProjectManager());
|
||||
sar.setProductLine(sarDto.getProductLine());
|
||||
SimpleDateFormat formater = new SimpleDateFormat();
|
||||
formater.applyPattern("yyyy-MM-dd");
|
||||
try {
|
||||
if (sarDto.getProjectStartDate()!=null){
|
||||
sar.setProjectStartDate(formater.parse(sarDto.getProjectStartDate()));
|
||||
}
|
||||
if (sarDto.getProjectEndDate()!=null){
|
||||
sar.setProjectEndDate(formater.parse(sarDto.getProjectEndDate()));
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
int flag=3;
|
||||
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
|
||||
}
|
||||
@Override
|
||||
public IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize,
|
||||
SarStandProjectLibraryDto sarDto) {
|
||||
SarStandProjectLibrary sar = new SarStandProjectLibrary();
|
||||
@@ -260,12 +289,23 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
private IPage<SarStandProjectLibrary> getSarStandProjectLibraryIPage(int current, int pageSize,SarStandProjectLibrary wrapper,int flag) {
|
||||
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
|
||||
IPage<SarStandProjectLibrary> userIPage = new Page<>();
|
||||
List<SarStandProjectLibrary> sarStandProjectLibraries=sarStandProjectLibraryDao.selectPages(current,pageSize,wrapper,flag);
|
||||
Integer count = sarStandProjectLibraryDao.selectCount(wrapper,flag);
|
||||
userIPage.setCurrent(current);
|
||||
userIPage.setSize(pageSize);
|
||||
userIPage.setRecords(sarStandProjectLibraries);
|
||||
userIPage.setTotal(count);
|
||||
return userIPage;
|
||||
if (!"3".equals(flag)) {
|
||||
List<SarStandProjectLibrary> sarStandProjectLibraries = sarStandProjectLibraryDao.selectPages(current, pageSize, wrapper, flag);
|
||||
Integer count = sarStandProjectLibraryDao.selectCount(wrapper, flag);
|
||||
userIPage.setCurrent(current);
|
||||
userIPage.setSize(pageSize);
|
||||
userIPage.setRecords(sarStandProjectLibraries);
|
||||
userIPage.setTotal(count);
|
||||
return userIPage;
|
||||
}else {
|
||||
flag=2;
|
||||
List<SarStandProjectLibrary> sarStandProjectLibraries = sarStandProjectLibraryDao.selectPagesWorkFlow(current, pageSize, wrapper, flag);
|
||||
Integer count = sarStandProjectLibraryDao.selectCountWorkFlow(wrapper, flag);
|
||||
userIPage.setCurrent(current);
|
||||
userIPage.setSize(pageSize);
|
||||
userIPage.setRecords(sarStandProjectLibraries);
|
||||
userIPage.setTotal(count);
|
||||
return userIPage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user