Просмотр исходного кода

修改项目基本信息文件,添加查询条件:是否提前施工,施工状态;用于在发起施工流程是显示可以选择的项目信息

yue 5 лет назад
Родитель
Сommit
e3a5c4afba

+ 8 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/utils/MyActiviUtils.java

@@ -243,6 +243,14 @@ public class MyActiviUtils {
     }
 
     /**
+     * 根据项目id称查询人员
+     * */
+    public static Project findUserById(String projectId){
+        Project user = projectService.findUserById(projectId);
+        return user;
+    }
+
+    /**
      * 查询项目现在配置模块版本号
      * */
     public static DictValue findDic(){

+ 2 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/project/mapper/ProjectMapper.java

@@ -34,6 +34,8 @@ public interface ProjectMapper extends BaseMapper<Project> {
 
     Project findUser(String procInsId);
 
+    Project findUserById(String projectId);
+
     Integer updatePreConstruction(Project project);
 
     //查找项目信息

+ 32 - 2
src/main/java/com/jeeplus/modules/sg/managementcenter/project/mapper/xml/ProjectMapper.xml

@@ -98,15 +98,20 @@
 			<if test="id != null and  id != ''">
 				AND a.id = #{id}
 			</if>
-
+			<if test="acquisitionStatus != null and  acquisitionStatus != ''">
+				AND a.acquisition_status = #{acquisitionStatus}
+			</if>
 			<if test="constructionUnitRole != null and  constructionUnitRole != ''">
 				AND a.construction_unit_role = #{constructionUnitRole}
 			</if>
+			<if test="constructionStatus != null and  constructionStatus != ''">
+				AND a.construction_status  = #{constructionStatus}
+			</if>
 			<if test="earlyMaterial != null">
 				or a.earlyMaterial = #{earlyMaterial}
 			</if>
 			<if test="preConstruction != null">
-				and a.preConstruction = #{preConstruction}
+				OR a.preConstruction = #{preConstruction}
 			</if>
 			<if test="projectId != null and  projectId != ''">
 				and a.project_id = #{projectId}
@@ -587,6 +592,31 @@
 		WHERE require_name = (select project_name from xm_construction_clarificaiton where proc_ins_id=#{procInsId});
 	</select>
 
+	<select id="findUserById"  resultType="com.jeeplus.modules.sg.managementcenter.project.entity.Project">
+		select
+			project_name
+			,demand_unit
+			,project_manage_role
+			,distribution_engineering
+			,distribution_materials
+			,distribution_system
+			,distribution_policy
+			,management_leader
+			,run_unit
+			,run_unit_role
+			,through_research_role
+			,construction_unit
+			,construction_unit_role
+			,construction_unit_manage
+			,construction_unit_leader
+			,design_unit
+			,design_unit_manage
+			,design_unit_leader
+		FROM xm_project_details
+		WHERE id = #{projectId}
+	</select>
+
+
 	<select id="findListProjectRequisitions" parameterType="java.util.List" resultType="com.jeeplus.modules.sg.managementcenter.project.entity.Project">
 		select
 		<include refid="projectColumns"/>

+ 5 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/project/service/ProjectService.java

@@ -298,6 +298,11 @@ public class ProjectService extends CrudService<ProjectMapper, Project> {
 		return projectMapper.findUser(procInsId);
 	}
 
+	//根据项目id称查询人员
+	public Project findUserById(String projectId) {
+		return projectMapper.findUserById(projectId);
+	}
+
 	//修改提前施工状态0-未提前施工 2-提前施工
 	public void updatePreConstruction(Project project){
 		projectMapper.updatePreConstruction(project);

+ 2 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/project/web/ProjectController.java

@@ -155,6 +155,8 @@ public class ProjectController extends BaseController {
 		project.setAcquisitionStatus("2");
 		//运行提前施工
 		project.setPreConstruction(1);
+		//未进行施工流程
+		project.setConstructionStatus("0");
 		Page<Project> page = projectService.findPage(new Page<Project>(request, response), project);
 		return getBootstrapData(page);
 	}