|
@@ -4,6 +4,7 @@ import com.google.common.collect.Maps;
|
|
import com.jeeplus.common.json.AjaxJson;
|
|
import com.jeeplus.common.json.AjaxJson;
|
|
import com.jeeplus.common.utils.DateUtils;
|
|
import com.jeeplus.common.utils.DateUtils;
|
|
import com.jeeplus.common.utils.StringUtils;
|
|
import com.jeeplus.common.utils.StringUtils;
|
|
|
|
+import com.jeeplus.core.persistence.Page;
|
|
import com.jeeplus.core.web.BaseController;
|
|
import com.jeeplus.core.web.BaseController;
|
|
import com.jeeplus.modules.act.service.ActProcessService;
|
|
import com.jeeplus.modules.act.service.ActProcessService;
|
|
import com.jeeplus.modules.act.service.ActTaskService;
|
|
import com.jeeplus.modules.act.service.ActTaskService;
|
|
@@ -22,6 +23,7 @@ import com.jeeplus.modules.sg.materialmodule.activiti.service.MaterialModuleServ
|
|
import com.jeeplus.modules.sg.materialmodule.activiti.service.NonPowerService;
|
|
import com.jeeplus.modules.sg.materialmodule.activiti.service.NonPowerService;
|
|
import com.jeeplus.modules.sys.entity.User;
|
|
import com.jeeplus.modules.sys.entity.User;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
|
|
+import com.jeeplus.modules.test.one.dialog.entity.Leave1;
|
|
import freemarker.template.Configuration;
|
|
import freemarker.template.Configuration;
|
|
import freemarker.template.Template;
|
|
import freemarker.template.Template;
|
|
import org.activiti.engine.repository.ProcessDefinition;
|
|
import org.activiti.engine.repository.ProcessDefinition;
|
|
@@ -151,20 +153,30 @@ public class NonPowerController extends BaseController {
|
|
*/
|
|
*/
|
|
@RequestMapping(value = "nonRePowerEnd")
|
|
@RequestMapping(value = "nonRePowerEnd")
|
|
public String nonRePowerEnd(NonPower nonPower, Model model) {
|
|
public String nonRePowerEnd(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);
|
|
model.addAttribute("nonPower", nonPower);
|
|
return "modules/sg/materialmodule/activiti/nonRePowerEnd";
|
|
return "modules/sg/materialmodule/activiti/nonRePowerEnd";
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 导出土建报告管理页面
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping(value = "nonExportList")
|
|
|
|
+ public String nonExportList(NonPower nonPower, Model model) {
|
|
|
|
+ model.addAttribute("nonPower", nonPower);
|
|
|
|
+ return "modules/sg/materialmodule/activiti/nonExportList";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 导出土建数据展示页面
|
|
|
|
+ */
|
|
|
|
+ @ResponseBody
|
|
|
|
+ @RequestMapping(value = "exportListData")
|
|
|
|
+ public Map<String, Object> exportListData(NonPower nonPower, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
|
|
+ Page<NonPower> page = nonPowerService.findListPage(new Page<NonPower>(request, response), nonPower);
|
|
|
|
+ return getBootstrapData(page);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* 发起土建流程
|
|
* 发起土建流程
|
|
*/
|
|
*/
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@@ -195,7 +207,7 @@ public class NonPowerController extends BaseController {
|
|
Project materialProject = projectService.getAss(project);
|
|
Project materialProject = projectService.getAss(project);
|
|
//定义vars用于指派流程走向
|
|
//定义vars用于指派流程走向
|
|
Map<String, Object> vars = Maps.newHashMap();
|
|
Map<String, Object> vars = Maps.newHashMap();
|
|
- vars.put("noPass", false);
|
|
|
|
|
|
+ vars.put("nopass", false);
|
|
vars.put("pass", true);
|
|
vars.put("pass", true);
|
|
//获取项目定义号
|
|
//获取项目定义号
|
|
vars.put("design", UserUtils.getByUserName(materialProject.getAssignment().getConstructionManage()).getLoginName());
|
|
vars.put("design", UserUtils.getByUserName(materialProject.getAssignment().getConstructionManage()).getLoginName());
|
|
@@ -266,7 +278,6 @@ public class NonPowerController extends BaseController {
|
|
@RequestMapping(value = "civilStart")
|
|
@RequestMapping(value = "civilStart")
|
|
public AjaxJson exportCivilStart(NonPower nonPower, HttpServletRequest request, HttpServletResponse response){
|
|
public AjaxJson exportCivilStart(NonPower nonPower, HttpServletRequest request, HttpServletResponse response){
|
|
AjaxJson j = new AjaxJson();
|
|
AjaxJson j = new AjaxJson();
|
|
- StringBuilder stringBuilder = new StringBuilder();
|
|
|
|
Template template = null;
|
|
Template template = null;
|
|
File path = new File(this.getClass().getResource("/").getPath() + "/freemarker");
|
|
File path = new File(this.getClass().getResource("/").getPath() + "/freemarker");
|
|
Configuration cfg = new Configuration();
|
|
Configuration cfg = new Configuration();
|
|
@@ -281,7 +292,7 @@ public class NonPowerController extends BaseController {
|
|
}
|
|
}
|
|
Map<String, Object> data = new HashMap<>();
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
|
|
|
- NonPower nonPower1 = nonPowerService.getByProcInsId(nonPower.getProcInsId());
|
|
|
|
|
|
+ NonPower nonPower1 = nonPowerService.getById(nonPower.getId());
|
|
String projectId = nonPower1.getProjectId();
|
|
String projectId = nonPower1.getProjectId();
|
|
String projectName = nonPower1.getProjectName();
|
|
String projectName = nonPower1.getProjectName();
|
|
String reserveProjectName = nonPower1.getReserveProjectName();
|
|
String reserveProjectName = nonPower1.getReserveProjectName();
|
|
@@ -299,17 +310,6 @@ public class NonPowerController extends BaseController {
|
|
Date createDate = nonPower1.getCreateDate();
|
|
Date createDate = nonPower1.getCreateDate();
|
|
DateFormat df = new SimpleDateFormat("yyyy年MM月dd日");
|
|
DateFormat df = new SimpleDateFormat("yyyy年MM月dd日");
|
|
String dateYear = df.format(createDate);
|
|
String dateYear = df.format(createDate);
|
|
- String constructionCivilWorks = "";
|
|
|
|
-
|
|
|
|
- if (reserveProjectName != null && !"".equals(reserveProjectName)) {
|
|
|
|
- //获取项目的施工技术交底中土建工程量
|
|
|
|
- List<EngineeringAmount> civilWorks = nonPowerService.findCivilWorks(reserveProjectName);
|
|
|
|
- if (civilWorks != null) {
|
|
|
|
- for (EngineeringAmount e : civilWorks) {
|
|
|
|
- constructionCivilWorks += e.getCivilWorks() + e.getCivilMaterials() + e.getCivilUnit() + ",";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
data.put("projectName", projectName);
|
|
data.put("projectName", projectName);
|
|
data.put("projectNumber",projectNumber );
|
|
data.put("projectNumber",projectNumber );
|
|
@@ -321,7 +321,6 @@ public class NonPowerController extends BaseController {
|
|
data.put("plannedEnd", plannedEnd);
|
|
data.put("plannedEnd", plannedEnd);
|
|
data.put("lineName",lineName );
|
|
data.put("lineName",lineName );
|
|
data.put("workPlace", workPlace);
|
|
data.put("workPlace", workPlace);
|
|
- data.put("constructionCivilWorks", constructionCivilWorks);
|
|
|
|
data.put("civilStartReport",civilStartReport );
|
|
data.put("civilStartReport",civilStartReport );
|
|
data.put("dateYear", dateYear);
|
|
data.put("dateYear", dateYear);
|
|
|
|
|
|
@@ -339,7 +338,6 @@ public class NonPowerController extends BaseController {
|
|
@RequestMapping(value = "civilEnd")
|
|
@RequestMapping(value = "civilEnd")
|
|
public AjaxJson exportCivilEnd(NonPower nonPower, HttpServletRequest request, HttpServletResponse response){
|
|
public AjaxJson exportCivilEnd(NonPower nonPower, HttpServletRequest request, HttpServletResponse response){
|
|
AjaxJson j = new AjaxJson();
|
|
AjaxJson j = new AjaxJson();
|
|
- StringBuilder stringBuilder = new StringBuilder();
|
|
|
|
Template template = null;
|
|
Template template = null;
|
|
File path = new File(this.getClass().getResource("/").getPath() + "/freemarker");
|
|
File path = new File(this.getClass().getResource("/").getPath() + "/freemarker");
|
|
Configuration cfg = new Configuration();
|
|
Configuration cfg = new Configuration();
|
|
@@ -348,12 +346,12 @@ public class NonPowerController extends BaseController {
|
|
//配置cfg对象
|
|
//配置cfg对象
|
|
cfg.setDirectoryForTemplateLoading(path);
|
|
cfg.setDirectoryForTemplateLoading(path);
|
|
// 根据模板名称获取Template对象
|
|
// 根据模板名称获取Template对象
|
|
- template = cfg.getTemplate("civilStart.ftl");
|
|
|
|
|
|
+ template = cfg.getTemplate("civilEnd.ftl");
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
Map<String, Object> data = new HashMap<>();
|
|
Map<String, Object> data = new HashMap<>();
|
|
- NonPower nonPower1 = nonPowerService.getByProcInsId(nonPower.getProcInsId());
|
|
|
|
|
|
+ NonPower nonPower1 = nonPowerService.getById(nonPower.getId());
|
|
String projectId = nonPower1.getProjectId();
|
|
String projectId = nonPower1.getProjectId();
|
|
String projectName = nonPower1.getProjectName();
|
|
String projectName = nonPower1.getProjectName();
|
|
String reserveProjectName = nonPower1.getReserveProjectName();
|
|
String reserveProjectName = nonPower1.getReserveProjectName();
|
|
@@ -361,8 +359,8 @@ public class NonPowerController extends BaseController {
|
|
String buildingUnit = nonPower1.getBuildingUnit();
|
|
String buildingUnit = nonPower1.getBuildingUnit();
|
|
String projectNumber = nonPower1.getProjectNumber();
|
|
String projectNumber = nonPower1.getProjectNumber();
|
|
String constructionUnit = nonPower1.getConstructionUnit();
|
|
String constructionUnit = nonPower1.getConstructionUnit();
|
|
- String plannedStart = nonPower1.getPlannedStart();
|
|
|
|
- String plannedEnd = nonPower1.getPlannedEnd();
|
|
|
|
|
|
+ String plannedStart = nonPower1.getActualStart();
|
|
|
|
+ String plannedEnd = nonPower1.getActualEnd();
|
|
String projectManager = nonPower1.getProjectManager();
|
|
String projectManager = nonPower1.getProjectManager();
|
|
String lineName = nonPower1.getLineName();
|
|
String lineName = nonPower1.getLineName();
|
|
String personInCharge = nonPower1.getPersonInCharge();
|
|
String personInCharge = nonPower1.getPersonInCharge();
|
|
@@ -373,16 +371,6 @@ public class NonPowerController extends BaseController {
|
|
DateFormat df = new SimpleDateFormat("yyyy年MM月dd日");
|
|
DateFormat df = new SimpleDateFormat("yyyy年MM月dd日");
|
|
String dateYear = df.format(createDate);
|
|
String dateYear = df.format(createDate);
|
|
|
|
|
|
- String constructionCivilWorks = "";
|
|
|
|
- if (reserveProjectName != null && !"".equals(reserveProjectName)) {
|
|
|
|
- //获取项目的施工技术交底中土建工程量
|
|
|
|
- List<EngineeringAmount> civilWorks = nonPowerService.findCivilWorks(reserveProjectName);
|
|
|
|
- if (civilWorks != null) {
|
|
|
|
- for (EngineeringAmount e : civilWorks) {
|
|
|
|
- constructionCivilWorks += e.getCivilWorks() + e.getCivilMaterials() + e.getCivilUnit() + ",";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
data.put("projectName", projectName);
|
|
data.put("projectName", projectName);
|
|
data.put("projectNumber",projectNumber );
|
|
data.put("projectNumber",projectNumber );
|
|
@@ -394,8 +382,6 @@ public class NonPowerController extends BaseController {
|
|
data.put("plannedEnd", plannedEnd);
|
|
data.put("plannedEnd", plannedEnd);
|
|
data.put("lineName",lineName );
|
|
data.put("lineName",lineName );
|
|
data.put("workPlace", workPlace);
|
|
data.put("workPlace", workPlace);
|
|
- data.put("constructionCivilWorks", constructionCivilWorks);
|
|
|
|
- data.put("civilStartReport",civilStartReport);
|
|
|
|
data.put("civilEndReport",civilEndReport);
|
|
data.put("civilEndReport",civilEndReport);
|
|
data.put("dateYear", dateYear);
|
|
data.put("dateYear", dateYear);
|
|
|
|
|