|
@@ -75,6 +75,8 @@ public class PickIngController extends BaseController {
|
|
|
@RequestMapping(value = "constructionLeader")
|
|
|
public String constructionLeader(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
+ ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
+ model.addAttribute("projectNumber",projectNumber);
|
|
|
return "modules/sg/picking/activiti/constructionLeader";
|
|
|
}
|
|
|
|
|
@@ -84,6 +86,8 @@ public class PickIngController extends BaseController {
|
|
|
@RequestMapping(value = "managerAudit")
|
|
|
public String managerAudit(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
+ ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
+ model.addAttribute("projectNumber",projectNumber);
|
|
|
return "modules/sg/picking/activiti/managerAudit";
|
|
|
}
|
|
|
|
|
@@ -93,6 +97,8 @@ public class PickIngController extends BaseController {
|
|
|
@RequestMapping(value = "netExamine")
|
|
|
public String netExamine(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
+ ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
+ model.addAttribute("projectNumber",projectNumber);
|
|
|
return "modules/sg/picking/activiti/netExamine";
|
|
|
}
|
|
|
|
|
@@ -102,6 +108,8 @@ public class PickIngController extends BaseController {
|
|
|
@RequestMapping(value = "fullExamine")
|
|
|
public String fullExamine(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
+ ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
+ model.addAttribute("projectNumber",projectNumber);
|
|
|
return "modules/sg/picking/activiti/fullExamine";
|
|
|
}
|
|
|
|
|
@@ -111,6 +119,8 @@ public class PickIngController extends BaseController {
|
|
|
@RequestMapping(value = "leaderExamine")
|
|
|
public String leaderExamine(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
+ ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
+ model.addAttribute("projectNumber",projectNumber);
|
|
|
return "modules/sg/picking/activiti/leaderExamine";
|
|
|
}
|
|
|
|
|
@@ -172,6 +182,16 @@ public class PickIngController extends BaseController {
|
|
|
return "modules/sg/picking/activiti/applicationAudit";
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 库存对比
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "inventoryComparison")
|
|
|
+ @RequiresPermissions("picking:activiti:inventoryComparison")
|
|
|
+ public String inventoryComparison(ShowList showList, Model model) {
|
|
|
+ model.addAttribute("showList", showList);
|
|
|
+ return "modules/sg/picking/activiti/inventoryComparison";
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// manager
|
|
|
@ResponseBody
|
|
@@ -224,6 +244,47 @@ public class PickIngController extends BaseController {
|
|
|
return getBootstrapData(page);
|
|
|
}
|
|
|
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "inventoryComparisonData")
|
|
|
+ public Map<String, Object> inventoryComparisonData(ShowList showList, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
|
+
|
|
|
+ //先查出所有在物资专职的节点的信息
|
|
|
+ List<String> activity = MyActiviUtils.findMdActivity("领料:配网物资专职审核领料单");
|
|
|
+ Page<ShowList> page = showListService.inventoryComparisonData(new Page<ShowList>(request, response),showList, activity);
|
|
|
+ List<ShowList> list = page.getList();
|
|
|
+ //相同的物料信息相加
|
|
|
+ HashMap<String, ShowList> tempMap = new HashMap<String, ShowList>();
|
|
|
+ for (ShowList show : list) {
|
|
|
+ String materialCode = show.getMaterialCode() + "|" + show.getExtensionDescription() + "|" + show.getExtensionDescription();
|
|
|
+ if (tempMap.containsKey(materialCode)) {
|
|
|
+ ShowList needShow = new ShowList();
|
|
|
+ tempMap.get(materialCode).setMdTotalAmount(tempMap.get(materialCode).getMdTotalAmount() + show.getMdTotalAmount());
|
|
|
+ } else {
|
|
|
+ tempMap.put(materialCode, show);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //合并后的list
|
|
|
+ List<ShowList> newShowList = new ArrayList<>();
|
|
|
+ Iterator<Map.Entry<String, ShowList>> iterator = tempMap.entrySet().iterator();
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ Map.Entry<String, ShowList> next = iterator.next();
|
|
|
+ ShowList newShow = next.getValue();
|
|
|
+ newShowList.add(newShow);
|
|
|
+ }
|
|
|
+ List<MaterialInventory> materialInventoryList = showListService.inventoryQuery(newShowList);
|
|
|
+
|
|
|
+ for (ShowList show : newShowList) {
|
|
|
+ //可用库存/
|
|
|
+ for (MaterialInventory ava : materialInventoryList) {
|
|
|
+ if (show.getMaterialCode().equals(ava.getMaterialCode()) && show.getMaterialDescription().equals(ava.getMaterialDetail())) {
|
|
|
+ show.setAvailableStockQuantity(ava.getAvailableStockQuantity());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ page.setList(newShowList);
|
|
|
+ return getBootstrapData(page);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 领料流程发起
|
|
|
*/
|