5 Komitmen 588f7ffbfe ... 9d51187c5e

Pembuat SHA1 Pesan Tanggal
  wsl 9d51187c5e 1 1 tahun lalu
  wsl 6bc0cb329c Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev 1 tahun lalu
  wsl 6278d7a2e2 1 1 tahun lalu
  wsl 02f1a852cc 1 1 tahun lalu
  chinawu123 d8e7c7eec3 Merge branch 'dev' of chinawu123/wlyy2.0 into dev 1 tahun lalu

+ 1 - 3
business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java

@ -17,7 +17,6 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.apache.poi.util.IOUtils;
import org.csource.common.MyException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -33,7 +32,6 @@ import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.security.NoSuchAlgorithmException;
import java.util.*;
@ -678,7 +676,7 @@ public class FileUploadService {
            type = type.substring(type.lastIndexOf("."),type.length()-1);
        }
        logger.info(type);
        List img = new ArrayList(Arrays.asList("jpeg","bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp","xls","xlsx","text/plain","mp4","m4v","avi","ogm","wmv","mpg","webm","ogv","mov","asx","mpeg","image/png","amr"));
        List img = new ArrayList(Arrays.asList("jpeg","bmp", "jpg", "png", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "cdr", "pcd", "dxf", "ufo", "eps", "ai", "raw", "WMF", "webp","xls","xlsx","text/plain","mp3","mp4","m4v","avi","ogm","wmv","mpg","webm","ogv","mov","asx","mpeg","image/png","amr"));
        if (!img.contains(type)) {
            return false;
        }

+ 2 - 0
common/common-entity/sql/sql记录

@ -2422,3 +2422,5 @@ CREATE TABLE `base_check_org` (
  `check_file` varchar(255) DEFAULT NULL COMMENT '考核文件',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构考核';

+ 1 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/config/MultipartConfig.java

@ -26,6 +26,7 @@ public class MultipartConfig {
            tmpFile.mkdirs();
        }
        factory.setLocation(location);
        factory.setMaxFileSize("20MB");
        return factory.createMultipartConfig();
    }

+ 5 - 11
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/common/FileUploadController.java

@ -5,23 +5,18 @@ import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.fastdfs.FastDFSUtil;
import com.yihu.jw.base.util.ErrorCodeUtil;
import com.yihu.jw.exception.code.BaseErrorCode;
import com.yihu.jw.file_upload.FileManageService;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.restmodel.MutilFileInfo;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.http.entity.ContentType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -30,11 +25,10 @@ import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLDecoder;
import java.util.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Map;
/**
 * 文件上传不在微服务中处理
@ -116,7 +110,7 @@ public class FileUploadController extends EnvelopRestEndpoint {
            //得到文件类型
            String fileName = originalFilename.substring(0, originalFilename.lastIndexOf("."));
            String fileType = originalFilename.substring(originalFilename.lastIndexOf(".") + 1).toLowerCase();
            if(StringUtils.isBlank(fileType)||!"doc、docx、pdf、xls、xlsx、ppt、pptx".contains(fileType)){
            if(StringUtils.isBlank(fileType)||!"doc、docx、pdf、xls、xlsx、ppt、pptx、mp3".contains(fileType)){
                return ObjEnvelop.getError("文件格式不支持");
            }
            InputStream inputStream = file.getInputStream();

+ 3 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/music/MusicController.java

@ -34,9 +34,10 @@ public class MusicController extends EnvelopRestEndpoint {
    @ApiOperation(value = "保存音乐")
    public Envelop saveMusic(@RequestParam(value = "url", required = true ) String url,
                             @RequestParam(value = "title", required = true )String title,
                             @RequestParam(value = "author", required = true )String author){
                             @RequestParam(value = "author", required = true )String author,
                             @RequestParam(value = "id", required = false )String id){
        try {
            musicService.saveMusic(url, title, author);
            musicService.saveMusic(url, title, author,id);
            return success("保存成功!");
        } catch (Exception e) {
            e.printStackTrace();

+ 9 - 4
svr/svr-base/src/main/java/com/yihu/jw/base/service/music/MusicService.java

@ -30,12 +30,17 @@ public class MusicService {
    //url 地址   title  音乐名称  author  作者
    @Transactional(rollbackFor = Exception.class)
    public void saveMusic(String url,String title,String author){
    public void saveMusic(String url,String title,String author,String id){
        BaseVideoDO baseVideoDO = new BaseVideoDO();
        if (StringUtils.isNotBlank(id)){
            baseVideoDO.setId(id);
        }
        baseVideoDO.setUrl(url);
        baseVideoDO.setTitle(title);
        baseVideoDO.setIntroduction(author);
        baseVideoDO.setType("13");
        baseVideoDO.setStatus(1);
        baseVideoDao.save(baseVideoDO);
    }
@ -53,7 +58,7 @@ public class MusicService {
        JSONObject jsonObject= new JSONObject();
        String sql = "select * from base_video where type = 13";
        String sql = "select *,status * 1 as del from base_video where type = 13";
        String totalSql = "select count(id) from base_video where type = 13";
        if (StringUtils.isNotBlank(id)){
@ -61,8 +66,8 @@ public class MusicService {
        }
        if (StringUtils.isNotBlank(musicName)){
            sql += " and musicName like '%"+musicName+"%' ";
            totalSql += " and musicName like '%"+musicName+"%' ";
            sql += " and title like '%"+musicName+"%' ";
            totalSql += " and title like '%"+musicName+"%' ";
        }
        sql += " limit "+page+","+size;

+ 1 - 3
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/doorCoach/PatientDoorCoachOrderService.java

@ -15,8 +15,6 @@ import com.yihu.jw.entity.base.im.ConsultTeamDo;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.care.doorCoach.*;
import com.yihu.jw.entity.care.lifeCare.LifeCareFeeDetailDO;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import com.yihu.jw.entity.door.BaseAdminServiceDynamic;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.order.BusinessOrderDO;
@ -1315,7 +1313,7 @@ public class PatientDoorCoachOrderService extends BaseJpaService<BaseDoorCoachOr
                }
            }
        }
        all = waitForPay+waitForAccept+waitForServe+served+cancel;
        all = waitForAccept+waitForServe+served+cancel;
        map.put("all",all);
        map.put("waitForPay",waitForPay);
        map.put("waitForAccept",waitForAccept);

+ 15 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/zhylyjkglxt/sql记录.sql

@ -731,3 +731,18 @@ CREATE TABLE `alarm_deal_sync` (
                                   `explanation` VARCHAR DEFAULT NULL COMMENT '处置说明',
                                   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件处置同步';
CREATE TABLE `data_batch_sync` (
                                   `id` INT(50) NOT NULL AUTO_INCREMENT,
                                   `devicecode` varchar(50) NOT NULL COMMENT 'devicecode',
                                   `messagetype` varchar(50) NOT NULL COMMENT '1-信息,2-告警',
                                   `reporttime` varchar(50) NOT NULL '' COMMENT '上报时间 格式:yyyy-mm-dd hh:mm:ss',
                                   `topic` varchar(50) DEFAULT NULL COMMENT '标识',
                                   `name` VARCHAR(50) DEFAULT NULL COMMENT '名称',
                                   `alarmtype` varchar(50) DEFAULT NULL COMMENT '告警类型,messagetype=2,3时必填,1-事件告警,2-设备告警,3-其他告警',
                                   `alarmlevel` varchar(50) DEFAULT NULL COMMENT '居家状态 messagetype=2,3时必填,1-非 常严重,2-严重,3-较重,4-一般,5-轻微',
                                   `dataType` varchar(50) DEFAULT NULL COMMENT 'messageType=1时必填,0-数值 int,1-布尔boolean,2-字符串 string, 3-数组list,4-时间 date, 6-浮点float,7-枚举 enum',
                                   `alarmCode` varchar(50) DEFAULT NULL COMMENT 'messageType=2,3时必填。用于区分每一次告警事件和同步告警处理',
                                   `updateValue` varchar(50) DEFAULT NULL COMMENT '更新值',
                                   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据同步';