refactor(is): 将委托单位 ID 字段类型从 Long 改为 String
- 修改了 IsInspectionCommission 及其相关类中的 clientId 字段类型 - 更新了对应的 Mapper 和 XML 文件 -调整了查询条件和结果映射
This commit is contained in:
@@ -33,7 +33,7 @@ public class IsInspectionCommission extends BaseEntity {
|
||||
/**
|
||||
* 委托单位ID(外键关联客户表)
|
||||
*/
|
||||
private Long clientId;
|
||||
private String client;
|
||||
/**
|
||||
* 样品名称
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.klp.mes.is.domain.bo;
|
||||
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import liquibase.pro.packaged.S;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
@@ -33,7 +34,7 @@ public class IsInspectionCommissionBo extends BaseEntity {
|
||||
/**
|
||||
* 委托单位ID(外键关联客户表)
|
||||
*/
|
||||
private Long clientId;
|
||||
private String client;
|
||||
|
||||
/**
|
||||
* 样品名称
|
||||
|
||||
@@ -40,7 +40,7 @@ public class IsInspectionCommissionVo {
|
||||
*/
|
||||
@ExcelProperty(value = "委托单位ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "外=键关联客户表")
|
||||
private Long clientId;
|
||||
private String client;
|
||||
|
||||
/**
|
||||
* 样品名称
|
||||
|
||||
@@ -93,5 +93,12 @@ public class IsInspectionTaskVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
//commission_no
|
||||
/**
|
||||
* 关联委托单号
|
||||
*/
|
||||
@ExcelProperty(value = "关联委托单号")
|
||||
private String commissionNo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -89,4 +89,8 @@ public class IsSampleInventoryVo {
|
||||
private String remark;
|
||||
|
||||
|
||||
@ExcelProperty(value = "关联委托单号")
|
||||
private String commissionNo;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.klp.mes.is.domain.IsInspectionTask;
|
||||
import com.klp.mes.is.domain.bo.IsInspectionTaskBo;
|
||||
import com.klp.mes.is.domain.vo.IsInspectionTaskVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 检验任务表Mapper接口
|
||||
@@ -14,5 +15,5 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface IsInspectionTaskMapper extends BaseMapperPlus<IsInspectionTaskMapper, IsInspectionTask, IsInspectionTaskVo> {
|
||||
|
||||
Page<IsInspectionTaskVo> selectVoPagePlus(Page<Object> build, IsInspectionTaskBo bo);
|
||||
Page<IsInspectionTaskVo> selectVoPagePlus(@Param("page") Page<Object> build, @Param("bo") IsInspectionTaskBo bo);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.klp.mes.is.domain.IsSampleInventory;
|
||||
import com.klp.mes.is.domain.bo.IsSampleInventoryBo;
|
||||
import com.klp.mes.is.domain.vo.IsSampleInventoryVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 样品库存表Mapper接口
|
||||
@@ -14,5 +15,5 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface IsSampleInventoryMapper extends BaseMapperPlus<IsSampleInventoryMapper, IsSampleInventory, IsSampleInventoryVo> {
|
||||
|
||||
Page<IsSampleInventoryVo> selectVoPagePlus(Page<Object> build, IsSampleInventoryBo bo);
|
||||
Page<IsSampleInventoryVo> selectVoPagePlus(Page<Object> build,@Param("bo") IsSampleInventoryBo bo);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class IsInspectionCommissionServiceImpl implements IIsInspectionCommissio
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<IsInspectionCommission> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCommissionNo()), IsInspectionCommission::getCommissionNo, bo.getCommissionNo());
|
||||
lqw.eq(bo.getClientId() != null, IsInspectionCommission::getClientId, bo.getClientId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getClient()) , IsInspectionCommission::getClient, bo.getClient());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getSampleName()), IsInspectionCommission::getSampleName, bo.getSampleName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSampleType()), IsInspectionCommission::getSampleType, bo.getSampleType());
|
||||
lqw.eq(bo.getQuantity() != null, IsInspectionCommission::getQuantity, bo.getQuantity());
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<resultMap type="com.klp.mes.is.domain.IsInspectionCommission" id="IsInspectionCommissionResult">
|
||||
<result property="commissionId" column="commission_id"/>
|
||||
<result property="commissionNo" column="commission_no"/>
|
||||
<result property="clientId" column="client_id"/>
|
||||
<result property="client" column="client_id"/>
|
||||
<result property="sampleName" column="sample_name"/>
|
||||
<result property="sampleType" column="sample_type"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
|
||||
@@ -45,32 +45,32 @@
|
||||
LEFT JOIN is_inspection_commission c ON t.commission_id = c.commission_id AND c.del_flag = 0
|
||||
<where>
|
||||
t.del_flag = 0
|
||||
<if test="taskNo != null and taskNo != ''">
|
||||
AND t.task_no = #{taskNo}
|
||||
<if test="bo.taskNo != null and bo.taskNo != ''">
|
||||
AND t.task_no = #{bo.taskNo}
|
||||
</if>
|
||||
<if test="commissionId != null">
|
||||
AND t.commission_id = #{commissionId}
|
||||
<if test="bo.commissionId != null">
|
||||
AND t.commission_id = #{bo.commissionId}
|
||||
</if>
|
||||
<if test="assignedTo != null">
|
||||
AND t.assigned_to = #{assignedTo}
|
||||
<if test="bo.assignedTo != null">
|
||||
AND t.assigned_to = #{bo.assignedTo}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
AND t.start_time = #{startTime}
|
||||
<if test="bo.startTime != null">
|
||||
AND t.start_time = #{bo.startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND t.end_time = #{endTime}
|
||||
<if test="bo.endTime != null">
|
||||
AND t.end_time = #{bo.endTime}
|
||||
</if>
|
||||
<if test="result != null and result != ''">
|
||||
AND t.result = #{result}
|
||||
<if test="bo.result != null and bo.result != ''">
|
||||
AND t.result = #{bo.result}
|
||||
</if>
|
||||
<if test="conclusion != null and conclusion != ''">
|
||||
AND t.conclusion = #{conclusion}
|
||||
<if test="bo.conclusion != null and bo.conclusion != ''">
|
||||
AND t.conclusion = #{bo.conclusion}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND t.status = #{status}
|
||||
<if test="bo.status != null and bo.status != ''">
|
||||
AND t.status = #{bo.status}
|
||||
</if>
|
||||
<if test="priority != null">
|
||||
AND t.priority = #{priority}
|
||||
<if test="bo.priority != null">
|
||||
AND t.priority = #{bo.priority}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectVoPagePlus" resultType="com.klp.mes.is.domain.vo.IsSampleInventoryVo">
|
||||
SELECT
|
||||
s.sample_id,
|
||||
@@ -43,33 +44,31 @@
|
||||
LEFT JOIN is_inspection_commission c ON s.commission_id = c.commission_id AND c.del_flag = 0
|
||||
<where>
|
||||
s.del_flag = 0
|
||||
<if test="commissionId != null">
|
||||
AND s.commission_id = #{commissionId}
|
||||
<if test="bo.commissionId != null">
|
||||
AND s.commission_id = #{bo.commissionId}
|
||||
</if>
|
||||
<if test="location != null and location != ''">
|
||||
AND s.location = #{location}
|
||||
<if test="bo.location != null and bo.location != ''">
|
||||
AND s.location = #{bo.location}
|
||||
</if>
|
||||
<if test="currentQuantity != null">
|
||||
AND s.current_quantity = #{currentQuantity}
|
||||
<if test="bo.currentQuantity != null">
|
||||
AND s.current_quantity = #{bo.currentQuantity}
|
||||
</if>
|
||||
<if test="storageTime != null">
|
||||
AND s.storage_time = #{storageTime}
|
||||
<if test="bo.storageTime != null">
|
||||
AND s.storage_time = #{bo.storageTime}
|
||||
</if>
|
||||
<if test="expirationDate != null">
|
||||
AND s.expiration_date = #{expirationDate}
|
||||
<if test="bo.expirationDate != null">
|
||||
AND s.expiration_date = #{bo.expirationDate}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND s.status = #{status}
|
||||
<if test="bo.status != null and bo.status != ''">
|
||||
AND s.status = #{bo.status}
|
||||
</if>
|
||||
<if test="operatorId != null">
|
||||
AND s.operator_id = #{operatorId}
|
||||
<if test="bo.operatorId != null">
|
||||
AND s.operator_id = #{bo.operatorId}
|
||||
</if>
|
||||
<if test="lastUpdate != null">
|
||||
AND s.last_update = #{lastUpdate}
|
||||
<if test="bo.lastUpdate != null">
|
||||
AND s.last_update = #{bo.lastUpdate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user