Commit 54bf4897 authored by 季圣华's avatar 季圣华
Browse files

增加租户的功能

parent d845b9df
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<tr> <tr>
<td style="width:80px;">序列号</td> <td style="width:80px;">序列号</td>
<td style="padding:5px;width:180px;"> <td style="padding:5px;width:180px;">
<select name="enableSerialNumber" id="enableSerialNumber" style="width: 180px;height: 20px"> <select name="EnableSerialNumber" id="EnableSerialNumber" style="width: 180px;height: 20px">
<option value="1">启用</option> <option value="1">启用</option>
<option value="0">禁用</option> <option value="0">禁用</option>
</select> </select>
...@@ -509,7 +509,7 @@ ...@@ -509,7 +509,7 @@
+ 'AaBb' + rec.lowprice + 'AaBb' + rec.presetpriceone + 'AaBb' + rec.presetpricetwo + 'AaBb' + rec.remark + 'AaBb' + rec.standard + 'AaBb' + rec.lowprice + 'AaBb' + rec.presetpriceone + 'AaBb' + rec.presetpricetwo + 'AaBb' + rec.remark + 'AaBb' + rec.standard
+ 'AaBb' + rec.color + 'AaBb' + rec.packing + 'AaBb' + rec.safetystock + 'AaBb' + rec.categoryid + 'AaBb' + rec.categoryName + 'AaBb' + rec.color + 'AaBb' + rec.packing + 'AaBb' + rec.safetystock + 'AaBb' + rec.categoryid + 'AaBb' + rec.categoryName
+ 'AaBb' + rec.unitid + 'AaBb' + rec.unitName + 'AaBb' + rec.firstoutunit + 'AaBb' + rec.firstinunit + 'AaBb' + rec.unitid + 'AaBb' + rec.unitName + 'AaBb' + rec.firstoutunit + 'AaBb' + rec.firstinunit
+ 'AaBb' + rec.mfrs + 'AaBb' + rec.otherfield1 + 'AaBb' + rec.otherfield2 + 'AaBb' + rec.otherfield3+ 'AaBb' + rec.enableSerialNumber; + 'AaBb' + rec.mfrs + 'AaBb' + rec.otherfield1 + 'AaBb' + rec.otherfield2 + 'AaBb' + rec.otherfield3+ 'AaBb' + rec.enableserialnumber;
str += '<img title="编辑" src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editMaterial(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;'; str += '<img title="编辑" src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editMaterial(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;';
str += '<img title="删除" src="/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteMaterial(' + rec.id + ');"/>'; str += '<img title="删除" src="/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteMaterial(' + rec.id + ');"/>';
return str; return str;
...@@ -572,7 +572,7 @@ ...@@ -572,7 +572,7 @@
} }
}, },
{ {
title: '序列号', field: 'enableSerialNumber', width: 70, align: "center", formatter: function (value) { title: '序列号', field: 'enableserialnumber', width: 70, align: "center", formatter: function (value) {
return value=='1' ? "启用" : "禁用"; return value=='1' ? "启用" : "禁用";
} }
} }
...@@ -1048,8 +1048,8 @@ ...@@ -1048,8 +1048,8 @@
$('#materialFM input').val(""); //将输入框全部清空 $('#materialFM input').val(""); //将输入框全部清空
bindMProperty(); //根据商品属性绑定 bindMProperty(); //根据商品属性绑定
// $("#enableSerialNumber").combobox('setValue','0'); // $("#EnableSerialNumber").combobox('setValue','0');
$("#enableSerialNumber").val('0'); $("#EnableSerialNumber").val('0');
$('#materialDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加商品信息'); $('#materialDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加商品信息');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
$("#Name").val("").focus(); $("#Name").val("").focus();
...@@ -1157,7 +1157,7 @@ ...@@ -1157,7 +1157,7 @@
basicList.LowPrice = $("#basicLowPrice").val(); basicList.LowPrice = $("#basicLowPrice").val();
basicList.PresetPriceOne = $("#basicPresetPriceOne").val(); basicList.PresetPriceOne = $("#basicPresetPriceOne").val();
basicList.PresetPriceTwo = $("#basicPresetPriceTwo").val(); basicList.PresetPriceTwo = $("#basicPresetPriceTwo").val();
basicList.enableSerialNumber=$("#enableSerialNumber").val(); basicList.EnableSerialNumber=$("#EnableSerialNumber").val();
otherList.Unit = $("#otherUnit").text(); otherList.Unit = $("#otherUnit").text();
otherList.RetailPrice = $("#otherRetailPrice").val(); otherList.RetailPrice = $("#otherRetailPrice").val();
otherList.LowPrice = $("#otherLowPrice").val(); otherList.LowPrice = $("#otherLowPrice").val();
...@@ -1226,7 +1226,7 @@ ...@@ -1226,7 +1226,7 @@
bindMProperty(); //根据商品属性绑定 bindMProperty(); //根据商品属性绑定
$("#Name").focus().val(materialInfo[1]); $("#Name").focus().val(materialInfo[1]);
$("#Color").focus().val(materialInfo[11]); $("#Color").focus().val(materialInfo[11]);
$("#enableSerialNumber").val(materialInfo[24]=='1'?'1':'0'); $("#EnableSerialNumber").val(materialInfo[24]=='1'?'1':'0');
//商品类别id //商品类别id
$("#parentid").val(materialInfo[14]); $("#parentid").val(materialInfo[14]);
//商品类别名称 //商品类别名称
......
...@@ -103,6 +103,11 @@ ...@@ -103,6 +103,11 @@
<artifactId>pagehelper-spring-boot-starter</artifactId> <artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.10</version> <version>1.2.10</version>
</dependency> </dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.0.7.1</version>
</dependency>
</dependencies> </dependencies>
<repositories> <repositories>
......
...@@ -1472,3 +1472,33 @@ update jsh_user set status='0' where status is null; ...@@ -1472,3 +1472,33 @@ update jsh_user set status='0' where status is null;
-- 设置根目录编号为1 -- 设置根目录编号为1
-- ---------------------------- -- ----------------------------
update jsh_materialcategory set serial_no='1' where id='1'; update jsh_materialcategory set serial_no='1' where id='1';
-- ----------------------------
-- 时间:2019年3月18日
-- version:1.0.11
-- 此次更新
-- 1、批量增加大部分表的tenant_id租户字段
-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
-- ----------------------------
alter table jsh_account add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_accounthead add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_accountitem add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_asset add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_assetcategory add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_assetname add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_depot add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_depothead add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_depotitem add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_inoutitem add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_log add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_material add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_materialcategory add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_orga_user_rel add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_organization add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_person add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_role add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_serial_number add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_supplier add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_systemconfig add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_unit add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
alter table jsh_user add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.jsh.erp; ...@@ -2,6 +2,7 @@ package com.jsh.erp;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration; import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
...@@ -10,6 +11,8 @@ import org.springframework.context.annotation.Bean; ...@@ -10,6 +11,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.DispatcherServlet;
import javax.servlet.http.Cookie;
@SpringBootApplication @SpringBootApplication
@MapperScan(basePackages = {"com.jsh.erp.datasource.mappers"}) @MapperScan(basePackages = {"com.jsh.erp.datasource.mappers"})
@ServletComponentScan @ServletComponentScan
......
package com.jsh.erp.config;
import com.baomidou.mybatisplus.core.parser.ISqlParser;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor;
import com.baomidou.mybatisplus.extension.plugins.tenant.TenantHandler;
import com.baomidou.mybatisplus.extension.plugins.tenant.TenantSqlParser;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.LongValue;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
@Configuration
public class TenantConfig {
@Bean
public PaginationInterceptor paginationInterceptor(HttpServletRequest request) {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
List<ISqlParser> sqlParserList = new ArrayList<>();
TenantSqlParser tenantSqlParser = new TenantSqlParser();
tenantSqlParser.setTenantHandler(new TenantHandler() {
@Override
public Expression getTenantId() {
//从session中获取租户id
Object tenantId = request.getSession().getAttribute("tenantId");
if(tenantId!=null){
return new LongValue(Long.parseLong(tenantId.toString()));
} else {
return null;
}
}
@Override
public String getTenantIdColumn() {
return "tenant_id";
}
@Override
public boolean doTableFilter(String tableName) {
//从session中获取租户id
Object mybatisPlusStatus = request.getSession().getAttribute("mybatisPlusStatus");
if(mybatisPlusStatus !=null && mybatisPlusStatus.toString().equals("open")) {
// 这里可以判断是否过滤表
if ("databasechangelog".equals(tableName) || "databasechangeloglock".equals(tableName)
|| "jsh_materialproperty".equals(tableName) || "tbl_sequence".equals(tableName) || "dual".equals(tableName)
|| "jsh_userbusiness".equals(tableName) || "jsh_app".equals(tableName) || "jsh_functions".equals(tableName)) {
return true;
} else {
return false;
}
} else {
return true;
}
}
});
sqlParserList.add(tenantSqlParser);
paginationInterceptor.setSqlParserList(sqlParserList);
// paginationInterceptor.setSqlParserFilter(new ISqlParserFilter() {
// @Override
// public boolean doFilter(MetaObject metaObject) {
// MappedStatement ms = PluginUtils.realTarget(metaObject);
// // 过滤自定义查询此时无租户信息约束出现
// if ("com.jsh.erp.datasource.mappers.DepotHeadMapperEx.getBuildOnlyNumber".equals(ms.getId())) {
// return true;
// }
// return false;
// }
// });
return paginationInterceptor;
}
/**
* 相当于顶部的:
* {@code @MapperScan("com.jsh.erp.datasource.mappers*")}
* 这里可以扩展,比如使用配置文件来配置扫描Mapper的路径
*/
@Bean
public MapperScannerConfigurer mapperScannerConfigurer() {
MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
scannerConfigurer.setBasePackage("com.jsh.erp.datasource.mappers*");
return scannerConfigurer;
}
/**
* 性能分析拦截器,不建议生产使用
*/
@Bean
public PerformanceInterceptor performanceInterceptor(){
return new PerformanceInterceptor();
}
}
...@@ -420,7 +420,7 @@ public class DepotItemController { ...@@ -420,7 +420,7 @@ public class DepotItemController {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, currentPage, pageSize); List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, (currentPage-1)*pageSize, pageSize);
String[] mpArr = mpList.split(","); String[] mpArr = mpList.split(",");
int total = depotItemService.findByAllCount(headIds, materialIds); int total = depotItemService.findByAllCount(headIds, materialIds);
map.put("total", total); map.put("total", total);
...@@ -533,7 +533,7 @@ public class DepotItemController { ...@@ -533,7 +533,7 @@ public class DepotItemController {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, currentPage, pageSize); List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, (currentPage-1)*pageSize, pageSize);
String[] mpArr = mpList.split(","); String[] mpArr = mpList.split(",");
int total = depotItemService.findByAllCount(headIds, materialIds); int total = depotItemService.findByAllCount(headIds, materialIds);
map.put("total", total); map.put("total", total);
...@@ -593,7 +593,7 @@ public class DepotItemController { ...@@ -593,7 +593,7 @@ public class DepotItemController {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, currentPage, pageSize); List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, (currentPage-1)*pageSize, pageSize);
String[] mpArr = mpList.split(","); String[] mpArr = mpList.split(",");
int total = depotItemService.findByAllCount(headIds, materialIds); int total = depotItemService.findByAllCount(headIds, materialIds);
map.put("total", total); map.put("total", total);
...@@ -659,7 +659,7 @@ public class DepotItemController { ...@@ -659,7 +659,7 @@ public class DepotItemController {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String message = "成功"; String message = "成功";
try { try {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, currentPage, pageSize); List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, (currentPage-1)*pageSize, pageSize);
//存放数据json数组 //存放数据json数组
Integer pid = projectId; Integer pid = projectId;
String[] names = {"名称", "型号", "单位", "单价", "上月结存数量", "入库数量", "出库数量", "本月结存数量", "结存金额"}; String[] names = {"名称", "型号", "单位", "单价", "上月结存数量", "入库数量", "出库数量", "本月结存数量", "结存金额"};
......
...@@ -71,4 +71,9 @@ public class RoleController { ...@@ -71,4 +71,9 @@ public class RoleController {
} }
return arr; return arr;
} }
@PostMapping(value = "/list")
public List<Role> list(HttpServletRequest request) {
return roleService.getRole();
}
} }
...@@ -17,11 +17,13 @@ import com.jsh.erp.service.user.UserService; ...@@ -17,11 +17,13 @@ import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.*; import com.jsh.erp.utils.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.*; import java.util.*;
...@@ -36,6 +38,9 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; ...@@ -36,6 +38,9 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
public class UserController { public class UserController {
private Logger logger = LoggerFactory.getLogger(ResourceController.class); private Logger logger = LoggerFactory.getLogger(ResourceController.class);
@Value("${mybatis-plus.status}")
private String mybatisPlusStatus;
@Resource @Resource
private UserService userService; private UserService userService;
...@@ -91,6 +96,8 @@ public class UserController { ...@@ -91,6 +96,8 @@ public class UserController {
// new Timestamp(System.currentTimeMillis()), (short) 0, "管理用户:" + username + " 登录系统", username + " 登录系统")); // new Timestamp(System.currentTimeMillis()), (short) 0, "管理用户:" + username + " 登录系统", username + " 登录系统"));
msgTip = "user can login"; msgTip = "user can login";
request.getSession().setAttribute("user",user); request.getSession().setAttribute("user",user);
request.getSession().setAttribute("tenantId",1L); //租户id
request.getSession().setAttribute("mybatisPlusStatus",mybatisPlusStatus); //开启状态
} catch (Exception e) { } catch (Exception e) {
logger.error(">>>>>>>>>>>>>>>查询用户名为:" + username + " ,用户信息异常", e); logger.error(">>>>>>>>>>>>>>>查询用户名为:" + username + " ,用户信息异常", e);
} }
......
...@@ -59,6 +59,14 @@ public class Account { ...@@ -59,6 +59,14 @@ public class Account {
*/ */
private Boolean isdefault; private Boolean isdefault;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_account.tenant_id
*
* @mbggenerated
*/
private Long tenantId;
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_account.Id * This method returns the value of the database column jsh_account.Id
...@@ -226,4 +234,28 @@ public class Account { ...@@ -226,4 +234,28 @@ public class Account {
public void setIsdefault(Boolean isdefault) { public void setIsdefault(Boolean isdefault) {
this.isdefault = isdefault; this.isdefault = isdefault;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_account.tenant_id
*
* @return the value of jsh_account.tenant_id
*
* @mbggenerated
*/
public Long getTenantId() {
return tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_account.tenant_id
*
* @param tenantId the value for jsh_account.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
} }
\ No newline at end of file
...@@ -644,6 +644,66 @@ public class AccountExample { ...@@ -644,6 +644,66 @@ public class AccountExample {
addCriterion("IsDefault not between", value1, value2, "isdefault"); addCriterion("IsDefault not between", value1, value2, "isdefault");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
} }
/** /**
......
...@@ -84,6 +84,14 @@ public class AccountHead { ...@@ -84,6 +84,14 @@ public class AccountHead {
*/ */
private String remark; private String remark;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_accounthead.tenant_id
*
* @mbggenerated
*/
private Long tenantId;
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_accounthead.Id * This method returns the value of the database column jsh_accounthead.Id
...@@ -323,4 +331,28 @@ public class AccountHead { ...@@ -323,4 +331,28 @@ public class AccountHead {
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim(); this.remark = remark == null ? null : remark.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_accounthead.tenant_id
*
* @return the value of jsh_accounthead.tenant_id
*
* @mbggenerated
*/
public Long getTenantId() {
return tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_accounthead.tenant_id
*
* @param tenantId the value for jsh_accounthead.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
} }
\ No newline at end of file
...@@ -825,6 +825,66 @@ public class AccountHeadExample { ...@@ -825,6 +825,66 @@ public class AccountHeadExample {
addCriterion("Remark not between", value1, value2, "remark"); addCriterion("Remark not between", value1, value2, "remark");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
} }
/** /**
......
...@@ -25,6 +25,8 @@ public class AccountHeadVo4ListEx { ...@@ -25,6 +25,8 @@ public class AccountHeadVo4ListEx {
private String remark; private String remark;
private Long tenantId;
private String organname; private String organname;
private String handspersonname; private String handspersonname;
...@@ -111,6 +113,14 @@ public class AccountHeadVo4ListEx { ...@@ -111,6 +113,14 @@ public class AccountHeadVo4ListEx {
this.remark = remark; this.remark = remark;
} }
public Long getTenantId() {
return tenantId;
}
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
public String getOrganname() { public String getOrganname() {
return organname; return organname;
} }
......
...@@ -51,6 +51,14 @@ public class AccountItem { ...@@ -51,6 +51,14 @@ public class AccountItem {
*/ */
private String remark; private String remark;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_accountitem.tenant_id
*
* @mbggenerated
*/
private Long tenantId;
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_accountitem.Id * This method returns the value of the database column jsh_accountitem.Id
...@@ -194,4 +202,28 @@ public class AccountItem { ...@@ -194,4 +202,28 @@ public class AccountItem {
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim(); this.remark = remark == null ? null : remark.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_accountitem.tenant_id
*
* @return the value of jsh_accountitem.tenant_id
*
* @mbggenerated
*/
public Long getTenantId() {
return tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_accountitem.tenant_id
*
* @param tenantId the value for jsh_accountitem.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
} }
\ No newline at end of file
...@@ -564,6 +564,66 @@ public class AccountItemExample { ...@@ -564,6 +564,66 @@ public class AccountItemExample {
addCriterion("Remark not between", value1, value2, "remark"); addCriterion("Remark not between", value1, value2, "remark");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
} }
/** /**
......
...@@ -140,6 +140,14 @@ public class Asset { ...@@ -140,6 +140,14 @@ public class Asset {
*/ */
private Long updator; private Long updator;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.tenant_id
*
* @mbggenerated
*/
private Long tenantId;
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_asset.description * This field corresponds to the database column jsh_asset.description
...@@ -564,6 +572,30 @@ public class Asset { ...@@ -564,6 +572,30 @@ public class Asset {
this.updator = updator; this.updator = updator;
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.tenant_id
*
* @return the value of jsh_asset.tenant_id
*
* @mbggenerated
*/
public Long getTenantId() {
return tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_asset.tenant_id
*
* @param tenantId the value for jsh_asset.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_asset.description * This method returns the value of the database column jsh_asset.description
......
...@@ -33,6 +33,14 @@ public class AssetCategory { ...@@ -33,6 +33,14 @@ public class AssetCategory {
*/ */
private String description; private String description;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_assetcategory.tenant_id
*
* @mbggenerated
*/
private Long tenantId;
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetcategory.id * This method returns the value of the database column jsh_assetcategory.id
...@@ -128,4 +136,28 @@ public class AssetCategory { ...@@ -128,4 +136,28 @@ public class AssetCategory {
public void setDescription(String description) { public void setDescription(String description) {
this.description = description == null ? null : description.trim(); this.description = description == null ? null : description.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_assetcategory.tenant_id
*
* @return the value of jsh_assetcategory.tenant_id
*
* @mbggenerated
*/
public Long getTenantId() {
return tenantId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_assetcategory.tenant_id
*
* @param tenantId the value for jsh_assetcategory.tenant_id
*
* @mbggenerated
*/
public void setTenantId(Long tenantId) {
this.tenantId = tenantId;
}
} }
\ No newline at end of file
...@@ -453,6 +453,66 @@ public class AssetCategoryExample { ...@@ -453,6 +453,66 @@ public class AssetCategoryExample {
addCriterion("description not between", value1, value2, "description"); addCriterion("description not between", value1, value2, "description");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
} }
/** /**
......
...@@ -1255,6 +1255,66 @@ public class AssetExample { ...@@ -1255,6 +1255,66 @@ public class AssetExample {
addCriterion("updator not between", value1, value2, "updator"); addCriterion("updator not between", value1, value2, "updator");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null");
return (Criteria) this;
}
public Criteria andTenantIdIsNotNull() {
addCriterion("tenant_id is not null");
return (Criteria) this;
}
public Criteria andTenantIdEqualTo(Long value) {
addCriterion("tenant_id =", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotEqualTo(Long value) {
addCriterion("tenant_id <>", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThan(Long value) {
addCriterion("tenant_id >", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(Long value) {
addCriterion("tenant_id >=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThan(Long value) {
addCriterion("tenant_id <", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdLessThanOrEqualTo(Long value) {
addCriterion("tenant_id <=", value, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdIn(List<Long> values) {
addCriterion("tenant_id in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotIn(List<Long> values) {
addCriterion("tenant_id not in", values, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdBetween(Long value1, Long value2) {
addCriterion("tenant_id between", value1, value2, "tenantId");
return (Criteria) this;
}
public Criteria andTenantIdNotBetween(Long value1, Long value2) {
addCriterion("tenant_id not between", value1, value2, "tenantId");
return (Criteria) this;
}
} }
/** /**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment