瀏覽代碼

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

yeshijie 3 年之前
父節點
當前提交
91467e0205

+ 6 - 1
business/base-service/src/main/java/com/yihu/jw/file_upload/FileManageService.java

@ -46,6 +46,7 @@ public class FileManageService {
            param.setTaskId(UUID.randomUUID().toString());
        }
        boolean copflag =false;
        long chunkFileSize = 5 * 1024 * 1024;
        /**
         * basePath是我的路径,可以替换为你的
         * 1:原文件名改为UUID
@ -66,9 +67,11 @@ public class FileManageService {
        //第二步
        FileChannel fileChannel = raf.getChannel();
        //第三步
        long offset = param.getChunk() * param.getSize();
        long offset = param.getChunk() * chunkFileSize;
        //第四步
        byte[] fileData = param.getFile().getBytes();
        logger.info("offset"+offset);
        logger.info("fileData.length"+fileData.length);
        //第五步
        MappedByteBuffer mappedByteBuffer = fileChannel.map(FileChannel.MapMode.READ_WRITE,offset,fileData.length);
        //第六步
@ -80,9 +83,11 @@ public class FileManageService {
        //第八步
        boolean isComplete = checkUploadStatus(param,fileName,filePath);
        if(isComplete){
            logger.info("unCompelete size:"+tempFile.getTotalSpace());
            renameFile(tempFile,fileName);
            return filePath+"/"+fileName;
        }else {
            logger.info("unCompelete size:"+tempFile.getTotalSpace());
            return "unCompelete";
        }

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/searchClient/BaseSearchNoveltyRepeatDO.java

@ -33,6 +33,15 @@ public class BaseSearchNoveltyRepeatDO extends UuidIdentityEntityWithOperator {
   /* private String update_time;           //更新时间
    private String update_user_name;      //更新用户*/
    private String statusName;            //状态名称
    private String showType;                  //显示与隐藏   1.显示    0.隐藏
    public String getShowType() {
        return showType;
    }
    public void setShowType(String showType) {
        this.showType = showType;
    }
    public String getStatusName() {
        return statusName;

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -869,6 +869,7 @@ public class BaseRequestMapping {
        public static final String REPLY = "/reply";
        public static final String FILEDOWNLOAD = "/fileDownLoad";
        public static final String FILEUPLOAD = "/fileUpLoad";
        public static final String SHOWTYPE = "/showType";
    }
}

+ 4 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/common/FileUploadController.java

@ -32,8 +32,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLDecoder;
import java.util.Base64;
import java.util.Map;
import java.util.*;
/**
 * 文件上传不在微服务中处理
@ -203,6 +202,7 @@ public class FileUploadController extends EnvelopRestEndpoint {
        files.setFile(file);
        files.setObjectType(objectType);
        files.setSize(file.getSize());
        logger.info("file size"+file.getSize());
        files.setTaskId(taskId);
        String taskid = fileManageService.chunkUploadByMappedByteBuffer(files);
        logger.info("taskid"+taskid);
@ -210,7 +210,9 @@ public class FileUploadController extends EnvelopRestEndpoint {
            System.out.println("第"+files.getChunk());
            return success("未传完",uploadVO);
        }else {
            File file1 = new File(taskid);
            logger.info("size:"+file1.getTotalSpace());
            FileInputStream input = new FileInputStream(file1);
            MultipartFile multipartFile = new MockMultipartFile("file", file1.getName(), "text/plain", IOUtils.toByteArray(input));
            if (isClose.equalsIgnoreCase("1")){

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/searchClient/ClientSearchEndpoint.java

@ -133,5 +133,18 @@ public class ClientSearchEndpoint extends EnvelopRestEndpoint {
        }
    }
    @PostMapping(BaseRequestMapping.ClientSearch.SHOWTYPE)
    @ApiOperation("隐藏与显示")
    public Envelop ShowType(@ApiParam(name = "id",value = "")
                            @RequestParam(value = "id",required = true) String id,
                            @ApiParam(name = "showType",value = "")
                            @RequestParam(value = "showType",required = true) String showType){
        try{
            clientSearchService.updataShowType(id,showType);
            return success("success");
        }catch (Exception e){
            return failedException(e);
        }
    }
}

+ 8 - 7
svr/svr-base/src/main/java/com/yihu/jw/base/service/clientSearch/ClientSearchService.java

@ -27,13 +27,6 @@ public class ClientSearchService extends BaseJpaService<BaseSearchNoveltyRepeatD
    public BaseSearchNoveltyRepeatDO saveBaseSearchNoveltyRepeat(BaseSearchNoveltyRepeatDO baseSearchNoveltyRepeatDO){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
        Date date = new Date();
        /*String str = sdf.format(date);
        str.replace("-","");
        str.replace("-","");
        str.replace(":","");
        str.replace(":","");
        str.replace(" ","");
        String num = str;*/
        Random r = new Random();
        //获取随机数
        int number = r.nextInt();
@ -41,6 +34,7 @@ public class ClientSearchService extends BaseJpaService<BaseSearchNoveltyRepeatD
        baseSearchNoveltyRepeatDO.setStatus(1);
        baseSearchNoveltyRepeatDO.setStatusName("待接收");
        baseSearchNoveltyRepeatDO.setCreateTime(new Date());
        baseSearchNoveltyRepeatDO.setShowType("1");       //默认值是1,显示
        return baseSearchNoveltyRepeatDao.save(baseSearchNoveltyRepeatDO);
    }
@ -106,4 +100,11 @@ public class ClientSearchService extends BaseJpaService<BaseSearchNoveltyRepeatD
        return baseSearchNoveltyRepeatDO;
    }
    public void updataShowType(String id,String showType) {
        BaseSearchNoveltyRepeatDO baseSearchNoveltyRepeatDO = baseSearchNoveltyRepeatDao.findOne(id);
        if (baseSearchNoveltyRepeatDO != null){
            baseSearchNoveltyRepeatDO.setShowType(showType);
            baseSearchNoveltyRepeatDao.save(baseSearchNoveltyRepeatDO);
        }
    }
}

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

@ -338,7 +338,9 @@ public class DetectionPlatformService  {
    public JSONObject getDistributionOfWarningTypes(){
        JSONObject object = new JSONObject();
        /****预警类型分布****/
        String sql = "SELECT hsd.dict_value,aa.count FROM wlyy_hospital_sys_dict hsd LEFT JOIN (SELECT serve_desc,COUNT(1) count FROM base_security_monitoring_order GROUP BY serve_desc)aa ON hsd.dict_value = aa.serve_desc WHERE hsd.dict_name = 'security_server_dict'";
        String sql = "SELECT hsd.`value`,aa.count FROM base_system_dict_entry hsd LEFT JOIN \n" +
                "(SELECT topic_item,COUNT(1) count FROM base_security_monitoring_order GROUP BY topic_item)aa \n" +
                "ON CONVERT(hsd.`code` USING utf8) COLLATE utf8_unicode_ci = aa.topic_item  WHERE hsd.remark = 'security'";
        List<Map<String , Object>> list = jdbcTemplate.queryForList(sql);
        /****工单总量****/

+ 6 - 1
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/endpoint/DeviceController.java

@ -145,7 +145,12 @@ public class DeviceController {
                deviceDetail.setDeviceModel(deviceModel);
                deviceDetail.setDeviceCode(deviceCode);
                deviceDetail.setSim(sim);
                deviceDetail.setBindingCount("0");
                if (bindingCount.equals("多人设备")) {
                    bindingCount = "{\"1\":\"0\",\"2\":\"0\"}";
                } else {
                    bindingCount = "{\"1\":\"0\"}";
                }
                deviceDetail.setBindingCount(bindingCount);
                deviceDetail.setDeviceType(Integer.parseInt(deviceType));
                correctLs.add(deviceDetail);
            }