|
|
@ -23,7 +23,7 @@ |
|
|
|
|
|
|
|
|
<select id="getOperatorGroupPlanHeader" resultType="com.xujie.sys.modules.production.data.OperatorGroupPlanHeaderData"> |
|
|
<select id="getOperatorGroupPlanHeader" resultType="com.xujie.sys.modules.production.data.OperatorGroupPlanHeaderData"> |
|
|
select a.Site,a.OperatorGroupId,a.WorkDate,a.Shiftno,a.allTime,a.WagesTime,a.id,b.OperatorName ,c.shiftdesc |
|
|
select a.Site,a.OperatorGroupId,a.WorkDate,a.Shiftno,a.allTime,a.WagesTime,a.id,b.OperatorName ,c.shiftdesc |
|
|
from OperatorGroupPlanHeader a left join Operator b on a.OperatorGroupId=b.OperatorID |
|
|
|
|
|
|
|
|
from OperatorGroupPlanHeader a left join Operator b on a.OperatorGroupId=b.OperatorID and a.site=b.site |
|
|
left join ShiftInfo C on a.Shiftno=c.shiftno |
|
|
left join ShiftInfo C on a.Shiftno=c.shiftno |
|
|
<where> |
|
|
<where> |
|
|
<if test = "site != null and site != ''"> |
|
|
<if test = "site != null and site != ''"> |
|
|
@ -49,7 +49,7 @@ |
|
|
|
|
|
|
|
|
<select id="getOperatorGroupPlanDetail" resultType="com.xujie.sys.modules.production.data.OperatorGroupPlanDetailData"> |
|
|
<select id="getOperatorGroupPlanDetail" resultType="com.xujie.sys.modules.production.data.OperatorGroupPlanDetailData"> |
|
|
select a.PlanId,a.operatorID,a.workTime,a.WagesRate,a.Site,b.OperatorName |
|
|
select a.PlanId,a.operatorID,a.workTime,a.WagesRate,a.Site,b.OperatorName |
|
|
from OperatorGroupPlanDetail a left join Operator b on a.operatorID=b.OperatorID |
|
|
|
|
|
|
|
|
from OperatorGroupPlanDetail a left join Operator b on a.operatorID=b.OperatorID and a.site=b.site |
|
|
<where> |
|
|
<where> |
|
|
<if test = "site != null and site != ''"> |
|
|
<if test = "site != null and site != ''"> |
|
|
AND a.Site LIKE #{site} |
|
|
AND a.Site LIKE #{site} |
|
|
@ -65,29 +65,30 @@ |
|
|
|
|
|
|
|
|
</select> |
|
|
</select> |
|
|
<select id="getOperatorGroupDefault" resultType="com.xujie.sys.modules.production.data.OperatorGroupPlanDetailData"> |
|
|
<select id="getOperatorGroupDefault" resultType="com.xujie.sys.modules.production.data.OperatorGroupPlanDetailData"> |
|
|
select a.Member_OperatorID OperatorID,b.operatorName,null as workTime ,1 as WagesRate |
|
|
|
|
|
from Operator_group_member a left join Operator b on a.Member_OperatorID=b.OperatorID |
|
|
|
|
|
where a.OperatorID =#{operatorID} and b.Active='Y' |
|
|
|
|
|
|
|
|
select a.site, a.Member_OperatorID OperatorID,b.operatorName,null as workTime ,1 as WagesRate |
|
|
|
|
|
from Operator_group_member a left join Operator b on a.Member_OperatorID=b.OperatorID and a.site=b.site |
|
|
|
|
|
where a.OperatorID =#{operatorGroupId} and b.Active='Y' and a.site=#{site} |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="updateHeader" > |
|
|
<select id="updateHeader" > |
|
|
update OperatorGroupPlanHeader set allTime=#{allTime,jdbcType=DOUBLE} and WagesTime=#{wagesTime,javaType=double} |
|
|
|
|
|
|
|
|
update OperatorGroupPlanHeader set allTime=#{allTime,jdbcType=DOUBLE} , WagesTime=#{wagesTime,javaType=double} |
|
|
where id=#{id} |
|
|
where id=#{id} |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="checkHeader" resultType="com.xujie.sys.modules.production.data.OperatorGroupPlanHeaderData"> |
|
|
<select id="checkHeader" resultType="com.xujie.sys.modules.production.data.OperatorGroupPlanHeaderData"> |
|
|
select id from OperatorGroupPlanHeader where operatorID=#{operatorGroupId} and shiftno=#{shiftno} |
|
|
|
|
|
|
|
|
select id from OperatorGroupPlanHeader where OperatorGroupId=#{operatorGroupId} and shiftno=#{shiftno} |
|
|
|
|
|
and workDate=#{workDate} |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<insert id="saveHeader" keyProperty="id"> |
|
|
|
|
|
|
|
|
<insert id="saveHeader" useGeneratedKeys="true" keyProperty="id"> |
|
|
insert into OperatorGroupPlanHeader(Site,OperatorGroupId,WorkDate,Shiftno,allTime,WagesTime) |
|
|
insert into OperatorGroupPlanHeader(Site,OperatorGroupId,WorkDate,Shiftno,allTime,WagesTime) |
|
|
values (#{site},#{operatorGroupId},#{workDate},#{shiftno},#{allTime},#{wagesTime} |
|
|
values (#{site},#{operatorGroupId},#{workDate},#{shiftno},#{allTime},#{wagesTime} |
|
|
} |
|
|
|
|
|
|
|
|
) |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
|
<insert id="saveDetail"> |
|
|
<insert id="saveDetail"> |
|
|
insert into OperatorGroupPlanDetail(PlanId,operatorID,workTime,WagesRate,Site) |
|
|
insert into OperatorGroupPlanDetail(PlanId,operatorID,workTime,WagesRate,Site) |
|
|
valuse(#{planId},#{operatorID},#{workTime},#{wagesRate},#{site}) |
|
|
|
|
|
|
|
|
values (#{planId},#{operatorID},#{workTime},#{wagesRate},#{site}) |
|
|
</insert> |
|
|
</insert> |
|
|
<delete id="deleteDetail"> |
|
|
<delete id="deleteDetail"> |
|
|
delete from OperatorGroupPlanDetail where PlanId=#{id} |
|
|
delete from OperatorGroupPlanDetail where PlanId=#{id} |
|
|
|