diff --git a/jshERP-boot/docs/jsh_erp.sql b/jshERP-boot/docs/jsh_erp.sql index dd2f4814..9c465b25 100644 --- a/jshERP-boot/docs/jsh_erp.sql +++ b/jshERP-boot/docs/jsh_erp.sql @@ -10,7 +10,7 @@ Target Server Type : MYSQL Target Server Version : 50704 File Encoding : 65001 -Date: 2025-04-09 21:17:48 +Date: 2025-05-20 17:03:42 */ SET FOREIGN_KEY_CHECKS=0; @@ -826,6 +826,7 @@ CREATE TABLE `jsh_system_config` ( `move_avg_price_flag` varchar(1) DEFAULT '0' COMMENT '移动平均价启用标记,0未启用,1启用', `audit_print_flag` varchar(1) DEFAULT '0' COMMENT '先审核后打印启用标记,0未启用,1启用', `zero_change_amount_flag` varchar(1) DEFAULT '0' COMMENT '零收付款启用标记,0未启用,1启用', + `customer_static_price_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`) @@ -834,7 +835,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', '0', '0', '', '0', '1', '0', '0', '0', '0', '0', '0', '63', '0'); +INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '0', '1', '0', '0', '0', '0', '0', '0', '0', '63', '0'); -- ---------------------------- -- Table structure for jsh_tenant diff --git a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt index 3815ddf5..f3b9a634 100644 --- a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt +++ b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt @@ -1671,4 +1671,11 @@ update jsh_function set name='基础资料' where number='0102'; -- by jishenghua -- 给系统参数表增加零收付款启用标记,启用后,销售出库单据新建时默认本次收款为0,采购入库单据同理 -- -------------------------------------------------------- -alter table jsh_system_config add zero_change_amount_flag varchar(1) DEFAULT '0' COMMENT '零收付款启用标记,0未启用,1启用' after audit_print_flag; \ No newline at end of file +alter table jsh_system_config add zero_change_amount_flag varchar(1) DEFAULT '0' COMMENT '零收付款启用标记,0未启用,1启用' after audit_print_flag; + +-- -------------------------------------------------------- +-- 时间 2025年5月20日 +-- by jishenghua +-- 给系统参数表增加客户静态单价启用标记,启用后,客户的销售出库单据单价不会从历史单据的单价获取,而是只从商品信息获取 +-- -------------------------------------------------------- +alter table jsh_system_config add customer_static_price_flag varchar(1) DEFAULT '0' COMMENT '客户静态单价启用标记,0未启用,1启用' after zero_change_amount_flag; \ No newline at end of file diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java index be427c4a..5287b4c7 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfig.java @@ -45,6 +45,8 @@ public class SystemConfig { private String zeroChangeAmountFlag; + private String customerStaticPriceFlag; + private Long tenantId; private String deleteFlag; @@ -225,6 +227,14 @@ public class SystemConfig { this.zeroChangeAmountFlag = zeroChangeAmountFlag == null ? null : zeroChangeAmountFlag.trim(); } + public String getCustomerStaticPriceFlag() { + return customerStaticPriceFlag; + } + + public void setCustomerStaticPriceFlag(String customerStaticPriceFlag) { + this.customerStaticPriceFlag = customerStaticPriceFlag == null ? null : customerStaticPriceFlag.trim(); + } + public Long getTenantId() { return tenantId; } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java index cbb2c303..78daa705 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/SystemConfigExample.java @@ -1634,6 +1634,76 @@ public class SystemConfigExample { return (Criteria) this; } + public Criteria andCustomerStaticPriceFlagIsNull() { + addCriterion("customer_static_price_flag is null"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagIsNotNull() { + addCriterion("customer_static_price_flag is not null"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagEqualTo(String value) { + addCriterion("customer_static_price_flag =", value, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagNotEqualTo(String value) { + addCriterion("customer_static_price_flag <>", value, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagGreaterThan(String value) { + addCriterion("customer_static_price_flag >", value, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagGreaterThanOrEqualTo(String value) { + addCriterion("customer_static_price_flag >=", value, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagLessThan(String value) { + addCriterion("customer_static_price_flag <", value, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagLessThanOrEqualTo(String value) { + addCriterion("customer_static_price_flag <=", value, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagLike(String value) { + addCriterion("customer_static_price_flag like", value, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagNotLike(String value) { + addCriterion("customer_static_price_flag not like", value, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagIn(List values) { + addCriterion("customer_static_price_flag in", values, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagNotIn(List values) { + addCriterion("customer_static_price_flag not in", values, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagBetween(String value1, String value2) { + addCriterion("customer_static_price_flag between", value1, value2, "customerStaticPriceFlag"); + return (Criteria) this; + } + + public Criteria andCustomerStaticPriceFlagNotBetween(String value1, String value2) { + addCriterion("customer_static_price_flag not between", value1, value2, "customerStaticPriceFlag"); + return (Criteria) this; + } + public Criteria andTenantIdIsNull() { addCriterion("tenant_id is null"); return (Criteria) this; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/SystemConfigService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/SystemConfigService.java index 6c2ff99d..852fb85f 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/SystemConfigService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/SystemConfigService.java @@ -619,6 +619,23 @@ public class SystemConfigService { return moveAvgPriceFlag; } + /** + * 获取客户静态单价开关 + * @return + * @throws Exception + */ + public boolean getCustomerStaticPriceFlag() throws Exception { + boolean customerStaticPriceFlag = false; + List list = getSystemConfig(); + if(list.size()>0) { + String flag = list.get(0).getCustomerStaticPriceFlag(); + if(("1").equals(flag)) { + customerStaticPriceFlag = true; + } + } + return customerStaticPriceFlag; + } + /** * Excel导出统一方法 * @param title diff --git a/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml b/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml index 19d32e5a..812b2c00 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/SystemConfigMapper.xml @@ -24,6 +24,7 @@ + @@ -90,7 +91,8 @@ sale_agreement, depot_flag, customer_flag, minus_stock_flag, purchase_by_sale_flag, multi_level_approval_flag, multi_bill_type, force_approval_flag, update_unit_price_flag, over_link_bill_flag, in_out_manage_flag, multi_account_flag, move_avg_price_flag, - audit_print_flag, zero_change_amount_flag, tenant_id, delete_flag + audit_print_flag, zero_change_amount_flag, customer_static_price_flag, tenant_id, + delete_flag