- 博客(48)
- 问答 (1)
- 收藏
- 关注

原创 java导入完整模板二(新版)
1.在pom引入jra包<!-- springBoot相关 start --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <version>...
2019-12-30 14:32:44
857
1

原创 Java导入完整版模板
1.在pom引入jra包<!--导入导出excel--><dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.15</version> ...
2019-05-31 16:19:01
2891
5

原创 Java导出完整版模板(pdf)
1.在pom引入jra包<!--itext的jar包 生成pdf 兼容linux windows--><dependency> <groupId>com.itextpdf</groupId> <artifactId>itextpdf</artifactId> <version>...
2019-05-31 15:17:44
998

原创 Java导出完整版模板(export)
1.在pom引入jra包<!--导入导出excel--><dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.15</version> ...
2019-05-31 11:47:30
2652
1
原创 java获取上个月
protected static String getLastMonth() { // 初始化值 // LocalDate today = LocalDate.of(2021, 1, 2); LocalDate today = LocalDate.now(); today = today.minusMonths(1); // 月份减一 DateTimeFormatter formatters = DateTimeForm...
2022-03-09 17:55:45
1018
原创 json字符串转list集合
1.引入com.alibaba.fastjson.JSONArray包String str = "";List<SowDetailDto> sowDetailDtos = JSONArray.parseArray(str, SowDetailDto.class);for (SowDetailDto s : sowDetailDtos) { System.out.print...
2020-04-28 22:08:54
3276
转载 window10远程连接显示出现了内部错误
cmd中输入services.msc找到Remote Desktop Services服务,重启该服务。
2020-04-22 18:27:41
5950
原创 用户表与权限表的设计
– 表的设计1.用户表2.角色表3.权限表4.用户角色表5.角色权限表(模块权限表、模块列权限表、模块按钮权限表)6.其他(模块表、模块列表、按钮表)– 权限调用一.显示菜单权限查询有哪些模块的权限(用户角色表、角色权限表-模块、模块表)二.点击菜单显示模块、模块列以及按钮权限1.查出对应模块的权限(用户角色表、角色权限表-模块、模块表)2.查出对应模块列的权限(用户角色表...
2020-04-20 15:58:42
957
转载 自定义注解
注解的基础1.注解的定义:Java文件叫做Annotation,用@interface表示。2.元注解:@interface上面按需要注解上一些东西,包括@Retention、@Target、@Document、@Inherited四种。3.注解的保留策略: @Retention(RetentionPolicy.SOURCE) // 注解仅存在于源码中,在class字节码文件中不包含...
2020-04-20 15:37:16
137
原创 java调其他接口
1.get请求将得到的文件保存到某个地址private void reviewDepositGet(String fileUrl, String pdfUrl, String urlStr) { try { File file = new File(fileUrl); if (!file.exists()) { // 文件夹不存在则创建文件夹 ...
2019-12-03 16:59:40
192
原创 压缩文件
import com.fominfo.common.util.LogUtil;import java.io.*;import java.util.Arrays;import java.util.List;import java.util.zip.ZipEntry;import java.util.zip.ZipInputStream;import java.util.zip.ZipO...
2019-12-03 16:34:14
171
原创 layui的复杂表头
table.render({ id: "rowId", elem: '#declaration-table', where: { projectName: $("input[name='projectName']").val() == "" ? null : $("input[name='projectName']").val(), govNam...
2019-09-23 16:26:05
1511
转载 遍历List集合,删除符合条件的元素
迭代器遍历List集合,并删除另外一个数组中name相同的元素List<Student> stuList = new ArrayList<Student>();String[] names = ["aaa","bbb","ccc"];//此处为举例子Iterator iterator = stuList.iterator(); while(iterator.hasN...
2019-05-31 17:22:54
708
原创 layui的上传
// 上传人员清单$("#buttonList").on('click', "#uploadPersonnelList", function () { var companyId = $.trim($('#COMPANY').val()); if (companyId == null || companyId == "") { layer.msg("请选择外包公司...
2019-05-29 14:49:59
146
原创 oracle得到某个字符串前后的值
select TEXT,VALUE,case when instr(text,'#') = 0 then text else substr(text,1,instr(text,'#')-1) end reason,case when instr(text,'#') = 0 then '0' else substr(text,instr(text,'#')+1,length(text)-inst...
2019-04-29 16:26:53
925
原创 layui获取下拉框自定义的值
<select id="reason" name="reason" lay-filter="reason"> <option value="111" data-score="90">aaa</option></select>form.on('select(reason)',function (data) { // 得到选中的值...
2019-04-29 11:29:14
1244
原创 layui得到表格复选框取到的值
1.定义表格<table class="layui-table" lay-size="sm" id="parse-table-demo" lay-data="{page: true,id:'layTable',page:'true'}" lay-filter="parse-table-demo"></table>2.定义复选框{ field:'choice...
2019-04-10 15:39:38
1774
原创 layui实现动态显示表格按钮
1.html<script type="text/html" id="barDemo"> <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">明细</a> {{# if(d.rewPenStatus == 'confirmation'){ }} ...
2019-04-10 15:28:02
5189
原创 java字符串转数组
// 将得到的"["2","3","4","5"]"格式字符串转换成集合String rowIds = "[\"2\",\"3\",\"4\",\"5\"]";String str = rowIds.replaceAll(" +","");// 去空格String strSub = str.substring(1,str.length()-1);String strArray[] = st...
2019-04-10 11:59:43
12010
原创 echarts图表
需引用最新的最新4.2版本的js(<script src="echarts.min.js"></script>)1.柱状图var myChart = echarts.init(document.getElementById('todayRole')); var dataAxis = ['物业管理','住户','陌生人','黑名单','租户']; var ...
2019-03-22 11:12:04
181
原创 idea配置tomcat
1.把要运行的项目打包成war包<packaging>war</packaging><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId&g
2019-03-13 18:20:03
3009
原创 名称不可重复
DoctorWareHouse wareHouse = RespHelper.or500(doctorWarehouseReaderService.findWareHousesByFarmAndWareHousesName(warehouseDto.getFarmId(), warehouseDto.getName()));if (notNull(wareHouse)) { thro...
2019-01-22 16:48:49
342
原创 Java 将一个list按照某个字段分组后放入到一个新的list里
List dataList = 从数据库查询到的Map dataItem; // 数据库中查询到的每条记录Map&amp;lt;String, List&amp;gt; resultMap= new HashMap&amp;lt;String, List&amp;gt;(); // 最终要的结果for(int i=0;i&amp;lt;dataList.size();i++){dataItem = dataLis
2019-01-22 16:46:56
4424
原创 layui分页后端代码
public Map<String, Object> paging(Map<String, Object> params) {Map<String,Object> result = Maps.newLinkedHashMap();try {int pageNo = Integer.parseInt(String.valueOf(params.get(“pa...
2019-01-22 16:43:08
1167
转载 json转换
//1、使用JSONObject net.sf.json;JSONObject jsonObject=JSONObject.fromObject(objectStr);Student stu=(Student)JSONObject.toBean(jsonObject, Student.class);String objectStr="{“name”:“JSON”,“age”:“24”,“a...
2019-01-22 16:39:41
99
转载 判断今天是星期几
const current = new Date()const weekday = current.getDay()||7; //获取星期几,getDay()返回值是 0(周日) 到 6(周六) 之间的一个整数。0||7为7,即weekday的值为1-7current.setDate(current.getDate()-weekday+1);//往前算(weekday-1)天,年份、月份会自动...
2019-01-22 16:35:26
296
原创 react根据类型展示前端自定义的值
{ title: ‘类型’, dataIndex: ‘type’, width: 200, key: ‘type’, render: (type) => { type == 1 ? “集团” : “公司” }},
2019-01-22 16:30:26
409
原创 layui实现模糊
select name="buildId" id="buildId" lay-filter="buildingFilter" lay-search=""> <option value=""></option> </select>只需要在selec
2019-01-22 16:27:43
1669
原创 react下拉框模糊查询
– 方法// 关联子公司的时候模糊查询filterOption=(inputValue,option)=&gt;{if(option.key.indexOf(inputValue)!=-1){//模糊匹配return true;}else{return false;}}– 调方法&lt;Select filterOption={this.filterOption} {…getF...
2019-01-22 16:24:52
4105
1
原创 mysql格式
– 日期格式转换date_format(ma.apply_date,’%Y-%m-%d %k:%i:%s’)– 数字格式转换 1.四舍五入保留三位小数 round((pe.farrow_weight/ge.quantity),3) 2.转换成三位小数展示 FORMAT((pe.farrow_weight/ge.quanti...
2019-01-22 16:21:27
544
1
空空如也
layui日期控件设置最大月份,但是最大月份不可确定是什么情况?
2019-04-19
TA创建的收藏夹 TA关注的收藏夹
TA关注的人