feat: 药品关联关系功能
parent
fcc90167ad
commit
c5fed5f2aa
@ -0,0 +1,15 @@
|
||||
package com.glxp.udidl.admin.dao.collect;
|
||||
|
||||
import com.glxp.udidl.admin.dao.BaseMapperPlus;
|
||||
import com.glxp.udidl.admin.entity.collect.RelCodeBatch;
|
||||
import com.glxp.udidl.admin.req.collect.RelCodeBatchRequest;
|
||||
import com.glxp.udidl.admin.res.collect.RelCodeBatchResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface RelCodeBatchMapper extends BaseMapperPlus<RelCodeBatchMapper, RelCodeBatch,RelCodeBatch> {
|
||||
List<RelCodeBatchResponse> filterList(RelCodeBatchRequest relCodeBatchRequest);
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.glxp.udidl.admin.dao.collect;
|
||||
|
||||
import com.glxp.udidl.admin.dao.BaseMapperPlus;
|
||||
import com.glxp.udidl.admin.entity.collect.RelCodeDetail;
|
||||
import com.glxp.udidl.admin.req.collect.RelCodeDetailRequest;
|
||||
import com.glxp.udidl.admin.res.collect.RelCodeDetailResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface RelCodeDetailMapper extends BaseMapperPlus<RelCodeDetailMapper,RelCodeDetail,RelCodeDetail> {
|
||||
List<RelCodeDetailResponse> filterList(RelCodeDetailRequest relCodeDetailRequest);
|
||||
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package com.glxp.udidl.admin.entity.collect;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel(value="com-glxp-api-entity-collect-RelCodeBatch")
|
||||
@Data
|
||||
@TableName(value = "rel_code_batch")
|
||||
public class RelCodeBatch implements Serializable {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value="")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
@TableField(value = "productCode")
|
||||
@ApiModelProperty(value="产品编码")
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
@TableField(value = "subTypeNo")
|
||||
@ApiModelProperty(value="类型编码")
|
||||
private String subTypeNo;
|
||||
|
||||
/**
|
||||
* 包装比例
|
||||
*/
|
||||
@TableField(value = "cascadeRatio")
|
||||
@ApiModelProperty(value="包装比例")
|
||||
private String cascadeRatio;
|
||||
|
||||
/**
|
||||
* 包装规格
|
||||
*/
|
||||
@TableField(value = "packageSpec")
|
||||
@ApiModelProperty(value="包装规格")
|
||||
private String packageSpec;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value = "comment")
|
||||
@ApiModelProperty(value="备注")
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
@TableField(value = "batchNo")
|
||||
@ApiModelProperty(value="批次号")
|
||||
private String batchNo;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
@TableField(value = "madeDate")
|
||||
@ApiModelProperty(value="生产日期")
|
||||
private String madeDate;
|
||||
|
||||
/**
|
||||
* 有效期至
|
||||
*/
|
||||
@TableField(value = "validateDate")
|
||||
@ApiModelProperty(value="有效期至")
|
||||
private String validateDate;
|
||||
|
||||
/**
|
||||
* 生产车间
|
||||
*/
|
||||
@TableField(value = "workShop")
|
||||
@ApiModelProperty(value="生产车间")
|
||||
private String workShop;
|
||||
|
||||
/**
|
||||
* 生产线
|
||||
*/
|
||||
@TableField(value = "lineName")
|
||||
@ApiModelProperty(value="生产线")
|
||||
private String lineName;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@TableField(value = "lineManager")
|
||||
@ApiModelProperty(value="负责人")
|
||||
private String lineManager;
|
||||
|
||||
@TableField(value = "createTime")
|
||||
@ApiModelProperty(value = "")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "`createUser`")
|
||||
@ApiModelProperty(value = "")
|
||||
private String createUser;
|
||||
|
||||
@TableField(value = "updateTime")
|
||||
@ApiModelProperty(value = "")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "updateUser")
|
||||
@ApiModelProperty(value = "")
|
||||
private String updateUser;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.glxp.udidl.admin.entity.collect;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ApiModel(value="com-glxp-api-entity-collect-RelCodeDetail")
|
||||
@Data
|
||||
@TableName(value = "rel_code_detail")
|
||||
public class RelCodeDetail implements Serializable {
|
||||
@TableId(value = "id", type = IdType.INPUT)
|
||||
@ApiModelProperty(value="")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 当前条码
|
||||
*/
|
||||
@TableField(value = "curCode")
|
||||
@ApiModelProperty(value="当前条码")
|
||||
private String curCode;
|
||||
|
||||
/**
|
||||
* 包装级别
|
||||
*/
|
||||
@TableField(value = "packLayer")
|
||||
@ApiModelProperty(value="包装级别")
|
||||
private Integer packLayer;
|
||||
|
||||
/**
|
||||
* 父级码
|
||||
*/
|
||||
@TableField(value = "parentCode")
|
||||
@ApiModelProperty(value="父级码")
|
||||
private String parentCode;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField(value = "flag")
|
||||
@ApiModelProperty(value="状态")
|
||||
private Integer flag;
|
||||
|
||||
/**
|
||||
* 产品批次ID外键
|
||||
*/
|
||||
@TableField(value = "batchIdFk")
|
||||
@ApiModelProperty(value="产品批次ID外键")
|
||||
private Integer batchIdFk;
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
package com.glxp.udidl.admin.req.collect;
|
||||
|
||||
import com.glxp.udidl.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class RelCodeBatchRequest extends ListPageRequest {
|
||||
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private String subTypeNo;
|
||||
|
||||
/**
|
||||
* 包装比例
|
||||
*/
|
||||
private String cascadeRatio;
|
||||
|
||||
/**
|
||||
* 包装规格
|
||||
*/
|
||||
private String packageSpec;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNo;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private String madeDate;
|
||||
|
||||
/**
|
||||
* 有效期至
|
||||
*/
|
||||
private String validateDate;
|
||||
|
||||
/**
|
||||
* 生产车间
|
||||
*/
|
||||
private String workShop;
|
||||
|
||||
/**
|
||||
* 生产线
|
||||
*/
|
||||
private String lineName;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String lineManager;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private String updateUser;
|
||||
|
||||
private String keyWords;
|
||||
|
||||
private List<RelCodeDetailRequest> detailList;
|
||||
|
||||
private String code;
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.glxp.udidl.admin.req.collect;
|
||||
|
||||
import com.glxp.udidl.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RelCodeDetailRequest extends ListPageRequest {
|
||||
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 当前条码
|
||||
*/
|
||||
private String curCode;
|
||||
|
||||
/**
|
||||
* 包装级别
|
||||
*/
|
||||
private Integer packLayer;
|
||||
|
||||
/**
|
||||
* 父级码
|
||||
*/
|
||||
private String parentCode;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer flag;
|
||||
|
||||
/**
|
||||
* 产品批次ID外键
|
||||
*/
|
||||
private Integer batchIdFk;
|
||||
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String productCode;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private String subTypeNo;
|
||||
|
||||
/**
|
||||
* 包装比例
|
||||
*/
|
||||
private String cascadeRatio;
|
||||
|
||||
/**
|
||||
* 包装规格
|
||||
*/
|
||||
private String packageSpec;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNo;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private Date madeDate;
|
||||
|
||||
/**
|
||||
* 有效期至
|
||||
*/
|
||||
private Date validateDate;
|
||||
|
||||
/**
|
||||
* 生产车间
|
||||
*/
|
||||
private String workShop;
|
||||
|
||||
/**
|
||||
* 生产线
|
||||
*/
|
||||
private String lineName;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String lineManager;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private String updateUser;
|
||||
|
||||
private String keyWords;
|
||||
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
package com.glxp.udidl.admin.service.collect;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
//import com.glxp.udidl.admin.dao.basic.BasicProductsDao;
|
||||
import com.glxp.udidl.admin.dao.collect.RelCodeDetailMapper;
|
||||
//import com.glxp.udidl.admin.entity.basic.BasicProductsEntity;
|
||||
//import com.glxp.udidl.admin.entity.basic.UdiEntity;
|
||||
import com.glxp.udidl.admin.entity.collect.RelCodeDetail;
|
||||
import com.glxp.udidl.admin.exception.JsonException;
|
||||
import com.glxp.udidl.admin.req.collect.RelCodeDetailRequest;
|
||||
import com.glxp.udidl.admin.res.collect.RelCodeDetailResponse;
|
||||
//import com.glxp.udidl.admin.util.udi.FilterUdiUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class RelCodeDetailService extends ServiceImpl<RelCodeDetailMapper, RelCodeDetail> {
|
||||
|
||||
// @Resource
|
||||
// private BasicProductsDao basicProductsDao;
|
||||
|
||||
/**
|
||||
* 扫码获取关联
|
||||
* @param relCodeDetailRequest
|
||||
* @return
|
||||
*/
|
||||
// public RelCodeDetailResponse scanCode(RelCodeDetailRequest relCodeDetailRequest) {
|
||||
// String curCode = relCodeDetailRequest.getCurCode();
|
||||
// String parentCode = relCodeDetailRequest.getParentCode();
|
||||
// if(StrUtil.isBlank(curCode)){
|
||||
// throw new JsonException("追溯码不能为空");
|
||||
// }
|
||||
// if (curCode.endsWith("\u001D")) {
|
||||
// curCode = curCode.replace("\u001D", "");
|
||||
// }
|
||||
// UdiEntity curCodeUdi = FilterUdiUtils.getUdi(curCode);
|
||||
// if (curCodeUdi == null){
|
||||
// throw new JsonException("无效条码!");
|
||||
// }
|
||||
// RelCodeDetailResponse relCodeDetailResponse = new RelCodeDetailResponse();
|
||||
// LambdaQueryWrapper<BasicProductsEntity> cw = new LambdaQueryWrapper<BasicProductsEntity>()
|
||||
// .eq(BasicProductsEntity::getNameCode, curCodeUdi.getUdi())
|
||||
// .last("limit 1");
|
||||
// BasicProductsEntity cur = basicProductsDao.selectOne(cw);
|
||||
// if(cur == null){
|
||||
// throw new JsonException("产品信息不存在");
|
||||
// }
|
||||
// //是否已存在数据库中
|
||||
// List<RelCodeDetail> list = this.baseMapper.selectList(new LambdaQueryWrapper<RelCodeDetail>().eq(RelCodeDetail::getCurCode, curCode));
|
||||
// if (CollUtil.isNotEmpty(list)){
|
||||
// throw new JsonException("当前条码关联关系已被维护!");
|
||||
// }
|
||||
// if(StrUtil.isNotBlank(parentCode)){
|
||||
// if (parentCode.endsWith("\u001D")) {
|
||||
// parentCode = parentCode.replace("\u001D", "");
|
||||
// }
|
||||
// if(StrUtil.equals(curCode,parentCode)){
|
||||
// throw new JsonException("录入条码重复!");
|
||||
// }
|
||||
// UdiEntity parentCodeUdi = FilterUdiUtils.getUdi(parentCode);
|
||||
// if (parentCodeUdi == null){
|
||||
// throw new JsonException("无效父级条码!");
|
||||
// }
|
||||
// LambdaQueryWrapper<BasicProductsEntity> pw = new LambdaQueryWrapper<BasicProductsEntity>()
|
||||
// .eq(BasicProductsEntity::getNameCode, parentCodeUdi.getUdi())
|
||||
// .last("limit 1");
|
||||
// BasicProductsEntity parent = basicProductsDao.selectOne(pw);
|
||||
// if(parent == null){
|
||||
// throw new JsonException("父级产品信息不存在");
|
||||
// }
|
||||
// if(!StrUtil.equals(parent.getUuid(),cur.getUuid())){
|
||||
// throw new JsonException("当前条码不是同一产品");
|
||||
// }
|
||||
// if(Integer.valueOf(parent.getPackLevel()) - Integer.valueOf(cur.getPackLevel()) != 1){
|
||||
// throw new JsonException("当前条码不属于子条码");
|
||||
// }
|
||||
// }else {
|
||||
// parentCode = "0";
|
||||
// }
|
||||
// relCodeDetailResponse.setCurCode(curCode);
|
||||
// relCodeDetailResponse.setParentCode(parentCode);
|
||||
// relCodeDetailResponse.setPackLayer(Integer.valueOf(cur.getPackLevel()));
|
||||
// relCodeDetailResponse.setFlag(1);
|
||||
// relCodeDetailResponse.setCpmctymc(cur.getCpmctymc());
|
||||
// relCodeDetailResponse.setProductCode(cur.getNameCode());
|
||||
// relCodeDetailResponse.setBhxjsl(cur.getBhxjsl());
|
||||
// relCodeDetailResponse.setPackageSpec(cur.getBzgg());
|
||||
// relCodeDetailResponse.setCascadeRatio(cur.getPackRatio());
|
||||
// relCodeDetailResponse.setPackUnit(cur.getPackUnit());
|
||||
// return relCodeDetailResponse;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 明细列表
|
||||
* @param relCodeDetailRequest
|
||||
* @return
|
||||
*/
|
||||
public List<RelCodeDetailResponse> filterList(RelCodeDetailRequest relCodeDetailRequest) {
|
||||
if (relCodeDetailRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (relCodeDetailRequest.getPage() != null) {
|
||||
int offset = (relCodeDetailRequest.getPage() - 1) * relCodeDetailRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, relCodeDetailRequest.getLimit());
|
||||
}
|
||||
return this.baseMapper.filterList(relCodeDetailRequest);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.glxp.udidl.admin.dao.collect.RelCodeBatchMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.collect.RelCodeBatch">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table udi_wms_ywj.rel_code_batch-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="productCode" jdbcType="VARCHAR" property="productCode" />
|
||||
<result column="subTypeNo" jdbcType="VARCHAR" property="subTypeNo" />
|
||||
<result column="cascadeRatio" jdbcType="VARCHAR" property="cascadeRatio" />
|
||||
<result column="packageSpec" jdbcType="VARCHAR" property="packageSpec" />
|
||||
<result column="comment" jdbcType="VARCHAR" property="comment" />
|
||||
<result column="batchNo" jdbcType="VARCHAR" property="batchNo" />
|
||||
<result column="madeDate" jdbcType="TIMESTAMP" property="madeDate" />
|
||||
<result column="validateDate" jdbcType="TIMESTAMP" property="validateDate" />
|
||||
<result column="workShop" jdbcType="VARCHAR" property="workShop" />
|
||||
<result column="lineName" jdbcType="VARCHAR" property="lineName" />
|
||||
<result column="lineManager" jdbcType="VARCHAR" property="lineManager" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, productCode, subTypeNo, `cascadeRatio`, packageSpec, `comment`, batchNo, madeDate,
|
||||
validateDate, workShop, lineName, lineManager
|
||||
</sql>
|
||||
|
||||
<select id="filterList" parameterType="com.glxp.udidl.admin.req.collect.RelCodeBatchRequest" resultType="com.glxp.udidl.admin.res.collect.RelCodeBatchResponse">
|
||||
select
|
||||
a.id,
|
||||
a.productCode,
|
||||
a.subTypeNo,
|
||||
a.cascadeRatio,
|
||||
a.packageSpec,
|
||||
a.comment,
|
||||
a.batchNo,
|
||||
a.madeDate,
|
||||
a.validateDate,
|
||||
a.workShop,
|
||||
a.lineName,
|
||||
a.lineManager,
|
||||
bp.cpmctymc,
|
||||
bp.bhxjsl,
|
||||
bp.packLevel AS packLayer,
|
||||
bp.packUnit
|
||||
from rel_code_batch a
|
||||
LEFT JOIN basic_products bp ON bp.nameCode = a.productCode
|
||||
<where>
|
||||
<if test="productCode != '' and productCode != null">
|
||||
AND a.productCode LIKE concat('%', #{productCode}, '%')
|
||||
</if>
|
||||
<if test="batchNo != null and batchNo != ''">
|
||||
AND a.batchNo = #{batchNo}
|
||||
</if>
|
||||
<if test="keyWords != '' and keyWords != null">
|
||||
and (
|
||||
a.productCode LIKE concat('%', #{keyWords}, '%')
|
||||
or a.subTypeNo LIKE concat('%', #{keyWords}, '%')
|
||||
or a.packageSpec LIKE concat('%', #{keyWords}, '%'))
|
||||
</if>
|
||||
<if test="lineName != '' and lineName != null">
|
||||
AND a.lineName LIKE concat('%', #{lineName}, '%')
|
||||
</if>
|
||||
<if test="lineManager != '' and lineManager != null">
|
||||
AND a.lineManager LIKE concat('%', #{lineManager}, '%')
|
||||
</if>
|
||||
<if test="code != '' and code != null">
|
||||
and exists(select 1 from rel_code_detail b where a.id = b.batchIdFk and b.curCode = #{code})
|
||||
</if>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
<![CDATA[ and a.validateDate >= DATE_FORMAT(#{startDate}, '%Y-%m-%d %H:%i:%S') ]]>
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
<![CDATA[ and a.validateDate <= DATE_FORMAT(#{endDate}, '%Y-%m-%d %H:%i:%S') ]]>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,65 @@
|
||||
<?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.glxp.udidl.admin.dao.collect.RelCodeDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.collect.RelCodeDetail">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table udi_wms_ywj.rel_code_detail-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="curCode" jdbcType="VARCHAR" property="curCode" />
|
||||
<result column="packLayer" jdbcType="TINYINT" property="packLayer" />
|
||||
<result column="parentCode" jdbcType="VARCHAR" property="parentCode" />
|
||||
<result column="flag" jdbcType="TINYINT" property="flag" />
|
||||
<result column="batchIdFk" jdbcType="INTEGER" property="batchIdFk" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, curCode, packLayer, parentCode, flag, batchIdFk
|
||||
</sql>
|
||||
|
||||
<select id="filterList" parameterType="com.glxp.udidl.admin.req.collect.RelCodeDetailRequest" resultType="com.glxp.udidl.admin.res.collect.RelCodeDetailResponse">
|
||||
select
|
||||
rcd.id,
|
||||
rcd.curCode,
|
||||
rcd.packLayer,
|
||||
rcd.parentCode,
|
||||
rcd.flag,
|
||||
rcd.batchIdFk,
|
||||
rcb.productCode,
|
||||
rcb.subTypeNo,
|
||||
rcb.cascadeRatio,
|
||||
rcb.packageSpec,
|
||||
rcb.comment,
|
||||
rcb.batchNo,
|
||||
rcb.madeDate,
|
||||
rcb.validateDate,
|
||||
rcb.workShop,
|
||||
rcb.lineName,
|
||||
rcb.lineManager,
|
||||
rcb.createTime,
|
||||
rcb.createUser,
|
||||
rcb.updateTime,
|
||||
rcb.updateUser
|
||||
from rel_code_detail rcd
|
||||
left join rel_code_batch rcb on rcb.id = rcd.batchIdFk
|
||||
<where>
|
||||
<if test="productCode != '' and productCode != null">
|
||||
AND rcb.productCode LIKE concat('%', #{productCode}, '%')
|
||||
</if>
|
||||
<if test="batchNo != null and batchNo != ''">
|
||||
AND rcb.batchNo = #{batchNo}
|
||||
</if>
|
||||
<if test="keyWords != '' and keyWords != null">
|
||||
and (
|
||||
rcb.productCode LIKE concat('%', #{keyWords}, '%')
|
||||
or rcb.subTypeNo LIKE concat('%', #{keyWords}, '%')
|
||||
or rcb.packageSpec LIKE concat('%', #{keyWords}, '%'))
|
||||
</if>
|
||||
<if test="lineName != '' and lineName != null">
|
||||
AND rcb.lineName LIKE concat('%', #{lineName}, '%')
|
||||
</if>
|
||||
<if test="lineManager != '' and lineManager != null">
|
||||
AND rcb.lineManager LIKE concat('%', #{lineManager}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue