This commit is contained in:
2022-09-02 16:21:20 +08:00
parent 0fb22fa625
commit c0ce68f5b2
77 changed files with 1020 additions and 264 deletions

View File

@@ -0,0 +1,20 @@
<?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.cnbm.basic.mapper.FeaturesStageProcedureRelationMapper">
<resultMap type="com.cnbm.basic.entity.FeaturesStageProcedureRelation" id="FeaturesStageProcedureRelationMap">
<id column="id" property="id" />
<id column="product_features_id" property="productFeaturesId" />
<id column="working_procedure_id" property="workingProcedureId" />
<id column="inspection_stage" property="inspectionStage" />
<id column="remark" property="remark" />
<id column="valid" property="valid" />
<id column="creator_id" property="creatorId" />
<id column="creator_name" property="creatorName" />
<id column="create_time" property="createTime" />
<id column="updater_id" property="updaterId" />
<id column="updater_name" property="updaterName" />
<id column="update_time" property="updateTime" />
<id column="version" property="version" />
</resultMap>
</mapper>

View File

@@ -2,10 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cnbm.basic.mapper.MeasureToolMapper">
<select id="page" resultType="com.cnbm.basic.dto.ProductDTO">
select product.*,product_type.name as productType
from product
left join product_type ON product.product_type_id = product_type.id
<select id="list" resultType="com.cnbm.basic.dto.MeasureToolDTO">
select * from measure_tool
order by id asc
</select>
</mapper>

View File

@@ -3,9 +3,8 @@
<mapper namespace="com.cnbm.basic.mapper.ProductFeaturesMapper">
<select id="getProductFeaturesByProductId" resultType="com.cnbm.basic.dto.ProductFeaturesDTO">
select p.*,w.code as workingProcedureCode,w.name as workingProcedureName,m.name as measureToolName,u.name as unitName,c.name as controlGraphName
select p.*,m.name as measureToolName,u.name as unitName,c.name as controlGraphName
from product_features p
LEFT JOIN working_procedure w ON p.working_procedure_id=w.id
LEFT JOIN measure_tool m ON p.measure_tool_id=m.id
LEFT JOIN unit u ON p.unit_id=u.id
LEFT JOIN control_graph c ON p.control_graph_id=c.id
@@ -15,4 +14,19 @@
order by p.id asc
</select>
<select id="getFeaturesByStageProcedure" resultType="com.cnbm.basic.dto.ProductFeaturesDTO">
select *
from product_features pf
LEFT JOIN features_stage_procedure_relation fspr ON pf.id=fspr.product_features_id
<where>
fspr.valid = 1
<if test="inspectionStage != null">
and fspr.inspection_stage = #{inspectionStage}
</if>
<if test="workingProcedureId != null">
and fspr.working_procedure_id = #{workingProcedureId}
</if>
</where>
order by pf.id asc
</select>
</mapper>