Commit 3fad9da4 authored by zhangwanglin's avatar zhangwanglin

打卡记录

parent 3a80948f
......@@ -26,6 +26,8 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
*/
Page<ChSrvTaskDetail2Vo> chSrvTaskDetailQuery(Page<ChSrvTaskDetail2Vo> page, Long empId);
int deleteFinshItem(long taskDetailId);
String selectBySrvTaskId(String srvTaskId);
int updateByTaskDetailId(String taskDetailId);
......
......@@ -182,10 +182,10 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
if( 4 == chSrvTaskDetail.getStatus()) {
// 开始时间
Date srvStartTime = chSrvTaskDetail.getSrvStartTime();
String srvStartTimeStr = DateUtils.dateToStr(srvStartTime);
String srvStartTimeStr = DateUtils.dateTimeToStr(srvStartTime);
// 结束时间
Date srvEndTime = chSrvTaskDetail.getSrvEndTime();
String srvEndTimeStr = DateUtils.dateToStr(srvEndTime);
String srvEndTimeStr = DateUtils.dateTimeToStr(srvEndTime);
Long min = dateDiff(srvStartTimeStr, srvEndTimeStr, "yyyy-MM-dd HH:mm:ss", "min");
if(min>=90){
Date srvDate = chSrvTaskDetail.getSrvDate();
......@@ -194,7 +194,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
String disabInfoId = chSrvTaskDetailMapper.selectBySrvTaskId(String.valueOf(srvTaskId));
ChDisabDetailAccounts chDisabDetailAccounts = chSrvTaskDetailMapper.selectAccountsDetail(disabInfoId, srvDateStr);
Short status = chDisabDetailAccounts.getStatus();
if(status == 1){
if(status != 0){
// 已申报不能进行删除
return -1;
}
......@@ -208,7 +208,7 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
chSrvTaskDetailMapper.updateChDisabDetailAccounts(accountsId,accountsAllCostsub,accountsOverallCostsub,accountsPersonalCostsub);
}
}
chSrvTaskDetailMapper.deleteFinshItem(taskDetailId);
return chSrvTaskDetailMapper.updateByTaskDetailId(String.valueOf(chSrvTaskDetail.getTaskDetailId()));
}
......
......@@ -75,7 +75,7 @@
LEFT JOIN CH_SRV_ORGAN_EMP m ON m.EMP_ID = k.SRV_EMP_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T5.SRV_ORGAN_ID = m.SRV_ORGAN_ID
WHERE m.EMP_ID = #{empId}
order by t.STATUS desc
order by t.TASK_DETAIL_ID desc
</select>
......@@ -92,4 +92,16 @@ WHERE TASK_DETAIL_ID = #{taskDetailId}
WHERE d.ACCOUNTS_ID = #{accountsId}
</update>
<select id="selectBySrvTaskId" resultType="java.lang.String">
select DISAB_INFO_ID from CH_SRV_TASK where SRV_TASK_ID = #{srvTaskId} and rownum = 1
</select>
<select id="selectAccountsDetail" resultType="com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts">
select * from CH_DISAB_ACCOUNTS_DETAIL d where d.DISAB_INFO_ID = #{disabInfoId} and to_char(d.ACCOUNTS_TIME,'yyyy-MM') = #{srvDateStr}
</select>
<delete id="deleteFinshItem">
delete from CH_SRV_TASK_FINISH_ITEM where TASK_DETAIL_ID = #{taskDetailId}
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment