1.客户列表接口修改,新增返回字段 deptName
2.删除 system.out... 以往语句
17 files modified
1 files added
| | |
| | | import org.springblade.report.service.ReportFileService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | //将map转换为json对象 |
| | | String body = JSON.toJSONString(map); |
| | | if (null!=beanName){ |
| | | // List<ParcelExcel> parcelExcels = new ArrayList<>(); |
| | | // ParcelExcel parcelExcel = new ParcelExcel(); |
| | | // parcelExcel.setCheckMachineCode("ceshi"); |
| | | // parcelExcel.setCheckMachineName("ceshi"); |
| | | // parcelExcel.setCheckMachinePosition("ceshi"); |
| | | // parcelExcel.setImgUrl("ceshi"); |
| | | // parcelExcel.setDecisioDiagramResultDetails("ceshi"); |
| | | // parcelExcels.add(parcelExcel); |
| | | List<ParcelExcel> parcelList = reportClient.getParcelList(body); |
| | | return parcelList; |
| | | } |
| | |
| | | database: |
| | | provider: |
| | | prefix: blade- |
| | | |
| | |
| | | SimpleDateFormat sdf = new SimpleDateFormat();// 格式化时间 |
| | | sdf.applyPattern("yyyy-MM-dd HH:mm:ss");// a为am/pm的标记 |
| | | Date date = new Date();// 获取当前时间 |
| | | //System.out.println("现在时间:" + sdf.format(date)); // 输出已经格式化的现在时间(24小时制) |
| | | |
| | | Operation operation = new Operation(); |
| | | operation.setJid(alarmVO.getId().toString()); |
| | |
| | | int length = body.length(); |
| | | //3.截取,由于获取数据时,} 被去除,需要加上 |
| | | String dataBody = body.substring(i, length)+"}"; |
| | | System.out.println("dataBody = " + dataBody); |
| | | //4.数据转换 |
| | | Map<String,Object> data = (Map<String, Object>) JSONObject.parse(dataBody); |
| | | //5.创建体温数据对象 |
| | |
| | | //遍历集合 |
| | | for (BladeAnimalHeat animalHeat:collect) { |
| | | try { |
| | | System.out.println("animalHeat.getCreateTime() = " + animalHeat.getCreateTime()); |
| | | long hours = animalHeat.getCreateTime().getHours(); |
| | | if (hours>0 && hours< AlarmTimeConstant.TWO){ |
| | | count02+=1; |
| | |
| | | File w2 = new File("D://"+PRE_URL+StringPool.SLASH+ UUID+".jpg"); |
| | | //判断父文件夹存在与否 |
| | | File parentFile = w2.getParentFile(); |
| | | System.out.println("parentFile = " + parentFile); |
| | | if (!parentFile.exists()){ |
| | | //如果不存在,则创建 |
| | | parentFile.mkdirs(); |
| | |
| | | // catalogService.updateCatalog(deviceName,deviceNumber,pId); |
| | | // } |
| | | |
| | | System.out.println(equipment.getDeptId()); |
| | | return R.status(equipmentService.saveOrUpdate(equipment)); |
| | | } |
| | | |
| | |
| | | equipmentService.saveImg(equipment); |
| | | } |
| | | |
| | | System.out.println(equipment.getDeptId()); |
| | | return R.status(equipmentService.saveOrUpdate(equipment)); |
| | | } |
| | | |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | import static java.time.LocalDate.now; |
| | | |
| | | /** |
| | | * @title 包裹控制层 |
| | | * @author arsn |
| | |
| | | */ |
| | | @GetMapping("/export-parcel") |
| | | public void exportParcel(ConditionVo conditionVo, HttpServletResponse response){ |
| | | System.out.println("parStart = " + now()); |
| | | List<ParcelExcel> list = parcelService.exportParcel(conditionVo); |
| | | System.out.println("parEnd = " + now()); |
| | | ExcelUtil.export(response, "包裹数据" + DateUtil.time(), "包裹数据表", list, ParcelExcel.class); |
| | | } |
| | | |
| | |
| | | @GetMapping("/export-parcelKind") |
| | | public void exportParcelKind(ConditionVo conditionVo, HttpServletResponse response){ |
| | | List<ParcelKindExcel> parcelKindExcelList = parcelService.exportParcelKind(conditionVo); |
| | | System.out.println("parcelKindExcelList = " + parcelKindExcelList); |
| | | ExcelUtil.export(response, "违禁品数据" + DateUtil.time(), "违禁品数据表", parcelKindExcelList, ParcelKindExcel.class); |
| | | } |
| | | |
| | |
| | | map.put("imgKey",imgKey); |
| | | //执行http远程调用 |
| | | String s = HttpClientUtils.doGetHeaderPictureBase64(PARCEL_PICTURE_URL, PARCEL_KEY, PARCEL_SECRET, map); |
| | | System.out.println("s = " + s); |
| | | if (null==s || s=="" || s.isEmpty()){ |
| | | return null; |
| | | } |
| | |
| | | //设置页码数 |
| | | conditionVo.setCurrentPage(1); |
| | | conditionVo.setPageSize(100); |
| | | System.out.println("sysStartTIme = " + now()); |
| | | //获取数据 |
| | | Map<String,Object> result =(Map<String,Object>)getParcelDataPageList(conditionVo, PARCEL_DETAIL_RUL, PARCEL_KEY, PARCEL_SECRET).get("result"); |
| | | if (null!=result) { |
| | |
| | | } |
| | | //合并集合 |
| | | List<ParcelExcel> parcelExcels = parcelExcelList.stream().flatMap(List::stream).collect(Collectors.toList()); |
| | | System.out.println("sysEndTIme = " + now()); |
| | | return parcelExcels; |
| | | } |
| | | return null; |
| | |
| | | public List<ParcelKindExcel> exportParcelKind(ConditionVo conditionVo) { |
| | | List<List<ParcelKindExcel>> parcelKindExcelList = new ArrayList<>(); |
| | | List<ParcelKindExcel> list = new ArrayList<>(); |
| | | System.out.println("sysStartTIme = " + now()); |
| | | if(null!=conditionVo.getTimeDesc() && conditionVo.getTimeDesc()!="" && !conditionVo.getTimeDesc().equals("undefined") ){ |
| | | //设置页码数 |
| | | ConditionVo vo = new ConditionVo(); |
| | |
| | | } |
| | | //合并集合并返回 |
| | | List<ParcelKindExcel> parcelKindExcels = parcelKindExcelList.stream().flatMap(List::stream).collect(Collectors.toList()); |
| | | System.out.println("sysEndTIme = " + now()); |
| | | return parcelKindExcels; |
| | | } |
| | | } |
| | |
| | | |
| | | response = httpclient.execute(get); |
| | | |
| | | System.out.println(response.getStatusLine()); |
| | | |
| | | if (200 == response.getStatusLine().getStatusCode()) { |
| | | HttpEntity entity = response.getEntity(); |
| | |
| | | |
| | | response = httpclient.execute(post); |
| | | |
| | | System.out.println(response.getStatusLine()); |
| | | |
| | | if (200 == response.getStatusLine().getStatusCode()) { |
| | | HttpEntity entity = response.getEntity(); |
| | | resultString = EntityUtils.toString(entity, "utf-8"); |
| | |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("scope", "project"); |
| | | params.put("q", "数据库"); |
| | | // |
| | | // System.out.println(doGet("http://www.baidu.com/s",params)); |
| | | |
| | | /** |
| | | * 有一部分网站,禁止爬虫技术访问网站。 |
| | |
| | | param.append(entry.getKey()); |
| | | param.append("="); |
| | | param.append(entry.getValue()); |
| | | // System.out.println(entry.getKey()+":"+entry.getValue()); |
| | | } |
| | | // System.out.println("param:"+param.toString()); |
| | | out.write(param.toString()); |
| | | } |
| | | // flush输出流的缓冲 |
| | |
| | | try { |
| | | // 将图表写入到ByteArrayOutputStream流中 |
| | | ChartUtilities.writeChartAsJPEG(bos, chart, 800, 700); |
| | | System.out.println("bos = " + bos); |
| | | InputStream inputStream = new ByteArrayInputStream(bos.toByteArray()); |
| | | String fileName = "imageWrite" + System.currentTimeMillis() + ".xlsx"; |
| | | imageData.setInputStream(inputStream); |
| | |
| | | |
| | | @Override |
| | | public void run() { |
| | | System.out.println(streamURL); |
| | | // 获取视频源 |
| | | FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(streamURL); |
| | | FFmpegFrameRecorder recorder = null; |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "树形结构", notes = "树形结构") |
| | | public R<List<DeptVO>> trees(String tenantId, BladeUser bladeUser) { |
| | | System.out.println("tenantId = " + tenantId); |
| | | List<DeptVO> tree = deptService.trees(); |
| | | return R.data(tree); |
| | | } |
| | |
| | | import org.springblade.system.entity.Tenant; |
| | | import org.springblade.system.service.ITenantService; |
| | | import org.springblade.system.vo.RoleVO; |
| | | import org.springblade.system.vo.TenantVo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "分页", notes = "传入tenant") |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMIN) |
| | | public R<IPage<Tenant>> page(Tenant tenant, Query query) throws ParseException { |
| | | IPage<Tenant> pages = tenantService.selectTenantPage(Condition.getPage(query), tenant); |
| | | public R<IPage<TenantVo>> page(Tenant tenant, Query query) throws ParseException { |
| | | IPage<TenantVo> pages = tenantService.selectTenantPage(Condition.getPage(query), tenant); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.system.entity.Tenant; |
| | | import org.springblade.system.vo.TenantVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @param tenant |
| | | * @return |
| | | */ |
| | | List<Tenant> selectTenantPage(IPage page, Tenant tenant); |
| | | List<TenantVo> selectTenantPage(IPage page, Tenant tenant); |
| | | List<Map<String, Object>> selectListTe(String type); |
| | | int inserts(String dj, String had, String ht, String ctime,String content,String hn); |
| | | void updateInfoy(String dj, String had, String ht, String ctime,String content,String hn); |
| | |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectTenantPage" resultMap="tenantResultMap"> |
| | | select * from blade_tenant where is_deleted = 0 and tenant_id!=000000 |
| | | <select id="selectTenantPage" resultType="org.springblade.system.vo.TenantVo"> |
| | | select bt.*,bd.id deptId from blade_tenant bt |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bt.tenant_id=bd.tenant_id |
| | | where bt.is_deleted = 0 |
| | | and bt.tenant_id!=000000 |
| | | and bd.dept_category=1 |
| | | <if test="tenant.tenantName!=null and tenant.tenantName!=''"> |
| | | and tenant_name=#{tenant.tenantName} |
| | | </if> |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import org.springblade.system.entity.Tenant; |
| | | import org.springblade.system.vo.TenantVo; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | * @param tenant |
| | | * @return |
| | | */ |
| | | IPage<Tenant> selectTenantPage(IPage<Tenant> page, Tenant tenant); |
| | | IPage<TenantVo> selectTenantPage(IPage<TenantVo> page, Tenant tenant); |
| | | |
| | | /** |
| | | * 根据租户编号获取实体 |
| | |
| | | import org.springblade.system.user.entity.User; |
| | | import org.springblade.system.user.enums.UserEnum; |
| | | import org.springblade.system.user.feign.IUserClient; |
| | | import org.springblade.system.vo.TenantVo; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | private final IUserClient userClient; |
| | | |
| | | @Override |
| | | public IPage<Tenant> selectTenantPage(IPage<Tenant> page, Tenant tenant) { |
| | | public IPage<TenantVo> selectTenantPage(IPage<TenantVo> page, Tenant tenant) { |
| | | return page.setRecords(baseMapper.selectTenantPage(page, tenant)); |
| | | } |
| | | |
| New file |
| | |
| | | package org.springblade.system.vo; |
| | | |
| | | import lombok.Data; |
| | | import org.springblade.system.entity.Tenant; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class TenantVo extends Tenant implements Serializable { |
| | | private Long deptId; |
| | | } |