吴世龙 3 years ago
parent
commit
700ac70173

+ 5 - 3
common/common-entity/sql记录

@ -1701,21 +1701,23 @@ ALTER TABLE base_login_log ADD token varchar(50) COMMENT '登录token 做权限
-- 2022-03-21 wsl
CREATE TABLE `base_device_repair` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` varchar(50) DEFAULT NULL,
  `device_sn` varchar(50) DEFAULT NULL COMMENT '设备sn码',
  `device_name` varchar(20) DEFAULT NULL COMMENT '设备名称',
  `bind_user` varchar(50) DEFAULT NULL COMMENT '绑定人code',
  `bind_user_name` varchar(20) DEFAULT NULL COMMENT '绑定人',
  `status` int(2) DEFAULT NULL COMMENT '报修状态:0 报修中、1 已完成',
  `status` tinyint(2) DEFAULT NULL COMMENT '报修状态:0 报修中、1 已完成',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `repair_peoper` varchar(50) DEFAULT NULL COMMENT '报修人code',
  `repair_peoper_name` varchar(10) DEFAULT NULL COMMENT '报修人',
  `show` varchar(200) DEFAULT NULL COMMENT '说明',
  `show_content` varchar(200) DEFAULT NULL COMMENT '说明',
  `img` varchar(2500) DEFAULT NULL COMMENT '图片地址“,”分割',
  `deal_peoper` varchar(50) DEFAULT NULL COMMENT '处理人',
  `deal_peoper_name` varchar(10) DEFAULT NULL COMMENT '处理人',
  `deal_time` datetime DEFAULT NULL COMMENT '处理时间',
  `feedback` varchar(50) DEFAULT NULL COMMENT '反馈',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='设备报修表';
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='设备报修表';
-- 2022-03-22 wsl
CREATE TABLE `base_day_handover` (

+ 3 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/handover/BaseDayHandoverDao.java

@ -16,5 +16,8 @@ public interface BaseDayHandoverDao extends PagingAndSortingRepository<BaseDayHa
    @Query("select h from BaseDayHandover h where h.createUser = ?1 order by h.createTime DESC")
    List<BaseDayHandover> findByCreateUser(String code);
    @Query("select h from BaseDayHandover h where h.id = ?1")
    BaseDayHandover findById(String id);
    // Map<String,Object> findById(String id);
}

+ 19 - 4
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/doctor/DoctorDayHandoverController.java

@ -12,10 +12,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
 * Created by Bing on 2021/7/16.
@ -96,5 +93,23 @@ public class DoctorDayHandoverController extends BaseController {
        }
    }
    @GetMapping("/getDayHandoverDetails")
    @ApiOperation(value = "获取日常交接详情")
    public String getDayHandoverDetails(@ApiParam(name = "id",value = "交接表单id")
                                        @RequestParam(value = "id")String id){
        try {
            JSONObject param = new JSONObject();
            param.put("doctorId", permissionService.getUID());
            if (permissionService.noPermission(1, param)) {
                return write(-1, "该操作没有权限");
            }
            return write(200,"成功","data",dayHandoverService.getDayHandoverDetails(id));
        } catch (Exception e) {
            error(e);
            return errorResult(e);
        }
    }
}

+ 7 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/doctor/DayHandoverService.java

@ -43,11 +43,17 @@ public class DayHandoverService {
                " d. NAME AS `name`, d.id AS id " +
                " FROM base_team_member m, base_doctor d" +
                " WHERE " +
                " m.team_code = (SELECT team_code FROM base_team_member WHERE doctor_code ='" + doctor + "' AND del = '1') and m.doctor_code = d.id " +
                " m.team_code = (SELECT team_code FROM base_team_member WHERE doctor_code ='" + doctor + "' AND del = '1' LIMIT 1) and m.doctor_code = d.id " +
                " and m.del = '1'";
        return jdbcTemplate.queryForList(memberSql);
    }
    //获取日常交接详情
    public Object getDayHandoverDetails(String id){
        BaseDayHandover dayHandoverDo = baseDayHandoverDao.findById(id);
        return dayHandoverDo;
    }
    //判断是否是社工医生
    public boolean doctorIf(String doctorCode){