Jelajahi Sumber

Merge branch 'dev' of zd_123/patient-co-management into dev

huangwenjie 7 tahun lalu
induk
melakukan
15e4d4fe97

+ 22 - 0
common/common-entity/src/main/java/com/yihu/device/entity/DeviceDetail.java

@ -41,6 +41,10 @@ public class DeviceDetail extends IdEntity{
    private String bindingCount;//绑定次数({"1":"0", "2":"0"})
    private Date grantTime;//发放时间
    //1.5.0版本新增字段
    private String grantDoctor;//发放医生code
    private String grantDoctorName;//发放医生姓名
    /** default constructor */
    public DeviceDetail() {
    }
@ -282,4 +286,22 @@ public class DeviceDetail extends IdEntity{
    public void setGrantTime(Date grantTime) {
        this.grantTime = grantTime;
    }
    @Column(name = "grant_doctor")
    public String getGrantDoctor() {
        return grantDoctor;
    }
    public void setGrantDoctor(String grantDoctor) {
        this.grantDoctor = grantDoctor;
    }
    @Column(name = "grant_doctor_name")
    public String getGrantDoctorName() {
        return grantDoctorName;
    }
    public void setGrantDoctorName(String grantDoctorName) {
        this.grantDoctorName = grantDoctorName;
    }
}

+ 23 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java

@ -666,4 +666,27 @@ public class DataHandingService {
        }
        return errorList;
    }
    @Transactional(rollbackFor = Exception.class)
    public void updateDeviceGrantDoctor()throws Exception{
        String sql ="SELECT" +
                " wd.device_code,s.* FROM device.wlyy_devices wd" +
                " LEFT JOIN (" +
                " SELECT wat.id, d.`code`, d.`name` FROM wlyy.wlyy_admin_team wat" +
                " LEFT JOIN wlyy.wlyy_doctor d ON wat.leader_code = d.`code`" +
                " WHERE available = 1" +
                ") s ON wd.grant_admin_team = s.id" +
                " WHERE  wd.is_grant = 1 AND wd.grant_admin_team IN(SELECT id from wlyy.wlyy_admin_team where available=1)";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        List<String> sqlList = new ArrayList<>();
        for (Map<String,Object> map : list){
            String updateSql ="update device.wlyy_devices set grant_doctor='"+String.valueOf(map.get("code"))+"'," +
                    " grant_doctor_name='"+String.valueOf(map.get("name"))+"'"+
                    " where device_code='"+String.valueOf(map.get("device_code"))+"'";
            sqlList.add(updateSql);
        }
        String[] sqlStr = new String[sqlList.size()];
        sqlStr = sqlList.toArray(sqlStr);
        jdbcTemplate.batchUpdate(sqlStr);
    }
}

+ 22 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -361,4 +361,26 @@ public class DataHandlingController extends BaseController {
            return write(-1,"导入数据失败!");
        }
    }
    @RequestMapping(value = "/updateDeviceGrantDoctor",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("清洗device库加上发放医生的code和姓名为团队长的数据")
    public String updateDeviceGrantDoctor(){
        try{
            dataHandingService.updateDeviceGrantDoctor();
            return write(200,"清洗数据成功!");
        }catch (Exception e){
            System.out.println(e.getMessage());
            e.printStackTrace();
            return write(-1,"清洗数据失败!");
        }
    }
    @RequestMapping(value = "/addHealthActivitRecord",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("将之前没有增加的首绑活动积分完善")
    public String addHealthActivitRecord(){
        return  "";
    }
}

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/DoctorRehabilitationManageController.java

@ -336,11 +336,11 @@ public class DoctorRehabilitationManageController extends BaseController {
    }
    @RequestMapping(value = "updateNoteAndImageRehabilitationOperate", method = RequestMethod.POST)
    @ApiOperation("康复管理-康复计划完成时更新服务完成笔记和图片接口")
    @ApiOperation("康复管理-康复计划完成时更新服务完成笔记和图片接口并且确认完成")
    @ObserverRequired
    public String updateNoteAndImageRehabilitationOperate(@ApiParam(name = "planDetailId", value = "康复计划项目明细ID")@RequestParam(value = "planDetailId", required = true)String planDetailId,
                                                          @ApiParam(name = "node", value = "服务完成笔记", required = true)@RequestParam(value = "node", required = true)String node,
                                                          @ApiParam(name = "image", value = "相关记录图片,json格式", required = true)@RequestParam(value = "image", required = true)String image){
                                                          @ApiParam(name = "node", value = "服务完成笔记", required = false)@RequestParam(value = "node", required = true)String node,
                                                          @ApiParam(name = "image", value = "相关记录图片,json格式", required = false)@RequestParam(value = "image", required = true)String image){
        try {
            JSONObject result = rehabilitationManageService.updateNodeAndRelationRecordImg(planDetailId, node, image);

+ 2 - 2
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -204,9 +204,9 @@ activemq:
##如果是外网项目就是flase 内网是true
neiwang:
  enable: false
  enable: true
  #wlyy: http://59.61.92.90:8072/wlyy
  wlyy: http://192.168.131.131:8080/
  wlyy: http://172.19.103.54:22122/
#系统中使用的双层对称加密使用到的KEY
Riva: