|
@@ -58,75 +58,101 @@ public class MaterialModuleController extends BaseController {
|
|
|
return "modules/sg/materialmodule/activiti/materialModuleForm";
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-/*
|
|
|
- @ResponseBody
|
|
|
- @RequestMapping(value = "data")
|
|
|
- public Map<String, Object> data(PickIng pickIng, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
|
- Page<PickIng> page = pickIngService.findPage(new Page<PickIng>(request, response), pickIng);
|
|
|
- return getBootstrapData(page);
|
|
|
+ /**
|
|
|
+ * 非涉电开工流程
|
|
|
+ */
|
|
|
+ @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());
|
|
|
+ model.addAttribute("materialShow", materialShow);
|
|
|
+ model.addAttribute("materialModule", materialModule);
|
|
|
+ return "modules/sg/materialmodule/activiti/nonPowerMiddle";
|
|
|
+ }
|
|
|
|
|
|
- */
|
|
|
-/**
|
|
|
- * 项目经理审核
|
|
|
- * 政策处理专职发起项目,交与项目经理审核页面
|
|
|
- *//*
|
|
|
-
|
|
|
- @RequestMapping(value = "applicationAudit")
|
|
|
- public String applicationAudit(PickApplication pickApplication, Model model) {
|
|
|
- String id = pickApplication.getId();
|
|
|
- String projectId = showListService.selectProjectId(id);
|
|
|
- Project project = projectService.get(projectId);
|
|
|
- model.addAttribute("pickApplication", pickApplication);
|
|
|
- model.addAttribute("project", project);
|
|
|
- return "modules/sg/picking/activiti/applicationAudit";
|
|
|
+ /**
|
|
|
+ * 非涉电竣工流程
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "nonPowerEnd")
|
|
|
+ public String nonPowerEnd(MaterialModule materialModule, Model model) {
|
|
|
+ MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
|
|
|
+ model.addAttribute("materialShow", materialShow);
|
|
|
+ model.addAttribute("materialModule", materialModule);
|
|
|
+ return "modules/sg/materialmodule/activiti/nonPowerEnd";
|
|
|
}
|
|
|
|
|
|
- */
|
|
|
-/**
|
|
|
- * 库存对比
|
|
|
- *//*
|
|
|
+ /**
|
|
|
+ * 是否完成非涉电工作
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "nonPowerWhether")
|
|
|
+ public String nonPowerWhether(MaterialModule materialModule, Model model) {
|
|
|
+ MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
|
|
|
+ model.addAttribute("materialShow", materialShow);
|
|
|
+ model.addAttribute("materialModule", materialModule);
|
|
|
+ return "modules/sg/materialmodule/activiti/nonPowerWhether";
|
|
|
+ }
|
|
|
|
|
|
- @RequestMapping(value = "inventoryComparison")
|
|
|
- @RequiresPermissions("picking:activiti:inventoryComparison")
|
|
|
- public String inventoryComparison(ShowList showList, Model model) {
|
|
|
- model.addAttribute("showList", showList);
|
|
|
- return "modules/sg/picking/activiti/inventoryComparison";
|
|
|
+ /**
|
|
|
+ * 涉电开工流程
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "PowerStart")
|
|
|
+ public String PowerStart(MaterialModule materialModule, Model model) {
|
|
|
+ MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
|
|
|
+ model.addAttribute("materialShow", materialShow);
|
|
|
+ model.addAttribute("materialModule", materialModule);
|
|
|
+ return "modules/sg/materialmodule/activiti/PowerStart";
|
|
|
}
|
|
|
|
|
|
- */
|
|
|
-/**
|
|
|
- * 导出erp领料单
|
|
|
- *//*
|
|
|
+ /**
|
|
|
+ * 涉电竣工流程
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "PowerEnd")
|
|
|
+ public String PowerEnd(MaterialModule materialModule, Model model) {
|
|
|
+ MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
|
|
|
+ model.addAttribute("materialShow", materialShow);
|
|
|
+ model.addAttribute("materialModule", materialModule);
|
|
|
+ return "modules/sg/materialmodule/activiti/PowerEnd";
|
|
|
+ }
|
|
|
|
|
|
- @RequiresPermissions("picking:activiti:exportErp")
|
|
|
- @RequestMapping(value = "exportErp")
|
|
|
- public String exportErp(Acquisition acquisition, Model model) {
|
|
|
- model.addAttribute("acquisition", acquisition);
|
|
|
- return "modules/sg/picking/activiti/exportErp";
|
|
|
+ /**
|
|
|
+ * 是否完成所有涉电工作
|
|
|
+ */
|
|
|
+ @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";
|
|
|
}
|
|
|
|
|
|
- @ResponseBody
|
|
|
- @RequestMapping(value = "exportData")
|
|
|
- public Map<String, Object> exportData(Acquisition acquisition, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
|
- Page<Acquisition> page = showListService.acquisitionList(new Page<Acquisition>(request, response), acquisition);
|
|
|
- List<Acquisition> list = page.getList();
|
|
|
- for (Acquisition a :list) {
|
|
|
- a.setTheNumber("第"+a.getTheNumber()+"次领料单");
|
|
|
- }
|
|
|
- return getBootstrapData(page);
|
|
|
+ /**
|
|
|
+ * 施工单位项目经理判断项目是否包含涉电工作
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "managerWhether")
|
|
|
+ public String managerWhether(MaterialModule materialModule, Model model) {
|
|
|
+ MaterialModule materialShow = materialModuleService.get(materialModule.getAct().getProcInsId());
|
|
|
+ model.addAttribute("materialShow", materialShow);
|
|
|
+ model.addAttribute("materialModule", materialModule);
|
|
|
+ return "modules/sg/materialmodule/activiti/managerWhether";
|
|
|
}
|
|
|
-*/
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 施工流程发起
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "containSave")
|
|
|
- public AjaxJson save(MaterialModule materialModule, Model model) throws Exception {
|
|
|
+ public AjaxJson save(MaterialModule materialModule, Model model,String procDefId,String flag) throws Exception {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
/**
|
|
|
* 后台hibernate-validation插件校验
|
|
@@ -149,11 +175,12 @@ public class MaterialModuleController extends BaseController {
|
|
|
if (StringUtils.isBlank(materialModule.getId())) {
|
|
|
//保存
|
|
|
//修改项目的施工模块状态
|
|
|
+ materialModule.setUserName(UserUtils.getUser().getLoginName());
|
|
|
materialModuleService.save(materialModule);
|
|
|
// 启动流程
|
|
|
Map<String, Object> vars = Maps.newHashMap();
|
|
|
- vars.put("manager", UserUtils.getUser().getLoginName());
|
|
|
- String flag = materialModule.getAct().getFlag();
|
|
|
+ Project userById = MyActiviUtils.findUserById(projectId);
|
|
|
+ vars.put("manager", userById.getConstructionUnitManage());
|
|
|
if ("contain".equals(flag)) {
|
|
|
vars.put("contain", true);
|
|
|
vars.put("notContain", false);
|
|
@@ -167,7 +194,7 @@ public class MaterialModuleController extends BaseController {
|
|
|
vars.put("notContain", false);
|
|
|
vars.put("no", true);
|
|
|
}
|
|
|
- ProcessDefinition p = actProcessService.getProcessDefinition(materialModule.getAct().getProcDefId());
|
|
|
+ ProcessDefinition p = actProcessService.getProcessDefinition(procDefId);
|
|
|
String title = materialModule.getCurrentUser().getName() + "在" + DateUtils.getDateTime() + "发起" + p.getName();
|
|
|
actTaskService.startProcess(p.getKey(), "sg_construction_process", materialModule.getId(), title, vars);
|
|
|
j.setMsg("发起施工流程成功!");
|