Commit 28bfc30f authored by maqing's avatar maqing

打卡

parent d499b0e2
......@@ -20,15 +20,11 @@ public class ChSrvTaskDetailVo extends BaseReq {
/**
* 服务开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date sevStarTime;
private String sevStarTime;
/**
* 服务结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private Date sevEndTime;
private String sevEndTime;
/**
* 护理机构id
*/
......@@ -36,7 +32,7 @@ public class ChSrvTaskDetailVo extends BaseReq {
/**
* 护理机构名称
*/
private Integer srvOrganName;
private String srvOrganName;
/**
* 失能人员id
*/
......
......@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
......@@ -286,7 +287,7 @@ public class BuildBedController {
* @return
*/
@GetMapping("/chSrvTaskDetailQuery")
public Result chSrvTaskDetailQuery(ChSrvTaskDetailVo vo){
public Result chSrvTaskDetailQuery(ChSrvTaskDetailVo vo) throws ParseException {
Page<ChSrvTaskDetailVo> page = new Page<>(vo.getPageNum(), vo.getPageSize());
page = buildBedService.chSrvTaskDetailQuery(page,vo);
if(page.getSize()>0){
......
......@@ -9,6 +9,7 @@ import com.hungraim.ltc.pojo.vo.governance.BuildBedDetailVo;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq;
import com.hungraim.ltc.util.Result;
import java.text.ParseException;
import java.util.Date;
/**
......@@ -31,10 +32,10 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> {
/**
* 打卡查询
* @param page
* @param empId
* @param
* @return
*/
Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,ChSrvTaskDetailVo vo);
Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,ChSrvTaskDetailVo vo) throws ParseException;
/**
* 删除打卡数据
......
......@@ -25,6 +25,8 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
......@@ -87,7 +89,17 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
* @return
*/
@Override
public Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,ChSrvTaskDetailVo vo) {
public Page<ChSrvTaskDetailVo> chSrvTaskDetailQuery(Page<ChSrvTaskDetailVo> page,ChSrvTaskDetailVo vo) throws ParseException {
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
// if(vo.getSevStarTime()!=null){
// Date sevStarTime = vo.getSevStarTime();
// Date star=sdf.parse(sevStarTime.toString());
// vo.setSevStarTime(star);
// Date sevEndTime = vo.getSevEndTime();
// Date end=sdf.parse(sevEndTime.toString());
// vo.setSevStarTime(end);
// }
return buildBedMapper.chSrvTaskDetailQuery(page,vo);
}
/**
......@@ -98,13 +110,6 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
*/
@Override
public int chSrvTaskDetailDelete(Long taskDetailId, String userName) {
// ChSrvTaskDetail chSrvTaskDetail = buildBedMapper.selectById(taskDetailId);
// ChSrvTaskDetailDelete chSrvTaskDetailDelete = new ChSrvTaskDetailDelete();
// BeanUtils.copyProperties(chSrvTaskDetail,chSrvTaskDetailDelete);
// chSrvTaskDetailDelete.setDeleteDate(new Date());
// chSrvTaskDetailDelete.setDeleteName(userName);
// buildBedMapper.insert(chSrvTaskDetailDelete);
// return buildBedMapper.deleteById(taskDetailId);
return buildBedMapper.deleteById(taskDetailId);
}
......@@ -130,6 +135,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
}
//获取服务机构和服务类型
ChPunchDetailsVO chPunchDetailsVO = buildBedMapper.getsrvOrgan(taskDetailId);
if(chPunchDetailsVO==null){
chPunchDetailsVO=new ChPunchDetailsVO();
}
log.info("chPunchDetailsQuery获取服务机构和服务类型:"+chPunchDetailsVO);
//打卡详情
List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,sevStarTime, sevEndTime);
......
......@@ -122,10 +122,10 @@
and detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
<if test="sevStarTime != null and sevStarTime != ''">
AND detail.DECLARATION_TIME &gt;= TO_DATE (#{sevStarTime}, 'yyyy-mm-dd')
AND detail.DECLARATION_TIME &gt;= TO_DATE (substr(#{sevStarTime} ,1,10), 'yyyy-mm-dd')
</if>
<if test="sevEndTime != null and sevEndTime != ''">
AND detail.DECLARATION_TIME &lt;= TO_DATE (#{sevEndTime}, 'yyyy-mm-dd')
AND detail.DECLARATION_TIME &lt;= TO_DATE (substr(#{sevEndTime},1,10), 'yyyy-mm-dd')
</if>
UNION
SELECT
......@@ -142,10 +142,10 @@
and detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
<if test="sevStarTime != null and sevStarTime != ''">
AND detail.SRV_START_TIME &gt;= TO_DATE (#{sevStarTime}, 'yyyy-mm-dd')
AND detail.SRV_START_TIME &gt;= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd')
</if>
<if test="sevEndTime != null and sevEndTime != ''">
AND detail.SRV_END_TIME &lt;= TO_DATE (#{sevEndTime}, 'yyyy-mm-dd')
AND detail.SRV_END_TIME &lt;= TO_DATE (substr(#{sevEndTime},1,10), 'yyyy-mm-dd')
</if>
</select>
......
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