|
|
@@ -1,56 +0,0 @@
|
|
|
-package com.uas.platform.b2b.controller;
|
|
|
-
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
-import com.uas.platform.b2b.model.ApbillAdjustment;
|
|
|
-import com.uas.platform.b2b.model.Vendor;
|
|
|
-import com.uas.platform.b2b.service.ApbillAdjustmentService;
|
|
|
-import com.uas.platform.b2b.service.UserService;
|
|
|
-import com.uas.platform.b2b.support.SystemSession;
|
|
|
-
|
|
|
-/**
|
|
|
- * 货款调账
|
|
|
- *
|
|
|
- * @author hejq
|
|
|
- * @time 创建时间:2017年5月19日
|
|
|
- */
|
|
|
-@RestController
|
|
|
-@RequestMapping("/apbillAdjustment")
|
|
|
-public class ApbillAdjustmentController {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ApbillAdjustmentService apbillAdjustmentService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private UserService userService;
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取本企业的货款调账数据
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "/adjustList", method = RequestMethod.GET)
|
|
|
- private List<ApbillAdjustment> getAdjustList(String keyword, Long fromDate, Long endDate) {
|
|
|
- List<Long> distributes = null;
|
|
|
- // 判断当前用户是否被客户分配
|
|
|
- if (!SystemSession.getUser().isSys()) {
|
|
|
- List<Vendor> vendors = userService.findChooseVendor(SystemSession.getUser().getUserUU());
|
|
|
- distributes = new ArrayList<Long>();
|
|
|
- if (!CollectionUtils.isEmpty(vendors)) {
|
|
|
- for (Vendor v : vendors) {
|
|
|
- distributes.add(v.getMyEnUU());
|
|
|
- }
|
|
|
- } else {
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
- return apbillAdjustmentService.getAdjustList(distributes, keyword, fromDate, endDate);
|
|
|
- }
|
|
|
-}
|