Commit 6c461d39 authored by maqing's avatar maqing

签到

parent 709c7a33
......@@ -7,6 +7,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvOrganType;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndSrvOrganLevel;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpCate;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganListVo;
......@@ -282,4 +283,33 @@ public class SrvOrganController {
FileUtils.exportResponse(workbook,fileName,response);
}
@GetMapping("/chSrvTaskDetailQuery")
public Result chSrvTaskDetailQuery(long empid){
List<ChSrvTaskDetail> chSrvTaskDetails = srvOrganEmpService.chSrvTaskDetailQuery(empid);
if(chSrvTaskDetails.size()>0&& !chSrvTaskDetails.isEmpty()){
return Result.success(chSrvTaskDetails);
}else {
return Result.failed(ResultCode.SRV_ORGAN_NOT_QUERY);
}
}
/**
* 删除签到数据
* @param taskDetailId
* @param userName
* @return
*/
@PostMapping("/chSrvTaskDetailQuery")
public Result chSrvTaskDetailDelete(long taskDetailId,String userName){
boolean srv = srvOrganEmpService.chSrvTaskDetailDelete(taskDetailId,userName);
if(srv){
return Result.success();
}else {
return Result.failed("删除失败");
}
}
}
......@@ -3,6 +3,7 @@ package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import org.apache.ibatis.annotations.Mapper;
......@@ -31,6 +32,17 @@ public interface ChSrvOrganEmpMapper extends BaseMapper<ChSrvOrganEmp> {
List<SrvOrganEmpExportVo> getSrvOrganEmpExportList(List<Long> organIds, String empName, String srvOrganName, String certifNum, Short isLock, Short empType);
/**
* 打卡记录
* @param empid
* @return
*/
List<ChSrvTaskDetail> chSrvTaskDetailQuery(long empid);
/**
* 删除数据
* @param taskDetailId
* @return
*/
boolean chSrvTaskDetailDelete(long taskDetailId);
}
\ No newline at end of file
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetailDelete;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* @author mq
*/
@Mapper
@Repository
public interface ChSrvTaskDetailDeleteMapper extends BaseMapper<ChSrvTaskDetailDelete> {
}
\ No newline at end of file
package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* @author mq
*/
@Mapper
@Repository
public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
}
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo;
import org.apache.poi.ss.usermodel.Workbook;
import java.util.List;
public interface SrvOrganEmpService {
/**
......@@ -63,4 +66,8 @@ public interface SrvOrganEmpService {
Workbook srvOrganExport(Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum,
Short isLock, Short empType);
List<ChSrvTaskDetail> chSrvTaskDetailQuery(long empid);
boolean chSrvTaskDetailDelete(long taskDetailId,String userName);
}
......@@ -3,20 +3,16 @@ package com.hungraim.ltc.service.impl;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.AttachFeignService;
import com.hungraim.ltc.dao.ChSrvOrganEmpMapper;
import com.hungraim.ltc.dao.ChSrvempRiskLevelMapper;
import com.hungraim.ltc.dao.SrvEmpTypeMapper;
import com.hungraim.ltc.dao.SrvOrganMapper;
import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvEmpType;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.riskLevel.ChSrvempRiskLevel;
import com.hungraim.ltc.pojo.entity.riskLevel.ChSrvorganRiskLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganEmp;
import com.hungraim.ltc.pojo.vo.disable.DisableExportVO;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetailDelete;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpExportVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpListVo;
import com.hungraim.ltc.pojo.vo.disable.SrvOrganEmpVo;
......@@ -35,7 +31,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.util.Arrays;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
......@@ -57,6 +53,12 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
@Autowired
private ChSrvempRiskLevelMapper chSrvempRiskLevelMapper;
private final ChSrvTaskDetailMapper chSrvTaskDetailMapper;
private final ChSrvTaskDetailDeleteMapper chSrvTaskDetailDeleteMapper;
@Override
public Page<SrvOrganEmpListVo> getSrvOrganEmpListVo(Page<SrvOrganEmpListVo> page, Long organId, Boolean isInvolveChild, String empName, String srvOrganName, String certifNum, Short isLock, Short empType) {
List<Long> organIds = organService.getOrganIds(organId, isInvolveChild);
......@@ -160,4 +162,21 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
return workbook;
}
@Override
public List<ChSrvTaskDetail> chSrvTaskDetailQuery(long empid) {
return chSrvOrganEmpMapper.chSrvTaskDetailQuery(empid);
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean chSrvTaskDetailDelete(long taskDetailId,String userName) {
ChSrvTaskDetail chSrvTaskDetail = chSrvTaskDetailMapper.selectById(taskDetailId);
ChSrvTaskDetailDelete chSrvTaskDetailDelete = new ChSrvTaskDetailDelete();
BeanUtils.copyProperties(chSrvTaskDetail,chSrvTaskDetailDelete);
chSrvTaskDetailDelete.setDeleteDate(new Date());
chSrvTaskDetailDelete.setDeleteName(userName);
chSrvTaskDetailDeleteMapper.insert(chSrvTaskDetailDelete);
return chSrvOrganEmpMapper.chSrvTaskDetailDelete(taskDetailId);
}
}
......@@ -139,6 +139,18 @@
</where>
ORDER BY T1.EFF_TIME DESC
</select>
<select id="chSrvTaskDetailQuery" resultType="com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail">
SELECT
decode(t.STATUS, '0', '未执行', '1', '执行中', '2', '已执行', '4', '已完成') AS "status",
t.SRV_START_TIME sevStarTime,
t.SRV_END_TIME sevEndTime,
t.*
FROM
ch_srv_task_detail t
LEFT JOIN ch_srv_task k ON t.SRV_TASK_ID = k.SRV_TASK_ID
WHERE
K.SRV_EMP_ID =#{empid}
</select>
</mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.serviceManage;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 日志表
* @author mq
*/
@Data
@TableName("CH_SRV_TASK_DETAIL")
@KeySequence("SEQ_CH_SRV_TASK_DETAIL")
public class ChSrvTaskDetailDelete implements Serializable {
/**
* 服务明细id
*/
@TableId(type = IdType.INPUT)
private Long taskDetailId;
/**
* 服务任务id
*/
private Long srvTaskId;
/**
* 状态 未执行:0;执行中:1;已执行:2;已失效:3;已完成:4
*/
private Short status;
/**
* 创建人
*/
private Long defineEmp;
/**
* 创建时间
*/
private Date effTime;
/**
* 终止人
*/
private Long endEmp;
/**
* 终止时间
*/
private Date endTime;
/**
* 首次操作时间
*/
private Date fcd;
/**
* 首次操作人
*/
private Long fcu;
/**
* 末次操作时间
*/
private Date lcd;
/**
* 末次操作人
*/
private Long lcu;
/**
* 服务开始时间
*/
private Date srvStartTime;
/**
* 服务结束时间
*/
private Date srvEndTime;
/**
* 服务时长
*/
private Long srvTime;
/**
* 服务图片开始路径
*/
private String srvStartPic;
/**
* 服务图片结束路径
*/
private String srvEndPic;
/**
* 备注
*/
private String remark;
/**
* 服务评分
*/
private String srvScore;
/**
* 类型 分配:0;移动添加:1
*/
private Short taskType;
/**
* 数据来源 网厅:0,核心:1
*/
private Short dataFrom;
/**
* 网厅创建人
*/
private Long webDefineEmp;
/**
* 网厅终止人
*/
private Long webEndEmp;
/**
* 服务日期
*/
private Date srvDate;
/**
* 服务金额
*/
private Long srvAmount;
/**
* 自费金额
*/
private Long selfAmount;
/**
* 经度(弃用)
*/
private String longitudeCode;
/**
* 纬度(弃用)
*/
private String latitudeCode;
/**
* 服务时长项目开始时间
*/
private Date srvTimeStartTime;
/**
* 服务时长项目结束时间
*/
private Date srvTimeEndTime;
/**
* 服务时长项目开始图片路径
*/
private String srvTimeStartPic;
/**
* 服务时长项目结束图片路径
*/
private String srvTimeEndPic;
/**
* 时长收费项目时长
*/
private Long srvTimeCharge;
/**
* 时长收费任务备注
*/
private String srvTimeRemark;
/**
* 任务完成标识 默认0
*/
private String finishFlag;
/**
* 稽核结果(0,正常;1,异常;2,可疑)
*/
private Short auditResult;
/**
* 稽核备注
*/
private String auditRemark;
/**
* 稽核时间
*/
private Date auditDate;
/**
* 违规类型(全部:0;基础护理:1;日常照护:2)
*/
private Short illegalType;
/**
* 违规备注
*/
private String illegalRemark;
/**
* 违规录入人ID
*/
private Long illegalreEmp;
/**
* 违规录入姓名
*/
private String illegalreName;
/**
* 违规录入时间
*/
private Date illegalreTime;
/**
* 违规结算标记(0,未结算;1,已结算)
*/
private Short accountSign;
/**
* 任务类型(1基础护理、2日常照护项目、3其它、4巡诊)
*/
private Short taskDetailType;
/**
* 删除时间
*/
private Date deleteDate;
/**
* 删除人
*/
private String deleteName;
}
......@@ -31,6 +31,8 @@ public enum ResultCode implements IResultCode, Serializable {
TOKEN_INVALID_OR_EXPIRED("A0230", "token无效或已过期"),
// 请求参数错误,参数校验不通过
REQUEST_PARAM_ERROR("Q0001", "请求参数错误"),
// 请求参数错误,参数校验不通过
SRV_ORGAN_NOT_QUERY("S0001", "未查询到数据"),
/**
* 制定服务方案失败,请先终止其它服务方案
*/
......
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