|
|
@@ -25,50 +25,50 @@ public class UsoftFxController {
|
|
|
UsoftFxService usoftFxService;
|
|
|
|
|
|
/**
|
|
|
- * 根据企业enUU获取当前企业最近三个月(订单时间or验收单时间?)有验收单的数据
|
|
|
- * @param enUU
|
|
|
- * @param excludeAcceptItemIds
|
|
|
- * @param startDate
|
|
|
- * @param endDate
|
|
|
+ * 根据企业enUU获取当前企业最近三个月(订单时间)有验收单的数据
|
|
|
+ * @param enUU 卖方uu
|
|
|
+ * @param excludeAcceptItemIds 移除的id
|
|
|
+ * @param startDate 起始时间
|
|
|
+ * @param endDate 结束时间
|
|
|
* @throws UnsupportedEncodingException
|
|
|
* return 返回有验收单的订单和订单明细
|
|
|
*/
|
|
|
- @RequestMapping(value = "/orders/withAccepts",method = RequestMethod.GET)
|
|
|
+ @RequestMapping(value = "/orders/withAccepts", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
- public List<FxPurOrder> getPurcAcceptItems(@RequestParam("enUU") Long enUU,@RequestParam(value = "excludeAcceptItemIds",required = false) String excludeAcceptItemIds,
|
|
|
- @RequestParam(value = "startDate",required = false) Long startDate,
|
|
|
- @RequestParam(value = "endDate",required = false) Long endDate) throws UnsupportedEncodingException {
|
|
|
+ public List<FxPurOrder> getPurcAcceptItems(@RequestParam("enUU") Long enUU, @RequestParam(value = "excludeAcceptItemIds", required = false) String excludeAcceptItemIds,
|
|
|
+ @RequestParam(value = "startDate", required = false) Long startDate,
|
|
|
+ @RequestParam(value = "endDate", required = false) Long endDate) throws UnsupportedEncodingException {
|
|
|
String acceptItems = null;
|
|
|
if (!StringUtils.isEmpty(excludeAcceptItemIds)) {
|
|
|
- acceptItems = URLDecoder.decode(excludeAcceptItemIds,"UTF-8");
|
|
|
+ acceptItems = URLDecoder.decode(excludeAcceptItemIds, "UTF-8");
|
|
|
}
|
|
|
List<Long> excludeItemsIds = new ArrayList<>();
|
|
|
if (!StringUtils.isEmpty(acceptItems)) {
|
|
|
- Long[] longs = (Long[]) ConvertUtils.convert(acceptItems.split(","),Long.class);
|
|
|
+ Long[] longs = (Long[]) ConvertUtils.convert(acceptItems.split(","), Long.class);
|
|
|
excludeItemsIds = Arrays.asList(longs);
|
|
|
}
|
|
|
Date date = new Date();
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTime(date);
|
|
|
- calendar.add(Calendar.MONTH,-3);
|
|
|
+ calendar.add(Calendar.MONTH,- 3);
|
|
|
date = calendar.getTime();
|
|
|
Date needStartDate = startDate == null ? date : new Date(startDate);
|
|
|
Date needEndDate = endDate == null ? new Date() : new Date(endDate);
|
|
|
- List<FxPurOrder> fxPurOrders = usoftFxService.getPurcAccsptItems(enUU,excludeItemsIds,needStartDate,needEndDate);
|
|
|
+ List<FxPurOrder> fxPurOrders = usoftFxService.getPurcAccsptItems(enUU, excludeItemsIds, needStartDate, needEndDate);
|
|
|
return fxPurOrders;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据验收单的明细获取对应的验收单数据
|
|
|
- * @param enUU
|
|
|
- * @param acceptItemIds
|
|
|
+ * @param enUU 卖方uu
|
|
|
+ * @param acceptItemIds 验收明细id
|
|
|
* @return
|
|
|
* @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
- @RequestMapping(value = "/acceptItems",method = RequestMethod.GET)
|
|
|
+ @RequestMapping(value = "/acceptItems", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
public List<FxPurcAcceptItem> getPurcAcceptByItemIds(@RequestParam("enUU") Long enUU, @RequestParam("acceptItemIds") String acceptItemIds) throws UnsupportedEncodingException{
|
|
|
- List<Long> ids = Arrays.asList((Long[]) ConvertUtils.convert(acceptItemIds.split(","),Long.class));
|
|
|
- return usoftFxService.getPurcAcceptByItemIds(enUU,ids);
|
|
|
+ List<Long> ids = Arrays.asList((Long[]) ConvertUtils.convert(acceptItemIds.split(","), Long.class));
|
|
|
+ return usoftFxService.getPurcAcceptByItemIds(enUU, ids);
|
|
|
}
|
|
|
}
|