|
@@ -4,10 +4,8 @@ import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.data.domain.Sort.Direction;
|
|
|
|
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -19,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.platform.b2b.model.PurchaseOrderChange;
|
|
import com.uas.platform.b2b.model.PurchaseOrderChange;
|
|
|
import com.uas.platform.b2b.model.SearchFilter;
|
|
import com.uas.platform.b2b.model.SearchFilter;
|
|
|
import com.uas.platform.b2b.search.SearchService;
|
|
import com.uas.platform.b2b.search.SearchService;
|
|
@@ -156,6 +156,75 @@ public class SaleOrderChangeController {
|
|
|
return searchService.searchPurchaseOrderChangeIds(keyword, pageParams);
|
|
return searchService.searchPurchaseOrderChangeIds(keyword, pageParams);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 作为卖家,收到的采购变更单(全部)
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param json
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value = "/info", method = RequestMethod.GET)
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public SPage<PurchaseOrderChange> getAllOrderChanges(PageParams params, String searchFilter) {
|
|
|
|
|
+ SPage<PurchaseOrderChange> orders = new SPage<PurchaseOrderChange>();
|
|
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
|
|
+ pageInfo.filter("status", Status.REPLIED.value());
|
|
|
|
|
+ SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
|
|
+ // filter.setDistribute(userService.distribute().getDistribute());
|
|
|
|
|
+ Page<PurchaseOrderChange> orderchanges = purchaseOrderChangeService.findAllByPageInfo(pageInfo, null, filter);
|
|
|
|
|
+ orders.setContent(orderchanges.getContent());
|
|
|
|
|
+ orders.setPage(orderchanges.getNumber());
|
|
|
|
|
+ orders.setSize(orderchanges.getSize());
|
|
|
|
|
+ orders.setTotalElement(orderchanges.getTotalElements());
|
|
|
|
|
+ orders.setTotalPage(orderchanges.getTotalPages());
|
|
|
|
|
+ return orders;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 作为卖家,收到的采购变更单(待处理)
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param json
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value = "/info", params = RequestState.TODO, method = RequestMethod.GET)
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public SPage<PurchaseOrderChange> getTodoOrderChanges(PageParams params, String searchFilter) {
|
|
|
|
|
+ SPage<PurchaseOrderChange> orders = new SPage<PurchaseOrderChange>();
|
|
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
|
|
+ pageInfo.filter("status", Status.NOT_REPLY.value());
|
|
|
|
|
+ SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
|
|
+ // filter.setDistribute(userService.distribute().getDistribute());
|
|
|
|
|
+ Page<PurchaseOrderChange> orderchanges = purchaseOrderChangeService.findAllByPageInfo(pageInfo, null, filter);
|
|
|
|
|
+ orders.setContent(orderchanges.getContent());
|
|
|
|
|
+ orders.setPage(orderchanges.getNumber());
|
|
|
|
|
+ orders.setSize(orderchanges.getSize());
|
|
|
|
|
+ orders.setTotalElement(orderchanges.getTotalElements());
|
|
|
|
|
+ orders.setTotalPage(orderchanges.getTotalPages());
|
|
|
|
|
+ return orders;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 作为卖家,收到的采购变更单(已处理)
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param json
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value = "/info", params = RequestState.DONE, method = RequestMethod.GET)
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public SPage<PurchaseOrderChange> getDoneOrderChanges(PageParams params, String searchFilter) {
|
|
|
|
|
+ SPage<PurchaseOrderChange> orders = new SPage<PurchaseOrderChange>();
|
|
|
|
|
+ PageInfo pageInfo = new PageInfo(params);
|
|
|
|
|
+ pageInfo.filter("status", Status.REPLIED.value());
|
|
|
|
|
+ SearchFilter filter = JSONObject.parseObject(searchFilter, SearchFilter.class);
|
|
|
|
|
+ // filter.setDistribute(userService.distribute().getDistribute());
|
|
|
|
|
+ Page<PurchaseOrderChange> orderchanges = purchaseOrderChangeService.findAllByPageInfo(pageInfo, null, filter);
|
|
|
|
|
+ orders.setContent(orderchanges.getContent());
|
|
|
|
|
+ orders.setPage(orderchanges.getNumber());
|
|
|
|
|
+ orders.setSize(orderchanges.getSize());
|
|
|
|
|
+ orders.setTotalElement(orderchanges.getTotalElements());
|
|
|
|
|
+ orders.setTotalPage(orderchanges.getTotalPages());
|
|
|
|
|
+ return orders;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 作为卖家,根据变更单ID查找采购变更单(含明细)
|
|
* 作为卖家,根据变更单ID查找采购变更单(含明细)
|
|
|
*
|
|
*
|