Commit 28bfc30f authored by maqing's avatar maqing

打卡

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