|
|
@ -72,32 +72,15 @@ public class PurchaseRequisitionService extends MybatisBaseService<PurchaseRequi |
|
|
|
@Resource |
|
|
|
private RestrictedCategoryService restrictedCategoryService; |
|
|
|
public void supplierAnalysis( ) throws ParseException { |
|
|
|
/*List<SupplierInfoVo> suppliers=supplierInfoService.selectAdoptedListVo(); |
|
|
|
List<Map<String,String>> list=new ArrayList<>(); |
|
|
|
for(SupplierInfoVo s:suppliers){ |
|
|
|
List<Map<String,Object>> totalPrices = purchaseRequisitionProService.selectBySupplierInfoSidForTotalPrice(s.getName()); |
|
|
|
for(Map<String,Object> totalPrice:totalPrices){ |
|
|
|
Map<String,String> 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); |
|
|
|
} |
|
|
|
ztspglhzb(); |
|
|
|
gysddmxb(); |
|
|
|
} |
|
|
|
purchaseRequisitionProService.deleteSupplierTotalprice(); |
|
|
|
purchaseRequisitionProService.addSupplierTotalprice(list); |
|
|
|
log.info("selectBySupplierInfoSidForTotalPrice:{}",JSONObject.toJSONString(list)); |
|
|
|
List<Map<String,Object>> purchaseRequisitionPros = purchaseRequisitionProService.supplierAndpurAnalysis(); |
|
|
|
purchaseRequisitionProService.deleteSupplierAndpurAnalysis(); |
|
|
|
purchaseRequisitionProService.addSupplierAndpurAnalysis(purchaseRequisitionPros); |
|
|
|
log.info("purchaseRequisitionPros:{}",JSONObject.toJSONString(purchaseRequisitionPros)); |
|
|
|
*/ |
|
|
|
|
|
|
|
/** |
|
|
|
* 在途商品管理汇总表 |
|
|
|
* @throws ParseException |
|
|
|
*/ |
|
|
|
public void ztspglhzb() throws ParseException { |
|
|
|
Date date = new Date(); |
|
|
|
SimpleDateFormat sdf1=new SimpleDateFormat("yyyyMMdd"); |
|
|
|
List<Map<String,Object>> list=baseMapper.ztspglhzb();//--在途商品管理汇总表
|
|
|
@ -105,15 +88,9 @@ public class PurchaseRequisitionService extends MybatisBaseService<PurchaseRequi |
|
|
|
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<PurchaseRequi |
|
|
|
} |
|
|
|
log.info("ztspglhzb:{}",JSONObject.toJSONString(list)); |
|
|
|
baseMapper.insertZtspglhzb(list); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 供应商订单明细表 |
|
|
|
*/ |
|
|
|
public void gysddmxb( ) { |
|
|
|
Date date = new Date(); |
|
|
|
SimpleDateFormat sdf1=new SimpleDateFormat("yyyyMMdd"); |
|
|
|
List<Map<String,String>> list2= baseMapper.gysddmxb();//--供应商订单明细表
|
|
|
|
for(Map<String,String> 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";//编号
|
|
|
|
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){ |
|
|
|