|
@@ -12,6 +12,7 @@ import com.jeeplus.modules.act.service.ActProcessService;
|
|
|
import com.jeeplus.modules.act.service.ActTaskService;
|
|
|
import com.jeeplus.modules.sg.audit.information.entity.Information;
|
|
|
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.service.ConstructionService;
|
|
@@ -269,6 +270,7 @@ public class PickIngController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ Collections.sort(list);
|
|
|
return getBootstrapData(page);
|
|
|
}
|
|
|
|
|
@@ -599,5 +601,108 @@ public class PickIngController extends BaseController {
|
|
|
//需改导出状态及导出时间
|
|
|
return j;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出领料清单
|
|
|
+ * */
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "exportBlock")
|
|
|
+ public AjaxJson exportBlock(String procInsId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ AjaxJson j = new AjaxJson();
|
|
|
+ try {
|
|
|
+ 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();
|
|
|
+ j.setSuccess(true);
|
|
|
+ j.setMsg("导出成功!");
|
|
|
+ } catch (IOException e) {
|
|
|
+ j.setSuccess(false);
|
|
|
+ j.setMsg("导出有误!");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return j;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出模块清单
|
|
|
+ * */
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping(value = "exportListing")
|
|
|
+ public AjaxJson exportListing(String procInsId, HttpServletRequest request, HttpServletResponse response) {
|
|
|
+ AjaxJson j = new AjaxJson();
|
|
|
+ try {
|
|
|
+ procInsId = URLDecoder.decode(procInsId,"UTF-8");
|
|
|
+ } catch (UnsupportedEncodingException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ ArrayList<String> objects = new ArrayList<>();
|
|
|
+ ArrayList<String> findList = new ArrayList<>();
|
|
|
+ String item = showListService.itemQuery(procInsId);
|
|
|
+ //返回给页面的list
|
|
|
+ List<ShowList> myList = new ArrayList<>();
|
|
|
+ if (item != null&&!"".equals(item)) {
|
|
|
+ String[] split = item.split(";");
|
|
|
+ //回显list
|
|
|
+ List<ExportListing> returnList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
+ objects.add(split[i]);
|
|
|
+ }
|
|
|
+ for (String s : objects) {
|
|
|
+ String[] split1 = s.split(":");
|
|
|
+ ShowList myShow = new ShowList();
|
|
|
+ myShow.setId(split1[0]);
|
|
|
+ String s1 = split1[1];
|
|
|
+ myShow.setNumber(Double.parseDouble(s1));
|
|
|
+ findList.add(split1[0]);
|
|
|
+ myList.add(myShow);
|
|
|
+ }
|
|
|
+ List<ExportListing> exportListings = showListService.exportListing(findList);
|
|
|
+ for (ShowList my : myList) {
|
|
|
+ //循环遍历
|
|
|
+ for (ExportListing showList1 : exportListings) {
|
|
|
+ //选择的模块与查出来的一致
|
|
|
+ if (my.getId().equals(showList1.getBlockId())) {
|
|
|
+ Double mdSingleWeight = Double.valueOf(showList1.getMdSingleWeight());
|
|
|
+ Double number = my.getNumber();
|
|
|
+ Double mdCount = Double.valueOf(showList1.getMdCount());
|
|
|
+ Double i = mdSingleWeight * number;
|
|
|
+ BigDecimal b1 = new BigDecimal(Double.toString(number));
|
|
|
+ BigDecimal b2 = new BigDecimal(Double.toString(mdCount));
|
|
|
+ String s = b1.multiply(b2).toString();
|
|
|
+ ExportListing newShowList = new ExportListing();
|
|
|
+ newShowList.setMdBigClass(showList1.getMdBigClass());
|
|
|
+ newShowList.setMdTheClass(showList1.getMdTheClass());
|
|
|
+ newShowList.setMdName(showList1.getMdName());
|
|
|
+ newShowList.setMaterialCode(showList1.getMaterialCode());
|
|
|
+ newShowList.setMaterialDescription(showList1.getMaterialDescription());
|
|
|
+ newShowList.setExtensionDescription(showList1.getExtensionDescription());
|
|
|
+ newShowList.setMdUnits(showList1.getMdUnits());
|
|
|
+ newShowList.setMdTheParty(showList1.getMdTheParty());
|
|
|
+ newShowList.setMdText(showList1.getMdText());
|
|
|
+ newShowList.setMdTotalAmount(s);
|
|
|
+ newShowList.setMdSingleWeight(showList1.getMdSingleWeight());
|
|
|
+ BigDecimal b = new BigDecimal(i);
|
|
|
+ BigDecimal a = new BigDecimal(1000);
|
|
|
+ BigDecimal divide = b.divide(a, 4, BigDecimal.ROUND_HALF_UP);
|
|
|
+ newShowList.setMdTotalWeight(divide.toString());
|
|
|
+ returnList.add(newShowList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ String fileName = "导出模块清单" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
|
|
+ new ExportExcel("导出模块清单", ExportListing.class).setDataList(returnList).write(response, fileName).dispose();
|
|
|
+
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ j.setSuccess(true);
|
|
|
+ j.setMsg("导出成功!");
|
|
|
+ return j;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+
|