Forráskód Böngészése

土建流程,开工报告,竣工报告

lem 5 éve
szülő
commit
e9f554de90
16 módosított fájl, 599 hozzáadás és 505 törlés
  1. 5 7
      src/main/java/com/jeeplus/modules/act/service/ActTaskService.java
  2. 11 22
      src/main/java/com/jeeplus/modules/act/web/ActTaskController.java
  3. 8 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/activiti/utils/MyActiviUtils.java
  4. 5 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/mapper/ProjectMapper.java
  5. 8 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/mapper/xml/ProjectMapper.xml
  6. 7 0
      src/main/java/com/jeeplus/modules/sg/managementcenter/project/service/ProjectService.java
  7. 131 0
      src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/entity/NonPower.java
  8. 15 0
      src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/mapper/NonPowerMapper.java
  9. 78 15
      src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/mapper/xml/NonPowerMapper.xml
  10. 24 0
      src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/service/NonPowerService.java
  11. 34 34
      src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/web/MaterialModuleController.java
  12. 22 2
      src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/web/NonPowerController.java
  13. 20 163
      src/main/webapp/webpage/modules/sg/materialmodule/activiti/nonPowerEnd.js
  14. 78 12
      src/main/webapp/webpage/modules/sg/materialmodule/activiti/nonPowerEnd.jsp
  15. 30 189
      src/main/webapp/webpage/modules/sg/materialmodule/activiti/nonPowerStart.js
  16. 123 61
      src/main/webapp/webpage/modules/sg/materialmodule/activiti/nonPowerStart.jsp

+ 5 - 7
src/main/java/com/jeeplus/modules/act/service/ActTaskService.java

@@ -2948,23 +2948,21 @@ public class ActTaskService extends BaseService {
     }
 
     /**
-     * 施工单位项目经理土建开工流程提交文件
-     *
-     * @param act
+     * 施工单位项目经理土建开工流程-填写土建开工报告
      */
     @Transactional(readOnly = false)
     public void nonPowerStartTask(Act act) {
         // 设置意见
-        act.setComment(("yes".equals(act.getFlag()) ? "[同意] " : "[驳回] ") + act.getComment());
+        act.setComment(act.getComment());
         act.preUpdate();
         // 对不同环节的业务逻辑进行操作
         String taskDefKey = act.getTaskDefKey();
         // 提交流程任务
         Map<String, Object> vars = Maps.newHashMap();
-        //根据流程实例id查询项目的相关信息
-//        Project user = MyActiviUtils.sgFindUser(act.getProcInsId());
+        //根据流程实例id查询项目的相关信息-土建流程
+        Project user = MyActiviUtils.findTJUser(act.getProcInsId());
 //        根据项目设置的流转人员,流转对应人员
-//        vars.put("manager", UserUtils.getByUserName(user.getConstructionUnitManage()).getLoginName());
+        vars.put("manager", UserUtils.getByUserName(user.getAssignment().getConstructionManage()).getLoginName());
         complete(act.getTaskId(), act.getProcInsId(), act.getComment(), vars);
     }
 

+ 11 - 22
src/main/java/com/jeeplus/modules/act/web/ActTaskController.java

@@ -34,7 +34,9 @@ import com.jeeplus.modules.sg.managementcenter.constructionProject.entity.Constr
 import com.jeeplus.modules.sg.managementcenter.materialproject.entity.MaterialProject;
 import com.jeeplus.modules.sg.managementcenter.materialproject.service.MaterialProjectService;
 import com.jeeplus.modules.sg.managementcenter.project.service.ProjectService;
+import com.jeeplus.modules.sg.materialmodule.activiti.entity.NonPower;
 import com.jeeplus.modules.sg.materialmodule.activiti.service.MaterialModuleService;
+import com.jeeplus.modules.sg.materialmodule.activiti.service.NonPowerService;
 import com.jeeplus.modules.sg.picking.activiti.entity.PickApplication;
 import com.jeeplus.modules.sg.picking.activiti.entity.ShowList;
 import com.jeeplus.modules.sg.picking.activiti.service.PickIngService;
@@ -109,8 +111,9 @@ public class ActTaskController extends BaseController {
 
     @Autowired
     private OaNotifyService oaNotifyService;
+
     @Autowired
-    private ProcessPersonnelService processPersonnelService;
+    private NonPowerService nonPowerService;
 
     @Autowired
     private ProjectService projectService;
@@ -1741,24 +1744,18 @@ public class ActTaskController extends BaseController {
     }
 
     /**
-     * 施工单位项目经理土建开工流程提交文件
+     * 施工单位项目经理土建开工报告填写
      */
     @ResponseBody
     @RequestMapping(value = "nonPowerStartTask")
-    public AjaxJson nonPowerStartTask(Act act, String pic, UploadImages uploadImages) {
+    public AjaxJson nonPowerStartTask(Act act, NonPower nonPower) {
         AjaxJson j = new AjaxJson();
         try {
-            if (pic != null && pic != "") {
-                uploadImages.setPath(pic);
-//                uploadImages.setProcInsId(act.getProcInsId());
-                uploadImages.setImgName("11");
-//                uploadImages.setuId(UserUtils.getUser().getName());
-//                Project user = MyActiviUtils.sgFindUser(act.getProcInsId());
-//                uploadImages.setProjectId(user.getId());
-                uploadImagesService.save(uploadImages);
-            }
             String comment = URLDecoder.decode(act.getComment(), "UTF-8");
             act.setComment(comment);
+            //修改土建开工报告信息
+            act = nonPower.getAct();
+            nonPowerService.updateStart(nonPower);
             actTaskService.nonPowerStartTask(act);
         } catch (UnsupportedEncodingException e) {
             e.printStackTrace();
@@ -1977,20 +1974,12 @@ public class ActTaskController extends BaseController {
      */
     @ResponseBody
     @RequestMapping(value = "nonPowerEndTask")
-    public AjaxJson nonPowerEndTask(Act act, String pic, UploadImages uploadImages) {
+    public AjaxJson nonPowerEndTask(Act act, NonPower nonPower) {
         AjaxJson j = new AjaxJson();
         try {
-            if (pic != null && pic != "") {
-                uploadImages.setPath(pic);
-//                uploadImages.setProcInsId(act.getProcInsId());
-                uploadImages.setImgName("13");
-//                uploadImages.setuId(UserUtils.getUser().getName());
-//                Project user = MyActiviUtils.sgFindUser(act.getProcInsId());
-//                uploadImages.setProjectId(user.getId());
-                uploadImagesService.save(uploadImages);
-            }
             String comment = URLDecoder.decode(act.getComment(), "UTF-8");
             act.setComment(comment);
+            nonPowerService.updateEnd(nonPower);
             actTaskService.nonPowerEndTask(act);
         } catch (UnsupportedEncodingException e) {
             e.printStackTrace();

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

@@ -269,6 +269,14 @@ public class MyActiviUtils {
         return user;
     }
 
+
+    /**
+     * 通过流程定义id查询项目流转人员信息-土建流程
+     * */
+    public static Project findTJUser(String procInsId) {
+        return projectService.findTJUser(procInsId);
+    }
+
     /**
      * 通过流程定义号查询需求单位
      */

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

@@ -196,6 +196,11 @@ public interface ProjectMapper extends BaseMapper<Project> {
      * */
     Project findUser(String procInsId);
 
+    /**
+     * 通过流程定义id查询项目流转人员信息-土建流程
+     * */
+    Project findTJUser(String procInsId);
+
     Project findWZUser(String procInsId);
 
     Project findJSUser(String procInsId);

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

@@ -1195,6 +1195,14 @@
         #{procInsId});
     </select>
 
+    <select id="findTJUser" resultType="com.jeeplus.modules.sg.managementcenter.project.entity.Project">
+        select
+        <include refid="assignmentColumns"/>
+        FROM xm_project_assignment c
+        WHERE reserveProjectName = (select reserveProjectName from xm_nonpower_process where proc_ins_id =
+        #{procInsId});
+    </select>
+
     <select id="findWZUser" resultType="com.jeeplus.modules.sg.managementcenter.project.entity.Project">
         select id
              , demand_unit

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

@@ -249,6 +249,13 @@ public class ProjectService extends CrudService<ProjectMapper, Project> {
 		return projectMapper.findUser(procInsId);
 	}
 
+	/**
+	 * 通过流程定义id查询项目流转人员信息-土建流程
+	 * */
+	public Project findTJUser(String procInsId) {
+		return projectMapper.findTJUser(procInsId);
+	}
+
 /*	public Project get(String id) {
 		Project project1 = super.get(id);
 		return project1;

+ 131 - 0
src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/entity/NonPower.java

@@ -11,8 +11,35 @@ public class NonPower extends ActEntity<NonPower> {
     private String projectId;
     //项目名称
     private String projectName;
+    //储备项目名称
+    private String reserveProjectName;
     //项目基础信息
     private BasicInformation basicInformation;
+    //建设单位
+    private String buildingUnit;
+    //工程编号
+    private String projectNumber;
+    //施工单位
+    private String constructionUnit;
+    //计划开工时间
+    private String plannedStart;
+    //计划竣工时间
+    private String plannedEnd;
+    //项目负责人
+    private String projectManager;
+    //线路名称
+    private String lineName;
+    //施工负责人
+    private String personInCharge;
+    //工作地点
+    private String workPlace;
+    //施工土建工程量
+    private String constructionCivilWorks;
+    //土建开工工程量
+    private String civilStartReport;
+    //土建竣工工程量
+    private String civilEndReport;
+
 
 
     public String getProjectId() {
@@ -31,6 +58,14 @@ public class NonPower extends ActEntity<NonPower> {
         this.projectName = projectName;
     }
 
+    public String getReserveProjectName() {
+        return reserveProjectName;
+    }
+
+    public void setReserveProjectName(String reserveProjectName) {
+        this.reserveProjectName = reserveProjectName;
+    }
+
     public BasicInformation getBasicInformation() {
         return basicInformation;
     }
@@ -38,4 +73,100 @@ public class NonPower extends ActEntity<NonPower> {
     public void setBasicInformation(BasicInformation basicInformation) {
         this.basicInformation = basicInformation;
     }
+
+    public String getBuildingUnit() {
+        return buildingUnit;
+    }
+
+    public void setBuildingUnit(String buildingUnit) {
+        this.buildingUnit = buildingUnit;
+    }
+
+    public String getProjectNumber() {
+        return projectNumber;
+    }
+
+    public void setProjectNumber(String projectNumber) {
+        this.projectNumber = projectNumber;
+    }
+
+    public String getConstructionUnit() {
+        return constructionUnit;
+    }
+
+    public void setConstructionUnit(String constructionUnit) {
+        this.constructionUnit = constructionUnit;
+    }
+
+    public String getPlannedStart() {
+        return plannedStart;
+    }
+
+    public void setPlannedStart(String plannedStart) {
+        this.plannedStart = plannedStart;
+    }
+
+    public String getPlannedEnd() {
+        return plannedEnd;
+    }
+
+    public void setPlannedEnd(String plannedEnd) {
+        this.plannedEnd = plannedEnd;
+    }
+
+    public String getProjectManager() {
+        return projectManager;
+    }
+
+    public void setProjectManager(String projectManager) {
+        this.projectManager = projectManager;
+    }
+
+    public String getLineName() {
+        return lineName;
+    }
+
+    public void setLineName(String lineName) {
+        this.lineName = lineName;
+    }
+
+    public String getPersonInCharge() {
+        return personInCharge;
+    }
+
+    public void setPersonInCharge(String personInCharge) {
+        this.personInCharge = personInCharge;
+    }
+
+    public String getWorkPlace() {
+        return workPlace;
+    }
+
+    public void setWorkPlace(String workPlace) {
+        this.workPlace = workPlace;
+    }
+
+    public String getConstructionCivilWorks() {
+        return constructionCivilWorks;
+    }
+
+    public void setConstructionCivilWorks(String constructionCivilWorks) {
+        this.constructionCivilWorks = constructionCivilWorks;
+    }
+
+    public String getCivilStartReport() {
+        return civilStartReport;
+    }
+
+    public void setCivilStartReport(String civilStartReport) {
+        this.civilStartReport = civilStartReport;
+    }
+
+    public String getCivilEndReport() {
+        return civilEndReport;
+    }
+
+    public void setCivilEndReport(String civilEndReport) {
+        this.civilEndReport = civilEndReport;
+    }
 }

+ 15 - 0
src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/mapper/NonPowerMapper.java

@@ -5,6 +5,7 @@ package com.jeeplus.modules.sg.materialmodule.activiti.mapper;
 
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.EngineeringAmount;
 import com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject;
 import com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule;
 import com.jeeplus.modules.sg.materialmodule.activiti.entity.NonPower;
@@ -16,5 +17,19 @@ import java.util.List;
 
 @MyBatisMapper
 public interface NonPowerMapper extends BaseMapper<NonPower> {
+    /**
+     * 通过项目需求名称查询所有的施工交底土建信息
+     * */
+    List<EngineeringAmount> findCivilWorks(String reserveProjectName);
+
+    /**
+     * 修改土建开工报告信息
+     * */
+    void updateStart(NonPower nonPower);
+
+    /**
+     * 修改土建竣工报告信息
+     * */
+    void updateEnd(NonPower nonPower);
 
 }

+ 78 - 15
src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/mapper/xml/NonPowerMapper.xml

@@ -24,32 +24,75 @@
 		b.basicDescription AS `basicInformation.basicDescription`,
 		b.workAreaRemarks AS `basicInformation.workAreaRemarks`
 	</sql>
+	<update id="updateStart">
+		update xm_nonpower_process
+		set plannedStart = #{plannedStart},
+			projectManager = #{projectManager},
+			personInCharge = #{personInCharge},
+			plannedEnd = #{plannedEnd},
+			workPlace = #{workPlace},
+			civilStartReport = #{civilStartReport}
+		where proc_ins_id = #{procInsId};
+	</update>
 
-    <select id="get" resultType="NonPower">
+	<update id="updateEnd">
+		update xm_nonpower_process
+		set	civilEndReport = #{civilEndReport}
+		where proc_ins_id = #{procInsId};
+	</update>
+
+	<select id="get" resultType="NonPower">
 		select
 		a.id,
 		a.projectId,
-		p.projectName,
-		<include refid="basicColumns"/>
+		a.projectName,
+        a.reserveProjectName,
+        b.municipalCompany as buildingUnit,
+        b.erpNo as projectNumber,
+        xpa.constructionUnit as constructionUnit,
+        a.plannedStart,
+        a.plannedEnd,
+        a.projectManager,
+        b.lineName,
+        a.personInCharge,
+        a.workPlace,
+        a.civilStartReport,
+        a.civilEndReport
 		from xm_nonpower_process a
 		LEFT JOIN xm_material_project p
 		on a.projectId = p.projectId
 		LEFT JOIN xm_project_basicinformation b
 		on p.reserveProjectName = b.reserveProjectName
+		left join xm_project_assignment xpa
+        on a.reserveProjectName = xpa.reserveProjectName
 		where a.id = #{id}
     </select>
 
     <select id="findList" resultType="NonPower">
 		select
-		a.id,
-		a.projectId,
-		p.projectName,
-		<include refid="basicColumns"/>
-		from xm_nonpower_process a
-		LEFT JOIN xm_material_project p
-		on a.projectId = p.projectId
-		LEFT JOIN xm_project_basicinformation b
-		on p.reserveProjectName = b.reserveProjectName
+        a.id,
+        a.projectId,
+        a.projectName,
+        a.reserveProjectName,
+        b.municipalCompany as buildingUnit,
+        b.erpNo as projectNumber,
+        xpa.constructionUnit as constructionUnit,
+        a.plannedStart,
+        a.plannedEnd,
+        a.projectManager,
+        b.lineName,
+        a.personInCharge,
+        a.workPlace,
+        a.constructionCivilWorks,
+        a.civilStartReport,
+        a.civilEndReport
+        from xm_nonpower_process a
+        LEFT JOIN xm_material_project p
+        on a.projectId = p.projectId
+        LEFT JOIN xm_project_basicinformation b
+        on p.reserveProjectName = b.reserveProjectName
+        left join xm_project_assignment xpa
+        on a.reserveProjectName = xpa.reserveProjectName
         <choose>
             <when test="page !=null and page.orderBy != null and page.orderBy != ''">
                 ORDER BY ${page.orderBy}
@@ -59,9 +102,25 @@
             </otherwise>
         </choose>
     </select>
+	<select id="findCivilWorks"
+			resultType="com.jeeplus.modules.sg.managementcenter.activiti.entity.EngineeringAmount">
+		select id,
+			   create_by,
+			   create_date,
+			   update_by,
+			   update_date,
+			   del_flag,
+			   remarks,
+			   reserveProjectName,
+			   civilWorks,
+			   civilMaterials,
+			   civilUnit
+		from xm_engineering_amount
+		where reserveProjectName = #{reserveProjectName};
+	</select>
 
 
-    <insert id="insert">
+	<insert id="insert">
 		insert into xm_nonpower_process (
 			id,
 			create_by,
@@ -71,7 +130,9 @@
 			del_flag,
 			remarks,
 			proc_ins_id,
-			projectId
+			projectId,
+            projectName,
+             reserveProjectName
 		)values
 			(
 			#{id},
@@ -82,7 +143,9 @@
 			#{delFlag},
 			#{remarks},
 			#{procInsId},
-			#{projectId}
+			#{projectId},
+			#{projectName},
+			#{reserveProjectName}
 			)
 	</insert>
 </mapper>

+ 24 - 0
src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/service/NonPowerService.java

@@ -4,6 +4,7 @@
 package com.jeeplus.modules.sg.materialmodule.activiti.service;
 
 import com.jeeplus.core.service.CrudService;
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.EngineeringAmount;
 import com.jeeplus.modules.sg.managementcenter.constructionProject.entity.ConstructionProject;
 import com.jeeplus.modules.sg.materialmodule.activiti.entity.MaterialModule;
 import com.jeeplus.modules.sg.materialmodule.activiti.entity.NonPower;
@@ -32,4 +33,27 @@ public class NonPowerService extends CrudService<NonPowerMapper, NonPower> {
     public NonPower get(String id) {
         return super.get(id);
     }
+
+    /**
+     * 通过项目需求名称查询所有的施工交底土建信息
+     * */
+    public List<EngineeringAmount> findCivilWorks(String reserveProjectName) {
+        return nonPowerMapper.findCivilWorks(reserveProjectName);
+    }
+
+    /**
+     * 修改土建开工报告信息
+     */
+    @Transactional(readOnly = false)
+    public void updateStart(NonPower nonPower) {
+        nonPowerMapper.updateStart(nonPower);
+    }
+
+    /**
+     * 修改土建竣工报告信息
+     */
+    @Transactional(readOnly = false)
+    public void updateEnd(NonPower nonPower) {
+        nonPowerMapper.updateEnd(nonPower);
+    }
 }

+ 34 - 34
src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/web/MaterialModuleController.java

@@ -39,20 +39,20 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/materialModuleForm";
     }
 
-    /**
+/*    *//**
      * 土建开工流程
-     */
+     *//*
     @RequestMapping(value = "nonPowerStart")
     public String nonPowerStart(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
         model.addAttribute("materialShow", materialShow);
         model.addAttribute("materialModule", materialModule);
         return "modules/sg/materialmodule/activiti/nonPowerStart";
-    }
+    }*/
 
-    /**
+  /*  *//**
      * 土建施工中流程
-     */
+     *//*
     @RequestMapping(value = "nonPowerMiddle")
     public String nonPowerMiddle(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -61,9 +61,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/nonPowerMiddle";
     }
 
-    /**
+    *//**
      * 审核土建施工中流程
-     */
+     *//*
     @RequestMapping(value = "nonRePowerMiddle")
     public String nonRePowerMiddle(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -72,9 +72,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/nonRePowerMiddle";
     }
 
-    /**
+    *//**
      * 土建竣工流程
-     */
+     *//*
     @RequestMapping(value = "nonPowerEnd")
     public String nonPowerEnd(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -83,9 +83,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/nonPowerEnd";
     }
 
-    /**
+    *//**
      * 审核土建竣工流程
-     */
+     *//*
     @RequestMapping(value = "nonRePowerEnd")
     public String nonRePowerEnd(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -94,9 +94,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/nonRePowerEnd";
     }
 
-    /**
+    *//**
      * 经理审核土建
-     */
+     *//*
     @RequestMapping(value = "reviewNonPower")
     public String reviewNonPower(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -105,9 +105,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/reviewNonPower";
     }
 
-    /**
+    *//**
      * 电气开工流程
-     */
+     *//*
     @RequestMapping(value = "electricalStart")
     public String electricalStart(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -116,9 +116,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/electricalStart";
     }
 
-    /**
+    *//**
      * 电气施工流程
-     */
+     *//*
     @RequestMapping(value = "electricalMiddle")
     public String electricalMiddle(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -127,9 +127,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/electricalMiddle";
     }
 
-    /**
+    *//**
      * 审核电气施工
-     */
+     *//*
     @RequestMapping(value = "reElectricalMiddle")
     public String reElectricalMiddle(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -138,9 +138,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/reElectricalMiddle";
     }
 
-    /**
+    *//**
      * 电气竣工流程
-     */
+     *//*
     @RequestMapping(value = "electricalEnd")
     public String electricalEnd(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -149,9 +149,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/electricalEnd";
     }
 
-    /**
+    *//**
      * 审核电气竣工
-     */
+     *//*
     @RequestMapping(value = "reElectricalEnd")
     public String reElectricalEnd(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -160,9 +160,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/reElectricalEnd";
     }
 
-    /**
+    *//**
      * 审核电气流程
-     */
+     *//*
     @RequestMapping(value = "reviewElectrical")
     public String reviewElectrical(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -171,9 +171,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/reviewElectrical";
     }
 
-    /**
+    *//**
      * 涉电开工流程
-     */
+     *//*
     @RequestMapping(value = "PowerStart")
     public String PowerStart(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -182,9 +182,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/PowerStart";
     }
 
-    /**
+    *//**
      * 涉电竣工流程
-     */
+     *//*
     @RequestMapping(value = "PowerEnd")
     public String PowerEnd(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -193,9 +193,9 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/PowerEnd";
     }
 
-    /**
+    *//**
      * 审核涉电竣工
-     */
+     *//*
     @RequestMapping(value = "rePowerEnd")
     public String rePowerEnd(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
@@ -204,16 +204,16 @@ public class MaterialModuleController extends BaseController {
         return "modules/sg/materialmodule/activiti/rePowerEnd";
     }
 
-    /**
+    *//**
      * 是否完成所有涉电工作
-     */
+     *//*
     @RequestMapping(value = "PowerWhether")
     public String PowerWhether(MaterialModule materialModule, Model model) {
         MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
         model.addAttribute("materialShow", materialShow);
         model.addAttribute("materialModule", materialModule);
         return "modules/sg/materialmodule/activiti/PowerWhether";
-    }
+    }*/
 
     /**
      * 施工单位项目经理判断项目是否包含涉电工作

+ 22 - 2
src/main/java/com/jeeplus/modules/sg/materialmodule/activiti/web/NonPowerController.java

@@ -8,6 +8,7 @@ import com.jeeplus.core.web.BaseController;
 import com.jeeplus.modules.act.service.ActProcessService;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.sg.managementcenter.activiti.entity.Construction;
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.EngineeringAmount;
 import com.jeeplus.modules.sg.managementcenter.activiti.service.ConstructionService;
 import com.jeeplus.modules.sg.managementcenter.project.entity.Project;
 import com.jeeplus.modules.sg.managementcenter.project.service.ProjectService;
@@ -72,6 +73,15 @@ public class NonPowerController extends BaseController {
      */
     @RequestMapping(value = "nonPowerStart")
     public String nonPowerStart(NonPower nonPower, Model model) {
+         //通过项目需求名称查询所有的施工交底土建信息
+        List<EngineeringAmount> civilWorks = nonPowerService.findCivilWorks(nonPower.getReserveProjectName());
+        if (civilWorks != null) {
+            String constructionCivilWorks = "";
+            for (EngineeringAmount e : civilWorks) {
+                constructionCivilWorks += e.getCivilWorks() + e.getCivilMaterials() + e.getCivilUnit() + ",";
+            }
+            nonPower.setConstructionCivilWorks(constructionCivilWorks);
+        }
         model.addAttribute("nonPower", nonPower);
         return "modules/sg/materialmodule/activiti/nonPowerStart";
     }
@@ -81,6 +91,15 @@ public class NonPowerController extends BaseController {
      */
     @RequestMapping(value = "nonPowerEnd")
     public String nonPowerEnd(NonPower nonPower, Model model) {
+        //通过项目需求名称查询所有的施工交底土建信息
+        List<EngineeringAmount> civilWorks = nonPowerService.findCivilWorks(nonPower.getReserveProjectName());
+        if (civilWorks != null) {
+            String constructionCivilWorks = "";
+            for (EngineeringAmount e : civilWorks) {
+                constructionCivilWorks += e.getCivilWorks() + e.getCivilMaterials() + e.getCivilUnit() + ",";
+            }
+            nonPower.setConstructionCivilWorks(constructionCivilWorks);
+        }
         model.addAttribute("nonPower", nonPower);
         return "modules/sg/materialmodule/activiti/nonPowerEnd";
     }
@@ -135,10 +154,11 @@ public class NonPowerController extends BaseController {
             //定义vars用于指派流程走向
             Map<String, Object> vars = Maps.newHashMap();
             //获取项目定义号
-            String projectId = materialProject.getProjectId();
             vars.put("design", UserUtils.getByUserName(materialProject.getAssignment().getConstructionManage()).getLoginName());
             //保存基础信息到流程表中
-            nonPower.setProjectId(projectId);
+            nonPower.setProjectId(materialProject.getProjectId());
+            nonPower.setProjectName(materialProject.getProjectName());
+            nonPower.setReserveProjectName(materialProject.getReserveProjectName());
             nonPowerService.save(nonPower);
             //根据项目定义号修改项目的土建流程状态
             constructionService.updateAdvStatus(nonPower.getProjectId());

+ 20 - 163
src/main/webapp/webpage/modules/sg/materialmodule/activiti/nonPowerEnd.js

@@ -1,171 +1,28 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
 <script>
 $(document).ready(function() {
-	var procInsId = $("#procInsId").val();
-	// alert(procInsId);
-	$('#testPicTable').bootstrapTable({
-		  //请求方法
-               method: 'post',
-               //类型json
-               dataType: "json",
-               contentType: "application/x-www-form-urlencoded",
-               //显示检索按钮
-	           showSearch: true,
-               //显示刷新按钮
-               showRefresh: true,
-               //显示切换手机试图按钮
-               showToggle: true,
-               //显示 内容列下拉框
-    	       showColumns: true,
-    	       //显示到处按钮
-    	       showExport: true,
-    	       //显示切换分页按钮
-    	       showPaginationSwitch: true,
-    	       //最低显示2行
-    	       minimumCountColumns: 2,
-               //是否显示行间隔色
-               striped: true,
-               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)     
-               cache: false,    
-               //是否显示分页(*)  
-               pagination: true,   
-                //排序方式 
-               sortOrder: "asc",  
-               //初始化加载第一页,默认第一页
-               pageNumber:1,   
-               //每页的记录行数(*)   
-               pageSize: 10,  
-               //可供选择的每页的行数(*)    
-               pageList: [10, 25, 50, 100],
-               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
-               url: "${ctx}/managementcenter/upload/materialUploadData?procInsId="+procInsId,
-               //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
-               //queryParamsType:'',   
-               ////查询参数,每次调用是会带上这个参数,可自定义                         
-               queryParams : function(params) {
-               	var searchParam = $("#searchForm").serializeJSON();
-               	searchParam.pageNo = params.limit === undefined? "1" :params.offset/params.limit+1;
-               	searchParam.pageSize = params.limit === undefined? -1 : params.limit;
-               	searchParam.orderBy = params.sort === undefined? "" : params.sort+ " "+  params.order;
-                   return searchParam;
-               },
-               //分页方式:client客户端分页,server服务端分页(*)
-               sidePagination: "server",
-               contextMenuTrigger:"right",//pc端 按右键弹出菜单
-               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
-               contextMenu: '#context-menu',
-               onContextMenuItem: function(row, $el){
-                   if($el.data("item") == "edit"){
-                   		edit(row.id);
-                   }else if($el.data("item") == "view"){
-                       view(row.id);
-                   } else if($el.data("item") == "delete"){
-                        jp.confirm('确认要删除该图片管理记录吗?', function(){
-                       	jp.loading();
-                       	jp.get("${ctx}/test/pic/testPic/delete?id="+row.id, function(data){
-                   	  		if(data.success){
-                   	  			$('#testPicTable').bootstrapTable('refresh');
-                   	  			jp.success(data.msg);
-                   	  		}else{
-                   	  			jp.error(data.msg);
-                   	  		}
-                   	  	})
-                   	   
-                   	});
-                      
-                   } 
-               },
-               onClickRow: function(row, $el){
-               },
-               	onShowSearch: function () {
-			$("#search-collapse").slideToggle();
-		},
-               columns: [{
-		        field: 'path',
-		        title: '图片路径',
-		        sortable: true,
-		        sortName: 'path',
-		        formatter:function(value, row , index){
-		        	var valueArray = value.split("|");
-		        	var labelArray = [];
-		        	for(var i =0 ; i<valueArray.length; i++){
-		        		if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
-		        		{
-		        			labelArray[i] = "<a href=\""+valueArray[i]+"\" url=\""+valueArray[i]+"\" target=\"_blank\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>"
-		        		}else{
-		        			labelArray[i] = '<img   onclick="jp.showPic(\''+valueArray[i]+'\')"'+' height="50px" src="'+valueArray[i]+'">';
-		        		}
-		        	}
-		        	return labelArray.join(" ");
-		        }
-		       
-		    },{
-				   field: 'imgName',
-				   title: '上传用途',
-				   sortable: true,
-				   sortName: 'imgName',
-			   },{
-				   field: 'uId',
-				   title: '上传人员',
-				   sortable: true,
-				   sortName: 'uId',
-			   }]
-		});
-		  
-	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
-		  $('#testPicTable').bootstrapTable("toggleView");
-		}
-	  
-	  $('#testPicTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
-                'check-all.bs.table uncheck-all.bs.table', function () {
-            $('#remove').prop('disabled', ! $('#testPicTable').bootstrapTable('getSelections').length);
-            $('#view,#edit').prop('disabled', $('#testPicTable').bootstrapTable('getSelections').length!=1);
-        });
-
-	 $("#export").click(function(){//导出Excel文件
-			jp.downloadFile('${ctx}/test/pic/testPic/export');
-	  });
-		    
-	  $("#search").click("click", function() {// 绑定查询按扭
-		  $('#testPicTable').bootstrapTable('refresh');
-		});
-	 
-	 $("#reset").click("click", function() {// 绑定查询按扭
-		  $("#searchForm  input").val("");
-		  $("#searchForm  select").val("");
-		  $("#searchForm  .select-item").html("");
-		  $('#testPicTable').bootstrapTable('refresh');
-		});
-
 	$("#agree").click(function () {
-		var currentFileValues = $("input[name='pic']").val();
-		var imgName = $("#imgName").val();
-		if (currentFileValues == "" || currentFileValues == null) {
-			jp.error("请上传文件");
-		} else {
-			jp.prompt("审核意见", function (message) {
-				jp.post("${ctx}/act/task/nonPowerEndTask",
-					{
-						"taskId":"${materialModule.act.taskId}",
-						"taskName":"${materialModule.act.taskName}",
-						"taskDefKey":"${materialModule.act.taskDefKey}",
-						"procInsId":"${materialModule.act.procInsId}",
-						"procDefId":"${materialModule.act.procDefId}",
-						"imgName":imgName,
-						"flag":"yes",
-						"pic":currentFileValues,
-						"comment":window.encodeURI(message)
-					},
-					function (data) {
-						if(data.success){
-							jp.success(data.msg);
-							jp.go("${ctx}/act/task/todo")
-						}
-					})
-			});
-		}
+		jp.prompt("审核意见", function (message) {
+			jp.post("${ctx}/act/task/nonPowerEndTask",
+		{
+				"taskId":"${nonPower.act.taskId}",
+				"taskName":"${nonPower.act.taskName}",
+				"taskDefKey":"${nonPower.act.taskDefKey}",
+				"procInsId":"${nonPower.act.procInsId}",
+				"procDefId":"${nonPower.act.procDefId}",
+				"flag":"yes",
+				"pic":currentFileValues,
+				"comment":window.encodeURI(message)
+			},
+			function (data) {
+				if(data.success){
+					jp.success(data.msg);
+					jp.go("${ctx}/act/task/todo")
+				}
+			})
+		});
 	});
-});
+})
 		
   function getIdSelections() {
         return $.map($("#testPicTable").bootstrapTable('getSelections'), function (row) {

+ 78 - 12
src/main/webapp/webpage/modules/sg/materialmodule/activiti/nonPowerEnd.jsp

@@ -5,8 +5,6 @@
 	<title>土建竣工流程</title>
 	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
 	<meta name="decorator" content="ani"/>
-	<%@ include file="/webpage/include/bootstraptable.jsp"%>
-	<%@include file="/webpage/include/treeview.jsp" %>
 	<%@include file="nonPowerEnd.js"%>
 </head>
 <body>
@@ -17,28 +15,96 @@
 	</div>
 	<div class="panel-body">
 	<!-- 表格 -->
-	<table id="testPicTable"   data-toolbar="#toolbar"></table>
 		<div class="panel-body">
-			<form:form id="inputForm" modelAttribute="materialModule" class="form-horizontal">
+			<form:form id="inputForm" modelAttribute="nonPower" class="form-horizontal">
 				<form:hidden path="id"/>
 				<form:hidden path="act.taskId"/>
 				<form:hidden path="act.taskName"/>
 				<form:hidden path="act.taskDefKey"/>
 				<form:hidden path="act.procInsId"/>
 				<form:hidden path="act.procDefId"/>
-				<input type="hidden" id="procInsId" name="procInsId" value="${materialModule.act.procInsId}"/>
 				<table class="table table-bordered">
 					<tbody>
 					<tr>
-						<td class="width-35 active" style="text-align: right">项目名称:</td>
+						<td class="width-35 active" colspan="4" style="text-align: center"><h3>配电网工程竣工报告</h3></td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">项目名称:</label></td>
+						<td class="width-35">
+							<form:input id="projectName" path="projectName" readonly="true"
+										cssClass="form-control"/>
+						</td>
+						<td class="width-15 active"><label class="pull-right">工程编号:</label></td>
+						<td class="width-35">
+							<form:input id="projectNumber" path="projectNumber" readonly="true"
+										cssClass="form-control"/>
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">建设单位:</label></td>
+						<td class="width-35">
+							<form:input id="buildingUnit" path="buildingUnit" readonly="true"
+										cssClass="form-control"/>
+						</td>
+						<td class="width-15 active"><label class="pull-right">施工单位:</label></td>
+						<td class="width-35">
+							<form:input id="constructionUnit" path="constructionUnit" readonly="true"
+										cssClass="form-control"/>
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">计划开工时间:</label></td>
+						<td class="width-35">
+							<form:input id="plannedStart" path="plannedStart" readonly="true"
+										cssClass="form-control required" placeholder="必填"/>
+						</td>
+						<td class="width-15 active"><label class="pull-right">项目负责人:</label></td>
+						<td class="width-35">
+							<form:input id="projectManager" path="projectManager" readonly="true"
+										cssClass="form-control required" placeholder="必填"/>
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">施工负责人:</label></td>
+						<td class="width-35">
+							<form:input id="personInCharge" path="personInCharge" readonly="true"
+										cssClass="form-control required" placeholder="必填"/>
+						</td>
+						<td class="width-15 active"><label class="pull-right">计划竣工时间:</label></td>
+						<td class="width-35">
+							<form:input id="plannedEnd" path="plannedEnd" readonly="true"
+										cssClass="form-control required" placeholder="必填"/>
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">线路名称:</label></td>
+						<td class="width-35">
+							<form:input id="lineName" path="lineName"
+										cssClass="form-control" readonly="true"	/>
+						</td>
+						<td class="width-15 active"><label class="pull-right">工作地点:</label></td>
+						<td class="width-35">
+							<form:input id="workPlace" path="workPlace" readonly="true"
+										cssClass="form-control required" placeholder="必填"/>
+						</td>
+					</tr>
+					<tr>
+						<td class="width-15 active"><label class="pull-right">施工土建工程量:</label></td>
+						<td class="width-35">
+							<form:textarea id="constructionCivilWorks" path="constructionCivilWorks"
+										   cssClass="form-control" readonly="true"	/>
+						</td>
+						<td class="width-15 active"><label class="pull-right">土建开工工程量:</label></td>
 						<td class="width-35">
-								${nonPower.projectName}
+							<form:textarea id="civilStartReport" path="civilStartReport" readonly="true"
+										   cssClass="form-control required" placeholder="必填"/>
 						</td>
 					</tr>
 					<tr>
-						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>文件上传:</label></td>
+						<td class="width-15 active"><label class="pull-right">土建竣工工程量:</label></td>
 						<td class="width-35">
-							<sys:fileUpload  path="pic" fileNumLimit="50" fileSizeLimit="50" value="${testPic.pic}" type="file" uploadPath="/materialModule"></sys:fileUpload>
+							<form:textarea id="civilEndReport" path="civilEndReport"
+										   cssClass="form-control" placeholder="必填"/>
 						</td>
 					</tr>
 					</tbody>
@@ -52,9 +118,9 @@
 					</div>
 				</div>
 			</div>
-			<c:if test="${not empty materialModule.id}">
-				<act:flowChart procInsId="${materialModule.act.procInsId}"/>
-				<act:histoicFlow procInsId="${materialModule.act.procInsId}" />
+			<c:if test="${not empty nonPower.id}">
+				<act:flowChart procInsId="${nonPower.act.procInsId}"/>
+				<act:histoicFlow procInsId="${nonPower.act.procInsId}" />
 			</c:if>
 		</div>
     <!-- context menu -->

+ 30 - 189
src/main/webapp/webpage/modules/sg/materialmodule/activiti/nonPowerStart.js

@@ -1,202 +1,43 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
 <script>
 $(document).ready(function() {
-	var procInsId = $("#procInsId").val();
-	// alert(procInsId);
-	$('#testPicTable').bootstrapTable({
-		  //请求方法
-               method: 'post',
-               //类型json
-               dataType: "json",
-               contentType: "application/x-www-form-urlencoded",
-               //显示检索按钮
-	           showSearch: true,
-               //显示刷新按钮
-               showRefresh: true,
-               //显示切换手机试图按钮
-               showToggle: true,
-               //显示 内容列下拉框
-    	       showColumns: true,
-    	       //显示到处按钮
-    	       showExport: true,
-    	       //显示切换分页按钮
-    	       showPaginationSwitch: true,
-    	       //最低显示2行
-    	       minimumCountColumns: 2,
-               //是否显示行间隔色
-               striped: true,
-               //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)     
-               cache: false,    
-               //是否显示分页(*)  
-               pagination: true,   
-                //排序方式 
-               sortOrder: "asc",  
-               //初始化加载第一页,默认第一页
-               pageNumber:1,   
-               //每页的记录行数(*)   
-               pageSize: 10,  
-               //可供选择的每页的行数(*)    
-               pageList: [10, 25, 50, 100],
-               //这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据  
-               url: "${ctx}/managementcenter/upload/materialUploadData?procInsId="+procInsId,
-               //默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
-               //queryParamsType:'',   
-               ////查询参数,每次调用是会带上这个参数,可自定义                         
-               queryParams : function(params) {
-               	var searchParam = $("#searchForm").serializeJSON();
-               	searchParam.pageNo = params.limit === undefined? "1" :params.offset/params.limit+1;
-               	searchParam.pageSize = params.limit === undefined? -1 : params.limit;
-               	searchParam.orderBy = params.sort === undefined? "" : params.sort+ " "+  params.order;
-                   return searchParam;
-               },
-               //分页方式:client客户端分页,server服务端分页(*)
-               sidePagination: "server",
-               contextMenuTrigger:"right",//pc端 按右键弹出菜单
-               contextMenuTriggerMobile:"press",//手机端 弹出菜单,click:单击, press:长按。
-               contextMenu: '#context-menu',
-               onContextMenuItem: function(row, $el){
-                   if($el.data("item") == "edit"){
-                   		edit(row.id);
-                   }else if($el.data("item") == "view"){
-                       view(row.id);
-                   } else if($el.data("item") == "delete"){
-                        jp.confirm('确认要删除该图片管理记录吗?', function(){
-                       	jp.loading();
-                       	jp.get("${ctx}/test/pic/testPic/delete?id="+row.id, function(data){
-                   	  		if(data.success){
-                   	  			$('#testPicTable').bootstrapTable('refresh');
-                   	  			jp.success(data.msg);
-                   	  		}else{
-                   	  			jp.error(data.msg);
-                   	  		}
-                   	  	})
-                   	   
-                   	});
-                      
-                   } 
-               },
-               onClickRow: function(row, $el){
-               },
-               	onShowSearch: function () {
-			$("#search-collapse").slideToggle();
-		},
-               columns: [/*{
-				   field: 'uId',
-				   title: '标题',
-				   sortable: true,
-				   sortName: 'uId'
-				   ,formatter:function(value, row , index){
-					   value = jp.unescapeHTML(value);
-				   <c:choose>
-					   <c:when test="${fns:hasPermission('test:pic:testPic:edit')}">
-					   return "<a href='javascript:edit(\""+row.id+"\")'>"+value+"</a>";
-				   </c:when>
-					   <c:when test="${fns:hasPermission('test:pic:testPic:view')}">
-					   return "<a href='javascript:view(\""+row.id+"\")'>"+value+"</a>";
-				   </c:when>
-					   <c:otherwise>
-					   return value;
-				   </c:otherwise>
-					   </c:choose>
-				   }
-
-			   },*/{
-		        field: 'path',
-		        title: '图片路径',
-		        sortable: true,
-		        sortName: 'path',
-		        formatter:function(value, row , index){
-		        	var valueArray = value.split("|");
-		        	var labelArray = [];
-		        	for(var i =0 ; i<valueArray.length; i++){
-		        		if(!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(valueArray[i]))
-		        		{
-		        			labelArray[i] = "<a href=\""+valueArray[i]+"\" url=\""+valueArray[i]+"\" target=\"_blank\">"+decodeURIComponent(valueArray[i].substring(valueArray[i].lastIndexOf("/")+1))+"</a>"
-		        		}else{
-		        			labelArray[i] = '<img   onclick="jp.showPic(\''+valueArray[i]+'\')"'+' height="50px" src="'+valueArray[i]+'">';
-		        		}
-		        	}
-		        	return labelArray.join(" ");
-		        }
-		       
-		    },{
-				   field: 'imgName',
-				   title: '上传用途',
-				   sortable: true,
-				   sortName: 'imgName',
-			   },{
-				   field: 'uId',
-				   title: '上传人员',
-				   sortable: true,
-				   sortName: 'uId',
-			   }]
-		});
-		  
-	  if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端
-		  $('#testPicTable').bootstrapTable("toggleView");
-		}
-	  
-	  $('#testPicTable').on('check.bs.table uncheck.bs.table load-success.bs.table ' +
-                'check-all.bs.table uncheck-all.bs.table', function () {
-            $('#remove').prop('disabled', ! $('#testPicTable').bootstrapTable('getSelections').length);
-            $('#view,#edit').prop('disabled', $('#testPicTable').bootstrapTable('getSelections').length!=1);
-        });
-
-	 $("#export").click(function(){//导出Excel文件
-			jp.downloadFile('${ctx}/test/pic/testPic/export');
-	  });
-		    
-	  $("#search").click("click", function() {// 绑定查询按扭
-		  $('#testPicTable').bootstrapTable('refresh');
-		});
-	 
-	 $("#reset").click("click", function() {// 绑定查询按扭
-		  $("#searchForm  input").val("");
-		  $("#searchForm  select").val("");
-		  $("#searchForm  .select-item").html("");
-		  $('#testPicTable').bootstrapTable('refresh');
-		});
-
 	$("#agree").click(function () {
-		var currentFileValues = $("input[name='pic']").val();
-		var imgName = $("#imgName").val();
-		if (currentFileValues == "" || currentFileValues == null) {
-			jp.error("请上传文件");
-		} else {
-			jp.prompt("审核意见", function (message) {
-				jp.post("${ctx}/act/task/nonPowerStartTask",
-					{
-						"taskId":"${materialModule.act.taskId}",
-						"taskName":"${materialModule.act.taskName}",
-						"taskDefKey":"${materialModule.act.taskDefKey}",
-						"procInsId":"${materialModule.act.procInsId}",
-						"procDefId":"${materialModule.act.procDefId}",
-						"imgName":imgName,
-						"flag":"yes",
-						"pic":currentFileValues,
-						"comment":window.encodeURI(message)
-					},
-					function (data) {
-						if(data.success){
-							jp.success(data.msg);
-							jp.go("${ctx}/act/task/todo")
-						}
-					})
-			});
+		var flag = check();
+		if (!flag){
+			jp.error("请将需要填写的内容填写完毕");
+			return false;
 		}
+		var formData = $('#inputForm').serialize();
+		jp.prompt("审核意见", function (message) {
+			jp.post("${ctx}/act/task/nonPowerStartTask",
+				formData+"&comment="+window.encodeURI(message), function (data) {
+				if (data.success) {
+					jp.success(data.msg);
+					jp.go("${ctx}/act/task/todo");
+				} else {
+					jp.error(data.msg());
+				}
+			})
+		});
 	});
 });
-		
+
+function check() {
+	var flag = true;
+	var plannedStart = $("#plannedStart").val();
+	var projectManager = $("#projectManager").val();
+	var personInCharge = $("#personInCharge").val();
+	var plannedEnd = $("#plannedEnd").val();
+	var workPlace = $("#workPlace").val();
+	var civilStartReport = $("#civilStartReport").val();
+	if (plannedStart == "" || projectManager == "" || personInCharge == "" || plannedEnd == "" || workPlace == "" || civilStartReport == "") {
+		flag = false;
+	}
+	return flag;
+}
   function getIdSelections() {
         return $.map($("#testPicTable").bootstrapTable('getSelections'), function (row) {
             return row.id
         });
     }
-
-    //刷新列表
-  function refresh(){
-  	$('#testPicTable').bootstrapTable('refresh');
-  }
-
-
 </script>

+ 123 - 61
src/main/webapp/webpage/modules/sg/materialmodule/activiti/nonPowerStart.jsp

@@ -1,67 +1,129 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ include file="/webpage/include/taglib.jsp" %>
 <html>
 <head>
-	<title>土建开工流程</title>
-	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
-	<meta name="decorator" content="ani"/>
-	<%@ include file="/webpage/include/bootstraptable.jsp"%>
-	<%@include file="/webpage/include/treeview.jsp" %>
-	<%@include file="nonPowerStart.js"%>
+    <title>土建开工流程</title>
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+    <meta name="decorator" content="ani"/>
+    <%@ include file="/webpage/include/bootstraptable.jsp" %>
+    <%@include file="/webpage/include/treeview.jsp" %>
+    <%@include file="nonPowerStart.js" %>
 </head>
 <body>
-	<div class="wrapper wrapper-content">
-	<div class="panel panel-primary">
-	<div class="panel-heading">
-		<h3 class="panel-title">土建开工流程</h3>
-	</div>
-	<div class="panel-body">
-	<!-- 表格 -->
-	<table id="testPicTable"   data-toolbar="#toolbar"></table>
-		<div class="panel-body">
-			<form:form id="inputForm" modelAttribute="materialModule" class="form-horizontal">
-				<form:hidden path="id"/>
-				<form:hidden path="act.taskId"/>
-				<form:hidden path="act.taskName"/>
-				<form:hidden path="act.taskDefKey"/>
-				<form:hidden path="act.procInsId"/>
-				<form:hidden path="act.procDefId"/>
-				<input type="hidden" id="procInsId" name="procInsId" value="${materialModule.act.procInsId}"/>
-				<table class="table table-bordered">
-					<tbody>
-					<tr>
-						<td class="width-35 active" style="text-align: right">项目名称:</td>
-						<td class="width-35">
-								${materialShow.projectName}
-						</td>
-					</tr>
-					<tr>
-						<td class="width-15 active"><label class="pull-right"><font color="red">*</font>文件上传:</label></td>
-						<td class="width-35">
-							<sys:fileUpload  path="pic" fileNumLimit="50" fileSizeLimit="50" value="${testPic.pic}" type="file" uploadPath="/materialModule"></sys:fileUpload>
-						</td>
-					</tr>
-					</tbody>
-				</table>
-			</form:form>
-			<div class="row">
-				<div class="col-sm-3"></div>
-				<div class="col-sm-6">
-					<div class="form-group text-center">
-						<input id="agree" class="btn  btn-primary btn-lg btn-parsley" type="submit" value="提交" />&nbsp;
-					</div>
-				</div>
-			</div>
-			<c:if test="${not empty materialModule.id}">
-				<act:flowChart procInsId="${materialModule.act.procInsId}"/>
-				<act:histoicFlow procInsId="${materialModule.act.procInsId}" />
-			</c:if>
-		</div>
-    <!-- context menu -->
-    <ul id="context-menu" class="dropdown-menu">
-    </ul>  
-	</div>
-	</div>
-	</div>
+<div class="wrapper wrapper-content">
+    <div class="panel panel-primary">
+        <div class="panel-heading">
+            <h3 class="panel-title">配电网工程开工报告</h3>
+        </div>
+        <div class="panel-body">
+            <!-- 表格 -->
+            <%--	<table id="testPicTable"   data-toolbar="#toolbar"></table>--%>
+            <div class="panel-body">
+                <form:form id="inputForm" modelAttribute="nonPower" class="form-horizontal">
+                    <form:hidden path="id"/>
+                    <form:hidden path="act.taskId"/>
+                    <form:hidden path="act.taskName"/>
+                    <form:hidden path="act.taskDefKey"/>
+                    <form:hidden path="act.procInsId"/>
+                    <form:hidden path="act.procDefId"/>
+                    <table class="table table-bordered">
+                        <tbody>
+                        <tr>
+                            <td class="width-35 active" colspan="4" style="text-align: center"><h3>配电网工程开工报告</h3></td>
+                        </tr>
+                        <tr>
+                            <td class="width-15 active"><label class="pull-right">项目名称:</label></td>
+                            <td class="width-35">
+                                <form:input id="projectName" path="projectName" readonly="true"
+                                            cssClass="form-control"/>
+                            </td>
+                            <td class="width-15 active"><label class="pull-right">工程编号:</label></td>
+                            <td class="width-35">
+								<form:input id="projectNumber" path="projectNumber" readonly="true"
+											cssClass="form-control"/>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="width-15 active"><label class="pull-right">建设单位:</label></td>
+                            <td class="width-35">
+								<form:input id="buildingUnit" path="buildingUnit" readonly="true"
+											cssClass="form-control"/>
+                            </td>
+                            <td class="width-15 active"><label class="pull-right">施工单位:</label></td>
+                            <td class="width-35">
+								<form:input id="constructionUnit" path="constructionUnit" readonly="true"
+											cssClass="form-control"/>
+                            </td>
+                        </tr>
+						<tr>
+							<td class="width-15 active"><label class="pull-right">计划开工时间:</label></td>
+							<td class="width-35">
+								<form:input id="plannedStart" path="plannedStart"
+											cssClass="form-control required" placeholder="必填"/>
+							</td>
+							<td class="width-15 active"><label class="pull-right">项目负责人:</label></td>
+							<td class="width-35">
+								<form:input id="projectManager" path="projectManager"
+											cssClass="form-control required" placeholder="必填"/>
+							</td>
+						</tr>
+						<tr>
+							<td class="width-15 active"><label class="pull-right">施工负责人:</label></td>
+							<td class="width-35">
+								<form:input id="personInCharge" path="personInCharge"
+											cssClass="form-control required" placeholder="必填"/>
+							</td>
+							<td class="width-15 active"><label class="pull-right">计划竣工时间:</label></td>
+							<td class="width-35">
+								<form:input id="plannedEnd" path="plannedEnd"
+											cssClass="form-control required" placeholder="必填"/>
+							</td>
+						</tr>
+						<tr>
+							<td class="width-15 active"><label class="pull-right">线路名称:</label></td>
+							<td class="width-35">
+								<form:input id="lineName" path="lineName"
+											cssClass="form-control" readonly="true"	/>
+							</td>
+							<td class="width-15 active"><label class="pull-right">工作地点:</label></td>
+							<td class="width-35">
+								<form:input id="workPlace" path="workPlace"
+											cssClass="form-control required" placeholder="必填"/>
+							</td>
+						</tr>
+						<tr>
+							<td class="width-15 active"><label class="pull-right">施工土建工程量:</label></td>
+							<td class="width-35">
+								<form:textarea id="constructionCivilWorks" path="constructionCivilWorks"
+											cssClass="form-control" readonly="true"	/>
+							</td>
+							<td class="width-15 active"><label class="pull-right">土建开工工程量:</label></td>
+							<td class="width-35">
+								<form:textarea id="civilStartReport" path="civilStartReport"
+											cssClass="form-control required" placeholder="必填"/>
+							</td>
+						</tr>
+                        </tbody>
+                    </table>
+                </form:form>
+                <div class="row">
+                    <div class="col-sm-3"></div>
+                    <div class="col-sm-6">
+                        <div class="form-group text-center">
+                            <input id="agree" class="btn  btn-primary btn-lg btn-parsley" type="submit" value="提交"/>&nbsp;
+                        </div>
+                    </div>
+                </div>
+                <c:if test="${not empty nonPower.id}">
+                    <act:flowChart procInsId="${nonPower.act.procInsId}"/>
+                    <act:histoicFlow procInsId="${nonPower.act.procInsId}"/>
+                </c:if>
+            </div>
+            <!-- context menu -->
+            <ul id="context-menu" class="dropdown-menu">
+            </ul>
+        </div>
+    </div>
+</div>
 </body>
-</html>
+</html>