|
@@ -10,6 +10,8 @@ import com.jeeplus.modules.act.service.ActProcessService;
|
|
|
import com.jeeplus.modules.act.service.ActTaskService;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.service.ConstructionService;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.utils.MyActiviUtils;
|
|
|
+import com.jeeplus.modules.sg.managementcenter.materialProvided.entity.MaterialProvided;
|
|
|
+import com.jeeplus.modules.sg.managementcenter.materialProvided.service.MaterialProvidedService;
|
|
|
import com.jeeplus.modules.sg.managementcenter.project.entity.Project;
|
|
|
import com.jeeplus.modules.sg.managementcenter.project.service.ProjectService;
|
|
|
import com.jeeplus.modules.sg.picking.activiti.entity.*;
|
|
@@ -47,6 +49,8 @@ public class PickIngController extends BaseController {
|
|
|
private ConstructionService constructionService;
|
|
|
@Autowired
|
|
|
private ProjectService projectService;
|
|
|
+ @Autowired
|
|
|
+ private MaterialProvidedService materialProvidedService;
|
|
|
|
|
|
/**
|
|
|
* 填写项目表
|
|
@@ -109,6 +113,15 @@ public class PickIngController extends BaseController {
|
|
|
return "modules/sg/picking/activiti/leaderExamine";
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新增物料
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "netExamineUpload")
|
|
|
+ public String netExamineUpload(ShowList showList, Model model) {
|
|
|
+ model.addAttribute("showList", showList);
|
|
|
+ return "modules/sg/picking/activiti/netExamineUpload";
|
|
|
+ }
|
|
|
+
|
|
|
// constructionLeaderForm.jsp
|
|
|
|
|
|
/**
|
|
@@ -268,7 +281,7 @@ public class PickIngController extends BaseController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 领料流程发起
|
|
|
+ * 修改领料清单总量,自动计算总重
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "mdTotalAmount")
|
|
@@ -277,6 +290,7 @@ public class PickIngController extends BaseController {
|
|
|
//获取新的数量
|
|
|
Double aDouble = Double.valueOf(mdTotalAmount);
|
|
|
showList.setMdTotalAmount(aDouble);
|
|
|
+ //根据id查询领料清单中的需要修改的那条信息
|
|
|
ShowList oneList = showListService.findOneList(showList);
|
|
|
//获取单重
|
|
|
Double mdSingleWeight = oneList.getMdSingleWeight();
|
|
@@ -303,5 +317,52 @@ public class PickIngController extends BaseController {
|
|
|
j.setMsg("删除成功!");
|
|
|
return j;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加甲供物资信息到流程中
|
|
|
+ */
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "netSave")
|
|
|
+ public AjaxJson netSave(String project,Double mdTotalAmount,String procInsId) {
|
|
|
+ AjaxJson j = new AjaxJson();
|
|
|
+ try {
|
|
|
+ ShowList showList = new ShowList();
|
|
|
+ //根据id查询甲供物资的信息
|
|
|
+ MaterialProvided materialProvided = materialProvidedService.get(project);
|
|
|
+ //设置id
|
|
|
+ showList.preInsert();
|
|
|
+ //物料编码
|
|
|
+ showList.setMaterialCode(materialProvided.getMaterialCode());
|
|
|
+ //流程实例编号
|
|
|
+ showList.setProcInsId(procInsId);
|
|
|
+ //物料描述
|
|
|
+ showList.setMaterialDescription(materialProvided.getMaterialDescription());
|
|
|
+ //扩展描述
|
|
|
+ showList.setExtensionDescription(materialProvided.getExtendedDescription());
|
|
|
+ //单位
|
|
|
+ showList.setMdUnits(materialProvided.getMeasuringUnit());
|
|
|
+ //总量
|
|
|
+ showList.setMdTotalAmount(mdTotalAmount);
|
|
|
+ //单重
|
|
|
+ showList.setMdSingleWeight(0.0);
|
|
|
+ //总重
|
|
|
+ showList.setMdTotalWeight(0.0);
|
|
|
+ //甲乙供
|
|
|
+ showList.setMdTheParty("");
|
|
|
+ //备注
|
|
|
+ showList.setMdText("");
|
|
|
+
|
|
|
+ List<ShowList> insertList = new ArrayList<>();
|
|
|
+ insertList.add(showList);
|
|
|
+ //将信息和数量存入对应表
|
|
|
+ pickIngService.processList(insertList);
|
|
|
+ j.setMsg("添加成功!");
|
|
|
+ } catch (Exception e) {
|
|
|
+ j.setSuccess(false);
|
|
|
+ j.setMsg("添加失败");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return j;
|
|
|
+ }
|
|
|
}
|
|
|
|