parent
d97f0c0b98
commit
3ed8c2657a
6 changed files with 63 additions and 2 deletions
@ -0,0 +1,43 @@ |
||||
<?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="org.springblade.lims.goods.mapper.GoodsMapper"> |
||||
|
||||
<select id="listByPnum" parameterType="org.springblade.lims.goods.entity.Goods" resultType="org.springblade.lims.goods.entity.Goods"> |
||||
SELECT |
||||
A.id,A.big_class_id AS bigClassId,A.big_class AS bigClass,A.name, |
||||
A.code,A.xh,A.rule,B.num,A.brand,A.company,A.company_id AS companyId, |
||||
A.type,A.unit,A.location,A.ccfs,A.yt,A.danger,A.warn_num AS warnNum, |
||||
A.warn_time AS warnTime,A.deactivate,A.beyond_time AS beyondTime, |
||||
B.p_num AS pNum |
||||
FROM |
||||
f_goods A |
||||
INNER JOIN |
||||
t_product_store_detial B |
||||
ON |
||||
A.id = B.goods_id |
||||
AND |
||||
B.status = 1 |
||||
<where> |
||||
<if test="goods.name != null and goods.name != ''"> |
||||
A.name like concat(concat('%',#{goods.name}),'%') |
||||
OR |
||||
A.company like concat(concat('%',#{goods.name}),'%') |
||||
OR |
||||
A.brand like concat(concat('%',#{goods.name}),'%') |
||||
OR |
||||
A.yt like concat(concat('%',#{goods.name}),'%') |
||||
</if> |
||||
|
||||
<if test="goods.bigClassId != null and goods.bigClassId != ''"> |
||||
AND |
||||
A.big_class_id = #{goods.bigClassId} |
||||
</if> |
||||
<if test="goods.location != null and goods.location != ''"> |
||||
AND |
||||
A.location = #{goods.location} |
||||
</if> |
||||
</where> |
||||
ORDER BY |
||||
A.create_time desc,B.num asc |
||||
</select> |
||||
</mapper> |
||||
@ -1,7 +1,9 @@ |
||||
package org.springblade.lims.goods.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.lims.goods.entity.Goods; |
||||
|
||||
public interface IGoodsService extends BaseService<Goods> { |
||||
IPage<Goods> listByPnum(Goods goods,IPage<Goods> page); |
||||
} |
||||
|
||||
Loading…
Reference in new issue