提交 e96dcfdb 作者: zhenjie

服务团队列表

上级 c1cad465
......@@ -30,6 +30,8 @@ public class CompanyInspectionQO implements Serializable {
private Integer inspectionId;
@ApiModelProperty(value = "作业团队id")
private Integer companyInfoId;
@ApiModelProperty(value = "标签id")
private Integer inspectionTagId;
@ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
......
......@@ -30,15 +30,17 @@
<result property="tagName" column="tag_name"/>
<result property="inspectionId" column="inspection_id"/>
</association>
<collection property="inspectionFileDOS" ofType="com.mmc.pms.entity.inspection.CompanyInspectionFileDO">
<id property="id" column="company_inspection_file_id"/>
<result property="fileType" column="file_type"/>
<result property="first" column="first"/>
<result property="companyInspectionId" column="id"/>
<result property="fileUrl" column="file_url"/>
<collection property="inspectionFileDOS" javaType="java.util.ArrayList"
select="listFileByCompanyInspectionId"
ofType="com.mmc.pms.entity.inspection.CompanyInspectionFileDO" column="{companyInspectionId=id}">
</collection>
</resultMap>
<select id="listFileByCompanyInspectionId" resultType="com.mmc.pms.entity.inspection.CompanyInspectionFileDO">
select cif.id, file_type, `first`, company_inspection_id, file_url, create_time
from company_inspection_file cif
where cif.is_deleted = 0 and cif.company_inspection_id = #{companyInspectionId} order by cif.id desc
</select>
<insert id="insert" keyProperty="id" useGeneratedKeys="true" parameterType="com.mmc.pms.entity.inspection.CompanyInspectionDO">
insert into company_inspection(company_info_id, service_area, inspection_id, inspection_tag_id, price, price_remark, inspection_price_unit_id,
......@@ -117,6 +119,7 @@
select count(*)
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
INNER JOIN inspection_tag itag ON cins.inspection_tag_id = itag.id
where cins.is_deleted = 0
<if test="keyword != null">
and ins.inspection_name = #{keyword}
......@@ -127,6 +130,9 @@
<if test="companyInfoId != null">
and cins.company_info_id = #{companyInfoId}
</if>
<if test="inspectionTagId != null">
and cins.inspection_tag_id = #{inspectionTagId}
</if>
</select>
<select id="listCompanyInspectionPage" resultMap="companyInspectionResultMap" parameterType="com.mmc.pms.model.qo.CompanyInspectionQO">
......@@ -138,7 +144,7 @@
cif.id as company_inspection_file_id, cif.file_type, cif.`first`, cif.file_url
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
INNER JOIN inspection_tag itag ON itag.inspection_id = ins.id
INNER JOIN inspection_tag itag ON cins.inspection_tag_id = itag.id
INNER JOIN company_inspection_file cif ON cif.company_inspection_id = cins.id
where cins.is_deleted = 0
<if test="keyword != null">
......@@ -150,12 +156,18 @@
<if test="companyInfoId != null">
and cins.company_info_id = #{companyInfoId}
</if>
<if test="inspectionTagId != null">
and cins.inspection_tag_id = #{inspectionTagId}
</if>
order by cins.id desc
limit #{pageNo}, #{pageSize}
</select>
<select id="countListAPPCompanyInspectionPage" resultType="java.lang.Integer">
select count(*)
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
INNER JOIN inspection_tag itag ON cins.inspection_tag_id = itag.id
where cins.is_deleted = 0 and cins.sale_state = 1
<if test="keyword != null">
and ins.inspection_name = #{keyword}
......@@ -169,6 +181,9 @@
<if test="companyInfoId != null">
and cins.company_info_id = #{companyInfoId}
</if>
<if test="inspectionTagId != null">
and cins.inspection_tag_id = #{inspectionTagId}
</if>
</select>
<select id="listAPPCompanyInspectionPage" resultMap="companyInspectionResultMap">
......@@ -180,7 +195,7 @@
cif.id as company_inspection_file_id, cif.file_type, cif.`first`, cif.file_url
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
INNER JOIN inspection_tag itag ON itag.inspection_id = ins.id
INNER JOIN inspection_tag itag ON cins.inspection_tag_id = itag.id
INNER JOIN company_inspection_file cif ON cif.company_inspection_id = cins.id
where cins.is_deleted = 0 and cins.sale_state = 1
<if test="keyword != null">
......@@ -195,5 +210,10 @@
<if test="companyInfoId != null">
and cins.company_info_id = #{companyInfoId}
</if>
<if test="inspectionTagId != null">
and cins.inspection_tag_id = #{inspectionTagId}
</if>
order by cins.id desc
limit #{pageNo}, #{pageSize}
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论