|
@@ -1,6 +1,7 @@
|
|
|
package com.jeeplus.modules.sg.picking.activiti.web;
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
+import com.jeeplus.common.config.Global;
|
|
|
import com.jeeplus.common.json.AjaxJson;
|
|
|
import com.jeeplus.common.utils.DateUtils;
|
|
|
import com.jeeplus.common.utils.StringUtils;
|
|
@@ -16,6 +17,7 @@ import com.jeeplus.modules.sg.audit.information.entity.OutInformation;
|
|
|
import com.jeeplus.modules.sg.audit.material.entity.Material;
|
|
|
import com.jeeplus.modules.sg.financial.erpcredit.util.ExportUtil;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.entity.FindTask;
|
|
|
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.UploadImages;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.service.ConstructionService;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.utils.MyActiviUtils;
|
|
|
import com.jeeplus.modules.sg.managementcenter.materialInventory.entity.MaterialInventory;
|
|
@@ -73,9 +75,9 @@ public class PickIngController extends BaseController {
|
|
|
String s = pickIngService.selectVersion(procInsId);
|
|
|
ProjectNumber projectNumber = pickIngService.projectNumber(procInsId);
|
|
|
PickIng pickIng = new PickIng();
|
|
|
- List<PickList> pickListList = pickIngService.newAllList(pickIng,s);
|
|
|
- model.addAttribute("showList",showList);
|
|
|
- model.addAttribute("projectNumber",projectNumber);
|
|
|
+ List<PickList> pickListList = pickIngService.newAllList(pickIng, s);
|
|
|
+ model.addAttribute("showList", showList);
|
|
|
+ model.addAttribute("projectNumber", projectNumber);
|
|
|
model.addAttribute("pickListList", pickListList);
|
|
|
return "modules/sg/picking/activiti/pickIng";
|
|
|
}
|
|
@@ -87,7 +89,7 @@ public class PickIngController extends BaseController {
|
|
|
public String constructionLeader(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
- model.addAttribute("projectNumber",projectNumber);
|
|
|
+ model.addAttribute("projectNumber", projectNumber);
|
|
|
return "modules/sg/picking/activiti/constructionLeader";
|
|
|
}
|
|
|
|
|
@@ -98,7 +100,7 @@ public class PickIngController extends BaseController {
|
|
|
public String managerAudit(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
- model.addAttribute("projectNumber",projectNumber);
|
|
|
+ model.addAttribute("projectNumber", projectNumber);
|
|
|
return "modules/sg/picking/activiti/managerAudit";
|
|
|
}
|
|
|
|
|
@@ -109,7 +111,7 @@ public class PickIngController extends BaseController {
|
|
|
public String netExamine(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
- model.addAttribute("projectNumber",projectNumber);
|
|
|
+ model.addAttribute("projectNumber", projectNumber);
|
|
|
return "modules/sg/picking/activiti/netExamine";
|
|
|
}
|
|
|
|
|
@@ -120,7 +122,7 @@ public class PickIngController extends BaseController {
|
|
|
public String fullExamine(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
- model.addAttribute("projectNumber",projectNumber);
|
|
|
+ model.addAttribute("projectNumber", projectNumber);
|
|
|
return "modules/sg/picking/activiti/fullExamine";
|
|
|
}
|
|
|
|
|
@@ -131,7 +133,7 @@ public class PickIngController extends BaseController {
|
|
|
public String leaderExamine(ShowList showList, Model model) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
- model.addAttribute("projectNumber",projectNumber);
|
|
|
+ model.addAttribute("projectNumber", projectNumber);
|
|
|
return "modules/sg/picking/activiti/leaderExamine";
|
|
|
}
|
|
|
|
|
@@ -216,6 +218,25 @@ public class PickIngController extends BaseController {
|
|
|
@RequestMapping(value = "pickPicData")
|
|
|
public Map<String, Object> pickPicData(PickIng pickIng, HttpServletRequest request, HttpServletResponse response, Model model) {
|
|
|
Page<PickIng> page = showListService.findNewImgPage(new Page<PickIng>(request, response), pickIng);
|
|
|
+ //当判定系统为linux的时候
|
|
|
+ if (Global.SYS_TYPE.equals("2")) {
|
|
|
+ List<PickIng> list = page.getList();
|
|
|
+ for (PickIng upload :
|
|
|
+ list) {
|
|
|
+ String mdImg = upload.getMdImg();
|
|
|
+ String newMdImg = "";
|
|
|
+ String[] split = mdImg.split("\\|");
|
|
|
+// String reg = "(?i).+?\\.(jpg|gif|bmp)";
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
+/* if (split[i].matches(reg)) {
|
|
|
+ newMdImg += split[i] + "|";
|
|
|
+ continue;
|
|
|
+ }*/
|
|
|
+ newMdImg += "http://" + request.getServerName() + split[i] + "|";
|
|
|
+ }
|
|
|
+ upload.setMdImg(newMdImg);
|
|
|
+ }
|
|
|
+ }
|
|
|
return getBootstrapData(page);
|
|
|
}
|
|
|
|
|
@@ -244,8 +265,8 @@ public class PickIngController extends BaseController {
|
|
|
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()+"次领料单");
|
|
|
+ for (Acquisition a : list) {
|
|
|
+ a.setTheNumber("第" + a.getTheNumber() + "次领料单");
|
|
|
}
|
|
|
return getBootstrapData(page);
|
|
|
}
|
|
@@ -260,44 +281,44 @@ public class PickIngController extends BaseController {
|
|
|
List<MaterialInventory> materialInventoryList = showListService.inventoryQuery(list);
|
|
|
//查询在当前节点的所有流程实例编号
|
|
|
List<String> activity = MyActiviUtils.findMdActivity("领料:配网物资专职审核领料单");
|
|
|
- if (activity!=null&&activity.size()>0) {
|
|
|
- //根据编号查询到所有的物料信息
|
|
|
- List<ShowList> showLists = showListService.processListQuery(activity);
|
|
|
- //相同的物料信息相加
|
|
|
- HashMap<String, ShowList> tempMap = new HashMap<String, ShowList>();
|
|
|
- for (ShowList show : showLists) {
|
|
|
- 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);
|
|
|
- }
|
|
|
- //返回定义物料编码的数据
|
|
|
- for (ShowList show : list) {
|
|
|
- //可用库存/
|
|
|
- for (MaterialInventory ava : materialInventoryList) {
|
|
|
- if (show.getMaterialCode().equals(ava.getMaterialCode()) && show.getMaterialDescription().equals(ava.getMaterialDetail())) {
|
|
|
- show.setAvailableStockQuantity(ava.getAvailableStockQuantity());
|
|
|
+ if (activity != null && activity.size() > 0) {
|
|
|
+ //根据编号查询到所有的物料信息
|
|
|
+ List<ShowList> showLists = showListService.processListQuery(activity);
|
|
|
+ //相同的物料信息相加
|
|
|
+ HashMap<String, ShowList> tempMap = new HashMap<String, ShowList>();
|
|
|
+ for (ShowList show : showLists) {
|
|
|
+ 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);
|
|
|
}
|
|
|
}
|
|
|
- //当前节点的使用库存
|
|
|
- for (ShowList newShow : newShowList) {
|
|
|
- if (show.getMaterialCode().equals(newShow.getMaterialCode()) && show.getExtensionDescription().equals(newShow.getExtensionDescription()) && show.getMaterialDescription().equals(newShow.getMaterialDescription())) {
|
|
|
- show.setNowNumber(newShow.getMdTotalAmount());
|
|
|
+ //合并后的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);
|
|
|
+ }
|
|
|
+ //返回定义物料编码的数据
|
|
|
+ for (ShowList show : list) {
|
|
|
+ //可用库存/
|
|
|
+ for (MaterialInventory ava : materialInventoryList) {
|
|
|
+ if (show.getMaterialCode().equals(ava.getMaterialCode()) && show.getMaterialDescription().equals(ava.getMaterialDetail())) {
|
|
|
+ show.setAvailableStockQuantity(ava.getAvailableStockQuantity());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //当前节点的使用库存
|
|
|
+ for (ShowList newShow : newShowList) {
|
|
|
+ if (show.getMaterialCode().equals(newShow.getMaterialCode()) && show.getExtensionDescription().equals(newShow.getExtensionDescription()) && show.getMaterialDescription().equals(newShow.getMaterialDescription())) {
|
|
|
+ show.setNowNumber(newShow.getMdTotalAmount());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
Collections.sort(list);
|
|
|
return getBootstrapData(page);
|
|
|
}
|
|
@@ -315,7 +336,7 @@ public class PickIngController extends BaseController {
|
|
|
|
|
|
//先查出所有在物资专职的节点的信息
|
|
|
List<String> activity = MyActiviUtils.findMdActivity("领料:配网物资专职审核领料单");
|
|
|
- Page<ShowList> page = showListService.inventoryComparisonData(new Page<ShowList>(request, response),showList, activity);
|
|
|
+ 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>();
|
|
@@ -367,7 +388,7 @@ public class PickIngController extends BaseController {
|
|
|
return j;
|
|
|
}
|
|
|
String projectId = showList.getProjectId();
|
|
|
- if (projectId == null||"".equals(projectId)) {
|
|
|
+ if (projectId == null || "".equals(projectId)) {
|
|
|
j.setSuccess(false);
|
|
|
j.setMsg("请选择项目");
|
|
|
return j;
|
|
@@ -410,7 +431,7 @@ public class PickIngController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 领料申请流程发起
|
|
|
- * */
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "pickSave")
|
|
|
public AjaxJson pickSave(PickApplication pickApplication, Model model) throws Exception {
|
|
@@ -425,7 +446,7 @@ public class PickIngController extends BaseController {
|
|
|
return j;
|
|
|
}
|
|
|
String projectId = pickApplication.getProjectId();
|
|
|
- if (projectId == null||"".equals(projectId)) {
|
|
|
+ if (projectId == null || "".equals(projectId)) {
|
|
|
j.setSuccess(false);
|
|
|
j.setMsg("请选择项目");
|
|
|
return j;
|
|
@@ -445,7 +466,7 @@ public class PickIngController extends BaseController {
|
|
|
Project user = MyActiviUtils.findUser(pickApplication.getAct().getProcInsId());
|
|
|
vars.put("manager", UserUtils.getByUserName(user.getProjectManageRole()).getLoginName());
|
|
|
j.setMsg("发起流程审批成功!");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
showListService.projectUpdate(pickApplication);
|
|
|
vars.put("noFull", true);
|
|
|
j.setMsg("项目可发起领料流程!");
|
|
@@ -462,7 +483,7 @@ public class PickIngController extends BaseController {
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "mdTotalAmount")
|
|
|
- public AjaxJson mdTotalAmount(ShowList showList, String mdTotalAmount,Model model) throws Exception {
|
|
|
+ public AjaxJson mdTotalAmount(ShowList showList, String mdTotalAmount, Model model) throws Exception {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
//获取新的数量
|
|
|
Double aDouble = Double.valueOf(mdTotalAmount);
|
|
@@ -473,7 +494,7 @@ public class PickIngController extends BaseController {
|
|
|
Double mdSingleWeight = oneList.getMdSingleWeight();
|
|
|
BigDecimal b1 = new BigDecimal(aDouble);
|
|
|
BigDecimal b2 = new BigDecimal(mdSingleWeight);
|
|
|
- double v = b1.multiply(b2).doubleValue();
|
|
|
+ double v = b1.multiply(b2).doubleValue();
|
|
|
showList.setMdTotalWeight(v);
|
|
|
showListService.updateAmount(showList);
|
|
|
j.setMsg("成功");
|
|
@@ -485,7 +506,7 @@ public class PickIngController extends BaseController {
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "mdTotalTemAmount")
|
|
|
- public AjaxJson mdTotalTemAmount(ShowList showList, String mdTotalAmount,Model model) throws Exception {
|
|
|
+ public AjaxJson mdTotalTemAmount(ShowList showList, String mdTotalAmount, Model model) throws Exception {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
//获取新的数量
|
|
|
Double aDouble = Double.valueOf(mdTotalAmount);
|
|
@@ -496,7 +517,7 @@ public class PickIngController extends BaseController {
|
|
|
Double mdSingleWeight = oneList.getMdSingleWeight();
|
|
|
BigDecimal b1 = new BigDecimal(aDouble);
|
|
|
BigDecimal b2 = new BigDecimal(mdSingleWeight);
|
|
|
- double v = b1.multiply(b2).doubleValue();
|
|
|
+ double v = b1.multiply(b2).doubleValue();
|
|
|
showList.setMdTotalWeight(v);
|
|
|
showListService.updateTemAmount(showList);
|
|
|
j.setMsg("成功");
|
|
@@ -507,10 +528,10 @@ public class PickIngController extends BaseController {
|
|
|
* 施工项目经理审定领料清单
|
|
|
*/
|
|
|
@RequestMapping(value = "managerExam")
|
|
|
- public String managerExam(ShowList showList, Model model,Act act) {
|
|
|
+ public String managerExam(ShowList showList, Model model, Act act) {
|
|
|
model.addAttribute("showList", showList);
|
|
|
ProjectNumber projectNumber = pickIngService.projectNumber(showList.getProcInsId());
|
|
|
- model.addAttribute("projectNumber",projectNumber);
|
|
|
+ model.addAttribute("projectNumber", projectNumber);
|
|
|
model.addAttribute("act", act);
|
|
|
return "modules/sg/picking/activiti/managerExam";
|
|
|
}
|
|
@@ -522,8 +543,8 @@ public class PickIngController extends BaseController {
|
|
|
@RequestMapping(value = "deleteAll")
|
|
|
public AjaxJson deleteAll(String ids) {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
- String idArray[] =ids.split(",");
|
|
|
- for(String id : idArray){
|
|
|
+ String idArray[] = ids.split(",");
|
|
|
+ for (String id : idArray) {
|
|
|
showListService.deleteData(id);
|
|
|
}
|
|
|
j.setMsg("删除成功!");
|
|
@@ -537,8 +558,8 @@ public class PickIngController extends BaseController {
|
|
|
@RequestMapping(value = "deleteAllTem")
|
|
|
public AjaxJson deleteAllTem(String ids) {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
- String idArray[] =ids.split(",");
|
|
|
- for(String id : idArray){
|
|
|
+ String idArray[] = ids.split(",");
|
|
|
+ for (String id : idArray) {
|
|
|
showListService.deleteTemData(id);
|
|
|
}
|
|
|
j.setMsg("删除成功!");
|
|
@@ -550,7 +571,7 @@ public class PickIngController extends BaseController {
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "netSave")
|
|
|
- public AjaxJson netSave(String project,Double mdTotalAmount,String procInsId) {
|
|
|
+ public AjaxJson netSave(String project, Double mdTotalAmount, String procInsId) {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
try {
|
|
|
ShowList showList = new ShowList();
|
|
@@ -597,7 +618,7 @@ public class PickIngController extends BaseController {
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "netTemSave")
|
|
|
- public AjaxJson netTemSave(String project,Double mdTotalAmount,String procInsId) {
|
|
|
+ public AjaxJson netTemSave(String project, Double mdTotalAmount, String procInsId) {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
try {
|
|
|
ShowList showList = new ShowList();
|
|
@@ -626,7 +647,7 @@ public class PickIngController extends BaseController {
|
|
|
//备注
|
|
|
showList.setMdText("");
|
|
|
|
|
|
- List<ShowList> insertList = new ArrayList<>();
|
|
|
+ List<ShowList> insertList = new ArrayList<>();
|
|
|
insertList.add(showList);
|
|
|
//将信息和数量存入对应表
|
|
|
pickIngService.processTemList(insertList);
|
|
@@ -641,13 +662,13 @@ public class PickIngController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 成本
|
|
|
- * */
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "exportErpData")
|
|
|
- public AjaxJson exportErpData(String id,String projectId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ public AjaxJson exportErpData(String id, String projectId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
try {
|
|
|
- projectId = URLDecoder.decode(projectId,"UTF-8");
|
|
|
+ projectId = URLDecoder.decode(projectId, "UTF-8");
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -665,22 +686,30 @@ public class PickIngController extends BaseController {
|
|
|
//成本项目列表
|
|
|
List<Acquisition> cbList = new ArrayList<>();
|
|
|
//循环数据,根据类型分组
|
|
|
- for (Acquisition acquisition:erpType) {
|
|
|
+ for (Acquisition acquisition : erpType) {
|
|
|
String itemType = acquisition.getProType();
|
|
|
if ("配网成本".equals(itemType)) {
|
|
|
cbList.add(acquisition);
|
|
|
}
|
|
|
}
|
|
|
- if (cbList.size()>0) {
|
|
|
+ if (cbList.size() > 0) {
|
|
|
try {
|
|
|
String fileName = "导出成本ERP" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
|
|
- List<CapitalExport> capitalExports = pickIngService.cbList(cbList,projectId);
|
|
|
+ List<CapitalExport> capitalExports = pickIngService.cbList(cbList, projectId);
|
|
|
new ExportExcel("导出成本ERP", CapitalExport.class).setDataList(capitalExports).write(response, fileName).dispose();
|
|
|
j.setSuccess(true);
|
|
|
j.setMsg("导出成功!");
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ String fileName = "没有对应的项目信息" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
|
|
+ List<CapitalExport> nullExports = new ArrayList<>();
|
|
|
+ new ExportExcel("没有对应的项目信息", CapitalExport.class).setDataList(nullExports).write(response,fileName ).dispose();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
//需改导出状态及导出时间
|
|
|
return j;
|
|
@@ -688,13 +717,13 @@ public class PickIngController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 资本
|
|
|
- * */
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "exportZb")
|
|
|
- public AjaxJson exportZb(String id,String projectId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ public AjaxJson exportZb(String id, String projectId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
try {
|
|
|
- projectId = URLDecoder.decode(projectId,"UTF-8");
|
|
|
+ projectId = URLDecoder.decode(projectId, "UTF-8");
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -713,23 +742,31 @@ public class PickIngController extends BaseController {
|
|
|
//资本项目列表
|
|
|
List<Acquisition> zbList = new ArrayList<>();
|
|
|
//循环数据,根据类型分组
|
|
|
- for (Acquisition acquisition:erpType) {
|
|
|
+ for (Acquisition acquisition : erpType) {
|
|
|
String itemType = acquisition.getProType();
|
|
|
if ("配网资本".equals(itemType)) {
|
|
|
zbList.add(acquisition);
|
|
|
}
|
|
|
}
|
|
|
//根据不同类型导出不同的文件
|
|
|
- if (zbList.size()>0) {
|
|
|
+ if (zbList.size() > 0) {
|
|
|
try {
|
|
|
String fileName = "导出资本ERP" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
|
|
- List<CapitalExport> capitalExports = pickIngService.zbList(zbList,projectId);
|
|
|
+ List<CapitalExport> capitalExports = pickIngService.zbList(zbList, projectId);
|
|
|
new ExportExcel("导出资本ERP", CapitalExport.class).setDataList(capitalExports).write(response, fileName).dispose();
|
|
|
j.setSuccess(true);
|
|
|
j.setMsg("导出成功!");
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
+ }else {
|
|
|
+ try {
|
|
|
+ String fileName = "没有对应的项目信息" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
|
|
+ List<CapitalExport> nullExports = new ArrayList<>();
|
|
|
+ new ExportExcel("没有对应的项目信息", CapitalExport.class).setDataList(nullExports).write(response,fileName ).dispose();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
//需改导出状态及导出时间
|
|
|
return j;
|
|
@@ -737,13 +774,13 @@ public class PickIngController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 导出领料清单
|
|
|
- * */
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "exportBlock")
|
|
|
public AjaxJson exportBlock(String procInsId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
try {
|
|
|
- procInsId = URLDecoder.decode(procInsId,"UTF-8");
|
|
|
+ procInsId = URLDecoder.decode(procInsId, "UTF-8");
|
|
|
String fileName = "导出领料清单" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
|
|
List<ExportBlock> exportBlock = pickIngService.findExportBlock(procInsId);
|
|
|
new ExportExcel("导出领料清单", ExportBlock.class).setDataList(exportBlock).write(response, fileName).dispose();
|
|
@@ -759,13 +796,13 @@ public class PickIngController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 导出模块清单
|
|
|
- * */
|
|
|
+ */
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "exportListing")
|
|
|
public AjaxJson exportListing(String procInsId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
AjaxJson j = new AjaxJson();
|
|
|
try {
|
|
|
- procInsId = URLDecoder.decode(procInsId,"UTF-8");
|
|
|
+ procInsId = URLDecoder.decode(procInsId, "UTF-8");
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -774,7 +811,7 @@ public class PickIngController extends BaseController {
|
|
|
String item = showListService.itemQuery(procInsId);
|
|
|
//返回给页面的list
|
|
|
List<ShowList> myList = new ArrayList<>();
|
|
|
- if (item != null&&!"".equals(item)) {
|
|
|
+ if (item != null && !"".equals(item)) {
|
|
|
String[] split = item.split(";");
|
|
|
//回显list
|
|
|
List<ExportListing> returnList = new ArrayList<>();
|