说明 大标题 #### 小标题 +
作者: chena chenj dengzb huangzs miaoyz zhux
+官网说明:https://poi.apache.org/components/spreadsheet/formula.html
+论坛说明:https://blog.csdn.net/wengengeng/article/details/52664683
Excel的函数支持情况如下:
支持的函数:
[ABS, ACOS, ACOSH, ADDRESS, AND, ASIN, ASINH, ATAN, ATAN2, ATANH, AVEDEV, AVERAGE, CEILING, CHAR, CHOOSE, CLEAN, CODE, COLUMN, COLUMNS, COMBIN, CONCATENATE, COS, COSH, COUNT, COUNTA, COUNTBLANK, COUNTIF, DATE, DAY, DAYS360, DEGREES, DEVSQ, DOLLAR, ERROR.TYPE, EVEN, EXACT, EXP, FACT, FALSE, FIND, FIXED, FLOOR, FV, HLOOKUP, HOUR, HYPERLINK, IF, INDEX, INDIRECT, INT, INTERCEPT, IPMT, IRR, ISBLANK, ISERROR, ISLOGICAL, ISNA, ISNONTEXT, ISNUMBER, ISREF, ISTEXT, LARGE, LEFT, LEN, LN, LOG, LOG10, LOOKUP, LOWER, MATCH, MAX, MAXA, MEDIAN, MID, MIN, MINA, MINUTE, MIRR, MOD, MODE, MONTH, NA, NOT, NOW, NPER, NPV, ODD, OFFSET, OR, PERCENTILE, PI, PMT, POISSON, POWER, PPMT, PRODUCT, PROPER, PV, RADIANS, RAND, RANK, RATE, REPLACE, REPT, RIGHT, ROMAN, ROUND, ROUNDDOWN, ROUNDUP, ROW, ROWS, SEARCH, SECOND, SIGN, SIN, SINH, SLOPE, SMALL, SQRT, STDEV, SUBSTITUTE, SUBTOTAL, SUM, SUMIF, SUMPRODUCT, SUMSQ, SUMX2MY2, SUMX2PY2, SUMXMY2, T, TAN, TANH, TEXT, TIME, TODAY, TRIM, TRUE, TRUNC, UPPER, VALUE, VAR, VARP, VLOOKUP, WEEKDAY, YEAR]
不支持的函数:
[AREAS, ASC, AVERAGEA, BETADIST, BETAINV, BINOMDIST, CELL, CHIDIST, CHIINV, CHITEST, CONFIDENCE, CORREL, COVAR, CRITBINOM, DATEDIF, DATESTRING, DATEVALUE, DAVERAGE, DB, DBCS, DCOUNT, DCOUNTA, DDB, DGET, DMAX, DMIN, DPRODUCT, DSTDEV, DSTDEVP, DSUM, DVAR, DVARP, EXPONDIST, FDIST, FINDB, FINV, FISHER, FISHERINV, FORECAST, FREQUENCY, FTEST, GAMMADIST, GAMMAINV, GAMMALN, GEOMEAN, GETPIVOTDATA, GROWTH, HARMEAN, HYPGEOMDIST, INFO, ISERR, ISPMT, KURT, LEFTB, LENB, LINEST, LOGEST, LOGINV, LOGNORMDIST, MDETERM, MIDB, MINVERSE, MMULT, N, NEGBINOMDIST, NORMDIST, NORMINV, NORMSDIST, NORMSINV, NUMBERSTRING, PEARSON, PERCENTRANK, PERMUT, PHONETIC, PROB, QUARTILE, REPLACEB, RIGHTB, RSQ, SEARCHB, SKEW, SLN, STANDARDIZE, STDEVA, STDEVP, STDEVPA, STEYX, SYD, TDIST, TIMEVALUE, TINV, TRANSPOSE, TREND, TRIMMEAN, TTEST, TYPE, USDOLLAR, VARA, VARPA, VDB, WEIBULL, ZTEST]
错误
select * from iscm_assembly_plan plans left join sys_user users on plans.creator_code = users.user_code
where plans.status in (1)
正确
select plans.* from iscm_assembly_plan plans left join sys_user users on plans.creator_code = users.user_code
where plans.status in (1)
原因:iscm_assembly_plan与sys_user都存在status 当使用 * 进行select时 会存在两个同名的字段status ,当使用where进行status查询时会出现Duplicate column name 'status'错误,无法识别使用哪个status进行查询,即便指定了plans.status 也是无法达到要求的,因为plans.status只是指定条件,而条件查询的结果集采用* 是无法识别是那个表的status
论坛网址:https://blog.csdn.net/JokerLJG/article/details/123971153
结论:推荐使用@Resource 它的兼容性更高
论坛网址:https://blog.csdn.net/qq_45793102/article/details/115691829
Dao接口要想被容器扫描到,有两种解决方案:
* 方案一:在Dao接口上添加`@Mapper`注解,并且确保Dao处在引导类所在包或其子包中
* 该方案的缺点是需要在每一Dao接口中添加@Mapper注解
* 方案二:在引导类上添加`@MapperScan`注解,其属性为所要扫描的Dao所在包
* 该方案的好处是只需要写一次,则指定包下的所有Dao接口都能被扫描到,`@Mapper`就可以不写。
论坛网址:https://blog.csdn.net/qq_40795958/article/details/126281348?spm=1001.2014.3001.5502
案例网址:https://blog.csdn.net/weixin_42397739/article/details/113155206
论坛网址:https://www.cnblogs.com/ShakeTian/articles/16145227.html
配置文件中:file与classpath的含义
file:可以引入项目中除了classpath外其他目录(不限于本项目)的配置文件。
classpath:就是引入你项目这个目录下的配置文件。
绝对路径:https://www.yiibai.com/java_io/file.getabsolutepath.html
静态资源配置:https://blog.csdn.net/qq_22771739/article/details/83988227
springboot使用idea内嵌的git拉取出现项目结构不正确,导致springboot的框架pom无法被识别与加载,
从而导致本地的依赖加载正常,而项目无法启动,并要求加载本地的非远程的依赖,set/get爆红,通常是
代码中使用了Lombok的注解而没有安装lombok插件所导致
https://blog.csdn.net/aiwokache/article/details/125999156
报错:
org.junit.runners.model.InvalidTestClassError: Invalid test class 'com.XX.XXX'
原因:junit 包导错导致测试类启动异常,处理如下
import org.junit.jupiter.api.Test 换成 import org.junit.Test
https://blog.csdn.net/weixin_37178320/article/details/105066875
开发过程中需要用到 yum 命令 有时候执行 yum 会报错如下
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 48 M RSS (443 MB VSZ)
Started: Thu Mar 26 09:47:03 2020 - 00:23 ago
State : Running, pid: *****
原因分析 :yum只能支持一个例程运行,如果有一个例程已经在运行,其他的必须等待该进程退出释放lock。出现这种情况时,
可以用以下命令来恢复:
rm -f /var/run/yum.pid
四种转化:
https://vimsky.com/examples/usage/java-program-to-convert-list-to-hashset.html
org.springframework.data.redis.serializer.SerializationException: Could not read JSON: Cannot construct instance of `com.rediss.domain.User` (no Creators, like default constructor, exist)
这个报错是因为使用junit进行测试案例时,必须要确保使用的对象有无参构造方法,否则就会报错
网址:https://blog.csdn.net/qq_43510558/article/details/124133396
https://blog.csdn.net/kzadmxz/article/details/80394351
List<Integer> list = Arrays.asList(1, 5, 8, 9, 4, 20, 11, 43, 55);
list.add(123);//Arrays.asList定长度,无法添加和删除元素
List<Integer> list2 = new ArrayList<>(list);
list2.add(123);
System.out.println(list2);
https://blog.csdn.net/Dongguabai/article/details/80297829
https://blog.csdn.net/u010416101/article/details/123468968/
https://blog.csdn.net/tianyuzui6/article/details/124417267
https://blog.csdn.net/lolichan/article/details/84922643
https://blog.csdn.net/jerry741/article/details/116104908
https://blog.csdn.net/AlbenXie/article/details/115798728
package com.skeqi.test.test;
import com.skeqi.WMSApplication;
import com.skeqi.api.service.IBaseCodeGenerationRulesService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@Slf4j
@SpringBootTest(classes = WMSApplication.class)
@RunWith(SpringRunner.class)
public class TestDemo {
@Autowired
IBaseCodeGenerationRulesService iBaseCodeGenerationRulesService;
@Test
public void test1(){
String xt001 = iBaseCodeGenerationRulesService.generateCode("XT001");
log.info(xt001);
}
}