新购接口优化
This commit is contained in:
parent
6181dc542c
commit
c81bfa0a11
|
|
@ -1,11 +1,14 @@
|
||||||
package com.bonus.material.purchase.domain;
|
package com.bonus.material.purchase.domain;
|
||||||
|
|
||||||
import com.bonus.common.core.annotation.Excel;
|
import com.bonus.common.core.annotation.Excel;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购验收编号管理对象 purchase_macode_info
|
* 新购验收编号管理对象 purchase_macode_info
|
||||||
*
|
*
|
||||||
|
|
@ -61,5 +64,18 @@ public class PurchaseMacodeInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "数据所属组织")
|
@ApiModelProperty(value = "数据所属组织")
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "物资单位名称")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "规格名称")
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "物资名称--规格parent类型")
|
||||||
|
private String maTypeName;
|
||||||
|
|
||||||
|
/** 出厂日期 */
|
||||||
|
@ApiModelProperty(value = "出厂日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date productionTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,31 +18,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="companyId" column="company_id" />
|
<result property="companyId" column="company_id" />
|
||||||
|
<result property="unitName" column="unit_name" />
|
||||||
|
<result property="typeName" column="type_name" />
|
||||||
|
<result property="maTypeName" column="ma_type_name" />
|
||||||
|
<result property="productionTime" column="production_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPurchaseMacodeInfoVo">
|
<sql id="selectPurchaseMacodeInfoVo">
|
||||||
select id, task_id, type_id, ma_code, qr_code, fix_code, code_type, status,
|
select pmi.id, pmi.task_id, pmi.type_id, pmi.ma_code, pmi.qr_code, pmi.fix_code, pmi.code_type, pmi.status,
|
||||||
create_by, create_time, update_by, update_time, remark, company_id
|
pmi.create_by, pmi.create_time, pmi.update_by, pmi.update_time, pmi.remark, pmi.company_id,
|
||||||
from purchase_macode_info
|
mt.type_name, mt.unit_name, mtp.type_name as ma_type_name
|
||||||
|
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
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPurchaseMacodeInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" resultMap="PurchaseMacodeInfoResult">
|
<select id="selectPurchaseMacodeInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" resultMap="PurchaseMacodeInfoResult">
|
||||||
<include refid="selectPurchaseMacodeInfoVo"/>
|
<include refid="selectPurchaseMacodeInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
<if test="taskId != null "> and pmi.task_id = #{taskId}</if>
|
||||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
<if test="typeId != null "> and pmi.type_id = #{typeId}</if>
|
||||||
<if test="maCode != null and maCode != ''"> and ma_code = #{maCode}</if>
|
<if test="maCode != null and maCode != ''"> and pmi.ma_code = #{maCode}</if>
|
||||||
<if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if>
|
<if test="qrCode != null and qrCode != ''"> and pmi.qr_code = #{qrCode}</if>
|
||||||
<if test="fixCode != null and fixCode != ''"> and fix_code = #{fixCode}</if>
|
<if test="fixCode != null and fixCode != ''"> and pmi.fix_code = #{fixCode}</if>
|
||||||
<if test="codeType != null and codeType != ''"> and code_type = #{codeType}</if>
|
<if test="codeType != null and codeType != ''"> and pmi.code_type = #{codeType}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and pmi.status = #{status}</if>
|
||||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
<if test="companyId != null "> and pmi.company_id = #{companyId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPurchaseMacodeInfoById" parameterType="Long" resultMap="PurchaseMacodeInfoResult">
|
<select id="selectPurchaseMacodeInfoById" parameterType="Long" resultMap="PurchaseMacodeInfoResult">
|
||||||
<include refid="selectPurchaseMacodeInfoVo"/>
|
<include refid="selectPurchaseMacodeInfoVo"/>
|
||||||
where id = #{id}
|
where pmi.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertPurchaseMacodeInfo" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertPurchaseMacodeInfo" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue