|
|
@@ -1,14 +1,36 @@
|
|
|
package cn.iocoder.yudao.module.system.api.bpm;
|
|
|
|
|
|
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
+import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitApiPageReqVO;
|
|
|
import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitCreateReqVO;
|
|
|
+import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitRecordRespVO;
|
|
|
import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitSupplementReqVO;
|
|
|
+import cn.iocoder.yudao.module.system.dal.dataobject.biz.BuildBedDO;
|
|
|
+import cn.iocoder.yudao.module.system.dal.dataobject.biz.BuildDO;
|
|
|
+import cn.iocoder.yudao.module.system.dal.dataobject.biz.BuildFloorDO;
|
|
|
+import cn.iocoder.yudao.module.system.dal.dataobject.biz.BuildRoomDO;
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.biz.ElderlyCheckInWaitDO;
|
|
|
+import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildBedMapper;
|
|
|
+import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildFloorMapper;
|
|
|
+import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildMapper;
|
|
|
+import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildRoomMapper;
|
|
|
import cn.iocoder.yudao.module.system.dal.mysql.biz.ElderlyCheckInWaitMapper;
|
|
|
+import cn.iocoder.yudao.module.system.dal.mysql.biz.NurseLevelMapper;
|
|
|
+import cn.iocoder.yudao.module.system.enums.change.BusinessTypeEnum;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
@Validated
|
|
|
@@ -17,6 +39,21 @@ public class BpmCheckInWaitApiImpl implements BpmCheckInWaitApi {
|
|
|
@Resource
|
|
|
private ElderlyCheckInWaitMapper checkInWaitMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private NurseLevelMapper nurseLevelMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private BuildMapper buildMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private BuildFloorMapper buildFloorMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private BuildRoomMapper buildRoomMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private BuildBedMapper buildBedMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public Long createCheckInWait(CheckInWaitCreateReqVO reqVO) {
|
|
|
ElderlyCheckInWaitDO data = new ElderlyCheckInWaitDO();
|
|
|
@@ -37,6 +74,21 @@ public class BpmCheckInWaitApiImpl implements BpmCheckInWaitApi {
|
|
|
return data.getId();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Integer updateInfo(CheckInWaitSupplementReqVO reqVO) {
|
|
|
+ ElderlyCheckInWaitDO updateDO = new ElderlyCheckInWaitDO();
|
|
|
+ BeanUtils.copyProperties(reqVO,updateDO);
|
|
|
+ return checkInWaitMapper.updateById(updateDO);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Integer updateFirstReviewInfo(CheckInWaitSupplementReqVO reqVO) {
|
|
|
+ ElderlyCheckInWaitDO updateDO = new ElderlyCheckInWaitDO();
|
|
|
+ updateDO.setId(reqVO.getId());
|
|
|
+ updateDO.setIsPsychosis(reqVO.getIsPsychosis());
|
|
|
+ return checkInWaitMapper.updateById(updateDO);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Integer updateCheckInWaitStatus(Long id, Integer status) {
|
|
|
ElderlyCheckInWaitDO updateDO = new ElderlyCheckInWaitDO();
|
|
|
@@ -83,4 +135,12 @@ public class BpmCheckInWaitApiImpl implements BpmCheckInWaitApi {
|
|
|
ElderlyCheckInWaitDO elderlyCheckInWaitDO = checkInWaitMapper.selectById(id);
|
|
|
return (JSONObject) JSONObject.toJSON(elderlyCheckInWaitDO);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PageResult<CheckInWaitRecordRespVO> getProcessInstanceCheckInWaitPage(CheckInWaitApiPageReqVO pageReqVO) {
|
|
|
+ Page<CheckInWaitRecordRespVO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
|
|
+ pageReqVO.setType(BusinessTypeEnum.CHECK_IN_WAIT.getValue());
|
|
|
+ List<CheckInWaitRecordRespVO> list = checkInWaitMapper.selectCheckInWaitListPage(page, pageReqVO);
|
|
|
+ return new PageResult<>(list, page.getTotal());
|
|
|
+ }
|
|
|
}
|