update code
parent
b899f57109
commit
f2dce819a3
|
@ -380,3 +380,12 @@ FROM
|
||||||
(SELECT project_id,money AS paidAmount FROM sur_project_cost_output WHERE cost_type=4) c,
|
(SELECT project_id,money AS paidAmount FROM sur_project_cost_output WHERE cost_type=4) c,
|
||||||
(SELECT project_id,money AS onAccountAmount FROM sur_project_cost_output WHERE cost_type=5) d
|
(SELECT project_id,money AS onAccountAmount FROM sur_project_cost_output WHERE cost_type=5) d
|
||||||
WHERE a.project_id=b.project_id AND a.project_id=c.project_id AND a.project_id=d.project_id) o ON p.id=o.project_id
|
WHERE a.project_id=b.project_id AND a.project_id=c.project_id AND a.project_id=d.project_id) o ON p.id=o.project_id
|
||||||
|
|
||||||
|
|
||||||
|
广联达分组信息中有重复的companyId,companyTypeId因此写view来解决
|
||||||
|
CREATE VIEW vw_sur_project_attendance_group
|
||||||
|
AS
|
||||||
|
SELECT * FROM sur_project_attendance_group WHERE id IN (
|
||||||
|
SELECT MIN(id) FROM sur_project_attendance_group GROUP BY companyId,companyTypeId)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select * FROM
|
select * FROM
|
||||||
(
|
(
|
||||||
select a.*,b.project_id,b.sub_dept_id,c.companyTypeId
|
select a.*,b.project_id,b.sub_dept_id,c.companyTypeId
|
||||||
from sur_project_attendance_data a,sur_project_attendance_cfg b,sur_project_attendance_group c
|
from sur_project_attendance_data a,sur_project_attendance_cfg b,vw_sur_project_attendance_group c
|
||||||
where a.cfgid=b.id and a.companyId=c.companyId
|
where a.cfgid=b.id and a.companyId=c.companyId
|
||||||
)
|
)
|
||||||
sur_project_attendance_data
|
sur_project_attendance_data
|
||||||
|
|
|
@ -36,7 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSurProjectAttendanceGroupVo">
|
<sql id="selectSurProjectAttendanceGroupVo">
|
||||||
select id, cfgid, serverid, bizLicense, companyCode, companyId, companyName, companyTypeId, vendorId, name, leaderName, leaderPhone, teamId, teamName, type, leaderId, deleted, createTime, platformGroupId, platformTeamId, enterDate, exitDate, remark, is_del, create_by, create_time, update_by, update_time from sur_project_attendance_group
|
select id, cfgid, serverid, bizLicense, companyCode, companyId, companyName, companyTypeId, vendorId, name, leaderName, leaderPhone, teamId, teamName, type, leaderId, deleted, createTime, platformGroupId, platformTeamId, enterDate, exitDate, remark, is_del, create_by, create_time, update_by, update_time
|
||||||
|
from vw_sur_project_attendance_group
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSurProjectAttendanceGroupList" parameterType="SurProjectAttendanceGroup" resultMap="SurProjectAttendanceGroupResult">
|
<select id="selectSurProjectAttendanceGroupList" parameterType="SurProjectAttendanceGroup" resultMap="SurProjectAttendanceGroupResult">
|
||||||
|
|
Loading…
Reference in New Issue