Skip to content

Commit

Permalink
1、给销售订单转采购订单的流程配置开关 2、增加以销定购的流程
Browse files Browse the repository at this point in the history
  • Loading branch information
jishenghua committed May 20, 2022
1 parent bda1b05 commit 74db853
Show file tree
Hide file tree
Showing 42 changed files with 1,076 additions and 381 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 项目总述
* 很多人说华夏ERP(英文名:jshERP)是目前人气领先的国产ERP系统
* 虽然目前只有进销存+财务+生产的功能,但后面将会推出ERP的全部功能,有兴趣请帮点一下 **Star**
* **官网URLhttp://www.huaxiaerp.com 商务合作或技术交流,请联系QQ:752718920**
* **官网地址http://www.huaxiaerp.com 商务合作或技术交流,请联系QQ:752718920**
* 欢迎加入华夏ERP交流QQ群(入群帮安装),群3:805736336(满)、群4:146571538
* 平台地址:http://cloud.huaxiaerp.vip 欢迎大家注册租户进行使用
* 系统默认租户账号:jsh,默认超管账户:admin,默认密码均为:123456
Expand Down Expand Up @@ -51,25 +51,25 @@

# 系统美图
* 首页
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231344_ef2d6554_852955.png "首页.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235430_ff5f9618_852955.png "首页.png")
* 零售管理
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231359_889404f3_852955.png "零售管理.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235442_214b9fc0_852955.png "零售管理.png")
* 采购管理
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231414_85757561_852955.png "采购管理.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235643_c87b3d02_852955.png "采购管理.png")
* 销售管理
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231437_d2308621_852955.png "销售管理.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235631_01a92e1f_852955.png "销售管理.png")
* 仓库管理
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231446_6a6455f8_852955.png "仓库管理.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235657_99057159_852955.png "仓库管理.png")
* 财务管理
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231456_82f4616b_852955.png "财务管理.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235708_086379f8_852955.png "财务管理.png")
* 报表查询
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231506_9a986d5c_852955.png "报表查询.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235722_a26af3e8_852955.png "报表查询.png")
* 商品管理
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231527_23a26826_852955.png "商品管理.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235905_5ec11112_852955.png "商品管理.png")
* 基本资料
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231538_0be9ad14_852955.png "基本资料.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235919_92d78bc3_852955.png "基本资料.png")
* 系统管理
![输入图片说明](https://images.gitee.com/uploads/images/2021/0527/231547_3110acd3_852955.png "系统管理.png")
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235815_b139e426_852955.png "系统管理.png")

# 捐赠
开源不易,坚持更难!如果您觉得华夏ERP不错,可以捐赠请作者喝杯咖啡~,在此表示感谢^_^。
Expand Down
36 changes: 19 additions & 17 deletions jshERP-boot/docs/jsh_erp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ CREATE TABLE `jsh_depot_head` (
`discount_last_money` decimal(24,6) DEFAULT NULL COMMENT '优惠后金额',
`other_money` decimal(24,6) DEFAULT NULL COMMENT '销售或采购费用合计',
`status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售',
`purchase_status` varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购',
`link_number` varchar(50) DEFAULT NULL COMMENT '关联订单号',
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
Expand All @@ -175,22 +176,22 @@ CREATE TABLE `jsh_depot_head` (
-- ----------------------------
-- Records of jsh_depot_head
-- ----------------------------
INSERT INTO `jsh_depot_head` VALUES ('258', '其它', '采购订单', 'CGDD00000000630', 'CGDD00000000630', '2021-06-02 00:21:54', '2021-06-02 00:21:44', '57', '63', null, null, null, '-110.000000', '现付', null, null, null, null, null, null, null, null, null, null, '2', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('259', '入库', '采购', 'CGRK00000000631', 'CGRK00000000631', '2021-06-02 00:22:23', '2021-06-02 00:22:05', '57', '63', '17', '-110.000000', null, '-110.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '110.000000', '0.000000', '0', 'CGDD00000000630', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('260', '出库', '采购退货', 'CGTH00000000632', 'CGTH00000000632', '2021-06-02 00:22:35', '2021-06-02 00:22:26', '57', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, '0.000000', '0.000000', '22.000000', '0.000000', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('261', '其它', '销售订单', 'XSDD00000000633', 'XSDD00000000633', '2021-06-02 00:22:48', '2021-06-02 00:22:39', '58', '63', null, null, null, '44.000000', '现付', null, null, null, '', null, null, null, null, null, null, '2', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('262', '出库', '销售', 'XSCK00000000634', 'XSCK00000000634', '2021-06-02 00:23:03', '2021-06-02 00:22:54', '58', '63', '17', '44.000000', null, '44.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '44.000000', '0.000000', '0', 'XSDD00000000633', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('263', '入库', '销售退货', 'XSTH00000000635', 'XSTH00000000635', '2021-06-02 00:23:12', '2021-06-02 00:23:05', '71', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '22.000000', '0.000000', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('264', '出库', '零售', 'LSCK00000000636', 'LSCK00000000636', '2021-06-02 00:23:21', '2021-06-02 00:23:14', '60', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('265', '入库', '零售退货', 'LSTH00000000637', 'LSTH00000000637', '2021-06-02 00:23:29', '2021-06-02 00:23:23', '60', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('266', '入库', '其它', 'QTRK00000000638', 'QTRK00000000638', '2021-06-02 00:23:48', '2021-06-02 00:23:36', '57', '63', null, null, null, '-55.000000', '现付', null, null, null, null, null, null, null, null, null, null, '1', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('267', '出库', '其它', 'QTCK00000000639', 'QTCK00000000639', '2021-06-02 00:23:59', '2021-06-02 00:23:50', '58', '63', null, null, null, '30.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('268', '出库', '调拨', 'DBCK00000000640', 'DBCK00000000640', '2021-06-02 00:24:09', '2021-06-02 00:24:00', null, '63', null, null, null, '11.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('269', '其它', '组装单', 'ZZD00000000641', 'ZZD00000000641', '2021-06-02 00:24:29', '2021-06-02 00:24:11', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('270', '其它', '拆卸单', 'CXD00000000642', 'CXD00000000642', '2021-06-02 00:24:45', '2021-06-02 00:24:32', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('271', '入库', '采购', 'CGRK00000000651', 'CGRK00000000651', '2021-07-06 23:45:20', '2021-07-06 23:44:45', '57', '63', '17', '-20.000000', null, '-80.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '80.000000', '0.000000', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('272', '出库', '销售', 'XSCK00000000652', 'XSCK00000000652', '2021-07-06 23:46:07', '2021-07-06 23:45:24', '58', '63', '17', '8.000000', null, '28.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '28.000000', '0.000000', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('273', '入库', '采购', 'CGRK00000000658', 'CGRK00000000658', '2021-07-28 00:58:12', '2021-07-28 00:58:02', '57', '63', '17', '-60.000000', null, '-60.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '60.000000', '0.000000', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('258', '其它', '采购订单', 'CGDD00000000630', 'CGDD00000000630', '2021-06-02 00:21:54', '2021-06-02 00:21:44', '57', '63', null, null, null, '-110.000000', '现付', null, null, null, null, null, null, null, null, null, null, '2', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('259', '入库', '采购', 'CGRK00000000631', 'CGRK00000000631', '2021-06-02 00:22:23', '2021-06-02 00:22:05', '57', '63', '17', '-110.000000', null, '-110.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '110.000000', '0.000000', '0', '0', 'CGDD00000000630', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('260', '出库', '采购退货', 'CGTH00000000632', 'CGTH00000000632', '2021-06-02 00:22:35', '2021-06-02 00:22:26', '57', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, '0.000000', '0.000000', '22.000000', '0.000000', '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('261', '其它', '销售订单', 'XSDD00000000633', 'XSDD00000000633', '2021-06-02 00:22:48', '2021-06-02 00:22:39', '58', '63', null, null, null, '44.000000', '现付', null, null, null, '', null, null, null, null, null, null, '2', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('262', '出库', '销售', 'XSCK00000000634', 'XSCK00000000634', '2021-06-02 00:23:03', '2021-06-02 00:22:54', '58', '63', '17', '44.000000', null, '44.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '44.000000', '0.000000', '0', '0', 'XSDD00000000633', '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('263', '入库', '销售退货', 'XSTH00000000635', 'XSTH00000000635', '2021-06-02 00:23:12', '2021-06-02 00:23:05', '71', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '22.000000', '0.000000', '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('264', '出库', '零售', 'LSCK00000000636', 'LSCK00000000636', '2021-06-02 00:23:21', '2021-06-02 00:23:14', '60', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('265', '入库', '零售退货', 'LSTH00000000637', 'LSTH00000000637', '2021-06-02 00:23:29', '2021-06-02 00:23:23', '60', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('266', '入库', '其它', 'QTRK00000000638', 'QTRK00000000638', '2021-06-02 00:23:48', '2021-06-02 00:23:36', '57', '63', null, null, null, '-55.000000', '现付', null, null, null, null, null, null, null, null, null, null, '1', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('267', '出库', '其它', 'QTCK00000000639', 'QTCK00000000639', '2021-06-02 00:23:59', '2021-06-02 00:23:50', '58', '63', null, null, null, '30.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('268', '出库', '调拨', 'DBCK00000000640', 'DBCK00000000640', '2021-06-02 00:24:09', '2021-06-02 00:24:00', null, '63', null, null, null, '11.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('269', '其它', '组装单', 'ZZD00000000641', 'ZZD00000000641', '2021-06-02 00:24:29', '2021-06-02 00:24:11', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('270', '其它', '拆卸单', 'CXD00000000642', 'CXD00000000642', '2021-06-02 00:24:45', '2021-06-02 00:24:32', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('271', '入库', '采购', 'CGRK00000000651', 'CGRK00000000651', '2021-07-06 23:45:20', '2021-07-06 23:44:45', '57', '63', '17', '-20.000000', null, '-80.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '80.000000', '0.000000', '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('272', '出库', '销售', 'XSCK00000000652', 'XSCK00000000652', '2021-07-06 23:46:07', '2021-07-06 23:45:24', '58', '63', '17', '8.000000', null, '28.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '28.000000', '0.000000', '0', '0', null, '63', '0');
INSERT INTO `jsh_depot_head` VALUES ('273', '入库', '采购', 'CGRK00000000658', 'CGRK00000000658', '2021-07-28 00:58:12', '2021-07-28 00:58:02', '57', '63', '17', '-60.000000', null, '-60.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '60.000000', '0.000000', '0', '0', null, '63', '0');

-- ----------------------------
-- Table structure for jsh_depot_item
Expand Down Expand Up @@ -829,6 +830,7 @@ CREATE TABLE `jsh_system_config` (
`depot_flag` varchar(1) DEFAULT '0' COMMENT '仓库启用标记,0未启用,1启用',
`customer_flag` varchar(1) DEFAULT '0' COMMENT '客户启用标记,0未启用,1启用',
`minus_stock_flag` varchar(1) DEFAULT '0' COMMENT '负库存启用标记,0未启用,1启用',
`purchase_by_sale_flag` varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用',
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
PRIMARY KEY (`id`)
Expand All @@ -837,7 +839,7 @@ CREATE TABLE `jsh_system_config` (
-- ----------------------------
-- Records of jsh_system_config
-- ----------------------------
INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '63', '0');
INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '63', '0');

-- ----------------------------
-- Table structure for jsh_tenant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1343,4 +1343,14 @@ alter table jsh_material change name name varchar(100) DEFAULT NULL COMMENT '名
-- by jishenghua
-- 给系统参数表增加销售协议字段
-- --------------------------------------------------------
alter table jsh_system_config add sale_agreement varchar(500) DEFAULT NULL COMMENT '销售协议' after company_post_code;
alter table jsh_system_config add sale_agreement varchar(500) DEFAULT NULL COMMENT '销售协议' after company_post_code;

-- --------------------------------------------------------
-- 时间 2022年05月17日
-- by jishenghua
-- 给单据主表增加采购状态字段
-- 给系统参数表增加以销定购开关字段
-- --------------------------------------------------------
alter table jsh_depot_head add purchase_status varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购' after status;
alter table jsh_system_config add purchase_by_sale_flag varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用' after minus_stock_flag;
update jsh_depot_head set purchase_status='0';
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public class BusinessConstants {
public static final String BILLS_STATUS_AUDIT = "1";
public static final String BILLS_STATUS_SKIPED = "2";
public static final String BILLS_STATUS_SKIPING = "3";
/**
* 单据-采购状态 purchaseStatus '0'未采购、'2'完成采购、'3'部分采购
* */
public static final String PURCHASE_STATUS_UN_AUDIT = "0";
public static final String PURCHASE_STATUS_SKIPED = "2";
public static final String PURCHASE_STATUS_SKIPING = "3";
/**
* 出入库分类
*采购、采购退货、其它、零售、销售、调拨、盘点复盘等
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public BaseResponseInfo findStockByDepotAndBarCode(
@ApiOperation(value = "单据明细列表")
public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
@RequestParam("mpList") String mpList,
@RequestParam(value = "linkType", required = false) String linkType,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
try {
Expand All @@ -183,6 +184,7 @@ public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
if (null != dataList) {
for (DepotItemVo4WithInfoEx diEx : dataList) {
JSONObject item = new JSONObject();
item.put("id", diEx.getId());
item.put("materialExtendId", diEx.getMaterialExtendId() == null ? "" : diEx.getMaterialExtendId());
item.put("barCode", diEx.getBarCode());
item.put("name", diEx.getMName());
Expand Down Expand Up @@ -212,7 +214,7 @@ public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
item.put("operNumber", diEx.getOperNumber());
item.put("basicNumber", diEx.getBasicNumber());
item.put("preNumber", diEx.getOperNumber()); //原数量
item.put("finishNumber", depotItemService.getFinishNumber(diEx.getMaterialExtendId(), diEx.getHeaderId(), unitInfo, materialUnit)); //已入库|已出库
item.put("finishNumber", depotItemService.getFinishNumber(diEx.getMaterialExtendId(), diEx.getHeaderId(), unitInfo, materialUnit, linkType)); //已入库|已出库
item.put("unitPrice", diEx.getUnitPrice());
item.put("taxUnitPrice", diEx.getTaxUnitPrice());
item.put("allPrice", diEx.getAllPrice());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public class DepotHead {

private String status;

private String purchaseStatus;

private String linkNumber;

private Long tenantId;
Expand Down Expand Up @@ -260,6 +262,14 @@ public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}

public String getPurchaseStatus() {
return purchaseStatus;
}

public void setPurchaseStatus(String purchaseStatus) {
this.purchaseStatus = purchaseStatus == null ? null : purchaseStatus.trim();
}

public String getLinkNumber() {
return linkNumber;
}
Expand Down
Loading

0 comments on commit 74db853

Please sign in to comment.