Skip to content

Commit

Permalink
Merge pull request #17 from Jzow/master
Browse files Browse the repository at this point in the history
Fix Code Architecture #13
  • Loading branch information
Jzow authored Aug 31, 2023
2 parents 8c020f6 + 64bd09f commit 7351e9e
Show file tree
Hide file tree
Showing 280 changed files with 1,372 additions and 1,336 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
hs_err_pid*

.idea
/target
**/target
/logs.home_IS_UNDEFINED

**/*.iml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
package com.wansensoft;
package com.wansensoft.api;

import com.wansensoft.utils.ComputerInfo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.io.IOException;

@SpringBootApplication
@EnableScheduling
@MapperScan("com.wansensoft.mappers")
@ComponentScan("com.wansensoft")
public class ErpApplication {

public static void main(String[] args) {
public static void main(String[] args) throws IOException {
ConfigurableApplicationContext context = SpringApplication.run(ErpApplication.class, args);
Environment environment = context.getBean(Environment.class);
System.out.println("启动成功,后端服务API地址:http://" + ComputerInfo.getIpAddr() + ":"
+ environment.getProperty("server.port") + "/jshERP-boot/doc.html");
System.out.println("您还需启动前端服务,启动命令:yarn run serve 或 npm run serve,测试用户:jsh,密码:123456");
+ environment.getProperty("server.port") + "/wansenerp/doc.html");
System.out.println("您还需启动前端服务,启动命令:yarn run serve 或 npm run serve,测试用户:wansenerp,密码:123456");
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.wansensoft;//package com.wansensoft.erp.controller;
package com.wansensoft.api;//package com.wansensoft.erp.controller;
//
//import constants.com.wansensoft.BusinessConstants;
//import entities.datasource.com.wansensoft.User;
//import user.service.com.wansensoft.UserService;
//import utils.com.wansensoft.BaseResponseInfo;
//import utils.com.wansensoft.ComputerInfo;
//import utils.com.wansensoft.StringUtil;
//import utils.com.wansensoft.utils.BaseResponseInfo;
//import utils.com.wansensoft.utils.ComputerInfo;
//import utils.com.wansensoft.utils.StringUtil;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.wansensoft;
package com.wansensoft.api;

import com.alibaba.fastjson.JSONObject;
import com.wansensoft.constants.BusinessConstants;
import com.wansensoft.utils.constants.BusinessConstants;
import com.wansensoft.service.CommonQueryManager;
import com.wansensoft.utils.*;
import io.swagger.annotations.Api;
Expand All @@ -15,9 +15,6 @@
import java.util.List;
import java.util.Map;

/**
* by jishenghua 2018-9-12 23:58:10 华夏erp
*/
@RestController
@Api(tags = {"资源接口"})
public class ResourceController {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package com.wansensoft.account;
package com.wansensoft.api.account;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.Account;
import com.wansensoft.datasource.vo.AccountVo4InOutList;
import com.wansensoft.entities.account.Account;
import com.wansensoft.service.account.AccountService;
import com.wansensoft.service.systemConfig.SystemConfigService;
import com.wansensoft.utils.BaseResponseInfo;
import com.wansensoft.utils.ErpInfo;
import com.wansensoft.utils.ResponseJsonUtil;
import com.wansensoft.vo.AccountVo4InOutList;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -21,20 +20,21 @@
import java.util.List;
import java.util.Map;

/**
* @author jishenghua 75271*8920
*/
@RestController
@RequestMapping(value = "/account")
@Api(tags = {"账户管理"})
public class AccountController {
private Logger logger = LoggerFactory.getLogger(AccountController.class);

@Resource
private AccountService accountService;
private final AccountService accountService;

private final SystemConfigService systemConfigService;

public AccountController(AccountService accountService, SystemConfigService systemConfigService) {
this.accountService = accountService;
this.systemConfigService = systemConfigService;
}

@Resource
private SystemConfigService systemConfigService;

/**
* 查找结算账户信息-下拉框
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.wansensoft.account;
package com.wansensoft.api.account;

import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.AccountHead;
import com.wansensoft.datasource.entities.AccountHeadVo4Body;
import com.wansensoft.datasource.entities.AccountHeadVo4ListEx;
import com.wansensoft.constants.ExceptionConstants;
import com.wansensoft.entities.account.AccountHead;
import com.wansensoft.entities.account.AccountHeadVo4Body;
import com.wansensoft.entities.account.AccountHeadVo4ListEx;
import com.wansensoft.utils.constants.ExceptionConstants;
import com.wansensoft.service.accountHead.AccountHeadService;
import com.wansensoft.utils.BaseResponseInfo;
import com.wansensoft.utils.ErpInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.wansensoft.account;
package com.wansensoft.api.account;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.vo.AccountItemVo4List;
import com.wansensoft.constants.BusinessConstants;
import com.wansensoft.vo.AccountItemVo4List;
import com.wansensoft.utils.constants.BusinessConstants;
import com.wansensoft.service.accountHead.AccountHeadService;
import com.wansensoft.service.accountItem.AccountItemService;
import com.wansensoft.utils.BaseResponseInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.wansensoft.depot;
package com.wansensoft.api.depot;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.Depot;
import com.wansensoft.datasource.entities.DepotEx;
import com.wansensoft.datasource.entities.MaterialInitialStock;
import com.wansensoft.entities.depot.Depot;
import com.wansensoft.entities.depot.DepotEx;
import com.wansensoft.entities.material.MaterialInitialStock;
import com.wansensoft.service.depot.DepotService;
import com.wansensoft.service.material.MaterialService;
import com.wansensoft.service.userBusiness.UserBusinessService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package com.wansensoft.depot;
package com.wansensoft.api.depot;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.DepotHead;
import com.wansensoft.datasource.entities.DepotHeadVo4Body;
import com.wansensoft.datasource.vo.DepotHeadVo4InDetail;
import com.wansensoft.datasource.vo.DepotHeadVo4InOutMCount;
import com.wansensoft.datasource.vo.DepotHeadVo4List;
import com.wansensoft.datasource.vo.DepotHeadVo4StatementAccount;
import com.wansensoft.constants.BusinessConstants;
import com.wansensoft.constants.ExceptionConstants;
import com.wansensoft.entities.depot.DepotHead;
import com.wansensoft.entities.depot.DepotHeadVo4Body;
import com.wansensoft.utils.constants.BusinessConstants;
import com.wansensoft.utils.constants.ExceptionConstants;
import com.wansensoft.service.depot.DepotService;
import com.wansensoft.service.depotHead.DepotHeadService;
import com.wansensoft.service.redis.RedisService;
import com.wansensoft.service.systemConfig.SystemConfigService;
import com.wansensoft.utils.*;
import com.wansensoft.vo.DepotHeadVo4InDetail;
import com.wansensoft.vo.DepotHeadVo4InOutMCount;
import com.wansensoft.vo.DepotHeadVo4List;
import com.wansensoft.vo.DepotHeadVo4StatementAccount;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.wansensoft.depot;
package com.wansensoft.api.depot;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.*;
import com.wansensoft.datasource.vo.DepotItemStockWarningCount;
import com.wansensoft.datasource.vo.DepotItemVoBatchNumberList;
import com.wansensoft.constants.BusinessConstants;
import com.wansensoft.constants.ExceptionConstants;
import com.wansensoft.exception.BusinessRunTimeException;
import com.wansensoft.entities.depot.DepotItem;
import com.wansensoft.entities.depot.DepotItemVo4DetailByTypeAndMId;
import com.wansensoft.entities.depot.DepotItemVo4WithInfoEx;
import com.wansensoft.entities.material.MaterialVo4Unit;
import com.wansensoft.entities.unit.Unit;
import com.wansensoft.utils.constants.BusinessConstants;
import com.wansensoft.utils.constants.ExceptionConstants;
import com.wansensoft.plugins.exception.BusinessRunTimeException;
import com.wansensoft.service.depot.DepotService;
import com.wansensoft.service.depotHead.DepotHeadService;
import com.wansensoft.service.depotItem.DepotItemService;
Expand All @@ -17,6 +19,8 @@
import com.wansensoft.service.unit.UnitService;
import com.wansensoft.service.user.UserService;
import com.wansensoft.utils.*;
import com.wansensoft.vo.DepotItemStockWarningCount;
import com.wansensoft.vo.DepotItemVoBatchNumberList;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jxl.Sheet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.wansensoft;
package com.wansensoft.api.function;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.Function;
import com.wansensoft.datasource.entities.SystemConfig;
import com.wansensoft.datasource.entities.UserBusiness;
import com.wansensoft.entities.function.Function;
import com.wansensoft.entities.system.SystemConfig;
import com.wansensoft.entities.user.UserBusiness;
import com.wansensoft.service.functions.FunctionService;
import com.wansensoft.service.systemConfig.SystemConfigService;
import com.wansensoft.service.userBusiness.UserBusinessService;
Expand All @@ -27,9 +27,6 @@
import java.util.List;
import java.util.Map;

/**
* @author ji-sheng-hua jshERP
*/
@RestController
@RequestMapping(value = "/function")
@Api(tags = {"功能管理"})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.wansensoft;
package com.wansensoft.api.inOutItem;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.InOutItem;
import com.wansensoft.entities.inOutItem.InOutItem;
import com.wansensoft.service.inOutItem.InOutItemService;
import com.wansensoft.utils.ErpInfo;
import com.wansensoft.utils.ResponseJsonUtil;
Expand All @@ -18,9 +18,6 @@
import java.util.List;
import java.util.Map;

/**
* @author jishenghua jshERP 2018年12月25日14:38:08
*/
@RestController
@RequestMapping(value = "/inOutItem")
@Api(tags = {"收支项目"})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.wansensoft.material;
package com.wansensoft.api.material;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.MaterialAttribute;
import com.wansensoft.entities.material.MaterialAttribute;
import com.wansensoft.service.materialAttribute.MaterialAttributeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
Expand All @@ -17,9 +17,6 @@
import jakarta.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author ji sheng hua jshERP
*/
@RestController
@RequestMapping(value = "/materialAttribute")
@Api(tags = {"商品属性"})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.wansensoft.material;
package com.wansensoft.api.material;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wansensoft.datasource.entities.MaterialCategory;
import com.wansensoft.datasource.vo.TreeNode;
import com.wansensoft.constants.ExceptionConstants;
import com.wansensoft.exception.BusinessRunTimeException;
import com.wansensoft.entities.material.MaterialCategory;
import com.wansensoft.utils.constants.ExceptionConstants;
import com.wansensoft.plugins.exception.BusinessRunTimeException;
import com.wansensoft.service.materialCategory.MaterialCategoryService;
import com.wansensoft.utils.BaseResponseInfo;
import com.wansensoft.vo.TreeNode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
Expand All @@ -17,11 +17,10 @@

import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

/**
* @author ji—sheng—hua jshERP
*/

@RestController
@RequestMapping(value = "/materialCategory")
@Api(tags = {"商品类别"})
Expand Down Expand Up @@ -91,10 +90,8 @@ public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest
return res;
}
/**
* create by: cjl
* description:
* 获取商品类别树数据
* create time: 2019/2/19 11:49
* @Param:
* @return com.alibaba.fastjson.JSONArray
*/
Expand All @@ -113,10 +110,8 @@ public JSONArray getMaterialCategoryTree(@RequestParam("id") Long id) throws Exc
return arr;
}
/**
* create by: cjl
* description:
* 新增商品类别数据
* create time: 2019/2/19 17:17
* @Param: beanJson
* @return java.lang.Object
*/
Expand All @@ -133,10 +128,8 @@ public Object addMaterialCategory(@RequestParam("info") String beanJson) throws
return result;
}
/**
* create by: cjl
* description:
* 修改商品类别数据
* create time: 2019/2/20 9:30
* @Param: beanJson
* @return java.lang.Object
*/
Expand Down
Loading

0 comments on commit 7351e9e

Please sign in to comment.