Commit 24fe0d32 authored by maqing's avatar maqing

护理人员管理页面点击查看打卡记录,打卡记录页面护理机构列的值显示错误,开始服 马庆务时间和结束服务时间的值需转

parent 93558e53
...@@ -7,10 +7,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType; ...@@ -7,10 +7,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpCate; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpCate;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType;
import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo; import com.hungraim.ltc.pojo.vo.disable.*;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
import com.hungraim.ltc.pojo.vo.system.SrvOrganVo; import com.hungraim.ltc.pojo.vo.system.SrvOrganVo;
import com.hungraim.ltc.service.SrvEmpCateService; import com.hungraim.ltc.service.SrvEmpCateService;
import com.hungraim.ltc.service.SrvEmpTypeService; import com.hungraim.ltc.service.SrvEmpTypeService;
...@@ -289,36 +286,36 @@ public class SrvOrganController { ...@@ -289,36 +286,36 @@ public class SrvOrganController {
FileUtils.exportResponse(workbook,fileName,response); FileUtils.exportResponse(workbook,fileName,response);
} }
// /** /**
// * 打卡查询 * 打卡查询
// * @param empId * @param empId
// * @return * @return
// */ */
// @GetMapping("/chSrvTaskDetailQuery") @GetMapping("/chSrvTaskDetailQuery")
// public Result chSrvTaskDetailQuery(Integer pageNum, Integer pageSize,Long empId){ public Result chSrvTaskDetailQuery(Integer pageNum, Integer pageSize,Long empId){
// Page<ChSrvTaskDetailVo> page = new Page<>(pageNum, pageSize); Page<ChSrvTaskDetail2Vo> page = new Page<>(pageNum, pageSize);
// page = srvOrganEmpService.chSrvTaskDetailQuery(page,empId); page = srvOrganEmpService.chSrvTaskDetailQuery(page,empId);
// if(page.getSize()>0){ if(page.getSize()>0){
// return Result.success(page); return Result.success(page);
// }else { }else {
// return Result.failed(ResultCode.SRV_ORGAN_NOT_QUERY); return Result.failed(ResultCode.SRV_ORGAN_NOT_QUERY);
// } }
// } }
//
// /** /**
// * 删除打卡数据 * 删除打卡数据
// * @param taskDetailId * @param taskDetailId
// * @param userName * @param userName
// * @return * @return
// */ */
// @PostMapping("/chSrvTaskDetailDelete") @PostMapping("/chSrvTaskDetailDelete")
// public Result chSrvTaskDetailDelete(Long taskDetailId,String userName){ public Result chSrvTaskDetailDelete(Long taskDetailId,String userName){
// int srv = srvOrganEmpService.chSrvTaskDetailDelete(taskDetailId,userName); int srv = srvOrganEmpService.chSrvTaskDetailDelete(taskDetailId,userName);
// if(srv>0){ if(srv>0){
// return Result.success(); return Result.success();
// }else { }else {
// return Result.failed("删除失败"); return Result.failed("删除失败");
// } }
// } }
} }
...@@ -3,11 +3,10 @@ package com.hungraim.ltc.dao; ...@@ -3,11 +3,10 @@ package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo; import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetail2Vo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
/** /**
* @author mq * @author mq
...@@ -21,7 +20,7 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> { ...@@ -21,7 +20,7 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
* @param empId * @param empId
* @return * @return
*/ */
Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,Long empId); Page<ChSrvTaskDetail2Vo> chSrvTaskDetailQuery(Page<ChSrvTaskDetail2Vo> page, Long empId);
} }
......
...@@ -2,6 +2,7 @@ package com.hungraim.ltc.service; ...@@ -2,6 +2,7 @@ package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetail2Vo;
import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo; import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo; import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo; import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo;
...@@ -68,7 +69,7 @@ public interface SrvOrganEmpService { ...@@ -68,7 +69,7 @@ public interface SrvOrganEmpService {
Workbook srvOrganExport(Long organId,Long srvOrganId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Workbook srvOrganExport(Long organId,Long srvOrganId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum,
Short isLock, Short empType); Short isLock, Short empType);
Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,Long empId); Page<ChSrvTaskDetail2Vo> chSrvTaskDetailQuery(Page<ChSrvTaskDetail2Vo> page, Long empId);
int chSrvTaskDetailDelete(long taskDetailId,String userName); int chSrvTaskDetailDelete(long taskDetailId,String userName);
} }
...@@ -14,10 +14,7 @@ import com.hungraim.ltc.pojo.entity.riskLevel.ChSrvempRiskLevel; ...@@ -14,10 +14,7 @@ import com.hungraim.ltc.pojo.entity.riskLevel.ChSrvempRiskLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetailDelete; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetailDelete;
import com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo; import com.hungraim.ltc.pojo.vo.disable.*;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo;
import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo; import com.hungraim.ltc.pojo.vo.system.AttachUpdateVo;
import com.hungraim.ltc.service.OrganService; import com.hungraim.ltc.service.OrganService;
import com.hungraim.ltc.service.SrvOrganEmpService; import com.hungraim.ltc.service.SrvOrganEmpService;
...@@ -36,6 +33,7 @@ import org.springframework.util.StringUtils; ...@@ -36,6 +33,7 @@ import org.springframework.util.StringUtils;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@Service @Service
@AllArgsConstructor @AllArgsConstructor
...@@ -165,8 +163,18 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -165,8 +163,18 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
} }
@Override @Override
public Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,Long empId) { public Page<ChSrvTaskDetail2Vo> chSrvTaskDetailQuery(Page<ChSrvTaskDetail2Vo> page, Long empId) {
return chSrvTaskDetailMapper.chSrvTaskDetailQuery(page,empId); Page<ChSrvTaskDetail2Vo> chSrvTaskDetailVoPage = chSrvTaskDetailMapper.chSrvTaskDetailQuery(page, empId);
chSrvTaskDetailVoPage.getRecords().stream().filter(chSrvTaskDetail -> {
if (null != chSrvTaskDetail.getSevStarTime()){
chSrvTaskDetail.setSevStarTime(chSrvTaskDetail.getSevStarTime().substring(0,19));
}
if (null != chSrvTaskDetail.getSevEndTime()){
chSrvTaskDetail.setSevEndTime(chSrvTaskDetail.getSevEndTime().substring(0,19));
}
return true;
}).collect(Collectors.toList());
return chSrvTaskDetailVoPage;
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
......
...@@ -56,4 +56,22 @@ ...@@ -56,4 +56,22 @@
AUDIT_RESULT, AUDIT_REMARK, AUDIT_DATE, ILLEGAL_TYPE, ILLEGAL_REMARK, ILLEGALRE_EMP, AUDIT_RESULT, AUDIT_REMARK, AUDIT_DATE, ILLEGAL_TYPE, ILLEGAL_REMARK, ILLEGALRE_EMP,
ILLEGALRE_NAME, ILLEGALRE_TIME, ACCOUNT_SIGN, TASK_DETAIL_TYPE ILLEGALRE_NAME, ILLEGALRE_TIME, ACCOUNT_SIGN, TASK_DETAIL_TYPE
</sql> </sql>
<select id="chSrvTaskDetailQuery" resultType="com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetail2Vo">
SELECT
t.TASK_DETAIL_ID taskDetailId,
m.EMP_NAME empName,
m.ORGAN_ID orgamId,
T5.SRV_ORGAN_ID srvOrganId,
T5.SRV_ORGAN_NAME srvOrganName,
--t.STATUS status,
decode( t.STATUS, '0', '未执行', '1', '执行中', '2', '已执行', '4', '已完成' ) AS status,
t.SRV_START_TIME sevStarTime,
t.SRV_END_TIME sevEndTime
FROM
CH_SRV_TASK_DETAIL t
LEFT JOIN CH_SRV_TASK k ON t.SRV_TASK_ID = k.SRV_TASK_ID
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}
</select>
</mapper> </mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.disable;
import com.hungraim.ltc.pojo.vo.BaseReq;
import lombok.Data;
/**
* @author root
*/
@Data
public class ChSrvTaskDetail2Vo extends BaseReq {
private Long taskDetailId;
private String empName;
private Integer orgamId;
private String srvOrganId;
private String srvOrganName;
private String status;
private String sevStarTime;
private String sevEndTime;
}
...@@ -85,22 +85,22 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -85,22 +85,22 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
/** /**
* 打卡查询 * 打卡查询
* @param page * @param page
* @param empId * @param
* @return * @return
*/ */
@Override @Override
public Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,ChSrvTaskDetailVo vo) throws ParseException { public Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,ChSrvTaskDetailVo vo){
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); Page<ChSrvTaskDetailVo> chSrvTaskDetailVoPage = buildBedMapper.chSrvTaskDetailQuery(page, vo);
// if(vo.getSevStarTime()!=null){ chSrvTaskDetailVoPage.getRecords().stream().filter(chSrvTaskDetail -> {
// Date sevStarTime = vo.getSevStarTime(); if (null != chSrvTaskDetail.getSevStarTime()){
// Date star=sdf.parse(sevStarTime.toString()); chSrvTaskDetail.setSevStarTime(chSrvTaskDetail.getSevStarTime().substring(0,19));
// vo.setSevStarTime(star); }
// Date sevEndTime = vo.getSevEndTime(); if (null != chSrvTaskDetail.getSevEndTime()){
// Date end=sdf.parse(sevEndTime.toString()); chSrvTaskDetail.setSevEndTime(chSrvTaskDetail.getSevEndTime().substring(0,19));
// vo.setSevStarTime(end); }
// } return true;
}).collect(Collectors.toList());
return buildBedMapper.chSrvTaskDetailQuery(page,vo); return chSrvTaskDetailVoPage;
} }
/** /**
* 删除打卡数据 * 删除打卡数据
......
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