更新后端,采用Springboot+mybatis

This commit is contained in:
季圣华
2018-12-19 23:54:53 +08:00
parent bb6f5528a7
commit 5cc26a22f2
1672 changed files with 52804 additions and 156085 deletions

View File

@@ -0,0 +1,13 @@
server:
port: 80
erpDatasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/jsh_erp?useUnicode=true&characterEncoding=utf8&useCursorFetch=true&defaultFetchSize=500&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false
username: root
password: 1234
web:
front:
base-dir: erp_web
mybatis:
mapperLocations: classpath:mapper_xml/*.xml #一定要对应mapper映射xml文件的所在路径
executorType: SIMPLE

View File

@@ -1,3 +0,0 @@
stmp=smtp.126.com
emailname=accountnms@126.com
password=public

View File

@@ -1,4 +0,0 @@
jdbcUrl= jdbc\:mysql\://localhost\:3306/jsh_erp?useUnicode\=true&characterEncoding\=UTF-8
driverClass= com.mysql.jdbc.Driver
user= root
password= 1234

View File

@@ -1,5 +0,0 @@
bigtypenum=20
smalltypenum=20
consumeForm=20
consumePlace=20
emailnum=20

View File

@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Account" table="jsh_account">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Name" type="java.lang.String">
<column length="50" name="Name">
<comment>名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="SerialNo" type="java.lang.String">
<column length="50" name="SerialNo">
<comment>编号</comment>
</column>
</property>
<property generated="never" lazy="false" name="InitialAmount" type="java.lang.Double">
<column name="InitialAmount" precision="22" scale="3">
<comment>期初金额</comment>
</column>
</property>
<property generated="never" lazy="false" name="CurrentAmount" type="java.lang.Double">
<column name="CurrentAmount" precision="22" scale="3">
<comment>当前余额</comment>
</column>
</property>
<property generated="never" lazy="false" name="IsDefault" type="boolean">
<column length="1" name="IsDefault">
<comment>是否设为默认</comment>
</column>
</property>
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
<column length="100" name="Remark">
<comment>备注</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.AccountHead" table="jsh_accounthead">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Type" type="java.lang.String">
<column length="50" name="Type">
<comment>类型(支出/收入/收款/付款/转账)</comment>
</column>
</property>
<many-to-one name="OrganId" class="com.jsh.model.po.Supplier" lazy="false">
<column name="OrganId">
<comment>单位Id(收款/付款单位)</comment>
</column>
</many-to-one>
<many-to-one name="HandsPersonId" class="com.jsh.model.po.Person" lazy="false">
<column name="HandsPersonId">
<comment>经手人Id</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="ChangeAmount" type="java.lang.Double">
<column name="ChangeAmount" precision="22" scale="3">
<comment>变动金额(优惠/收款/付款/实付)</comment>
</column>
</property>
<property generated="never" lazy="false" name="TotalPrice" type="java.lang.Double">
<column name="TotalPrice" precision="22" scale="3">
<comment>合计金额</comment>
</column>
</property>
<many-to-one name="AccountId" class="com.jsh.model.po.Account" lazy="false">
<column name="AccountId">
<comment>账户(收款/付款)</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="BillNo" type="java.lang.String">
<column length="50" name="BillNo">
<comment>单据编号</comment>
</column>
</property>
<property name="BillTime" type="java.sql.Timestamp">
<column length="19" name="BillTime">
<comment>单据日期</comment>
</column>
</property>
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
<column length="100" name="Remark">
<comment>备注</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.AccountItem" table="jsh_accountitem">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<many-to-one name="HeaderId" class="com.jsh.model.po.AccountHead" lazy="false">
<column name="HeaderId" not-null="true">
<comment>表头Id</comment>
</column>
</many-to-one>
<many-to-one name="AccountId" class="com.jsh.model.po.Account" lazy="false">
<column name="AccountId">
<comment>账户Id</comment>
</column>
</many-to-one>
<many-to-one name="InOutItemId" class="com.jsh.model.po.InOutItem" lazy="false">
<column name="InOutItemId">
<comment>收支项目Id</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="EachAmount" type="java.lang.Double">
<column name="EachAmount" precision="22" scale="3">
<comment>单项金额</comment>
</column>
</property>
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
<column length="100" name="Remark">
<comment>单据备注</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.App" table="jsh_app">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Number" type="java.lang.String">
<column length="50" name="Number">
<comment>代号</comment>
</column>
</property>
<property generated="never" lazy="false" name="Name" type="java.lang.String">
<column length="50" name="Name">
<comment>名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="Type" type="java.lang.String">
<column length="50" name="Type">
<comment>类型</comment>
</column>
</property>
<property generated="never" lazy="false" name="Icon" type="java.lang.String">
<column length="50" name="Icon">
<comment>图标</comment>
</column>
</property>
<property generated="never" lazy="false" name="URL" type="java.lang.String">
<column length="50" name="URL">
<comment>链接</comment>
</column>
</property>
<property generated="never" lazy="false" name="Width" type="java.lang.String">
<column length="50" name="Width">
<comment>宽度</comment>
</column>
</property>
<property generated="never" lazy="false" name="Height" type="java.lang.String">
<column length="50" name="Height">
<comment>高度</comment>
</column>
</property>
<property generated="never" lazy="false" name="ReSize" type="boolean">
<column length="1" name="ReSize">
<comment>拉伸</comment>
</column>
</property>
<property generated="never" lazy="false" name="OpenMax" type="boolean">
<column length="1" name="OpenMax">
<comment>最大化</comment>
</column>
</property>
<property generated="never" lazy="false" name="Flash" type="boolean">
<column length="1" name="Flash">
<comment>Flash</comment>
</column>
</property>
<property generated="never" lazy="false" name="ZL" type="java.lang.String">
<column length="50" name="ZL">
<comment>种类</comment>
</column>
</property>
<property generated="never" lazy="false" name="Sort" type="java.lang.String">
<column length="50" name="Sort">
<comment>排序号</comment>
</column>
</property>
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
<column length="200" name="Remark">
<comment>备注</comment>
</column>
</property>
<property generated="never" lazy="false" name="Enabled" type="boolean">
<column length="1" name="Enabled">
<comment>启用</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,96 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Asset" table="jsh_asset">
<id name="id" type="java.lang.Long">
<column name="id" />
<generator class="native" />
</id>
<many-to-one name="assetname" class="com.jsh.model.po.Assetname" lazy="false">
<column name="assetnameID" not-null="true" />
</many-to-one>
<property name="location" type="java.lang.String">
<column name="location">
<comment>位置</comment>
</column>
</property>
<property name="labels" type="java.lang.String">
<column name="labels">
<comment>标签:以空格为分隔符</comment>
</column>
</property>
<property name="status" type="java.lang.Short">
<column name="status">
<comment>资产的状态0==在库1==在用2==消费</comment>
</column>
</property>
<many-to-one name="user" class="com.jsh.model.po.Basicuser" lazy="false">
<column name="userID"/>
</many-to-one>
<property name="price" type="java.lang.Double">
<column name="price" precision="22" scale="2">
<comment>购买价格</comment>
</column>
</property>
<property name="purchasedate" type="java.sql.Timestamp">
<column name="purchasedate" length="19">
<comment>购买日期</comment>
</column>
</property>
<property name="periodofvalidity" type="java.sql.Timestamp">
<column name="periodofvalidity" length="19">
<comment>有效日期</comment>
</column>
</property>
<property name="warrantydate" type="java.sql.Timestamp">
<column name="warrantydate" length="19">
<comment>保修日期</comment>
</column>
</property>
<property name="assetnum" type="java.lang.String">
<column name="assetnum">
<comment>资产编号</comment>
</column>
</property>
<property name="serialnum" type="java.lang.String">
<column name="serialnum">
<comment>资产序列号</comment>
</column>
</property>
<many-to-one name="supplier" class="com.jsh.model.po.Supplier" lazy="false">
<column name="supplier"/>
</many-to-one>
<property name="description" type="java.lang.String">
<column name="description" length="500">
<comment>描述信息</comment>
</column>
</property>
<property name="addMonth" type="java.lang.String">
<column name="addMonth" length="500">
<comment>资产添加时间,统计报表使用</comment>
</column>
</property>
<property name="createtime" type="java.sql.Timestamp">
<column name="createtime" length="19" />
</property>
<many-to-one name="creator" class="com.jsh.model.po.Basicuser" lazy="false">
<column name="creator"/>
</many-to-one>
<property name="updatetime" type="java.sql.Timestamp">
<column name="updatetime" length="19" />
</property>
<many-to-one name="updator" class="com.jsh.model.po.Basicuser" lazy="false">
<column name="updator"/>
</many-to-one>
</class>
</hibernate-mapping>

View File

@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Assetname" table="jsh_assetname">
<id name="id" type="java.lang.Long">
<column name="id" />
<generator class="native" />
</id>
<property name="assetname" type="java.lang.String">
<column name="assetname" not-null="true">
<comment>资产名称</comment>
</column>
</property>
<many-to-one name="category" class="com.jsh.model.po.Category" lazy="false">
<column name="assetcategoryID" not-null="true" />
</many-to-one>
<property name="isystem" type="java.lang.Short">
<column name="isystem" not-null="true">
<comment>是否系统自带 0==系统 1==非系统</comment>
</column>
</property>
<property name="description" type="java.lang.String">
<column name="description" length="500">
<comment>描述信息</comment>
</column>
</property>
<property name="isconsumables" type="java.lang.Short">
<column name="isconsumables">
<comment>是否为耗材 0==否 1==是 耗材状态只能是消费</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Basicuser" table="jsh_user">
<id name="id" type="java.lang.Long">
<column name="id" />
<generator class="native" />
</id>
<property name="username" type="java.lang.String">
<column name="username" not-null="true">
<comment>用户姓名--例如张三</comment>
</column>
</property>
<property name="loginame" type="java.lang.String">
<column name="loginame">
<comment>登录用户名--可能为空</comment>
</column>
</property>
<property name="password" type="java.lang.String">
<column name="password" length="50" not-null="true">
<comment>登陆密码</comment>
</column>
</property>
<property name="position" type="java.lang.String">
<column name="position" length="200">
<comment>职位</comment>
</column>
</property>
<property name="department" type="java.lang.String">
<column name="department">
<comment>所属部门</comment>
</column>
</property>
<property name="email" type="java.lang.String">
<column name="email" length="100">
<comment>电子邮箱</comment>
</column>
</property>
<property name="phonenum" type="java.lang.String">
<column name="phonenum" length="100">
<comment>手机号码</comment>
</column>
</property>
<property name="ismanager" type="java.lang.Short">
<column name="ismanager" not-null="true">
<comment>是否为管理者 0==管理者 1==员工</comment>
</column>
</property>
<property name="isystem" type="java.lang.Short">
<column name="isystem" not-null="true">
<comment>是否系统自带数据</comment>
</column>
</property>
<property name="status" type="java.lang.Short">
<column name="status">
<comment>用户状态</comment>
</column>
</property>
<property name="description" type="java.lang.String">
<column name="description" length="500">
<comment>用户描述信息</comment>
</column>
</property>
<property name="remark" type="java.lang.String">
<column name="remark" length="500" />
</property>
</class>
</hibernate-mapping>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Category" table="jsh_assetcategory">
<id name="id" type="java.lang.Long">
<column name="id" />
<generator class="native" />
</id>
<property name="assetname" type="java.lang.String">
<column name="assetname" not-null="true">
<comment>资产类型名称</comment>
</column>
</property>
<property name="isystem" type="java.lang.Short">
<column name="isystem" not-null="true">
<comment>是否系统自带 0==系统 1==非系统</comment>
</column>
</property>
<property name="description" type="java.lang.String">
<column name="description" length="500">
<comment>描述信息</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Depot" table="jsh_depot">
<id name="id" type="java.lang.Long">
<column name="id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="name" type="java.lang.String">
<column length="20" name="name">
<comment>仓库名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="address" type="java.lang.String">
<column length="50" name="address">
<comment>仓库地址</comment>
</column>
</property>
<property generated="never" lazy="false" name="warehousing" type="java.lang.Double">
<column name="warehousing" precision="22" scale="3">
<comment>仓储费</comment>
</column>
</property>
<property generated="never" lazy="false" name="truckage" type="java.lang.Double">
<column name="truckage" precision="22" scale="3">
<comment>搬运费</comment>
</column>
</property>
<property generated="never" lazy="false" name="type" type="java.lang.Integer">
<column length="10" name="type">
<comment>类型</comment>
</column>
</property>
<property generated="never" lazy="false" name="sort" type="java.lang.String">
<column length="10" name="sort">
<comment>排序</comment>
</column>
</property>
<property generated="never" lazy="false" name="remark" type="java.lang.String">
<column length="100" name="remark">
<comment>描述</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,146 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.DepotHead" table="jsh_depothead">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Type" type="java.lang.String">
<column length="50" name="Type">
<comment>类型(出库/入库)</comment>
</column>
</property>
<property generated="never" lazy="false" name="SubType" type="java.lang.String">
<column length="50" name="SubType">
<comment>出入库分类(销售、采购、调拨等)</comment>
</column>
</property>
<many-to-one name="ProjectId" class="com.jsh.model.po.Depot" lazy="false">
<column name="ProjectId">
<comment>仓库id停用</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="DefaultNumber" type="java.lang.String">
<column length="50" name="DefaultNumber">
<comment>初始票据号</comment>
</column>
</property>
<property generated="never" lazy="false" name="Number" type="java.lang.String">
<column length="50" name="Number">
<comment>票据号</comment>
</column>
</property>
<property generated="never" lazy="false" name="OperPersonName" type="java.lang.String">
<column length="50" name="OperPersonName">
<comment>操作员名字</comment>
</column>
</property>
<property name="CreateTime" type="java.sql.Timestamp">
<column length="19" name="CreateTime">
<comment>创建时间</comment>
</column>
</property>
<property name="OperTime" type="java.sql.Timestamp">
<column length="19" name="OperTime">
<comment>出入库时间</comment>
</column>
</property>
<many-to-one name="OrganId" class="com.jsh.model.po.Supplier" lazy="false">
<column name="OrganId">
<comment>供应商或客户Id</comment>
</column>
</many-to-one>
<many-to-one name="HandsPersonId" class="com.jsh.model.po.Person" lazy="false">
<column name="HandsPersonId">
<comment>经手人Id</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="Salesman" type="java.lang.String">
<column length="50" name="Salesman">
<comment>业务员(可以多个)</comment>
</column>
</property>
<many-to-one name="AccountId" class="com.jsh.model.po.Account" lazy="false">
<column name="AccountId">
<comment>账户Id</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="ChangeAmount" type="java.lang.Double">
<column name="ChangeAmount" precision="22" scale="3">
<comment>单据总金额(收款/付款)</comment>
</column>
</property>
<property generated="never" lazy="false" name="AccountIdList" type="java.lang.String">
<column length="50" name="AccountIdList">
<comment>多账户ID列表</comment>
</column>
</property>
<property generated="never" lazy="false" name="AccountMoneyList" type="java.lang.String">
<column length="200" name="AccountMoneyList">
<comment>多账户金额列表</comment>
</column>
</property>
<property generated="never" lazy="false" name="Discount" type="java.lang.Double">
<column name="Discount" precision="22" scale="3">
<comment>优惠率</comment>
</column>
</property>
<property generated="never" lazy="false" name="DiscountMoney" type="java.lang.Double">
<column name="DiscountMoney" precision="22" scale="3">
<comment>优惠金额</comment>
</column>
</property>
<property generated="never" lazy="false" name="DiscountLastMoney" type="java.lang.Double">
<column name="DiscountLastMoney" precision="22" scale="3">
<comment>优惠后金额</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherMoney" type="java.lang.Double">
<column name="OtherMoney" precision="22" scale="3">
<comment>销售或采购费用</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherMoneyList" type="java.lang.String">
<column length="200" name="OtherMoneyList">
<comment>销售或采购费用涉及项目Id数组包括快递、招待等</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherMoneyItem" type="java.lang.String">
<column length="200" name="OtherMoneyItem">
<comment>销售或采购费用涉及项目(包括快递、招待等)</comment>
</column>
</property>
<property generated="never" lazy="false" name="AccountDay" type="java.lang.Integer">
<column name="AccountDay" length="10">
<comment>结算天数</comment>
</column>
</property>
<many-to-one name="AllocationProjectId" class="com.jsh.model.po.Depot" lazy="false">
<column name="AllocationProjectId">
<comment>调拨时对方仓库Id停用</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="TotalPrice" type="java.lang.Double">
<column name="TotalPrice" precision="22" scale="3">
<comment>合计金额</comment>
</column>
</property>
<property generated="never" lazy="false" name="PayType" type="java.lang.String">
<column length="50" name="PayType">
<comment>付款类型(现金、记账等)</comment>
</column>
</property>
<property generated="never" lazy="false" name="Status" type="boolean">
<column length="1" name="Status">
<comment>单据状态(未审核、已审核)</comment>
</column>
</property>
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
<column length="1000" name="Remark">
<comment>备注</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,111 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.DepotItem" table="jsh_depotitem">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<many-to-one name="HeaderId" class="com.jsh.model.po.DepotHead" lazy="false">
<column name="HeaderId" not-null="true">
<comment>主表Id</comment>
</column>
</many-to-one>
<many-to-one name="MaterialId" class="com.jsh.model.po.Material" lazy="false">
<column name="MaterialId" not-null="true">
<comment>商品Id</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="MUnit" type="java.lang.String">
<column length="20" name="MUnit">
<comment>商品计量单位</comment>
</column>
</property>
<property generated="never" lazy="false" name="OperNumber" type="java.lang.Double">
<column name="OperNumber" precision="22" scale="3">
<comment>数量</comment>
</column>
</property>
<property generated="never" lazy="false" name="BasicNumber" type="java.lang.Double">
<column name="BasicNumber" precision="22" scale="3">
<comment>基础数量如kg、瓶</comment>
</column>
</property>
<property generated="never" lazy="false" name="UnitPrice" type="java.lang.Double">
<column name="UnitPrice" precision="22" scale="3">
<comment>单价</comment>
</column>
</property>
<property generated="never" lazy="false" name="TaxUnitPrice" type="java.lang.Double">
<column name="TaxUnitPrice" precision="22" scale="3">
<comment>含税单价</comment>
</column>
</property>
<property generated="never" lazy="false" name="AllPrice" type="java.lang.Double">
<column name="AllPrice" precision="22" scale="3">
<comment>金额</comment>
</column>
</property>
<many-to-one name="DepotId" class="com.jsh.model.po.Depot" lazy="false">
<column name="DepotId">
<comment>仓库ID库存是统计出来的</comment>
</column>
</many-to-one>
<many-to-one name="AnotherDepotId" class="com.jsh.model.po.Depot" lazy="false">
<column name="AnotherDepotId">
<comment>调拨时对方仓库Id</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="TaxRate" type="java.lang.Double">
<column name="TaxRate" precision="22" scale="3">
<comment>税率</comment>
</column>
</property>
<property generated="never" lazy="false" name="TaxMoney" type="java.lang.Double">
<column name="TaxMoney" precision="22" scale="3">
<comment>税额</comment>
</column>
</property>
<property generated="never" lazy="false" name="TaxLastMoney" type="java.lang.Double">
<column name="TaxLastMoney" precision="22" scale="3">
<comment>价税合计</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherField1" type="java.lang.String">
<column length="50" name="OtherField1">
<comment>自定义字段1-品名</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherField2" type="java.lang.String">
<column length="50" name="OtherField2">
<comment>自定义字段2-型号</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherField3" type="java.lang.String">
<column length="50" name="OtherField3">
<comment>自定义字段3-制造商</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherField4" type="java.lang.String">
<column length="50" name="OtherField4">
<comment>自定义字段4</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherField5" type="java.lang.String">
<column length="50" name="OtherField5">
<comment>自定义字段5</comment>
</column>
</property>
<property generated="never" lazy="false" name="MType" type="java.lang.String">
<column length="20" name="MType">
<comment>商品类型</comment>
</column>
</property>
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
<column length="200" name="Remark">
<comment>描述</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Functions" table="jsh_functions">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Number" type="java.lang.String">
<column length="50" name="Number">
<comment>编号</comment>
</column>
</property>
<property generated="never" lazy="false" name="Name" type="java.lang.String">
<column length="50" name="Name">
<comment>名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="PNumber" type="java.lang.String">
<column length="50" name="PNumber">
<comment>上级编号 </comment>
</column>
</property>
<property generated="never" lazy="false" name="URL" type="java.lang.String">
<column length="100" name="URL">
<comment>链接</comment>
</column>
</property>
<property generated="never" lazy="false" name="State" type="boolean">
<column length="1" name="State">
<comment>收缩 </comment>
</column>
</property>
<property generated="never" lazy="false" name="Sort" type="java.lang.String">
<column length="50" name="Sort">
<comment>排序</comment>
</column>
</property>
<property generated="never" lazy="false" name="Enabled" type="boolean">
<column length="1" name="Enabled">
<comment>启用</comment>
</column>
</property>
<property generated="never" lazy="false" name="Type" type="java.lang.String">
<column length="50" name="Type">
<comment>类型</comment>
</column>
</property>
<property generated="never" lazy="false" name="PushBtn" type="java.lang.String">
<column length="50" name="PushBtn">
<comment>功能按钮</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.InOutItem" table="jsh_inoutitem">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Name" type="java.lang.String">
<column length="50" name="Name">
<comment>名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="Type" type="java.lang.String">
<column length="20" name="Type">
<comment>类型</comment>
</column>
</property>
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
<column length="100" name="Remark">
<comment>备注</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Logdetails" table="jsh_log">
<id name="id" type="java.lang.Long">
<column name="id" />
<generator class="native" />
</id>
<many-to-one name="user" class="com.jsh.model.po.Basicuser" lazy="false">
<column name="userID" not-null="true" />
</many-to-one>
<property name="operation" type="java.lang.String">
<column name="operation" length="500">
<comment>操作模块名称</comment>
</column>
</property>
<property name="clientIp" type="java.lang.String">
<column name="clientIP" length="50">
<comment>客户端IP</comment>
</column>
</property>
<property name="createtime" type="java.sql.Timestamp">
<column name="createtime" length="19">
<comment>创建时间</comment>
</column>
</property>
<property name="status" type="java.lang.Short">
<column name="status">
<comment>操作状态 0==成功1==失败</comment>
</column>
</property>
<property name="contentdetails" type="java.lang.String">
<column name="contentdetails" length="1000">
<comment>操作详情</comment>
</column>
</property>
<property name="remark" type="java.lang.String">
<column name="remark" length="500">
<comment>备注信息</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,119 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Material" table="jsh_material">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<many-to-one name="materialCategory" class="com.jsh.model.po.MaterialCategory" lazy="false">
<column name="CategoryId" />
</many-to-one>
<property generated="never" lazy="false" name="Name" type="java.lang.String">
<column length="50" name="Name">
<comment>名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="Mfrs" type="java.lang.String">
<column length="50" name="Mfrs">
<comment>制造商</comment>
</column>
</property>
<property generated="never" lazy="false" name="Packing" type="java.lang.Double">
<column name="Packing" precision="22" scale="3">
<comment>包装KG/包)</comment>
</column>
</property>
<property generated="never" lazy="false" name="SafetyStock" type="java.lang.Double">
<column name="SafetyStock" precision="22" scale="3">
<comment>安全存量KG</comment>
</column>
</property>
<property generated="never" lazy="false" name="Model" type="java.lang.String">
<column length="50" name="Model">
<comment>型号</comment>
</column>
</property>
<property generated="never" lazy="false" name="Standard" type="java.lang.String">
<column length="50" name="Standard">
<comment>规格</comment>
</column>
</property>
<property generated="never" lazy="false" name="Color" type="java.lang.String">
<column length="50" name="Color">
<comment>颜色</comment>
</column>
</property>
<property generated="never" lazy="false" name="Unit" type="java.lang.String">
<column length="50" name="Unit">
<comment>单位-单个</comment>
</column>
</property>
<many-to-one name="UnitId" class="com.jsh.model.po.Unit" lazy="false">
<column name="UnitId">
<comment>多单位</comment>
</column>
</many-to-one>
<property generated="never" lazy="false" name="FirstOutUnit" type="java.lang.String">
<column length="50" name="FirstOutUnit">
<comment>首选出库单位</comment>
</column>
</property>
<property generated="never" lazy="false" name="FirstInUnit" type="java.lang.String">
<column length="50" name="FirstInUnit">
<comment>首选入库单位</comment>
</column>
</property>
<property generated="never" lazy="false" name="PriceStrategy" type="java.lang.String">
<column length="500" name="PriceStrategy">
<comment>价格策略</comment>
</column>
</property>
<property generated="never" lazy="false" name="RetailPrice" type="java.lang.Double">
<column name="RetailPrice" precision="22" scale="3">
<comment>零售价</comment>
</column>
</property>
<property generated="never" lazy="false" name="LowPrice" type="java.lang.Double">
<column name="LowPrice" precision="22" scale="3">
<comment>最低售价</comment>
</column>
</property>
<property generated="never" lazy="false" name="PresetPriceOne" type="java.lang.Double">
<column name="PresetPriceOne" precision="22" scale="3">
<comment>预设售价一</comment>
</column>
</property>
<property generated="never" lazy="false" name="PresetPriceTwo" type="java.lang.Double">
<column name="PresetPriceTwo" precision="22" scale="3">
<comment>预设售价二</comment>
</column>
</property>
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
<column length="100" name="Remark">
<comment>备注</comment>
</column>
</property>
<property generated="never" lazy="false" name="Enabled" type="boolean">
<column length="1" name="Enabled">
<comment>启用</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherField1" type="java.lang.String">
<column length="50" name="OtherField1">
<comment>自定义1</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherField2" type="java.lang.String">
<column length="50" name="OtherField2">
<comment>自定义2</comment>
</column>
</property>
<property generated="never" lazy="false" name="OtherField3" type="java.lang.String">
<column length="50" name="OtherField3">
<comment>自定义3</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.MaterialCategory" table="jsh_materialcategory">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Name" type="java.lang.String">
<column length="50" name="Name">
<comment>名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="CategoryLevel" type="java.lang.Short">
<column length="20" name="CategoryLevel">
<comment>等级</comment>
</column>
</property>
<many-to-one name="materialCategory" class="com.jsh.model.po.MaterialCategory" lazy="false">
<column name="ParentId" />
</many-to-one>
</class>
</hibernate-mapping>

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.MaterialProperty" table="jsh_materialproperty">
<id name="id" type="java.lang.Long">
<column name="id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="nativeName" type="java.lang.String">
<column length="50" name="nativeName">
<comment>原始名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="enabled" type="boolean">
<column length="1" name="enabled">
<comment>是否启用</comment>
</column>
</property>
<property generated="never" lazy="false" name="sort" type="java.lang.String">
<column length="10" name="sort">
<comment>排序</comment>
</column>
</property>
<property generated="never" lazy="false" name="anotherName" type="java.lang.String">
<column length="50" name="anotherName">
<comment>别名</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Person" table="jsh_person">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Type" type="java.lang.String">
<column length="20" name="Type">
<comment>类型</comment>
</column>
</property>
<property generated="never" lazy="false" name="Name" type="java.lang.String">
<column length="50" name="Name">
<comment>姓名</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Role" table="jsh_role">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Name" type="java.lang.String">
<column length="50" name="Name">
<comment>角色名称</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,111 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Supplier" table="jsh_supplier">
<id name="id" type="java.lang.Long">
<column name="id" />
<generator class="native"/>
</id>
<property name="supplier" type="java.lang.String">
<column name="supplier" not-null="true">
<comment>名称</comment>
</column>
</property>
<property name="type" type="java.lang.String">
<column name="type" length="20">
<comment>类型</comment>
</column>
</property>
<property name="contacts" type="java.lang.String">
<column name="contacts" length="100">
<comment>联系人</comment>
</column>
</property>
<property name="phonenum" type="java.lang.String">
<column name="phonenum" length="30">
<comment>电话</comment>
</column>
</property>
<property name="fax" type="java.lang.String">
<column name="fax" length="30">
<comment>传真</comment>
</column>
</property>
<property name="telephone" type="java.lang.String">
<column name="telephone" length="30">
<comment>手机</comment>
</column>
</property>
<property name="email" type="java.lang.String">
<column name="email" length="50">
<comment>电子邮箱</comment>
</column>
</property>
<property name="address" type="java.lang.String">
<column name="address" length="50">
<comment>地址</comment>
</column>
</property>
<property generated="never" lazy="false" name="AdvanceIn" type="java.lang.Double">
<column name="AdvanceIn" precision="22" scale="3">
<comment>预收款</comment>
</column>
</property>
<property generated="never" lazy="false" name="taxNum" type="java.lang.String">
<column name="taxNum " length="50">
<comment>纳税人识别号</comment>
</column>
</property>
<property generated="never" lazy="false" name="bankName" type="java.lang.String">
<column name="bankName " length="50">
<comment>开户行</comment>
</column>
</property>
<property generated="never" lazy="false" name="accountNumber" type="java.lang.String">
<column name="accountNumber" length="50">
<comment>账号</comment>
</column>
</property>
<property generated="never" lazy="false" name="taxRate" type="java.lang.Double">
<column name="taxRate" precision="22" scale="3">
<comment>税率</comment>
</column>
</property>
<property generated="never" lazy="false" name="BeginNeedGet" type="java.lang.Double">
<column name="BeginNeedGet" precision="22" scale="3">
<comment>期初应收</comment>
</column>
</property>
<property generated="never" lazy="false" name="BeginNeedPay" type="java.lang.Double">
<column name="BeginNeedPay" precision="22" scale="3">
<comment>期初应付</comment>
</column>
</property>
<property generated="never" lazy="false" name="AllNeedGet" type="java.lang.Double">
<column name="AllNeedGet" precision="22" scale="3">
<comment>累计应收</comment>
</column>
</property>
<property generated="never" lazy="false" name="AllNeedPay" type="java.lang.Double">
<column name="AllNeedPay" precision="22" scale="3">
<comment>累计应付</comment>
</column>
</property>
<property name="description" type="java.lang.String">
<column name="description" length="500">
<comment>备注</comment>
</column>
</property>
<property name="isystem" type="java.lang.Short">
<column name="isystem" not-null="true">
<comment>是否系统自带 0==系统 1==非系统</comment>
</column>
</property>
<property generated="never" lazy="false" name="enabled" type="boolean">
<column length="1" name="enabled">
<comment>启用</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.SystemConfig" table="jsh_systemconfig">
<id name="id" type="java.lang.Long">
<column name="id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="type" type="java.lang.String">
<column length="50" name="type">
<comment>类型</comment>
</column>
</property>
<property generated="never" lazy="false" name="name" type="java.lang.String">
<column length="100" name="name">
<comment>名称</comment>
</column>
</property>
<property generated="never" lazy="false" name="value" type="java.lang.String">
<column length="200" name="value">
<comment></comment>
</column>
</property>
<property generated="never" lazy="false" name="description" type="java.lang.String">
<column length="100" name="description">
<comment>描述</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.Unit" table="jsh_unit">
<id name="id" type="java.lang.Long">
<column name="id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="UName" type="java.lang.String">
<column length="50" name="UName">
<comment>单位名称</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.jsh.model.po.UserBusiness" table="jsh_userbusiness">
<id name="Id" type="java.lang.Long">
<column name="Id"/>
<generator class="native"/>
</id>
<property generated="never" lazy="false" name="Type" type="java.lang.String">
<column length="50" name="Type">
<comment>类别</comment>
</column>
</property>
<property generated="never" lazy="false" name="KeyId" type="java.lang.String">
<column length="50" name="KeyId">
<comment>主ID</comment>
</column>
</property>
<property generated="never" lazy="false" name="Value" type="java.lang.String">
<column length="10000" name="Value">
<comment></comment>
</column>
</property>
<property generated="never" lazy="false" name="BtnStr" type="java.lang.String">
<column length="2000" name="BtnStr">
<comment>按钮权限</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -1,49 +0,0 @@
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!--
<property name="hibernate.connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.connection.url">
jdbc:mysql:///myshop
</property>
<property name="hibernate.connection.username">root</property>
<property name="connection.password">root</property>
-->
<property name="hibernate.dialect">
org.hibernate.dialect.MySQL5Dialect
</property>
<property name="show_sql">true</property>
<!-- 一般重新建库用create(慎用)只更新字段用update -->
<property name="hbm2ddl.auto">update</property>
<!-- 对应的实体映射 -->
<mapping resource="hibernate/Supplier.hbm.xml" />
<mapping resource="hibernate/Logdetails.hbm.xml" />
<mapping resource="hibernate/Assetname.hbm.xml" />
<mapping resource="hibernate/Category.hbm.xml" />
<mapping resource="hibernate/Basicuser.hbm.xml" />
<mapping resource="hibernate/Asset.hbm.xml" />
<mapping resource="hibernate/Depot.hbm.xml" />
<mapping resource="hibernate/Unit.hbm.xml" />
<mapping resource="hibernate/App.hbm.xml" />
<mapping resource="hibernate/Role.hbm.xml" />
<mapping resource="hibernate/Functions.hbm.xml" />
<mapping resource="hibernate/UserBusiness.hbm.xml" />
<mapping resource="hibernate/Person.hbm.xml" />
<mapping resource="hibernate/MaterialCategory.hbm.xml" />
<mapping resource="hibernate/Material.hbm.xml" />
<mapping resource="hibernate/DepotHead.hbm.xml" />
<mapping resource="hibernate/DepotItem.hbm.xml" />
<mapping resource="hibernate/Account.hbm.xml" />
<mapping resource="hibernate/InOutItem.hbm.xml" />
<mapping resource="hibernate/AccountHead.hbm.xml" />
<mapping resource="hibernate/AccountItem.hbm.xml" />
<mapping resource="hibernate/SystemConfig.hbm.xml" />
<mapping resource="hibernate/MaterialProperty.hbm.xml" />
</session-factory>
</hibernate-configuration>

View File

@@ -1,7 +0,0 @@
language=Select Language
enus=American English
zhcn=Simplified Chinese
logintitle=Welcome to the BenaMaid System
username=username
password=password
login_submit=login

View File

@@ -1,7 +0,0 @@
language=\u9009\u62e9\u8bed\u8a00
enus=\u7f8e\u5f0f\u82f1\u8bed
zhcn=\u7b80\u4f53\u4e2d\u6587
logintitle=\u6b22\u8fce\u5149\u4e34BenaMaid\u7cfb\u7edf
username=\u7528\u6237\u540d
password=\u5bc6\u7801
login_submit=\u767b\u5f55

View File

@@ -1,67 +0,0 @@
# level : 是日志记录的优先级分为OFF、FATAL、ERROR、WARN、INFO、DEBUG、ALL或者您定义的级别。
#Log4j建议只使用四个级别优先级从高到低分别是ERROR、WARN、INFO、DEBUG。
#Log4jTest.java中的Logger logger = Logger.getLogger(this.getClass().getName());可能对应了log4j.rootLogger=DEBUG,CONSOLE,A1的配置
log4j.rootLogger=INFO,D,E,stdout
##########控制台输出##############
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%p]-[%C %M %L]:%m%n
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%p]-%m%n
#######配置hibernate日志输入目录,暂时没有使用到############
#log4j.logger.org.hibernate = OFF,hibernate
#log4j.logger.org.hibernate.tool.hbm2ddl=debug
#log4j.appender.hibernate = org.apache.log4j.RollingFileAppender
#log4j.appender.hibernate.file = ${webApp.log4j.path}/logs/jsh_hibernate.log
#log4j.appender.hibernate.layout = org.apache.log4j.PatternLayout
#log4j.appender.hibernate.layout.conversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [%p]-[%C %M %L]:%m%n
#log4j.appender.hibernate.layout.conversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [%p]-%m%n
#log4j.appender.hibernate.append = false
###输出到日志文件指定最低为INFO级别 ###
log4j.appender.D=org.apache.log4j.RollingFileAppender
log4j.appender.D.File=${webApp.log4j.path}/logs/jsh-info.log
log4j.appender.D.MaxFileSize=50MB
log4j.appender.D.MaxBackupIndex=10
##the lower level
log4j.appender.D.Threshold=INFO
log4j.appender.D.layout=org.apache.log4j.PatternLayout
#log4j.appender.D.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [%p]-[%C %M %L]:%m%n
log4j.appender.D.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [%p]-%m%n
###输出错误信息内容到指定文件ERROR级别###
log4j.appender.E= org.apache.log4j.RollingFileAppender
log4j.appender.E.File=${webApp.log4j.path}/logs/jsh-error.log
log4j.appender.E.MaxFileSize=50MB
log4j.appender.E.MaxBackupIndex=10
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
##log4j.appender.E.layout.ConversionPattern =%-d{yyyy-MM-dd HH\:mm\:ss} [%p]-[%C %M %L]\:%m%n
log4j.appender.E.layout.ConversionPattern =%-d{yyyy-MM-dd HH\:mm\:ss} [%p]-%m%n
# %n代表换行
# %d代表日期
# %c代表路径名Logger.getLogger("DAO")时为DAO:Logger.getLogger(this.getClass().getName())时为绝对类名)# %c{1}为类名如Log4jTest
# %l代表类路径及代码所在行数%L仅代表代码所在行数
# [%-5p]代表该日志对应的日志级别(%5p如DEBUG,ERROR中间的-起到在[]中左对齐的作用
# %m代表“类名:”Logger.getLogger("DAO")时为DAO:Logger.getLogger(this.getClass().getName())时为类名)及日志信息
#----------------------------------------------------------------------------------
#分别说明如下:
#1、使用Logger logger = Logger.getLogger("DAO")获得配置时属性文件中必须要有对应设置log4j.logger.DAO=DEBUG,A2
#2、%c为DAO
#3、%l为logger.debug("DAO: Debug info.");的类绝对路径以及代码所在行,
# log.DAOlogTest.doGet(DAOlogTest.java:23)
#4、%L为logger.debug("DAO: Debug info.");代码所在行 23
#5、%m为类名和日志信息 DAO: Debug info.
#1、使用Logger logger = Logger.getLogger(this.getClass().getName())获得配置时
#2、%c为log.Log4jTest %c{1}为Log4jTest
#3、%l为 log.Log4jTest.doGet(Log4jTest.java:23)
#4、%L同上
#5、%m为 Debug info.
#X号: X信息输出时左对齐
#%p: 日志信息级别
#%d{}: 日志信息产生时间
#%c: 日志信息所在地(类名)
#%m: 产生的日志具体信息
#%n: 输出日志信息换行

View File

@@ -0,0 +1,351 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountHeadMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="OrganId" jdbcType="BIGINT" property="organid" />
<result column="HandsPersonId" jdbcType="BIGINT" property="handspersonid" />
<result column="ChangeAmount" jdbcType="DOUBLE" property="changeamount" />
<result column="TotalPrice" jdbcType="DOUBLE" property="totalprice" />
<result column="AccountId" jdbcType="BIGINT" property="accountid" />
<result column="BillNo" jdbcType="VARCHAR" property="billno" />
<result column="BillTime" jdbcType="TIMESTAMP" property="billtime" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, OrganId, HandsPersonId, ChangeAmount, TotalPrice, AccountId, BillNo, BillTime,
Remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_accounthead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_accounthead
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_accounthead
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_accounthead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accounthead (Id, Type, OrganId,
HandsPersonId, ChangeAmount, TotalPrice,
AccountId, BillNo, BillTime,
Remark)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organid,jdbcType=BIGINT},
#{handspersonid,jdbcType=BIGINT}, #{changeamount,jdbcType=DOUBLE}, #{totalprice,jdbcType=DOUBLE},
#{accountid,jdbcType=BIGINT}, #{billno,jdbcType=VARCHAR}, #{billtime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accounthead
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="organid != null">
OrganId,
</if>
<if test="handspersonid != null">
HandsPersonId,
</if>
<if test="changeamount != null">
ChangeAmount,
</if>
<if test="totalprice != null">
TotalPrice,
</if>
<if test="accountid != null">
AccountId,
</if>
<if test="billno != null">
BillNo,
</if>
<if test="billtime != null">
BillTime,
</if>
<if test="remark != null">
Remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="organid != null">
#{organid,jdbcType=BIGINT},
</if>
<if test="handspersonid != null">
#{handspersonid,jdbcType=BIGINT},
</if>
<if test="changeamount != null">
#{changeamount,jdbcType=DOUBLE},
</if>
<if test="totalprice != null">
#{totalprice,jdbcType=DOUBLE},
</if>
<if test="accountid != null">
#{accountid,jdbcType=BIGINT},
</if>
<if test="billno != null">
#{billno,jdbcType=VARCHAR},
</if>
<if test="billtime != null">
#{billtime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_accounthead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accounthead
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.organid != null">
OrganId = #{record.organid,jdbcType=BIGINT},
</if>
<if test="record.handspersonid != null">
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
</if>
<if test="record.changeamount != null">
ChangeAmount = #{record.changeamount,jdbcType=DOUBLE},
</if>
<if test="record.totalprice != null">
TotalPrice = #{record.totalprice,jdbcType=DOUBLE},
</if>
<if test="record.accountid != null">
AccountId = #{record.accountid,jdbcType=BIGINT},
</if>
<if test="record.billno != null">
BillNo = #{record.billno,jdbcType=VARCHAR},
</if>
<if test="record.billtime != null">
BillTime = #{record.billtime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accounthead
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
OrganId = #{record.organid,jdbcType=BIGINT},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=DOUBLE},
TotalPrice = #{record.totalprice,jdbcType=DOUBLE},
AccountId = #{record.accountid,jdbcType=BIGINT},
BillNo = #{record.billno,jdbcType=VARCHAR},
BillTime = #{record.billtime,jdbcType=TIMESTAMP},
Remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accounthead
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="organid != null">
OrganId = #{organid,jdbcType=BIGINT},
</if>
<if test="handspersonid != null">
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
</if>
<if test="changeamount != null">
ChangeAmount = #{changeamount,jdbcType=DOUBLE},
</if>
<if test="totalprice != null">
TotalPrice = #{totalprice,jdbcType=DOUBLE},
</if>
<if test="accountid != null">
AccountId = #{accountid,jdbcType=BIGINT},
</if>
<if test="billno != null">
BillNo = #{billno,jdbcType=VARCHAR},
</if>
<if test="billtime != null">
BillTime = #{billtime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accounthead
set Type = #{type,jdbcType=VARCHAR},
OrganId = #{organid,jdbcType=BIGINT},
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=DOUBLE},
TotalPrice = #{totalprice,jdbcType=DOUBLE},
AccountId = #{accountid,jdbcType=BIGINT},
BillNo = #{billno,jdbcType=VARCHAR},
BillTime = #{billtime,jdbcType=TIMESTAMP},
Remark = #{remark,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,76 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountHeadMapper">
<resultMap extends="BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.AccountHeadVo4ListEx">
<result column="OrganName" jdbcType="VARCHAR" property="organname" />
<result column="HandsPersonName" jdbcType="VARCHAR" property="handspersonname" />
<result column="AccountName" jdbcType="VARCHAR" property="accountname" />
</resultMap>
<select id="selectByConditionAccountHead" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="ResultMapEx">
select ah.*, s.supplier OrganName, p.Name HandsPersonName, a.Name AccountName
from jsh_accounthead ah
left join jsh_supplier s on ah.OrganId=s.id
left join jsh_person p on ah.HandsPersonId=p.id
left join jsh_account a on ah.AccountId=a.id
where 1=1
<if test="billNo != null">
and ah.BillNo like '%${billNo}%'
</if>
<if test="type != null">
and ah.Type='${type}'
</if>
<if test="beginTime != null">
and ah.BillTime gt;= '%${beginTime}%'
</if>
<if test="endTime != null">
and ah.BillTime lt;= '%${endTime}%'
</if>
order by ah.Id desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByAccountHead" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_accounthead
WHERE 1=1
<if test="billNo != null">
and BillNo like '%${billNo}%'
</if>
<if test="type != null">
and Type='${type}'
</if>
<if test="beginTime != null">
and BillTime gt;= '%${beginTime}%'
</if>
<if test="endTime != null">
and BillTime lt;= '%${endTime}%'
</if>
</select>
<select id="getMaxId" resultType="java.lang.Long">
select max(Id) as Id from jsh_accounthead
</select>
<select id="findAllMoney" resultType="java.lang.Double">
select sum(${modeName}) as allMoney from jsh_accounthead where Type='${type}'
and OrganId =${supplierId} and BillTime &lt;='${endTime}'
</select>
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="ResultMapEx">
select ah.*, s.supplier OrganName, p.Name HandsPersonName, a.Name AccountName
from jsh_accounthead ah
left join jsh_supplier s on ah.OrganId=s.id
left join jsh_person p on ah.HandsPersonId=p.id
left join jsh_account a on ah.AccountId=a.id
where 1=1
<if test="billNo != null">
and ah.BillNo = '${billNo}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,288 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="HeaderId" jdbcType="BIGINT" property="headerid" />
<result column="AccountId" jdbcType="BIGINT" property="accountid" />
<result column="InOutItemId" jdbcType="BIGINT" property="inoutitemid" />
<result column="EachAmount" jdbcType="DOUBLE" property="eachamount" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, HeaderId, AccountId, InOutItemId, EachAmount, Remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_accountitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_accountitem
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_accountitem
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_accountitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accountitem (Id, HeaderId, AccountId,
InOutItemId, EachAmount, Remark
)
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{inoutitemid,jdbcType=BIGINT}, #{eachamount,jdbcType=DOUBLE}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accountitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="headerid != null">
HeaderId,
</if>
<if test="accountid != null">
AccountId,
</if>
<if test="inoutitemid != null">
InOutItemId,
</if>
<if test="eachamount != null">
EachAmount,
</if>
<if test="remark != null">
Remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="headerid != null">
#{headerid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
#{accountid,jdbcType=BIGINT},
</if>
<if test="inoutitemid != null">
#{inoutitemid,jdbcType=BIGINT},
</if>
<if test="eachamount != null">
#{eachamount,jdbcType=DOUBLE},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_accountitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.headerid != null">
HeaderId = #{record.headerid,jdbcType=BIGINT},
</if>
<if test="record.accountid != null">
AccountId = #{record.accountid,jdbcType=BIGINT},
</if>
<if test="record.inoutitemid != null">
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT},
</if>
<if test="record.eachamount != null">
EachAmount = #{record.eachamount,jdbcType=DOUBLE},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
set Id = #{record.id,jdbcType=BIGINT},
HeaderId = #{record.headerid,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT},
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT},
EachAmount = #{record.eachamount,jdbcType=DOUBLE},
Remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
<set>
<if test="headerid != null">
HeaderId = #{headerid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
AccountId = #{accountid,jdbcType=BIGINT},
</if>
<if test="inoutitemid != null">
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
</if>
<if test="eachamount != null">
EachAmount = #{eachamount,jdbcType=DOUBLE},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
set HeaderId = #{headerid,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT},
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
EachAmount = #{eachamount,jdbcType=DOUBLE},
Remark = #{remark,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,50 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountItemMapper">
<resultMap extends="BaseResultMap" id="ResultWithInfoExMap" type="com.jsh.erp.datasource.vo.AccountItemVo4List">
<result column="AccountName" jdbcType="VARCHAR" property="accountName" />
<result column="InOutItemName" jdbcType="VARCHAR" property="inOutItemName" />
</resultMap>
<select id="selectByConditionAccountItem" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="BaseResultMap">
select *
FROM jsh_accountitem
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByAccountItem" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_accountitem
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="ResultWithInfoExMap">
select ai.*,a.Name AccountName,ioi.Name InOutItemName
from jsh_accountitem ai left join jsh_account a on ai.AccountId=a.id
left join jsh_inoutitem ioi on ai.InOutItemId = ioi.id
where ai.HeaderId = ${headerId}
order by ai.id asc
</select>
</mapper>

View File

@@ -0,0 +1,303 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="SerialNo" jdbcType="VARCHAR" property="serialno" />
<result column="InitialAmount" jdbcType="DOUBLE" property="initialamount" />
<result column="CurrentAmount" jdbcType="DOUBLE" property="currentamount" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="IsDefault" jdbcType="BIT" property="isdefault" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, SerialNo, InitialAmount, CurrentAmount, Remark, IsDefault
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_account
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_account
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_account (Id, Name, SerialNo,
InitialAmount, CurrentAmount, Remark,
IsDefault)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{serialno,jdbcType=VARCHAR},
#{initialamount,jdbcType=DOUBLE}, #{currentamount,jdbcType=DOUBLE}, #{remark,jdbcType=VARCHAR},
#{isdefault,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="serialno != null">
SerialNo,
</if>
<if test="initialamount != null">
InitialAmount,
</if>
<if test="currentamount != null">
CurrentAmount,
</if>
<if test="remark != null">
Remark,
</if>
<if test="isdefault != null">
IsDefault,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="serialno != null">
#{serialno,jdbcType=VARCHAR},
</if>
<if test="initialamount != null">
#{initialamount,jdbcType=DOUBLE},
</if>
<if test="currentamount != null">
#{currentamount,jdbcType=DOUBLE},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isdefault != null">
#{isdefault,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.serialno != null">
SerialNo = #{record.serialno,jdbcType=VARCHAR},
</if>
<if test="record.initialamount != null">
InitialAmount = #{record.initialamount,jdbcType=DOUBLE},
</if>
<if test="record.currentamount != null">
CurrentAmount = #{record.currentamount,jdbcType=DOUBLE},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.isdefault != null">
IsDefault = #{record.isdefault,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
SerialNo = #{record.serialno,jdbcType=VARCHAR},
InitialAmount = #{record.initialamount,jdbcType=DOUBLE},
CurrentAmount = #{record.currentamount,jdbcType=DOUBLE},
Remark = #{record.remark,jdbcType=VARCHAR},
IsDefault = #{record.isdefault,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="serialno != null">
SerialNo = #{serialno,jdbcType=VARCHAR},
</if>
<if test="initialamount != null">
InitialAmount = #{initialamount,jdbcType=DOUBLE},
</if>
<if test="currentamount != null">
CurrentAmount = #{currentamount,jdbcType=DOUBLE},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isdefault != null">
IsDefault = #{isdefault,jdbcType=BIT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
set Name = #{name,jdbcType=VARCHAR},
SerialNo = #{serialno,jdbcType=VARCHAR},
InitialAmount = #{initialamount,jdbcType=DOUBLE},
CurrentAmount = #{currentamount,jdbcType=DOUBLE},
Remark = #{remark,jdbcType=VARCHAR},
IsDefault = #{isdefault,jdbcType=BIT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,172 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountMapper">
<resultMap extends="BaseResultMap" id="ResultListMap" type="com.jsh.erp.datasource.vo.AccountVo4List">
<result column="thismonthamount" jdbcType="VARCHAR" property="thismonthamount" />
</resultMap>
<resultMap id="ResultInOutList" type="com.jsh.erp.datasource.vo.AccountVo4InOutList">
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="newType" jdbcType="VARCHAR" property="type" />
<result column="supplier" jdbcType="VARCHAR" property="supplierName" />
<result column="ChangeAmount" jdbcType="DOUBLE" property="changeAmount" />
<result column="oTime" jdbcType="VARCHAR" property="operTime" />
<result column="AList" jdbcType="VARCHAR" property="aList" />
<result column="AMList" jdbcType="VARCHAR" property="amList" />
</resultMap>
<select id="selectByConditionAccount" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="ResultListMap">
select *
FROM jsh_account
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="serialNo != null">
and SerialNo like '%${serialNo}%'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByAccount" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_account
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="serialNo != null">
and SerialNo like '%${serialNo}%'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
<select id="findAccountInOutList" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="ResultInOutList">
<!--主表出入库涉及的账户 -->
select dh.Number,concat(dh.SubType,dh.Type) as newType,s.supplier,dh.ChangeAmount,date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id
where 1=1
<if test="accountId != null">
and dh.AccountId=${accountId}
</if>
<!--主表收入和支出涉及的账户 -->
UNION ALL
select ah.BillNo,ah.Type as newType,s.supplier,ah.ChangeAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id
where 1=1
<if test="accountId != null">
and ah.AccountId=${accountId}
</if>
<!--明细中涉及的账户(收款,付款,收预付款) -->
UNION ALL
select ah.BillNo,ah.Type as newType,s.supplier,ai.EachAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id
inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type in ('收款','付款','收预付款')
<if test="accountId != null">
and ai.AccountId=${accountId}
</if>
<!--主表中转出的账户 -->
UNION ALL
select ah.BillNo,ah.Type as newType, '' as sName,ah.ChangeAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type='转账'
<if test="accountId != null">
and ah.AccountId=${accountId}
</if>
<!--明细中被转入的账户 -->
UNION ALL
select ah.BillNo,ah.Type as newType, '' as sName,ai.EachAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type='转账'
<if test="accountId != null">
and ai.AccountId=${accountId}
</if>
<!--多账户的情况 -->
UNION ALL
select dh.Number,concat(dh.SubType,dh.Type) as newType,s.supplier,dh.ChangeAmount,date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime,
dh.AccountIdList as AList,dh.AccountMoneyList as AMList
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id
where 1=1
<if test="accountId != null">
and dh.AccountIdList like '%${accountId}%'
</if>
ORDER BY oTime desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findAccountInOutListCount" resultType="java.lang.Integer">
select sum(a) from
(
<!--主表出入库涉及的账户 -->
select count(1) a
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id
where 1=1
<if test="accountId != null">
and dh.AccountId=${accountId}
</if>
<!--主表收入和支出涉及的账户 -->
UNION ALL
select count(1) a
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id
where 1=1
<if test="accountId != null">
and ah.AccountId=${accountId}
</if>
<!--明细中涉及的账户(收款,付款,收预付款) -->
UNION ALL
select count(1) a
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id
inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type in ('收款','付款','收预付款')
<if test="accountId != null">
and ai.AccountId=${accountId}
</if>
<!--主表中转出的账户 -->
UNION ALL
select count(1) a
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type='转账'
<if test="accountId != null">
and ah.AccountId=${accountId}
</if>
<!--明细中被转入的账户 -->
UNION ALL
select count(1) a
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type='转账'
<if test="accountId != null">
and ai.AccountId=${accountId}
</if>
<!--多账户的情况 -->
UNION ALL
select count(1) a
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id
where 1=1
<if test="accountId != null">
and dh.AccountIdList like '%${accountId}%'
</if>
) cc
</select>
</mapper>

View File

@@ -0,0 +1,428 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AppMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="Icon" jdbcType="VARCHAR" property="icon" />
<result column="URL" jdbcType="VARCHAR" property="url" />
<result column="Width" jdbcType="VARCHAR" property="width" />
<result column="Height" jdbcType="VARCHAR" property="height" />
<result column="ReSize" jdbcType="BIT" property="resize" />
<result column="OpenMax" jdbcType="BIT" property="openmax" />
<result column="Flash" jdbcType="BIT" property="flash" />
<result column="ZL" jdbcType="VARCHAR" property="zl" />
<result column="Sort" jdbcType="VARCHAR" property="sort" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="Enabled" jdbcType="BIT" property="enabled" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Number, Name, Type, Icon, URL, Width, Height, ReSize, OpenMax, Flash, ZL, Sort,
Remark, Enabled
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AppExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_app
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_app
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_app
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AppExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_app
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_app (Id, Number, Name,
Type, Icon, URL, Width,
Height, ReSize, OpenMax, Flash,
ZL, Sort, Remark, Enabled
)
values (#{id,jdbcType=BIGINT}, #{number,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{width,jdbcType=VARCHAR},
#{height,jdbcType=VARCHAR}, #{resize,jdbcType=BIT}, #{openmax,jdbcType=BIT}, #{flash,jdbcType=BIT},
#{zl,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_app
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="number != null">
Number,
</if>
<if test="name != null">
Name,
</if>
<if test="type != null">
Type,
</if>
<if test="icon != null">
Icon,
</if>
<if test="url != null">
URL,
</if>
<if test="width != null">
Width,
</if>
<if test="height != null">
Height,
</if>
<if test="resize != null">
ReSize,
</if>
<if test="openmax != null">
OpenMax,
</if>
<if test="flash != null">
Flash,
</if>
<if test="zl != null">
ZL,
</if>
<if test="sort != null">
Sort,
</if>
<if test="remark != null">
Remark,
</if>
<if test="enabled != null">
Enabled,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="number != null">
#{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="width != null">
#{width,jdbcType=VARCHAR},
</if>
<if test="height != null">
#{height,jdbcType=VARCHAR},
</if>
<if test="resize != null">
#{resize,jdbcType=BIT},
</if>
<if test="openmax != null">
#{openmax,jdbcType=BIT},
</if>
<if test="flash != null">
#{flash,jdbcType=BIT},
</if>
<if test="zl != null">
#{zl,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AppExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_app
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_app
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.icon != null">
Icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if test="record.url != null">
URL = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.width != null">
Width = #{record.width,jdbcType=VARCHAR},
</if>
<if test="record.height != null">
Height = #{record.height,jdbcType=VARCHAR},
</if>
<if test="record.resize != null">
ReSize = #{record.resize,jdbcType=BIT},
</if>
<if test="record.openmax != null">
OpenMax = #{record.openmax,jdbcType=BIT},
</if>
<if test="record.flash != null">
Flash = #{record.flash,jdbcType=BIT},
</if>
<if test="record.zl != null">
ZL = #{record.zl,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
Sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_app
set Id = #{record.id,jdbcType=BIGINT},
Number = #{record.number,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR},
Type = #{record.type,jdbcType=VARCHAR},
Icon = #{record.icon,jdbcType=VARCHAR},
URL = #{record.url,jdbcType=VARCHAR},
Width = #{record.width,jdbcType=VARCHAR},
Height = #{record.height,jdbcType=VARCHAR},
ReSize = #{record.resize,jdbcType=BIT},
OpenMax = #{record.openmax,jdbcType=BIT},
Flash = #{record.flash,jdbcType=BIT},
ZL = #{record.zl,jdbcType=VARCHAR},
Sort = #{record.sort,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
Enabled = #{record.enabled,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_app
<set>
<if test="number != null">
Number = #{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="icon != null">
Icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="url != null">
URL = #{url,jdbcType=VARCHAR},
</if>
<if test="width != null">
Width = #{width,jdbcType=VARCHAR},
</if>
<if test="height != null">
Height = #{height,jdbcType=VARCHAR},
</if>
<if test="resize != null">
ReSize = #{resize,jdbcType=BIT},
</if>
<if test="openmax != null">
OpenMax = #{openmax,jdbcType=BIT},
</if>
<if test="flash != null">
Flash = #{flash,jdbcType=BIT},
</if>
<if test="zl != null">
ZL = #{zl,jdbcType=VARCHAR},
</if>
<if test="sort != null">
Sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_app
set Number = #{number,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR},
Type = #{type,jdbcType=VARCHAR},
Icon = #{icon,jdbcType=VARCHAR},
URL = #{url,jdbcType=VARCHAR},
Width = #{width,jdbcType=VARCHAR},
Height = #{height,jdbcType=VARCHAR},
ReSize = #{resize,jdbcType=BIT},
OpenMax = #{openmax,jdbcType=BIT},
Flash = #{flash,jdbcType=BIT},
ZL = #{zl,jdbcType=VARCHAR},
Sort = #{sort,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
Enabled = #{enabled,jdbcType=BIT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AppMapper">
<select id="selectByConditionApp" parameterType="com.jsh.erp.datasource.entities.AppExample" resultMap="BaseResultMap">
select *
FROM jsh_app
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByApp" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_app
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,256 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AssetCategoryMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetname" jdbcType="VARCHAR" property="assetname" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, isystem, description
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_assetcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_assetcategory
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetcategory
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory (id, assetname, isystem,
description)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{isystem,jdbcType=TINYINT},
#{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetname != null">
assetname,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetname != null">
#{assetname,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
#{isystem,jdbcType=TINYINT},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_assetcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetname != null">
assetname = #{record.assetname,jdbcType=VARCHAR},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
isystem = #{record.isystem,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
<set>
<if test="assetname != null">
assetname = #{assetname,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
set assetname = #{assetname,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,578 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AssetMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetnameID" jdbcType="BIGINT" property="assetnameid" />
<result column="location" jdbcType="VARCHAR" property="location" />
<result column="labels" jdbcType="VARCHAR" property="labels" />
<result column="status" jdbcType="SMALLINT" property="status" />
<result column="userID" jdbcType="BIGINT" property="userid" />
<result column="price" jdbcType="DOUBLE" property="price" />
<result column="purchasedate" jdbcType="TIMESTAMP" property="purchasedate" />
<result column="periodofvalidity" jdbcType="TIMESTAMP" property="periodofvalidity" />
<result column="warrantydate" jdbcType="TIMESTAMP" property="warrantydate" />
<result column="assetnum" jdbcType="VARCHAR" property="assetnum" />
<result column="serialnum" jdbcType="VARCHAR" property="serialnum" />
<result column="supplier" jdbcType="BIGINT" property="supplier" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="updator" jdbcType="BIGINT" property="updator" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
<result column="addMonth" jdbcType="LONGVARCHAR" property="addmonth" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetnameID, location, labels, status, userID, price, purchasedate, periodofvalidity,
warrantydate, assetnum, serialnum, supplier, createtime, creator, updatetime, updator
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description, addMonth
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_asset
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_asset
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_asset (id, assetnameID, location,
labels, status, userID,
price, purchasedate, periodofvalidity,
warrantydate, assetnum, serialnum,
supplier, createtime, creator,
updatetime, updator, description,
addMonth)
values (#{id,jdbcType=BIGINT}, #{assetnameid,jdbcType=BIGINT}, #{location,jdbcType=VARCHAR},
#{labels,jdbcType=VARCHAR}, #{status,jdbcType=SMALLINT}, #{userid,jdbcType=BIGINT},
#{price,jdbcType=DOUBLE}, #{purchasedate,jdbcType=TIMESTAMP}, #{periodofvalidity,jdbcType=TIMESTAMP},
#{warrantydate,jdbcType=TIMESTAMP}, #{assetnum,jdbcType=VARCHAR}, #{serialnum,jdbcType=VARCHAR},
#{supplier,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT},
#{updatetime,jdbcType=TIMESTAMP}, #{updator,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR},
#{addmonth,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_asset
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetnameid != null">
assetnameID,
</if>
<if test="location != null">
location,
</if>
<if test="labels != null">
labels,
</if>
<if test="status != null">
status,
</if>
<if test="userid != null">
userID,
</if>
<if test="price != null">
price,
</if>
<if test="purchasedate != null">
purchasedate,
</if>
<if test="periodofvalidity != null">
periodofvalidity,
</if>
<if test="warrantydate != null">
warrantydate,
</if>
<if test="assetnum != null">
assetnum,
</if>
<if test="serialnum != null">
serialnum,
</if>
<if test="supplier != null">
supplier,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="creator != null">
creator,
</if>
<if test="updatetime != null">
updatetime,
</if>
<if test="updator != null">
updator,
</if>
<if test="description != null">
description,
</if>
<if test="addmonth != null">
addMonth,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetnameid != null">
#{assetnameid,jdbcType=BIGINT},
</if>
<if test="location != null">
#{location,jdbcType=VARCHAR},
</if>
<if test="labels != null">
#{labels,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=SMALLINT},
</if>
<if test="userid != null">
#{userid,jdbcType=BIGINT},
</if>
<if test="price != null">
#{price,jdbcType=DOUBLE},
</if>
<if test="purchasedate != null">
#{purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="periodofvalidity != null">
#{periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="warrantydate != null">
#{warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="assetnum != null">
#{assetnum,jdbcType=VARCHAR},
</if>
<if test="serialnum != null">
#{serialnum,jdbcType=VARCHAR},
</if>
<if test="supplier != null">
#{supplier,jdbcType=BIGINT},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="updator != null">
#{updator,jdbcType=BIGINT},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
<if test="addmonth != null">
#{addmonth,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetnameid != null">
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
</if>
<if test="record.location != null">
location = #{record.location,jdbcType=VARCHAR},
</if>
<if test="record.labels != null">
labels = #{record.labels,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=SMALLINT},
</if>
<if test="record.userid != null">
userID = #{record.userid,jdbcType=BIGINT},
</if>
<if test="record.price != null">
price = #{record.price,jdbcType=DOUBLE},
</if>
<if test="record.purchasedate != null">
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="record.periodofvalidity != null">
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="record.warrantydate != null">
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="record.assetnum != null">
assetnum = #{record.assetnum,jdbcType=VARCHAR},
</if>
<if test="record.serialnum != null">
serialnum = #{record.serialnum,jdbcType=VARCHAR},
</if>
<if test="record.supplier != null">
supplier = #{record.supplier,jdbcType=BIGINT},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.updatetime != null">
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
<if test="record.updator != null">
updator = #{record.updator,jdbcType=BIGINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
<if test="record.addmonth != null">
addMonth = #{record.addmonth,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set id = #{record.id,jdbcType=BIGINT},
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=DOUBLE},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
assetnum = #{record.assetnum,jdbcType=VARCHAR},
serialnum = #{record.serialnum,jdbcType=VARCHAR},
supplier = #{record.supplier,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
updator = #{record.updator,jdbcType=BIGINT},
description = #{record.description,jdbcType=LONGVARCHAR},
addMonth = #{record.addmonth,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set id = #{record.id,jdbcType=BIGINT},
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=DOUBLE},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
assetnum = #{record.assetnum,jdbcType=VARCHAR},
serialnum = #{record.serialnum,jdbcType=VARCHAR},
supplier = #{record.supplier,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
updator = #{record.updator,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
<set>
<if test="assetnameid != null">
assetnameID = #{assetnameid,jdbcType=BIGINT},
</if>
<if test="location != null">
location = #{location,jdbcType=VARCHAR},
</if>
<if test="labels != null">
labels = #{labels,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=SMALLINT},
</if>
<if test="userid != null">
userID = #{userid,jdbcType=BIGINT},
</if>
<if test="price != null">
price = #{price,jdbcType=DOUBLE},
</if>
<if test="purchasedate != null">
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="periodofvalidity != null">
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="warrantydate != null">
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="assetnum != null">
assetnum = #{assetnum,jdbcType=VARCHAR},
</if>
<if test="serialnum != null">
serialnum = #{serialnum,jdbcType=VARCHAR},
</if>
<if test="supplier != null">
supplier = #{supplier,jdbcType=BIGINT},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="updator != null">
updator = #{updator,jdbcType=BIGINT},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
<if test="addmonth != null">
addMonth = #{addmonth,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set assetnameID = #{assetnameid,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=DOUBLE},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
assetnum = #{assetnum,jdbcType=VARCHAR},
serialnum = #{serialnum,jdbcType=VARCHAR},
supplier = #{supplier,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
updator = #{updator,jdbcType=BIGINT},
description = #{description,jdbcType=LONGVARCHAR},
addMonth = #{addmonth,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set assetnameID = #{assetnameid,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=DOUBLE},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
assetnum = #{assetnum,jdbcType=VARCHAR},
serialnum = #{serialnum,jdbcType=VARCHAR},
supplier = #{supplier,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
updator = #{updator,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,350 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.AssetNameMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetname" jdbcType="VARCHAR" property="assetname" />
<result column="assetcategoryID" jdbcType="BIGINT" property="assetcategoryid" />
<result column="isystem" jdbcType="SMALLINT" property="isystem" />
<result column="isconsumables" jdbcType="SMALLINT" property="isconsumables" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, assetcategoryID, isystem, isconsumables
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_assetname
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetname
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetname (id, assetname, assetcategoryID,
isystem, isconsumables, description
)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{assetcategoryid,jdbcType=BIGINT},
#{isystem,jdbcType=SMALLINT}, #{isconsumables,jdbcType=SMALLINT}, #{description,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetname
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetname != null">
assetname,
</if>
<if test="assetcategoryid != null">
assetcategoryID,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="isconsumables != null">
isconsumables,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetname != null">
#{assetname,jdbcType=VARCHAR},
</if>
<if test="assetcategoryid != null">
#{assetcategoryid,jdbcType=BIGINT},
</if>
<if test="isystem != null">
#{isystem,jdbcType=SMALLINT},
</if>
<if test="isconsumables != null">
#{isconsumables,jdbcType=SMALLINT},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetname != null">
assetname = #{record.assetname,jdbcType=VARCHAR},
</if>
<if test="record.assetcategoryid != null">
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=SMALLINT},
</if>
<if test="record.isconsumables != null">
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
isystem = #{record.isystem,jdbcType=SMALLINT},
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
description = #{record.description,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
isystem = #{record.isystem,jdbcType=SMALLINT},
isconsumables = #{record.isconsumables,jdbcType=SMALLINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
<set>
<if test="assetname != null">
assetname = #{assetname,jdbcType=VARCHAR},
</if>
<if test="assetcategoryid != null">
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=SMALLINT},
</if>
<if test="isconsumables != null">
isconsumables = #{isconsumables,jdbcType=SMALLINT},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set assetname = #{assetname,jdbcType=VARCHAR},
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
isystem = #{isystem,jdbcType=SMALLINT},
isconsumables = #{isconsumables,jdbcType=SMALLINT},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set assetname = #{assetname,jdbcType=VARCHAR},
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
isystem = #{isystem,jdbcType=SMALLINT},
isconsumables = #{isconsumables,jdbcType=SMALLINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,635 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.DepotHeadMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="SubType" jdbcType="VARCHAR" property="subtype" />
<result column="ProjectId" jdbcType="BIGINT" property="projectid" />
<result column="DefaultNumber" jdbcType="VARCHAR" property="defaultnumber" />
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="OperPersonName" jdbcType="VARCHAR" property="operpersonname" />
<result column="CreateTime" jdbcType="TIMESTAMP" property="createtime" />
<result column="OperTime" jdbcType="TIMESTAMP" property="opertime" />
<result column="OrganId" jdbcType="BIGINT" property="organid" />
<result column="HandsPersonId" jdbcType="BIGINT" property="handspersonid" />
<result column="AccountId" jdbcType="BIGINT" property="accountid" />
<result column="ChangeAmount" jdbcType="DOUBLE" property="changeamount" />
<result column="AllocationProjectId" jdbcType="BIGINT" property="allocationprojectid" />
<result column="TotalPrice" jdbcType="DOUBLE" property="totalprice" />
<result column="PayType" jdbcType="VARCHAR" property="paytype" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="Salesman" jdbcType="VARCHAR" property="salesman" />
<result column="AccountIdList" jdbcType="VARCHAR" property="accountidlist" />
<result column="AccountMoneyList" jdbcType="VARCHAR" property="accountmoneylist" />
<result column="Discount" jdbcType="DOUBLE" property="discount" />
<result column="DiscountMoney" jdbcType="DOUBLE" property="discountmoney" />
<result column="DiscountLastMoney" jdbcType="DOUBLE" property="discountlastmoney" />
<result column="OtherMoney" jdbcType="DOUBLE" property="othermoney" />
<result column="OtherMoneyList" jdbcType="VARCHAR" property="othermoneylist" />
<result column="OtherMoneyItem" jdbcType="VARCHAR" property="othermoneyitem" />
<result column="AccountDay" jdbcType="INTEGER" property="accountday" />
<result column="Status" jdbcType="BIT" property="status" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, SubType, ProjectId, DefaultNumber, Number, OperPersonName, CreateTime,
OperTime, OrganId, HandsPersonId, AccountId, ChangeAmount, AllocationProjectId, TotalPrice,
PayType, Remark, Salesman, AccountIdList, AccountMoneyList, Discount, DiscountMoney,
DiscountLastMoney, OtherMoney, OtherMoneyList, OtherMoneyItem, AccountDay, Status
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_depothead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_depothead
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depothead
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depothead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depothead (Id, Type, SubType,
ProjectId, DefaultNumber, Number,
OperPersonName, CreateTime, OperTime,
OrganId, HandsPersonId, AccountId,
ChangeAmount, AllocationProjectId, TotalPrice,
PayType, Remark, Salesman,
AccountIdList, AccountMoneyList, Discount,
DiscountMoney, DiscountLastMoney, OtherMoney,
OtherMoneyList, OtherMoneyItem, AccountDay,
Status)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR},
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
#{organid,jdbcType=BIGINT}, #{handspersonid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{changeamount,jdbcType=DOUBLE}, #{allocationprojectid,jdbcType=BIGINT}, #{totalprice,jdbcType=DOUBLE},
#{paytype,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{salesman,jdbcType=VARCHAR},
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DOUBLE},
#{discountmoney,jdbcType=DOUBLE}, #{discountlastmoney,jdbcType=DOUBLE}, #{othermoney,jdbcType=DOUBLE},
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
#{status,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depothead
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="subtype != null">
SubType,
</if>
<if test="projectid != null">
ProjectId,
</if>
<if test="defaultnumber != null">
DefaultNumber,
</if>
<if test="number != null">
Number,
</if>
<if test="operpersonname != null">
OperPersonName,
</if>
<if test="createtime != null">
CreateTime,
</if>
<if test="opertime != null">
OperTime,
</if>
<if test="organid != null">
OrganId,
</if>
<if test="handspersonid != null">
HandsPersonId,
</if>
<if test="accountid != null">
AccountId,
</if>
<if test="changeamount != null">
ChangeAmount,
</if>
<if test="allocationprojectid != null">
AllocationProjectId,
</if>
<if test="totalprice != null">
TotalPrice,
</if>
<if test="paytype != null">
PayType,
</if>
<if test="remark != null">
Remark,
</if>
<if test="salesman != null">
Salesman,
</if>
<if test="accountidlist != null">
AccountIdList,
</if>
<if test="accountmoneylist != null">
AccountMoneyList,
</if>
<if test="discount != null">
Discount,
</if>
<if test="discountmoney != null">
DiscountMoney,
</if>
<if test="discountlastmoney != null">
DiscountLastMoney,
</if>
<if test="othermoney != null">
OtherMoney,
</if>
<if test="othermoneylist != null">
OtherMoneyList,
</if>
<if test="othermoneyitem != null">
OtherMoneyItem,
</if>
<if test="accountday != null">
AccountDay,
</if>
<if test="status != null">
Status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="subtype != null">
#{subtype,jdbcType=VARCHAR},
</if>
<if test="projectid != null">
#{projectid,jdbcType=BIGINT},
</if>
<if test="defaultnumber != null">
#{defaultnumber,jdbcType=VARCHAR},
</if>
<if test="number != null">
#{number,jdbcType=VARCHAR},
</if>
<if test="operpersonname != null">
#{operpersonname,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="opertime != null">
#{opertime,jdbcType=TIMESTAMP},
</if>
<if test="organid != null">
#{organid,jdbcType=BIGINT},
</if>
<if test="handspersonid != null">
#{handspersonid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
#{accountid,jdbcType=BIGINT},
</if>
<if test="changeamount != null">
#{changeamount,jdbcType=DOUBLE},
</if>
<if test="allocationprojectid != null">
#{allocationprojectid,jdbcType=BIGINT},
</if>
<if test="totalprice != null">
#{totalprice,jdbcType=DOUBLE},
</if>
<if test="paytype != null">
#{paytype,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="salesman != null">
#{salesman,jdbcType=VARCHAR},
</if>
<if test="accountidlist != null">
#{accountidlist,jdbcType=VARCHAR},
</if>
<if test="accountmoneylist != null">
#{accountmoneylist,jdbcType=VARCHAR},
</if>
<if test="discount != null">
#{discount,jdbcType=DOUBLE},
</if>
<if test="discountmoney != null">
#{discountmoney,jdbcType=DOUBLE},
</if>
<if test="discountlastmoney != null">
#{discountlastmoney,jdbcType=DOUBLE},
</if>
<if test="othermoney != null">
#{othermoney,jdbcType=DOUBLE},
</if>
<if test="othermoneylist != null">
#{othermoneylist,jdbcType=VARCHAR},
</if>
<if test="othermoneyitem != null">
#{othermoneyitem,jdbcType=VARCHAR},
</if>
<if test="accountday != null">
#{accountday,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_depothead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.subtype != null">
SubType = #{record.subtype,jdbcType=VARCHAR},
</if>
<if test="record.projectid != null">
ProjectId = #{record.projectid,jdbcType=BIGINT},
</if>
<if test="record.defaultnumber != null">
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR},
</if>
<if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.operpersonname != null">
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR},
</if>
<if test="record.createtime != null">
CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.opertime != null">
OperTime = #{record.opertime,jdbcType=TIMESTAMP},
</if>
<if test="record.organid != null">
OrganId = #{record.organid,jdbcType=BIGINT},
</if>
<if test="record.handspersonid != null">
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
</if>
<if test="record.accountid != null">
AccountId = #{record.accountid,jdbcType=BIGINT},
</if>
<if test="record.changeamount != null">
ChangeAmount = #{record.changeamount,jdbcType=DOUBLE},
</if>
<if test="record.allocationprojectid != null">
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
</if>
<if test="record.totalprice != null">
TotalPrice = #{record.totalprice,jdbcType=DOUBLE},
</if>
<if test="record.paytype != null">
PayType = #{record.paytype,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.salesman != null">
Salesman = #{record.salesman,jdbcType=VARCHAR},
</if>
<if test="record.accountidlist != null">
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
</if>
<if test="record.accountmoneylist != null">
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
</if>
<if test="record.discount != null">
Discount = #{record.discount,jdbcType=DOUBLE},
</if>
<if test="record.discountmoney != null">
DiscountMoney = #{record.discountmoney,jdbcType=DOUBLE},
</if>
<if test="record.discountlastmoney != null">
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DOUBLE},
</if>
<if test="record.othermoney != null">
OtherMoney = #{record.othermoney,jdbcType=DOUBLE},
</if>
<if test="record.othermoneylist != null">
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
</if>
<if test="record.othermoneyitem != null">
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
</if>
<if test="record.accountday != null">
AccountDay = #{record.accountday,jdbcType=INTEGER},
</if>
<if test="record.status != null">
Status = #{record.status,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
SubType = #{record.subtype,jdbcType=VARCHAR},
ProjectId = #{record.projectid,jdbcType=BIGINT},
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR},
Number = #{record.number,jdbcType=VARCHAR},
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR},
CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
OperTime = #{record.opertime,jdbcType=TIMESTAMP},
OrganId = #{record.organid,jdbcType=BIGINT},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=DOUBLE},
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
TotalPrice = #{record.totalprice,jdbcType=DOUBLE},
PayType = #{record.paytype,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
Salesman = #{record.salesman,jdbcType=VARCHAR},
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
Discount = #{record.discount,jdbcType=DOUBLE},
DiscountMoney = #{record.discountmoney,jdbcType=DOUBLE},
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DOUBLE},
OtherMoney = #{record.othermoney,jdbcType=DOUBLE},
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
AccountDay = #{record.accountday,jdbcType=INTEGER},
Status = #{record.status,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="subtype != null">
SubType = #{subtype,jdbcType=VARCHAR},
</if>
<if test="projectid != null">
ProjectId = #{projectid,jdbcType=BIGINT},
</if>
<if test="defaultnumber != null">
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
</if>
<if test="number != null">
Number = #{number,jdbcType=VARCHAR},
</if>
<if test="operpersonname != null">
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
CreateTime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="opertime != null">
OperTime = #{opertime,jdbcType=TIMESTAMP},
</if>
<if test="organid != null">
OrganId = #{organid,jdbcType=BIGINT},
</if>
<if test="handspersonid != null">
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
AccountId = #{accountid,jdbcType=BIGINT},
</if>
<if test="changeamount != null">
ChangeAmount = #{changeamount,jdbcType=DOUBLE},
</if>
<if test="allocationprojectid != null">
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
</if>
<if test="totalprice != null">
TotalPrice = #{totalprice,jdbcType=DOUBLE},
</if>
<if test="paytype != null">
PayType = #{paytype,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="salesman != null">
Salesman = #{salesman,jdbcType=VARCHAR},
</if>
<if test="accountidlist != null">
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
</if>
<if test="accountmoneylist != null">
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
</if>
<if test="discount != null">
Discount = #{discount,jdbcType=DOUBLE},
</if>
<if test="discountmoney != null">
DiscountMoney = #{discountmoney,jdbcType=DOUBLE},
</if>
<if test="discountlastmoney != null">
DiscountLastMoney = #{discountlastmoney,jdbcType=DOUBLE},
</if>
<if test="othermoney != null">
OtherMoney = #{othermoney,jdbcType=DOUBLE},
</if>
<if test="othermoneylist != null">
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
</if>
<if test="othermoneyitem != null">
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
</if>
<if test="accountday != null">
AccountDay = #{accountday,jdbcType=INTEGER},
</if>
<if test="status != null">
Status = #{status,jdbcType=BIT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
set Type = #{type,jdbcType=VARCHAR},
SubType = #{subtype,jdbcType=VARCHAR},
ProjectId = #{projectid,jdbcType=BIGINT},
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
Number = #{number,jdbcType=VARCHAR},
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
CreateTime = #{createtime,jdbcType=TIMESTAMP},
OperTime = #{opertime,jdbcType=TIMESTAMP},
OrganId = #{organid,jdbcType=BIGINT},
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=DOUBLE},
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
TotalPrice = #{totalprice,jdbcType=DOUBLE},
PayType = #{paytype,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
Salesman = #{salesman,jdbcType=VARCHAR},
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
Discount = #{discount,jdbcType=DOUBLE},
DiscountMoney = #{discountmoney,jdbcType=DOUBLE},
DiscountLastMoney = #{discountlastmoney,jdbcType=DOUBLE},
OtherMoney = #{othermoney,jdbcType=DOUBLE},
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
AccountDay = #{accountday,jdbcType=INTEGER},
Status = #{status,jdbcType=BIT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,284 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.DepotHeadMapper">
<resultMap extends="BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.vo.DepotHeadVo4List">
<result column="ProjectName" jdbcType="VARCHAR" property="projectName" />
<result column="OrganName" jdbcType="VARCHAR" property="organName" />
<result column="HandsPersonName" jdbcType="VARCHAR" property="handsPersonName" />
<result column="AccountName" jdbcType="VARCHAR" property="accountName" />
<result column="AllocationProjectName" jdbcType="VARCHAR" property="allocationProjectName" />
</resultMap>
<resultMap id="ResultWithInfoExMap" type="com.jsh.erp.datasource.vo.DepotHeadVo4InDetail">
<result column="Number" jdbcType="VARCHAR" property="Number" />
<result column="MName" jdbcType="VARCHAR" property="MName" />
<result column="Model" jdbcType="VARCHAR" property="Model" />
<result column="UnitPrice" jdbcType="DOUBLE" property="UnitPrice" />
<result column="OperNumber" jdbcType="DOUBLE" property="OperNumber" />
<result column="AllPrice" jdbcType="DOUBLE" property="AllPrice" />
<result column="SName" jdbcType="VARCHAR" property="SName" />
<result column="DName" jdbcType="VARCHAR" property="DName" />
<result column="OperTime" jdbcType="VARCHAR" property="OperTime" />
<result column="NewType" jdbcType="VARCHAR" property="NewType" />
</resultMap>
<resultMap id="ResultInOutMaterialCount" type="com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount">
<result column="MaterialId" jdbcType="BIGINT" property="MaterialId" />
<result column="mName" jdbcType="VARCHAR" property="mName" />
<result column="Model" jdbcType="VARCHAR" property="Model" />
<result column="categoryName" jdbcType="VARCHAR" property="categoryName" />
<result column="numSum" jdbcType="DOUBLE" property="numSum" />
<result column="priceSum" jdbcType="DOUBLE" property="priceSum" />
</resultMap>
<resultMap id="ResultStatementAccount" type="com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount">
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="DiscountLastMoney" jdbcType="DOUBLE" property="discountLastMoney" />
<result column="ChangeAmount" jdbcType="DOUBLE" property="changeAmount" />
<result column="supplierName" jdbcType="VARCHAR" property="supplierName" />
<result column="oTime" jdbcType="VARCHAR" property="oTime" />
</resultMap>
<select id="selectByConditionDepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select dh.*, d.name ProjectName, s.supplier OrganName, p.name HandsPersonName, a.name AccountName, dd.name AllocationProjectName
from jsh_depothead dh
left join jsh_depot d on dh.ProjectId=d.id
left join jsh_supplier s on dh.OrganId=s.id
left join jsh_person p on dh.HandsPersonId=p.id
left join jsh_account a on dh.AccountId=a.id
left join jsh_depot dd on dh.AllocationProjectId=dd.id
where 1=1
<if test="type != null">
and dh.Type='${type}'
</if>
<if test="subType != null">
and dh.SubType='${subType}'
</if>
<if test="number != null">
and dh.Number like '%${number}%'
</if>
<if test="dhIds != null">
and dh.Id in (${dhIds})
</if>
<if test="beginTime != null">
and dh.OperTime >= (${beginTime})
</if>
<if test="endTime != null">
and dh.OperTime &lt;= (${endTime})
</if>
order by dh.Id desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepotHead" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_depothead
WHERE 1=1
<if test="type != null">
and Type='${type}'
</if>
<if test="subType != null">
and SubType='${subType}'
</if>
<if test="number != null">
and Number like '%${number}%'
</if>
<if test="dhIds != null">
and Id in (${dhIds})
</if>
<if test="beginTime != null">
and OperTime >= (${beginTime})
</if>
<if test="endTime != null">
and OperTime &lt;= (${endTime})
</if>
</select>
<select id="getMaxId" resultType="java.lang.Long">
select max(Id) as Id from jsh_depothead
</select>
<select id="findMaterialsListByHeaderId" resultType="java.lang.String">
select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName from jsh_depotitem inner join jsh_material
on jsh_depotitem.MaterialId = jsh_material.Id where jsh_depotitem.HeaderId = ${id}
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select dh.Number,m.`name` MName,m.Model,di.UnitPrice,di.OperNumber,di.AllPrice,s.supplier SName,d.dName DName,
date_format(dh.OperTime, '%Y-%m-%d') OperTime, concat(dh.SubType,dh.Type) as NewType
from jsh_depothead dh inner join jsh_depotitem di on di.HeaderId=dh.id
inner join jsh_material m on m.id=di.MaterialId
inner join jsh_supplier s on s.id=dh.OrganId
inner join (select id,name as dName from jsh_depot) d on d.id=di.DepotId
where dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">
and dh.OrganId = ${oId}
</if>
<if test="pid != null">
and di.DepotId = ${pid}
</if>
<if test="pid == null">
and di.DepotId in (${dids})
</if>
<if test="type != null">
and dh.Type='${type}'
</if>
ORDER BY OperTime DESC,Number desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findByAllCount" resultType="java.lang.Integer">
select count(1)
from jsh_depothead dh inner join jsh_depotitem di on di.HeaderId=dh.id
inner join jsh_material m on m.id=di.MaterialId
inner join jsh_supplier s on s.id=dh.OrganId
inner join (select id,name as dName from jsh_depot) d on d.id=di.DepotId
where dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">
and dh.OrganId = ${oId}
</if>
<if test="pid != null">
and di.DepotId = ${pid}
</if>
<if test="pid == null">
and di.DepotId in (${dids})
</if>
<if test="type != null">
and dh.Type='${type}'
</if>
ORDER BY OperTime DESC,Number desc
</select>
<select id="findInOutMaterialCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultInOutMaterialCount">
select di.MaterialId, m.mName,m.Model,m.categoryName,
(select sum(jdi.BasicNumber) numSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi
on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId
and jdh.type='${type}' and jdh.OperTime >='${beginTime}' and jdh.OperTime &lt;='${endTime}'
<if test="oId != null">
and jdh.OrganId = ${oId}
</if>
<if test="pid != null">
and jdi.DepotId= ${pid}
</if>
<if test="pid == null">
and jdi.DepotId in (${dids})
</if>
) numSum,
(select sum(jdi.AllPrice) priceSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi
on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId
and jdh.type='${type}' and jdh.OperTime >='${beginTime}' and jdh.OperTime &lt;='${endTime}'
<if test="oId != null">
and jdh.OrganId = ${oId}
</if>
<if test="pid != null">
and jdi.DepotId= ${pid}
</if>
<if test="pid == null">
and jdi.DepotId in (${dids})
</if>
) priceSum
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">
and dh.OrganId = ${oId}
</if>
<if test="pid != null">
and di.DepotId= ${pid}
</if>
<if test="pid == null">
and di.DepotId in (${dids})
</if>
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findInOutMaterialCountTotal" resultType="java.lang.Integer">
select count(1)
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">
and dh.OrganId = ${oId}
</if>
<if test="pid != null">
and di.DepotId= ${pid}
</if>
<if test="pid == null">
and di.DepotId in (${dids})
</if>
</select>
<select id="findStatementAccount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStatementAccount">
select dh.Number,concat(dh.SubType,dh.Type) as type,dh.DiscountLastMoney,dh.ChangeAmount,s.supplier supplierName,
date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depothead dh
inner join jsh_supplier s on s.id=dh.OrganId where s.type='${supType}' and dh.SubType!='其它'
and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="organId != null">
and dh.OrganId=${organId}
</if>
UNION ALL
select ah.BillNo Number,ah.Type as newType,ah.TotalPrice DiscountLastMoney,ah.ChangeAmount,s.supplier supplierName,
date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_accounthead ah
inner join jsh_supplier s on s.id=ah.OrganId where s.type='${supType}'
and ah.BillTime >='${beginTime}' and ah.BillTime &lt;='${endTime}'
<if test="organId != null">
and ah.OrganId=${organId}
</if>
ORDER BY oTime
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findStatementAccountCount" resultType="java.lang.Integer">
select sum(a) from
(
select count(1) a from jsh_depothead dh
inner join jsh_supplier s on s.id=dh.OrganId where s.type='${supType}' and dh.SubType!='其它'
and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="organId != null">
and dh.OrganId=${organId}
</if>
UNION ALL
select count(1) a from jsh_accounthead ah
inner join jsh_supplier s on s.id=ah.OrganId where s.type='${supType}'
and ah.BillTime >='${beginTime}' and ah.BillTime &lt;='${endTime}'
<if test="organId != null">
and ah.OrganId=${organId}
</if>
) cc
</select>
<select id="findAllMoney" resultType="java.lang.Double">
select sum(${modeName}) as allMoney from jsh_depothead where Type='${type}' and SubType = '${subType}'
and OrganId =${supplierId} and OperTime &lt;='${endTime}'
</select>
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select dh.*, d.name ProjectName, s.supplier OrganName, p.name HandsPersonName, a.name AccountName, dd.name AllocationProjectName
from jsh_depothead dh
left join jsh_depot d on dh.ProjectId=d.id
left join jsh_supplier s on dh.OrganId=s.id
left join jsh_person p on dh.HandsPersonId=p.id
left join jsh_account a on dh.AccountId=a.id
left join jsh_depot dd on dh.AllocationProjectId=dd.id
where 1=1
<if test="number != null">
and dh.Number='${number}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,555 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.DepotItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="HeaderId" jdbcType="BIGINT" property="headerid" />
<result column="MaterialId" jdbcType="BIGINT" property="materialid" />
<result column="MUnit" jdbcType="VARCHAR" property="munit" />
<result column="OperNumber" jdbcType="DOUBLE" property="opernumber" />
<result column="BasicNumber" jdbcType="DOUBLE" property="basicnumber" />
<result column="UnitPrice" jdbcType="DOUBLE" property="unitprice" />
<result column="TaxUnitPrice" jdbcType="DOUBLE" property="taxunitprice" />
<result column="AllPrice" jdbcType="DOUBLE" property="allprice" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="Img" jdbcType="VARCHAR" property="img" />
<result column="Incidentals" jdbcType="DOUBLE" property="incidentals" />
<result column="DepotId" jdbcType="BIGINT" property="depotid" />
<result column="AnotherDepotId" jdbcType="BIGINT" property="anotherdepotid" />
<result column="TaxRate" jdbcType="DOUBLE" property="taxrate" />
<result column="TaxMoney" jdbcType="DOUBLE" property="taxmoney" />
<result column="TaxLastMoney" jdbcType="DOUBLE" property="taxlastmoney" />
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" />
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" />
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" />
<result column="OtherField4" jdbcType="VARCHAR" property="otherfield4" />
<result column="OtherField5" jdbcType="VARCHAR" property="otherfield5" />
<result column="MType" jdbcType="VARCHAR" property="mtype" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, HeaderId, MaterialId, MUnit, OperNumber, BasicNumber, UnitPrice, TaxUnitPrice,
AllPrice, Remark, Img, Incidentals, DepotId, AnotherDepotId, TaxRate, TaxMoney, TaxLastMoney,
OtherField1, OtherField2, OtherField3, OtherField4, OtherField5, MType
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_depotitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_depotitem
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depotitem
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depotitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depotitem (Id, HeaderId, MaterialId,
MUnit, OperNumber, BasicNumber,
UnitPrice, TaxUnitPrice, AllPrice,
Remark, Img, Incidentals,
DepotId, AnotherDepotId, TaxRate,
TaxMoney, TaxLastMoney, OtherField1,
OtherField2, OtherField3, OtherField4,
OtherField5, MType)
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{materialid,jdbcType=BIGINT},
#{munit,jdbcType=VARCHAR}, #{opernumber,jdbcType=DOUBLE}, #{basicnumber,jdbcType=DOUBLE},
#{unitprice,jdbcType=DOUBLE}, #{taxunitprice,jdbcType=DOUBLE}, #{allprice,jdbcType=DOUBLE},
#{remark,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{incidentals,jdbcType=DOUBLE},
#{depotid,jdbcType=BIGINT}, #{anotherdepotid,jdbcType=BIGINT}, #{taxrate,jdbcType=DOUBLE},
#{taxmoney,jdbcType=DOUBLE}, #{taxlastmoney,jdbcType=DOUBLE}, #{otherfield1,jdbcType=VARCHAR},
#{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR}, #{otherfield4,jdbcType=VARCHAR},
#{otherfield5,jdbcType=VARCHAR}, #{mtype,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depotitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="headerid != null">
HeaderId,
</if>
<if test="materialid != null">
MaterialId,
</if>
<if test="munit != null">
MUnit,
</if>
<if test="opernumber != null">
OperNumber,
</if>
<if test="basicnumber != null">
BasicNumber,
</if>
<if test="unitprice != null">
UnitPrice,
</if>
<if test="taxunitprice != null">
TaxUnitPrice,
</if>
<if test="allprice != null">
AllPrice,
</if>
<if test="remark != null">
Remark,
</if>
<if test="img != null">
Img,
</if>
<if test="incidentals != null">
Incidentals,
</if>
<if test="depotid != null">
DepotId,
</if>
<if test="anotherdepotid != null">
AnotherDepotId,
</if>
<if test="taxrate != null">
TaxRate,
</if>
<if test="taxmoney != null">
TaxMoney,
</if>
<if test="taxlastmoney != null">
TaxLastMoney,
</if>
<if test="otherfield1 != null">
OtherField1,
</if>
<if test="otherfield2 != null">
OtherField2,
</if>
<if test="otherfield3 != null">
OtherField3,
</if>
<if test="otherfield4 != null">
OtherField4,
</if>
<if test="otherfield5 != null">
OtherField5,
</if>
<if test="mtype != null">
MType,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="headerid != null">
#{headerid,jdbcType=BIGINT},
</if>
<if test="materialid != null">
#{materialid,jdbcType=BIGINT},
</if>
<if test="munit != null">
#{munit,jdbcType=VARCHAR},
</if>
<if test="opernumber != null">
#{opernumber,jdbcType=DOUBLE},
</if>
<if test="basicnumber != null">
#{basicnumber,jdbcType=DOUBLE},
</if>
<if test="unitprice != null">
#{unitprice,jdbcType=DOUBLE},
</if>
<if test="taxunitprice != null">
#{taxunitprice,jdbcType=DOUBLE},
</if>
<if test="allprice != null">
#{allprice,jdbcType=DOUBLE},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="img != null">
#{img,jdbcType=VARCHAR},
</if>
<if test="incidentals != null">
#{incidentals,jdbcType=DOUBLE},
</if>
<if test="depotid != null">
#{depotid,jdbcType=BIGINT},
</if>
<if test="anotherdepotid != null">
#{anotherdepotid,jdbcType=BIGINT},
</if>
<if test="taxrate != null">
#{taxrate,jdbcType=DOUBLE},
</if>
<if test="taxmoney != null">
#{taxmoney,jdbcType=DOUBLE},
</if>
<if test="taxlastmoney != null">
#{taxlastmoney,jdbcType=DOUBLE},
</if>
<if test="otherfield1 != null">
#{otherfield1,jdbcType=VARCHAR},
</if>
<if test="otherfield2 != null">
#{otherfield2,jdbcType=VARCHAR},
</if>
<if test="otherfield3 != null">
#{otherfield3,jdbcType=VARCHAR},
</if>
<if test="otherfield4 != null">
#{otherfield4,jdbcType=VARCHAR},
</if>
<if test="otherfield5 != null">
#{otherfield5,jdbcType=VARCHAR},
</if>
<if test="mtype != null">
#{mtype,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_depotitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depotitem
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.headerid != null">
HeaderId = #{record.headerid,jdbcType=BIGINT},
</if>
<if test="record.materialid != null">
MaterialId = #{record.materialid,jdbcType=BIGINT},
</if>
<if test="record.munit != null">
MUnit = #{record.munit,jdbcType=VARCHAR},
</if>
<if test="record.opernumber != null">
OperNumber = #{record.opernumber,jdbcType=DOUBLE},
</if>
<if test="record.basicnumber != null">
BasicNumber = #{record.basicnumber,jdbcType=DOUBLE},
</if>
<if test="record.unitprice != null">
UnitPrice = #{record.unitprice,jdbcType=DOUBLE},
</if>
<if test="record.taxunitprice != null">
TaxUnitPrice = #{record.taxunitprice,jdbcType=DOUBLE},
</if>
<if test="record.allprice != null">
AllPrice = #{record.allprice,jdbcType=DOUBLE},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.img != null">
Img = #{record.img,jdbcType=VARCHAR},
</if>
<if test="record.incidentals != null">
Incidentals = #{record.incidentals,jdbcType=DOUBLE},
</if>
<if test="record.depotid != null">
DepotId = #{record.depotid,jdbcType=BIGINT},
</if>
<if test="record.anotherdepotid != null">
AnotherDepotId = #{record.anotherdepotid,jdbcType=BIGINT},
</if>
<if test="record.taxrate != null">
TaxRate = #{record.taxrate,jdbcType=DOUBLE},
</if>
<if test="record.taxmoney != null">
TaxMoney = #{record.taxmoney,jdbcType=DOUBLE},
</if>
<if test="record.taxlastmoney != null">
TaxLastMoney = #{record.taxlastmoney,jdbcType=DOUBLE},
</if>
<if test="record.otherfield1 != null">
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
</if>
<if test="record.otherfield2 != null">
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
</if>
<if test="record.otherfield3 != null">
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR},
</if>
<if test="record.otherfield4 != null">
OtherField4 = #{record.otherfield4,jdbcType=VARCHAR},
</if>
<if test="record.otherfield5 != null">
OtherField5 = #{record.otherfield5,jdbcType=VARCHAR},
</if>
<if test="record.mtype != null">
MType = #{record.mtype,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depotitem
set Id = #{record.id,jdbcType=BIGINT},
HeaderId = #{record.headerid,jdbcType=BIGINT},
MaterialId = #{record.materialid,jdbcType=BIGINT},
MUnit = #{record.munit,jdbcType=VARCHAR},
OperNumber = #{record.opernumber,jdbcType=DOUBLE},
BasicNumber = #{record.basicnumber,jdbcType=DOUBLE},
UnitPrice = #{record.unitprice,jdbcType=DOUBLE},
TaxUnitPrice = #{record.taxunitprice,jdbcType=DOUBLE},
AllPrice = #{record.allprice,jdbcType=DOUBLE},
Remark = #{record.remark,jdbcType=VARCHAR},
Img = #{record.img,jdbcType=VARCHAR},
Incidentals = #{record.incidentals,jdbcType=DOUBLE},
DepotId = #{record.depotid,jdbcType=BIGINT},
AnotherDepotId = #{record.anotherdepotid,jdbcType=BIGINT},
TaxRate = #{record.taxrate,jdbcType=DOUBLE},
TaxMoney = #{record.taxmoney,jdbcType=DOUBLE},
TaxLastMoney = #{record.taxlastmoney,jdbcType=DOUBLE},
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR},
OtherField4 = #{record.otherfield4,jdbcType=VARCHAR},
OtherField5 = #{record.otherfield5,jdbcType=VARCHAR},
MType = #{record.mtype,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depotitem
<set>
<if test="headerid != null">
HeaderId = #{headerid,jdbcType=BIGINT},
</if>
<if test="materialid != null">
MaterialId = #{materialid,jdbcType=BIGINT},
</if>
<if test="munit != null">
MUnit = #{munit,jdbcType=VARCHAR},
</if>
<if test="opernumber != null">
OperNumber = #{opernumber,jdbcType=DOUBLE},
</if>
<if test="basicnumber != null">
BasicNumber = #{basicnumber,jdbcType=DOUBLE},
</if>
<if test="unitprice != null">
UnitPrice = #{unitprice,jdbcType=DOUBLE},
</if>
<if test="taxunitprice != null">
TaxUnitPrice = #{taxunitprice,jdbcType=DOUBLE},
</if>
<if test="allprice != null">
AllPrice = #{allprice,jdbcType=DOUBLE},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="img != null">
Img = #{img,jdbcType=VARCHAR},
</if>
<if test="incidentals != null">
Incidentals = #{incidentals,jdbcType=DOUBLE},
</if>
<if test="depotid != null">
DepotId = #{depotid,jdbcType=BIGINT},
</if>
<if test="anotherdepotid != null">
AnotherDepotId = #{anotherdepotid,jdbcType=BIGINT},
</if>
<if test="taxrate != null">
TaxRate = #{taxrate,jdbcType=DOUBLE},
</if>
<if test="taxmoney != null">
TaxMoney = #{taxmoney,jdbcType=DOUBLE},
</if>
<if test="taxlastmoney != null">
TaxLastMoney = #{taxlastmoney,jdbcType=DOUBLE},
</if>
<if test="otherfield1 != null">
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
</if>
<if test="otherfield2 != null">
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
</if>
<if test="otherfield3 != null">
OtherField3 = #{otherfield3,jdbcType=VARCHAR},
</if>
<if test="otherfield4 != null">
OtherField4 = #{otherfield4,jdbcType=VARCHAR},
</if>
<if test="otherfield5 != null">
OtherField5 = #{otherfield5,jdbcType=VARCHAR},
</if>
<if test="mtype != null">
MType = #{mtype,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depotitem
set HeaderId = #{headerid,jdbcType=BIGINT},
MaterialId = #{materialid,jdbcType=BIGINT},
MUnit = #{munit,jdbcType=VARCHAR},
OperNumber = #{opernumber,jdbcType=DOUBLE},
BasicNumber = #{basicnumber,jdbcType=DOUBLE},
UnitPrice = #{unitprice,jdbcType=DOUBLE},
TaxUnitPrice = #{taxunitprice,jdbcType=DOUBLE},
AllPrice = #{allprice,jdbcType=DOUBLE},
Remark = #{remark,jdbcType=VARCHAR},
Img = #{img,jdbcType=VARCHAR},
Incidentals = #{incidentals,jdbcType=DOUBLE},
DepotId = #{depotid,jdbcType=BIGINT},
AnotherDepotId = #{anotherdepotid,jdbcType=BIGINT},
TaxRate = #{taxrate,jdbcType=DOUBLE},
TaxMoney = #{taxmoney,jdbcType=DOUBLE},
TaxLastMoney = #{taxlastmoney,jdbcType=DOUBLE},
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
OtherField3 = #{otherfield3,jdbcType=VARCHAR},
OtherField4 = #{otherfield4,jdbcType=VARCHAR},
OtherField5 = #{otherfield5,jdbcType=VARCHAR},
MType = #{mtype,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,268 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.DepotItemMapper">
<resultMap id="HeaderIdResultMap" type="com.jsh.erp.datasource.entities.DepotItemVo4HeaderId">
<result column="HeaderId" jdbcType="BIGINT" property="headerid" />
</resultMap>
<resultMap id="DetailByTypeAndMIdResultMap" type="com.jsh.erp.datasource.entities.DepotItemVo4DetailByTypeAndMId">
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="newType" jdbcType="VARCHAR" property="newtype" />
<result column="b_num" jdbcType="BIGINT" property="bnum" />
<result column="oTime" jdbcType="TIMESTAMP" property="otime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultAndMaterialMap" type="com.jsh.erp.datasource.entities.DepotItemVo4Material">
<result column="mName" jdbcType="VARCHAR" property="mname" />
<result column="mModel" jdbcType="VARCHAR" property="mmodel" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultWithInfoExMap" type="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
<result column="MName" jdbcType="VARCHAR" property="MName" />
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
<result column="MStandard" jdbcType="VARCHAR" property="MStandard" />
<result column="MMfrs" jdbcType="VARCHAR" property="MMfrs" />
<result column="MOtherField1" jdbcType="VARCHAR" property="MOtherField1" />
<result column="MOtherField2" jdbcType="VARCHAR" property="MOtherField2" />
<result column="MOtherField3" jdbcType="VARCHAR" property="MOtherField3" />
<result column="DepotName" jdbcType="VARCHAR" property="DepotName" />
<result column="AnotherDepotName" jdbcType="VARCHAR" property="AnotherDepotName" />
<result column="UnitId" jdbcType="BIGINT" property="UnitId" />
<result column="UName" jdbcType="VARCHAR" property="UName" />
</resultMap>
<select id="selectByConditionDepotItem" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
select *
FROM jsh_depotitem
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepotItem" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_depotitem
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
<select id="getHeaderIdByMaterial" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="HeaderIdResultMap">
select dt.HeaderId from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id
where (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%')
<if test="depotIds != null">
and dt.DepotId in (${depotIds})
</if>
</select>
<select id="findDetailByTypeAndMaterialIdList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="DetailByTypeAndMIdResultMap">
select dh.Number,concat(dh.SubType,dh.Type) as newType,
case when type='入库' then di.BasicNumber when type='出库' then 0-di.BasicNumber else 0 end as b_num,
date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type!='其它'
and SubType!='调拨' and SubType!='礼品充值'
and MaterialId =${mId} ORDER BY oTime desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findDetailByTypeAndMaterialIdCounts" resultType="java.lang.Integer">
select count(1)
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type!='其它'
and SubType!='调拨' and SubType!='礼品充值'
and MaterialId =${mId}
</select>
<select id="findStockNumByMaterialIdList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultAndMaterialMap">
select di.*,m.Name mName,m.Model mModel from jsh_depotitem di inner join jsh_material m on di.MaterialId=m.Id where 1=1
<if test="mId != null">
and MaterialId=${mId}
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findStockNumByMaterialIdCounts" resultType="java.lang.Integer">
select count(*) from jsh_depotitem where 1=1
<if test="mId != null">
and MaterialId=${mId}
</if>
</select>
<select id="findByTypeAndMaterialIdIn" resultType="java.lang.Integer">
select ifnull(sum(BasicNumber),0) as BasicNumber from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type='入库'
and MaterialId = ${mId}
</select>
<select id="findByTypeAndMaterialIdOut" resultType="java.lang.Integer">
select ifnull(sum(BasicNumber),0) as BasicNumber from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type='出库'
and SubType!='调拨' and SubType!='礼品充值' and MaterialId = ${mId}
</select>
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select di.*,m.Name MName,m.Model MModel,m.Unit MaterialUnit,m.Color MColor,m.Standard MStandard,m.Mfrs MMfrs,
m.OtherField1 MOtherField1,m.OtherField2 MOtherField2,m.OtherField3 MOtherField3,
dp1.name DepotName,dp2.name AnotherDepotName, u.id UnitId, u.UName
from jsh_depotitem di left join jsh_material m on di.MaterialId=m.id
left join jsh_unit u on m.UnitId = u.id
left join jsh_depot dp1 on di.DepotId=dp1.id
left join jsh_depot dp2 on di.AnotherDepotId=dp1.id
where di.HeaderId = ${headerId}
order by di.id asc
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select di.*, m.Name MName, m.Model MModel, m.Unit MaterialUnit, m.Color MColor
from jsh_depotitem di
inner join jsh_material m on di.MaterialId=m.id
where 1=1
<if test="headIds != null">
and HeaderId in (${headIds})
</if>
<if test="materialIds != null">
and MaterialId in (${materialIds})
</if>
group by MaterialId
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findByAllCount" resultType="java.lang.Integer">
select count(1)
from jsh_depotitem di
inner join jsh_material m on di.MaterialId=m.id
where 1=1
<if test="headIds != null">
and HeaderId in (${headIds})
</if>
<if test="materialIds != null">
and MaterialId in (${materialIds})
</if>
</select>
<select id="findByTypeInIsPrev" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &lt; '${MonthTime}-01 00:00:00'
</select>
<select id="findByTypeInIsNotPrev" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="findByTypeOutIsPrev" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &lt; '${MonthTime}-01 00:00:00'
</select>
<select id="findByTypeOutIsNotPrev" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="findPriceByTypeInIsPrev" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &lt; '${MonthTime}-01 00:00:00'
</select>
<select id="findPriceByTypeInIsNotPrev" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="findPriceByTypeOutIsPrev" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &lt; '${MonthTime}-01 00:00:00'
</select>
<select id="findPriceByTypeOutIsNotPrev" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="buyOrSaleNumber" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and type='${type}' and subType='${subType}'
and MaterialId =${MId} and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="buyOrSalePrice" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and type='${type}' and subType='${subType}'
and MaterialId =${MId} and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="findGiftByTypeIn" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and jsh_depothead.SubType='${subType}'
and jsh_depotitem.AnotherDepotId=${ProjectId}
and jsh_depotitem.MaterialId =${MId}
</select>
<select id="findGiftByTypeOut" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and jsh_depothead.SubType='${subType}'
and jsh_depotitem.DepotId=${ProjectId}
and jsh_depotitem.MaterialId =${MId}
</select>
</mapper>

View File

@@ -0,0 +1,318 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.DepotMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="warehousing" jdbcType="DOUBLE" property="warehousing" />
<result column="truckage" jdbcType="DOUBLE" property="truckage" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, name, address, warehousing, truckage, type, sort, remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_depot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_depot
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depot
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depot (id, name, address,
warehousing, truckage, type,
sort, remark)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{warehousing,jdbcType=DOUBLE}, #{truckage,jdbcType=DOUBLE}, #{type,jdbcType=INTEGER},
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depot
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="address != null">
address,
</if>
<if test="warehousing != null">
warehousing,
</if>
<if test="truckage != null">
truckage,
</if>
<if test="type != null">
type,
</if>
<if test="sort != null">
sort,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="warehousing != null">
#{warehousing,jdbcType=DOUBLE},
</if>
<if test="truckage != null">
#{truckage,jdbcType=DOUBLE},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_depot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depot
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.address != null">
address = #{record.address,jdbcType=VARCHAR},
</if>
<if test="record.warehousing != null">
warehousing = #{record.warehousing,jdbcType=DOUBLE},
</if>
<if test="record.truckage != null">
truckage = #{record.truckage,jdbcType=DOUBLE},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depot
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
address = #{record.address,jdbcType=VARCHAR},
warehousing = #{record.warehousing,jdbcType=DOUBLE},
truckage = #{record.truckage,jdbcType=DOUBLE},
type = #{record.type,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depot
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="warehousing != null">
warehousing = #{warehousing,jdbcType=DOUBLE},
</if>
<if test="truckage != null">
truckage = #{truckage,jdbcType=DOUBLE},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depot
set name = #{name,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
warehousing = #{warehousing,jdbcType=DOUBLE},
truckage = #{truckage,jdbcType=DOUBLE},
type = #{type,jdbcType=INTEGER},
sort = #{sort,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.DepotMapper">
<select id="selectByConditionDepot" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
select *
FROM jsh_depot
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepot" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_depot
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,348 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.FunctionsMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="PNumber" jdbcType="VARCHAR" property="pnumber" />
<result column="URL" jdbcType="VARCHAR" property="url" />
<result column="State" jdbcType="BIT" property="state" />
<result column="Sort" jdbcType="VARCHAR" property="sort" />
<result column="Enabled" jdbcType="BIT" property="enabled" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="PushBtn" jdbcType="VARCHAR" property="pushbtn" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Number, Name, PNumber, URL, State, Sort, Enabled, Type, PushBtn
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_functions
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_functions
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions (Id, Number, Name,
PNumber, URL, State, Sort,
Enabled, Type, PushBtn)
values (#{id,jdbcType=BIGINT}, #{number,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{pnumber,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{state,jdbcType=BIT}, #{sort,jdbcType=VARCHAR},
#{enabled,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{pushbtn,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="number != null">
Number,
</if>
<if test="name != null">
Name,
</if>
<if test="pnumber != null">
PNumber,
</if>
<if test="url != null">
URL,
</if>
<if test="state != null">
State,
</if>
<if test="sort != null">
Sort,
</if>
<if test="enabled != null">
Enabled,
</if>
<if test="type != null">
Type,
</if>
<if test="pushbtn != null">
PushBtn,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="number != null">
#{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="pnumber != null">
#{pnumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
#{state,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="pushbtn != null">
#{pushbtn,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.pnumber != null">
PNumber = #{record.pnumber,jdbcType=VARCHAR},
</if>
<if test="record.url != null">
URL = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.state != null">
State = #{record.state,jdbcType=BIT},
</if>
<if test="record.sort != null">
Sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.pushbtn != null">
PushBtn = #{record.pushbtn,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
set Id = #{record.id,jdbcType=BIGINT},
Number = #{record.number,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR},
PNumber = #{record.pnumber,jdbcType=VARCHAR},
URL = #{record.url,jdbcType=VARCHAR},
State = #{record.state,jdbcType=BIT},
Sort = #{record.sort,jdbcType=VARCHAR},
Enabled = #{record.enabled,jdbcType=BIT},
Type = #{record.type,jdbcType=VARCHAR},
PushBtn = #{record.pushbtn,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
<set>
<if test="number != null">
Number = #{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="pnumber != null">
PNumber = #{pnumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
URL = #{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
State = #{state,jdbcType=BIT},
</if>
<if test="sort != null">
Sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="pushbtn != null">
PushBtn = #{pushbtn,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
set Number = #{number,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR},
PNumber = #{pnumber,jdbcType=VARCHAR},
URL = #{url,jdbcType=VARCHAR},
State = #{state,jdbcType=BIT},
Sort = #{sort,jdbcType=VARCHAR},
Enabled = #{enabled,jdbcType=BIT},
Type = #{type,jdbcType=VARCHAR},
PushBtn = #{pushbtn,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.FunctionsMapper">
<select id="selectByConditionFunctions" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultMap="BaseResultMap">
select *
FROM jsh_functions
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByFunctions" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_functions
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,256 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.InOutItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, Type, Remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_inoutitem
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_inoutitem
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem (Id, Name, Type,
Remark)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="type != null">
Type,
</if>
<if test="remark != null">
Remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
Type = #{record.type,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
set Name = #{name,jdbcType=VARCHAR},
Type = #{type,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.InOutItemMapper">
<select id="selectByConditionInOutItem" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultMap="BaseResultMap">
select *
FROM jsh_inoutitem
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByInOutItem" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_inoutitem
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,318 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.LogMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="userID" jdbcType="BIGINT" property="userid" />
<result column="operation" jdbcType="VARCHAR" property="operation" />
<result column="clientIP" jdbcType="VARCHAR" property="clientip" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="contentdetails" jdbcType="VARCHAR" property="contentdetails" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, userID, operation, clientIP, createtime, status, contentdetails, remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.LogExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_log
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.LogExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_log (id, userID, operation,
clientIP, createtime, status,
contentdetails, remark)
values (#{id,jdbcType=BIGINT}, #{userid,jdbcType=BIGINT}, #{operation,jdbcType=VARCHAR},
#{clientip,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT},
#{contentdetails,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userid != null">
userID,
</if>
<if test="operation != null">
operation,
</if>
<if test="clientip != null">
clientIP,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="status != null">
status,
</if>
<if test="contentdetails != null">
contentdetails,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userid != null">
#{userid,jdbcType=BIGINT},
</if>
<if test="operation != null">
#{operation,jdbcType=VARCHAR},
</if>
<if test="clientip != null">
#{clientip,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="contentdetails != null">
#{contentdetails,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.LogExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userid != null">
userID = #{record.userid,jdbcType=BIGINT},
</if>
<if test="record.operation != null">
operation = #{record.operation,jdbcType=VARCHAR},
</if>
<if test="record.clientip != null">
clientIP = #{record.clientip,jdbcType=VARCHAR},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.contentdetails != null">
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
set id = #{record.id,jdbcType=BIGINT},
userID = #{record.userid,jdbcType=BIGINT},
operation = #{record.operation,jdbcType=VARCHAR},
clientIP = #{record.clientip,jdbcType=VARCHAR},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=TINYINT},
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
<set>
<if test="userid != null">
userID = #{userid,jdbcType=BIGINT},
</if>
<if test="operation != null">
operation = #{operation,jdbcType=VARCHAR},
</if>
<if test="clientip != null">
clientIP = #{clientip,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="contentdetails != null">
contentdetails = #{contentdetails,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
set userID = #{userid,jdbcType=BIGINT},
operation = #{operation,jdbcType=VARCHAR},
clientIP = #{clientip,jdbcType=VARCHAR},
createtime = #{createtime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=TINYINT},
contentdetails = #{contentdetails,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,61 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.LogMapper">
<select id="selectByConditionLog" parameterType="com.jsh.erp.datasource.entities.LogExample" resultMap="BaseResultMap">
select *
FROM jsh_log
where 1=1
<if test="operation != null">
and operation like '%${operation}%'
</if>
<if test="usernameID != null">
and userID=${usernameID}
</if>
<if test="clientIp != null">
and clientIp like '%${clientIp}%'
</if>
<if test="status != null">
and status=${status}
</if>
<if test="beginTime != null">
and createtime gt;= '%${beginTime}%'
</if>
<if test="endTime != null">
and createtime lt;= '%${endTime}%'
</if>
<if test="contentdetails != null">
and contentdetails like '%${contentdetails}%'
</if>
order by createtime desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByLog" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_log
WHERE 1=1
<if test="operation != null">
and operation like '%${operation}%'
</if>
<if test="usernameID != null">
and userID=${usernameID}
</if>
<if test="clientIp != null">
and clientIp like '%${clientIp}%'
</if>
<if test="status != null">
and status = ${status}
</if>
<if test="beginTime != null">
and createtime &gt;= '${beginTime}'
</if>
<if test="endTime != null">
and createtime &lt;= '${endTime}'
</if>
<if test="contentdetails != null">
and contentdetails like '%${contentdetails}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,256 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialCategoryMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="CategoryLevel" jdbcType="SMALLINT" property="categorylevel" />
<result column="ParentId" jdbcType="BIGINT" property="parentid" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, CategoryLevel, ParentId
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_materialcategory
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialcategory
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory (Id, Name, CategoryLevel,
ParentId)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{categorylevel,jdbcType=SMALLINT},
#{parentid,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="categorylevel != null">
CategoryLevel,
</if>
<if test="parentid != null">
ParentId,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="categorylevel != null">
#{categorylevel,jdbcType=SMALLINT},
</if>
<if test="parentid != null">
#{parentid,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.categorylevel != null">
CategoryLevel = #{record.categorylevel,jdbcType=SMALLINT},
</if>
<if test="record.parentid != null">
ParentId = #{record.parentid,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
CategoryLevel = #{record.categorylevel,jdbcType=SMALLINT},
ParentId = #{record.parentid,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="categorylevel != null">
CategoryLevel = #{categorylevel,jdbcType=SMALLINT},
</if>
<if test="parentid != null">
ParentId = #{parentid,jdbcType=BIGINT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
set Name = #{name,jdbcType=VARCHAR},
CategoryLevel = #{categorylevel,jdbcType=SMALLINT},
ParentId = #{parentid,jdbcType=BIGINT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialCategoryMapper">
<select id="selectByConditionMaterialCategory" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultMap="BaseResultMap">
select *
FROM jsh_materialcategory
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="parentId != null">
and parentId = ${parentId}
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByMaterialCategory" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_materialcategory
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="parentId != null">
and parentId = ${parentId}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,555 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="CategoryId" jdbcType="BIGINT" property="categoryid" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="Mfrs" jdbcType="VARCHAR" property="mfrs" />
<result column="Packing" jdbcType="DOUBLE" property="packing" />
<result column="SafetyStock" jdbcType="DOUBLE" property="safetystock" />
<result column="Model" jdbcType="VARCHAR" property="model" />
<result column="Standard" jdbcType="VARCHAR" property="standard" />
<result column="Color" jdbcType="VARCHAR" property="color" />
<result column="Unit" jdbcType="VARCHAR" property="unit" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="RetailPrice" jdbcType="DOUBLE" property="retailprice" />
<result column="LowPrice" jdbcType="DOUBLE" property="lowprice" />
<result column="PresetPriceOne" jdbcType="DOUBLE" property="presetpriceone" />
<result column="PresetPriceTwo" jdbcType="DOUBLE" property="presetpricetwo" />
<result column="UnitId" jdbcType="BIGINT" property="unitid" />
<result column="FirstOutUnit" jdbcType="VARCHAR" property="firstoutunit" />
<result column="FirstInUnit" jdbcType="VARCHAR" property="firstinunit" />
<result column="PriceStrategy" jdbcType="VARCHAR" property="pricestrategy" />
<result column="Enabled" jdbcType="BIT" property="enabled" />
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" />
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" />
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, CategoryId, Name, Mfrs, Packing, SafetyStock, Model, Standard, Color, Unit, Remark,
RetailPrice, LowPrice, PresetPriceOne, PresetPriceTwo, UnitId, FirstOutUnit, FirstInUnit,
PriceStrategy, Enabled, OtherField1, OtherField2, OtherField3
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_material
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_material
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_material
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_material
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_material (Id, CategoryId, Name,
Mfrs, Packing, SafetyStock,
Model, Standard, Color,
Unit, Remark, RetailPrice,
LowPrice, PresetPriceOne, PresetPriceTwo,
UnitId, FirstOutUnit, FirstInUnit,
PriceStrategy, Enabled, OtherField1,
OtherField2, OtherField3)
values (#{id,jdbcType=BIGINT}, #{categoryid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{mfrs,jdbcType=VARCHAR}, #{packing,jdbcType=DOUBLE}, #{safetystock,jdbcType=DOUBLE},
#{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{retailprice,jdbcType=DOUBLE},
#{lowprice,jdbcType=DOUBLE}, #{presetpriceone,jdbcType=DOUBLE}, #{presetpricetwo,jdbcType=DOUBLE},
#{unitid,jdbcType=BIGINT}, #{firstoutunit,jdbcType=VARCHAR}, #{firstinunit,jdbcType=VARCHAR},
#{pricestrategy,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, #{otherfield1,jdbcType=VARCHAR},
#{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_material
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="categoryid != null">
CategoryId,
</if>
<if test="name != null">
Name,
</if>
<if test="mfrs != null">
Mfrs,
</if>
<if test="packing != null">
Packing,
</if>
<if test="safetystock != null">
SafetyStock,
</if>
<if test="model != null">
Model,
</if>
<if test="standard != null">
Standard,
</if>
<if test="color != null">
Color,
</if>
<if test="unit != null">
Unit,
</if>
<if test="remark != null">
Remark,
</if>
<if test="retailprice != null">
RetailPrice,
</if>
<if test="lowprice != null">
LowPrice,
</if>
<if test="presetpriceone != null">
PresetPriceOne,
</if>
<if test="presetpricetwo != null">
PresetPriceTwo,
</if>
<if test="unitid != null">
UnitId,
</if>
<if test="firstoutunit != null">
FirstOutUnit,
</if>
<if test="firstinunit != null">
FirstInUnit,
</if>
<if test="pricestrategy != null">
PriceStrategy,
</if>
<if test="enabled != null">
Enabled,
</if>
<if test="otherfield1 != null">
OtherField1,
</if>
<if test="otherfield2 != null">
OtherField2,
</if>
<if test="otherfield3 != null">
OtherField3,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="categoryid != null">
#{categoryid,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="mfrs != null">
#{mfrs,jdbcType=VARCHAR},
</if>
<if test="packing != null">
#{packing,jdbcType=DOUBLE},
</if>
<if test="safetystock != null">
#{safetystock,jdbcType=DOUBLE},
</if>
<if test="model != null">
#{model,jdbcType=VARCHAR},
</if>
<if test="standard != null">
#{standard,jdbcType=VARCHAR},
</if>
<if test="color != null">
#{color,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="retailprice != null">
#{retailprice,jdbcType=DOUBLE},
</if>
<if test="lowprice != null">
#{lowprice,jdbcType=DOUBLE},
</if>
<if test="presetpriceone != null">
#{presetpriceone,jdbcType=DOUBLE},
</if>
<if test="presetpricetwo != null">
#{presetpricetwo,jdbcType=DOUBLE},
</if>
<if test="unitid != null">
#{unitid,jdbcType=BIGINT},
</if>
<if test="firstoutunit != null">
#{firstoutunit,jdbcType=VARCHAR},
</if>
<if test="firstinunit != null">
#{firstinunit,jdbcType=VARCHAR},
</if>
<if test="pricestrategy != null">
#{pricestrategy,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="otherfield1 != null">
#{otherfield1,jdbcType=VARCHAR},
</if>
<if test="otherfield2 != null">
#{otherfield2,jdbcType=VARCHAR},
</if>
<if test="otherfield3 != null">
#{otherfield3,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_material
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_material
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.categoryid != null">
CategoryId = #{record.categoryid,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.mfrs != null">
Mfrs = #{record.mfrs,jdbcType=VARCHAR},
</if>
<if test="record.packing != null">
Packing = #{record.packing,jdbcType=DOUBLE},
</if>
<if test="record.safetystock != null">
SafetyStock = #{record.safetystock,jdbcType=DOUBLE},
</if>
<if test="record.model != null">
Model = #{record.model,jdbcType=VARCHAR},
</if>
<if test="record.standard != null">
Standard = #{record.standard,jdbcType=VARCHAR},
</if>
<if test="record.color != null">
Color = #{record.color,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
Unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.retailprice != null">
RetailPrice = #{record.retailprice,jdbcType=DOUBLE},
</if>
<if test="record.lowprice != null">
LowPrice = #{record.lowprice,jdbcType=DOUBLE},
</if>
<if test="record.presetpriceone != null">
PresetPriceOne = #{record.presetpriceone,jdbcType=DOUBLE},
</if>
<if test="record.presetpricetwo != null">
PresetPriceTwo = #{record.presetpricetwo,jdbcType=DOUBLE},
</if>
<if test="record.unitid != null">
UnitId = #{record.unitid,jdbcType=BIGINT},
</if>
<if test="record.firstoutunit != null">
FirstOutUnit = #{record.firstoutunit,jdbcType=VARCHAR},
</if>
<if test="record.firstinunit != null">
FirstInUnit = #{record.firstinunit,jdbcType=VARCHAR},
</if>
<if test="record.pricestrategy != null">
PriceStrategy = #{record.pricestrategy,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.otherfield1 != null">
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
</if>
<if test="record.otherfield2 != null">
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
</if>
<if test="record.otherfield3 != null">
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_material
set Id = #{record.id,jdbcType=BIGINT},
CategoryId = #{record.categoryid,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
Mfrs = #{record.mfrs,jdbcType=VARCHAR},
Packing = #{record.packing,jdbcType=DOUBLE},
SafetyStock = #{record.safetystock,jdbcType=DOUBLE},
Model = #{record.model,jdbcType=VARCHAR},
Standard = #{record.standard,jdbcType=VARCHAR},
Color = #{record.color,jdbcType=VARCHAR},
Unit = #{record.unit,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
RetailPrice = #{record.retailprice,jdbcType=DOUBLE},
LowPrice = #{record.lowprice,jdbcType=DOUBLE},
PresetPriceOne = #{record.presetpriceone,jdbcType=DOUBLE},
PresetPriceTwo = #{record.presetpricetwo,jdbcType=DOUBLE},
UnitId = #{record.unitid,jdbcType=BIGINT},
FirstOutUnit = #{record.firstoutunit,jdbcType=VARCHAR},
FirstInUnit = #{record.firstinunit,jdbcType=VARCHAR},
PriceStrategy = #{record.pricestrategy,jdbcType=VARCHAR},
Enabled = #{record.enabled,jdbcType=BIT},
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_material
<set>
<if test="categoryid != null">
CategoryId = #{categoryid,jdbcType=BIGINT},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="mfrs != null">
Mfrs = #{mfrs,jdbcType=VARCHAR},
</if>
<if test="packing != null">
Packing = #{packing,jdbcType=DOUBLE},
</if>
<if test="safetystock != null">
SafetyStock = #{safetystock,jdbcType=DOUBLE},
</if>
<if test="model != null">
Model = #{model,jdbcType=VARCHAR},
</if>
<if test="standard != null">
Standard = #{standard,jdbcType=VARCHAR},
</if>
<if test="color != null">
Color = #{color,jdbcType=VARCHAR},
</if>
<if test="unit != null">
Unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="retailprice != null">
RetailPrice = #{retailprice,jdbcType=DOUBLE},
</if>
<if test="lowprice != null">
LowPrice = #{lowprice,jdbcType=DOUBLE},
</if>
<if test="presetpriceone != null">
PresetPriceOne = #{presetpriceone,jdbcType=DOUBLE},
</if>
<if test="presetpricetwo != null">
PresetPriceTwo = #{presetpricetwo,jdbcType=DOUBLE},
</if>
<if test="unitid != null">
UnitId = #{unitid,jdbcType=BIGINT},
</if>
<if test="firstoutunit != null">
FirstOutUnit = #{firstoutunit,jdbcType=VARCHAR},
</if>
<if test="firstinunit != null">
FirstInUnit = #{firstinunit,jdbcType=VARCHAR},
</if>
<if test="pricestrategy != null">
PriceStrategy = #{pricestrategy,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT},
</if>
<if test="otherfield1 != null">
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
</if>
<if test="otherfield2 != null">
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
</if>
<if test="otherfield3 != null">
OtherField3 = #{otherfield3,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_material
set CategoryId = #{categoryid,jdbcType=BIGINT},
Name = #{name,jdbcType=VARCHAR},
Mfrs = #{mfrs,jdbcType=VARCHAR},
Packing = #{packing,jdbcType=DOUBLE},
SafetyStock = #{safetystock,jdbcType=DOUBLE},
Model = #{model,jdbcType=VARCHAR},
Standard = #{standard,jdbcType=VARCHAR},
Color = #{color,jdbcType=VARCHAR},
Unit = #{unit,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
RetailPrice = #{retailprice,jdbcType=DOUBLE},
LowPrice = #{lowprice,jdbcType=DOUBLE},
PresetPriceOne = #{presetpriceone,jdbcType=DOUBLE},
PresetPriceTwo = #{presetpricetwo,jdbcType=DOUBLE},
UnitId = #{unitid,jdbcType=BIGINT},
FirstOutUnit = #{firstoutunit,jdbcType=VARCHAR},
FirstInUnit = #{firstinunit,jdbcType=VARCHAR},
PriceStrategy = #{pricestrategy,jdbcType=VARCHAR},
Enabled = #{enabled,jdbcType=BIT},
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
OtherField3 = #{otherfield3,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,47 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialMapper">
<resultMap extends="BaseResultMap" id="ResultAndUnitMap" type="com.jsh.erp.datasource.entities.MaterialVo4Unit">
<result column="UName" jdbcType="VARCHAR" property="unitName" />
</resultMap>
<select id="selectByConditionMaterial" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
select *
FROM jsh_material
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="model != null">
and model like '%${model}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByMaterial" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_material
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="model != null">
and model like '%${model}%'
</if>
</select>
<select id="findUnitName" resultType="java.lang.String">
select jsh_unit.UName from jsh_unit left join jsh_material on UnitId=jsh_unit.id where jsh_material.id = ${mId}
</select>
<select id="findById" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.UName from jsh_material m left join jsh_unit u on m.UnitId=u.id where m.id = ${id}
</select>
<select id="findBySelect" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.UName from jsh_material m left join jsh_unit u on m.UnitId=u.id where m.enabled=1 ORDER BY Id asc
</select>
</mapper>

View File

@@ -0,0 +1,271 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialPropertyMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="nativeName" jdbcType="VARCHAR" property="nativename" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="anotherName" jdbcType="VARCHAR" property="anothername" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, nativeName, enabled, sort, anotherName
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_materialproperty
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialproperty
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty (id, nativeName, enabled,
sort, anotherName)
values (#{id,jdbcType=BIGINT}, #{nativename,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{sort,jdbcType=VARCHAR}, #{anothername,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="nativename != null">
nativeName,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="sort != null">
sort,
</if>
<if test="anothername != null">
anotherName,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="nativename != null">
#{nativename,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="anothername != null">
#{anothername,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.nativename != null">
nativeName = #{record.nativename,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.anothername != null">
anotherName = #{record.anothername,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
set id = #{record.id,jdbcType=BIGINT},
nativeName = #{record.nativename,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
sort = #{record.sort,jdbcType=VARCHAR},
anotherName = #{record.anothername,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
<set>
<if test="nativename != null">
nativeName = #{nativename,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="anothername != null">
anotherName = #{anothername,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
set nativeName = #{nativename,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
sort = #{sort,jdbcType=VARCHAR},
anotherName = #{anothername,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,24 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialPropertyMapper">
<select id="selectByConditionMaterialProperty" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultMap="BaseResultMap">
select *
FROM jsh_materialproperty
where 1=1
<if test="name != null">
and nativeName like '%${name}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByMaterialProperty" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_materialproperty
WHERE 1=1
<if test="name != null">
and nativeName like '%${name}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,241 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.PersonMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="Name" jdbcType="VARCHAR" property="name" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, Name
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_person
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_person
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_person (Id, Type, Name
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_person
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="name != null">
Name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
set Type = #{type,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.PersonMapper">
<select id="selectByConditionPerson" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultMap="BaseResultMap">
select *
FROM jsh_person
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByPerson" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_person
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,271 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.RoleMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, type, value, description
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_role
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_role
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_role (Id, Name, type,
value, description)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="type != null">
type,
</if>
<if test="value != null">
value,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
set Name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,24 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.RoleMapper">
<select id="selectByConditionRole" resultMap="BaseResultMap">
SELECT *
FROM jsh_role
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>;
</select>
<select id="countsByRole" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_role
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,525 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.SupplierMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="supplier" jdbcType="VARCHAR" property="supplier" />
<result column="contacts" jdbcType="VARCHAR" property="contacts" />
<result column="phonenum" jdbcType="VARCHAR" property="phonenum" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="AdvanceIn" jdbcType="DOUBLE" property="advancein" />
<result column="BeginNeedGet" jdbcType="DOUBLE" property="beginneedget" />
<result column="BeginNeedPay" jdbcType="DOUBLE" property="beginneedpay" />
<result column="AllNeedGet" jdbcType="DOUBLE" property="allneedget" />
<result column="AllNeedPay" jdbcType="DOUBLE" property="allneedpay" />
<result column="fax" jdbcType="VARCHAR" property="fax" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="taxNum" jdbcType="VARCHAR" property="taxnum" />
<result column="bankName" jdbcType="VARCHAR" property="bankname" />
<result column="accountNumber" jdbcType="VARCHAR" property="accountnumber" />
<result column="taxRate" jdbcType="DOUBLE" property="taxrate" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, supplier, contacts, phonenum, email, description, isystem, type, enabled, AdvanceIn,
BeginNeedGet, BeginNeedPay, AllNeedGet, AllNeedPay, fax, telephone, address, taxNum,
bankName, accountNumber, taxRate
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_supplier
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_supplier
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_supplier
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_supplier
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_supplier (id, supplier, contacts,
phonenum, email, description,
isystem, type, enabled,
AdvanceIn, BeginNeedGet, BeginNeedPay,
AllNeedGet, AllNeedPay, fax,
telephone, address, taxNum,
bankName, accountNumber, taxRate
)
values (#{id,jdbcType=BIGINT}, #{supplier,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR},
#{phonenum,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{isystem,jdbcType=TINYINT}, #{type,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{advancein,jdbcType=DOUBLE}, #{beginneedget,jdbcType=DOUBLE}, #{beginneedpay,jdbcType=DOUBLE},
#{allneedget,jdbcType=DOUBLE}, #{allneedpay,jdbcType=DOUBLE}, #{fax,jdbcType=VARCHAR},
#{telephone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{taxnum,jdbcType=VARCHAR},
#{bankname,jdbcType=VARCHAR}, #{accountnumber,jdbcType=VARCHAR}, #{taxrate,jdbcType=DOUBLE}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_supplier
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="supplier != null">
supplier,
</if>
<if test="contacts != null">
contacts,
</if>
<if test="phonenum != null">
phonenum,
</if>
<if test="email != null">
email,
</if>
<if test="description != null">
description,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="type != null">
type,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="advancein != null">
AdvanceIn,
</if>
<if test="beginneedget != null">
BeginNeedGet,
</if>
<if test="beginneedpay != null">
BeginNeedPay,
</if>
<if test="allneedget != null">
AllNeedGet,
</if>
<if test="allneedpay != null">
AllNeedPay,
</if>
<if test="fax != null">
fax,
</if>
<if test="telephone != null">
telephone,
</if>
<if test="address != null">
address,
</if>
<if test="taxnum != null">
taxNum,
</if>
<if test="bankname != null">
bankName,
</if>
<if test="accountnumber != null">
accountNumber,
</if>
<if test="taxrate != null">
taxRate,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="supplier != null">
#{supplier,jdbcType=VARCHAR},
</if>
<if test="contacts != null">
#{contacts,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
#{phonenum,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
#{isystem,jdbcType=TINYINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="advancein != null">
#{advancein,jdbcType=DOUBLE},
</if>
<if test="beginneedget != null">
#{beginneedget,jdbcType=DOUBLE},
</if>
<if test="beginneedpay != null">
#{beginneedpay,jdbcType=DOUBLE},
</if>
<if test="allneedget != null">
#{allneedget,jdbcType=DOUBLE},
</if>
<if test="allneedpay != null">
#{allneedpay,jdbcType=DOUBLE},
</if>
<if test="fax != null">
#{fax,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
#{telephone,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="taxnum != null">
#{taxnum,jdbcType=VARCHAR},
</if>
<if test="bankname != null">
#{bankname,jdbcType=VARCHAR},
</if>
<if test="accountnumber != null">
#{accountnumber,jdbcType=VARCHAR},
</if>
<if test="taxrate != null">
#{taxrate,jdbcType=DOUBLE},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_supplier
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_supplier
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.supplier != null">
supplier = #{record.supplier,jdbcType=VARCHAR},
</if>
<if test="record.contacts != null">
contacts = #{record.contacts,jdbcType=VARCHAR},
</if>
<if test="record.phonenum != null">
phonenum = #{record.phonenum,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.advancein != null">
AdvanceIn = #{record.advancein,jdbcType=DOUBLE},
</if>
<if test="record.beginneedget != null">
BeginNeedGet = #{record.beginneedget,jdbcType=DOUBLE},
</if>
<if test="record.beginneedpay != null">
BeginNeedPay = #{record.beginneedpay,jdbcType=DOUBLE},
</if>
<if test="record.allneedget != null">
AllNeedGet = #{record.allneedget,jdbcType=DOUBLE},
</if>
<if test="record.allneedpay != null">
AllNeedPay = #{record.allneedpay,jdbcType=DOUBLE},
</if>
<if test="record.fax != null">
fax = #{record.fax,jdbcType=VARCHAR},
</if>
<if test="record.telephone != null">
telephone = #{record.telephone,jdbcType=VARCHAR},
</if>
<if test="record.address != null">
address = #{record.address,jdbcType=VARCHAR},
</if>
<if test="record.taxnum != null">
taxNum = #{record.taxnum,jdbcType=VARCHAR},
</if>
<if test="record.bankname != null">
bankName = #{record.bankname,jdbcType=VARCHAR},
</if>
<if test="record.accountnumber != null">
accountNumber = #{record.accountnumber,jdbcType=VARCHAR},
</if>
<if test="record.taxrate != null">
taxRate = #{record.taxrate,jdbcType=DOUBLE},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_supplier
set id = #{record.id,jdbcType=BIGINT},
supplier = #{record.supplier,jdbcType=VARCHAR},
contacts = #{record.contacts,jdbcType=VARCHAR},
phonenum = #{record.phonenum,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
isystem = #{record.isystem,jdbcType=TINYINT},
type = #{record.type,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
AdvanceIn = #{record.advancein,jdbcType=DOUBLE},
BeginNeedGet = #{record.beginneedget,jdbcType=DOUBLE},
BeginNeedPay = #{record.beginneedpay,jdbcType=DOUBLE},
AllNeedGet = #{record.allneedget,jdbcType=DOUBLE},
AllNeedPay = #{record.allneedpay,jdbcType=DOUBLE},
fax = #{record.fax,jdbcType=VARCHAR},
telephone = #{record.telephone,jdbcType=VARCHAR},
address = #{record.address,jdbcType=VARCHAR},
taxNum = #{record.taxnum,jdbcType=VARCHAR},
bankName = #{record.bankname,jdbcType=VARCHAR},
accountNumber = #{record.accountnumber,jdbcType=VARCHAR},
taxRate = #{record.taxrate,jdbcType=DOUBLE}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_supplier
<set>
<if test="supplier != null">
supplier = #{supplier,jdbcType=VARCHAR},
</if>
<if test="contacts != null">
contacts = #{contacts,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
phonenum = #{phonenum,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="advancein != null">
AdvanceIn = #{advancein,jdbcType=DOUBLE},
</if>
<if test="beginneedget != null">
BeginNeedGet = #{beginneedget,jdbcType=DOUBLE},
</if>
<if test="beginneedpay != null">
BeginNeedPay = #{beginneedpay,jdbcType=DOUBLE},
</if>
<if test="allneedget != null">
AllNeedGet = #{allneedget,jdbcType=DOUBLE},
</if>
<if test="allneedpay != null">
AllNeedPay = #{allneedpay,jdbcType=DOUBLE},
</if>
<if test="fax != null">
fax = #{fax,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="taxnum != null">
taxNum = #{taxnum,jdbcType=VARCHAR},
</if>
<if test="bankname != null">
bankName = #{bankname,jdbcType=VARCHAR},
</if>
<if test="accountnumber != null">
accountNumber = #{accountnumber,jdbcType=VARCHAR},
</if>
<if test="taxrate != null">
taxRate = #{taxrate,jdbcType=DOUBLE},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_supplier
set supplier = #{supplier,jdbcType=VARCHAR},
contacts = #{contacts,jdbcType=VARCHAR},
phonenum = #{phonenum,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT},
type = #{type,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
AdvanceIn = #{advancein,jdbcType=DOUBLE},
BeginNeedGet = #{beginneedget,jdbcType=DOUBLE},
BeginNeedPay = #{beginneedpay,jdbcType=DOUBLE},
AllNeedGet = #{allneedget,jdbcType=DOUBLE},
AllNeedPay = #{allneedpay,jdbcType=DOUBLE},
fax = #{fax,jdbcType=VARCHAR},
telephone = #{telephone,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
taxNum = #{taxnum,jdbcType=VARCHAR},
bankName = #{bankname,jdbcType=VARCHAR},
accountNumber = #{accountnumber,jdbcType=VARCHAR},
taxRate = #{taxrate,jdbcType=DOUBLE}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,48 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.SupplierMapper">
<select id="selectByConditionSupplier" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="BaseResultMap">
select *
FROM jsh_supplier
where 1=1
<if test="supplier != null">
and supplier like '%${supplier}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="phonenum != null">
and phonenum like '%${phonenum}%'
</if>
<if test="telephone != null">
and telephone like '%${telephone}%'
</if>
<if test="description != null">
and description like '%${description}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsBySupplier" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_supplier
WHERE 1=1
<if test="supplier != null">
and supplier like '%${supplier}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="phonenum != null">
and phonenum like '%${phonenum}%'
</if>
<if test="telephone != null">
and telephone like '%${telephone}%'
</if>
<if test="description != null">
and description like '%${description}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,271 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.SystemConfigMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, type, name, value, description
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_systemconfig
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_systemconfig
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_systemconfig
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_systemconfig
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_systemconfig (id, type, name,
value, description)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_systemconfig
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="name != null">
name,
</if>
<if test="value != null">
value,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_systemconfig
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_systemconfig
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_systemconfig
set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_systemconfig
<set>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,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 type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,18 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.SystemConfigMapper">
<select id="selectByConditionSystemConfig" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap">
select *
FROM jsh_systemconfig
where 1=1
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsBySystemConfig" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_systemconfig
WHERE 1=1
</select>
</mapper>

View File

@@ -0,0 +1,224 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.UnitMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="UName" jdbcType="VARCHAR" property="uname" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, UName
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_unit
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_unit
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_unit
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_unit
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_unit (id, UName)
values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_unit
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="uname != null">
UName,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="uname != null">
#{uname,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_unit
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.uname != null">
UName = #{record.uname,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit
set id = #{record.id,jdbcType=BIGINT},
UName = #{record.uname,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit
<set>
<if test="uname != null">
UName = #{uname,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit
set UName = #{uname,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,24 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.UnitMapper">
<select id="selectByConditionUnit" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap">
select *
FROM jsh_unit
where 1=1
<if test="name != null">
and UName like '%${name}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByUnit" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_unit
WHERE 1=1
<if test="name != null">
and UName like '%${name}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,271 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="KeyId" jdbcType="VARCHAR" property="keyid" />
<result column="Value" jdbcType="VARCHAR" property="value" />
<result column="BtnStr" jdbcType="VARCHAR" property="btnstr" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, KeyId, Value, BtnStr
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_userbusiness
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_userbusiness
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_userbusiness (Id, Type, KeyId,
Value, BtnStr)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyid,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{btnstr,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_userbusiness
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="keyid != null">
KeyId,
</if>
<if test="value != null">
Value,
</if>
<if test="btnstr != null">
BtnStr,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="keyid != null">
#{keyid,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="btnstr != null">
#{btnstr,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.keyid != null">
KeyId = #{record.keyid,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
Value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.btnstr != null">
BtnStr = #{record.btnstr,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
KeyId = #{record.keyid,jdbcType=VARCHAR},
Value = #{record.value,jdbcType=VARCHAR},
BtnStr = #{record.btnstr,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="keyid != null">
KeyId = #{keyid,jdbcType=VARCHAR},
</if>
<if test="value != null">
Value = #{value,jdbcType=VARCHAR},
</if>
<if test="btnstr != null">
BtnStr = #{btnstr,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
set Type = #{type,jdbcType=VARCHAR},
KeyId = #{keyid,jdbcType=VARCHAR},
Value = #{value,jdbcType=VARCHAR},
BtnStr = #{btnstr,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,398 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.UserMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="loginame" jdbcType="VARCHAR" property="loginame" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="position" jdbcType="VARCHAR" property="position" />
<result column="department" jdbcType="VARCHAR" property="department" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="phonenum" jdbcType="VARCHAR" property="phonenum" />
<result column="ismanager" jdbcType="TINYINT" property="ismanager" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, username, loginame, password, position, department, email, phonenum, ismanager,
isystem, status, description, remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_user (id, username, loginame,
password, position, department,
email, phonenum, ismanager,
isystem, status, description,
remark)
values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{loginame,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{phonenum,jdbcType=VARCHAR}, #{ismanager,jdbcType=TINYINT},
#{isystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="username != null">
username,
</if>
<if test="loginame != null">
loginame,
</if>
<if test="password != null">
password,
</if>
<if test="position != null">
position,
</if>
<if test="department != null">
department,
</if>
<if test="email != null">
email,
</if>
<if test="phonenum != null">
phonenum,
</if>
<if test="ismanager != null">
ismanager,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="status != null">
status,
</if>
<if test="description != null">
description,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="loginame != null">
#{loginame,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="position != null">
#{position,jdbcType=VARCHAR},
</if>
<if test="department != null">
#{department,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
#{phonenum,jdbcType=VARCHAR},
</if>
<if test="ismanager != null">
#{ismanager,jdbcType=TINYINT},
</if>
<if test="isystem != null">
#{isystem,jdbcType=TINYINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.loginame != null">
loginame = #{record.loginame,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
password = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.position != null">
position = #{record.position,jdbcType=VARCHAR},
</if>
<if test="record.department != null">
department = #{record.department,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.phonenum != null">
phonenum = #{record.phonenum,jdbcType=VARCHAR},
</if>
<if test="record.ismanager != null">
ismanager = #{record.ismanager,jdbcType=TINYINT},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
set id = #{record.id,jdbcType=BIGINT},
username = #{record.username,jdbcType=VARCHAR},
loginame = #{record.loginame,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR},
position = #{record.position,jdbcType=VARCHAR},
department = #{record.department,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR},
phonenum = #{record.phonenum,jdbcType=VARCHAR},
ismanager = #{record.ismanager,jdbcType=TINYINT},
isystem = #{record.isystem,jdbcType=TINYINT},
status = #{record.status,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
<set>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="loginame != null">
loginame = #{loginame,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="position != null">
position = #{position,jdbcType=VARCHAR},
</if>
<if test="department != null">
department = #{department,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
phonenum = #{phonenum,jdbcType=VARCHAR},
</if>
<if test="ismanager != null">
ismanager = #{ismanager,jdbcType=TINYINT},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
set username = #{username,jdbcType=VARCHAR},
loginame = #{loginame,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
position = #{position,jdbcType=VARCHAR},
department = #{department,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
phonenum = #{phonenum,jdbcType=VARCHAR},
ismanager = #{ismanager,jdbcType=TINYINT},
isystem = #{isystem,jdbcType=TINYINT},
status = #{status,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.UserMapper">
<select id="selectByConditionUser" parameterType="com.jsh.erp.datasource.entities.UserExample" resultMap="BaseResultMap">
select *
FROM jsh_user
where 1=1
<if test="userName != null">
and username like '%${userName}%'
</if>
<if test="loginName != null">
and loginame like '%${loginName}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByUser" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_user
WHERE 1=1
<if test="userName != null">
and username like '%${userName}%'
</if>
<if test="loginName != null">
and loginame like '%${loginName}%'
</if>
</select>
</mapper>

View File

@@ -1,387 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 指定Spring配置文件的Schema信息 -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<!-- 装载属性配置文件 -->
<bean id="propertyConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations" value="classpath:common/jdbc.properties">
</property>
</bean>
<!-- 配置数据源C3P0 -->
<bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="jdbcUrl" value="${jdbcUrl}"></property>
<property name="driverClass" value="${driverClass}"></property>
<property name="user" value="${user}"></property>
<property name="password" value="${password}"></property>
<!--初始化时获取的连接数取值应在minPoolSize与maxPoolSize之间。Default: 3 -->
<property name="initialPoolSize" value="10"/>
<!--连接池中保留的最大连接数。Default: 15 -->
<property name="maxPoolSize" value="80"/>
<!--连接池中保留的最小连接数。-->
<property name="minPoolSize" value="3"/>
<!--最大空闲时间,60秒内未使用则连接被丢弃。若为0则永不丢弃。Default: 0 -->
<property name="maxIdleTime" value="60" />
<property name="maxStatements" value="6000"/>
<!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数。Default: 3 -->
<property name="acquireIncrement" value="10"/>
<!--每60秒检查所有连接池中的空闲连接。Default: 0 -->
<property name="idleConnectionTestPeriod" value="60" />
</bean>
<!-- 配置SessionFactory -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" value="classpath:hibernate/hibernate.cfg.xml"/>
</bean>
<!-- 配置Hibernate的局部事务管理器使用HibernateTransactionManager类 -->
<!-- 该类实现PlatformTransactionManager接口是针对Hibernate的特定实现-->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<!-- 配置HibernateTransactionManager时需要依注入SessionFactory的引用 -->
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- 配置事务切面Bean,指定事务管理器 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<!-- 用于配置详细的事务语义 -->
<tx:attributes>
<!-- 所有以'get'开头的方法是read-only的 -->
<tx:method name="get*" read-only="true"/>
<!-- 其他方法使用默认的事务设置 -->
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<!-- 配置daoTemplate作为所有DAO组件的模板 -->
<bean id="serviceTemplate" abstract="true">
<!-- 为DAO组件注入SessionFactory引用 -->
<property name="baseDao" ref="baseDao"/>
</bean>
<!--通用baseservice配置开始 -->
<!-- <bean id="baseService" class="com.jsh.base.BaseService" abstract="true">
为DAO组件注入SessionFactory引用
<property name="baseDao" ref="baseDao"/>
</bean> -->
<!--用户配置开始 -->
<bean id="userService" class="com.jsh.service.basic.UserService">
<property name="baseDao" ref="baseDao"/>
<property name="userDao" ref="userDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="userAction" class="com.jsh.action.basic.UserAction" scope="prototype">
<property name="userService" ref="userService"/>
<property name="logService" ref="logService"/>
</bean>
<!--用户配置结束 -->
<!--日志配置开始 -->
<bean id="logService" class="com.jsh.service.basic.LogService">
<property name="baseDao" ref="baseDao"/>
<property name="logDao" ref="logDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="logAction" class="com.jsh.action.basic.LogAction" scope="prototype">
<property name="logService" ref="logService"/>
<property name="userService" ref="userService"/>
</bean>
<!--日志配置结束 -->
<!--供应商配置开始 -->
<bean id="supplierService" class="com.jsh.service.basic.SupplierService">
<property name="baseDao" ref="baseDao"/>
<property name="supplierDao" ref="supplierDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="supplierAction" class="com.jsh.action.basic.SupplierAction" scope="prototype">
<property name="supplierService" ref="supplierService"/>
<property name="userBusinessService" ref="userBusinessService"/>
<property name="logService" ref="logService"/>
</bean>
<!--供应商配置结束 -->
<!--系统配置开始 -->
<bean id="systemConfigService" class="com.jsh.service.basic.SystemConfigService">
<property name="baseDao" ref="baseDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="systemConfigAction" class="com.jsh.action.basic.SystemConfigAction" scope="prototype">
<property name="systemConfigService" ref="systemConfigService"/>
<property name="logService" ref="logService"/>
</bean>
<!--系统配置结束 -->
<!--商品属性开始 -->
<bean id="materialPropertyService" class="com.jsh.service.materials.MaterialPropertyService">
<property name="baseDao" ref="baseDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="materialPropertyAction" class="com.jsh.action.materials.MaterialPropertyAction" scope="prototype">
<property name="materialPropertyService" ref="materialPropertyService" />
<property name="logService" ref="logService"/>
</bean>
<!--商品属性结束 -->
<!--分类配置开始 -->
<bean id="categoryService" class="com.jsh.service.basic.CategoryService">
<property name="baseDao" ref="baseDao"/>
<property name="categoryDao" ref="categoryDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="categoryAction" class="com.jsh.action.basic.CategoryAction" scope="prototype">
<property name="categoryService" ref="categoryService"/>
<property name="logService" ref="logService"/>
</bean>
<!--分类配置结束 -->
<!--仓库配置开始 -->
<bean id="depotService" class="com.jsh.service.basic.DepotService">
<property name="baseDao" ref="baseDao"/>
<property name="depotDao" ref="depotDao"/>
<property name="userBusinessDao" ref="userBusinessDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="depotAction" class="com.jsh.action.basic.DepotAction" scope="prototype">
<property name="depotService" ref="depotService"/>
<property name="userBusinessService" ref="userBusinessService"/>
<property name="logService" ref="logService"/>
</bean>
<!--仓库配置结束 -->
<!--计量单位开始 -->
<bean id="unitService" class="com.jsh.service.basic.UnitService">
<property name="baseDao" ref="baseDao"/>
<property name="unitDao" ref="unitDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="unitAction" class="com.jsh.action.basic.UnitAction" scope="prototype">
<property name="unitService" ref="unitService"/>
<property name="logService" ref="logService"/>
</bean>
<!--计量单位结束 -->
<!--应用配置开始 -->
<bean id="appService" class="com.jsh.service.basic.AppService">
<property name="baseDao" ref="baseDao"/>
<property name="appDao" ref="appDao"/>
<property name="userBusinessDao" ref="userBusinessDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="appAction" class="com.jsh.action.basic.AppAction" scope="prototype">
<property name="appService" ref="appService"/>
<property name="userBusinessService" ref="userBusinessService"/>
<property name="logService" ref="logService"/>
</bean>
<!--应用配置结束 -->
<!--角色配置开始 -->
<bean id="roleService" class="com.jsh.service.basic.RoleService">
<property name="baseDao" ref="baseDao"/>
<property name="roleDao" ref="roleDao"/>
<property name="userBusinessDao" ref="userBusinessDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="roleAction" class="com.jsh.action.basic.RoleAction" scope="prototype">
<property name="roleService" ref="roleService"/>
<property name="userBusinessService" ref="userBusinessService"/>
<property name="logService" ref="logService"/>
</bean>
<!--角色配置结束 -->
<!--功能配置开始 -->
<bean id="functionsService" class="com.jsh.service.basic.FunctionsService">
<property name="baseDao" ref="baseDao"/>
<property name="functionsDao" ref="functionsDao"/>
<property name="userBusinessDao" ref="userBusinessDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="functionsAction" class="com.jsh.action.basic.FunctionsAction" scope="prototype">
<property name="functionsService" ref="functionsService"/>
<property name="userBusinessService" ref="userBusinessService"/>
<property name="logService" ref="logService"/>
</bean>
<!--功能配置结束 -->
<!--用户对应关系配置开始 -->
<bean id="userBusinessService" class="com.jsh.service.basic.UserBusinessService">
<property name="baseDao" ref="baseDao"/>
<property name="userBusinessDao" ref="userBusinessDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="userBusinessAction" class="com.jsh.action.basic.UserBusinessAction" scope="prototype">
<property name="userBusinessService" ref="userBusinessService"/>
<property name="logService" ref="logService"/>
</bean>
<!--用户对应关系配置结束 -->
<!--资产名称配置开始 -->
<bean id="assetnameService" class="com.jsh.service.basic.AssetNameService">
<property name="baseDao" ref="baseDao"/>
<property name="assetNameDao" ref="assetNameDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="assetNameAction" class="com.jsh.action.basic.AssetNameAction" scope="prototype">
<property name="assetnameService" ref="assetnameService"/>
<property name="logService" ref="logService"/>
</bean>
<!--资产名称配置结束 -->
<!--资产配置开始 -->
<bean id="assetService" class="com.jsh.service.asset.AssetService">
<property name="baseDao" ref="baseDao"/>
<property name="assetDao" ref="assetDao"/>
<property name="assetNameDao" ref="assetNameDao"/>
<property name="categoryDao" ref="categoryDao"/>
<property name="supplierDao" ref="supplierDao"/>
<property name="userDao" ref="userDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="assetAction" class="com.jsh.action.asset.AssetAction" scope="prototype">
<property name="assetService" ref="assetService"/>
<property name="categoryService" ref="categoryService"/>
<property name="supplierService" ref="supplierService"/>
<property name="userService" ref="userService"/>
<property name="assetnameService" ref="assetnameService"/>
<property name="logService" ref="logService"/>
</bean>
<!--资产配置结束 -->
<!-- 资产报表配置开始 -->
<bean id="reportService" class="com.jsh.service.asset.ReportService">
<property name="reportDao" ref="reportDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="reportAction" class="com.jsh.action.asset.ReportAction" scope="prototype">
<property name="reportService" ref="reportService"/>
<property name="logService" ref="logService"/>
</bean>
<!--资产报表配置结束 -->
<!--经手人配置开始 -->
<bean id="personService" class="com.jsh.service.materials.PersonService">
<property name="baseDao" ref="baseDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="personAction" class="com.jsh.action.materials.PersonAction" scope="prototype">
<property name="personService" ref="personService"/>
<property name="logService" ref="logService"/>
</bean>
<!--经手人配置结束 -->
<!--商品类别配置开始 -->
<bean id="materialCategoryService" class="com.jsh.service.materials.MaterialCategoryService">
<property name="baseDao" ref="baseDao"/>
<property name="materialCategoryDao" ref="materialCategoryDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="materialCategoryAction" class="com.jsh.action.materials.MaterialCategoryAction" scope="prototype">
<property name="materialCategoryService" ref="materialCategoryService"/>
<property name="logService" ref="logService"/>
</bean>
<!--商品类别配置结束 -->
<!--商品配置开始 -->
<bean id="materialService" class="com.jsh.service.materials.MaterialService">
<property name="baseDao" ref="baseDao"/>
<property name="materialDao" ref="materialDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="materialAction" class="com.jsh.action.materials.MaterialAction" scope="prototype">
<property name="materialService" ref="materialService"/>
<property name="logService" ref="logService"/>
</bean>
<!--商品配置结束 -->
<!--仓管通配置开始 -->
<bean id="depotHeadService" class="com.jsh.service.materials.DepotHeadService">
<property name="baseDao" ref="baseDao"/>
<property name="depotHeadDao" ref="depotHeadDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="depotHeadAction" class="com.jsh.action.materials.DepotHeadAction" scope="prototype">
<property name="depotHeadService" ref="depotHeadService"/>
<property name="logService" ref="logService"/>
</bean>
<!--仓管通配置结束 -->
<!--仓管通明细配置开始 -->
<bean id="depotItemService" class="com.jsh.service.materials.DepotItemService">
<property name="baseDao" ref="baseDao"/>
<property name="depotItemDao" ref="depotItemDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="depotItemAction" class="com.jsh.action.materials.DepotItemAction" scope="prototype">
<property name="depotItemService" ref="depotItemService"/>
<property name="materialService" ref="materialService"/>
<property name="logService" ref="logService"/>
</bean>
<!--仓管通明细配置结束 -->
<!--结算账户配置开始 -->
<bean id="accountService" class="com.jsh.service.basic.AccountService">
<property name="baseDao" ref="baseDao"/>
<property name="accountDao" ref="accountDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="accountAction" class="com.jsh.action.basic.AccountAction" scope="prototype">
<property name="accountService" ref="accountService"/>
<property name="depotHeadService" ref="depotHeadService"/>
<property name="accountHeadService" ref="accountHeadService"/>
<property name="accountItemService" ref="accountItemService"/>
<property name="logService" ref="logService"/>
</bean>
<!--结算账户配置结束 -->
<!--收支项目配置开始 -->
<bean id="inOutItemService" class="com.jsh.service.basic.InOutItemService">
<property name="baseDao" ref="baseDao"/>
<property name="inOutItemDao" ref="inOutItemDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="inOutItemAction" class="com.jsh.action.basic.InOutItemAction" scope="prototype">
<property name="inOutItemService" ref="inOutItemService"/>
<property name="logService" ref="logService"/>
</bean>
<!--收支项目配置结束 -->
<!--账户抬头配置开始 -->
<bean id="accountHeadService" class="com.jsh.service.materials.AccountHeadService">
<property name="baseDao" ref="baseDao"/>
<property name="accountHeadDao" ref="accountHeadDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="accountHeadAction" class="com.jsh.action.materials.AccountHeadAction" scope="prototype">
<property name="accountHeadService" ref="accountHeadService"/>
<property name="logService" ref="logService"/>
</bean>
<!--账户抬头配置结束 -->
<!--账户明细配置开始 -->
<bean id="accountItemService" class="com.jsh.service.materials.AccountItemService">
<property name="baseDao" ref="baseDao"/>
<property name="accountItemDao" ref="accountItemDao"/>
</bean>
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="accountItemAction" class="com.jsh.action.materials.AccountItemAction" scope="prototype">
<property name="accountItemService" ref="accountItemService"/>
<property name="logService" ref="logService"/>
</bean>
<!--账户明细配置结束 -->
</beans>

View File

@@ -1,61 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 指定Spring配置文件的DTD信息 -->
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!-- 配置daoTemplate作为所有DAO组件的模板 -->
<bean id="daoTemplate" abstract="true">
<!-- 为DAO组件注入SessionFactory引用 -->
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<!-- 配置通用baseDao组件 -->
<bean id="baseDao" parent="daoTemplate" class="com.jsh.base.BaseDAO" scope="prototype"/>
<!-- 配置userDao组件 -->
<bean id="userDao" parent="daoTemplate" class="com.jsh.dao.basic.UserDAO"/>
<!-- 配置logDao组件 -->
<bean id="logDao" parent="daoTemplate" class="com.jsh.dao.basic.LogDAO"/>
<!-- 配置supplierDao组件 -->
<bean id="supplierDao" parent="daoTemplate" class="com.jsh.dao.basic.SupplierDAO"/>
<!-- 配置categoryDao组件 -->
<bean id="categoryDao" parent="daoTemplate" class="com.jsh.dao.basic.CategoryDAO"/>
<!-- 配置depotDao组件 -->
<bean id="depotDao" parent="daoTemplate" class="com.jsh.dao.basic.DepotDAO"/>
<!-- 配置unitDao组件 -->
<bean id="unitDao" parent="daoTemplate" class="com.jsh.dao.basic.UnitDAO"/>
<!-- 配置assetDao组件 -->
<bean id="assetNameDao" parent="daoTemplate" class="com.jsh.dao.basic.AssetNameDAO"/>
<!-- 配置assetDao组件 -->
<bean id="assetDao" parent="daoTemplate" class="com.jsh.dao.asset.AssetDAO"/>
<!-- 配置assetDao组件 -->
<bean id="reportDao" parent="daoTemplate" class="com.jsh.dao.asset.ReportDAO"/>
<!-- 配置appDao组件 -->
<bean id="appDao" parent="daoTemplate" class="com.jsh.dao.basic.AppDAO"/>
<!-- 配置roleDao组件 -->
<bean id="roleDao" parent="daoTemplate" class="com.jsh.dao.basic.RoleDAO"/>
<!-- 配置functionsDao组件 -->
<bean id="functionsDao" parent="daoTemplate" class="com.jsh.dao.basic.FunctionsDAO"/>
<!-- 配置userBusinessDao组件 -->
<bean id="userBusinessDao" parent="daoTemplate" class="com.jsh.dao.basic.UserBusinessDAO"/>
<!-- 配置personDao组件 -->
<bean id="personDao" parent="daoTemplate" class="com.jsh.dao.materials.PersonDAO"/>
<!-- 配置materialCategoryDao组件 -->
<bean id="materialCategoryDao" parent="daoTemplate" class="com.jsh.dao.materials.MaterialCategoryDAO"/>
<!-- 配置materialDao组件 -->
<bean id="materialDao" parent="daoTemplate" class="com.jsh.dao.materials.MaterialDAO"/>
<!-- 配置depotHeadDao组件 -->
<bean id="depotHeadDao" parent="daoTemplate" class="com.jsh.dao.materials.DepotHeadDAO"/>
<!-- 配置depotItemDao组件 -->
<bean id="depotItemDao" parent="daoTemplate" class="com.jsh.dao.materials.DepotItemDAO"/>
<!-- 配置accountDao组件 -->
<bean id="accountDao" parent="daoTemplate" class="com.jsh.dao.basic.AccountDAO"/>
<!-- 配置inOutItemDao组件 -->
<bean id="inOutItemDao" parent="daoTemplate" class="com.jsh.dao.basic.InOutItemDAO"/>
<!-- 配置accountHeadDao组件 -->
<bean id="accountHeadDao" parent="daoTemplate" class="com.jsh.dao.materials.AccountHeadDAO"/>
<!-- 配置accountItemDao组件 -->
<bean id="accountItemDao" parent="daoTemplate" class="com.jsh.dao.materials.AccountItemDAO"/>
<!-- 配置systemConfigDAO组件 -->
<bean id="systemConfigDAO" parent="daoTemplate" class="com.jsh.dao.basic.SystemConfigDAO"/>
<!-- 配置materialPropertyDAO组件 -->
<bean id="materialPropertyDAO" parent="daoTemplate" class="com.jsh.dao.materials.MaterialPropertyDAO"/>
</beans>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean name="reviseQuartzScheduler" lazy-init="false" autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="scanFtpMovieTrigger" />
<!-- <ref bean="scanFtpMovieTrigger2" /> -->
<!-- <ref bean="scanFtpMovieTrigger3" /> -->
<!-- <ref bean="scanFtpMovieTrigger4" /> -->
</list>
</property>
</bean>
<!-- 扫描ftp节目任务 -->
<bean id="scanFtpMovieTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail">
<ref local="scanFtpMovieJob" />
</property>
<!-- 每天22点30分执行,时间配置格式: 秒 分 时 天 月 年-->
<property name="cronExpression">
<value>0 45 9,10,11,12 * * ?</value>
</property>
</bean>
<bean id="scanFtpMovieJob"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject">
<ref bean="scanFtpMovieTask" />
</property>
<property name="targetMethod">
<value>timerTest</value>
</property>
</bean>
<bean id="scanFtpMovieTask" class="com.jsh.action.demo.ChannelAction" />
</beans>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="account" namespace="/account" extends="json-default">
<action name="*" class="accountAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="accountHead" namespace="/accountHead" extends="json-default">
<action name="*" class="accountHeadAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="accountItem" namespace="/accountItem" extends="json-default">
<action name="*" class="accountItemAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="app" namespace="/app" extends="json-default">
<action name="*" class="appAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="asset" namespace="/asset" extends="json-default">
<action name="*" class="assetAction" method="{1}">
<result type="json"/>
</action>
<!--导出资产为excel表格 -->
<action name="exportExcel" class="assetAction" method="exportExcel">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
</action>
<!--导出资产为excel表格 -->
<action name="importExcel" class="assetAction" method="importExcel">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
<result name="success">/pages/asset/asset.jsp</result>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="assetname" namespace="/assetname" extends="json-default">
<action name="*" class="assetNameAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="category" namespace="/category" extends="json-default">
<action name="*" class="categoryAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<!-- 国际化配置文件 各个模块使用","隔开 -->
<!-- <constant name="struts.custom.i18n.resources" value="config.i18n.frame_resources" /> -->
<package name="channel" namespace="/channel" extends="struts-default">
<action name="*" class="com.jsh.action.demo.ChannelAction" method="{1}">
<!-- <result type="json"></result> -->
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="depot" namespace="/depot" extends="json-default">
<action name="*" class="depotAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="depotHead" namespace="/depotHead" extends="json-default">
<action name="*" class="depotHeadAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="depotItem" namespace="/depotItem" extends="json-default">
<action name="*" class="depotItemAction" method="{1}">
<result type="json"/>
</action>
<!--导出为excel表格 -->
<action name="exportExcel" class="depotItemAction" method="exportExcel">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="functions" namespace="/functions" extends="json-default">
<action name="*" class="functionsAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="inOutItem" namespace="/inOutItem" extends="json-default">
<action name="*" class="inOutItemAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="log" namespace="/log" extends="json-default">
<action name="*" class="logAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="material" namespace="/material" extends="json-default">
<action name="*" class="materialAction" method="{1}">
<result type="json"/>
</action>
<!--导入excel表格 -->
<action name="importExcel" class="materialAction" method="importExcel">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
<result name="success">/pages/materials/material.jsp</result>
</action>
<!--导出excel表格 -->
<action name="exportExcel" class="materialAction" method="exportExcel">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="materialCategory" namespace="/materialCategory" extends="json-default">
<action name="*" class="materialCategoryAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="materialProperty" namespace="/materialProperty" extends="json-default">
<action name="*" class="materialPropertyAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="person" namespace="/person" extends="json-default">
<action name="*" class="personAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="report" namespace="/report" extends="json-default">
<action name="*" class="reportAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="role" namespace="/role" extends="json-default">
<action name="*" class="roleAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

View File

@@ -1,2 +0,0 @@
# struts.properties
#struts.custom.i18n.resources=messages

View File

@@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<constant name="struts.i18n.encoding" value="UTF-8" />
<constant name="struts.action.extension" value="action" />
<constant name="struts.serve.static.browserCache" value="false" />
<constant name="struts.configuration.xml.reload" value="true" />
<constant name="struts.multipart.saveDir" value="/temp"/>
<constant name="struts.multipart.maxSize" value="3048576000"/>
<constant name="struts.i18n.reload" value="true" />
<!-- 指定struts2应用处于开发阶段 -->
<constant name="struts.devMode" value="true" />
<constant name="struts.ui.theme" value="simple" />
<constant name="struts.objectFactory" value="spring" />
<!-- struts2框架按照如下顺序加载常量文件struts-default.xml、struts-plugin.xml、struts.xml、struts.properties、web.xml -->
<include file="struts-default.xml"></include>
<include file="struts-plugin.xml"></include>
<!-- 包含文件 -->
<include file="struts2/*-struts.xml"></include>
<!--
<constant name="struts.custom.i18n.resources" value="Performance" />
-->
<!--定义全局Result -->
<package name="default" namespace="/" extends="struts-default">
<global-results>
<result name="login">/pages/common/admin.jsp</result>
</global-results>
<action name="*">
<result>/pages/common/{1}.jsp</result>
</action>
<action name="login">
<result>/pages/common/admin.jsp</result>
</action>
</package>
</struts>

View File

@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="supplier" namespace="/supplier" extends="json-default">
<action name="*" class="supplierAction" method="{1}">
<result type="json"/>
</action>
<!--导入excel表格 -->
<action name="importExcelVendor" class="supplierAction" method="importExcelVendor">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
<result name="success">/pages/manage/vendor.jsp</result>
</action>
<!--导入excel表格 -->
<action name="importExcelCustomer" class="supplierAction" method="importExcelCustomer">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
<result name="success">/pages/manage/customer.jsp</result>
</action>
<!--导入excel表格 -->
<action name="importExcelMember" class="supplierAction" method="importExcelMember">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
<result name="success">/pages/manage/member.jsp</result>
</action>
<!--导出excel表格 -->
<action name="exportExcel" class="supplierAction" method="exportExcel">
<result name="excel" type="stream">
<param name="contentType">application/vnd.ms-excel</param>
<param name="inputName">excelStream</param>
<param name="contentDisposition">attachment;filename="${fileName}"</param>
<param name="bufferSize">1024</param>
</result>
</action>
</package>
</struts>

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<package name="systemConfig" namespace="/systemConfig" extends="json-default">
<action name="*" class="systemConfigAction" method="{1}">
<result type="json"/>
</action>
</package>
</struts>

Some files were not shown because too many files have changed in this diff Show More