切换到jsh的版本
This commit is contained in:
@@ -19,30 +19,7 @@ resource=src/main/resources
|
||||
web.front.baseDir=erp_web
|
||||
mybatis.type-aliases-package=com.jsh.erp.datasource.entities.*
|
||||
mybatis.mapper-locations=classpath:./mapper_xml/*.xml
|
||||
#开启sql打印
|
||||
logging.level.com.jsh.erp.datasource.mappers=DEBUG
|
||||
|
||||
#日志
|
||||
logging.config=classpath:logback-spring.xml
|
||||
logging.level.com.didispace=DEBUG
|
||||
logging.level.com.jsh.erp=debug
|
||||
#pagehelper配置
|
||||
pagehelper.helperDialect=mysql
|
||||
pagehelper.offsetAsPageNum=true
|
||||
pagehelper.rowBoundsWithCount=true
|
||||
pagehelper.pageSizeZero=true
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.params=pageNum=pageHelperStart;pageSize=pageHelperRows;
|
||||
pagehelper.supportMethodsArguments=false
|
||||
#mybatis-plus配置
|
||||
mybatis-plus.mapper-locations=classpath:./mapper_xml/*.xml
|
||||
#跳过某些方法过滤配置
|
||||
mybatis-plus.global-config.sql-parser-cache=true
|
||||
#获取管理系统信息
|
||||
manage.roleId=10
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#租户对应的角色id
|
||||
manage.roleId=10
|
||||
@@ -1,197 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
|
||||
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
|
||||
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
|
||||
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
|
||||
<configuration scan="true" scanPeriod="10 seconds">
|
||||
<configuration>
|
||||
<property name="LOG_FILE" value="${logs.home}/jshERP"/>
|
||||
<property name="LOG_PATTERN" value="%d{yyyy/MM/dd-HH:mm:ss} %-5level [%thread] %logger - %msg%n"/>
|
||||
|
||||
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
|
||||
|
||||
<contextName>logback</contextName>
|
||||
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
|
||||
<property name="log.path" value="../logs/jshERP" />
|
||||
|
||||
<!-- 彩色日志 -->
|
||||
<!-- 彩色日志依赖的渲染类 -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
|
||||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
|
||||
|
||||
<!--输出到控制台-->
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>debug</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
||||
<!-- 设置字符集 -->
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>${LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!--输出到文件-->
|
||||
|
||||
<!-- 时间滚动输出 level为 DEBUG 日志 -->
|
||||
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文件的路径及文件名 -->
|
||||
<file>${log.path}/log_debug.log</file>
|
||||
<!--日志文件输出格式-->
|
||||
<appender name="TIME_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_FILE}.log</file>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset> <!-- 设置字符集 -->
|
||||
<pattern>${LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志归档 -->
|
||||
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<maxHistory>10</maxHistory>
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录debug级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>debug</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 时间滚动输出 level为 INFO 日志 -->
|
||||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文件的路径及文件名 -->
|
||||
<file>${log.path}/log_info.log</file>
|
||||
<!--日志文件输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天日志归档路径以及格式 -->
|
||||
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录info级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>info</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 时间滚动输出 level为 WARN 日志 -->
|
||||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文件的路径及文件名 -->
|
||||
<file>${log.path}/log_warn.log</file>
|
||||
<!--日志文件输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录warn级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>warn</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 时间滚动输出 level为 ERROR 日志 -->
|
||||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文件的路径及文件名 -->
|
||||
<file>${log.path}/log_error.log</file>
|
||||
<!--日志文件输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录ERROR级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!--
|
||||
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、
|
||||
以及指定<appender>。<logger>仅有一个name属性,
|
||||
一个可选的level和一个可选的addtivity属性。
|
||||
name:用来指定受此logger约束的某一个包或者具体的某一个类。
|
||||
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
|
||||
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
|
||||
如果未设置此属性,那么当前logger将会继承上级的级别。
|
||||
addtivity:是否向上级logger传递打印信息。默认是true。
|
||||
-->
|
||||
<!--<logger name="org.springframework.web" level="info"/>-->
|
||||
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>-->
|
||||
<!--
|
||||
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
|
||||
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
|
||||
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
|
||||
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
|
||||
不能设置为INHERITED或者同义词NULL。默认是DEBUG
|
||||
可以包含零个或多个元素,标识这个appender将会添加到这个logger。
|
||||
-->
|
||||
|
||||
<!--开发环境:打印控制台
|
||||
|
||||
<springProfile name="dev">
|
||||
<logger name="com.nmys.view" level="debug"/>
|
||||
</springProfile>
|
||||
-->
|
||||
<root level="info">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
<appender-ref ref="DEBUG_FILE" />
|
||||
<appender-ref ref="INFO_FILE" />
|
||||
<appender-ref ref="WARN_FILE" />
|
||||
<appender-ref ref="ERROR_FILE" />
|
||||
<root level="ERROR">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="TIME_FILE"/>
|
||||
</root>
|
||||
|
||||
<!--生产环境:输出到文件-->
|
||||
<!--<springProfile name="pro">-->
|
||||
<!--<root level="info">-->
|
||||
<!--<appender-ref ref="CONSOLE" />-->
|
||||
<!--<appender-ref ref="DEBUG_FILE" />-->
|
||||
<!--<appender-ref ref="INFO_FILE" />-->
|
||||
<!--<appender-ref ref="ERROR_FILE" />-->
|
||||
<!--<appender-ref ref="WARN_FILE" />-->
|
||||
<!--</root>-->
|
||||
<!--</springProfile>-->
|
||||
|
||||
<logger name="com.jsh" additivity="false" level="DEBUG">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="TIME_FILE"/>
|
||||
</logger>
|
||||
</configuration>
|
||||
@@ -15,18 +15,17 @@
|
||||
left join jsh_person p on ah.HandsPersonId=p.id and ifnull(p.delete_Flag,'0') !='1'
|
||||
left join jsh_account a on ah.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="billNo != null and billNo != ''">
|
||||
<bind name="billNo" value="'%' + _parameter.billNo + '%'"/>
|
||||
and ah.BillNo like #{billNo}
|
||||
<if test="billNo != null">
|
||||
and ah.BillNo like '%${billNo}%'
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and ah.Type= #{type}
|
||||
<if test="type != null">
|
||||
and ah.Type='${type}'
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
and ah.BillTime >= #{beginTime}
|
||||
<if test="beginTime != null">
|
||||
and ah.BillTime >= '${beginTime}'
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and ah.BillTime <= #{endTime}
|
||||
<if test="endTime != null">
|
||||
and ah.BillTime <= '${endTime}'
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
order by ah.Id desc
|
||||
@@ -41,27 +40,29 @@
|
||||
COUNT(id)
|
||||
FROM jsh_accounthead
|
||||
WHERE 1=1
|
||||
<if test="billNo != null and billNo != ''">
|
||||
<bind name="billNo" value="'%' + _parameter.billNo + '%'"/>
|
||||
and BillNo like #{billNo}
|
||||
<if test="billNo != null">
|
||||
and BillNo like '%${billNo}%'
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and Type=#{type}
|
||||
<if test="type != null">
|
||||
and Type='${type}'
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
and BillTime >= #{beginTime}
|
||||
<if test="beginTime != null">
|
||||
and BillTime >= '${beginTime}'
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and BillTime <= #{endTime}
|
||||
<if test="endTime != null">
|
||||
and BillTime <= '${endTime}'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
<select id="getMaxId" resultType="java.lang.Long">
|
||||
select max(Id) as Id from jsh_accounthead
|
||||
</select>
|
||||
|
||||
<select id="findAllMoney" resultType="java.math.BigDecimal">
|
||||
select sum(#{modeName}) as allMoney from jsh_accounthead
|
||||
where Type=#{type}
|
||||
and OrganId =#{supplierId} and BillTime <![CDATA[ <=#{endTime}]]>
|
||||
select sum(${modeName}) as allMoney from jsh_accounthead
|
||||
where Type='${type}'
|
||||
and OrganId =${supplierId} and BillTime <![CDATA[ <='${endTime}']]>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -73,7 +74,7 @@
|
||||
left join jsh_account a on ah.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="billNo != null">
|
||||
and ah.BillNo = #{billNo}
|
||||
and ah.BillNo = '${billNo}'
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
</select>
|
||||
@@ -123,56 +124,4 @@
|
||||
)
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
<insert id="addAccountHead" parameterType="com.jsh.erp.datasource.entities.AccountHead"
|
||||
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into jsh_accounthead (Id, Type, OrganId,
|
||||
HandsPersonId, ChangeAmount, TotalPrice,
|
||||
AccountId, BillNo, BillTime,
|
||||
Remark, tenant_id, delete_Flag
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organid,jdbcType=BIGINT},
|
||||
#{handspersonid,jdbcType=BIGINT}, #{changeamount,jdbcType=DECIMAL}, #{totalprice,jdbcType=DECIMAL},
|
||||
#{accountid,jdbcType=BIGINT}, #{billno,jdbcType=VARCHAR}, #{billtime,jdbcType=TIMESTAMP},
|
||||
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<update id="updateAccountHead" parameterType="com.jsh.erp.datasource.entities.AccountHead">
|
||||
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=DECIMAL},
|
||||
</if>
|
||||
<if test="totalprice != null">
|
||||
TotalPrice = #{totalprice,jdbcType=DECIMAL},
|
||||
</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>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -11,16 +11,14 @@
|
||||
select *
|
||||
FROM jsh_accountitem
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type=${type}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -32,16 +30,14 @@
|
||||
COUNT(id)
|
||||
FROM jsh_accountitem
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type=${type}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
@@ -50,7 +46,7 @@
|
||||
select ai.*,a.Name AccountName,ioi.Name InOutItemName
|
||||
from jsh_accountitem ai left join jsh_account a on ai.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1'
|
||||
left join jsh_inoutitem ioi on ai.InOutItemId = ioi.id and ifnull(ioi.delete_Flag,'0') !='1'
|
||||
where ai.HeaderId = #{headerId}
|
||||
where ai.HeaderId = ${headerId}
|
||||
and ifnull(ai.delete_Flag,'0') !='1'
|
||||
order by ai.id asc
|
||||
</select>
|
||||
|
||||
@@ -19,17 +19,14 @@
|
||||
select *
|
||||
FROM jsh_account
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="serialNo != null and serialNo != ''">
|
||||
<bind name="serialNo" value="'%' + _parameter.serialNo + '%'"/>
|
||||
and SerialNo like #{serialNo}
|
||||
<if test="serialNo != null">
|
||||
and SerialNo like '%${serialNo}%'
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -42,17 +39,14 @@
|
||||
COUNT(id)
|
||||
FROM jsh_account
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="serialNo != null and serialNo != ''">
|
||||
<bind name="serialNo" value="'%' + _parameter.serialNo + '%'"/>
|
||||
and SerialNo like #{serialNo}
|
||||
<if test="serialNo != null">
|
||||
and SerialNo like '%${serialNo}%'
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
@@ -63,7 +57,7 @@
|
||||
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="accountId != null">
|
||||
and dh.AccountId=#{accountId}
|
||||
and dh.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
|
||||
@@ -73,7 +67,7 @@
|
||||
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="accountId != null">
|
||||
and ah.AccountId=#{accountId}
|
||||
and ah.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
<!--明细中涉及的账户(收款,付款,收预付款) -->
|
||||
@@ -83,7 +77,7 @@
|
||||
inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
|
||||
where ah.Type in ('收款','付款','收预付款')
|
||||
<if test="accountId != null">
|
||||
and ai.AccountId=#{accountId}
|
||||
and ai.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
<!--主表中转出的账户 -->
|
||||
@@ -92,7 +86,7 @@
|
||||
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
|
||||
where ah.Type='转账'
|
||||
<if test="accountId != null">
|
||||
and ah.AccountId=#{accountId}
|
||||
and ah.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
<!--明细中被转入的账户 -->
|
||||
@@ -101,7 +95,7 @@
|
||||
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
|
||||
where ah.Type='转账'
|
||||
<if test="accountId != null">
|
||||
and ai.AccountId=#{accountId}
|
||||
and ai.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
<!--多账户的情况 -->
|
||||
@@ -111,8 +105,7 @@
|
||||
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="accountId != null">
|
||||
<bind name="accountId" value="'%' + _parameter.accountId + '%'"/>
|
||||
and dh.AccountIdList like #{accountId}
|
||||
and dh.AccountIdList like '%${accountId}%'
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
ORDER BY oTime desc
|
||||
@@ -129,7 +122,7 @@
|
||||
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="accountId != null">
|
||||
and dh.AccountId=#{accountId}
|
||||
and dh.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
<!--主表收入和支出涉及的账户 -->
|
||||
@@ -138,7 +131,7 @@
|
||||
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="accountId != null">
|
||||
and ah.AccountId=#{accountId}
|
||||
and ah.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
<!--明细中涉及的账户(收款,付款,收预付款) -->
|
||||
@@ -148,7 +141,7 @@
|
||||
inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
|
||||
where ah.Type in ('收款','付款','收预付款')
|
||||
<if test="accountId != null">
|
||||
and ai.AccountId=#{accountId}
|
||||
and ai.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
<!--主表中转出的账户 -->
|
||||
@@ -157,7 +150,7 @@
|
||||
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
|
||||
where ah.Type='转账'
|
||||
<if test="accountId != null">
|
||||
and ah.AccountId=#{accountId}
|
||||
and ah.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
<!--明细中被转入的账户 -->
|
||||
@@ -166,7 +159,7 @@
|
||||
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1'
|
||||
where ah.Type='转账'
|
||||
<if test="accountId != null">
|
||||
and ai.AccountId=#{accountId}
|
||||
and ai.AccountId=${accountId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
<!--多账户的情况 -->
|
||||
@@ -175,8 +168,7 @@
|
||||
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="accountId != null">
|
||||
<bind name="accountId" value="'%' + _parameter.accountId + '%'"/>
|
||||
and dh.AccountIdList like #{accountId}
|
||||
and dh.AccountIdList like '%${accountId}%'
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
) cc
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByConditionDepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
|
||||
select dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName
|
||||
select distinct 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 and ifnull(d.delete_Flag,'0') !='1'
|
||||
left join jsh_supplier s on dh.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||
left join jsh_person p on dh.HandsPersonId=p.id and ifnull(p.delete_Flag,'0') !='1'
|
||||
left join jsh_account a on dh.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1'
|
||||
@@ -51,41 +52,28 @@
|
||||
left join jsh_depotitem di on dh.Id = di.HeaderId and ifnull(di.delete_Flag,'0') !='1'
|
||||
left join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="type != null and type != ''">
|
||||
and dh.Type=#{type}
|
||||
<if test="type != null">
|
||||
and dh.Type='${type}'
|
||||
</if>
|
||||
<if test="subType != null and subType != ''">
|
||||
and dh.SubType=#{subType}
|
||||
<if test="subType != null">
|
||||
and dh.SubType='${subType}'
|
||||
</if>
|
||||
<if test="number != null and number != ''">
|
||||
<bind name="number" value="'%' + _parameter.number + '%'"/>
|
||||
and dh.Number like #{number}
|
||||
<if test="number != null">
|
||||
and dh.Number like '%${number}%'
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
and dh.OperTime >= #{beginTime}
|
||||
<if test="beginTime != null">
|
||||
and dh.OperTime >= '${beginTime}'
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and dh.OperTime <= #{endTime}
|
||||
<if test="endTime != null">
|
||||
and dh.OperTime <= '${endTime}'
|
||||
</if>
|
||||
<if test="materialParam != null">
|
||||
and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%')
|
||||
</if>
|
||||
<if test="depotIds != null">
|
||||
and di.DepotId in (${depotIds})
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
and exists (
|
||||
select 0 from jsh_depotitem di
|
||||
left join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1' and di.tenant_id=m.tenant_id
|
||||
where 1=1
|
||||
and dh.Id = di.HeaderId
|
||||
and dh.tenant_id=di.tenant_id
|
||||
and ifnull(di.delete_Flag,'0') !='1'
|
||||
<if test="materialParam != null and materialParam != ''">
|
||||
<bind name="materialParam" value="'%' + _parameter.materialParam + '%'"/>
|
||||
and (m.Name like #{materialParam} or m.Model like #{materialParam})
|
||||
</if>
|
||||
<if test="depotIds != null and depotIds != ''">
|
||||
and di.DepotId in
|
||||
<foreach item="did" index="index" collection="depotIds.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
order by dh.Id desc
|
||||
<if test="offset != null and rows != null">
|
||||
limit #{offset},#{rows}
|
||||
@@ -93,48 +81,35 @@
|
||||
</select>
|
||||
<select id="countsByDepotHead" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(dh.id)
|
||||
FROM jsh_depothead dh
|
||||
left join jsh_supplier s on dh.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1'
|
||||
left join jsh_person p on dh.HandsPersonId=p.id and ifnull(p.delete_Flag,'0') !='1'
|
||||
left join jsh_account a on dh.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1'
|
||||
COUNT(1) from
|
||||
(select distinct jsh_depothead.* FROM jsh_depothead
|
||||
left join jsh_depotitem di on jsh_depothead.Id = di.HeaderId and ifnull(di.delete_Flag,'0') !='1'
|
||||
left join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1'
|
||||
WHERE 1=1
|
||||
<if test="type != null and type != ''">
|
||||
and dh.Type=#{type}
|
||||
<if test="type != null">
|
||||
and Type='${type}'
|
||||
</if>
|
||||
<if test="subType != null and subType != ''">
|
||||
and dh.SubType=#{subType}
|
||||
<if test="subType != null">
|
||||
and SubType='${subType}'
|
||||
</if>
|
||||
<if test="number != null and number != ''">
|
||||
<bind name="number" value="'%' + _parameter.number + '%'"/>
|
||||
and dh.Number like #{number}
|
||||
<if test="number != null">
|
||||
and Number like '%${number}%'
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime != ''">
|
||||
and dh.OperTime >= #{beginTime}
|
||||
<if test="beginTime != null">
|
||||
and OperTime >= '${beginTime}'
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and dh.OperTime <= #{endTime}
|
||||
<if test="endTime != null">
|
||||
and OperTime <= '${endTime}'
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
and exists (
|
||||
select 0 from jsh_depotitem di
|
||||
left join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1' and di.tenant_id=m.tenant_id
|
||||
where 1=1
|
||||
and dh.Id = di.HeaderId
|
||||
and dh.tenant_id=di.tenant_id
|
||||
and ifnull(di.delete_Flag,'0') !='1'
|
||||
<if test="materialParam != null and materialParam != ''">
|
||||
<bind name="materialParam" value="'%' + _parameter.materialParam + '%'"/>
|
||||
and (m.Name like #{materialParam} or m.Model like #{materialParam})
|
||||
<if test="materialParam != null">
|
||||
and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%')
|
||||
</if>
|
||||
<if test="depotIds != null and depotIds != ''">
|
||||
and di.DepotId in
|
||||
<foreach item="did" index="index" collection="depotIds.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="depotIds != null">
|
||||
and di.DepotId in (${depotIds})
|
||||
</if>
|
||||
)
|
||||
and ifnull(jsh_depothead.delete_Flag,'0') !='1') tb
|
||||
</select>
|
||||
|
||||
<select id="getMaxId" resultType="java.lang.Long">
|
||||
select max(Id) as Id from jsh_depothead
|
||||
</select>
|
||||
@@ -143,7 +118,7 @@
|
||||
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 and ifnull(jsh_material.delete_Flag,'0') !='1'
|
||||
where jsh_depotitem.HeaderId = #{id}
|
||||
where jsh_depotitem.HeaderId = ${id}
|
||||
and ifnull(jsh_depotitem.delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -155,21 +130,18 @@
|
||||
inner join jsh_material m on m.id=di.MaterialId and ifnull(m.delete_Flag,'0') !='1'
|
||||
inner join jsh_supplier s on s.id=dh.OrganId and ifnull(s.delete_Flag,'0') !='1'
|
||||
inner join (select id,name as dName,delete_Flag from jsh_depot ) d on d.id=di.DepotId and ifnull(d.delete_Flag,'0') !='1'
|
||||
where dh.OperTime >=#{beginTime} and dh.OperTime <=#{endTime}
|
||||
where dh.OperTime >='${beginTime}' and dh.OperTime <='${endTime}'
|
||||
<if test="oId != null">
|
||||
and dh.OrganId = #{oId}
|
||||
and dh.OrganId = ${oId}
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
and di.DepotId = #{pid}
|
||||
and di.DepotId = ${pid}
|
||||
</if>
|
||||
<if test="pid == null and dids != null and dids != ''">
|
||||
and di.DepotId in
|
||||
<foreach item="did" index="index" collection="dids.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="pid == null">
|
||||
and di.DepotId in (${dids})
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and dh.Type=#{type}
|
||||
<if test="type != null">
|
||||
and dh.Type='${type}'
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
ORDER BY OperTime DESC,Number desc
|
||||
@@ -185,21 +157,18 @@
|
||||
inner join jsh_material m on m.id=di.MaterialId and ifnull(m.delete_Flag,'0') !='1'
|
||||
inner join jsh_supplier s on s.id=dh.OrganId and ifnull(s.delete_Flag,'0') !='1'
|
||||
inner join (select id,name as dName,delete_Flag from jsh_depot) d on d.id=di.DepotId and ifnull(d.delete_Flag,'0') !='1'
|
||||
where dh.OperTime >=#{beginTime} and dh.OperTime <=#{endTime}
|
||||
where dh.OperTime >='${beginTime}' and dh.OperTime <='${endTime}'
|
||||
<if test="oId != null">
|
||||
and dh.OrganId = #{oId}
|
||||
and dh.OrganId = ${oId}
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
and di.DepotId = #{pid}
|
||||
and di.DepotId = ${pid}
|
||||
</if>
|
||||
<if test="pid == null and dids != null and dids != ''">
|
||||
and di.DepotId in
|
||||
<foreach item="did" index="index" collection="dids.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="pid == null">
|
||||
and di.DepotId in (${dids})
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and dh.Type=#{type}
|
||||
<if test="type != null">
|
||||
and dh.Type='${type}'
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
ORDER BY OperTime DESC,Number desc
|
||||
@@ -211,18 +180,15 @@
|
||||
(select sum(jdi.BasicNumber) numSum from jsh_depothead jdh
|
||||
INNER JOIN jsh_depotitem jdi on jdh.id=jdi.HeaderId and ifnull(jdi.delete_Flag,'0') !='1'
|
||||
where jdi.MaterialId=di.MaterialId
|
||||
and jdh.type=#{type} and jdh.OperTime >=#{beginTime} and jdh.OperTime <=#{endTime}
|
||||
and jdh.type='${type}' and jdh.OperTime >='${beginTime}' and jdh.OperTime <='${endTime}'
|
||||
<if test="oId != null">
|
||||
and jdh.OrganId = #{oId}
|
||||
and jdh.OrganId = ${oId}
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
and jdi.DepotId= #{pid}
|
||||
and jdi.DepotId= ${pid}
|
||||
</if>
|
||||
<if test="pid == null and dids != null and dids != ''">
|
||||
and jdi.DepotId in
|
||||
<foreach item="did" index="index" collection="dids.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="pid == null">
|
||||
and jdi.DepotId in (${dids})
|
||||
</if>
|
||||
and ifnull(jdh.delete_Flag,'0') !='1'
|
||||
) numSum,
|
||||
@@ -230,18 +196,15 @@
|
||||
(select sum(jdi.AllPrice) priceSum from jsh_depothead jdh
|
||||
INNER JOIN jsh_depotitem jdi on jdh.id=jdi.HeaderId and ifnull(jdi.delete_Flag,'0') !='1'
|
||||
where jdi.MaterialId=di.MaterialId
|
||||
and jdh.type=#{type} and jdh.OperTime >=#{beginTime} and jdh.OperTime <=#{endTime}
|
||||
and jdh.type='${type}' and jdh.OperTime >='${beginTime}' and jdh.OperTime <='${endTime}'
|
||||
<if test="oId != null">
|
||||
and jdh.OrganId = #{oId}
|
||||
and jdh.OrganId = ${oId}
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
and jdi.DepotId= #{pid}
|
||||
and jdi.DepotId= ${pid}
|
||||
</if>
|
||||
<if test="pid == null and dids != null and dids != ''">
|
||||
and jdi.DepotId in
|
||||
<foreach item="did" index="index" collection="dids.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="pid == null">
|
||||
and jdi.DepotId in (${dids})
|
||||
</if>
|
||||
and ifnull(jdh.delete_Flag,'0') !='1'
|
||||
) priceSum
|
||||
@@ -252,18 +215,15 @@
|
||||
LEFT JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id and ifnull(jsh_materialcategory.status,'0') !='2'
|
||||
where ifnull(jsh_material.delete_Flag,'0') !='1'
|
||||
) m
|
||||
on m.Id=di.MaterialId where dh.type=#{type} and dh.OperTime >=#{beginTime} and dh.OperTime <=#{endTime}
|
||||
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime <='${endTime}'
|
||||
<if test="oId != null">
|
||||
and dh.OrganId = #{oId}
|
||||
and dh.OrganId = ${oId}
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
and di.DepotId= #{pid}
|
||||
and di.DepotId= ${pid}
|
||||
</if>
|
||||
<if test="pid == null and dids != null and dids != ''">
|
||||
and di.DepotId in
|
||||
<foreach item="did" index="index" collection="dids.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="pid == null">
|
||||
and di.DepotId in (${dids})
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName
|
||||
@@ -280,18 +240,15 @@
|
||||
from jsh_material
|
||||
LEFT JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id and ifnull(jsh_materialcategory.status,'0') !='2'
|
||||
where ifnull(jsh_material.delete_Flag,'0') !='1'
|
||||
) m on m.Id=di.MaterialId where dh.type=#{type} and dh.OperTime >=#{beginTime} and dh.OperTime <=#{endTime}
|
||||
) m on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime <='${endTime}'
|
||||
<if test="oId != null">
|
||||
and dh.OrganId = #{oId}
|
||||
and dh.OrganId = ${oId}
|
||||
</if>
|
||||
<if test="pid != null">
|
||||
and di.DepotId= #{pid}
|
||||
and di.DepotId= ${pid}
|
||||
</if>
|
||||
<if test="pid == null and dids != null and dids != ''">
|
||||
and di.DepotId in
|
||||
<foreach item="did" index="index" collection="dids.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="pid == null">
|
||||
and di.DepotId in (${dids})
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName) a
|
||||
@@ -301,20 +258,20 @@
|
||||
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 and ifnull(s.delete_Flag,'0') !='1'
|
||||
where s.type=#{supType} and (dh.SubType!='其它' and dh.SubType!='采购订单' and dh.SubType!='销售订单')
|
||||
and dh.OperTime >=#{beginTime} and dh.OperTime <=#{endTime}
|
||||
where s.type='${supType}' and (dh.SubType!='其它' and dh.SubType!='采购订单' and dh.SubType!='销售订单')
|
||||
and dh.OperTime >='${beginTime}' and dh.OperTime <='${endTime}'
|
||||
<if test="organId != null">
|
||||
and dh.OrganId=#{organId}
|
||||
and dh.OrganId=${organId}
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
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 and ifnull(s.delete_Flag,'0') !='1'
|
||||
where s.type=#{supType}
|
||||
and ah.BillTime >=#{beginTime} and ah.BillTime <=#{endTime}
|
||||
where s.type='${supType}'
|
||||
and ah.BillTime >='${beginTime}' and ah.BillTime <='${endTime}'
|
||||
<if test="organId != null">
|
||||
and ah.OrganId=#{organId}
|
||||
and ah.OrganId=${organId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
ORDER BY oTime
|
||||
@@ -328,27 +285,27 @@
|
||||
(
|
||||
select count(1) a from jsh_depothead dh
|
||||
inner join jsh_supplier s on s.id=dh.OrganId and ifnull(s.delete_Flag,'0') !='1'
|
||||
where s.type=#{supType} and (dh.SubType!='其它' and dh.SubType!='采购订单' and dh.SubType!='销售订单')
|
||||
and dh.OperTime >=#{beginTime} and dh.OperTime <=#{endTime}
|
||||
where s.type='${supType}' and (dh.SubType!='其它' and dh.SubType!='采购订单' and dh.SubType!='销售订单')
|
||||
and dh.OperTime >='${beginTime}' and dh.OperTime <='${endTime}'
|
||||
<if test="organId != null">
|
||||
and dh.OrganId=#{organId}
|
||||
and dh.OrganId=${organId}
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
UNION ALL
|
||||
select count(1) a from jsh_accounthead ah
|
||||
inner join jsh_supplier s on s.id=ah.OrganId and ifnull(s.delete_Flag,'0') !='1'
|
||||
where s.type=#{supType}
|
||||
and ah.BillTime >=#{beginTime} and ah.BillTime <=#{endTime}
|
||||
where s.type='${supType}'
|
||||
and ah.BillTime >='${beginTime}' and ah.BillTime <='${endTime}'
|
||||
<if test="organId != null">
|
||||
and ah.OrganId=#{organId}
|
||||
and ah.OrganId=${organId}
|
||||
</if>
|
||||
and ifnull(ah.delete_Flag,'0') !='1'
|
||||
) cc
|
||||
</select>
|
||||
|
||||
<select id="findAllMoney" resultType="java.math.BigDecimal">
|
||||
select sum(#{modeName}) as allMoney from jsh_depothead where Type=#{type} and SubType = #{subType}
|
||||
and OrganId =#{supplierId} and OperTime <=#{endTime}
|
||||
select sum(${modeName}) as allMoney from jsh_depothead where Type='${type}' and SubType = '${subType}'
|
||||
and OrganId =${supplierId} and OperTime <='${endTime}'
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -362,7 +319,7 @@
|
||||
left join jsh_depot dd on dh.AllocationProjectId=dd.id and ifnull(dd.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="number != null">
|
||||
and dh.Number=#{number}
|
||||
and dh.Number='${number}'
|
||||
</if>
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
</select>
|
||||
@@ -477,8 +434,13 @@
|
||||
</set>
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="updateBuildOnlyNumber">
|
||||
update tbl_sequence set current_val = current_val + 1 where seq_name = 'depot_number_seq'
|
||||
</update>
|
||||
|
||||
<select id="getBuildOnlyNumber" resultType="java.lang.Long">
|
||||
select _nextval(#{seq_name}) from dual;
|
||||
select current_val from tbl_sequence where seq_name = 'depot_number_seq'
|
||||
</select>
|
||||
|
||||
<update id="batchDeleteDepotHeadByIds">
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
<result column="newType" jdbcType="VARCHAR" property="newtype" />
|
||||
<result column="b_num" jdbcType="BIGINT" property="bnum" />
|
||||
<result column="oTime" jdbcType="TIMESTAMP" property="otime" />
|
||||
<result column="depotName" jdbcType="VARCHAR" property="depotName" />
|
||||
<result column="depotInName" jdbcType="VARCHAR" property="depotInName" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap extends="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap" id="ResultAndMaterialMap" type="com.jsh.erp.datasource.entities.DepotItemVo4Material">
|
||||
@@ -65,16 +63,14 @@
|
||||
select *
|
||||
FROM jsh_depotitem
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type=${type}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -87,32 +83,20 @@
|
||||
COUNT(id)
|
||||
FROM jsh_depotitem
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type=${type}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</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 dh.type='入库' then ifnull(di.BasicNumber,0)
|
||||
when dh.type='出库' and dh.SubType!='调拨' then 0 - ifnull(di.BasicNumber,0)
|
||||
when dh.SubType='组装单' and di.MType='组合件' then ifnull(di.BasicNumber,0)
|
||||
when dh.SubType='组装单' and di.MType='普通子件' then 0-ifnull(di.BasicNumber,0)
|
||||
when dh.SubType='拆卸单' and di.MType='普通子件' then ifnull(di.BasicNumber,0)
|
||||
when dh.SubType='拆卸单' and di.MType='组合件' then 0-ifnull(di.BasicNumber,0)
|
||||
when dh.SubType='调拨' then 0-ifnull(di.BasicNumber,0)
|
||||
else 0 end as b_num,
|
||||
date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime,
|
||||
depot.name as depotName,depotIn.name as depotInName
|
||||
case
|
||||
when type='入库' then ifnull(di.BasicNumber,0)
|
||||
when type='出库' then 0-di.BasicNumber
|
||||
@@ -126,11 +110,6 @@
|
||||
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 and ifnull(di.delete_Flag,'0') !='1'
|
||||
left join jsh_depot depot on depot.id=di.depotId and ifnull(depot.delete_Flag,'0') !='1'
|
||||
left join jsh_depot depotIn on depotIn.id=di.AnotherDepotId and ifnull(depotIn.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
and dh.SubType not in('采购订单','销售订单')
|
||||
and di.MaterialId =#{mId}
|
||||
where ((dh.type!='其它' and dh.SubType!='调拨')
|
||||
or (dh.type='其它' and dh.SubType='组装单')
|
||||
or (dh.type='其它' and dh.SubType='拆卸单'))
|
||||
@@ -146,28 +125,12 @@
|
||||
select count(1)
|
||||
from jsh_depothead dh
|
||||
INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1'
|
||||
left join jsh_depot depot on depot.id=di.depotId and ifnull(depot.delete_Flag,'0') !='1'
|
||||
left join jsh_depot depotIn on depotIn.id=di.AnotherDepotId and ifnull(depotIn.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
and dh.SubType not in('采购订单','销售订单')
|
||||
and di.MaterialId =#{mId}
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
</select>
|
||||
<select id="findByTypeAndDepotIdAndMaterialIdIn" 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 and ifnull(di.delete_Flag,'0') !='1'
|
||||
where dh.type='入库'
|
||||
and di.MaterialId = #{mId} and di.DepotId = #{depotId}
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
</select>
|
||||
<select id="findByTypeAndDepotIdAndMaterialIdOut" 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 and ifnull(di.delete_Flag,'0') !='1'
|
||||
where dh.type='出库'
|
||||
where dh.type!='其它'
|
||||
and dh.SubType!='调拨'
|
||||
and di.MaterialId = #{mId} and di.DepotId = #{depotId}
|
||||
and di.MaterialId =${mId}
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
</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,
|
||||
@@ -177,31 +140,26 @@
|
||||
left join jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left join jsh_depot dp1 on di.DepotId=dp1.id and ifnull(dp1.delete_Flag,'0') !='1'
|
||||
left join jsh_depot dp2 on di.AnotherDepotId=dp2.id and ifnull(dp2.delete_Flag,'0') !='1'
|
||||
where di.HeaderId = #{headerId}
|
||||
where di.HeaderId = ${headerId}
|
||||
and ifnull(di.delete_Flag,'0') !='1'
|
||||
order by di.id asc
|
||||
</select>
|
||||
|
||||
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
|
||||
select m.id MId, m.Name MName, m.Model MModel, m.Unit MaterialUnit, m.Color MColor
|
||||
select m.id MId, m.Name MName, m.Model MModel, m.Unit MaterialUnit, m.Color MColor,
|
||||
m.PresetPriceOne, m.PriceStrategy, u.UName UName
|
||||
from jsh_depotitem di
|
||||
inner join jsh_material m on di.MaterialId=m.id and ifnull(m.delete_Flag,'0') !='1'
|
||||
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="headIds != null and headIds != ''">
|
||||
and di.HeaderId in
|
||||
<foreach item="headId" index="index" collection="headIds.split(',')" open="(" separator="," close=")">
|
||||
#{headId}
|
||||
</foreach>
|
||||
<if test="headIds != null">
|
||||
and di.HeaderId in (${headIds})
|
||||
</if>
|
||||
<if test="materialIds != null and materialIds != ''">
|
||||
and di.MaterialId in
|
||||
<foreach item="materialId" index="index" collection="materialIds.split(',')" open="(" separator="," close=")">
|
||||
#{materialId}
|
||||
</foreach>
|
||||
<if test="materialIds != null">
|
||||
and di.MaterialId in (${materialIds})
|
||||
</if>
|
||||
and ifnull(di.delete_Flag,'0') !='1'
|
||||
group by m.id,m.Name, m.Model, m.Unit, m.Color
|
||||
group by m.id,m.Name, m.Model, m.Unit, m.Color, m.PresetPriceOne, m.PriceStrategy, u.UName
|
||||
<if test="offset != null and rows != null">
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
@@ -212,17 +170,11 @@
|
||||
from jsh_depotitem di
|
||||
inner join jsh_material m on di.MaterialId=m.id and ifnull(m.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
<if test="headIds != null and headIds != ''">
|
||||
and di.HeaderId in
|
||||
<foreach item="headId" index="index" collection="headIds.split(',')" open="(" separator="," close=")">
|
||||
#{headId}
|
||||
</foreach>
|
||||
<if test="headIds != null">
|
||||
and di.HeaderId in (${headIds})
|
||||
</if>
|
||||
<if test="materialIds != null and materialIds != ''">
|
||||
and di.MaterialId in
|
||||
<foreach item="materialId" index="index" collection="materialIds.split(',')" open="(" separator="," close=")">
|
||||
#{materialId}
|
||||
</foreach>
|
||||
<if test="materialIds != null">
|
||||
and di.MaterialId in (${materialIds})
|
||||
</if>
|
||||
and ifnull(di.delete_Flag,'0') !='1'
|
||||
group by m.id) cc
|
||||
@@ -242,14 +194,10 @@
|
||||
<select id="buyOrSalePrice" resultType="java.math.BigDecimal">
|
||||
select ifnull(sum(AllPrice),0) as AllPrice from jsh_depotitem di,jsh_depothead dh
|
||||
where di.HeaderId = dh.id
|
||||
and dh.type=#{type} and dh.subType=#{subType}
|
||||
and di.MaterialId =#{MId}
|
||||
<if test="MonthTime != null and MonthTime != ''">
|
||||
<bind name="MonthTimeStart" value="_parameter.MonthTime + '-01 00:00:00'"/>
|
||||
and dh.OperTime >= #{MonthTimeStart}
|
||||
<bind name="MonthTimeEnd" value="_parameter.MonthTime + '-31 23:59:59'"/>
|
||||
and dh.OperTime <= #{MonthTimeEnd}
|
||||
</if>
|
||||
and dh.type='${type}' and dh.subType='${subType}'
|
||||
and di.MaterialId =${MId}
|
||||
and dh.OperTime >= '${MonthTime}-01 00:00:00'
|
||||
and dh.OperTime <= '${MonthTime}-31 23:59:59'
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
and ifnull(di.delete_Flag,'0') !='1'
|
||||
</select>
|
||||
@@ -407,7 +355,7 @@
|
||||
WHERE
|
||||
dh.type = '入库'
|
||||
<if test="pid != null">
|
||||
and di.DepotId= #{pid}
|
||||
and di.DepotId= ${pid}
|
||||
</if>
|
||||
AND ifnull(dh.delete_Flag, '0') != '1' group by di.MaterialId
|
||||
) intype ON intype.MaterialId = m.id
|
||||
@@ -423,7 +371,7 @@
|
||||
dh.type = '出库'
|
||||
AND dh.SubType != '调拨'
|
||||
<if test="pid != null">
|
||||
and di.DepotId= #{pid}
|
||||
and di.DepotId= ${pid}
|
||||
</if>
|
||||
AND ifnull(dh.delete_Flag, '0') != '1' group by di.MaterialId
|
||||
) outtype ON outtype.MaterialId = m.id
|
||||
@@ -452,7 +400,7 @@
|
||||
WHERE
|
||||
dh.type = '入库'
|
||||
<if test="pid != null">
|
||||
and di.DepotId= #{pid}
|
||||
and di.DepotId= ${pid}
|
||||
</if>
|
||||
AND ifnull(dh.delete_Flag, '0') != '1' group by di.MaterialId
|
||||
) intype ON intype.MaterialId = m.id
|
||||
@@ -462,28 +410,6 @@
|
||||
AND ifnull(m.delete_Flag, '0') != '1'
|
||||
AND intype.BasicInNumber > 0
|
||||
</select>
|
||||
<select id="getCurrentRepByMaterialIdAndDepotId" resultType="java.math.BigDecimal">
|
||||
select ((curep.inTotal+curep.transfInTotal+curep.assemInTotal+curep.disAssemInTotal)
|
||||
-(curep.transfOutTotal+curep.outTotal+curep.assemOutTotal+curep.disAssemOutTotal)) as currentRepo
|
||||
from
|
||||
(select sum(if(dh.type='入库' <if test="depotId != null">and di.DepotId=#{depotId}</if>, di.BasicNumber,0)) as inTotal,
|
||||
sum(if(dh.SubType='调拨' <if test="depotId != null">and di.AnotherDepotId=#{depotId}</if>,di.BasicNumber,0)) as transfInTotal,
|
||||
sum(if(dh.SubType='调拨' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as transfOutTotal,
|
||||
sum(if(dh.type='出库' and dh.SubType!='调拨' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as outTotal,
|
||||
sum(if(dh.SubType='组装单' and di.MType='组合件' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as assemInTotal,
|
||||
sum(if(dh.SubType='组装单' and di.MType='普通子件' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as assemOutTotal,
|
||||
sum(if(dh.SubType='拆卸单' and di.MType='普通子件' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as disAssemInTotal,
|
||||
sum(if(dh.SubType='拆卸单' and di.MType='组合件' <if test="depotId != null"> and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as disAssemOutTotal
|
||||
from
|
||||
jsh_depothead dh,jsh_depotitem di
|
||||
where 1=1
|
||||
and dh.id=di.HeaderId
|
||||
and dh.tenant_id=#{tenantId}
|
||||
and di.tenant_id=#{tenantId}
|
||||
and di.MaterialId=#{materialId}
|
||||
and ifnull(dh.delete_Flag,'0') !='1'
|
||||
and ifnull(di.delete_Flag,'0') !='1') as curep
|
||||
</select>
|
||||
|
||||
<select id="getFinishNumber" resultType="java.math.BigDecimal">
|
||||
select sum(BasicNumber) from jsh_depotitem
|
||||
|
||||
@@ -9,16 +9,14 @@
|
||||
select *
|
||||
FROM jsh_depot
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type=${type}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
order by sort asc
|
||||
@@ -31,16 +29,14 @@
|
||||
COUNT(id)
|
||||
FROM jsh_depot
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type=${type}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<result column="PushBtn" jdbcType="VARCHAR" property="pushbtn" />
|
||||
<result column="icon" jdbcType="VARCHAR" property="icon" />
|
||||
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
@@ -91,8 +90,7 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
Id, Number, Name, PNumber, URL, State, Sort, Enabled, Type, PushBtn, icon,delete_Flag,
|
||||
tenant_id
|
||||
Id, Number, Name, PNumber, URL, State, Sort, Enabled, Type, PushBtn, icon, delete_Flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
@@ -148,11 +146,11 @@
|
||||
insert into jsh_functions (Id, Number, Name,
|
||||
PNumber, URL, State, Sort,
|
||||
Enabled, Type, PushBtn,
|
||||
delete_Flag, icon,tenant_id)
|
||||
icon, delete_Flag)
|
||||
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},
|
||||
#{icon,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
|
||||
#{enabled,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{pushbtn,jdbcType=VARCHAR},
|
||||
#{icon,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Functions">
|
||||
<!--
|
||||
@@ -197,9 +195,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -238,9 +233,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
#{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultType="java.lang.Integer">
|
||||
@@ -296,9 +288,6 @@
|
||||
<if test="record.deleteFlag != null">
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@@ -320,7 +309,6 @@
|
||||
Enabled = #{record.enabled,jdbcType=BIT},
|
||||
Type = #{record.type,jdbcType=VARCHAR},
|
||||
PushBtn = #{record.pushbtn,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT}
|
||||
icon = #{record.icon,jdbcType=VARCHAR},
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
@@ -367,9 +355,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -388,7 +373,6 @@
|
||||
Enabled = #{enabled,jdbcType=BIT},
|
||||
Type = #{type,jdbcType=VARCHAR},
|
||||
PushBtn = #{pushbtn,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT}
|
||||
icon = #{icon,jdbcType=VARCHAR},
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
|
||||
@@ -5,12 +5,11 @@
|
||||
select *
|
||||
FROM jsh_functions
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
order by sort asc
|
||||
@@ -23,12 +22,11 @@
|
||||
COUNT(id)
|
||||
FROM jsh_functions
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -5,16 +5,14 @@
|
||||
select *
|
||||
FROM jsh_inoutitem
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -26,16 +24,14 @@
|
||||
COUNT(id)
|
||||
FROM jsh_inoutitem
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'"/>
|
||||
and remark like #{remark}
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -10,29 +10,26 @@
|
||||
FROM jsh_log l
|
||||
left join jsh_user u on l.userID = u.id and ifnull(u.status,'0') not in('1','2')
|
||||
where 1=1
|
||||
<if test="operation != null and operation != ''">
|
||||
<bind name="operation" value="'%' + _parameter.operation + '%'"/>
|
||||
and l.operation like #{operation}
|
||||
<if test="operation != null">
|
||||
and l.operation like '%${operation}%'
|
||||
</if>
|
||||
<if test="usernameID != null">
|
||||
and l.userID=#{usernameID}
|
||||
and l.userID=${usernameID}
|
||||
</if>
|
||||
<if test="clientIp != null and clientIp != ''">
|
||||
<bind name="clientIp" value="'%' + _parameter.clientIp + '%'"/>
|
||||
and l.clientIp like #{clientIp}
|
||||
<if test="clientIp != null">
|
||||
and l.clientIp like '%${clientIp}%'
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and l.status=#{status}
|
||||
and l.status=${status}
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
and l.createtime >= #{beginTime}
|
||||
and l.createtime >= '${beginTime}'
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and l.createtime <= #{endTime}
|
||||
and l.createtime <= '${endTime}'
|
||||
</if>
|
||||
<if test="contentdetails != null and contentdetails != ''">
|
||||
<bind name="contentdetails" value="'%' + _parameter.contentdetails + '%'"/>
|
||||
and l.contentdetails like #{contentdetails}
|
||||
<if test="contentdetails != null">
|
||||
and l.contentdetails like '%${contentdetails}%'
|
||||
</if>
|
||||
order by l.createtime desc
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -44,29 +41,26 @@
|
||||
COUNT(id)
|
||||
FROM jsh_log
|
||||
WHERE 1=1
|
||||
<if test="operation != null and operation != ''">
|
||||
<bind name="operation" value="'%' + _parameter.operation + '%'"/>
|
||||
and operation like #{operation}
|
||||
<if test="operation != null">
|
||||
and operation like '%${operation}%'
|
||||
</if>
|
||||
<if test="usernameID != null">
|
||||
and userID=#{usernameID}
|
||||
and userID=${usernameID}
|
||||
</if>
|
||||
<if test="clientIp != null and clientIp != ''">
|
||||
<bind name="clientIp" value="'%' + _parameter.clientIp + '%'"/>
|
||||
and clientIp like #{clientIp}
|
||||
<if test="clientIp != null">
|
||||
and clientIp like '%${clientIp}%'
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
and status = ${status}
|
||||
</if>
|
||||
<if test="beginTime != null"><![CDATA[
|
||||
and createtime >= #{beginTime}
|
||||
and createtime >= '${beginTime}'
|
||||
]]></if>
|
||||
<if test="endTime != null"><![CDATA[
|
||||
and createtime <= #{endTime}
|
||||
and createtime <= '${endTime}'
|
||||
]]></if>
|
||||
<if test="contentdetails != null and contentdetails != ''">
|
||||
<bind name="contentdetails" value="'%' + _parameter.contentdetails + '%'"/>
|
||||
and contentdetails like #{contentdetails}
|
||||
<if test="contentdetails != null">
|
||||
and contentdetails like '%${contentdetails}%'
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -6,12 +6,11 @@
|
||||
FROM jsh_materialcategory
|
||||
where 1=1
|
||||
and ifnull(status,'0') !='2'
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
and parentId = #{parentId}
|
||||
and parentId = ${parentId}
|
||||
</if>
|
||||
and Id !=1
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -24,12 +23,11 @@
|
||||
FROM jsh_materialcategory
|
||||
WHERE 1=1
|
||||
and ifnull(status,'0') !='2'
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
and parentId = #{parentId}
|
||||
and parentId = ${parentId}
|
||||
</if>
|
||||
and Id !=1
|
||||
</select>
|
||||
|
||||
@@ -16,19 +16,14 @@
|
||||
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and m.name like #{name}
|
||||
<if test="name != null">
|
||||
and m.name like '%${name}%'
|
||||
</if>
|
||||
<if test="model != null and model != ''">
|
||||
<bind name="model" value="'%' + _parameter.model + '%'"/>
|
||||
and m.model like #{model}
|
||||
<if test="model != null">
|
||||
and m.model like '%${model}%'
|
||||
</if>
|
||||
<if test="categoryIds != null and categoryIds != ''">
|
||||
and m.CategoryId in
|
||||
<foreach item="did" index="index" collection="categoryIds.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="categoryIds != null">
|
||||
and m.CategoryId in (${categoryIds})
|
||||
</if>
|
||||
and ifnull(m.delete_Flag,'0') !='1'
|
||||
order by m.id desc
|
||||
@@ -44,19 +39,14 @@
|
||||
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and m.name like #{name}
|
||||
<if test="name != null">
|
||||
and m.name like '%${name}%'
|
||||
</if>
|
||||
<if test="model != null and model != ''">
|
||||
<bind name="model" value="'%' + _parameter.model + '%'"/>
|
||||
and m.model like #{model}
|
||||
<if test="model != null">
|
||||
and m.model like '%${model}%'
|
||||
</if>
|
||||
<if test="categoryIds != null and categoryIds != ''">
|
||||
and m.CategoryId in
|
||||
<foreach item="did" index="index" collection="categoryIds.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="categoryIds != null">
|
||||
and m.CategoryId in (${categoryIds})
|
||||
</if>
|
||||
and ifnull(m.delete_Flag,'0') !='1'
|
||||
</select>
|
||||
@@ -64,14 +54,14 @@
|
||||
<select id="findUnitName" resultType="java.lang.String">
|
||||
select u.UName from jsh_unit u
|
||||
left join jsh_material m on m.UnitId=u.id and ifnull(m.delete_Flag,'0') !='1'
|
||||
where m.id = #{mId}
|
||||
where m.id = ${mId}
|
||||
and ifnull(u.delete_Flag,'0') !='1'
|
||||
</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 and ifnull(u.delete_Flag,'0') !='1'
|
||||
where m.id = #{id}
|
||||
where m.id = ${id}
|
||||
and ifnull(m.delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -106,19 +96,14 @@
|
||||
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and m.name like #{name}
|
||||
<if test="name != null">
|
||||
and m.name like '%${name}%'
|
||||
</if>
|
||||
<if test="model != null and model != ''">
|
||||
<bind name="model" value="'%' + _parameter.model + '%'"/>
|
||||
and m.model like #{model}
|
||||
<if test="model != null">
|
||||
and m.model like '%${model}%'
|
||||
</if>
|
||||
<if test="categoryIds != null and categoryIds != ''">
|
||||
and m.CategoryId in
|
||||
<foreach item="did" index="index" collection="categoryIds.split(',')" open="(" separator="," close=")">
|
||||
#{did}
|
||||
</foreach>
|
||||
<if test="categoryIds != null">
|
||||
and m.CategoryId in (${categoryIds})
|
||||
</if>
|
||||
and ifnull(m.delete_Flag,'0') !='1'
|
||||
order by m.id desc
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
<result column="sort" jdbcType="VARCHAR" property="sort" />
|
||||
<result column="anotherName" jdbcType="VARCHAR" property="anothername" />
|
||||
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
@@ -85,7 +84,7 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
id, nativeName, enabled, sort, anotherName, delete_Flag, tenant_id
|
||||
id, nativeName, enabled, sort, anotherName, delete_Flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
@@ -139,11 +138,11 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into jsh_materialproperty (id, nativeName, enabled,
|
||||
sort, anotherName, delete_Flag,
|
||||
tenant_id)
|
||||
sort, anotherName, delete_Flag
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{nativename,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
|
||||
#{sort,jdbcType=VARCHAR}, #{anothername,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR},
|
||||
#{tenantId,jdbcType=BIGINT})
|
||||
#{sort,jdbcType=VARCHAR}, #{anothername,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
|
||||
<!--
|
||||
@@ -170,9 +169,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -193,9 +189,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
#{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultType="java.lang.Integer">
|
||||
@@ -233,9 +226,6 @@
|
||||
<if test="record.deleteFlag != null">
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@@ -252,8 +242,7 @@
|
||||
enabled = #{record.enabled,jdbcType=BIT},
|
||||
sort = #{record.sort,jdbcType=VARCHAR},
|
||||
anotherName = #{record.anothername,jdbcType=VARCHAR},
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT}
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -280,9 +269,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -296,8 +282,7 @@
|
||||
enabled = #{enabled,jdbcType=BIT},
|
||||
sort = #{sort,jdbcType=VARCHAR},
|
||||
anotherName = #{anothername,jdbcType=VARCHAR},
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT}
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -5,9 +5,8 @@
|
||||
select *
|
||||
FROM jsh_materialproperty
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="nativeName" value="'%' + _parameter.name + '%'"/>
|
||||
and nativeName like #{nativeName}
|
||||
<if test="name != null">
|
||||
and nativeName like '%${name}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -19,9 +18,8 @@
|
||||
COUNT(id)
|
||||
FROM jsh_materialproperty
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="nativeName" value="'%' + _parameter.name + '%'"/>
|
||||
and nativeName like #{nativeName}
|
||||
<if test="name != null">
|
||||
and nativeName like '%${name}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -5,12 +5,11 @@
|
||||
select *
|
||||
FROM jsh_person
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -22,12 +21,11 @@
|
||||
COUNT(id)
|
||||
FROM jsh_person
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
FROM jsh_role
|
||||
WHERE 1=1
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
<if test="offset != null and rows != null">
|
||||
limit #{offset},#{rows}
|
||||
@@ -20,9 +19,8 @@
|
||||
FROM jsh_role
|
||||
WHERE 1=1
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
</if>
|
||||
</select>
|
||||
<update id="batchDeleteRoleByIds">
|
||||
@@ -35,14 +33,4 @@
|
||||
</foreach>
|
||||
)
|
||||
</update>
|
||||
<select id="getRoleList" resultMap="com.jsh.erp.datasource.mappers.RoleMapper.BaseResultMap">
|
||||
SELECT *
|
||||
FROM jsh_role
|
||||
WHERE 1=1
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and name like #{name}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -5,24 +5,20 @@
|
||||
select *
|
||||
FROM jsh_supplier
|
||||
where 1=1
|
||||
<if test="supplier != null and supplier != ''">
|
||||
<bind name="supplier" value="'%' + _parameter.supplier + '%'"/>
|
||||
and supplier like #{supplier}
|
||||
<if test="supplier != null">
|
||||
and supplier like '%${supplier}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
<if test="phonenum != null and phonenum != ''">
|
||||
<bind name="phonenum" value="'%' + _parameter.phonenum + '%'"/>
|
||||
and phonenum like #{phonenum}
|
||||
<if test="phonenum != null">
|
||||
and phonenum like '%${phonenum}%'
|
||||
</if>
|
||||
<if test="telephone != null and telephone != ''">
|
||||
<bind name="telephone" value="'%' + _parameter.telephone + '%'"/>
|
||||
and telephone like #{telephone}
|
||||
<if test="telephone != null">
|
||||
and telephone like '%${telephone}%'
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
<bind name="description" value="'%' + _parameter.description + '%'"/>
|
||||
and description like #{description}
|
||||
<if test="description != null">
|
||||
and description like '%${description}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
order by id desc
|
||||
@@ -35,24 +31,20 @@
|
||||
COUNT(id)
|
||||
FROM jsh_supplier
|
||||
WHERE 1=1
|
||||
<if test="supplier != null and supplier != ''">
|
||||
<bind name="supplier" value="'%' + _parameter.supplier + '%'"/>
|
||||
and supplier like #{supplier}
|
||||
<if test="supplier != null">
|
||||
and supplier like '%${supplier}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
<if test="phonenum != null and phonenum != ''">
|
||||
<bind name="phonenum" value="'%' + _parameter.phonenum + '%'"/>
|
||||
and phonenum like #{phonenum}
|
||||
<if test="phonenum != null">
|
||||
and phonenum like '%${phonenum}%'
|
||||
</if>
|
||||
<if test="telephone != null and telephone != ''">
|
||||
<bind name="telephone" value="'%' + _parameter.telephone + '%'"/>
|
||||
and telephone like #{telephone}
|
||||
<if test="telephone != null">
|
||||
and telephone like '%${telephone}%'
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
<bind name="description" value="'%' + _parameter.description + '%'"/>
|
||||
and description like #{description}
|
||||
<if test="description != null">
|
||||
and description like '%${description}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
@@ -61,24 +53,20 @@
|
||||
select *
|
||||
FROM jsh_supplier
|
||||
where 1=1
|
||||
<if test="supplier != null and supplier != ''">
|
||||
<bind name="supplier" value="'%' + _parameter.supplier + '%'"/>
|
||||
and supplier like #{supplier}
|
||||
<if test="supplier != null">
|
||||
and supplier like '%${supplier}%'
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
and type='${type}'
|
||||
</if>
|
||||
<if test="phonenum != null and phonenum != ''">
|
||||
<bind name="phonenum" value="'%' + _parameter.phonenum + '%'"/>
|
||||
and phonenum like #{phonenum}
|
||||
<if test="phonenum != null">
|
||||
and phonenum like '%${phonenum}%'
|
||||
</if>
|
||||
<if test="telephone != null and telephone != ''">
|
||||
<bind name="telephone" value="'%' + _parameter.telephone + '%'"/>
|
||||
and telephone like #{telephone}
|
||||
<if test="telephone != null">
|
||||
and telephone like '%${telephone}%'
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
<bind name="description" value="'%' + _parameter.description + '%'"/>
|
||||
and description like #{description}
|
||||
<if test="description != null">
|
||||
and description like '%${description}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
select *
|
||||
FROM jsh_systemconfig
|
||||
where 1=1
|
||||
<if test="companyName != null and companyName != ''">
|
||||
<bind name="companyName" value="'%' + _parameter.companyName + '%'"/>
|
||||
and company_name like #{companyName}
|
||||
<if test="companyName != null">
|
||||
and company_name like '%${companyName}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -19,9 +18,8 @@
|
||||
COUNT(id)
|
||||
FROM jsh_systemconfig
|
||||
WHERE 1=1
|
||||
<if test="companyName != null and companyName != ''">
|
||||
<bind name="companyName" value="'%' + _parameter.companyName + '%'"/>
|
||||
and company_name like #{companyName}
|
||||
<if test="companyName != null">
|
||||
and company_name like '%${companyName}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -1,288 +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.TenantMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<id column="id" property="id" jdbcType="BIGINT" />
|
||||
<result column="tenant_id" property="tenantId" jdbcType="BIGINT" />
|
||||
<result column="login_name" property="loginName" jdbcType="VARCHAR" />
|
||||
<result column="user_num_limit" property="userNumLimit" jdbcType="INTEGER" />
|
||||
<result column="bills_num_limit" property="billsNumLimit" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
</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="(" suffix=")" prefixOverrides="and" >
|
||||
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<id column="id" property="id" jdbcType="BIGINT" />
|
||||
<result column="tenant_id" property="tenantId" jdbcType="BIGINT" />
|
||||
<result column="login_name" property="loginName" jdbcType="VARCHAR" />
|
||||
<result column="user_num_limit" property="userNumLimit" jdbcType="INTEGER" />
|
||||
<result column="bills_num_limit" property="billsNumLimit" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
</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="(" suffix=")" prefixOverrides="and" >
|
||||
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</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="(" suffix=")" prefixOverrides="and" >
|
||||
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</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="(" suffix=")" prefixOverrides="and" >
|
||||
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
id, tenant_id, login_name, user_num_limit, bills_num_limit, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.jsh.erp.datasource.entities.TenantExample" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</trim>
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from jsh_tenant
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from jsh_tenant
|
||||
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_tenant
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.TenantExample" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from jsh_tenant
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into jsh_tenant (id, tenant_id, login_name,
|
||||
user_num_limit, bills_num_limit, create_time
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{loginName,jdbcType=VARCHAR},
|
||||
#{userNumLimit,jdbcType=INTEGER}, #{billsNumLimit,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into jsh_tenant
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="tenantId != null" >
|
||||
tenant_id,
|
||||
</if>
|
||||
<if test="loginName != null" >
|
||||
login_name,
|
||||
</if>
|
||||
<if test="userNumLimit != null" >
|
||||
user_num_limit,
|
||||
</if>
|
||||
<if test="billsNumLimit != null" >
|
||||
bills_num_limit,
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="tenantId != null" >
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="loginName != null" >
|
||||
#{loginName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userNumLimit != null" >
|
||||
#{userNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="billsNumLimit != null" >
|
||||
#{billsNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.TenantExample" resultType="java.lang.Integer" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select count(*) from jsh_tenant
|
||||
<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_tenant
|
||||
<set >
|
||||
<if test="record.id != null" >
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.tenantId != null" >
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.loginName != null" >
|
||||
login_name = #{record.loginName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.userNumLimit != null" >
|
||||
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.billsNumLimit != null" >
|
||||
bills_num_limit = #{record.billsNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createTime != null" >
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</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_tenant
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
id, tenant_id, login_name, user_num_limit, bills_num_limit, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.jsh.erp.datasource.entities.TenantExample" >
|
||||
<!--
|
||||
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_tenant
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from jsh_tenant
|
||||
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_tenant
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.TenantExample" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from jsh_tenant
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into jsh_tenant (id, tenant_id, login_name,
|
||||
user_num_limit, bills_num_limit, create_time
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{loginName,jdbcType=VARCHAR},
|
||||
#{userNumLimit,jdbcType=INTEGER}, #{billsNumLimit,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into jsh_tenant
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="tenantId != null" >
|
||||
tenant_id,
|
||||
</if>
|
||||
<if test="loginName != null" >
|
||||
login_name,
|
||||
</if>
|
||||
<if test="userNumLimit != null" >
|
||||
user_num_limit,
|
||||
</if>
|
||||
<if test="billsNumLimit != null" >
|
||||
bills_num_limit,
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="tenantId != null" >
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="loginName != null" >
|
||||
#{loginName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userNumLimit != null" >
|
||||
#{userNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="billsNumLimit != null" >
|
||||
#{billsNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.TenantExample" resultType="java.lang.Integer" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select count(*) from jsh_tenant
|
||||
<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_tenant
|
||||
<set >
|
||||
<if test="record.id != null" >
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.tenantId != null" >
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.loginName != null" >
|
||||
login_name = #{record.loginName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.userNumLimit != null" >
|
||||
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.billsNumLimit != null" >
|
||||
bills_num_limit = #{record.billsNumLimit,jdbcType=INTEGER},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update jsh_tenant
|
||||
<set >
|
||||
<if test="tenantId != null" >
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="loginName != null" >
|
||||
login_name = #{loginName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userNumLimit != null" >
|
||||
user_num_limit = #{userNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="billsNumLimit != null" >
|
||||
bills_num_limit = #{billsNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update jsh_tenant
|
||||
set tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null" >
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</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_tenant
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
login_name = #{record.loginName,jdbcType=VARCHAR},
|
||||
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
|
||||
bills_num_limit = #{record.billsNumLimit,jdbcType=INTEGER},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update jsh_tenant
|
||||
<set >
|
||||
<if test="tenantId != null" >
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="loginName != null" >
|
||||
login_name = #{loginName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userNumLimit != null" >
|
||||
user_num_limit = #{userNumLimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="billsNumLimit != null" >
|
||||
bills_num_limit = #{billsNumLimit,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Tenant" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update jsh_tenant
|
||||
set tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
login_name = #{loginName,jdbcType=VARCHAR},
|
||||
user_num_limit = #{userNumLimit,jdbcType=INTEGER},
|
||||
bills_num_limit = #{billsNumLimit,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -5,9 +5,8 @@
|
||||
select *
|
||||
FROM jsh_unit
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and UName like #{name}
|
||||
<if test="name != null">
|
||||
and UName like '%${name}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -19,9 +18,8 @@
|
||||
COUNT(id)
|
||||
FROM jsh_unit
|
||||
WHERE 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'"/>
|
||||
and UName like #{name}
|
||||
<if test="name != null">
|
||||
and UName like '%${name}%'
|
||||
</if>
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
<result column="Value" jdbcType="VARCHAR" property="value" />
|
||||
<result column="BtnStr" jdbcType="VARCHAR" property="btnstr" />
|
||||
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
@@ -85,7 +84,7 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
Id, Type, KeyId, Value, BtnStr, delete_Flag, tenant_id
|
||||
Id, Type, KeyId, Value, BtnStr, delete_Flag
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
@@ -139,11 +138,11 @@
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into jsh_userbusiness (Id, Type, KeyId,
|
||||
Value, BtnStr, delete_Flag,
|
||||
tenant_id)
|
||||
Value, BtnStr, delete_Flag
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyid,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=VARCHAR}, #{btnstr,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR},
|
||||
#{tenantId,jdbcType=BIGINT})
|
||||
#{value,jdbcType=VARCHAR}, #{btnstr,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
|
||||
<!--
|
||||
@@ -170,9 +169,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -193,9 +189,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
#{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultType="java.lang.Integer">
|
||||
@@ -233,9 +226,6 @@
|
||||
<if test="record.deleteFlag != null">
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@@ -252,8 +242,7 @@
|
||||
KeyId = #{record.keyid,jdbcType=VARCHAR},
|
||||
Value = #{record.value,jdbcType=VARCHAR},
|
||||
BtnStr = #{record.btnstr,jdbcType=VARCHAR},
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT}
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -280,9 +269,6 @@
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -296,8 +282,7 @@
|
||||
KeyId = #{keyid,jdbcType=VARCHAR},
|
||||
Value = #{value,jdbcType=VARCHAR},
|
||||
BtnStr = #{btnstr,jdbcType=VARCHAR},
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT}
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,26 +1,22 @@
|
||||
<?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.UserMapperEx">
|
||||
<resultMap extends="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap" id="ResultMapEx"
|
||||
type="com.jsh.erp.datasource.entities.UserEx">
|
||||
<result column="orgaId" jdbcType="BIGINT" property="orgaId"/>
|
||||
<result column="org_abr" jdbcType="VARCHAR" property="orgAbr"/>
|
||||
<result column="user_blng_orga_dspl_seq" jdbcType="VARCHAR" property="userBlngOrgaDsplSeq"/>
|
||||
<result column="orgaUserRelId" jdbcType="BIGINT" property="orgaUserRelId"/>
|
||||
<resultMap extends="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.UserEx">
|
||||
<result column="orgaId" jdbcType="BIGINT" property="orgaId" />
|
||||
<result column="org_abr" jdbcType="VARCHAR" property="orgAbr" />
|
||||
<result column="user_blng_orga_dspl_seq" jdbcType="VARCHAR" property="userBlngOrgaDsplSeq" />
|
||||
<result column="orgaUserRelId" jdbcType="BIGINT" property="orgaUserRelId" />
|
||||
</resultMap>
|
||||
<select id="selectByConditionUser" parameterType="com.jsh.erp.datasource.entities.UserExample"
|
||||
resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
|
||||
<select id="selectByConditionUser" parameterType="com.jsh.erp.datasource.entities.UserExample" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
|
||||
select *
|
||||
FROM jsh_user
|
||||
where 1=1
|
||||
and ifnull(status,'0') not in('1','2')
|
||||
<if test="userName != null and userName != ''">
|
||||
<bind name="userName" value="'%' + _parameter.userName + '%'"/>
|
||||
and username like #{userName}
|
||||
<if test="userName != null">
|
||||
and username like '%${userName}%'
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
<bind name="loginName" value="'%' + _parameter.loginName + '%'"/>
|
||||
and loginame like #{loginName}
|
||||
<if test="loginName != null">
|
||||
and loginame like '%${loginName}%'
|
||||
</if>
|
||||
<if test="offset != null and rows != null">
|
||||
limit #{offset},#{rows}
|
||||
@@ -32,37 +28,34 @@
|
||||
FROM jsh_user
|
||||
WHERE 1=1
|
||||
and ifnull(status,'0') not in('1','2')
|
||||
<if test="userName != null and userName != ''">
|
||||
<bind name="userName" value="'%' + _parameter.userName + '%'"/>
|
||||
and username like #{userName}
|
||||
<if test="userName != null">
|
||||
and username like '%${userName}%'
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
<bind name="loginName" value="'%' + _parameter.loginName + '%'"/>
|
||||
and loginame like #{loginName}
|
||||
<if test="loginName != null">
|
||||
and loginame like '%${loginName}%'
|
||||
</if>
|
||||
</select>
|
||||
<select id="getUserList" parameterType="java.util.Map" resultMap="ResultMapEx">
|
||||
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
|
||||
user.description, user.remark,user.isystem,org.id as
|
||||
orgaId,user.tenant_id,org.org_abr,rel.user_blng_orga_dspl_seq,
|
||||
user.description, user.remark,user.isystem,org.id as orgaId,user.tenant_id,org.org_abr,rel.user_blng_orga_dspl_seq,
|
||||
rel.id as orgaUserRelId
|
||||
FROM jsh_user user
|
||||
left join jsh_orga_user_rel rel on user.id=rel.user_id and ifnull(rel.delete_flag,'0') !='1'
|
||||
left join jsh_organization org on rel.orga_id=org.id and ifnull(org.org_stcd,'0') !='5'
|
||||
left join jsh_organization org on rel.orga_id=org.id and ifnull(org.org_stcd,'0') !='5'
|
||||
where 1=1
|
||||
and ifnull(user.status,'0') not in('1','2')
|
||||
<if test="userName != null and userName != ''">
|
||||
<bind name="userName" value="'%' + _parameter.userName + '%'"/>
|
||||
<bind name="userName" value="'%' + _parameter.userName + '%'" />
|
||||
and user.userName like #{userName}
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
<bind name="loginName" value="'%' + _parameter.loginName + '%'"/>
|
||||
<bind name="loginName" value="'%' + _parameter.loginName + '%'" />
|
||||
and user.loginName like #{loginName}
|
||||
</if>
|
||||
order by user.id desc
|
||||
</select>
|
||||
<insert id="addUser" parameterType="com.jsh.erp.datasource.entities.UserEx"
|
||||
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into jsh_user (username, loginame,
|
||||
password, position,
|
||||
email, phonenum, ismanager,
|
||||
@@ -116,12 +109,15 @@
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="getUserListByLoginName" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
|
||||
<select id="getUserListByUserNameOrLoginName" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
|
||||
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
|
||||
user.description, user.remark,user.isystem,user.tenant_id
|
||||
user.description, user.remark,user.isystem
|
||||
FROM jsh_user user
|
||||
where 1=1
|
||||
and ifnull(user.status,'0') not in('1','2')
|
||||
<if test="userName != null and userName != ''">
|
||||
and user.userName = #{userName}
|
||||
</if>
|
||||
<if test="loginame != null and loginame != ''">
|
||||
and user.loginame = #{loginame}
|
||||
</if>
|
||||
@@ -188,42 +184,4 @@
|
||||
and ifnull(org_stcd,'0') !='5'
|
||||
order by sort asc
|
||||
</select>
|
||||
<select id="getUserListByUserNameAndTenantId" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
|
||||
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
|
||||
user.description, user.remark,user.isystem
|
||||
FROM jsh_user user
|
||||
where 1=1
|
||||
and ifnull(user.status,'0') not in('1','2')
|
||||
<if test="userName != null and userName != ''">
|
||||
and user.userName = #{userName}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="tenantId != null">
|
||||
and user.tenant_id = #{tenantId}
|
||||
</when>
|
||||
<otherwise>
|
||||
AND user.tenant_id is null
|
||||
</otherwise>
|
||||
</choose>
|
||||
order by user.id desc
|
||||
</select>
|
||||
<select id="addRegisterUserNotInclueUser" resultType="java.lang.String">
|
||||
select registerUserTemplate(#{userId},#{tenantId},#{roleId}) from dual;
|
||||
</select>
|
||||
<select id="getUserListByloginNameAndPassword" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
|
||||
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
|
||||
user.description, user.remark,user.isystem,user.tenant_id
|
||||
FROM jsh_user user
|
||||
where 1=1
|
||||
and ifnull(user.status,'0') not in('1','2')
|
||||
<if test="loginame != null and loginame != ''">
|
||||
and user.loginame = #{loginame}
|
||||
</if>
|
||||
<if test="password != null and password != ''">
|
||||
and user.password = #{password}
|
||||
</if>
|
||||
order by user.id desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user