新购接口优化

This commit is contained in:
sxu 2024-11-15 16:41:54 +08:00
parent c81bfa0a11
commit c1d1620d74
2 changed files with 11 additions and 2 deletions

View File

@ -78,4 +78,7 @@ public class PurchaseMacodeInfo extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date productionTime;
@ApiModelProperty(value = "出厂编码")
private String outFacCode;
}

View File

@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="companyId" column="company_id" />
<result property="outFacCode" column="out_fac_code" />
<result property="unitName" column="unit_name" />
<result property="typeName" column="type_name" />
<result property="maTypeName" column="ma_type_name" />
@ -26,11 +27,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPurchaseMacodeInfoVo">
select pmi.id, pmi.task_id, pmi.type_id, pmi.ma_code, pmi.qr_code, pmi.fix_code, pmi.code_type, pmi.status,
pmi.create_by, pmi.create_time, pmi.update_by, pmi.update_time, pmi.remark, pmi.company_id,
mt.type_name, mt.unit_name, mtp.type_name as ma_type_name
pmi.create_by, pmi.create_time, pmi.update_by, pmi.update_time, pmi.remark, pmi.company_id, pmi.out_fac_code,
mt.type_name, mt.unit_name, mtp.type_name as ma_type_name, pcd.production_time
from purchase_macode_info pmi
left join ma_type mt on pmi.type_id = mt.type_id
left join ma_type mtp on mt.parent_id = mtp.type_id
left join purchase_check_details pcd on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
</sql>
<select id="selectPurchaseMacodeInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" resultMap="PurchaseMacodeInfoResult">
@ -39,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="taskId != null "> and pmi.task_id = #{taskId}</if>
<if test="typeId != null "> and pmi.type_id = #{typeId}</if>
<if test="maCode != null and maCode != ''"> and pmi.ma_code = #{maCode}</if>
<if test="outFacCode != null and outFacCode != ''"> and pmi.out_fac_code = #{outFacCode}</if>
<if test="qrCode != null and qrCode != ''"> and pmi.qr_code = #{qrCode}</if>
<if test="fixCode != null and fixCode != ''"> and pmi.fix_code = #{fixCode}</if>
<if test="codeType != null and codeType != ''"> and pmi.code_type = #{codeType}</if>
@ -58,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="taskId != null">task_id,</if>
<if test="typeId != null">type_id,</if>
<if test="maCode != null">ma_code,</if>
<if test="outFacCode != null">out_fac_code,</if>
<if test="qrCode != null">qr_code,</if>
<if test="fixCode != null">fix_code,</if>
<if test="codeType != null">code_type,</if>
@ -73,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="taskId != null">#{taskId},</if>
<if test="typeId != null">#{typeId},</if>
<if test="maCode != null">#{maCode},</if>
<if test="outFacCode != null">#{outFacCode},</if>
<if test="qrCode != null">#{qrCode},</if>
<if test="fixCode != null">#{fixCode},</if>
<if test="codeType != null">#{codeType},</if>
@ -92,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="taskId != null">task_id = #{taskId},</if>
<if test="typeId != null">type_id = #{typeId},</if>
<if test="maCode != null">ma_code = #{maCode},</if>
<if test="outFacCode != null">out_fac_code = #{outFacCode},</if>
<if test="qrCode != null">qr_code = #{qrCode},</if>
<if test="fixCode != null">fix_code = #{fixCode},</if>
<if test="codeType != null">code_type = #{codeType},</if>