给接口增加swagger描述
This commit is contained in:
@@ -33,11 +33,11 @@ public class Swagger2Config {
|
|||||||
|
|
||||||
private ApiInfo apiInfo() {
|
private ApiInfo apiInfo() {
|
||||||
return new ApiInfoBuilder()
|
return new ApiInfoBuilder()
|
||||||
.title("Mybatis-Plus Plugin Example RESTful APIs")
|
.title("华夏ERP Restful Api")
|
||||||
.description("集成Mybatis-Plus模块接口描述")
|
.description("华夏ERP接口描述")
|
||||||
.termsOfServiceUrl("http://127.0.0.1")
|
.termsOfServiceUrl("http://127.0.0.1")
|
||||||
.contact(new Contact("jishenghua", "", ""))
|
.contact(new Contact("jishenghua", "", ""))
|
||||||
.version("2.1.1")
|
.version("3.0")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,11 @@ import com.jsh.erp.exception.BusinessRunTimeException;
|
|||||||
import com.jsh.erp.service.account.AccountService;
|
import com.jsh.erp.service.account.AccountService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
import com.jsh.erp.utils.ErpInfo;
|
import com.jsh.erp.utils.ErpInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.context.annotation.Description;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -29,6 +32,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/account")
|
@RequestMapping(value = "/account")
|
||||||
|
@Api(tags = {"账户管理"})
|
||||||
public class AccountController {
|
public class AccountController {
|
||||||
private Logger logger = LoggerFactory.getLogger(AccountController.class);
|
private Logger logger = LoggerFactory.getLogger(AccountController.class);
|
||||||
|
|
||||||
@@ -41,6 +45,7 @@ public class AccountController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findBySelect")
|
@GetMapping(value = "/findBySelect")
|
||||||
|
@ApiOperation(value = "查找结算账户信息-下拉框")
|
||||||
public String findBySelect(HttpServletRequest request) throws Exception {
|
public String findBySelect(HttpServletRequest request) throws Exception {
|
||||||
String res = null;
|
String res = null;
|
||||||
try {
|
try {
|
||||||
@@ -70,6 +75,7 @@ public class AccountController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getAccount")
|
@GetMapping(value = "/getAccount")
|
||||||
|
@ApiOperation(value = "获取所有结算账户")
|
||||||
public BaseResponseInfo getAccount(HttpServletRequest request) throws Exception {
|
public BaseResponseInfo getAccount(HttpServletRequest request) throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -96,6 +102,7 @@ public class AccountController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findAccountInOutList")
|
@GetMapping(value = "/findAccountInOutList")
|
||||||
|
@ApiOperation(value = "账户流水信息")
|
||||||
public BaseResponseInfo findAccountInOutList(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo findAccountInOutList(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("accountId") Long accountId,
|
@RequestParam("accountId") Long accountId,
|
||||||
@@ -130,7 +137,15 @@ public class AccountController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新默认账户
|
||||||
|
* @param object
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@PostMapping(value = "/updateIsDefault")
|
@PostMapping(value = "/updateIsDefault")
|
||||||
|
@ApiOperation(value = "更新默认账户")
|
||||||
public String updateIsDefault(@RequestBody JSONObject object,
|
public String updateIsDefault(@RequestBody JSONObject object,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
Long accountId = object.getLong("id");
|
Long accountId = object.getLong("id");
|
||||||
@@ -149,6 +164,7 @@ public class AccountController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getStatistics")
|
@GetMapping(value = "/getStatistics")
|
||||||
|
@ApiOperation(value = "结算账户的统计")
|
||||||
public BaseResponseInfo getStatistics(@RequestParam("name") String name,
|
public BaseResponseInfo getStatistics(@RequestParam("name") String name,
|
||||||
@RequestParam("serialNo") String serialNo,
|
@RequestParam("serialNo") String serialNo,
|
||||||
HttpServletRequest request) throws Exception {
|
HttpServletRequest request) throws Exception {
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import com.jsh.erp.datasource.entities.AccountHeadVo4ListEx;
|
|||||||
import com.jsh.erp.service.accountHead.AccountHeadService;
|
import com.jsh.erp.service.accountHead.AccountHeadService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
import com.jsh.erp.utils.ErpInfo;
|
import com.jsh.erp.utils.ErpInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -25,6 +27,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/accountHead")
|
@RequestMapping(value = "/accountHead")
|
||||||
|
@Api(tags = {"财务管理"})
|
||||||
public class AccountHeadController {
|
public class AccountHeadController {
|
||||||
private Logger logger = LoggerFactory.getLogger(AccountHeadController.class);
|
private Logger logger = LoggerFactory.getLogger(AccountHeadController.class);
|
||||||
|
|
||||||
@@ -38,6 +41,7 @@ public class AccountHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/batchSetStatus")
|
@PostMapping(value = "/batchSetStatus")
|
||||||
|
@ApiOperation(value = "批量设置状态-审核或者反审核")
|
||||||
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
Map<String, Object> objectMap = new HashMap<>();
|
Map<String, Object> objectMap = new HashMap<>();
|
||||||
@@ -59,6 +63,7 @@ public class AccountHeadController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/addAccountHeadAndDetail")
|
@PostMapping(value = "/addAccountHeadAndDetail")
|
||||||
|
@ApiOperation(value = "新增财务主表及财务子表信息")
|
||||||
public Object addAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{
|
public Object addAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
String beanJson = body.getInfo();
|
String beanJson = body.getInfo();
|
||||||
@@ -75,6 +80,7 @@ public class AccountHeadController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@PutMapping(value = "/updateAccountHeadAndDetail")
|
@PutMapping(value = "/updateAccountHeadAndDetail")
|
||||||
|
@ApiOperation(value = "更新财务主表及财务子表信息")
|
||||||
public Object updateAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{
|
public Object updateAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
String beanJson = body.getInfo();
|
String beanJson = body.getInfo();
|
||||||
@@ -90,6 +96,7 @@ public class AccountHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getDetailByNumber")
|
@GetMapping(value = "/getDetailByNumber")
|
||||||
|
@ApiOperation(value = "根据编号查询单据信息")
|
||||||
public BaseResponseInfo getDetailByNumber(@RequestParam("billNo") String billNo,
|
public BaseResponseInfo getDetailByNumber(@RequestParam("billNo") String billNo,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.jsh.erp.datasource.vo.AccountItemVo4List;
|
import com.jsh.erp.datasource.vo.AccountItemVo4List;
|
||||||
import com.jsh.erp.service.accountItem.AccountItemService;
|
import com.jsh.erp.service.accountItem.AccountItemService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -25,6 +27,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/accountItem")
|
@RequestMapping(value = "/accountItem")
|
||||||
|
@Api(tags = {"财务明细"})
|
||||||
public class AccountItemController {
|
public class AccountItemController {
|
||||||
private Logger logger = LoggerFactory.getLogger(AccountItemController.class);
|
private Logger logger = LoggerFactory.getLogger(AccountItemController.class);
|
||||||
|
|
||||||
@@ -32,6 +35,7 @@ public class AccountItemController {
|
|||||||
private AccountItemService accountItemService;
|
private AccountItemService accountItemService;
|
||||||
|
|
||||||
@GetMapping(value = "/getDetailList")
|
@GetMapping(value = "/getDetailList")
|
||||||
|
@ApiOperation(value = "明细列表")
|
||||||
public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
|
public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import com.jsh.erp.service.systemConfig.SystemConfigService;
|
|||||||
import com.jsh.erp.service.user.UserService;
|
import com.jsh.erp.service.user.UserService;
|
||||||
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
||||||
import com.jsh.erp.utils.*;
|
import com.jsh.erp.utils.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
@@ -33,6 +35,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/depot")
|
@RequestMapping(value = "/depot")
|
||||||
|
@Api(tags = {"仓库管理"})
|
||||||
public class DepotController {
|
public class DepotController {
|
||||||
private Logger logger = LoggerFactory.getLogger(DepotController.class);
|
private Logger logger = LoggerFactory.getLogger(DepotController.class);
|
||||||
|
|
||||||
@@ -45,7 +48,14 @@ public class DepotController {
|
|||||||
@Resource
|
@Resource
|
||||||
private MaterialService materialService;
|
private MaterialService materialService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库列表
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getAllList")
|
@GetMapping(value = "/getAllList")
|
||||||
|
@ApiOperation(value = "仓库列表")
|
||||||
public BaseResponseInfo getAllList(HttpServletRequest request) throws Exception{
|
public BaseResponseInfo getAllList(HttpServletRequest request) throws Exception{
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -68,6 +78,7 @@ public class DepotController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findUserDepot")
|
@GetMapping(value = "/findUserDepot")
|
||||||
|
@ApiOperation(value = "用户对应仓库显示")
|
||||||
public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
@@ -114,6 +125,7 @@ public class DepotController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findDepotByCurrentUser")
|
@GetMapping(value = "/findDepotByCurrentUser")
|
||||||
|
@ApiOperation(value = "获取当前用户拥有权限的仓库列表")
|
||||||
public BaseResponseInfo findDepotByCurrentUser(HttpServletRequest request) throws Exception{
|
public BaseResponseInfo findDepotByCurrentUser(HttpServletRequest request) throws Exception{
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -128,7 +140,15 @@ public class DepotController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新默认仓库
|
||||||
|
* @param object
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@PostMapping(value = "/updateIsDefault")
|
@PostMapping(value = "/updateIsDefault")
|
||||||
|
@ApiOperation(value = "更新默认仓库")
|
||||||
public String updateIsDefault(@RequestBody JSONObject object,
|
public String updateIsDefault(@RequestBody JSONObject object,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
Long depotId = object.getLong("id");
|
Long depotId = object.getLong("id");
|
||||||
@@ -141,7 +161,14 @@ public class DepotController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库列表-带库存
|
||||||
|
* @param mId
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getAllListWithStock")
|
@GetMapping(value = "/getAllListWithStock")
|
||||||
|
@ApiOperation(value = "仓库列表-带库存")
|
||||||
public BaseResponseInfo getAllList(@RequestParam("mId") Long mId,
|
public BaseResponseInfo getAllList(@RequestParam("mId") Long mId,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import com.jsh.erp.service.log.LogService;
|
|||||||
import com.jsh.erp.service.redis.RedisService;
|
import com.jsh.erp.service.redis.RedisService;
|
||||||
import com.jsh.erp.service.supplier.SupplierService;
|
import com.jsh.erp.service.supplier.SupplierService;
|
||||||
import com.jsh.erp.utils.*;
|
import com.jsh.erp.utils.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -41,6 +43,7 @@ import static com.jsh.erp.utils.Tools.getNow3;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/depotHead")
|
@RequestMapping(value = "/depotHead")
|
||||||
|
@Api(tags = {"单据管理"})
|
||||||
public class DepotHeadController {
|
public class DepotHeadController {
|
||||||
private Logger logger = LoggerFactory.getLogger(DepotHeadController.class);
|
private Logger logger = LoggerFactory.getLogger(DepotHeadController.class);
|
||||||
|
|
||||||
@@ -63,6 +66,7 @@ public class DepotHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/batchSetStatus")
|
@PostMapping(value = "/batchSetStatus")
|
||||||
|
@ApiOperation(value = "批量设置状态-审核或者反审核")
|
||||||
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
Map<String, Object> objectMap = new HashMap<>();
|
Map<String, Object> objectMap = new HashMap<>();
|
||||||
@@ -90,6 +94,7 @@ public class DepotHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findInDetail")
|
@GetMapping(value = "/findInDetail")
|
||||||
|
@ApiOperation(value = "入库出库明细接口")
|
||||||
public BaseResponseInfo findInDetail(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo findInDetail(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("organId") Integer oId,
|
@RequestParam("organId") Integer oId,
|
||||||
@@ -139,6 +144,7 @@ public class DepotHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findInOutMaterialCount")
|
@GetMapping(value = "/findInOutMaterialCount")
|
||||||
|
@ApiOperation(value = "入库出库统计接口")
|
||||||
public BaseResponseInfo findInOutMaterialCount(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo findInOutMaterialCount(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("organId") Integer oId,
|
@RequestParam("organId") Integer oId,
|
||||||
@@ -175,6 +181,7 @@ public class DepotHeadController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 调拨明细统计
|
||||||
* @param currentPage
|
* @param currentPage
|
||||||
* @param pageSize
|
* @param pageSize
|
||||||
* @param oId
|
* @param oId
|
||||||
@@ -188,6 +195,7 @@ public class DepotHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findAllocationDetail")
|
@GetMapping(value = "/findAllocationDetail")
|
||||||
|
@ApiOperation(value = "调拨明细统计")
|
||||||
public BaseResponseInfo findallocationDetail(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo findallocationDetail(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("organId") Integer oId,
|
@RequestParam("organId") Integer oId,
|
||||||
@@ -229,6 +237,7 @@ public class DepotHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findStatementAccount")
|
@GetMapping(value = "/findStatementAccount")
|
||||||
|
@ApiOperation(value = "对账单接口")
|
||||||
public BaseResponseInfo findStatementAccount(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo findStatementAccount(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("beginTime") String beginTime,
|
@RequestParam("beginTime") String beginTime,
|
||||||
@@ -281,6 +290,7 @@ public class DepotHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getDetailByNumber")
|
@GetMapping(value = "/getDetailByNumber")
|
||||||
|
@ApiOperation(value = "根据编号查询单据信息")
|
||||||
public BaseResponseInfo getDetailByNumber(@RequestParam("number") String number,
|
public BaseResponseInfo getDetailByNumber(@RequestParam("number") String number,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
@@ -308,6 +318,7 @@ public class DepotHeadController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/addDepotHeadAndDetail")
|
@PostMapping(value = "/addDepotHeadAndDetail")
|
||||||
|
@ApiOperation(value = "新增单据主表及单据子表信息")
|
||||||
public Object addDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
|
public Object addDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
String beanJson = body.getInfo();
|
String beanJson = body.getInfo();
|
||||||
@@ -324,6 +335,7 @@ public class DepotHeadController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@PutMapping(value = "/updateDepotHeadAndDetail")
|
@PutMapping(value = "/updateDepotHeadAndDetail")
|
||||||
|
@ApiOperation(value = "更新单据主表及单据子表信息")
|
||||||
public Object updateDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
|
public Object updateDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
String beanJson = body.getInfo();
|
String beanJson = body.getInfo();
|
||||||
@@ -338,6 +350,7 @@ public class DepotHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getBuyAndSaleStatistics")
|
@GetMapping(value = "/getBuyAndSaleStatistics")
|
||||||
|
@ApiOperation(value = "统计今日销售额、今日进货额、本月销售额、本月进货额")
|
||||||
public BaseResponseInfo getBuyAndSaleStatistics(HttpServletRequest request) {
|
public BaseResponseInfo getBuyAndSaleStatistics(HttpServletRequest request) {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -377,6 +390,7 @@ public class DepotHeadController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getCreatorByCurrentUser")
|
@GetMapping(value = "/getCreatorByCurrentUser")
|
||||||
|
@ApiOperation(value = "根据当前用户获取操作员数组")
|
||||||
public BaseResponseInfo getCreatorByRoleType(HttpServletRequest request) {
|
public BaseResponseInfo getCreatorByRoleType(HttpServletRequest request) {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -404,6 +418,7 @@ public class DepotHeadController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/debtList")
|
@GetMapping(value = "/debtList")
|
||||||
|
@ApiOperation(value = "查询存在欠款的单据")
|
||||||
public String debtList(@RequestParam(value = Constants.SEARCH, required = false) String search,
|
public String debtList(@RequestParam(value = Constants.SEARCH, required = false) String search,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
Map<String, Object> objectMap = new HashMap<>();
|
Map<String, Object> objectMap = new HashMap<>();
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import com.jsh.erp.service.material.MaterialService;
|
|||||||
import com.jsh.erp.service.redis.RedisService;
|
import com.jsh.erp.service.redis.RedisService;
|
||||||
import com.jsh.erp.service.unit.UnitService;
|
import com.jsh.erp.service.unit.UnitService;
|
||||||
import com.jsh.erp.utils.*;
|
import com.jsh.erp.utils.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -35,6 +37,7 @@ import static com.jsh.erp.utils.Tools.getCenternTime;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/depotItem")
|
@RequestMapping(value = "/depotItem")
|
||||||
|
@Api(tags = {"单据明细"})
|
||||||
public class DepotItemController {
|
public class DepotItemController {
|
||||||
private Logger logger = LoggerFactory.getLogger(DepotItemController.class);
|
private Logger logger = LoggerFactory.getLogger(DepotItemController.class);
|
||||||
|
|
||||||
@@ -60,6 +63,7 @@ public class DepotItemController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findDetailByTypeAndMaterialId")
|
@GetMapping(value = "/findDetailByTypeAndMaterialId")
|
||||||
|
@ApiOperation(value = "只根据商品id查询单据列表")
|
||||||
public String findDetailByTypeAndMaterialId(
|
public String findDetailByTypeAndMaterialId(
|
||||||
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
|
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
|
||||||
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
|
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
|
||||||
@@ -114,6 +118,7 @@ public class DepotItemController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findStockByDepotAndBarCode")
|
@GetMapping(value = "/findStockByDepotAndBarCode")
|
||||||
|
@ApiOperation(value = "根据商品条码和仓库id查询库存数量")
|
||||||
public BaseResponseInfo findStockByDepotAndBarCode(
|
public BaseResponseInfo findStockByDepotAndBarCode(
|
||||||
@RequestParam("depotId") Long depotId,
|
@RequestParam("depotId") Long depotId,
|
||||||
@RequestParam("barCode") String barCode,
|
@RequestParam("barCode") String barCode,
|
||||||
@@ -154,7 +159,16 @@ public class DepotItemController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据明细列表
|
||||||
|
* @param headerId
|
||||||
|
* @param mpList
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getDetailList")
|
@GetMapping(value = "/getDetailList")
|
||||||
|
@ApiOperation(value = "单据明细列表")
|
||||||
public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
|
public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
|
||||||
@RequestParam("mpList") String mpList,
|
@RequestParam("mpList") String mpList,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
@@ -272,6 +286,7 @@ public class DepotItemController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findByAll")
|
@GetMapping(value = "/findByAll")
|
||||||
|
@ApiOperation(value = "查找所有的明细")
|
||||||
public BaseResponseInfo findByAll(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo findByAll(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("depotId") Long depotId,
|
@RequestParam("depotId") Long depotId,
|
||||||
@@ -346,6 +361,7 @@ public class DepotItemController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/totalCountMoney")
|
@GetMapping(value = "/totalCountMoney")
|
||||||
|
@ApiOperation(value = "统计总计金额")
|
||||||
public BaseResponseInfo totalCountMoney(@RequestParam("depotId") Long depotId,
|
public BaseResponseInfo totalCountMoney(@RequestParam("depotId") Long depotId,
|
||||||
@RequestParam("monthTime") String monthTime,
|
@RequestParam("monthTime") String monthTime,
|
||||||
@RequestParam("materialParam") String materialParam,
|
@RequestParam("materialParam") String materialParam,
|
||||||
@@ -390,6 +406,7 @@ public class DepotItemController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/buyIn")
|
@GetMapping(value = "/buyIn")
|
||||||
|
@ApiOperation(value = "进货统计")
|
||||||
public BaseResponseInfo buyIn(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo buyIn(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("monthTime") String monthTime,
|
@RequestParam("monthTime") String monthTime,
|
||||||
@@ -453,6 +470,7 @@ public class DepotItemController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/saleOut")
|
@GetMapping(value = "/saleOut")
|
||||||
|
@ApiOperation(value = "销售统计")
|
||||||
public BaseResponseInfo saleOut(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo saleOut(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("monthTime") String monthTime,
|
@RequestParam("monthTime") String monthTime,
|
||||||
@@ -534,6 +552,7 @@ public class DepotItemController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findStockWarningCount")
|
@GetMapping(value = "/findStockWarningCount")
|
||||||
|
@ApiOperation(value = "库存预警报表")
|
||||||
public BaseResponseInfo findStockWarningCount(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo findStockWarningCount(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("materialParam") String materialParam,
|
@RequestParam("materialParam") String materialParam,
|
||||||
@@ -585,6 +604,7 @@ public class DepotItemController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/buyOrSalePrice")
|
@GetMapping(value = "/buyOrSalePrice")
|
||||||
|
@ApiOperation(value = "统计采购或销售的总金额")
|
||||||
public BaseResponseInfo buyOrSalePrice(HttpServletRequest request, HttpServletResponse response)throws Exception {
|
public BaseResponseInfo buyOrSalePrice(HttpServletRequest request, HttpServletResponse response)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -627,6 +647,7 @@ public class DepotItemController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getBatchNumberList")
|
@GetMapping(value = "/getBatchNumberList")
|
||||||
|
@ApiOperation(value = "获取批次商品列表信息")
|
||||||
public BaseResponseInfo getBatchNumberList(@RequestParam("name") String name,
|
public BaseResponseInfo getBatchNumberList(@RequestParam("name") String name,
|
||||||
@RequestParam("depotId") Long depotId,
|
@RequestParam("depotId") Long depotId,
|
||||||
@RequestParam("barCode") String barCode,
|
@RequestParam("barCode") String barCode,
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import com.jsh.erp.service.userBusiness.UserBusinessService;
|
|||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
import com.jsh.erp.utils.StringUtil;
|
import com.jsh.erp.utils.StringUtil;
|
||||||
import com.jsh.erp.utils.Tools;
|
import com.jsh.erp.utils.Tools;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
@@ -29,6 +31,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/function")
|
@RequestMapping(value = "/function")
|
||||||
|
@Api(tags = {"功能管理"})
|
||||||
public class FunctionController {
|
public class FunctionController {
|
||||||
private Logger logger = LoggerFactory.getLogger(FunctionController.class);
|
private Logger logger = LoggerFactory.getLogger(FunctionController.class);
|
||||||
|
|
||||||
@@ -38,7 +41,15 @@ public class FunctionController {
|
|||||||
@Resource
|
@Resource
|
||||||
private UserBusinessService userBusinessService;
|
private UserBusinessService userBusinessService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据父编号查询菜单
|
||||||
|
* @param jsonObject
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@PostMapping(value = "/findMenuByPNumber")
|
@PostMapping(value = "/findMenuByPNumber")
|
||||||
|
@ApiOperation(value = "根据父编号查询菜单")
|
||||||
public JSONArray findMenuByPNumber(@RequestBody JSONObject jsonObject,
|
public JSONArray findMenuByPNumber(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
String pNumber = jsonObject.getString("pNumber");
|
String pNumber = jsonObject.getString("pNumber");
|
||||||
@@ -110,6 +121,7 @@ public class FunctionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findRoleFunction")
|
@GetMapping(value = "/findRoleFunction")
|
||||||
|
@ApiOperation(value = "角色对应功能显示")
|
||||||
public JSONArray findRoleFunction(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
public JSONArray findRoleFunction(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
@@ -183,6 +195,7 @@ public class FunctionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findRoleFunctionsById")
|
@GetMapping(value = "/findRoleFunctionsById")
|
||||||
|
@ApiOperation(value = "根据id列表查找功能信息")
|
||||||
public BaseResponseInfo findByIds(@RequestParam("roleId") Long roleId,
|
public BaseResponseInfo findByIds(@RequestParam("roleId") Long roleId,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import com.jsh.erp.datasource.entities.InOutItem;
|
|||||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||||
import com.jsh.erp.service.inOutItem.InOutItemService;
|
import com.jsh.erp.service.inOutItem.InOutItemService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -23,6 +25,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/inOutItem")
|
@RequestMapping(value = "/inOutItem")
|
||||||
|
@Api(tags = {"收支项目"})
|
||||||
public class InOutItemController {
|
public class InOutItemController {
|
||||||
private Logger logger = LoggerFactory.getLogger(InOutItemController.class);
|
private Logger logger = LoggerFactory.getLogger(InOutItemController.class);
|
||||||
|
|
||||||
@@ -35,6 +38,7 @@ public class InOutItemController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findBySelect")
|
@GetMapping(value = "/findBySelect")
|
||||||
|
@ApiOperation(value = "查找收支项目信息")
|
||||||
public String findBySelect(@RequestParam("type") String type, HttpServletRequest request) throws Exception{
|
public String findBySelect(@RequestParam("type") String type, HttpServletRequest request) throws Exception{
|
||||||
String res = null;
|
String res = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.jsh.erp.datasource.entities.MaterialAttribute;
|
import com.jsh.erp.datasource.entities.MaterialAttribute;
|
||||||
import com.jsh.erp.service.materialAttribute.MaterialAttributeService;
|
import com.jsh.erp.service.materialAttribute.MaterialAttributeService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -20,13 +22,21 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/materialAttribute")
|
@RequestMapping(value = "/materialAttribute")
|
||||||
|
@Api(tags = {"商品属性"})
|
||||||
public class MaterialAttributeController {
|
public class MaterialAttributeController {
|
||||||
private Logger logger = LoggerFactory.getLogger(MaterialAttributeController.class);
|
private Logger logger = LoggerFactory.getLogger(MaterialAttributeController.class);
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MaterialAttributeService materialAttributeService;
|
private MaterialAttributeService materialAttributeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部商品属性
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping("/getAll")
|
@GetMapping("/getAll")
|
||||||
|
@ApiOperation(value = "获取全部商品属性")
|
||||||
public BaseResponseInfo getAll(HttpServletRequest request)throws Exception {
|
public BaseResponseInfo getAll(HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import com.jsh.erp.datasource.vo.TreeNode;
|
|||||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||||
import com.jsh.erp.service.materialCategory.MaterialCategoryService;
|
import com.jsh.erp.service.materialCategory.MaterialCategoryService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -24,13 +26,22 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/materialCategory")
|
@RequestMapping(value = "/materialCategory")
|
||||||
|
@Api(tags = {"商品类别"})
|
||||||
public class MaterialCategoryController {
|
public class MaterialCategoryController {
|
||||||
private Logger logger = LoggerFactory.getLogger(MaterialCategoryController.class);
|
private Logger logger = LoggerFactory.getLogger(MaterialCategoryController.class);
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MaterialCategoryService materialCategoryService;
|
private MaterialCategoryService materialCategoryService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部商品类别
|
||||||
|
* @param parentId
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getAllList")
|
@GetMapping(value = "/getAllList")
|
||||||
|
@ApiOperation(value = "获取全部商品类别")
|
||||||
public BaseResponseInfo getAllList(@RequestParam("parentId") Long parentId, HttpServletRequest request) throws Exception{
|
public BaseResponseInfo getAllList(@RequestParam("parentId") Long parentId, HttpServletRequest request) throws Exception{
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -52,6 +63,7 @@ public class MaterialCategoryController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findById")
|
@GetMapping(value = "/findById")
|
||||||
|
@ApiOperation(value = "根据id来查询商品名称")
|
||||||
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request)throws Exception {
|
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -89,6 +101,7 @@ public class MaterialCategoryController {
|
|||||||
* @return com.alibaba.fastjson.JSONArray
|
* @return com.alibaba.fastjson.JSONArray
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/getMaterialCategoryTree")
|
@RequestMapping(value = "/getMaterialCategoryTree")
|
||||||
|
@ApiOperation(value = "获取商品类别树数据")
|
||||||
public JSONArray getMaterialCategoryTree(@RequestParam("id") Long id) throws Exception{
|
public JSONArray getMaterialCategoryTree(@RequestParam("id") Long id) throws Exception{
|
||||||
JSONArray arr=new JSONArray();
|
JSONArray arr=new JSONArray();
|
||||||
List<TreeNode> materialCategoryTree = materialCategoryService.getMaterialCategoryTree(id);
|
List<TreeNode> materialCategoryTree = materialCategoryService.getMaterialCategoryTree(id);
|
||||||
@@ -110,6 +123,7 @@ public class MaterialCategoryController {
|
|||||||
* @return java.lang.Object
|
* @return java.lang.Object
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/addMaterialCategory")
|
@RequestMapping(value = "/addMaterialCategory")
|
||||||
|
@ApiOperation(value = "新增商品类别数据")
|
||||||
public Object addMaterialCategory(@RequestParam("info") String beanJson) throws Exception {
|
public Object addMaterialCategory(@RequestParam("info") String beanJson) throws Exception {
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
MaterialCategory mc= JSON.parseObject(beanJson, MaterialCategory.class);
|
MaterialCategory mc= JSON.parseObject(beanJson, MaterialCategory.class);
|
||||||
@@ -129,6 +143,7 @@ public class MaterialCategoryController {
|
|||||||
* @return java.lang.Object
|
* @return java.lang.Object
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/editMaterialCategory")
|
@RequestMapping(value = "/editMaterialCategory")
|
||||||
|
@ApiOperation(value = "修改商品类别数据")
|
||||||
public Object editMaterialCategory(@RequestParam("info") String beanJson) throws Exception {
|
public Object editMaterialCategory(@RequestParam("info") String beanJson) throws Exception {
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
MaterialCategory mc= JSON.parseObject(beanJson, MaterialCategory.class);
|
MaterialCategory mc= JSON.parseObject(beanJson, MaterialCategory.class);
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import com.jsh.erp.service.material.MaterialService;
|
|||||||
import com.jsh.erp.service.redis.RedisService;
|
import com.jsh.erp.service.redis.RedisService;
|
||||||
import com.jsh.erp.service.unit.UnitService;
|
import com.jsh.erp.service.unit.UnitService;
|
||||||
import com.jsh.erp.utils.*;
|
import com.jsh.erp.utils.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import jxl.Sheet;
|
import jxl.Sheet;
|
||||||
import jxl.Workbook;
|
import jxl.Workbook;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -34,6 +36,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/material")
|
@RequestMapping(value = "/material")
|
||||||
|
@Api(tags = {"商品管理"})
|
||||||
public class MaterialController {
|
public class MaterialController {
|
||||||
private Logger logger = LoggerFactory.getLogger(MaterialController.class);
|
private Logger logger = LoggerFactory.getLogger(MaterialController.class);
|
||||||
|
|
||||||
@@ -52,7 +55,25 @@ public class MaterialController {
|
|||||||
@Resource
|
@Resource
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查商品是否存在
|
||||||
|
* @param id
|
||||||
|
* @param name
|
||||||
|
* @param model
|
||||||
|
* @param color
|
||||||
|
* @param standard
|
||||||
|
* @param mfrs
|
||||||
|
* @param otherField1
|
||||||
|
* @param otherField2
|
||||||
|
* @param otherField3
|
||||||
|
* @param unit
|
||||||
|
* @param unitId
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/checkIsExist")
|
@GetMapping(value = "/checkIsExist")
|
||||||
|
@ApiOperation(value = "检查商品是否存在")
|
||||||
public String checkIsExist(@RequestParam("id") Long id, @RequestParam("name") String name,
|
public String checkIsExist(@RequestParam("id") Long id, @RequestParam("name") String name,
|
||||||
@RequestParam("model") String model, @RequestParam("color") String color,
|
@RequestParam("model") String model, @RequestParam("color") String color,
|
||||||
@RequestParam("standard") String standard, @RequestParam("mfrs") String mfrs,
|
@RequestParam("standard") String standard, @RequestParam("mfrs") String mfrs,
|
||||||
@@ -79,6 +100,7 @@ public class MaterialController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/batchSetStatus")
|
@PostMapping(value = "/batchSetStatus")
|
||||||
|
@ApiOperation(value = "批量设置状态-启用或者禁用")
|
||||||
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
Boolean status = jsonObject.getBoolean("status");
|
Boolean status = jsonObject.getBoolean("status");
|
||||||
@@ -99,6 +121,7 @@ public class MaterialController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findById")
|
@GetMapping(value = "/findById")
|
||||||
|
@ApiOperation(value = "根据id来查询商品名称")
|
||||||
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request) throws Exception{
|
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request) throws Exception{
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -120,6 +143,7 @@ public class MaterialController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findByIdWithBarCode")
|
@GetMapping(value = "/findByIdWithBarCode")
|
||||||
|
@ApiOperation(value = "根据meId来查询商品名称")
|
||||||
public BaseResponseInfo findByIdWithBarCode(@RequestParam("meId") Long meId,
|
public BaseResponseInfo findByIdWithBarCode(@RequestParam("meId") Long meId,
|
||||||
@RequestParam("mpList") String mpList,
|
@RequestParam("mpList") String mpList,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
@@ -164,6 +188,7 @@ public class MaterialController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findBySelect")
|
@GetMapping(value = "/findBySelect")
|
||||||
|
@ApiOperation(value = "查找商品信息")
|
||||||
public JSONObject findBySelect(@RequestParam(value = "categoryId", required = false) Long categoryId,
|
public JSONObject findBySelect(@RequestParam(value = "categoryId", required = false) Long categoryId,
|
||||||
@RequestParam(value = "q", required = false) String q,
|
@RequestParam(value = "q", required = false) String q,
|
||||||
@RequestParam("mpList") String mpList,
|
@RequestParam("mpList") String mpList,
|
||||||
@@ -251,6 +276,7 @@ public class MaterialController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getMaterialByMeId")
|
@GetMapping(value = "/getMaterialByMeId")
|
||||||
|
@ApiOperation(value = "根据商品id查找商品信息")
|
||||||
public JSONObject getMaterialByMeId(@RequestParam(value = "meId", required = false) Long meId,
|
public JSONObject getMaterialByMeId(@RequestParam(value = "meId", required = false) Long meId,
|
||||||
@RequestParam("mpList") String mpList,
|
@RequestParam("mpList") String mpList,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
@@ -317,6 +343,7 @@ public class MaterialController {
|
|||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/exportExcel")
|
@GetMapping(value = "/exportExcel")
|
||||||
|
@ApiOperation(value = "生成excel表格")
|
||||||
public void exportExcel(@RequestParam("categoryId") String categoryId,
|
public void exportExcel(@RequestParam("categoryId") String categoryId,
|
||||||
@RequestParam("barCode") String barCode,
|
@RequestParam("barCode") String barCode,
|
||||||
@RequestParam("name") String name,
|
@RequestParam("name") String name,
|
||||||
@@ -361,6 +388,7 @@ public class MaterialController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/importExcel")
|
@PostMapping(value = "/importExcel")
|
||||||
|
@ApiOperation(value = "excel表格导入产品")
|
||||||
public BaseResponseInfo importExcel(MultipartFile file,
|
public BaseResponseInfo importExcel(MultipartFile file,
|
||||||
HttpServletRequest request, HttpServletResponse response) throws Exception{
|
HttpServletRequest request, HttpServletResponse response) throws Exception{
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
@@ -387,7 +415,19 @@ public class MaterialController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商品序列号
|
||||||
|
* @param q
|
||||||
|
* @param currentPage
|
||||||
|
* @param pageSize
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getMaterialEnableSerialNumberList")
|
@GetMapping(value = "/getMaterialEnableSerialNumberList")
|
||||||
|
@ApiOperation(value = "获取商品序列号")
|
||||||
public JSONObject getMaterialEnableSerialNumberList(
|
public JSONObject getMaterialEnableSerialNumberList(
|
||||||
@RequestParam(value = "q", required = false) String q,
|
@RequestParam(value = "q", required = false) String q,
|
||||||
@RequestParam("page") Integer currentPage,
|
@RequestParam("page") Integer currentPage,
|
||||||
@@ -406,7 +446,13 @@ public class MaterialController {
|
|||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最大条码
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getMaxBarCode")
|
@GetMapping(value = "/getMaxBarCode")
|
||||||
|
@ApiOperation(value = "获取最大条码")
|
||||||
public BaseResponseInfo getMaxBarCode() throws Exception {
|
public BaseResponseInfo getMaxBarCode() throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -423,6 +469,7 @@ public class MaterialController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getMaterialNameList")
|
@GetMapping(value = "/getMaterialNameList")
|
||||||
|
@ApiOperation(value = "商品名称模糊匹配")
|
||||||
public JSONArray getMaterialNameList() throws Exception {
|
public JSONArray getMaterialNameList() throws Exception {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
try {
|
try {
|
||||||
@@ -445,6 +492,7 @@ public class MaterialController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getMaterialByBarCode")
|
@GetMapping(value = "/getMaterialByBarCode")
|
||||||
|
@ApiOperation(value = "根据条码查询商品信息")
|
||||||
public BaseResponseInfo getMaterialByBarCode(@RequestParam("barCode") String barCode,
|
public BaseResponseInfo getMaterialByBarCode(@RequestParam("barCode") String barCode,
|
||||||
@RequestParam("mpList") String mpList,
|
@RequestParam("mpList") String mpList,
|
||||||
@RequestParam(required = false, value = "prefixNo") String prefixNo,
|
@RequestParam(required = false, value = "prefixNo") String prefixNo,
|
||||||
@@ -541,6 +589,7 @@ public class MaterialController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getListWithStock")
|
@GetMapping(value = "/getListWithStock")
|
||||||
|
@ApiOperation(value = "商品库存查询")
|
||||||
public BaseResponseInfo getListWithStock(@RequestParam("currentPage") Integer currentPage,
|
public BaseResponseInfo getListWithStock(@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@RequestParam("depotId") Long depotId,
|
@RequestParam("depotId") Long depotId,
|
||||||
@@ -585,6 +634,7 @@ public class MaterialController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/batchSetMaterialCurrentStock")
|
@PostMapping(value = "/batchSetMaterialCurrentStock")
|
||||||
|
@ApiOperation(value = "批量设置商品当前的实时库存(按每个仓库)")
|
||||||
public String batchSetMaterialCurrentStock(@RequestBody JSONObject jsonObject,
|
public String batchSetMaterialCurrentStock(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
String ids = jsonObject.getString("ids");
|
String ids = jsonObject.getString("ids");
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import com.jsh.erp.datasource.vo.MaterialExtendVo4List;
|
|||||||
import com.jsh.erp.service.materialExtend.MaterialExtendService;
|
import com.jsh.erp.service.materialExtend.MaterialExtendService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
import com.jsh.erp.utils.StringUtil;
|
import com.jsh.erp.utils.StringUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -23,12 +25,14 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/materialsExtend")
|
@RequestMapping(value = "/materialsExtend")
|
||||||
|
@Api(tags = {"商品价格扩展"})
|
||||||
public class MaterialExtendController {
|
public class MaterialExtendController {
|
||||||
private Logger logger = LoggerFactory.getLogger(MaterialExtendController.class);
|
private Logger logger = LoggerFactory.getLogger(MaterialExtendController.class);
|
||||||
@Resource
|
@Resource
|
||||||
private MaterialExtendService materialExtendService;
|
private MaterialExtendService materialExtendService;
|
||||||
|
|
||||||
@GetMapping(value = "/getDetailList")
|
@GetMapping(value = "/getDetailList")
|
||||||
|
@ApiOperation(value = "价格信息列表")
|
||||||
public BaseResponseInfo getDetailList(@RequestParam("materialId") Long materialId,
|
public BaseResponseInfo getDetailList(@RequestParam("materialId") Long materialId,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
@@ -69,7 +73,15 @@ public class MaterialExtendController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条码查询商品信息
|
||||||
|
* @param barCode
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getInfoByBarCode")
|
@GetMapping(value = "/getInfoByBarCode")
|
||||||
|
@ApiOperation(value = "根据条码查询商品信息")
|
||||||
public BaseResponseInfo getInfoByBarCode(@RequestParam("barCode") String barCode,
|
public BaseResponseInfo getInfoByBarCode(@RequestParam("barCode") String barCode,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
@@ -86,7 +98,16 @@ public class MaterialExtendController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验条码是否存在
|
||||||
|
* @param id
|
||||||
|
* @param barCode
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/checkIsBarCodeExist")
|
@GetMapping(value = "/checkIsBarCodeExist")
|
||||||
|
@ApiOperation(value = "校验条码是否存在")
|
||||||
public BaseResponseInfo checkIsBarCodeExist(@RequestParam("id") Long id,
|
public BaseResponseInfo checkIsBarCodeExist(@RequestParam("id") Long id,
|
||||||
@RequestParam("barCode") String barCode,
|
@RequestParam("barCode") String barCode,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.jsh.erp.constants.ExceptionConstants;
|
|||||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||||
import com.jsh.erp.service.material.MaterialService;
|
import com.jsh.erp.service.material.MaterialService;
|
||||||
import com.jsh.erp.service.materialProperty.MaterialPropertyService;
|
import com.jsh.erp.service.materialProperty.MaterialPropertyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -22,6 +23,7 @@ import javax.annotation.Resource;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/materialProperty")
|
@RequestMapping(value = "/materialProperty")
|
||||||
|
@Api(tags = {"商品扩展字段"})
|
||||||
public class MaterialPropertyController {
|
public class MaterialPropertyController {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.jsh.erp.controller;
|
|||||||
import com.jsh.erp.datasource.entities.Msg;
|
import com.jsh.erp.datasource.entities.Msg;
|
||||||
import com.jsh.erp.service.msg.MsgService;
|
import com.jsh.erp.service.msg.MsgService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -18,13 +20,22 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/msg")
|
@RequestMapping(value = "/msg")
|
||||||
|
@Api(tags = {"消息管理"})
|
||||||
public class MsgController {
|
public class MsgController {
|
||||||
private Logger logger = LoggerFactory.getLogger(MsgController.class);
|
private Logger logger = LoggerFactory.getLogger(MsgController.class);
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MsgService msgService;
|
private MsgService msgService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据状态查询消息
|
||||||
|
* @param status
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping("/getMsgByStatus")
|
@GetMapping("/getMsgByStatus")
|
||||||
|
@ApiOperation(value = "根据状态查询消息")
|
||||||
public BaseResponseInfo getMsgByStatus(@RequestParam("status") String status,
|
public BaseResponseInfo getMsgByStatus(@RequestParam("status") String status,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
@@ -40,7 +51,16 @@ public class MsgController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新状态
|
||||||
|
* @param ids
|
||||||
|
* @param status
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@PostMapping("/batchUpdateStatus")
|
@PostMapping("/batchUpdateStatus")
|
||||||
|
@ApiOperation(value = "批量更新状态")
|
||||||
public BaseResponseInfo batchUpdateStatus(@RequestParam("ids") String ids,
|
public BaseResponseInfo batchUpdateStatus(@RequestParam("ids") String ids,
|
||||||
@RequestParam("status") String status,
|
@RequestParam("status") String status,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
@@ -57,7 +77,15 @@ public class MsgController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据状态查询数量
|
||||||
|
* @param status
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping("/getMsgCountByStatus")
|
@GetMapping("/getMsgCountByStatus")
|
||||||
|
@ApiOperation(value = "根据状态查询数量")
|
||||||
public BaseResponseInfo getMsgCountByStatus(@RequestParam("status") String status,
|
public BaseResponseInfo getMsgCountByStatus(@RequestParam("status") String status,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import com.jsh.erp.exception.BusinessRunTimeException;
|
|||||||
import com.jsh.erp.service.materialCategory.MaterialCategoryService;
|
import com.jsh.erp.service.materialCategory.MaterialCategoryService;
|
||||||
import com.jsh.erp.service.organization.OrganizationService;
|
import com.jsh.erp.service.organization.OrganizationService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -28,6 +30,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/organization")
|
@RequestMapping(value = "/organization")
|
||||||
|
@Api(tags = {"机构管理"})
|
||||||
public class OrganizationController {
|
public class OrganizationController {
|
||||||
private Logger logger = LoggerFactory.getLogger(OrganizationController.class);
|
private Logger logger = LoggerFactory.getLogger(OrganizationController.class);
|
||||||
|
|
||||||
@@ -40,6 +43,7 @@ public class OrganizationController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findById")
|
@GetMapping(value = "/findById")
|
||||||
|
@ApiOperation(value = "根据id来查询机构信息")
|
||||||
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request) throws Exception {
|
public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request) throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
@@ -80,6 +84,7 @@ public class OrganizationController {
|
|||||||
* @return com.alibaba.fastjson.JSONArray
|
* @return com.alibaba.fastjson.JSONArray
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/getOrganizationTree")
|
@RequestMapping(value = "/getOrganizationTree")
|
||||||
|
@ApiOperation(value = "获取机构树数据")
|
||||||
public JSONArray getOrganizationTree(@RequestParam("id") Long id) throws Exception{
|
public JSONArray getOrganizationTree(@RequestParam("id") Long id) throws Exception{
|
||||||
JSONArray arr=new JSONArray();
|
JSONArray arr=new JSONArray();
|
||||||
List<TreeNode> organizationTree= organizationService.getOrganizationTree(id);
|
List<TreeNode> organizationTree= organizationService.getOrganizationTree(id);
|
||||||
@@ -101,6 +106,7 @@ public class OrganizationController {
|
|||||||
* @return java.lang.Object
|
* @return java.lang.Object
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/addOrganization")
|
@PostMapping(value = "/addOrganization")
|
||||||
|
@ApiOperation(value = "新增机构信息")
|
||||||
public Object addOrganization(@RequestParam("info") String beanJson) throws Exception {
|
public Object addOrganization(@RequestParam("info") String beanJson) throws Exception {
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
Organization org= JSON.parseObject(beanJson, Organization.class);
|
Organization org= JSON.parseObject(beanJson, Organization.class);
|
||||||
@@ -120,6 +126,7 @@ public class OrganizationController {
|
|||||||
* @return java.lang.Object
|
* @return java.lang.Object
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/editOrganization")
|
@PostMapping(value = "/editOrganization")
|
||||||
|
@ApiOperation(value = "修改机构信息")
|
||||||
public Object editOrganization(@RequestParam("info") String beanJson) throws Exception {
|
public Object editOrganization(@RequestParam("info") String beanJson) throws Exception {
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
Organization org= JSON.parseObject(beanJson, Organization.class);
|
Organization org= JSON.parseObject(beanJson, Organization.class);
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import com.jsh.erp.datasource.entities.Person;
|
|||||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||||
import com.jsh.erp.service.person.PersonService;
|
import com.jsh.erp.service.person.PersonService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -23,13 +25,21 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/person")
|
@RequestMapping(value = "/person")
|
||||||
|
@Api(tags = {"经手人管理"})
|
||||||
public class PersonController {
|
public class PersonController {
|
||||||
private Logger logger = LoggerFactory.getLogger(PersonController.class);
|
private Logger logger = LoggerFactory.getLogger(PersonController.class);
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private PersonService personService;
|
private PersonService personService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全部数据列表
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getAllList")
|
@GetMapping(value = "/getAllList")
|
||||||
|
@ApiOperation(value = "全部数据列表")
|
||||||
public BaseResponseInfo getAllList(HttpServletRequest request)throws Exception {
|
public BaseResponseInfo getAllList(HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -53,6 +63,7 @@ public class PersonController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPersonByIds")
|
@GetMapping(value = "/getPersonByIds")
|
||||||
|
@ApiOperation(value = "根据Id获取经手人信息")
|
||||||
public BaseResponseInfo getPersonByIds(@RequestParam("personIds") String personIds,
|
public BaseResponseInfo getPersonByIds(@RequestParam("personIds") String personIds,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
@@ -78,6 +89,7 @@ public class PersonController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPersonByType")
|
@GetMapping(value = "/getPersonByType")
|
||||||
|
@ApiOperation(value = "根据类型获取经手人信息")
|
||||||
public BaseResponseInfo getPersonByType(@RequestParam("type") String type,
|
public BaseResponseInfo getPersonByType(@RequestParam("type") String type,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
@@ -102,6 +114,7 @@ public class PersonController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPersonByNumType")
|
@GetMapping(value = "/getPersonByNumType")
|
||||||
|
@ApiOperation(value = "根据类型获取经手人信息1-业务员,2-仓管员,3-财务员")
|
||||||
public JSONArray getPersonByNumType(@RequestParam("type") String typeNum,
|
public JSONArray getPersonByNumType(@RequestParam("type") String typeNum,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
JSONArray dataArray = new JSONArray();
|
JSONArray dataArray = new JSONArray();
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import com.jsh.erp.service.platformConfig.PlatformConfigService;
|
|||||||
import com.jsh.erp.service.user.UserService;
|
import com.jsh.erp.service.user.UserService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
import com.jsh.erp.utils.ErpInfo;
|
import com.jsh.erp.utils.ErpInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -24,6 +26,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/platformConfig")
|
@RequestMapping(value = "/platformConfig")
|
||||||
|
@Api(tags = {"平台参数"})
|
||||||
public class PlatformConfigController {
|
public class PlatformConfigController {
|
||||||
private Logger logger = LoggerFactory.getLogger(PlatformConfigController.class);
|
private Logger logger = LoggerFactory.getLogger(PlatformConfigController.class);
|
||||||
|
|
||||||
@@ -44,6 +47,7 @@ public class PlatformConfigController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPlatform/name")
|
@GetMapping(value = "/getPlatform/name")
|
||||||
|
@ApiOperation(value = "获取平台名称")
|
||||||
public String getPlatformName(HttpServletRequest request)throws Exception {
|
public String getPlatformName(HttpServletRequest request)throws Exception {
|
||||||
String res;
|
String res;
|
||||||
try {
|
try {
|
||||||
@@ -63,6 +67,7 @@ public class PlatformConfigController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPlatform/url")
|
@GetMapping(value = "/getPlatform/url")
|
||||||
|
@ApiOperation(value = "获取官方网站地址")
|
||||||
public String getPlatformUrl(HttpServletRequest request)throws Exception {
|
public String getPlatformUrl(HttpServletRequest request)throws Exception {
|
||||||
String res;
|
String res;
|
||||||
try {
|
try {
|
||||||
@@ -83,6 +88,7 @@ public class PlatformConfigController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/updatePlatformConfigByKey")
|
@PostMapping(value = "/updatePlatformConfigByKey")
|
||||||
|
@ApiOperation(value = "根据platformKey更新platformValue")
|
||||||
public String updatePlatformConfigByKey(@RequestBody JSONObject object,
|
public String updatePlatformConfigByKey(@RequestBody JSONObject object,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
Map<String, Object> objectMap = new HashMap<>();
|
Map<String, Object> objectMap = new HashMap<>();
|
||||||
@@ -103,6 +109,7 @@ public class PlatformConfigController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPlatformConfigByKey")
|
@GetMapping(value = "/getPlatformConfigByKey")
|
||||||
|
@ApiOperation(value = "根据platformKey查询信息")
|
||||||
public BaseResponseInfo getPlatformConfigByKey(@RequestParam("platformKey") String platformKey,
|
public BaseResponseInfo getPlatformConfigByKey(@RequestParam("platformKey") String platformKey,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import com.gitee.starblues.integration.operator.module.PluginInfo;
|
|||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
import com.jsh.erp.utils.ComputerInfo;
|
import com.jsh.erp.utils.ComputerInfo;
|
||||||
import com.jsh.erp.utils.StringUtil;
|
import com.jsh.erp.utils.StringUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.util.DigestUtils;
|
import org.springframework.util.DigestUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -23,6 +25,7 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/plugin")
|
@RequestMapping("/plugin")
|
||||||
|
@Api(tags = {"插件管理"})
|
||||||
public class PluginController {
|
public class PluginController {
|
||||||
|
|
||||||
|
|
||||||
@@ -37,6 +40,7 @@ public class PluginController {
|
|||||||
* @return 返回插件信息
|
* @return 返回插件信息
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
|
@ApiOperation(value = "获取插件信息")
|
||||||
public BaseResponseInfo getPluginInfo(@RequestParam(value = "name",required = false) String name,
|
public BaseResponseInfo getPluginInfo(@RequestParam(value = "name",required = false) String name,
|
||||||
@RequestParam("currentPage") Integer currentPage,
|
@RequestParam("currentPage") Integer currentPage,
|
||||||
@RequestParam("pageSize") Integer pageSize,
|
@RequestParam("pageSize") Integer pageSize,
|
||||||
@@ -73,6 +77,7 @@ public class PluginController {
|
|||||||
* @return 获取插件文件名。只在生产环境显示
|
* @return 获取插件文件名。只在生产环境显示
|
||||||
*/
|
*/
|
||||||
@GetMapping("/files")
|
@GetMapping("/files")
|
||||||
|
@ApiOperation(value = "获取插件jar文件名")
|
||||||
public Set<String> getPluginFilePaths(){
|
public Set<String> getPluginFilePaths(){
|
||||||
try {
|
try {
|
||||||
return pluginOperator.getPluginFilePaths();
|
return pluginOperator.getPluginFilePaths();
|
||||||
@@ -89,6 +94,7 @@ public class PluginController {
|
|||||||
* @return 返回操作结果
|
* @return 返回操作结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/stop/{id}")
|
@PostMapping("/stop/{id}")
|
||||||
|
@ApiOperation(value = "根据插件id停止插件")
|
||||||
public BaseResponseInfo stop(@PathVariable("id") String id){
|
public BaseResponseInfo stop(@PathVariable("id") String id){
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -117,6 +123,7 @@ public class PluginController {
|
|||||||
* @return 返回操作结果
|
* @return 返回操作结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/start/{id}")
|
@PostMapping("/start/{id}")
|
||||||
|
@ApiOperation(value = "根据插件id启动插件")
|
||||||
public BaseResponseInfo start(@PathVariable("id") String id){
|
public BaseResponseInfo start(@PathVariable("id") String id){
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -146,6 +153,7 @@ public class PluginController {
|
|||||||
* @return 返回操作结果
|
* @return 返回操作结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/uninstall/{id}")
|
@PostMapping("/uninstall/{id}")
|
||||||
|
@ApiOperation(value = "根据插件id卸载插件")
|
||||||
public BaseResponseInfo uninstall(@PathVariable("id") String id){
|
public BaseResponseInfo uninstall(@PathVariable("id") String id){
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -175,6 +183,7 @@ public class PluginController {
|
|||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/installByPath")
|
@PostMapping("/installByPath")
|
||||||
|
@ApiOperation(value = "根据插件路径安装插件")
|
||||||
public String install(@RequestParam("path") String path){
|
public String install(@RequestParam("path") String path){
|
||||||
try {
|
try {
|
||||||
if(pluginOperator.install(Paths.get(path))){
|
if(pluginOperator.install(Paths.get(path))){
|
||||||
@@ -195,6 +204,7 @@ public class PluginController {
|
|||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/uploadInstallPluginJar")
|
@PostMapping("/uploadInstallPluginJar")
|
||||||
|
@ApiOperation(value = "上传并安装插件")
|
||||||
public BaseResponseInfo install(MultipartFile file, HttpServletRequest request, HttpServletResponse response){
|
public BaseResponseInfo install(MultipartFile file, HttpServletRequest request, HttpServletResponse response){
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -215,6 +225,7 @@ public class PluginController {
|
|||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/uploadPluginConfigFile")
|
@PostMapping("/uploadPluginConfigFile")
|
||||||
|
@ApiOperation(value = "上传插件的配置文件")
|
||||||
public String uploadConfig(@RequestParam("configFile") MultipartFile multipartFile){
|
public String uploadConfig(@RequestParam("configFile") MultipartFile multipartFile){
|
||||||
try {
|
try {
|
||||||
if(pluginOperator.uploadConfigFile(multipartFile)){
|
if(pluginOperator.uploadConfigFile(multipartFile)){
|
||||||
@@ -235,6 +246,7 @@ public class PluginController {
|
|||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/back/{pluginId}")
|
@PostMapping("/back/{pluginId}")
|
||||||
|
@ApiOperation(value = "备份插件")
|
||||||
public String backupPlugin(@PathVariable("pluginId") String pluginId){
|
public String backupPlugin(@PathVariable("pluginId") String pluginId){
|
||||||
try {
|
try {
|
||||||
if(pluginOperator.backupPlugin(pluginId, "testBack")){
|
if(pluginOperator.backupPlugin(pluginId, "testBack")){
|
||||||
@@ -253,6 +265,7 @@ public class PluginController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getMacWithSecret")
|
@GetMapping("/getMacWithSecret")
|
||||||
|
@ApiOperation(value = "获取加密后的mac")
|
||||||
public BaseResponseInfo getMacWithSecret(){
|
public BaseResponseInfo getMacWithSecret(){
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.jsh.erp.constants.BusinessConstants;
|
import com.jsh.erp.constants.BusinessConstants;
|
||||||
import com.jsh.erp.service.CommonQueryManager;
|
import com.jsh.erp.service.CommonQueryManager;
|
||||||
import com.jsh.erp.utils.*;
|
import com.jsh.erp.utils.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -21,12 +23,14 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
* by jishenghua 2018-9-12 23:58:10 华夏erp
|
* by jishenghua 2018-9-12 23:58:10 华夏erp
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
@Api(tags = {"资源接口"})
|
||||||
public class ResourceController {
|
public class ResourceController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private CommonQueryManager configResourceManager;
|
private CommonQueryManager configResourceManager;
|
||||||
|
|
||||||
@GetMapping(value = "/{apiName}/info")
|
@GetMapping(value = "/{apiName}/info")
|
||||||
|
@ApiOperation(value = "根据id获取信息")
|
||||||
public String getList(@PathVariable("apiName") String apiName,
|
public String getList(@PathVariable("apiName") String apiName,
|
||||||
@RequestParam("id") Long id,
|
@RequestParam("id") Long id,
|
||||||
HttpServletRequest request) throws Exception {
|
HttpServletRequest request) throws Exception {
|
||||||
@@ -41,6 +45,7 @@ public class ResourceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/{apiName}/list")
|
@GetMapping(value = "/{apiName}/list")
|
||||||
|
@ApiOperation(value = "获取信息列表")
|
||||||
public String getList(@PathVariable("apiName") String apiName,
|
public String getList(@PathVariable("apiName") String apiName,
|
||||||
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
|
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
|
||||||
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
|
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
|
||||||
@@ -69,6 +74,7 @@ public class ResourceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/{apiName}/add", produces = {"application/javascript", "application/json"})
|
@PostMapping(value = "/{apiName}/add", produces = {"application/javascript", "application/json"})
|
||||||
|
@ApiOperation(value = "新增")
|
||||||
public String addResource(@PathVariable("apiName") String apiName,
|
public String addResource(@PathVariable("apiName") String apiName,
|
||||||
@RequestBody JSONObject obj, HttpServletRequest request)throws Exception {
|
@RequestBody JSONObject obj, HttpServletRequest request)throws Exception {
|
||||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||||
@@ -83,6 +89,7 @@ public class ResourceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping(value = "/{apiName}/update", produces = {"application/javascript", "application/json"})
|
@PutMapping(value = "/{apiName}/update", produces = {"application/javascript", "application/json"})
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
public String updateResource(@PathVariable("apiName") String apiName,
|
public String updateResource(@PathVariable("apiName") String apiName,
|
||||||
@RequestBody JSONObject obj, HttpServletRequest request)throws Exception {
|
@RequestBody JSONObject obj, HttpServletRequest request)throws Exception {
|
||||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||||
@@ -97,6 +104,7 @@ public class ResourceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping(value = "/{apiName}/delete", produces = {"application/javascript", "application/json"})
|
@DeleteMapping(value = "/{apiName}/delete", produces = {"application/javascript", "application/json"})
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
public String deleteResource(@PathVariable("apiName") String apiName,
|
public String deleteResource(@PathVariable("apiName") String apiName,
|
||||||
@RequestParam("id") Long id, HttpServletRequest request)throws Exception {
|
@RequestParam("id") Long id, HttpServletRequest request)throws Exception {
|
||||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||||
@@ -111,6 +119,7 @@ public class ResourceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping(value = "/{apiName}/deleteBatch", produces = {"application/javascript", "application/json"})
|
@DeleteMapping(value = "/{apiName}/deleteBatch", produces = {"application/javascript", "application/json"})
|
||||||
|
@ApiOperation(value = "批量删除")
|
||||||
public String batchDeleteResource(@PathVariable("apiName") String apiName,
|
public String batchDeleteResource(@PathVariable("apiName") String apiName,
|
||||||
@RequestParam("ids") String ids, HttpServletRequest request)throws Exception {
|
@RequestParam("ids") String ids, HttpServletRequest request)throws Exception {
|
||||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||||
@@ -125,6 +134,7 @@ public class ResourceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/{apiName}/checkIsNameExist")
|
@GetMapping(value = "/{apiName}/checkIsNameExist")
|
||||||
|
@ApiOperation(value = "检查名称是否存在")
|
||||||
public String checkIsNameExist(@PathVariable("apiName") String apiName,
|
public String checkIsNameExist(@PathVariable("apiName") String apiName,
|
||||||
@RequestParam Long id, @RequestParam(value ="name", required = false) String name,
|
@RequestParam Long id, @RequestParam(value ="name", required = false) String name,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import com.jsh.erp.exception.BusinessRunTimeException;
|
|||||||
import com.jsh.erp.service.role.RoleService;
|
import com.jsh.erp.service.role.RoleService;
|
||||||
import com.jsh.erp.service.user.UserService;
|
import com.jsh.erp.service.user.UserService;
|
||||||
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -21,6 +23,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/role")
|
@RequestMapping(value = "/role")
|
||||||
|
@Api(tags = {"角色管理"})
|
||||||
public class RoleController {
|
public class RoleController {
|
||||||
private Logger logger = LoggerFactory.getLogger(RoleController.class);
|
private Logger logger = LoggerFactory.getLogger(RoleController.class);
|
||||||
|
|
||||||
@@ -36,6 +39,7 @@ public class RoleController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findUserRole")
|
@GetMapping(value = "/findUserRole")
|
||||||
|
@ApiOperation(value = "查询用户的角色")
|
||||||
public JSONArray findUserRole(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
public JSONArray findUserRole(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
@@ -62,6 +66,7 @@ public class RoleController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/allList")
|
@GetMapping(value = "/allList")
|
||||||
|
@ApiOperation(value = "查询全部角色列表")
|
||||||
public List<Role> allList(HttpServletRequest request)throws Exception {
|
public List<Role> allList(HttpServletRequest request)throws Exception {
|
||||||
return roleService.allList();
|
return roleService.allList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.jsh.erp.controller;
|
|||||||
import com.jsh.erp.service.depotHead.DepotHeadService;
|
import com.jsh.erp.service.depotHead.DepotHeadService;
|
||||||
import com.jsh.erp.service.sequence.SequenceService;
|
import com.jsh.erp.service.sequence.SequenceService;
|
||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@@ -19,6 +21,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/sequence")
|
@RequestMapping(value = "/sequence")
|
||||||
|
@Api(tags = {"单据编号"})
|
||||||
public class SequenceController {
|
public class SequenceController {
|
||||||
private Logger logger = LoggerFactory.getLogger(SequenceController.class);
|
private Logger logger = LoggerFactory.getLogger(SequenceController.class);
|
||||||
|
|
||||||
@@ -31,6 +34,7 @@ public class SequenceController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/buildNumber")
|
@GetMapping(value = "/buildNumber")
|
||||||
|
@ApiOperation(value = "单据编号生成接口")
|
||||||
public BaseResponseInfo buildNumber(HttpServletRequest request)throws Exception {
|
public BaseResponseInfo buildNumber(HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import com.jsh.erp.utils.BaseResponseInfo;
|
|||||||
import com.jsh.erp.utils.Constants;
|
import com.jsh.erp.utils.Constants;
|
||||||
import com.jsh.erp.utils.ErpInfo;
|
import com.jsh.erp.utils.ErpInfo;
|
||||||
import com.jsh.erp.utils.StringUtil;
|
import com.jsh.erp.utils.StringUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -31,6 +33,8 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
* @Date: 2019/1/22 10:29
|
* @Date: 2019/1/22 10:29
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
@RequestMapping(value = "/serialNumber")
|
||||||
|
@Api(tags = {"序列号管理"})
|
||||||
public class SerialNumberController {
|
public class SerialNumberController {
|
||||||
private Logger logger = LoggerFactory.getLogger(SerialNumberController.class);
|
private Logger logger = LoggerFactory.getLogger(SerialNumberController.class);
|
||||||
|
|
||||||
@@ -43,13 +47,13 @@ public class SerialNumberController {
|
|||||||
*批量添加序列号
|
*批量添加序列号
|
||||||
* create time: 2019/1/29 15:11
|
* create time: 2019/1/29 15:11
|
||||||
* @Param: materialName
|
* @Param: materialName
|
||||||
* @Param: serialNumberPrefix
|
* @Param: serialNumberPrefix
|
||||||
* @Param: batAddTotal
|
* @Param: batAddTotal
|
||||||
* @Param: remark
|
* @Param: remark
|
||||||
* @return java.lang.Object
|
* @return java.lang.Object
|
||||||
*/
|
*/
|
||||||
@PostMapping("/serialNumber/batAddSerialNumber")
|
@PostMapping("/batAddSerialNumber")
|
||||||
@ResponseBody
|
@ApiOperation(value = "批量添加序列号")
|
||||||
public String batAddSerialNumber(@RequestBody JSONObject jsonObject, HttpServletRequest request)throws Exception{
|
public String batAddSerialNumber(@RequestBody JSONObject jsonObject, HttpServletRequest request)throws Exception{
|
||||||
Map<String, Object> objectMap = new HashMap<>();
|
Map<String, Object> objectMap = new HashMap<>();
|
||||||
String materialCode = jsonObject.getString("materialCode");
|
String materialCode = jsonObject.getString("materialCode");
|
||||||
@@ -77,7 +81,8 @@ public class SerialNumberController {
|
|||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/serialNumber/getEnableSerialNumberList")
|
@GetMapping(value = "/getEnableSerialNumberList")
|
||||||
|
@ApiOperation(value = "获取序列号商品")
|
||||||
public BaseResponseInfo getEnableSerialNumberList(@RequestParam("name") String name,
|
public BaseResponseInfo getEnableSerialNumberList(@RequestParam("name") String name,
|
||||||
@RequestParam("depotId") Long depotId,
|
@RequestParam("depotId") Long depotId,
|
||||||
@RequestParam("barCode") String barCode,
|
@RequestParam("barCode") String barCode,
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import com.jsh.erp.service.systemConfig.SystemConfigService;
|
|||||||
import com.jsh.erp.service.user.UserService;
|
import com.jsh.erp.service.user.UserService;
|
||||||
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
||||||
import com.jsh.erp.utils.*;
|
import com.jsh.erp.utils.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import jxl.Sheet;
|
import jxl.Sheet;
|
||||||
import jxl.Workbook;
|
import jxl.Workbook;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -37,6 +39,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/supplier")
|
@RequestMapping(value = "/supplier")
|
||||||
|
@Api(tags = {"商家管理"})
|
||||||
public class SupplierController {
|
public class SupplierController {
|
||||||
private Logger logger = LoggerFactory.getLogger(SupplierController.class);
|
private Logger logger = LoggerFactory.getLogger(SupplierController.class);
|
||||||
|
|
||||||
@@ -58,6 +61,7 @@ public class SupplierController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/findBySelect_cus")
|
@PostMapping(value = "/findBySelect_cus")
|
||||||
|
@ApiOperation(value = "查找客户信息")
|
||||||
public JSONArray findBySelectCus(HttpServletRequest request) {
|
public JSONArray findBySelectCus(HttpServletRequest request) {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
try {
|
try {
|
||||||
@@ -92,6 +96,7 @@ public class SupplierController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/findBySelect_sup")
|
@PostMapping(value = "/findBySelect_sup")
|
||||||
|
@ApiOperation(value = "查找供应商信息")
|
||||||
public JSONArray findBySelectSup(HttpServletRequest request) throws Exception{
|
public JSONArray findBySelectSup(HttpServletRequest request) throws Exception{
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
try {
|
try {
|
||||||
@@ -119,6 +124,7 @@ public class SupplierController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/findBySelect_organ")
|
@PostMapping(value = "/findBySelect_organ")
|
||||||
|
@ApiOperation(value = "查找往来单位,含供应商和客户信息")
|
||||||
public JSONArray findBySelectOrgan(HttpServletRequest request) throws Exception{
|
public JSONArray findBySelectOrgan(HttpServletRequest request) throws Exception{
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
try {
|
try {
|
||||||
@@ -163,6 +169,7 @@ public class SupplierController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/findBySelect_retail")
|
@PostMapping(value = "/findBySelect_retail")
|
||||||
|
@ApiOperation(value = "查找会员信息")
|
||||||
public JSONArray findBySelectRetail(HttpServletRequest request)throws Exception {
|
public JSONArray findBySelectRetail(HttpServletRequest request)throws Exception {
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
try {
|
try {
|
||||||
@@ -192,6 +199,7 @@ public class SupplierController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/batchSetStatus")
|
@PostMapping(value = "/batchSetStatus")
|
||||||
|
@ApiOperation(value = "批量设置状态")
|
||||||
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
Boolean status = jsonObject.getBoolean("status");
|
Boolean status = jsonObject.getBoolean("status");
|
||||||
@@ -213,6 +221,7 @@ public class SupplierController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/findUserCustomer")
|
@GetMapping(value = "/findUserCustomer")
|
||||||
|
@ApiOperation(value = "用户对应客户显示")
|
||||||
public JSONArray findUserCustomer(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
public JSONArray findUserCustomer(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
@@ -260,6 +269,7 @@ public class SupplierController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/importExcel")
|
@PostMapping(value = "/importExcel")
|
||||||
|
@ApiOperation(value = "导入excel表格")
|
||||||
public BaseResponseInfo importExcel(MultipartFile file,
|
public BaseResponseInfo importExcel(MultipartFile file,
|
||||||
HttpServletRequest request, HttpServletResponse response) throws Exception{
|
HttpServletRequest request, HttpServletResponse response) throws Exception{
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import com.jsh.erp.utils.BaseResponseInfo;
|
|||||||
import com.jsh.erp.utils.FileUtils;
|
import com.jsh.erp.utils.FileUtils;
|
||||||
import com.jsh.erp.utils.StringUtil;
|
import com.jsh.erp.utils.StringUtil;
|
||||||
import com.jsh.erp.utils.Tools;
|
import com.jsh.erp.utils.Tools;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -38,6 +40,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/systemConfig")
|
@RequestMapping(value = "/systemConfig")
|
||||||
|
@Api(tags = {"系统参数"})
|
||||||
public class SystemConfigController {
|
public class SystemConfigController {
|
||||||
private Logger logger = LoggerFactory.getLogger(SystemConfigController.class);
|
private Logger logger = LoggerFactory.getLogger(SystemConfigController.class);
|
||||||
|
|
||||||
@@ -68,6 +71,7 @@ public class SystemConfigController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getCurrentInfo")
|
@GetMapping(value = "/getCurrentInfo")
|
||||||
|
@ApiOperation(value = "获取当前租户的配置信息")
|
||||||
public BaseResponseInfo getCurrentInfo(HttpServletRequest request) throws Exception {
|
public BaseResponseInfo getCurrentInfo(HttpServletRequest request) throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try{
|
try{
|
||||||
@@ -91,6 +95,7 @@ public class SystemConfigController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/fileSizeLimit")
|
@GetMapping(value = "/fileSizeLimit")
|
||||||
|
@ApiOperation(value = "获取文件大小限制")
|
||||||
public BaseResponseInfo fileSizeLimit(HttpServletRequest request) throws Exception {
|
public BaseResponseInfo fileSizeLimit(HttpServletRequest request) throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try{
|
try{
|
||||||
@@ -117,6 +122,7 @@ public class SystemConfigController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/upload")
|
@PostMapping(value = "/upload")
|
||||||
|
@ApiOperation(value = "文件上传统一方法")
|
||||||
public BaseResponseInfo upload(HttpServletRequest request, HttpServletResponse response) {
|
public BaseResponseInfo upload(HttpServletRequest request, HttpServletResponse response) {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -194,6 +200,7 @@ public class SystemConfigController {
|
|||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/static/**")
|
@GetMapping(value = "/static/**")
|
||||||
|
@ApiOperation(value = "预览图片&下载文件")
|
||||||
public void view(HttpServletRequest request, HttpServletResponse response) {
|
public void view(HttpServletRequest request, HttpServletResponse response) {
|
||||||
// ISO-8859-1 ==> UTF-8 进行编码转换
|
// ISO-8859-1 ==> UTF-8 进行编码转换
|
||||||
String imgPath = extractPathFromPattern(request);
|
String imgPath = extractPathFromPattern(request);
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import com.jsh.erp.service.redis.RedisService;
|
|||||||
import com.jsh.erp.service.tenant.TenantService;
|
import com.jsh.erp.service.tenant.TenantService;
|
||||||
import com.jsh.erp.service.user.UserService;
|
import com.jsh.erp.service.user.UserService;
|
||||||
import com.jsh.erp.utils.*;
|
import com.jsh.erp.utils.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -37,6 +39,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/tenant")
|
@RequestMapping(value = "/tenant")
|
||||||
|
@Api(tags = {"租户管理"})
|
||||||
public class TenantController {
|
public class TenantController {
|
||||||
private Logger logger = LoggerFactory.getLogger(TenantController.class);
|
private Logger logger = LoggerFactory.getLogger(TenantController.class);
|
||||||
|
|
||||||
@@ -50,6 +53,7 @@ public class TenantController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/batchSetStatus")
|
@PostMapping(value = "/batchSetStatus")
|
||||||
|
@ApiOperation(value = "批量设置状态")
|
||||||
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
Boolean status = jsonObject.getBoolean("status");
|
Boolean status = jsonObject.getBoolean("status");
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.jsh.erp.constants.BusinessConstants;
|
|||||||
import com.jsh.erp.constants.ExceptionConstants;
|
import com.jsh.erp.constants.ExceptionConstants;
|
||||||
import com.jsh.erp.exception.BusinessRunTimeException;
|
import com.jsh.erp.exception.BusinessRunTimeException;
|
||||||
import com.jsh.erp.service.unit.UnitService;
|
import com.jsh.erp.service.unit.UnitService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -22,6 +23,7 @@ import javax.annotation.Resource;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/unit")
|
@RequestMapping(value = "/unit")
|
||||||
|
@Api(tags = {"单位管理"})
|
||||||
public class UnitController {
|
public class UnitController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import com.jsh.erp.service.userBusiness.UserBusinessService;
|
|||||||
import com.jsh.erp.utils.BaseResponseInfo;
|
import com.jsh.erp.utils.BaseResponseInfo;
|
||||||
import com.jsh.erp.utils.ErpInfo;
|
import com.jsh.erp.utils.ErpInfo;
|
||||||
import com.jsh.erp.utils.StringUtil;
|
import com.jsh.erp.utils.StringUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -26,6 +28,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/userBusiness")
|
@RequestMapping(value = "/userBusiness")
|
||||||
|
@Api(tags = {"用户角色模块的关系"})
|
||||||
public class UserBusinessController {
|
public class UserBusinessController {
|
||||||
private Logger logger = LoggerFactory.getLogger(UserBusinessController.class);
|
private Logger logger = LoggerFactory.getLogger(UserBusinessController.class);
|
||||||
|
|
||||||
@@ -34,7 +37,16 @@ public class UserBusinessController {
|
|||||||
@Resource
|
@Resource
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取信息
|
||||||
|
* @param keyId
|
||||||
|
* @param type
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/getBasicData")
|
@GetMapping(value = "/getBasicData")
|
||||||
|
@ApiOperation(value = "获取信息")
|
||||||
public BaseResponseInfo getBasicData(@RequestParam(value = "KeyId") String keyId,
|
public BaseResponseInfo getBasicData(@RequestParam(value = "KeyId") String keyId,
|
||||||
@RequestParam(value = "Type") String type,
|
@RequestParam(value = "Type") String type,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
@@ -53,7 +65,16 @@ public class UserBusinessController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验存在
|
||||||
|
* @param type
|
||||||
|
* @param keyId
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@GetMapping(value = "/checkIsValueExist")
|
@GetMapping(value = "/checkIsValueExist")
|
||||||
|
@ApiOperation(value = "校验存在")
|
||||||
public String checkIsValueExist(@RequestParam(value ="type", required = false) String type,
|
public String checkIsValueExist(@RequestParam(value ="type", required = false) String type,
|
||||||
@RequestParam(value ="keyId", required = false) String keyId,
|
@RequestParam(value ="keyId", required = false) String keyId,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
@@ -74,6 +95,7 @@ public class UserBusinessController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/updateBtnStr")
|
@PostMapping(value = "/updateBtnStr")
|
||||||
|
@ApiOperation(value = "更新角色的按钮权限")
|
||||||
public BaseResponseInfo updateBtnStr(@RequestBody JSONObject jsonObject,
|
public BaseResponseInfo updateBtnStr(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import com.jsh.erp.service.redis.RedisService;
|
|||||||
import com.jsh.erp.service.tenant.TenantService;
|
import com.jsh.erp.service.tenant.TenantService;
|
||||||
import com.jsh.erp.service.user.UserService;
|
import com.jsh.erp.service.user.UserService;
|
||||||
import com.jsh.erp.utils.*;
|
import com.jsh.erp.utils.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -39,6 +41,7 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/user")
|
@RequestMapping(value = "/user")
|
||||||
|
@Api(tags = {"用户管理"})
|
||||||
public class UserController {
|
public class UserController {
|
||||||
private Logger logger = LoggerFactory.getLogger(UserController.class);
|
private Logger logger = LoggerFactory.getLogger(UserController.class);
|
||||||
|
|
||||||
@@ -68,6 +71,7 @@ public class UserController {
|
|||||||
private static final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890";
|
private static final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890";
|
||||||
|
|
||||||
@PostMapping(value = "/login")
|
@PostMapping(value = "/login")
|
||||||
|
@ApiOperation(value = "登录")
|
||||||
public BaseResponseInfo login(@RequestBody User userParam,
|
public BaseResponseInfo login(@RequestBody User userParam,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
logger.info("============用户登录 login 方法调用开始==============");
|
logger.info("============用户登录 login 方法调用开始==============");
|
||||||
@@ -166,6 +170,7 @@ public class UserController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/getUserSession")
|
@GetMapping(value = "/getUserSession")
|
||||||
|
@ApiOperation(value = "获取用户信息")
|
||||||
public BaseResponseInfo getSessionUser(HttpServletRequest request)throws Exception {
|
public BaseResponseInfo getSessionUser(HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -185,6 +190,7 @@ public class UserController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/logout")
|
@GetMapping(value = "/logout")
|
||||||
|
@ApiOperation(value = "退出")
|
||||||
public BaseResponseInfo logout(HttpServletRequest request, HttpServletResponse response)throws Exception {
|
public BaseResponseInfo logout(HttpServletRequest request, HttpServletResponse response)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -199,6 +205,7 @@ public class UserController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/resetPwd")
|
@PostMapping(value = "/resetPwd")
|
||||||
|
@ApiOperation(value = "重置密码")
|
||||||
public String resetPwd(@RequestBody JSONObject jsonObject,
|
public String resetPwd(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request) throws Exception {
|
HttpServletRequest request) throws Exception {
|
||||||
Map<String, Object> objectMap = new HashMap<>();
|
Map<String, Object> objectMap = new HashMap<>();
|
||||||
@@ -214,6 +221,7 @@ public class UserController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping(value = "/updatePwd")
|
@PutMapping(value = "/updatePwd")
|
||||||
|
@ApiOperation(value = "更新密码")
|
||||||
public String updatePwd(@RequestBody JSONObject jsonObject, HttpServletRequest request)throws Exception {
|
public String updatePwd(@RequestBody JSONObject jsonObject, HttpServletRequest request)throws Exception {
|
||||||
Integer flag = 0;
|
Integer flag = 0;
|
||||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||||
@@ -255,6 +263,7 @@ public class UserController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getAllList")
|
@GetMapping(value = "/getAllList")
|
||||||
|
@ApiOperation(value = "获取全部用户数据列表")
|
||||||
public BaseResponseInfo getAllList(HttpServletRequest request)throws Exception {
|
public BaseResponseInfo getAllList(HttpServletRequest request)throws Exception {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -280,6 +289,7 @@ public class UserController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getUserList")
|
@GetMapping(value = "/getUserList")
|
||||||
|
@ApiOperation(value = "用户列表")
|
||||||
public JSONArray getUserList(HttpServletRequest request)throws Exception {
|
public JSONArray getUserList(HttpServletRequest request)throws Exception {
|
||||||
JSONArray dataArray = new JSONArray();
|
JSONArray dataArray = new JSONArray();
|
||||||
try {
|
try {
|
||||||
@@ -307,6 +317,7 @@ public class UserController {
|
|||||||
* @return java.lang.Object
|
* @return java.lang.Object
|
||||||
*/
|
*/
|
||||||
@PostMapping("/addUser")
|
@PostMapping("/addUser")
|
||||||
|
@ApiOperation(value = "新增用户")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object addUser(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception{
|
public Object addUser(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
@@ -331,6 +342,7 @@ public class UserController {
|
|||||||
* @return java.lang.Object
|
* @return java.lang.Object
|
||||||
*/
|
*/
|
||||||
@PutMapping("/updateUser")
|
@PutMapping("/updateUser")
|
||||||
|
@ApiOperation(value = "修改用户")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object updateUser(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception{
|
public Object updateUser(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
@@ -346,6 +358,7 @@ public class UserController {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/registerUser")
|
@PostMapping(value = "/registerUser")
|
||||||
|
@ApiOperation(value = "注册用户")
|
||||||
public Object registerUser(@RequestBody UserEx ue,
|
public Object registerUser(@RequestBody UserEx ue,
|
||||||
HttpServletRequest request)throws Exception{
|
HttpServletRequest request)throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
@@ -355,7 +368,13 @@ public class UserController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取机构用户树
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@RequestMapping("/getOrganizationUserTree")
|
@RequestMapping("/getOrganizationUserTree")
|
||||||
|
@ApiOperation(value = "获取机构用户树")
|
||||||
public JSONArray getOrganizationUserTree()throws Exception{
|
public JSONArray getOrganizationUserTree()throws Exception{
|
||||||
JSONArray arr=new JSONArray();
|
JSONArray arr=new JSONArray();
|
||||||
List<TreeNodeEx> organizationUserTree= userService.getOrganizationUserTree();
|
List<TreeNodeEx> organizationUserTree= userService.getOrganizationUserTree();
|
||||||
@@ -375,6 +394,7 @@ public class UserController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getRoleTypeByCurrentUser")
|
@GetMapping("/getRoleTypeByCurrentUser")
|
||||||
|
@ApiOperation(value = "获取当前用户的角色类型")
|
||||||
public BaseResponseInfo getRoleTypeByCurrentUser(HttpServletRequest request) {
|
public BaseResponseInfo getRoleTypeByCurrentUser(HttpServletRequest request) {
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -391,7 +411,14 @@ public class UserController {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取随机校验码
|
||||||
|
* @param response
|
||||||
|
* @param key
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping(value = "/randomImage/{key}")
|
@GetMapping(value = "/randomImage/{key}")
|
||||||
|
@ApiOperation(value = "获取随机校验码")
|
||||||
public BaseResponseInfo randomImage(HttpServletResponse response,@PathVariable String key){
|
public BaseResponseInfo randomImage(HttpServletResponse response,@PathVariable String key){
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
@@ -417,6 +444,7 @@ public class UserController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/batchSetStatus")
|
@PostMapping(value = "/batchSetStatus")
|
||||||
|
@ApiOperation(value = "批量设置状态")
|
||||||
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
public String batchSetStatus(@RequestBody JSONObject jsonObject,
|
||||||
HttpServletRequest request)throws Exception {
|
HttpServletRequest request)throws Exception {
|
||||||
Byte status = jsonObject.getByte("status");
|
Byte status = jsonObject.getByte("status");
|
||||||
@@ -436,6 +464,7 @@ public class UserController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/infoWithTenant")
|
@GetMapping(value = "/infoWithTenant")
|
||||||
|
@ApiOperation(value = "获取当前用户的用户数量和租户信息")
|
||||||
public BaseResponseInfo randomImage(HttpServletRequest request){
|
public BaseResponseInfo randomImage(HttpServletRequest request){
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -278,9 +278,9 @@ public class SerialNumberService {
|
|||||||
* 卖出序列号
|
* 卖出序列号
|
||||||
* create time: 2019/1/25 9:17
|
* create time: 2019/1/25 9:17
|
||||||
* @Param: materialId
|
* @Param: materialId
|
||||||
* @Param: depotheadId
|
* @Param: depotheadId
|
||||||
* @Param: isSell 卖出'1'
|
* @Param: isSell 卖出'1'
|
||||||
* @Param: Count 卖出或者赎回的数量
|
* @Param: Count 卖出或者赎回的数量
|
||||||
* @return com.jsh.erp.datasource.entities.SerialNumberEx
|
* @return com.jsh.erp.datasource.entities.SerialNumberEx
|
||||||
*/
|
*/
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user