This commit is contained in:
parent
9b4e0ce504
commit
6460f63eec
|
|
@ -152,4 +152,7 @@ public class BmAgreementInfo extends BaseEntity
|
||||||
|
|
||||||
@ApiModelProperty(value = "班组id")
|
@ApiModelProperty(value = "班组id")
|
||||||
private Long teamId;
|
private Long teamId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所属项目部名称")
|
||||||
|
private String projectUnitName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,11 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectBmAgreementInfoByAgreementId" parameterType="Long" resultMap="BmAgreementInfoResult">
|
<select id="selectBmAgreementInfoByAgreementId" parameterType="Long" resultMap="BmAgreementInfoResult">
|
||||||
SELECT bai.agreement_id, bai.agreement_code , contract_code,sign_time,
|
SELECT bai.agreement_id, bai.agreement_code , contract_code,sign_time,
|
||||||
bu.unit_id, bai.project_unit_id, bu.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
|
bu.unit_id, bai.project_unit_id,bu2.unit_name as projectUnitName, bu.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
|
||||||
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol,tta.task_id,bai.branch_project as branchProIdsStr
|
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol,tta.task_id,bai.branch_project as branchProIdsStr
|
||||||
FROM bm_agreement_info bai
|
FROM bm_agreement_info bai
|
||||||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||||
LEFT JOIN bm_unit bu ON bu.unit_id = bai.unit_id
|
LEFT JOIN bm_unit bu ON bu.unit_id = bai.unit_id
|
||||||
|
LEFT JOIN bm_unit bu2 on bu2.unit_id=bai.project_unit_id
|
||||||
LEFT JOIN (select MIN(task_id) as task_id,agreement_id from tm_task_agreement
|
LEFT JOIN (select MIN(task_id) as task_id,agreement_id from tm_task_agreement
|
||||||
where agreement_id = #{agreementId}) tta on bai.agreement_id = tta.agreement_id
|
where agreement_id = #{agreementId}) tta on bai.agreement_id = tta.agreement_id
|
||||||
where bai.status = '1' and bai.agreement_id = #{agreementId}
|
where bai.status = '1' and bai.agreement_id = #{agreementId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue