|
|
@ -3,26 +3,31 @@ package com.bgs.webapi.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import com.bgs.common.core.domain.AjaxResult;
|
|
|
|
import com.bgs.common.core.domain.AjaxResult;
|
|
|
|
import com.bgs.webapi.doman.BindingSubmitBeen;
|
|
|
|
import com.bgs.webapi.doman.BindingSubmitBeen;
|
|
|
|
|
|
|
|
import com.bgs.webapi.doman.JoinSubmitBeen;
|
|
|
|
import com.bgs.webapi.service.ApiService;
|
|
|
|
import com.bgs.webapi.service.ApiService;
|
|
|
|
import com.bgs.webapi.service.LoginService;
|
|
|
|
import com.bgs.webapi.service.LoginService;
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Created by wangh on 2020/7/17-15:18。
|
|
|
|
* Created by wangh on 2020/7/17-15:18。
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@Controller
|
|
|
|
@RequestMapping("/api")
|
|
|
|
@RequestMapping("/api")
|
|
|
|
public class ApiController {
|
|
|
|
public class ApiController {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
ApiService service;
|
|
|
|
ApiService service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/test")
|
|
|
|
|
|
|
|
public String stockLedger()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return "base/location/stockLedger";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/bindingSubmit")
|
|
|
|
@PostMapping("/bindingSubmit")
|
|
|
|
public AjaxResult bindingSubmit(@RequestBody BindingSubmitBeen submitBeen) {
|
|
|
|
public AjaxResult bindingSubmit(@RequestBody BindingSubmitBeen submitBeen) {
|
|
|
@ -77,8 +82,27 @@ public class ApiController {
|
|
|
|
if (list == null || list.isEmpty()) return AjaxResult.error("账号无绑定记录");
|
|
|
|
if (list == null || list.isEmpty()) return AjaxResult.error("账号无绑定记录");
|
|
|
|
return AjaxResult.success(list);
|
|
|
|
return AjaxResult.success(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//交货提交
|
|
|
|
|
|
|
|
@PostMapping("/join/jiaoSubmit")
|
|
|
|
|
|
|
|
public AjaxResult joinJiaoSubmit(@RequestBody JoinSubmitBeen been){
|
|
|
|
|
|
|
|
int i = service.joinSelectByUser(been);
|
|
|
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
|
|
|
return AjaxResult.success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return AjaxResult.error();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//接货提交
|
|
|
|
|
|
|
|
@PostMapping("/join/shouSubmit")
|
|
|
|
|
|
|
|
public AjaxResult joinJieSubmit(@RequestBody JoinSubmitBeen been){
|
|
|
|
|
|
|
|
int i = service.joinShouSubmit(been);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (i == been.getList().size()) {
|
|
|
|
|
|
|
|
return AjaxResult.success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return AjaxResult.error();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* @GetMapping("/getVersion")
|
|
|
|
/* @GetMapping("/getVersion")
|
|
|
|
public String getVersion(){
|
|
|
|
public String getVersion(){
|
|
|
|