项目评估流程
This commit is contained in:
+10
@@ -49,6 +49,16 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
|||||||
map.put("notMaintenance",notMaintenanceList);
|
map.put("notMaintenance",notMaintenanceList);
|
||||||
return Result.success("200",map);
|
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
|
* @param id
|
||||||
|
|||||||
+2
@@ -22,4 +22,6 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
|
|||||||
void batchInsert(@Param("list") List<StandProjectRelationDto> list);
|
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);
|
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);
|
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 {
|
public interface SarStandProjectLibraryService {
|
||||||
IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
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);
|
IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize, SarStandProjectLibraryDto sarDto);
|
||||||
List<SarStandProjectLibrary> queryById(String id);
|
List<SarStandProjectLibrary> queryById(String id);
|
||||||
IPage<SarStandProjectLibrary> queryProjectManager(int current, int pageSize);
|
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);
|
return getSarStandProjectLibraryIPage(current, pageSize, sar,flag);
|
||||||
}
|
}
|
||||||
@Override
|
@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,
|
public IPage<SarStandProjectLibrary> queryNotMaintenanceProject(int current, int pageSize,
|
||||||
SarStandProjectLibraryDto sarDto) {
|
SarStandProjectLibraryDto sarDto) {
|
||||||
SarStandProjectLibrary sar = new SarStandProjectLibrary();
|
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) {
|
private IPage<SarStandProjectLibrary> getSarStandProjectLibraryIPage(int current, int pageSize,SarStandProjectLibrary wrapper,int flag) {
|
||||||
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
|
Page<SarStandProjectLibrary> page = new Page<>(current, pageSize);
|
||||||
IPage<SarStandProjectLibrary> userIPage = new Page<>();
|
IPage<SarStandProjectLibrary> userIPage = new Page<>();
|
||||||
List<SarStandProjectLibrary> sarStandProjectLibraries=sarStandProjectLibraryDao.selectPages(current,pageSize,wrapper,flag);
|
if (!"3".equals(flag)) {
|
||||||
Integer count = sarStandProjectLibraryDao.selectCount(wrapper,flag);
|
List<SarStandProjectLibrary> sarStandProjectLibraries = sarStandProjectLibraryDao.selectPages(current, pageSize, wrapper, flag);
|
||||||
userIPage.setCurrent(current);
|
Integer count = sarStandProjectLibraryDao.selectCount(wrapper, flag);
|
||||||
userIPage.setSize(pageSize);
|
userIPage.setCurrent(current);
|
||||||
userIPage.setRecords(sarStandProjectLibraries);
|
userIPage.setSize(pageSize);
|
||||||
userIPage.setTotal(count);
|
userIPage.setRecords(sarStandProjectLibraries);
|
||||||
return userIPage;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+115
-4
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectCount" resultType="java.lang.Integer" >
|
<select id="selectCount" resultType="java.lang.Integer">
|
||||||
SELECT
|
SELECT
|
||||||
count(sar_stand_project_library.id ) as total
|
count(sar_stand_project_library.id ) as total
|
||||||
FROM
|
FROM
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPages" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary" >
|
<select id="selectPages" resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
|
||||||
SELECT
|
SELECT
|
||||||
sar_stand_project_library.*,
|
sar_stand_project_library.*,
|
||||||
tu.UNAME as uName
|
tu.UNAME as uName
|
||||||
@@ -92,10 +92,10 @@
|
|||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
<if test="flag == 1">
|
<if test="flag == 1">
|
||||||
id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 2">
|
<if test="flag == 2">
|
||||||
id IN ( SELECT project_id FROM sar_stand_project_relation )
|
id IN ( SELECT project_id FROM sar_stand_project_relation )
|
||||||
</if>
|
</if>
|
||||||
<if test="qu != null">
|
<if test="qu != null">
|
||||||
<if test="qu.projectNumber != null">
|
<if test="qu.projectNumber != null">
|
||||||
@@ -138,4 +138,115 @@
|
|||||||
)
|
)
|
||||||
limit ${(page-1)*size},${page*size}
|
limit ${(page-1)*size},${page*size}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectPagesWorkFlow"
|
||||||
|
resultType="com.adc.da.slrs.sarStandProjectLibrary.entity.SarStandProjectLibrary">
|
||||||
|
SELECT
|
||||||
|
sar_stand_project_library.*,
|
||||||
|
tu.UNAME as uName
|
||||||
|
FROM
|
||||||
|
sar_stand_project_library
|
||||||
|
LEFT JOIN ts_user tu ON project_manager = tu.USID
|
||||||
|
WHERE
|
||||||
|
(
|
||||||
|
id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id NOT in (
|
||||||
|
SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE stand_id NOT in (SELECT DISTINCT STAND_ID FROM
|
||||||
|
sar_stand_items)
|
||||||
|
) )
|
||||||
|
|
||||||
|
<if test="qu != null">
|
||||||
|
<if test="qu.projectNumber != null">
|
||||||
|
AND project_number LIKE concat(concat('%',#{qu.projectNumber}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectName != null">
|
||||||
|
AND project_name LIKE concat(concat('%',#{qu.projectName}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectClassification != null">
|
||||||
|
AND project_classification LIKE concat(concat('%',#{qu.projectClassification}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectPlatfor != null">
|
||||||
|
AND project_platfor LIKE concat(concat('%',#{qu.projectPlatfor}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectGroup != null">
|
||||||
|
AND project_group LIKE concat(concat('%',#{qu.projectGroup}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectStatus != null">
|
||||||
|
AND project_status LIKE concat(concat('%',#{qu.projectStatus}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.currentNode != null">
|
||||||
|
AND current_node LIKE concat(concat('%',#{qu.currentNode}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectLevel != null">
|
||||||
|
AND project_level LIKE concat(concat('%',#{qu.projectLevel}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectManager != null">
|
||||||
|
AND project_manager LIKE concat(concat('%',#{qu.projectManager}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.productLine != null">
|
||||||
|
AND product_line LIKE concat(concat('%',#{qu.productLine}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectStartDate != null">
|
||||||
|
AND project_start_date >= #{qu.projectStartDate}
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectEndDate != null">
|
||||||
|
AND project_end_date <= #{qu.projectEndDate}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
limit ${(page-1)*size},${page*size}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="selectCountWorkFlow" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(sar_stand_project_library.id ) as total
|
||||||
|
FROM
|
||||||
|
sar_stand_project_library
|
||||||
|
LEFT JOIN ts_user tu ON project_manager = tu.USID
|
||||||
|
WHERE
|
||||||
|
(
|
||||||
|
id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id NOT in (
|
||||||
|
SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE stand_id NOT in (SELECT DISTINCT STAND_ID FROM
|
||||||
|
sar_stand_items)
|
||||||
|
))
|
||||||
|
|
||||||
|
<if test="qu != null">
|
||||||
|
<if test="qu.projectNumber != null">
|
||||||
|
AND project_number LIKE concat(concat('%',#{qu.projectNumber}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectName != null">
|
||||||
|
AND project_name LIKE concat(concat('%',#{qu.projectName}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectClassification != null">
|
||||||
|
AND project_classification LIKE concat(concat('%',#{qu.projectClassification}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectPlatfor != null">
|
||||||
|
AND project_platfor LIKE concat(concat('%',#{qu.projectPlatfor}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectGroup != null">
|
||||||
|
AND project_group LIKE concat(concat('%',#{qu.projectGroup}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectStatus != null">
|
||||||
|
AND project_status LIKE concat(concat('%',#{qu.projectStatus}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.currentNode != null">
|
||||||
|
AND current_node LIKE concat(concat('%',#{qu.currentNode}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectLevel != null">
|
||||||
|
AND project_level LIKE concat(concat('%',#{qu.projectLevel}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectManager != null">
|
||||||
|
AND project_manager LIKE concat(concat('%',#{qu.projectManager}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.productLine != null">
|
||||||
|
AND product_line LIKE concat(concat('%',#{qu.productLine}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectStartDate != null">
|
||||||
|
AND project_start_date >= #{qu.projectStartDate}
|
||||||
|
</if>
|
||||||
|
<if test="qu.projectEndDate != null">
|
||||||
|
AND project_end_date <= #{qu.projectEndDate}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
limit ${(page-1)*size},${page*size}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user