From 5be1a7f47beffd3cb8d2eb3419e98b1c0baca75f Mon Sep 17 00:00:00 2001 From: yxt_djz Date: Thu, 15 Dec 2022 21:55:28 +0800 Subject: [PATCH] 2 --- .../PurchaseRequisitionService.java | 78 +++++++------------ 1 file changed, 29 insertions(+), 49 deletions(-) diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/purchaserequisition/PurchaseRequisitionService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/purchaserequisition/PurchaseRequisitionService.java index 6a3f9840..2b822965 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/purchaserequisition/PurchaseRequisitionService.java +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/purchaserequisition/PurchaseRequisitionService.java @@ -72,48 +72,25 @@ public class PurchaseRequisitionService extends MybatisBaseService suppliers=supplierInfoService.selectAdoptedListVo(); - List> list=new ArrayList<>(); - for(SupplierInfoVo s:suppliers){ - List> totalPrices = purchaseRequisitionProService.selectBySupplierInfoSidForTotalPrice(s.getName()); - for(Map totalPrice:totalPrices){ - Map map=new HashMap<>(); - map.put("code",s.getCode()); - map.put("name",s.getName()); - if(totalPrice!=null){ - map.put("packageTotalPrice", totalPrice.get("packageTotalPrice")+""); - map.put("arrivalDate",totalPrice.get("arrivalDate")+""); - }else{ - map.put("packageTotalPrice","0"); - map.put("arrivalDate",""); - } - list.add(map); - } - } - purchaseRequisitionProService.deleteSupplierTotalprice(); - purchaseRequisitionProService.addSupplierTotalprice(list); - log.info("selectBySupplierInfoSidForTotalPrice:{}",JSONObject.toJSONString(list)); - List> purchaseRequisitionPros = purchaseRequisitionProService.supplierAndpurAnalysis(); - purchaseRequisitionProService.deleteSupplierAndpurAnalysis(); - purchaseRequisitionProService.addSupplierAndpurAnalysis(purchaseRequisitionPros); - log.info("purchaseRequisitionPros:{}",JSONObject.toJSONString(purchaseRequisitionPros)); -*/ + ztspglhzb(); + gysddmxb(); + } + + /** + * 在途商品管理汇总表 + * @throws ParseException + */ + public void ztspglhzb() throws ParseException { Date date = new Date(); SimpleDateFormat sdf1=new SimpleDateFormat("yyyyMMdd"); - List> list=baseMapper.ztspglhzb();//--在途商品管理汇总表 + List> list=baseMapper.ztspglhzb();//--在途商品管理汇总表 for(Map m:list){ String billTotalPrice= m.get("billTotalPrice")!=null?m.get("billTotalPrice").toString():"0";//订单总额 String prodValue= m.get("prodValue")!=null?m.get("prodValue").toString():"0";//实际到货价值 String arrivalDate= m.get("arrivalDate")!=null?m.get("arrivalDate").toString():"0";//全部到货日期 - SimpleDateFormat sdf=new SimpleDateFormat("yyyy.MM.dd"); - String no=sdf1.format(date).toString()+"01";//编号 - String format = sdf.format(date); - m.put("date",format); - String wdhjz="";//未到货价值 - String cchjz="";//超出货价值 - String sfyq="";//是否延期到货 - m.put("no",no); + m.put("date",sdf.format(date)); + m.put("no",sdf1.format(date).toString()+"01");//编号 BigDecimal bigDecimal = new BigDecimal(billTotalPrice); //总金额 BigDecimal bigDecimal1 = new BigDecimal(prodValue);//到货金额 BigDecimal subtract = bigDecimal.subtract(bigDecimal1); @@ -136,23 +113,26 @@ public class PurchaseRequisitionService extends MybatisBaseService> list2= baseMapper.gysddmxb();//--供应商订单明细表 - for(Map m:list2){ - String name= m.get("name");//供应商名称 - String code= m.get("code");//供应商唯一编码 - // String billTotalPrice= m.get("billTotalPrice");//订单总额 - // String billDate= m.get("billDate");//订单日期 - // String no= m.get("no");//编号 - // String date= m.get("date");//订单总额 - SimpleDateFormat sdf=new SimpleDateFormat("yyyy.MM.dd"); - String format = sdf.format(date); - m.put("date",format.toString()); - String no=sdf1.format(date).toString()+"01";//编号 - m.put("no",no); - } + } + + /** + * 供应商订单明细表 + */ + public void gysddmxb( ) { + Date date = new Date(); + SimpleDateFormat sdf1=new SimpleDateFormat("yyyyMMdd"); + List> list2= baseMapper.gysddmxb();//--供应商订单明细表 + for(Map m:list2){ + SimpleDateFormat sdf=new SimpleDateFormat("yyyy.MM.dd"); + String format = sdf.format(date); + m.put("date",format.toString()); + String no= sdf1.format(date).toString()+"01";//编号 + m.put("no",no); + } log.info("gysddmxb:{}",JSONObject.toJSONString(list2)); baseMapper.insertGysddmxb(list2); } + public void readBrandPeriodSorXls1(InputStream is, String sid) { /* int ii=uddatePrice(); if(ii==1){