增加负库存的开关

This commit is contained in:
季圣华
2020-06-18 22:31:04 +08:00
parent a0e61fa8eb
commit 84943631ba
9 changed files with 461 additions and 793 deletions

View File

@@ -1009,6 +1009,7 @@ CREATE TABLE `jsh_systemconfig` (
`company_post_code` varchar(20) DEFAULT NULL COMMENT '公司邮编', `company_post_code` varchar(20) DEFAULT NULL COMMENT '公司邮编',
`depot_flag` varchar(1) DEFAULT '0' COMMENT '仓库启用标记0未启用1启用', `depot_flag` varchar(1) DEFAULT '0' COMMENT '仓库启用标记0未启用1启用',
`customer_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启用',
`tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除', `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
@@ -1017,9 +1018,9 @@ CREATE TABLE `jsh_systemconfig` (
-- ---------------------------- -- ----------------------------
-- Records of jsh_systemconfig -- Records of jsh_systemconfig
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_systemconfig` VALUES ('7', '南通jshERP公司', '张三', '南通市通州区某某路', '0513-10101010', '0513-18181818', '226300', '0', '0', null, '0'); INSERT INTO `jsh_systemconfig` VALUES ('7', '南通jshERP公司', '张三', '南通市通州区某某路', '0513-10101010', '0513-18181818', '226300', '0', '0', '0', null, '0');
INSERT INTO `jsh_systemconfig` VALUES ('8', '公司123', '', '', '', '', '', '0', '0', '117', '0'); INSERT INTO `jsh_systemconfig` VALUES ('8', '公司123', '', '', '', '', '', '0', '0', '0', '117', '0');
INSERT INTO `jsh_systemconfig` VALUES ('9', '公司1', '小军', '', '', '', '', '0', '0', '63', '0'); INSERT INTO `jsh_systemconfig` VALUES ('9', '公司1', '小军', '', '', '', '', '0', '0', '0', '63', '0');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_tenant -- Table structure for jsh_tenant

View File

@@ -784,4 +784,10 @@ alter table jsh_material drop PresetPriceOne;
alter table jsh_material drop PresetPriceTwo; alter table jsh_material drop PresetPriceTwo;
alter table jsh_material drop FirstOutUnit; alter table jsh_material drop FirstOutUnit;
alter table jsh_material drop FirstInUnit; alter table jsh_material drop FirstInUnit;
alter table jsh_material drop PriceStrategy; alter table jsh_material drop PriceStrategy;
-- ----------------------------
-- 时间2020年6月18日
-- 增加负库存的启用标记
-- ----------------------------
alter table jsh_systemconfig add minus_stock_flag varchar(1) DEFAULT '0' COMMENT '负库存启用标记0未启用1启用' after customer_flag;

View File

@@ -43,55 +43,62 @@
<table> <table>
<tr> <tr>
<td>公司名称</td> <td>公司名称</td>
<td style="padding:5px"> <td style="padding:5px 10px">
<input name="companyName" id="companyName" class="easyui-textbox" <input name="companyName" id="companyName" class="easyui-textbox"
data-options="required:true,validType:'length[2,15]'" style="width: 220px;"/> data-options="required:true,validType:'length[2,15]'" style="width: 220px;"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>联系人</td> <td>联系人</td>
<td style="padding:5px"> <td style="padding:5px 10px">
<input name="companyContacts" id="companyContacts" class="easyui-textbox" style="width: 220px;"/> <input name="companyContacts" id="companyContacts" class="easyui-textbox" style="width: 220px;"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>公司地址</td> <td>公司地址</td>
<td style="padding:5px"> <td style="padding:5px 10px">
<input name="companyAddress" id="companyAddress" class="easyui-textbox" style="width: 220px;"/> <input name="companyAddress" id="companyAddress" class="easyui-textbox" style="width: 220px;"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>公司电话</td> <td>公司电话</td>
<td style="padding:5px"> <td style="padding:5px 10px">
<input name="companyTel" id="companyTel" class="easyui-textbox" style="width: 220px;"/> <input name="companyTel" id="companyTel" class="easyui-textbox" style="width: 220px;"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>公司传真</td> <td>公司传真</td>
<td style="padding:5px"> <td style="padding:5px 10px">
<input name="companyFax" id="companyFax" class="easyui-textbox" style="width: 220px;"/> <input name="companyFax" id="companyFax" class="easyui-textbox" style="width: 220px;"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>公司邮编</td> <td>公司邮编</td>
<td style="padding:5px"> <td style="padding:5px 10px">
<input name="companyPostCode" id="companyPostCode" class="easyui-textbox" style="width: 220px;"/> <input name="companyPostCode" id="companyPostCode" class="easyui-textbox" style="width: 220px;"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>仓库权限</td> <td>仓库权限</td>
<td style="padding:5px;text-align:center;"> <td style="padding:5px 10px;text-align:left;">
<input name="depotFlag" id="depotFlag" type="checkbox" style="width: 20px;height: 20px" title="勾选后需要到用户列表配置"/> <input name="depotFlag" id="depotFlag" type="checkbox" style="width: 20px;height: 20px" title="勾选后需要到用户列表配置"/>
(勾选后需要到用户列表配置) (勾选后需要到用户列表配置)
</td> </td>
</tr> </tr>
<tr> <tr>
<td>客户权限</td> <td>客户权限</td>
<td style="padding:5px;text-align:center;"> <td style="padding:5px 10px;text-align:left;">
<input name="customerFlag" id="customerFlag" type="checkbox" style="width: 20px;height: 20px" title="勾选后需要到用户列表配置"/> <input name="customerFlag" id="customerFlag" type="checkbox" style="width: 20px;height: 20px" title="勾选后需要到用户列表配置"/>
(勾选后需要到用户列表配置) (勾选后需要到用户列表配置)
</td> </td>
</tr> </tr>
<tr>
<td>负库存</td>
<td style="padding:5px 10px;text-align:left;">
<input name="minusStockFlag" id="minusStockFlag" type="checkbox" style="width: 20px;height: 20px" title="勾选后支持负库存批次商品除外"/>
(勾选后支持负库存,批次商品除外)
</td>
</tr>
</table> </table>
</form> </form>
</div> </div>
@@ -151,13 +158,19 @@
{title: '公司传真', field: 'companyFax', width: 120, align: "center"}, {title: '公司传真', field: 'companyFax', width: 120, align: "center"},
{title: '公司邮编', field: 'companyPostCode', width: 80, align: "center"}, {title: '公司邮编', field: 'companyPostCode', width: 80, align: "center"},
{ {
title: '仓库开关', field: 'depotFlag', width: 80, align: "center", title: '仓库权限', field: 'depotFlag', width: 80, align: "center",
formatter: function (value) { formatter: function (value) {
return parseFlag(value); return parseFlag(value);
} }
}, },
{ {
title: '客户开关', field: 'customerFlag', width: 80, align: "center", title: '客户权限', field: 'customerFlag', width: 80, align: "center",
formatter: function (value) {
return parseFlag(value);
}
},
{
title: '负库存', field: 'minusStockFlag', width: 80, align: "center",
formatter: function (value) { formatter: function (value) {
return parseFlag(value); return parseFlag(value);
} }
@@ -360,6 +373,7 @@
var infoObj = $("#systemConfigFM").serializeObject(); var infoObj = $("#systemConfigFM").serializeObject();
infoObj.depotFlag = $("#depotFlag").is(':checked')?"1":"0"; infoObj.depotFlag = $("#depotFlag").is(':checked')?"1":"0";
infoObj.customerFlag = $("#customerFlag").is(':checked')?"1":"0"; infoObj.customerFlag = $("#customerFlag").is(':checked')?"1":"0";
infoObj.minusStockFlag = $("#minusStockFlag").is(':checked')?"1":"0";
$.ajax({ $.ajax({
url: url, url: url,
type: "post", type: "post",
@@ -401,6 +415,7 @@
systemConfigId = res.id; systemConfigId = res.id;
$("#depotFlag").attr("checked", res.depotFlag == '1' ? true : false); $("#depotFlag").attr("checked", res.depotFlag == '1' ? true : false);
$("#customerFlag").attr("checked", res.customerFlag == '1' ? true : false); $("#customerFlag").attr("checked", res.customerFlag == '1' ? true : false);
$("#minusStockFlag").attr("checked", res.minusStockFlag == '1' ? true : false);
url = '/systemConfig/update?id=' + res.id; url = '/systemConfig/update?id=' + res.id;
} }

View File

@@ -1,354 +1,122 @@
package com.jsh.erp.datasource.entities; package com.jsh.erp.datasource.entities;
public class SystemConfig { public class SystemConfig {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.id
*
* @mbggenerated
*/
private Long id; private Long id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_name
*
* @mbggenerated
*/
private String companyName; private String companyName;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_contacts
*
* @mbggenerated
*/
private String companyContacts; private String companyContacts;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_address
*
* @mbggenerated
*/
private String companyAddress; private String companyAddress;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_tel
*
* @mbggenerated
*/
private String companyTel; private String companyTel;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_fax
*
* @mbggenerated
*/
private String companyFax; private String companyFax;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.company_post_code
*
* @mbggenerated
*/
private String companyPostCode; private String companyPostCode;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.depot_flag
*
* @mbggenerated
*/
private String depotFlag; private String depotFlag;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.customer_flag
*
* @mbggenerated
*/
private String customerFlag; private String customerFlag;
/** private String minusStockFlag;
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.tenant_id
*
* @mbggenerated
*/
private Long tenantId; private Long tenantId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_systemconfig.delete_Flag
*
* @mbggenerated
*/
private String deleteFlag; private String deleteFlag;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.id
*
* @return the value of jsh_systemconfig.id
*
* @mbggenerated
*/
public Long getId() { public Long getId() {
return id; return id;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.id
*
* @param id the value for jsh_systemconfig.id
*
* @mbggenerated
*/
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_name
*
* @return the value of jsh_systemconfig.company_name
*
* @mbggenerated
*/
public String getCompanyName() { public String getCompanyName() {
return companyName; return companyName;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_name
*
* @param companyName the value for jsh_systemconfig.company_name
*
* @mbggenerated
*/
public void setCompanyName(String companyName) { public void setCompanyName(String companyName) {
this.companyName = companyName == null ? null : companyName.trim(); this.companyName = companyName == null ? null : companyName.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_contacts
*
* @return the value of jsh_systemconfig.company_contacts
*
* @mbggenerated
*/
public String getCompanyContacts() { public String getCompanyContacts() {
return companyContacts; return companyContacts;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_contacts
*
* @param companyContacts the value for jsh_systemconfig.company_contacts
*
* @mbggenerated
*/
public void setCompanyContacts(String companyContacts) { public void setCompanyContacts(String companyContacts) {
this.companyContacts = companyContacts == null ? null : companyContacts.trim(); this.companyContacts = companyContacts == null ? null : companyContacts.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_address
*
* @return the value of jsh_systemconfig.company_address
*
* @mbggenerated
*/
public String getCompanyAddress() { public String getCompanyAddress() {
return companyAddress; return companyAddress;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_address
*
* @param companyAddress the value for jsh_systemconfig.company_address
*
* @mbggenerated
*/
public void setCompanyAddress(String companyAddress) { public void setCompanyAddress(String companyAddress) {
this.companyAddress = companyAddress == null ? null : companyAddress.trim(); this.companyAddress = companyAddress == null ? null : companyAddress.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_tel
*
* @return the value of jsh_systemconfig.company_tel
*
* @mbggenerated
*/
public String getCompanyTel() { public String getCompanyTel() {
return companyTel; return companyTel;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_tel
*
* @param companyTel the value for jsh_systemconfig.company_tel
*
* @mbggenerated
*/
public void setCompanyTel(String companyTel) { public void setCompanyTel(String companyTel) {
this.companyTel = companyTel == null ? null : companyTel.trim(); this.companyTel = companyTel == null ? null : companyTel.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_fax
*
* @return the value of jsh_systemconfig.company_fax
*
* @mbggenerated
*/
public String getCompanyFax() { public String getCompanyFax() {
return companyFax; return companyFax;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_fax
*
* @param companyFax the value for jsh_systemconfig.company_fax
*
* @mbggenerated
*/
public void setCompanyFax(String companyFax) { public void setCompanyFax(String companyFax) {
this.companyFax = companyFax == null ? null : companyFax.trim(); this.companyFax = companyFax == null ? null : companyFax.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.company_post_code
*
* @return the value of jsh_systemconfig.company_post_code
*
* @mbggenerated
*/
public String getCompanyPostCode() { public String getCompanyPostCode() {
return companyPostCode; return companyPostCode;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.company_post_code
*
* @param companyPostCode the value for jsh_systemconfig.company_post_code
*
* @mbggenerated
*/
public void setCompanyPostCode(String companyPostCode) { public void setCompanyPostCode(String companyPostCode) {
this.companyPostCode = companyPostCode == null ? null : companyPostCode.trim(); this.companyPostCode = companyPostCode == null ? null : companyPostCode.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.depot_flag
*
* @return the value of jsh_systemconfig.depot_flag
*
* @mbggenerated
*/
public String getDepotFlag() { public String getDepotFlag() {
return depotFlag; return depotFlag;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.depot_flag
*
* @param depotFlag the value for jsh_systemconfig.depot_flag
*
* @mbggenerated
*/
public void setDepotFlag(String depotFlag) { public void setDepotFlag(String depotFlag) {
this.depotFlag = depotFlag == null ? null : depotFlag.trim(); this.depotFlag = depotFlag == null ? null : depotFlag.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.customer_flag
*
* @return the value of jsh_systemconfig.customer_flag
*
* @mbggenerated
*/
public String getCustomerFlag() { public String getCustomerFlag() {
return customerFlag; return customerFlag;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.customer_flag
*
* @param customerFlag the value for jsh_systemconfig.customer_flag
*
* @mbggenerated
*/
public void setCustomerFlag(String customerFlag) { public void setCustomerFlag(String customerFlag) {
this.customerFlag = customerFlag == null ? null : customerFlag.trim(); this.customerFlag = customerFlag == null ? null : customerFlag.trim();
} }
/** public String getMinusStockFlag() {
* This method was generated by MyBatis Generator. return minusStockFlag;
* This method returns the value of the database column jsh_systemconfig.tenant_id }
*
* @return the value of jsh_systemconfig.tenant_id public void setMinusStockFlag(String minusStockFlag) {
* this.minusStockFlag = minusStockFlag == null ? null : minusStockFlag.trim();
* @mbggenerated }
*/
public Long getTenantId() { public Long getTenantId() {
return tenantId; return tenantId;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.tenant_id
*
* @param tenantId the value for jsh_systemconfig.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) { public void setTenantId(Long tenantId) {
this.tenantId = tenantId; this.tenantId = tenantId;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_systemconfig.delete_Flag
*
* @return the value of jsh_systemconfig.delete_Flag
*
* @mbggenerated
*/
public String getDeleteFlag() { public String getDeleteFlag() {
return deleteFlag; return deleteFlag;
} }
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_systemconfig.delete_Flag
*
* @param deleteFlag the value for jsh_systemconfig.delete_Flag
*
* @mbggenerated
*/
public void setDeleteFlag(String deleteFlag) { public void setDeleteFlag(String deleteFlag) {
this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
} }

View File

@@ -4,118 +4,46 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class SystemConfigExample { public class SystemConfigExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
protected String orderByClause; protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
protected boolean distinct; protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public SystemConfigExample() { public SystemConfigExample() {
oredCriteria = new ArrayList<Criteria>(); oredCriteria = new ArrayList<>();
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public void setOrderByClause(String orderByClause) { public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause; this.orderByClause = orderByClause;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public String getOrderByClause() { public String getOrderByClause() {
return orderByClause; return orderByClause;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public void setDistinct(boolean distinct) { public void setDistinct(boolean distinct) {
this.distinct = distinct; this.distinct = distinct;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public boolean isDistinct() { public boolean isDistinct() {
return distinct; return distinct;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public List<Criteria> getOredCriteria() { public List<Criteria> getOredCriteria() {
return oredCriteria; return oredCriteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public void or(Criteria criteria) { public void or(Criteria criteria) {
oredCriteria.add(criteria); oredCriteria.add(criteria);
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public Criteria or() { public Criteria or() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria); oredCriteria.add(criteria);
return criteria; return criteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public Criteria createCriteria() { public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) { if (oredCriteria.size() == 0) {
@@ -124,41 +52,23 @@ public class SystemConfigExample {
return criteria; return criteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
protected Criteria createCriteriaInternal() { protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(); Criteria criteria = new Criteria();
return criteria; return criteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public void clear() { public void clear() {
oredCriteria.clear(); oredCriteria.clear();
orderByClause = null; orderByClause = null;
distinct = false; distinct = false;
} }
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
protected abstract static class GeneratedCriteria { protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria; protected List<Criterion> criteria;
protected GeneratedCriteria() { protected GeneratedCriteria() {
super(); super();
criteria = new ArrayList<Criterion>(); criteria = new ArrayList<>();
} }
public boolean isValid() { public boolean isValid() {
@@ -814,6 +724,76 @@ public class SystemConfigExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMinusStockFlagIsNull() {
addCriterion("minus_stock_flag is null");
return (Criteria) this;
}
public Criteria andMinusStockFlagIsNotNull() {
addCriterion("minus_stock_flag is not null");
return (Criteria) this;
}
public Criteria andMinusStockFlagEqualTo(String value) {
addCriterion("minus_stock_flag =", value, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagNotEqualTo(String value) {
addCriterion("minus_stock_flag <>", value, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagGreaterThan(String value) {
addCriterion("minus_stock_flag >", value, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagGreaterThanOrEqualTo(String value) {
addCriterion("minus_stock_flag >=", value, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagLessThan(String value) {
addCriterion("minus_stock_flag <", value, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagLessThanOrEqualTo(String value) {
addCriterion("minus_stock_flag <=", value, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagLike(String value) {
addCriterion("minus_stock_flag like", value, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagNotLike(String value) {
addCriterion("minus_stock_flag not like", value, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagIn(List<String> values) {
addCriterion("minus_stock_flag in", values, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagNotIn(List<String> values) {
addCriterion("minus_stock_flag not in", values, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagBetween(String value1, String value2) {
addCriterion("minus_stock_flag between", value1, value2, "minusStockFlag");
return (Criteria) this;
}
public Criteria andMinusStockFlagNotBetween(String value1, String value2) {
addCriterion("minus_stock_flag not between", value1, value2, "minusStockFlag");
return (Criteria) this;
}
public Criteria andTenantIdIsNull() { public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null"); addCriterion("tenant_id is null");
return (Criteria) this; return (Criteria) this;
@@ -945,25 +925,12 @@ public class SystemConfigExample {
} }
} }
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_systemconfig
*
* @mbggenerated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
protected Criteria() { protected Criteria() {
super(); super();
} }
} }
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
public static class Criterion { public static class Criterion {
private String condition; private String condition;

View File

@@ -6,91 +6,25 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface SystemConfigMapper { public interface SystemConfigMapper {
/** long countByExample(SystemConfigExample example);
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int countByExample(SystemConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int deleteByExample(SystemConfigExample example); int deleteByExample(SystemConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int insert(SystemConfig record); int insert(SystemConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int insertSelective(SystemConfig record); int insertSelective(SystemConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
List<SystemConfig> selectByExample(SystemConfigExample example); List<SystemConfig> selectByExample(SystemConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
SystemConfig selectByPrimaryKey(Long id); SystemConfig selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int updateByExampleSelective(@Param("record") SystemConfig record, @Param("example") SystemConfigExample example); int updateByExampleSelective(@Param("record") SystemConfig record, @Param("example") SystemConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int updateByExample(@Param("record") SystemConfig record, @Param("example") SystemConfigExample example); int updateByExample(@Param("record") SystemConfig record, @Param("example") SystemConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int updateByPrimaryKeySelective(SystemConfig record); int updateByPrimaryKeySelective(SystemConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_systemconfig
*
* @mbggenerated
*/
int updateByPrimaryKey(SystemConfig record); int updateByPrimaryKey(SystemConfig record);
} }

View File

@@ -17,6 +17,7 @@ import com.jsh.erp.service.MaterialExtend.MaterialExtendService;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.material.MaterialService; import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.service.serialNumber.SerialNumberService; import com.jsh.erp.service.serialNumber.SerialNumberService;
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.utils.QueryUtils; import com.jsh.erp.utils.QueryUtils;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -60,6 +61,8 @@ public class DepotItemService {
@Resource @Resource
private UserService userService; private UserService userService;
@Resource @Resource
private SystemConfigService systemConfigService;
@Resource
private LogService logService; private LogService logService;
public DepotItem getDepotItem(long id)throws Exception { public DepotItem getDepotItem(long id)throws Exception {
@@ -429,7 +432,7 @@ public class DepotItemService {
} }
BigDecimal stock = getStockByParam(depotItem.getDepotid(),depotItem.getMaterialid(),null,null,tenantId); BigDecimal stock = getStockByParam(depotItem.getDepotid(),depotItem.getMaterialid(),null,null,tenantId);
BigDecimal thisBasicNumber = depotItem.getBasicnumber()==null?BigDecimal.ZERO:depotItem.getBasicnumber(); BigDecimal thisBasicNumber = depotItem.getBasicnumber()==null?BigDecimal.ZERO:depotItem.getBasicnumber();
if(stock.compareTo(thisBasicNumber)<0){ if(systemConfigService.getMinusStockFlag() == false && stock.compareTo(thisBasicNumber)<0){
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_CODE, throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_CODE,
String.format(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_MSG,material==null?"":material.getName())); String.format(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_MSG,material==null?"":material.getName()));
} }
@@ -558,7 +561,7 @@ public class DepotItemService {
if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())){ if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())){
BigDecimal stock = getStockByParam(depotItem.getDepotid(),depotItem.getMaterialid(),null,null,tenantId); BigDecimal stock = getStockByParam(depotItem.getDepotid(),depotItem.getMaterialid(),null,null,tenantId);
BigDecimal thisBasicNumber = depotItem.getBasicnumber()==null?BigDecimal.ZERO:depotItem.getBasicnumber(); BigDecimal thisBasicNumber = depotItem.getBasicnumber()==null?BigDecimal.ZERO:depotItem.getBasicnumber();
if(stock.compareTo(thisBasicNumber)<0){ if(systemConfigService.getMinusStockFlag() == false && stock.compareTo(thisBasicNumber)<0){
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_CODE, throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_CODE,
String.format(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_MSG,material==null?"":material.getName())); String.format(ExceptionConstants.MATERIAL_STOCK_NOT_ENOUGH_MSG,material==null?"":material.getName()));
} }

View File

@@ -199,4 +199,21 @@ public class SystemConfigService {
} }
return customerFlag; return customerFlag;
} }
/**
* 获取负库存开关
* @return
* @throws Exception
*/
public boolean getMinusStockFlag() throws Exception {
boolean minusStockFlag = false;
List<SystemConfig> list = getSystemConfig();
if(list.size()>0) {
String flag = list.get(0).getMinusStockFlag();
if(("1").equals(flag)) {
minusStockFlag = true;
}
}
return minusStockFlag;
}
} }

View File

@@ -1,366 +1,323 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.SystemConfigMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.SystemConfigMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.SystemConfig"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.SystemConfig">
<!-- <id column="id" jdbcType="BIGINT" property="id" />
WARNING - @mbggenerated <result column="company_name" jdbcType="VARCHAR" property="companyName" />
This element is automatically generated by MyBatis Generator, do not modify. <result column="company_contacts" jdbcType="VARCHAR" property="companyContacts" />
--> <result column="company_address" jdbcType="VARCHAR" property="companyAddress" />
<id column="id" jdbcType="BIGINT" property="id" /> <result column="company_tel" jdbcType="VARCHAR" property="companyTel" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" /> <result column="company_fax" jdbcType="VARCHAR" property="companyFax" />
<result column="company_contacts" jdbcType="VARCHAR" property="companyContacts" /> <result column="company_post_code" jdbcType="VARCHAR" property="companyPostCode" />
<result column="company_address" jdbcType="VARCHAR" property="companyAddress" /> <result column="depot_flag" jdbcType="VARCHAR" property="depotFlag" />
<result column="company_tel" jdbcType="VARCHAR" property="companyTel" /> <result column="customer_flag" jdbcType="VARCHAR" property="customerFlag" />
<result column="company_fax" jdbcType="VARCHAR" property="companyFax" /> <result column="minus_stock_flag" jdbcType="VARCHAR" property="minusStockFlag" />
<result column="company_post_code" jdbcType="VARCHAR" property="companyPostCode" /> <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="depot_flag" jdbcType="VARCHAR" property="depotFlag" /> <result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="customer_flag" jdbcType="VARCHAR" property="customerFlag" /> </resultMap>
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" /> <sql id="Example_Where_Clause">
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" /> <where>
</resultMap> <foreach collection="oredCriteria" item="criteria" separator="or">
<sql id="Example_Where_Clause"> <if test="criteria.valid">
<!-- <trim prefix="(" prefixOverrides="and" suffix=")">
WARNING - @mbggenerated <foreach collection="criteria.criteria" item="criterion">
This element is automatically generated by MyBatis Generator, do not modify. <choose>
--> <when test="criterion.noValue">
<where> and ${criterion.condition}
<foreach collection="oredCriteria" item="criteria" separator="or"> </when>
<if test="criteria.valid"> <when test="criterion.singleValue">
<trim prefix="(" prefixOverrides="and" suffix=")"> and ${criterion.condition} #{criterion.value}
<foreach collection="criteria.criteria" item="criterion"> </when>
<choose> <when test="criterion.betweenValue">
<when test="criterion.noValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
and ${criterion.condition} </when>
</when> <when test="criterion.listValue">
<when test="criterion.singleValue"> and ${criterion.condition}
and ${criterion.condition} #{criterion.value} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
</when> #{listItem}
<when test="criterion.betweenValue"> </foreach>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when>
</when> </choose>
<when test="criterion.listValue"> </foreach>
and ${criterion.condition} </trim>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> </if>
#{listItem} </foreach>
</foreach> </where>
</when> </sql>
</choose> <sql id="Update_By_Example_Where_Clause">
</foreach> <where>
</trim> <foreach collection="example.oredCriteria" item="criteria" separator="or">
</if> <if test="criteria.valid">
</foreach> <trim prefix="(" prefixOverrides="and" suffix=")">
</where> <foreach collection="criteria.criteria" item="criterion">
</sql> <choose>
<sql id="Update_By_Example_Where_Clause"> <when test="criterion.noValue">
<!-- and ${criterion.condition}
WARNING - @mbggenerated </when>
This element is automatically generated by MyBatis Generator, do not modify. <when test="criterion.singleValue">
--> and ${criterion.condition} #{criterion.value}
<where> </when>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <when test="criterion.betweenValue">
<if test="criteria.valid"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<trim prefix="(" prefixOverrides="and" suffix=")"> </when>
<foreach collection="criteria.criteria" item="criterion"> <when test="criterion.listValue">
<choose> and ${criterion.condition}
<when test="criterion.noValue"> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
and ${criterion.condition} #{listItem}
</when> </foreach>
<when test="criterion.singleValue"> </when>
and ${criterion.condition} #{criterion.value} </choose>
</when> </foreach>
<when test="criterion.betweenValue"> </trim>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </if>
</when> </foreach>
<when test="criterion.listValue"> </where>
and ${criterion.condition} </sql>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <sql id="Base_Column_List">
#{listItem} id, company_name, company_contacts, company_address, company_tel, company_fax, company_post_code,
</foreach> depot_flag, customer_flag, minus_stock_flag, tenant_id, delete_Flag
</when> </sql>
</choose> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap">
</foreach> select
</trim> <if test="distinct">
</if> distinct
</foreach> </if>
</where> <include refid="Base_Column_List" />
</sql> from jsh_systemconfig
<sql id="Base_Column_List"> <if test="_parameter != null">
<!-- <include refid="Example_Where_Clause" />
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="orderByClause != null">
--> order by ${orderByClause}
id, company_name, company_contacts, company_address, company_tel, company_fax, company_post_code, </if>
depot_flag, customer_flag, tenant_id, delete_Flag </select>
</sql> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap"> select
<!-- <include refid="Base_Column_List" />
WARNING - @mbggenerated from jsh_systemconfig
This element is automatically generated by MyBatis Generator, do not modify. where id = #{id,jdbcType=BIGINT}
--> </select>
select <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<if test="distinct"> delete from jsh_systemconfig
distinct where id = #{id,jdbcType=BIGINT}
</if> </delete>
<include refid="Base_Column_List" /> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample">
from jsh_systemconfig delete from jsh_systemconfig
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
<if test="orderByClause != null"> </delete>
order by ${orderByClause} <insert id="insert" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
</if> insert into jsh_systemconfig (id, company_name, company_contacts,
</select> company_address, company_tel, company_fax,
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> company_post_code, depot_flag, customer_flag,
<!-- minus_stock_flag, tenant_id, delete_Flag
WARNING - @mbggenerated )
This element is automatically generated by MyBatis Generator, do not modify. values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR},
--> #{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR},
select #{companyPostCode,jdbcType=VARCHAR}, #{depotFlag,jdbcType=VARCHAR}, #{customerFlag,jdbcType=VARCHAR},
<include refid="Base_Column_List" /> #{minusStockFlag,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
from jsh_systemconfig )
where id = #{id,jdbcType=BIGINT} </insert>
</select> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> insert into jsh_systemconfig
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">
WARNING - @mbggenerated <if test="id != null">
This element is automatically generated by MyBatis Generator, do not modify. id,
--> </if>
delete from jsh_systemconfig <if test="companyName != null">
where id = #{id,jdbcType=BIGINT} company_name,
</delete> </if>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample"> <if test="companyContacts != null">
<!-- company_contacts,
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="companyAddress != null">
--> company_address,
delete from jsh_systemconfig </if>
<if test="_parameter != null"> <if test="companyTel != null">
<include refid="Example_Where_Clause" /> company_tel,
</if> </if>
</delete> <if test="companyFax != null">
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.SystemConfig"> company_fax,
<!-- </if>
WARNING - @mbggenerated <if test="companyPostCode != null">
This element is automatically generated by MyBatis Generator, do not modify. company_post_code,
--> </if>
insert into jsh_systemconfig (id, company_name, company_contacts, <if test="depotFlag != null">
company_address, company_tel, company_fax, depot_flag,
company_post_code, depot_flag, customer_flag, </if>
tenant_id, delete_Flag) <if test="customerFlag != null">
values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR}, customer_flag,
#{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR}, </if>
#{companyPostCode,jdbcType=VARCHAR}, #{depotFlag,jdbcType=VARCHAR}, #{customerFlag,jdbcType=VARCHAR}, <if test="minusStockFlag != null">
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}) minus_stock_flag,
</insert> </if>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig"> <if test="tenantId != null">
<!-- tenant_id,
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="deleteFlag != null">
--> delete_Flag,
insert into jsh_systemconfig </if>
<trim prefix="(" suffix=")" suffixOverrides=","> </trim>
<if test="id != null"> <trim prefix="values (" suffix=")" suffixOverrides=",">
id, <if test="id != null">
</if> #{id,jdbcType=BIGINT},
<if test="companyName != null"> </if>
company_name, <if test="companyName != null">
</if> #{companyName,jdbcType=VARCHAR},
<if test="companyContacts != null"> </if>
company_contacts, <if test="companyContacts != null">
</if> #{companyContacts,jdbcType=VARCHAR},
<if test="companyAddress != null"> </if>
company_address, <if test="companyAddress != null">
</if> #{companyAddress,jdbcType=VARCHAR},
<if test="companyTel != null"> </if>
company_tel, <if test="companyTel != null">
</if> #{companyTel,jdbcType=VARCHAR},
<if test="companyFax != null"> </if>
company_fax, <if test="companyFax != null">
</if> #{companyFax,jdbcType=VARCHAR},
<if test="companyPostCode != null"> </if>
company_post_code, <if test="companyPostCode != null">
</if> #{companyPostCode,jdbcType=VARCHAR},
<if test="depotFlag != null"> </if>
depot_flag, <if test="depotFlag != null">
</if> #{depotFlag,jdbcType=VARCHAR},
<if test="customerFlag != null"> </if>
customer_flag, <if test="customerFlag != null">
</if> #{customerFlag,jdbcType=VARCHAR},
<if test="tenantId != null"> </if>
tenant_id, <if test="minusStockFlag != null">
</if> #{minusStockFlag,jdbcType=VARCHAR},
<if test="deleteFlag != null"> </if>
delete_Flag, <if test="tenantId != null">
</if> #{tenantId,jdbcType=BIGINT},
</trim> </if>
<trim prefix="values (" suffix=")" suffixOverrides=","> <if test="deleteFlag != null">
<if test="id != null"> #{deleteFlag,jdbcType=VARCHAR},
#{id,jdbcType=BIGINT}, </if>
</if> </trim>
<if test="companyName != null"> </insert>
#{companyName,jdbcType=VARCHAR}, <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultType="java.lang.Long">
</if> select count(*) from jsh_systemconfig
<if test="companyContacts != null"> <if test="_parameter != null">
#{companyContacts,jdbcType=VARCHAR}, <include refid="Example_Where_Clause" />
</if> </if>
<if test="companyAddress != null"> </select>
#{companyAddress,jdbcType=VARCHAR}, <update id="updateByExampleSelective" parameterType="map">
</if> update jsh_systemconfig
<if test="companyTel != null"> <set>
#{companyTel,jdbcType=VARCHAR}, <if test="record.id != null">
</if> id = #{record.id,jdbcType=BIGINT},
<if test="companyFax != null"> </if>
#{companyFax,jdbcType=VARCHAR}, <if test="record.companyName != null">
</if> company_name = #{record.companyName,jdbcType=VARCHAR},
<if test="companyPostCode != null"> </if>
#{companyPostCode,jdbcType=VARCHAR}, <if test="record.companyContacts != null">
</if> company_contacts = #{record.companyContacts,jdbcType=VARCHAR},
<if test="depotFlag != null"> </if>
#{depotFlag,jdbcType=VARCHAR}, <if test="record.companyAddress != null">
</if> company_address = #{record.companyAddress,jdbcType=VARCHAR},
<if test="customerFlag != null"> </if>
#{customerFlag,jdbcType=VARCHAR}, <if test="record.companyTel != null">
</if> company_tel = #{record.companyTel,jdbcType=VARCHAR},
<if test="tenantId != null"> </if>
#{tenantId,jdbcType=BIGINT}, <if test="record.companyFax != null">
</if> company_fax = #{record.companyFax,jdbcType=VARCHAR},
<if test="deleteFlag != null"> </if>
#{deleteFlag,jdbcType=VARCHAR}, <if test="record.companyPostCode != null">
</if> company_post_code = #{record.companyPostCode,jdbcType=VARCHAR},
</trim> </if>
</insert> <if test="record.depotFlag != null">
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultType="java.lang.Integer"> depot_flag = #{record.depotFlag,jdbcType=VARCHAR},
<!-- </if>
WARNING - @mbggenerated <if test="record.customerFlag != null">
This element is automatically generated by MyBatis Generator, do not modify. customer_flag = #{record.customerFlag,jdbcType=VARCHAR},
--> </if>
select count(*) from jsh_systemconfig <if test="record.minusStockFlag != null">
<if test="_parameter != null"> minus_stock_flag = #{record.minusStockFlag,jdbcType=VARCHAR},
<include refid="Example_Where_Clause" /> </if>
</if> <if test="record.tenantId != null">
</select> tenant_id = #{record.tenantId,jdbcType=BIGINT},
<update id="updateByExampleSelective" parameterType="map"> </if>
<!-- <if test="record.deleteFlag != null">
WARNING - @mbggenerated delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> </set>
update jsh_systemconfig <if test="_parameter != null">
<set> <include refid="Update_By_Example_Where_Clause" />
<if test="record.id != null"> </if>
id = #{record.id,jdbcType=BIGINT}, </update>
</if> <update id="updateByExample" parameterType="map">
<if test="record.companyName != null"> update jsh_systemconfig
company_name = #{record.companyName,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=BIGINT},
</if> company_name = #{record.companyName,jdbcType=VARCHAR},
<if test="record.companyContacts != null"> company_contacts = #{record.companyContacts,jdbcType=VARCHAR},
company_contacts = #{record.companyContacts,jdbcType=VARCHAR}, company_address = #{record.companyAddress,jdbcType=VARCHAR},
</if> company_tel = #{record.companyTel,jdbcType=VARCHAR},
<if test="record.companyAddress != null"> company_fax = #{record.companyFax,jdbcType=VARCHAR},
company_address = #{record.companyAddress,jdbcType=VARCHAR}, company_post_code = #{record.companyPostCode,jdbcType=VARCHAR},
</if> depot_flag = #{record.depotFlag,jdbcType=VARCHAR},
<if test="record.companyTel != null"> customer_flag = #{record.customerFlag,jdbcType=VARCHAR},
company_tel = #{record.companyTel,jdbcType=VARCHAR}, minus_stock_flag = #{record.minusStockFlag,jdbcType=VARCHAR},
</if> tenant_id = #{record.tenantId,jdbcType=BIGINT},
<if test="record.companyFax != null"> delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
company_fax = #{record.companyFax,jdbcType=VARCHAR}, <if test="_parameter != null">
</if> <include refid="Update_By_Example_Where_Clause" />
<if test="record.companyPostCode != null"> </if>
company_post_code = #{record.companyPostCode,jdbcType=VARCHAR}, </update>
</if> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<if test="record.depotFlag != null"> update jsh_systemconfig
depot_flag = #{record.depotFlag,jdbcType=VARCHAR}, <set>
</if> <if test="companyName != null">
<if test="record.customerFlag != null"> company_name = #{companyName,jdbcType=VARCHAR},
customer_flag = #{record.customerFlag,jdbcType=VARCHAR}, </if>
</if> <if test="companyContacts != null">
<if test="record.tenantId != null"> company_contacts = #{companyContacts,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}, </if>
</if> <if test="companyAddress != null">
<if test="record.deleteFlag != null"> company_address = #{companyAddress,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, </if>
</if> <if test="companyTel != null">
</set> company_tel = #{companyTel,jdbcType=VARCHAR},
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> <if test="companyFax != null">
</if> company_fax = #{companyFax,jdbcType=VARCHAR},
</update> </if>
<update id="updateByExample" parameterType="map"> <if test="companyPostCode != null">
<!-- company_post_code = #{companyPostCode,jdbcType=VARCHAR},
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="depotFlag != null">
--> depot_flag = #{depotFlag,jdbcType=VARCHAR},
update jsh_systemconfig </if>
set id = #{record.id,jdbcType=BIGINT}, <if test="customerFlag != null">
company_name = #{record.companyName,jdbcType=VARCHAR}, customer_flag = #{customerFlag,jdbcType=VARCHAR},
company_contacts = #{record.companyContacts,jdbcType=VARCHAR}, </if>
company_address = #{record.companyAddress,jdbcType=VARCHAR}, <if test="minusStockFlag != null">
company_tel = #{record.companyTel,jdbcType=VARCHAR}, minus_stock_flag = #{minusStockFlag,jdbcType=VARCHAR},
company_fax = #{record.companyFax,jdbcType=VARCHAR}, </if>
company_post_code = #{record.companyPostCode,jdbcType=VARCHAR}, <if test="tenantId != null">
depot_flag = #{record.depotFlag,jdbcType=VARCHAR}, tenant_id = #{tenantId,jdbcType=BIGINT},
customer_flag = #{record.customerFlag,jdbcType=VARCHAR}, </if>
tenant_id = #{record.tenantId,jdbcType=BIGINT}, <if test="deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR} delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> </set>
</if> where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig"> <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!-- update jsh_systemconfig
WARNING - @mbggenerated set company_name = #{companyName,jdbcType=VARCHAR},
This element is automatically generated by MyBatis Generator, do not modify. company_contacts = #{companyContacts,jdbcType=VARCHAR},
--> company_address = #{companyAddress,jdbcType=VARCHAR},
update jsh_systemconfig company_tel = #{companyTel,jdbcType=VARCHAR},
<set> company_fax = #{companyFax,jdbcType=VARCHAR},
<if test="companyName != null"> company_post_code = #{companyPostCode,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR}, depot_flag = #{depotFlag,jdbcType=VARCHAR},
</if> customer_flag = #{customerFlag,jdbcType=VARCHAR},
<if test="companyContacts != null"> minus_stock_flag = #{minusStockFlag,jdbcType=VARCHAR},
company_contacts = #{companyContacts,jdbcType=VARCHAR}, tenant_id = #{tenantId,jdbcType=BIGINT},
</if> delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
<if test="companyAddress != null"> where id = #{id,jdbcType=BIGINT}
company_address = #{companyAddress,jdbcType=VARCHAR}, </update>
</if>
<if test="companyTel != null">
company_tel = #{companyTel,jdbcType=VARCHAR},
</if>
<if test="companyFax != null">
company_fax = #{companyFax,jdbcType=VARCHAR},
</if>
<if test="companyPostCode != null">
company_post_code = #{companyPostCode,jdbcType=VARCHAR},
</if>
<if test="depotFlag != null">
depot_flag = #{depotFlag,jdbcType=VARCHAR},
</if>
<if test="customerFlag != null">
customer_flag = #{customerFlag,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_systemconfig
set company_name = #{companyName,jdbcType=VARCHAR},
company_contacts = #{companyContacts,jdbcType=VARCHAR},
company_address = #{companyAddress,jdbcType=VARCHAR},
company_tel = #{companyTel,jdbcType=VARCHAR},
company_fax = #{companyFax,jdbcType=VARCHAR},
company_post_code = #{companyPostCode,jdbcType=VARCHAR},
depot_flag = #{depotFlag,jdbcType=VARCHAR},
customer_flag = #{customerFlag,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>