Commit 20109acc by wangweidong

土工试验LIMS初始化修改

parent 14ba1fa8
FROM java:8
VOLUME /tmp
EXPOSE 8005
# Path to jar created by gradle build
ADD build/libs/patzn-cloud-service-lims-1.0.jar app.jar
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
\ No newline at end of file
ext {
configuration = [
javaVersion = JavaVersion.VERSION_1_8
]
// 仓库配置
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://repo.spring.io/release' }
maven { url 'https://repo.spring.io/milestone' }
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'http://119.3.176.130:8081/repository/patzn-releases/' }
maven { url 'http://119.3.176.130:8081/repository/patzn-snapshots/' }
jcenter()
}
}
// 编译脚本
buildscript {
ext {
springCloudVersion = "Greenwich.SR2"
springBootVersion = "2.1.7.RELEASE"
nettyAllVersion = '4.1.43.Final'
}
// 仓库配置
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://repo.spring.io/release' }
maven { url 'https://repo.spring.io/milestone' }
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: "java"
apply plugin: "maven"
apply plugin: "idea"
apply plugin: 'org.springframework.boot'
apply plugin: "io.spring.dependency-management"
group = "com.patzn.cloud"
version = "1.0"
description "计量检定服务"
sourceCompatibility = "${javaVersion}"
targetCompatibility = "${javaVersion}"
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
configurations {
compile.exclude group: "ch.qos.logback"
compile.exclude group: "com.amazonaws"
compile.exclude group: "org.apache.tomcat"
// 使用Undertow 替代Tomcat
compile.exclude module: "spring-boot-starter-tomcat"
compile.exclude module: "undertow-websockets-jsr"
compile.exclude module: "spring-boot-starter-logging"
compile.exclude module: "slf4j-simple"
}
// 依赖管理
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
dependencies {
compile fileTree(dir: "libs", include: "*.jar")
// 报表依赖 Begin
compile("org.apache.commons:commons-lang3:3.5")
compile("commons-beanutils:commons-beanutils-core:1.8.3")
compile("com.itextpdf:itextpdf:5.5.13")
compile("com.google.zxing:core:3.3.3")
compile("org.codehaus.jackson:jackson-mapper-asl:1.9.13")
compile("commons-io:commons-io:2.5")
compile("commons-fileupload:commons-fileupload:1.3.3")
compile("org.antlr:antlr4-runtime:4.7.1")
compile("org.dom4j:dom4j:2.1.1")
// 报表依赖 End
compile("com.baomidou:jobs-spring-boot-starter:1.0.3.3")
compile("io.netty:netty-all:${nettyAllVersion}")
compile("com.cronutils:cron-utils:9.0.2")
compile("com.caucho:hessian:4.0.62")
compile("com.patzn.cloud:patzn-entitys:2.0")
compile("com.patzn.cloud:patzn-feign-base:2.0")
compile("com.patzn.cloud:patzn-feign-lims:2.0")
compile("com.patzn.cloud:patzn-feign-standard:2.0")
compile("com.patzn.cloud:patzn-service-parent:2.0")
compile("com.patzn.cloud:patzn-oss-starter:2.0")
compile("com.patzn.cloud:patzn-mq-starter:2.0")
compile("org.springframework.boot:spring-boot-starter-mail")
compile('org.springframework.boot:spring-boot-starter-freemarker')
compile("org.springframework.boot:spring-boot-starter-data-redis")
compile("com.belerweb:pinyin4j:2.5.1")
compile("com.patzn.cloud:patzn-poi-box:2.0")
compile("net.coobird:thumbnailator:0.4.8")
compile("com.google.guava:guava:25.1-jre")
compile("net.java.dev.jna:jna-platform:4.5.2")
compile("net.java.dev.jna:jna:4.5.2")
compile("com.google.zxing:core:3.3.3")
compile("com.google.zxing:javase:3.3.3")
compile("com.baomidou:dynamic-datasource-spring-boot-starter:2.5.7")
compile("com.qcloud:cos_api:5.2.4") {
exclude module: 'slf4j-log4j12'
}
compile("org.json:json:20170516")
// compile group: 'cn.afterturn',name:'easypoi-spring-boot-starter',version:'4.0.0'
// 开发环境经常自动启动导致报错
// compileOnly("org.springframework.boot:spring-boot-devtools")
/*compile("mysql:mysql-connector-java:8.0.12")*/
// 监控客户端
compile("de.codecentric:spring-boot-admin-starter-client:2.2.0")
// 编译测试
testCompile("com.patzn.cloud:patzn-test-parent:2.0")
}
// 帕特智能 - 云平台计量检测服务模块
rootProject.name = 'patzn-cloud-service-soil-back'
package com.patzn.cloud.service.lims;
import com.patzn.cloud.commons.lock.EnableRedisDistributedLock;
import com.patzn.cloud.commons.spring.SpringHelper;
import com.patzn.cloud.commons.starter.EnablePatzn;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* <p>
* LimsService 实验室管理服务
* </p>
*
* @author hubin
* @since 2017-08-28
*/
@EnablePatzn
@EnableAsync
@EnableCaching
@EnableSwagger2
@EnableDiscoveryClient
@EnableRedisDistributedLock
@SpringBootApplication
@EnableTransactionManagement
@EnableFeignClients(basePackages = {"com.patzn.cloud.feign"})
public class SoilServiceApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(SoilServiceApplication.class);
}
private static final Logger logger = LoggerFactory.getLogger(SoilServiceApplication.class);
public static void main(String[] args) {
SpringApplication application = new SpringApplication(SoilServiceApplication.class);
application.setBannerMode(Banner.Mode.CONSOLE);
SpringHelper.setApplicationContext(application.run(args));
SoilServiceApplication.logger.info("SoilService start!\thttp://api.dev.patzn.com:7000/soil/swagger-ui.html");
}
}
package com.patzn.cloud.service.lims.common;
import com.aspose.cells.License;
import com.aspose.cells.SaveFormat;
import com.aspose.cells.Workbook;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
/**
* @version 1.0 说明 :
*/
public class Excel2Pdf {
public static boolean getLicense() {
boolean result = false;
try {
InputStream is = Word2Pdf.class.getClassLoader()
.getResourceAsStream("classpath:statis/license.xml");
License aposeLic = new License();
aposeLic.setLicense(is);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
public static void excel2pdf(String sourceFilePath, String desFilePath) {
// 验证License 若不验证则转化出的pdf文档会有水印产生
if (!getLicense()) {
return;
}
try {
// 输出路径
File pdfFile = new File(desFilePath);
// 原始excel路径
Workbook wb = new Workbook(sourceFilePath);
FileOutputStream fileOS = new FileOutputStream(pdfFile);
wb.save(fileOS, SaveFormat.PDF);
fileOS.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
package com.patzn.cloud.service.lims.common;
import com.patzn.cloud.commons.toolkit.DateUtils;
import com.patzn.cloud.service.lims.env.vo.EnvSampleDetailVO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.poi.xwpf.usermodel.*;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class ExportPlanSample {
public static void setPlanSample(XWPFDocument doc, String tablePlanSampleTitlt, Map<String,String> tablePlanSampleMap, List<EnvSampleDetailVO> sampleList){
//创建表格1 标题
XWPFParagraph paragraphTableOneTitle= doc.createParagraph();
XWPFRun runTableOneTitle= paragraphTableOneTitle.createRun();
paragraphTableOneTitle.setAlignment(ParagraphAlignment.CENTER);
runTableOneTitle.setBold(true);
runTableOneTitle.setTextPosition(50);
runTableOneTitle.setFontSize(12);
runTableOneTitle.setText(tablePlanSampleTitlt);
//处理表格
int count=1;
if (CollectionUtils.isNotEmpty(sampleList)){
count= sampleList.size();
}
//创建表格1
XWPFTable tableOne = doc.createTable(count+1,tablePlanSampleMap.size());
XWPFTableRow rowOne0=getRow(tableOne,0);
rowOne0.setHeight(120);
int tableOneTitleIndex=0;
for (Map.Entry<String,String> map :tablePlanSampleMap.entrySet()) {
rowOne0.getCell(tableOneTitleIndex).setText(map.getValue());
tableOneTitleIndex++;
}
Map<Integer ,Integer> merger=new LinkedHashMap<>();
String point="";
Integer mergeStart=1;
Integer mergeSum=0;
for (int i=0;i<count;i++) {
int tableOneContentIndex=0;
EnvSampleDetailVO sampleDetailVO= sampleList.get(i);
if ("".equalsIgnoreCase(point)){
point =sampleDetailVO.getPoint();
}else{
if (sampleDetailVO.getPoint().equalsIgnoreCase(sampleList.get(i-1).getPoint())){
mergeSum++;
}else{
merger.put(mergeStart,mergeStart+mergeSum);
mergeStart=mergeStart+mergeStart+mergeSum;
}
if (i==count-1){
merger.put(mergeStart,count);
}
}
for (Map.Entry<String,String> map :tablePlanSampleMap.entrySet()) {
if ("samplingDate".equalsIgnoreCase(map.getKey())){
String date=DateUtils.toYearMonthDay(sampleDetailVO.getSamplingDate());
StringHandleUtils.setText(tableOne,i+1,tableOneContentIndex,date);
}else{
StringHandleUtils.setText(tableOne,i+1,tableOneContentIndex,StringHandleUtils.getFieldValueByFieldName(map.getKey(),sampleDetailVO));
}
tableOneContentIndex++;
}
}
for (Map.Entry<Integer,Integer> mapMerger :merger.entrySet()) {
PoiUtil2007.mergeCellsVertically(tableOne, 0, mapMerger.getKey(), mapMerger.getValue());
PoiUtil2007.mergeCellsVertically(tableOne, 3, mapMerger.getKey(), mapMerger.getValue());
}
}
public static XWPFTableRow getRow(XWPFTable table, int rowIndex){
return table.getRow(rowIndex);
}
public static boolean isNotEmpty(Object object){
return null!=object;
}
}
package com.patzn.cloud.service.lims.common;
import com.patzn.cloud.service.lims.env.vo.EnvPlanVO;
import org.apache.poi.xwpf.usermodel.*;
import java.lang.reflect.Method;
import java.util.Map;
public class ExportPlanUtil {
public static void setPlanInfo(XWPFDocument doc, String titlePlan,
String titleTableOne, Map<String,String> tableOneMap,
EnvPlanVO plan){
//创建方案标题
XWPFParagraph paragraphPlanTitle= doc.createParagraph();
XWPFRun runPlanTitle= paragraphPlanTitle.createRun();
runPlanTitle.setText(titlePlan);
runPlanTitle.setBold(true);
//创建表格1 标题
XWPFParagraph paragraphTableOneTitle= doc.createParagraph();
XWPFRun runTableOneTitle= paragraphTableOneTitle.createRun();
paragraphTableOneTitle.setAlignment(ParagraphAlignment.CENTER);
runTableOneTitle.setBold(true);
runTableOneTitle.setTextPosition(50);
runTableOneTitle.setFontSize(12);
runTableOneTitle.setText(titleTableOne);
int count=1;
if (isNotEmpty(plan)){
count= plan.getPointNum();
}
//创建表格1
XWPFTable tableOne = doc.createTable(count+1,tableOneMap.size());
/* tableOne.setCellMargins(30, 0, 0, 1200);// top, left, bottom, right
*/ XWPFTableRow rowOne0=getRow(tableOne,0);
rowOne0.setHeight(120);
int tableOneTitleIndex=0;
for (Map.Entry<String,String> map :tableOneMap.entrySet()) {
rowOne0.getCell(tableOneTitleIndex).setText(map.getValue());
tableOneTitleIndex++;
}
for (int i=0;i<count;i++) {
int tableOneContentIndex=0;
for (Map.Entry<String,String> map :tableOneMap.entrySet()) {
if (map.getKey().equalsIgnoreCase("points")){
String points= StringHandleUtils.getFieldValueByFieldName(map.getKey(),plan);
StringHandleUtils.setText(tableOne,i+1,tableOneContentIndex,points.split("、")[i]);
}else{
StringHandleUtils.setText(tableOne,i+1,tableOneContentIndex,StringHandleUtils.getFieldValueByFieldName(map.getKey(),plan));
}
tableOneContentIndex++;
}
}
PoiUtil2007.mergeCellsVertically(tableOne, 1, 1, count);
PoiUtil2007.mergeCellsVertically(tableOne, 2, 1, count);
PoiUtil2007.mergeCellsVertically(tableOne, 3, 1, count);
PoiUtil2007.mergeCellsVertically(tableOne, 4, 1, count);
}
public static XWPFTableRow getRow(XWPFTable table, int rowIndex){
return table.getRow(rowIndex);
}
public static boolean isNotEmpty(Object object){
return null!=object;
}
public static String getChineseNormalNum(int num) {
switch (num){
case 1:
return "一";
case 2:
return "二";
case 3:
return "三";
case 4:
return "四";
case 5:
return "五";
case 6:
return "六";
case 7:
return "七";
case 8:
return "八";
case 9:
return "九";
case 10:
return "十";
default:
return "";
}
}
public static String getChineseNum(int num) {
switch (num){
case 1:
return "一";
case 2:
return "三";
case 3:
return "五";
case 4:
return "七";
case 5:
return "九";
case 6:
return "十一";
case 7:
return "十三";
case 8:
return "十五";
case 9:
return "十七";
case 10:
return "十九";
default:
return "";
}
}
public static String getChineseTwoNum(int num) {
switch (num){
case 1:
return "二";
case 2:
return "四";
case 3:
return "六";
case 4:
return "八";
case 5:
return "十";
case 6:
return "十二";
case 7:
return "十四";
case 8:
return "十六";
case 9:
return "十八";
case 10:
return "二十";
default:
return "";
}
}
}
package com.patzn.cloud.service.lims.common;
import com.google.common.collect.Lists;
import java.util.List;
/**
* @author zhaokai
* @since 2019-11-19
*/
public interface FoodConstants {
/**
* 食品生成原始记录的绑定的数据源的key
*
* @see com.patzn.cloud.service.lims.food.service.impl.FoodItemServiceImpl#originalRecordDataBind(Long[], Long, com.patzn.cloud.commons.controller.Account)
*/
String DATASOURCE_COMMON = "common";
String CTIME = "ctime";
String CTIME_CN = "ctimeCn";
String CTIME_POINT = "ctimePoint";
String SAMPLE = "sample";
String SAMPLING = "sampling";
String CONTRACT = "contract";
String CUSTOMER = "customer";
String ENGLISH_COMMA = ",";
String CHINESE_COMMA = ",";
String PRE_RECORD = "preRecord";
String EMPTY_STR = "";
/**
* 这个表示在回调结果时,项目的行和列定位的是样品编号
*/
String ONE_ITEM_MANY_SAMPLE = "callback_sample";
String CONTENT = "content";
String DATA_SCALA = "dataQuantityScala";
String APTITUDE_ITEM_ATTACHMENT = "aptitudeItemAttachment";
String DATA_REQUEST = "revisionRequest";
String DATA_SIGNATURE = "dataQuantitySignatures";
String DATA_FORMULA = "dataQuantityFormula";
/**
* 食品的特殊的汉字检测值
*/
List<String> TEST_VALUE_LIST = Lists.newArrayList("ND", "不得检出", "未检出", "商业无菌");
/**
* 检测步骤处 JSON 字符串的 key 值
*/
String STEP_INFO = "stepInfo";
String PARAM_INFO = "paramInfo";
String DATA = "data";
String STEP_INFO_TEMP_LIST = "stepInfoTempList";
String COMMON_LIST = "commonList";
String LIST = "list";
String NAME = "name";
String FIELD_NAME = "fieldName";
String TITLE = "title";
String VALUE = "value";
String COMPLEX = "COMPLEX";
String SAMPLE_STEP = "SAMPLE_STEP";
String ITEM_STEP = "ITEM_STEP";
String STEP_OPTIONS_LIST = "optionsList";
String COMPLEX_LIST = "complexList";
String ITEM_LIST = "itemList";
String SAMPLE_LIST = "sampleList";
String INFO_LIST = "infoList";
String COMPLEX_INFO_LIST = "complexInfoList";
String SINGLE = "single";
String NUM = "num";
String SAMPLE_NUM = "sampleNum";
String TEST_VALUE = "testValue";
String TEST_VALUE_5 = "testValue5";
String TEST_VALUE_STR = "testValueStr";
String STEP_ID = "stepId";
String EQUIP = "equip";
String NAMES = "names";
String NUMS = "nums";
String DEFAULT_VALUE = "defaultValue";
String ID = "id";
String EQUIP_INFO_SAVE = "equipInfoSave";
String TEXT = "text";
String OBJECT = "object";
String ARRAY = "array";
String DATA_FIELD_TYPE = "dataFieldType";
String PROPERTIES = "properties";
String STRING = "string";
String TYPE = "type";
String TABLE = "table";
String DATA_SOURCE_BASE = "{\"$schema\":\"http://json-schema.org/draft-04/schema#\",\"properties\":{\"sample\":{\"dataFieldType\":\"text\",\"type\":\"string\",\"properties\":{\"num\":{\"dataFieldType\":\"text\",\"type\":\"string\"},\"name\":{\"dataFieldType\":\"text\",\"type\":\"string\"},\"boothNum\":{\"dataFieldType\":\"text\",\"type\":\"string\"},\"testBasis\":{\"dataFieldType\":\"text\",\"type\":\"string\"},\"standard\":{\"dataFieldType\":\"text\",\"type\":\"string\"},\"judgeBasis\":{\"dataFieldType\":\"text\",\"type\":\"string\"}}},\"common\":{\"dataFieldType\":\"text\",\"type\":\"string\",\"properties\":{\"ctime\":{\"dataFieldType\":\"text\",\"type\":\"string\"},\"ctimeCn\":{\"dataFieldType\":\"text\",\"type\":\"string\"},\"ctimePoint\":{\"dataFieldType\":\"text\",\"type\":\"string\"}}},\"sampling\":{\"dataFieldType\":\"text\",\"type\":\"string\",\"properties\":{\"samplingNum\":{\"dataFieldType\":\"text\",\"type\":\"string\"}}}},\"type\":\"object\"}";
}
package com.patzn.cloud.service.lims.common;
/**
* 食品导出检测任务单的常量
*
* @author zhaokai
* @since 2019-12-25
*/
public interface FoodExportTestTaskConstants {
/**
* 是, 否
*/
String YES_NO = "%s是 %s否";
/**
* 任务类别
*/
String TASK_TYPE_DJK_CONFIG = "taskTypeDjk";
String TASK_TYPE_DJK = "%s日常监督抽检 %s专项监督抽检 %s风险监测";
String TASK_TYPE_DAILY = "日常监督抽检";
String TASK_TYPE_SPECIAL = "专项监督抽检";
String TASK_TYPE_RISK = "风险监测";
/**
* 抽样地点
*/
String SAMPLING_PLACE_DJK_CONFIG = "samplingPlaceDjk";
String SAMPLING_PLACE_DJK = "生产环节:%s原辅料库 %s生产线/生产现场 %s半成品库 成品库(%s待检区 %s已检区) \n" +
"流通环节:%s农贸市场 %s菜市场 %s批发市场 %s商场 %s超市 %s小食杂店 %s网购 其他( %s ) \n" +
"餐饮环节:餐馆(%s特大型餐馆 %s大型餐馆 %s中型餐馆 %s小型餐馆) \n" +
" 食堂(%s机关食堂 %s学校/托幼食堂 %s企事业单位食堂 %s建筑工地食堂) \n" +
" %s小吃店 %s快餐店 %s饮品店 %s集体用餐配送单位 %s中央厨房 %s其他( %s )\n";
String SAMPLING_PLACE_YFLK = "原辅料库";
String SAMPLING_PLACE_SCXC = "生产线";
String SAMPLING_PLACE_BCPK = "半成品库";
String SAMPLING_PLACE_CPKDJQ = "成品库(待检区)";
String SAMPLING_PLACE_CPKYJQ = "成品库(已检区)";
String SAMPLING_PLACE_NMSC = "农贸市场";
String SAMPLING_PLACE_CSC = "菜市场";
String SAMPLING_PLACE_PFSC = "批发市场";
String SAMPLING_PLACE_SC = "商场";
String SAMPLING_PLACE_SUPERMARKET = "超市";
String SAMPLING_PLACE_XSZD = "小食杂店";
String SAMPLING_PLACE_WG = "网购";
String SAMPLING_PLACE_TDXCG = "餐馆(特大型餐馆)";
String SAMPLING_PLACE_DXCG = "餐馆(大型餐馆)";
String SAMPLING_PLACE_ZXCG = "餐馆(中型餐馆)";
String SAMPLING_PLACE_XXCG = "餐馆(小型餐馆)";
String SAMPLING_PLACE_JGST = "食堂(机关食堂)";
String SAMPLING_PLACE_XXTYST = "食堂(学校/托幼食堂)";
String SAMPLING_PLACE_QSYDW = "食堂(企事业单位食堂)";
String SAMPLING_PLACE_JZGDST = "食堂(建筑工地食堂)";
String SAMPLING_PLACE_XCD = "小吃店";
String SAMPLING_PLACE_KCD = "快餐店";
String SAMPLING_PLACE_YPD = "饮品店";
String SAMPLING_PLACE_JTYCPS = "集体用餐配送单位";
String SAMPLING_PLACE_ZYCF = "中央厨房";
String SAMPLING_PLACE_ELSE = "其他";
String SAMPLING_PLACE_FLOW = "食品流通";
String SAMPLING_PLACE_FOOD = "餐饮服务";
/**
* 样品来源
*/
String SOURCE_DJK_CONFIG = "sourceDjk";
String SOURCE_DJK = "%s加工/自制 %s委托生产 %s外购 %s其他";
String SOURCE_DJK_PRODUCE = "加工/自制";
String SOURCE_DJK_CONTRACT = "委托生产";
String SOURCE_DJK_BUY_OUT = "外购";
String SOURCE_DJK_ELSE = "其他";
/**
* 样品属性
*/
String PROPERTIES_DJK_CONFIG = "propertiesDjk";
String PROPERTIES_DJK = "%s普通食品 %s特殊膳食食品 %s节令食品 %s重大活动保障食品";
String PROPERTIES_DJK_COMMON = "普通食品";
String PROPERTIES_DJK_SPECIAL = "特殊膳食食品";
String PROPERTIES_DJK_SEASON = "节令食品";
String PROPERTIES_DJK_ACTIVITY_FOOD = "重大活动保障食品";
/**
* 日期类型
*/
String DATE_TYPE_DJK_CONFIG = "dateTypeDjk";
String DATE_TYPE_DJK = "%s生产/%s加工/%s购进日期";
String DATE_TYPE_DJK_PRODUCE = "生产";
String DATE_TYPE_DJK_MACHINING = "加工";
String DATE_TYPE_DJK_BUY = "购进";
/**
* 生产许可证编号
*/
String LICENSE_NO_ARRAY_DJK_CONFIG = "licenseNoArrDjk";
String LICENSE_NO_DJK_CONFIG = "licenseNoDjk";
String LICENSE_NO_DJK = "%s食品生产许可证号\n%s生产加工小作坊许可证号";
/**
* 是否出口
*/
String EXPORT_CONFIG = "exportDjk";
/**
* 抽样数量带单位
*/
String QUANTITY_UNIT_CONFIG = "quantityUnit";
/**
* 抽样方式
*/
String SAMPLING_METHOD_DJK_CONFIG = "samplingMethodDjk";
String SAMPLING_METHOD_DJK = "%s无菌抽样\n%s非无菌抽样";
String SAMPLING_METHOD_DJK_NO_GERM = "无菌抽样";
String SAMPLING_METHOD_DJK_GERM = "非无菌抽样";
/**
* 抽样样品包装
*/
String SAMPLING_PACKING_DJK_CONFIG = "samplingPackingDjk";
String SAMPLING_PACKING_DJK = "%s玻璃瓶 %s塑料瓶 %s塑料袋 %s无菌袋 %s其他(%s)";
String SAMPLING_PACKING_DJK_GLASS_BOTTLE = "玻璃瓶";
String SAMPLING_PACKING_DJK_PLASTIC_BOTTLE = "塑料瓶";
String SAMPLING_PACKING_DJK_PLASTIC_BAG = "塑料袋";
String SAMPLING_PACKING_DJK_NO_GERM = "无菌袋";
String SAMPLING_PACKING_DJK_ELSE = "其他";
/**
* 样品保存条件
*/
String KEEP_STATE_DJK_CONFIG = "keepStateDjk";
String KEEP_STATE_DJK = "%s常温 %s冷藏 %s冷冻 %s避光 %s密闭 %s其他(%s)";
String KEEP_STATE_DJK_CHANG_WEN = "常温";
String KEEP_STATE_DJK_LENG_CANG = "冷藏";
String KEEP_STATE_DJK_LENG_DONG = "冷冻";
String KEEP_STATE_DJK_BI_GUANG = "避光";
String KEEP_STATE_DJK_MI_BI = "密闭";
/**
* 许可证类型
*/
String LICENSE_TYPE_DJK_CONFIG = "licenseTypeDjk";
String LICENSE_TYPE_DJK = "%s食品经营许可证号 %s小餐饮经营许可证号";
String LICENSE_TYPE_DJK_FOOD_MANAGE = "食品经营许可证";
String LICENSE_TYPE_DJK_FOOD = "餐饮经营许可证";
/**
* 包装分类
*/
String PACK_CLASS_DJK_CONFIG = "packClassDjk";
String PACK_CLASS_DJK = "%s散装 %s预包装";
String PACK_CLASS_DJK_SAN_ZHUANG = "散装";
String PACK_CLASS_DJK_YU_BAO_ZHUANG = "预包装";
/**
* 区域类型
*/
String AREA_TYPE_CONFIG = "areaType";
String AREA_TYPE = "%s城市 %s乡村 %s景点";
String AREA_TYPE_CITY = "城市";
String AREA_TYPE_COUNTRY = "乡村";
String AREA_TYPE_ATTRACTIONS = "景点";
String FOOD_SAMPLE_TESTED_CONFIG = "tested";
String FOOD_SAMPLE_TESTER_CONFIG = "tester";
String FOOD_SAMPLE_PRODUCER_CONFIG = "producer";
/**
* 生产/加工/购进日期
*/
String DATE_TIME_CHINESE = "dateTypeCn";
String DATE_TIME_POINT = "dateTypePoint";
}
package com.patzn.cloud.service.lims.common;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
public class LabreOfficeUtil {
private static final Logger logger = LoggerFactory.getLogger(LabreOfficeUtil.class);
//
//
//
//
//
//
//
// public static synchronized File libreOffice2PDF(String url,File inputfile) {
// logger.error("LabreOfficeUtil开始转化PDF");
// String fileName = inputfile.getName().replace(".xlsx","");
// File outputfile=null;
// String LibreOffice_HOME = url;
// DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration();
// OfficeManager officeManager=null;
// logger.error("fileName"+fileName);
// try {
//
//
// outputfile= File.createTempFile(fileName,".pdf");
//
//
// logger.error("outputfile"+outputfile.getName());
//
//
// // libreOffice的安装目录
// configuration.setOfficeHome(new File(LibreOffice_HOME));
// // 端口号
// configuration.setPortNumber(8100);
// //configuration.setPortNumbers(ports);
// logger.error("configuration.setPortNumber(8100);F");
// configuration.setTaskExecutionTimeout(1000 * 60 * 25L);
//// 设置任务执行超时为10分钟
// configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L);
//// 设置任务队列超时为24小时
// officeManager = configuration.buildOfficeManager();
// officeManager.start();
// OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);
// converter.getFormatRegistry();
// converter.convert(inputfile, outputfile);
// } catch (Exception e) {
// logger.error("pdf转化失败"+e.getMessage());
// e.printStackTrace();
// } finally {
// officeManager.stop();
// }
//
// return outputfile;
//
//
//
// }
public static void main(String[] args) {
convertOffice2PDF("D:/patzn-lims/libreoffice6.1/libreoffice6.1",new File("D:/icps/aaa.xlsx"));
}
public static synchronized File convertOffice2PDF(String url,File inputFile){
long start = System.currentTimeMillis();
boolean flag;
String parent= inputFile.getParent();
String pdfFile = parent+"/"+(inputFile.getName().replace(".xlsx",".pdf"));
// String osName = System.getProperty("os.name");
// if (osName.contains("Windows")) {
// }else {
// command = "libreoffice --headless --invisible --convert-to pdf:writer_pdf_Export " + inputFile + " --outdir " + pdfFile;
// }
String osName = System.getProperty("os.name");
String command="";
if(osName.contains("win")||osName.contains("Win")){
command = "cmd /c soffice --headless --invisible --convert-to pdf " + inputFile.getPath() + " --outdir " + parent;
flag = executeLibreOfficeCommand(command,url);
}else{
command = "libreoffice6.2 --headless --invisible --convert-to pdf:writer_pdf_Export " + inputFile.getPath() + " --outdir " + parent;
flag = executeLibreOfficeCommand(command);
}
long end = System.currentTimeMillis();
logger.debug("用时:{} ms", end - start);
if (true){
return new File(pdfFile);
}
return null;
}
/**
* 执行command指令
* @param command
* @return
*/
public static boolean executeLibreOfficeCommand(String command,String url) {
logger.info("开始进行转化.......");
Process process;// Process可以控制该子进程的执行或获取该子进程的信息
try {
logger.debug("convertOffice2PDF cmd : {}", command);
process = Runtime.getRuntime().exec(command,null,new File(url+"/program"));// exec()方法指示Java虚拟机创建一个子进程执行指定的可执行程序,并返回与该子进程对应的Process对象实例。
// 下面两个可以获取输入输出流
// InputStream errorStream = process.getErrorStream();
// InputStream inputStream = process.getInputStream();
} catch (IOException e) {
logger.error(" convertOffice2PDF {} error", command, e);
return false;
}
int exitStatus = 0;
try {
exitStatus = process.waitFor();// 等待子进程完成再往下执行,返回值是子线程执行完毕的返回值,返回0表示正常结束
// 第二种接受返回值的方法
int i = process.exitValue(); // 接收执行完毕的返回值
logger.debug("i----" + i);
} catch (InterruptedException e) {
logger.error("InterruptedException convertOffice2PDF {}", command, e);
return false;
}
if (exitStatus != 0) {
logger.error("convertOffice2PDF cmd exitStatus {}", exitStatus);
} else {
logger.debug("convertOffice2PDF cmd exitStatus {}", exitStatus);
}
process.destroy(); // 销毁子进程
logger.info("转化结束.......");
return true;
}
public static boolean executeLibreOfficeCommand(String command) {
logger.info("开始进行转化.......");
Process process;// Process可以控制该子进程的执行或获取该子进程的信息
try {
logger.debug("convertOffice2PDF cmd : {}", command);
process = Runtime.getRuntime().exec(command);// exec()方法指示Java虚拟机创建一个子进程执行指定的可执行程序,并返回与该子进程对应的Process对象实例。
// 下面两个可以获取输入输出流
// InputStream errorStream = process.getErrorStream();
// InputStream inputStream = process.getInputStream();
} catch (IOException e) {
logger.error(" convertOffice2PDF {} error", command, e);
return false;
}
int exitStatus = 0;
try {
exitStatus = process.waitFor();// 等待子进程完成再往下执行,返回值是子线程执行完毕的返回值,返回0表示正常结束
// 第二种接受返回值的方法
int i = process.exitValue(); // 接收执行完毕的返回值
logger.debug("i----" + i);
} catch (InterruptedException e) {
logger.error("InterruptedException convertOffice2PDF {}", command, e);
return false;
}
if (exitStatus != 0) {
logger.error("convertOffice2PDF cmd exitStatus {}", exitStatus);
} else {
logger.debug("convertOffice2PDF cmd exitStatus {}", exitStatus);
}
process.destroy(); // 销毁子进程
logger.info("转化结束.......");
return true;
}
}
package com.patzn.cloud.service.lims.common;
public class LongHandleUtils {
public static boolean isYes(Integer num){
return null!=num&&num.equals(1);
}
}
package com.patzn.cloud.service.lims.common;
import java.util.*;
public final class MsgUrlDataUtils {
public static final String REVIEW_URL = "/entrust/entrust_review";
}
package com.patzn.cloud.service.lims.common;
import java.time.Instant;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.FastDateFormat;
/**
* 订单编号策略
*
* @project common-utils
* @fileName ODDGenerator.java
* @Description
* @author light-zhang
* @date 2018年5月11日
* @version 1.0.0
*/
public abstract class ODDGenerator {
private static final FastDateFormat pattern = FastDateFormat.getInstance("yyyyMMddHHmmss");
private static final AtomicInteger atomicInteger = new AtomicInteger(1);
private static ThreadLocal<StringBuilder> threadLocal = new ThreadLocal<StringBuilder>();
/**
* 【长码生成策略】
*
* @时间20180511231532
* @二位随机数
* @lock的hash-code编码
* @param lock 生成的UUID32位参数
* @return 长码机制
*/
public static String getC(String lock) {
StringBuilder builder = new StringBuilder(pattern.format(Instant.now().toEpochMilli()));// 取系统当前时间作为订单号前半部分
builder.append(Math.abs(lock.hashCode()));// HASH-CODE
builder.append(atomicInteger.getAndIncrement());// 自增顺序
threadLocal.set(builder);
return threadLocal.get().toString();
}
/**
* 【短码生成策略】
*
* @param lock
* @return
*/
public static String getD(String lock) {
StringBuilder builder = new StringBuilder(ThreadLocalRandom.current().nextInt(0,999));// 随机数
builder.append(Math.abs(lock.hashCode()));// HASH-CODE
builder.append(atomicInteger.getAndIncrement());// 自增顺序
threadLocal.set(builder);
return threadLocal.get().toString();
}
/**
* 1000个线程并发测试
*
* @param args
* @throws InterruptedException
* @throws ExecutionException
*/
public static void main(String[] args) throws InterruptedException, ExecutionException {
Set<String> set = new HashSet<String>();
FutureTask<String> task = null;
long startTime = System.currentTimeMillis();
for (int i = 0; i <1; i++) {
Callable<String> callable = new Callable<String>() {
@Override
public String call() throws Exception {
// System.out.println("当前线程:>>>>> ".concat(Thread.currentThread().getName()));
// return getC(StringUtils.replace(UUID.randomUUID().toString(), "-", ""));
return getD(StringUtils.replace(UUID.randomUUID().toString(), "-", ""));
}
};
task = new FutureTask<String>(callable);
new Thread(task).start();
//System.out.println(task.get());
set.add(task.get());
}
System.out.println("总共耗时:" + ((System.currentTimeMillis() - startTime)) + "ms");
System.out.println("*************** " + set.size());
}
}
\ No newline at end of file
package com.patzn.cloud.service.lims.common;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class OrderNumUtil {
public final static Map<String, Integer> psdMap= new HashMap<>();
static {
psdMap.put("00",5);
psdMap.put("01",9);
psdMap.put("02",0);
psdMap.put("03",8);
psdMap.put("04",1);
psdMap.put("05",7);
psdMap.put("06",2);
psdMap.put("07",6);
psdMap.put("08",4);
psdMap.put("09",3);
psdMap.put("10",3);
psdMap.put("11",4);
psdMap.put("12",6);
psdMap.put("13",2);
psdMap.put("14",7);
psdMap.put("15",7);
psdMap.put("16",8);
psdMap.put("17",0);
psdMap.put("18",9);
psdMap.put("19",5);
psdMap.put("20",1);
psdMap.put("21",3);
psdMap.put("22",5);
psdMap.put("23",7);
psdMap.put("24",9);
psdMap.put("25",2);
psdMap.put("26",4);
psdMap.put("27",6);
psdMap.put("28",8);
psdMap.put("29",0);
psdMap.put("30",0);
psdMap.put("31",8);
psdMap.put("32",6);
psdMap.put("33",4);
psdMap.put("34",2);
psdMap.put("35",9);
psdMap.put("36",7);
psdMap.put("37",5);
psdMap.put("38",3);
psdMap.put("39",1);
psdMap.put("40",1);
psdMap.put("41",9);
psdMap.put("42",2);
psdMap.put("43",8);
psdMap.put("44",3);
psdMap.put("45",7);
psdMap.put("46",4);
psdMap.put("47",6);
psdMap.put("48",5);
psdMap.put("49",0);
psdMap.put("50",0);
psdMap.put("51",5);
psdMap.put("52",6);
psdMap.put("53",4);
psdMap.put("54",7);
psdMap.put("55",3);
psdMap.put("56",8);
psdMap.put("57",2);
psdMap.put("58",9);
psdMap.put("59",1);
psdMap.put("60",9);
psdMap.put("61",8);
psdMap.put("62",7);
psdMap.put("63",6);
psdMap.put("64",5);
psdMap.put("65",0);
psdMap.put("66",1);
psdMap.put("67",2);
psdMap.put("68",3);
psdMap.put("69",4);
psdMap.put("70",4);
psdMap.put("71",3);
psdMap.put("72",2);
psdMap.put("73",1);
psdMap.put("74",0);
psdMap.put("75",5);
psdMap.put("76",6);
psdMap.put("77",7);
psdMap.put("78",8);
psdMap.put("79",9);
}
public static String makePsd(String num) {
Map<Integer, Integer> indexNumMap= new HashMap<>();
int length = num.length();
for (int i=0;i<length;i++){
String indexNum= String.valueOf(num.charAt(i));
indexNumMap.put(i, Integer.parseInt(indexNum));
}
StringBuffer buffer = new StringBuffer();
for (Map.Entry<Integer, Integer> e:indexNumMap.entrySet()) {
int index = e.getKey();
int value = e.getValue();
String numKey = index+""+value;
numKey.intern();
Integer valueOk= psdMap.get(numKey);
if (null == valueOk){
valueOk= value;
}
buffer.append(valueOk);
}
return buffer.toString();
}
public static String getPsdNum(String num) {
Map<String, Integer> jiemi = new HashMap<>();
for (Map.Entry<String, Integer> e:psdMap.entrySet()) {
String index = e.getKey();
String first= String.valueOf(index.charAt(0)) ;
String next= String.valueOf(index.charAt(1)) ;
int firstNum = Integer.parseInt(first);
int nextNum = Integer.parseInt(next);
int trueNum = e.getValue();
jiemi.put(firstNum+"---"+trueNum,nextNum);
}
StringBuffer buffer = new StringBuffer();
int length = num.length();
for (int i=0;i<length;i++){
String indexNum= String.valueOf(num.charAt(i));
String key = i+"---"+indexNum;
key.intern();
Integer okValue= jiemi.get(key);
if (null == okValue){
okValue = Integer.parseInt(indexNum);
}
buffer.append(okValue);
}
return buffer.toString();
}
public static String getOrderNum(String code){
SimpleDateFormat sd = new SimpleDateFormat("yyMMddHHmmss");
return "NO"+sd.format(new Date())+""+makePsd(code);
}
public static void main(String[] args) {
System.out.println(getOrderNum("1234"));
System.out.println(getPsdNum("67509271099672"));
}
}
package com.patzn.cloud.service.lims.common;
import java.io.FileOutputStream;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ooxml.POIXMLDocument;
import org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy;
import org.apache.poi.xwpf.usermodel.BodyElementType;
import org.apache.poi.xwpf.usermodel.Borders;
import org.apache.poi.xwpf.usermodel.BreakType;
import org.apache.poi.xwpf.usermodel.IBodyElement;
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
import org.apache.poi.xwpf.usermodel.TextAlignment;
import org.apache.poi.xwpf.usermodel.VerticalAlign;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.poi.xwpf.usermodel.XWPFRelation;
import org.apache.poi.xwpf.usermodel.XWPFRun;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
import org.apache.xmlbeans.impl.xb.xmlschema.SpaceAttribute;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBackground;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTColor;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTEm;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFldChar;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHMerge;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHeight;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHighlight;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHpsMeasure;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHyperlink;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTInd;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTJc;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTMarkupRange;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTOnOff;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageBorders;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageMar;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageSz;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTParaRPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTShd;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSignedTwipsMeasure;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSpacing;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblGrid;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblGridCol;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTextScale;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTrPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTUnderline;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTVMerge;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTVerticalJc;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STEm;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFldCharType;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STHeightRule;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STHighlightColor;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STLineSpacingRule;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STMerge;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STOnOff;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STPageOrientation;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STShd;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STUnderline;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalAlignRun;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc;
public class PoiUtil2007 {
// 替换 复制 表格 段落
/*------------------------------------Word 插入书签--------------------------------------------------- */
/**
* @Description: 添加书签
*/
public static void addParagraphContentBookmarkBasicStyle(XWPFParagraph p,
String content, BigInteger markId, String bookMarkName,
boolean isInsert, boolean isNewLine, String fontFamily,
String fontSize, String colorVal, boolean isBlod,
boolean isUnderLine, String underLineColor,
STUnderline.Enum underStyle, boolean isItalic, boolean isStrike) {
CTBookmark bookStart = p.getCTP().addNewBookmarkStart();
bookStart.setId(markId);
bookStart.setName(bookMarkName);
XWPFRun pRun = getOrAddParagraphFirstRun(p, isInsert, isNewLine);
setParagraphRunFontInfo(p, pRun, content, fontFamily, fontSize);
setParagraphTextStyleInfo(p, pRun, colorVal, isBlod, isUnderLine,
underLineColor, underStyle, isItalic, isStrike, false, false,
false, false, false, false, false, null, false, null, false,
null, null, null, 0, 0, 0);
CTMarkupRange bookEnd = p.getCTP().addNewBookmarkEnd();
bookEnd.setId(markId);
}
/* */
/**
* @Description: 添加书签
*/
public static void addParagraphContentBookmark(XWPFParagraph p, String content,
BigInteger markId, String bookMarkName, boolean isInsert,
boolean isNewLine, String fontFamily, String fontSize,
String colorVal, boolean isBlod, boolean isUnderLine,
String underLineColor, STUnderline.Enum underStyle,
boolean isItalic, boolean isStrike, boolean isDStrike,
boolean isShadow, boolean isVanish, boolean isEmboss,
boolean isImprint, boolean isOutline, boolean isEm,
STEm.Enum emType, boolean isHightLight,
STHighlightColor.Enum hightStyle, boolean isShd,
STShd.Enum shdStyle, String shdColor, VerticalAlign verticalAlign,
int position, int spacingValue, int indent) {
CTBookmark bookStart = p.getCTP().addNewBookmarkStart();
bookStart.setId(markId);
bookStart.setName(bookMarkName);
XWPFRun pRun = getOrAddParagraphFirstRun(p, isInsert, isNewLine);
setParagraphRunFontInfo(p, pRun, content, fontFamily, fontSize);
setParagraphTextStyleInfo(p, pRun, colorVal, isBlod, isUnderLine,
underLineColor, underStyle, isItalic, isStrike, isDStrike,
isShadow, isVanish, isEmboss, isImprint, isOutline, isEm,
emType, isHightLight, hightStyle, isShd, shdStyle, shdColor,
verticalAlign, position, spacingValue, indent);
CTMarkupRange bookEnd = p.getCTP().addNewBookmarkEnd();
bookEnd.setId(markId);
}
/*------------------------------------Word 插入超链接--------------------------------------------------- */
/**
* @Description: 默认的超链接样式
*/
public static void addParagraphTextHyperlinkBasicStyle(XWPFParagraph paragraph,
String url, String text, String fontFamily, String fontSize,
String colorVal, boolean isBlod, boolean isItalic, boolean isStrike) {
addParagraphTextHyperlink(paragraph, url, text, fontFamily, fontSize,
colorVal, isBlod, true, "0000FF", STUnderline.SINGLE, isItalic,
isStrike, false, false, false, false, false, false, false,
null, false, null, false, null, null, null, 0, 0, 0);
}
/* */
/**
* @Description: 设置超链接样式
*/
public static void addParagraphTextHyperlink(XWPFParagraph paragraph, String url,
String text, String fontFamily, String fontSize, String colorVal,
boolean isBlod, boolean isUnderLine, String underLineColor,
STUnderline.Enum underStyle, boolean isItalic, boolean isStrike,
boolean isDStrike, boolean isShadow, boolean isVanish,
boolean isEmboss, boolean isImprint, boolean isOutline,
boolean isEm, STEm.Enum emType, boolean isHightLight,
STHighlightColor.Enum hightStyle, boolean isShd,
STShd.Enum shdStyle, String shdColor,
STVerticalAlignRun.Enum verticalAlign, int position,
int spacingValue, int indent) {
// Add the link as External relationship
String id = paragraph
.getDocument()
.getPackagePart()
.addExternalRelationship(url,
XWPFRelation.HYPERLINK.getRelation()).getId();
// Append the link and bind it to the relationship
CTHyperlink cLink = paragraph.getCTP().addNewHyperlink();
cLink.setId(id);
// Create the linked text
CTText ctText = CTText.Factory.newInstance();
ctText.setStringValue(text);
CTR ctr = CTR.Factory.newInstance();
CTRPr rpr = ctr.addNewRPr();
if (StringUtils.isNotBlank(fontFamily)) {
// 设置字体
CTFonts fonts = rpr.isSetRFonts() ? rpr.getRFonts() : rpr
.addNewRFonts();
fonts.setAscii(fontFamily);
fonts.setEastAsia(fontFamily);
fonts.setHAnsi(fontFamily);
}
if (StringUtils.isNotBlank(fontSize)) {
// 设置字体大小
CTHpsMeasure sz = rpr.isSetSz() ? rpr.getSz() : rpr.addNewSz();
sz.setVal(new BigInteger(fontSize));
CTHpsMeasure szCs = rpr.isSetSzCs() ? rpr.getSzCs() : rpr
.addNewSzCs();
szCs.setVal(new BigInteger(fontSize));
}
// 设置超链接样式
// 字体颜色
if (StringUtils.isNotBlank(colorVal)) {
CTColor color = CTColor.Factory.newInstance();
color.setVal(colorVal);
rpr.setColor(color);
}
// 加粗
if (isBlod) {
CTOnOff bCtOnOff = rpr.addNewB();
bCtOnOff.setVal(STOnOff.TRUE);
}
// 下划线
if (isUnderLine) {
CTUnderline udLine = rpr.addNewU();
udLine.setVal(underStyle);
udLine.setColor(underLineColor);
}
// 倾斜
if (isItalic) {
CTOnOff iCtOnOff = rpr.addNewI();
iCtOnOff.setVal(STOnOff.TRUE);
}
// 删除线
if (isStrike) {
CTOnOff sCtOnOff = rpr.addNewStrike();
sCtOnOff.setVal(STOnOff.TRUE);
}
// 双删除线
if (isDStrike) {
CTOnOff dsCtOnOff = rpr.addNewDstrike();
dsCtOnOff.setVal(STOnOff.TRUE);
}
// 阴影
if (isShadow) {
CTOnOff shadowCtOnOff = rpr.addNewShadow();
shadowCtOnOff.setVal(STOnOff.TRUE);
}
// 隐藏
if (isVanish) {
CTOnOff vanishCtOnOff = rpr.addNewVanish();
vanishCtOnOff.setVal(STOnOff.TRUE);
}
// 阳文
if (isEmboss) {
CTOnOff embossCtOnOff = rpr.addNewEmboss();
embossCtOnOff.setVal(STOnOff.TRUE);
}
// 阴文
if (isImprint) {
CTOnOff isImprintCtOnOff = rpr.addNewImprint();
isImprintCtOnOff.setVal(STOnOff.TRUE);
}
// 空心
if (isOutline) {
CTOnOff isOutlineCtOnOff = rpr.addNewOutline();
isOutlineCtOnOff.setVal(STOnOff.TRUE);
}
// 着重号
if (isEm) {
CTEm em = rpr.addNewEm();
em.setVal(emType);
}
// 突出显示文本
if (isHightLight) {
if (hightStyle != null) {
CTHighlight hightLight = rpr.addNewHighlight();
hightLight.setVal(hightStyle);
}
}
if (isShd) {
// 设置底纹
CTShd shd = rpr.addNewShd();
if (shdStyle != null) {
shd.setVal(shdStyle);
}
if (shdColor != null) {
shd.setColor(shdColor);
}
}
// 上标下标
if (verticalAlign != null) {
rpr.addNewVertAlign().setVal(verticalAlign);
}
// 设置文本位置
rpr.addNewPosition().setVal(new BigInteger(String.valueOf(position)));
if (spacingValue != 0) {
// 设置字符间距信息
CTSignedTwipsMeasure ctSTwipsMeasure = rpr.addNewSpacing();
ctSTwipsMeasure
.setVal(new BigInteger(String.valueOf(spacingValue)));
}
// 设置字符间距缩进
if (indent > 0) {
CTTextScale paramCTTextScale = rpr.addNewW();
paramCTTextScale.setVal(indent);
}
ctr.setTArray(new CTText[]{ctText});
cLink.setRArray(new CTR[]{ctr});
}
/*------------------------------------Word 页眉页脚相关--------------------------------------------------- */
/**
* @Description: 页脚:显示页码信息
*/
public static void simpleNumberFooter(XWPFDocument document) throws Exception {
CTP ctp = CTP.Factory.newInstance();
XWPFParagraph codePara = new XWPFParagraph(ctp, document);
XWPFRun r1 = codePara.createRun();
r1.setText("第");
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
r1 = codePara.createRun();
CTFldChar fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.BEGIN);
r1 = codePara.createRun();
CTText ctText = r1.getCTR().addNewInstrText();
ctText.setStringValue("PAGE \\* MERGEFORMAT");
ctText.setSpace(SpaceAttribute.Space.PRESERVE);
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.END);
r1 = codePara.createRun();
r1.setText("页 总共");
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
r1 = codePara.createRun();
fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.BEGIN);
r1 = codePara.createRun();
ctText = r1.getCTR().addNewInstrText();
ctText.setStringValue("NUMPAGES \\* MERGEFORMAT ");
ctText.setSpace(SpaceAttribute.Space.PRESERVE);
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.END);
r1 = codePara.createRun();
r1.setText("页");
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
setParagraphAlignInfo(codePara, ParagraphAlignment.CENTER,
TextAlignment.CENTER);
codePara.setBorderTop(Borders.THICK);
XWPFParagraph[] newparagraphs = new XWPFParagraph[1];
newparagraphs[0] = codePara;
CTSectPr sectPr = document.getDocument().getBody().addNewSectPr();
XWPFHeaderFooterPolicy headerFooterPolicy = new XWPFHeaderFooterPolicy(
document, sectPr);
headerFooterPolicy.createFooter(STHdrFtr.DEFAULT, newparagraphs);
}
/**
* @Description: 页眉:显示时间信息
*/
public static void simpleDateHeader(XWPFDocument document) throws Exception {
CTP ctp = CTP.Factory.newInstance();
XWPFParagraph codePara = new XWPFParagraph(ctp, document);
XWPFRun r1 = codePara.createRun();
CTFldChar fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.BEGIN);
r1 = codePara.createRun();
CTText ctText = r1.getCTR().addNewInstrText();
ctText.setStringValue("TIME \\@ \"EEEE\"");
ctText.setSpace(SpaceAttribute.Space.PRESERVE);
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.END);
r1 = codePara.createRun();
r1.setText("年");
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
r1 = codePara.createRun();
fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.BEGIN);
r1 = codePara.createRun();
ctText = r1.getCTR().addNewInstrText();
ctText.setStringValue("TIME \\@ \"O\"");
ctText.setSpace(SpaceAttribute.Space.PRESERVE);
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.END);
r1 = codePara.createRun();
r1.setText("月");
r1.setFontSize(11);
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
r1 = codePara.createRun();
fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.BEGIN);
r1 = codePara.createRun();
ctText = r1.getCTR().addNewInstrText();
ctText.setStringValue("TIME \\@ \"A\"");
ctText.setSpace(SpaceAttribute.Space.PRESERVE);
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
fldChar = r1.getCTR().addNewFldChar();
fldChar.setFldCharType(STFldCharType.END);
r1 = codePara.createRun();
r1.setText("日");
r1.setFontSize(11);
setParagraphRunFontInfo(codePara, r1, null, "微软雅黑", "22");
setParagraphAlignInfo(codePara, ParagraphAlignment.CENTER,
TextAlignment.CENTER);
codePara.setBorderBottom(Borders.THICK);
XWPFParagraph[] newparagraphs = new XWPFParagraph[1];
newparagraphs[0] = codePara;
CTSectPr sectPr = document.getDocument().getBody().addNewSectPr();
XWPFHeaderFooterPolicy headerFooterPolicy = new XWPFHeaderFooterPolicy(
document, sectPr);
headerFooterPolicy.createHeader(STHdrFtr.DEFAULT, newparagraphs);
}
/*------------------------------------Word 段落相关--------------------------------------------------- */
/**
* @Description: 得到段落CTPPr
*/
public static CTPPr getParagraphCTPPr(XWPFParagraph p) {
CTPPr pPPr = null;
if (p.getCTP() != null) {
if (p.getCTP().getPPr() != null) {
pPPr = p.getCTP().getPPr();
} else {
pPPr = p.getCTP().addNewPPr();
}
}
return pPPr;
}
/**
* @Description: 得到XWPFRun的CTRPr
*/
public static CTRPr getRunCTRPr(XWPFParagraph p, XWPFRun pRun) {
CTRPr pRpr = null;
if (pRun.getCTR() != null) {
pRpr = pRun.getCTR().getRPr();
if (pRpr == null) {
pRpr = pRun.getCTR().addNewRPr();
}
} else {
pRpr = p.getCTP().addNewR().addNewRPr();
}
return pRpr;
}
public static XWPFRun getOrAddParagraphFirstRun(XWPFParagraph p, boolean isInsert,
boolean isNewLine) {
XWPFRun pRun = null;
if (isInsert) {
pRun = p.createRun();
} else {
if (p.getRuns() != null && p.getRuns().size() > 0) {
pRun = p.getRuns().get(0);
} else {
pRun = p.createRun();
}
}
if (isNewLine) {
pRun.addBreak();
}
return pRun;
}
public static void setParagraphTextFontInfo(XWPFParagraph p, boolean isInsert,
boolean isNewLine, String content, String fontFamily,
String fontSize) {
XWPFRun pRun = getOrAddParagraphFirstRun(p, isInsert, isNewLine);
setParagraphRunFontInfo(p, pRun, content, fontFamily, fontSize);
}
/**
* @Description 设置字体信息
*/
public static void setParagraphRunFontInfo(XWPFParagraph p, XWPFRun pRun,
String content, String fontFamily, String fontSize) {
CTRPr pRpr = getRunCTRPr(p, pRun);
if (StringUtils.isNotBlank(content)) {
pRun.setText(content);
}
// 设置字体
CTFonts fonts = pRpr.isSetRFonts() ? pRpr.getRFonts() : pRpr
.addNewRFonts();
fonts.setAscii(fontFamily);
fonts.setEastAsia(fontFamily);
fonts.setHAnsi(fontFamily);
// 设置字体大小
CTHpsMeasure sz = pRpr.isSetSz() ? pRpr.getSz() : pRpr.addNewSz();
sz.setVal(new BigInteger(fontSize));
CTHpsMeasure szCs = pRpr.isSetSzCs() ? pRpr.getSzCs() : pRpr
.addNewSzCs();
szCs.setVal(new BigInteger(fontSize));
}
/**
* @Description: 设置段落基本样式
*/
public static void setParagraphTextBasicStyleInfo(XWPFParagraph p, XWPFRun pRun,
String colorVal, boolean isBlod, boolean isUnderLine,
String underLineColor, STUnderline.Enum underStyle,
boolean isItalic, boolean isStrike, boolean isHightLight,
STHighlightColor.Enum hightStyle, boolean isShd,
STShd.Enum shdStyle, String shdColor) {
setParagraphTextStyleInfo(p, pRun, colorVal, isBlod, isUnderLine,
underLineColor, underStyle, isItalic, isStrike, false, false,
false, false, false, false, false, null, isHightLight,
hightStyle, isShd, shdStyle, shdColor, null, 0, 0, 0);
}
/**
* @param verticalAlign : SUPERSCRIPT上标 SUBSCRIPT下标
* @param position :字符间距位置:>0提升 <0降低=磅值*2 如3磅=6
* @param spacingValue :字符间距间距 >0加宽 <0紧缩 =磅值*20 如2磅=40
* @param indent :字符间距缩进 <100 缩
* @Description: 设置段落文本样式(高亮与底纹显示效果不同)设置字符间距信息(CTSignedTwipsMeasure)
*/
public static void setParagraphTextSimpleStyleInfo(XWPFParagraph p, XWPFRun pRun,
String colorVal, boolean isBlod, boolean isUnderLine,
String underLineColor, STUnderline.Enum underStyle,
boolean isItalic, boolean isStrike, boolean isHightLight,
STHighlightColor.Enum hightStyle, boolean isShd,
STShd.Enum shdStyle, String shdColor, VerticalAlign verticalAlign,
int position, int spacingValue, int indent) {
setParagraphTextStyleInfo(p, pRun, colorVal, isBlod, isUnderLine,
underLineColor, underStyle, isItalic, isStrike, false, false,
false, false, false, false, false, null, isHightLight,
hightStyle, isShd, shdStyle, shdColor, verticalAlign, position,
spacingValue, indent);
}
/**
* @param verticalAlign : SUPERSCRIPT上标 SUBSCRIPT下标
* @param position :字符间距位置:>0提升 <0降低=磅值*2 如3磅=6
* @param spacingValue :字符间距间距 >0加宽 <0紧缩 =磅值*20 如2磅=40
* @param indent :字符间距缩进 <100 缩
* @Description: 设置段落文本样式(高亮与底纹显示效果不同)设置字符间距信息(CTSignedTwipsMeasure)
*/
public static void setParagraphTextStyleInfo(XWPFParagraph p, XWPFRun pRun,
String colorVal, boolean isBlod, boolean isUnderLine,
String underLineColor, STUnderline.Enum underStyle,
boolean isItalic, boolean isStrike, boolean isDStrike,
boolean isShadow, boolean isVanish, boolean isEmboss,
boolean isImprint, boolean isOutline, boolean isEm,
STEm.Enum emType, boolean isHightLight,
STHighlightColor.Enum hightStyle, boolean isShd,
STShd.Enum shdStyle, String shdColor, VerticalAlign verticalAlign,
int position, int spacingValue, int indent) {
if (pRun == null) {
return;
}
CTRPr pRpr = getRunCTRPr(p, pRun);
if (colorVal != null) {
pRun.setColor(colorVal);
}
// 设置字体样式
// 加粗
if (isBlod) {
pRun.setBold(isBlod);
}
// 倾斜
if (isItalic) {
pRun.setItalic(isItalic);
}
// 删除线
if (isStrike) {
pRun.setStrike(isStrike);
}
// 双删除线
if (isDStrike) {
CTOnOff dsCtOnOff = pRpr.isSetDstrike() ? pRpr.getDstrike() : pRpr
.addNewDstrike();
dsCtOnOff.setVal(STOnOff.TRUE);
}
// 阴影
if (isShadow) {
CTOnOff shadowCtOnOff = pRpr.isSetShadow() ? pRpr.getShadow()
: pRpr.addNewShadow();
shadowCtOnOff.setVal(STOnOff.TRUE);
}
// 隐藏
if (isVanish) {
CTOnOff vanishCtOnOff = pRpr.isSetVanish() ? pRpr.getVanish()
: pRpr.addNewVanish();
vanishCtOnOff.setVal(STOnOff.TRUE);
}
// 阳文
if (isEmboss) {
CTOnOff embossCtOnOff = pRpr.isSetEmboss() ? pRpr.getEmboss()
: pRpr.addNewEmboss();
embossCtOnOff.setVal(STOnOff.TRUE);
}
// 阴文
if (isImprint) {
CTOnOff isImprintCtOnOff = pRpr.isSetImprint() ? pRpr.getImprint()
: pRpr.addNewImprint();
isImprintCtOnOff.setVal(STOnOff.TRUE);
}
// 空心
if (isOutline) {
CTOnOff isOutlineCtOnOff = pRpr.isSetOutline() ? pRpr.getOutline()
: pRpr.addNewOutline();
isOutlineCtOnOff.setVal(STOnOff.TRUE);
}
// 着重号
if (isEm) {
CTEm em = pRpr.isSetEm() ? pRpr.getEm() : pRpr.addNewEm();
em.setVal(emType);
}
// 设置下划线样式
if (isUnderLine) {
CTUnderline u = pRpr.isSetU() ? pRpr.getU() : pRpr.addNewU();
if (underStyle != null) {
u.setVal(underStyle);
}
if (underLineColor != null) {
u.setColor(underLineColor);
}
}
// 设置突出显示文本
if (isHightLight) {
if (hightStyle != null) {
CTHighlight hightLight = pRpr.isSetHighlight() ? pRpr
.getHighlight() : pRpr.addNewHighlight();
hightLight.setVal(hightStyle);
}
}
if (isShd) {
// 设置底纹
CTShd shd = pRpr.isSetShd() ? pRpr.getShd() : pRpr.addNewShd();
if (shdStyle != null) {
shd.setVal(shdStyle);
}
if (shdColor != null) {
shd.setColor(shdColor);
}
}
// 上标下标
if (verticalAlign != null) {
pRun.setSubscript(verticalAlign);
}
// 设置文本位置
pRun.setTextPosition(position);
if (spacingValue > 0) {
// 设置字符间距信息
CTSignedTwipsMeasure ctSTwipsMeasure = pRpr.isSetSpacing() ? pRpr
.getSpacing() : pRpr.addNewSpacing();
ctSTwipsMeasure
.setVal(new BigInteger(String.valueOf(spacingValue)));
}
if (indent > 0) {
CTTextScale paramCTTextScale = pRpr.isSetW() ? pRpr.getW() : pRpr
.addNewW();
paramCTTextScale.setVal(indent);
}
}
/**
* @Description: 设置段落底纹(对整段文字起作用)
*/
public static void setParagraphShdStyle(XWPFParagraph p, boolean isShd,
STShd.Enum shdStyle, String shdColor) {
CTPPr pPpr = getParagraphCTPPr(p);
CTShd shd = pPpr.isSetShd() ? pPpr.getShd() : pPpr.addNewShd();
if (shdStyle != null) {
shd.setVal(shdStyle);
}
if (shdColor != null) {
shd.setColor(shdColor);
}
}
/**
* @Description: 设置段落间距信息, 一行=100 一磅=20
*/
public static void setParagraphSpacingInfo(XWPFParagraph p, boolean isSpace,
String before, String after, String beforeLines, String afterLines,
boolean isLine, String line, STLineSpacingRule.Enum lineValue) {
CTPPr pPPr = getParagraphCTPPr(p);
CTSpacing pSpacing = pPPr.getSpacing() != null ? pPPr.getSpacing()
: pPPr.addNewSpacing();
if (isSpace) {
// 段前磅数
if (before != null) {
pSpacing.setBefore(new BigInteger(before));
}
// 段后磅数
if (after != null) {
pSpacing.setAfter(new BigInteger(after));
}
// 段前行数
if (beforeLines != null) {
pSpacing.setBeforeLines(new BigInteger(beforeLines));
}
// 段后行数
if (afterLines != null) {
pSpacing.setAfterLines(new BigInteger(afterLines));
}
}
// 间距
if (isLine) {
if (line != null) {
pSpacing.setLine(new BigInteger(line));
}
if (lineValue != null) {
pSpacing.setLineRule(lineValue);
}
}
}
// 设置段落缩进信息 1厘米≈567
public static void setParagraphIndInfo(XWPFParagraph p, String firstLine,
String firstLineChar, String hanging, String hangingChar,
String right, String rigthChar, String left, String leftChar) {
CTPPr pPPr = getParagraphCTPPr(p);
CTInd pInd = pPPr.getInd() != null ? pPPr.getInd() : pPPr.addNewInd();
if (firstLine != null) {
pInd.setFirstLine(new BigInteger(firstLine));
}
if (firstLineChar != null) {
pInd.setFirstLineChars(new BigInteger(firstLineChar));
}
if (hanging != null) {
pInd.setHanging(new BigInteger(hanging));
}
if (hangingChar != null) {
pInd.setHangingChars(new BigInteger(hangingChar));
}
if (left != null) {
pInd.setLeft(new BigInteger(left));
}
if (leftChar != null) {
pInd.setLeftChars(new BigInteger(leftChar));
}
if (right != null) {
pInd.setRight(new BigInteger(right));
}
if (rigthChar != null) {
pInd.setRightChars(new BigInteger(rigthChar));
}
}
// 设置段落边框
public static void setParagraphBorders(XWPFParagraph p, Borders lborder,
Borders tBorders, Borders rBorders, Borders bBorders,
Borders btborders) {
if (lborder != null) {
p.setBorderLeft(lborder);
}
if (tBorders != null) {
p.setBorderTop(tBorders);
}
if (rBorders != null) {
p.setBorderRight(rBorders);
}
if (bBorders != null) {
p.setBorderBottom(bBorders);
}
if (btborders != null) {
p.setBorderBetween(btborders);
}
}
/**
* @Description: 设置段落对齐 居中等
*/
public static void setParagraphAlignInfo(XWPFParagraph p,
ParagraphAlignment pAlign, TextAlignment valign) {
if (pAlign != null) {
p.setAlignment(pAlign);
}
if (valign != null) {
p.setVerticalAlignment(valign);
}
}
/*------------------------------------Word 表格相关--------------------------------------------------- */
/**
* @Description:删除指定位置的表格,被删除表格后的索引位置--
*/
public static void deleteTableByIndex(XWPFDocument xdoc, int pos) {
Iterator<IBodyElement> bodyElement = xdoc.getBodyElementsIterator();
int eIndex = 0, tableIndex = -1;
while (bodyElement.hasNext()) {
IBodyElement element = bodyElement.next();
BodyElementType elementType = element.getElementType();
if (elementType == BodyElementType.TABLE) {
tableIndex++;
if (tableIndex == pos) {
break;
}
}
eIndex++;
}
xdoc.removeBodyElement(eIndex);
}
public static XWPFTable getTableByIndex(XWPFDocument xdoc, int index) {
List<XWPFTable> tablesList = getAllTable(xdoc);
if (tablesList == null || index < 0 || index > tablesList.size()) {
return null;
}
return tablesList.get(index);
}
public static List<XWPFTable> getAllTable(XWPFDocument xdoc) {
return xdoc.getTables();
}
/**
* @Description: 得到表格内容(第一次跨行单元格视为一个 , 第二次跳过跨行合并的单元格)
*/
public static List<List<String>> getTableRContent(XWPFTable table) {
List<List<String>> tableContentList = new ArrayList<List<String>>();
for (int rowIndex = 0, rowLen = table.getNumberOfRows(); rowIndex < rowLen; rowIndex++) {
XWPFTableRow row = table.getRow(rowIndex);
List<String> cellContentList = new ArrayList<String>();
for (int colIndex = 0, colLen = row.getTableCells().size(); colIndex < colLen; colIndex++) {
XWPFTableCell cell = row.getCell(colIndex);
CTTc ctTc = cell.getCTTc();
if (ctTc.isSetTcPr()) {
CTTcPr tcPr = ctTc.getTcPr();
if (tcPr.isSetHMerge()) {
CTHMerge hMerge = tcPr.getHMerge();
if (STMerge.RESTART.equals(hMerge.getVal())) {
cellContentList.add(getTableCellContent(cell));
}
} else if (tcPr.isSetVMerge()) {
CTVMerge vMerge = tcPr.getVMerge();
if (STMerge.RESTART.equals(vMerge.getVal())) {
cellContentList.add(getTableCellContent(cell));
}
} else {
cellContentList.add(getTableCellContent(cell));
}
}
}
tableContentList.add(cellContentList);
}
return tableContentList;
}
/**
* @Description: 得到表格内容, 合并后的单元格视为一个单元格
*/
public static List<List<String>> getTableContent(XWPFTable table) {
List<List<String>> tableContentList = new ArrayList<List<String>>();
for (int rowIndex = 0, rowLen = table.getNumberOfRows(); rowIndex < rowLen; rowIndex++) {
XWPFTableRow row = table.getRow(rowIndex);
List<String> cellContentList = new ArrayList<String>();
for (int colIndex = 0, colLen = row.getTableCells().size(); colIndex < colLen; colIndex++) {
XWPFTableCell cell = row.getCell(colIndex);
cellContentList.add(getTableCellContent(cell));
}
tableContentList.add(cellContentList);
}
return tableContentList;
}
public static String getTableCellContent(XWPFTableCell cell) {
StringBuffer sb = new StringBuffer();
List<XWPFParagraph> cellPList = cell.getParagraphs();
if (cellPList != null && cellPList.size() > 0) {
for (XWPFParagraph xwpfPr : cellPList) {
List<XWPFRun> runs = xwpfPr.getRuns();
if (runs != null && runs.size() > 0) {
for (XWPFRun xwpfRun : runs) {
sb.append(xwpfRun.getText(0));
}
}
}
}
return sb.toString();
}
/**
* @Description: 创建表格, 创建后表格至少有1行1列, 设置列宽
*/
public static XWPFTable createTable(XWPFDocument xdoc, int rowSize, int cellSize,
boolean isSetColWidth, int[] colWidths) {
XWPFTable table = xdoc.createTable(rowSize, cellSize);
if (isSetColWidth) {
CTTbl ttbl = table.getCTTbl();
CTTblGrid tblGrid = ttbl.addNewTblGrid();
for (int j = 0, len = Math.min(cellSize, colWidths.length); j < len; j++) {
CTTblGridCol gridCol = tblGrid.addNewGridCol();
gridCol.setW(new BigInteger(String.valueOf(colWidths[j])));
}
}
return table;
}
/**
* @Description: 设置表格总宽度与水平对齐方式
*/
public static void setTableWidthAndHAlign(XWPFTable table, String width,
STJc.Enum enumValue) {
CTTblPr tblPr = getTableCTTblPr(table);
CTTblWidth tblWidth = tblPr.isSetTblW() ? tblPr.getTblW() : tblPr
.addNewTblW();
if (enumValue != null) {
CTJc cTJc = tblPr.addNewJc();
cTJc.setVal(enumValue);
}
tblWidth.setW(new BigInteger(width));
tblWidth.setType(STTblWidth.DXA);
}
/**
* @Description: 得到Table的CTTblPr, 不存在则新建
*/
public static CTTblPr getTableCTTblPr(XWPFTable table) {
CTTbl ttbl = table.getCTTbl();
CTTblPr tblPr = ttbl.getTblPr() == null ? ttbl.addNewTblPr() : ttbl
.getTblPr();
return tblPr;
}
/**
* @Description: 得到Table的边框, 不存在则新建
*/
public static CTTblBorders getTableBorders(XWPFTable table) {
CTTblPr tblPr = getTableCTTblPr(table);
CTTblBorders tblBorders = tblPr.isSetTblBorders() ? tblPr
.getTblBorders() : tblPr.addNewTblBorders();
return tblBorders;
}
/**
* @Description: 设置表格边框样式
*/
public static void setTableBorders(XWPFTable table, CTBorder left, CTBorder top,
CTBorder right, CTBorder bottom) {
CTTblBorders tblBorders = getTableBorders(table);
if (left != null) {
tblBorders.setLeft(left);
}
if (top != null) {
tblBorders.setTop(top);
}
if (right != null) {
tblBorders.setRight(right);
}
if (bottom != null) {
tblBorders.setBottom(bottom);
}
}
/**
* @Description: 表格指定位置插入一行, index为新增行所在的行位置(不能大于表行数)
*/
public static void insertTableRowAtIndex(XWPFTable table, int index) {
insertTableRowAtIndexFromRow(table, 0, index);
}
//根据数据条数插入数据行数 本来有一行所以少插入一行
public static void insertTableRowAtIndex(XWPFTable table, int index, int rowSize) {
if (rowSize > 0) {
for (int i = 0; i < rowSize - 1; i++) {
insertTableRowAtIndexFromRow(table, 2, index);
}
}
}
public static void insertTableRowAtIndexFromRow(XWPFTable table, int indexRow, int index) {
XWPFTableRow row = table.insertNewTableRow(index);
if (row == null) {
return;
}
CTTbl ctTbl = table.getCTTbl();
CTTblGrid tblGrid = ctTbl.getTblGrid();
int cellSize = 0;
boolean isAdd = false;
if (tblGrid != null) {
List<CTTblGridCol> gridColList = tblGrid.getGridColList();
if (gridColList != null && gridColList.size() > 0) {
isAdd = true;
for (CTTblGridCol ctlCol : gridColList) {
XWPFTableCell cell = row.addNewTableCell();
cell.setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER);
CTTc cttc = cell.getCTTc();
CTP ctp = cttc.getPList().get(0);
CTPPr ctppr = ctp.getPPr();
if (ctppr == null) {
ctppr = ctp.addNewPPr();
}
CTJc ctjc = ctppr.getJc();
if (ctjc == null) {
ctjc = ctppr.addNewJc();
}
//水平居中
ctjc.setVal(STJc.CENTER);
setCellWidthAndVAlign(cell, ctlCol.getW().toString(),
STTblWidth.DXA, null);
}
}
}
// 大部分都不会走到这一步
if (!isAdd) {
XWPFTableRow firstRow = table.getRow(indexRow);
cellSize = getCellSizeWithMergeNum(firstRow);
for (int i = 0; i < cellSize; i++) {
row.addNewTableCell();
}
}
}
public static List<XWPFTableCell> getRowCells(XWPFTable table, int rowIndex) {
XWPFTableRow row = table.getRow(rowIndex);
if (null != row) {
return row.getTableCells();
}
return null;
}
public static Map<Integer, String> getCellsContent(XWPFTable table, int rowIndex) {
Map<Integer, String> map = new LinkedHashMap<>();
try {
XWPFTableRow row = table.getRow(rowIndex);
List<XWPFTableCell> cellList = row.getTableCells();
int length = cellList.size();
for (int i = 0; i < length; i++) {
XWPFTableCell cell = cellList.get(i);
List<XWPFParagraph> cells = cell.getParagraphs();
for (XWPFParagraph p : cells) {
String text = StringUtils.join(p.getRuns().toArray());
}
map.put(i, cell.getText());
}
} catch (Exception e) {
e.printStackTrace();
}
return map;
}
/**
* @Description: 删除表一行
*/
public static void deleteTableRow(XWPFTable table, int index) {
table.removeRow(index);
}
/**
* @Description: 统计列数(包括合并的列数)
*/
public static int getCellSizeWithMergeNum(XWPFTableRow row) {
List<XWPFTableCell> firstRowCellList = row.getTableCells();
int cellSize = firstRowCellList.size();
for (XWPFTableCell xwpfTableCell : firstRowCellList) {
CTTc ctTc = xwpfTableCell.getCTTc();
if (ctTc.isSetTcPr()) {
CTTcPr tcPr = ctTc.getTcPr();
if (tcPr.isSetGridSpan()) {
CTDecimalNumber gridSpan = tcPr.getGridSpan();
cellSize += gridSpan.getVal().intValue() - 1;
}
}
}
return cellSize;
}
/**
* @Description: 得到CTTrPr, 不存在则新建
*/
public static CTTrPr getRowCTTrPr(XWPFTableRow row) {
CTRow ctRow = row.getCtRow();
CTTrPr trPr = ctRow.isSetTrPr() ? ctRow.getTrPr() : ctRow.addNewTrPr();
return trPr;
}
/**
* @Description: 设置行高
*/
public static void setRowHeight(XWPFTableRow row, String hight,
STHeightRule.Enum heigthEnum) {
CTTrPr trPr = getRowCTTrPr(row);
CTHeight trHeight;
if (trPr.getTrHeightList() != null && trPr.getTrHeightList().size() > 0) {
trHeight = trPr.getTrHeightList().get(0);
} else {
trHeight = trPr.addNewTrHeight();
}
trHeight.setVal(new BigInteger(hight));
if (heigthEnum != null) {
trHeight.setHRule(heigthEnum);
}
}
/**
* @Description: 隐藏行
*/
public static void setRowHidden(XWPFTableRow row, boolean hidden) {
CTTrPr trPr = getRowCTTrPr(row);
CTOnOff hiddenValue;
if (trPr.getHiddenList() != null && trPr.getHiddenList().size() > 0) {
hiddenValue = trPr.getHiddenList().get(0);
} else {
hiddenValue = trPr.addNewHidden();
}
if (hidden) {
hiddenValue.setVal(STOnOff.TRUE);
} else {
hiddenValue.setVal(STOnOff.FALSE);
}
setRowAllCellHidden(row, hidden);
}
public static void setRowAllCellHidden(XWPFTableRow row, boolean isVanish) {
for (int colIndex = 0, colLen = row.getTableCells().size(); colIndex < colLen; colIndex++) {
XWPFTableCell cell = row.getCell(colIndex);
setCellHidden(cell, isVanish);
}
}
/**
* @Description: 追加设置单元格内容
*/
public static void setCellAppendNewContent(XWPFTable table, int rowIndex, int col, String content) {
XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
XWPFParagraph p = getCellFirstParagraph(cell);
List<XWPFRun> cellRunList = p.getRuns();
if (cellRunList == null || cellRunList.size() == 0) {
return;
}
for (int i = cellRunList.size() - 1; i >= 1; i--) {
p.removeRun(i);
}
XWPFRun run = cellRunList.get(0);
run.setText(content);
}
/**
* @Description: 重新设置单元格内容保留原格式
*/
public static void setCellNewContent(XWPFTable table, int rowIndex, int col, String content) {
XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
XWPFParagraph p = getCellFirstParagraph(cell);
List<XWPFRun> cellRunList = p.getRuns();
if (cellRunList == null || cellRunList.size() == 0) {
return;
}
for (int i = 0; i < cellRunList.size(); i++) {
String fontFamily = cellRunList.get(i).getFontFamily();
int fontsize = cellRunList.get(i).getFontSize();
p.removeRun(i);
XWPFRun run = p.insertNewRun(i);
run.setFontFamily(fontFamily);
run.setFontSize(fontsize);
run.setText(content);
}
}
/**
* @Description: 追加设置单元格科学计数法内容
*/
public static void setCellNewContentScientificNotation(XWPFTable table, int rowIndex, int col, String content) {
XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
XWPFParagraph p = getCellFirstParagraph(cell);
List<XWPFRun> cellRunList = p.getRuns();
if (cellRunList == null || cellRunList.size() == 0) {
return;
}
for (int i = cellRunList.size() - 1; i >= 0; i--) {
String fontFamily = cellRunList.get(i).getFontFamily();
int fontsize = cellRunList.get(i).getFontSize();
p.removeRun(i);
XWPFRun run = p.insertNewRun(i);
run.setFontFamily(fontFamily);
run.setFontSize(fontsize);
run.setSubscript(VerticalAlign.SUPERSCRIPT);//下标
run.setText(content);
}
}
/**
* @Description: 删除单元格内容
*/
public static void deleteCellContent(XWPFTable table, int rowIndex, int col) {
XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
XWPFParagraph p = getCellFirstParagraph(cell);
List<XWPFRun> cellRunList = p.getRuns();
if (cellRunList == null || cellRunList.size() == 0) {
return;
}
for (int i = cellRunList.size() - 1; i >= 0; i--) {
p.removeRun(i);
}
}
/**
* @Description: 隐藏单元格内容
*/
public static void setHiddenCellContent(XWPFTable table, int rowIndex, int col) {
XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
setCellHidden(cell, true);
}
public static void setCellHidden(XWPFTableCell cell, boolean isVanish) {
XWPFParagraph p = getCellFirstParagraph(cell);
CTPPr pPPr = getParagraphCTPPr(p);
CTParaRPr paRpr = pPPr.isSetRPr() ? pPPr.getRPr() : pPPr.addNewRPr();
CTOnOff vanishCtOnOff = paRpr.isSetVanish() ? paRpr.getVanish() : paRpr
.addNewVanish();
if (isVanish) {
vanishCtOnOff.setVal(STOnOff.TRUE);
} else {
vanishCtOnOff.setVal(STOnOff.FALSE);
}
List<XWPFRun> cellRunList = p.getRuns();
if (cellRunList == null || cellRunList.size() == 0) {
return;
}
for (XWPFRun xwpfRun : cellRunList) {
CTRPr pRpr = getRunCTRPr(p, xwpfRun);
vanishCtOnOff = pRpr.isSetVanish() ? pRpr.getVanish() : pRpr
.addNewVanish();
if (isVanish) {
vanishCtOnOff.setVal(STOnOff.TRUE);
} else {
vanishCtOnOff.setVal(STOnOff.FALSE);
}
}
}
/**
* @Description: 得到Cell的CTTcPr, 不存在则新建
*/
public static CTTcPr getCellCTTcPr(XWPFTableCell cell) {
CTTc cttc = cell.getCTTc();
CTTcPr tcPr = cttc.isSetTcPr() ? cttc.getTcPr() : cttc.addNewTcPr();
return tcPr;
}
/**
* @Description: 设置垂直对齐方式
*/
public static void setCellVAlign(XWPFTableCell cell, STVerticalJc.Enum vAlign) {
setCellWidthAndVAlign(cell, null, null, vAlign);
}
/**
* @Description: 设置列宽和垂直对齐方式
*/
public static void setCellWidthAndVAlign(XWPFTableCell cell, String width,
STTblWidth.Enum typeEnum, STVerticalJc.Enum vAlign) {
CTTcPr tcPr = getCellCTTcPr(cell);
CTTblWidth tcw = tcPr.isSetTcW() ? tcPr.getTcW() : tcPr.addNewTcW();
if (width != null) {
tcw.setW(new BigInteger(width));
}
if (typeEnum != null) {
tcw.setType(typeEnum);
}
if (vAlign != null) {
CTVerticalJc vJc = tcPr.isSetVAlign() ? tcPr.getVAlign() : tcPr
.addNewVAlign();
vJc.setVal(vAlign);
}
}
/**
* @Description: 得到单元格第一个Paragraph
*/
public static XWPFParagraph getCellFirstParagraph(XWPFTableCell cell) {
XWPFParagraph p;
if (cell.getParagraphs() != null && cell.getParagraphs().size() > 0) {
p = cell.getParagraphs().get(0);
} else {
p = cell.addParagraph();
}
return p;
}
/**
* @Description: 跨列合并
*/
public static void mergeCellsHorizontal(XWPFTable table, int row, int fromCell,
int toCell) {
for (int cellIndex = fromCell; cellIndex <= toCell; cellIndex++) {
XWPFTableCell cell = table.getRow(row).getCell(cellIndex);
if (cellIndex == fromCell) {
// The first merged cell is set with RESTART merge value
getCellCTTcPr(cell).addNewHMerge().setVal(STMerge.RESTART);
} else {
// Cells which join (merge) the first one,are set with CONTINUE
getCellCTTcPr(cell).addNewHMerge().setVal(STMerge.CONTINUE);
}
}
}
public static void mergeCellsVertically(XWPFTable table, int col, int fromRow,
int toRow) {
for (int rowIndex = fromRow; rowIndex <= toRow; rowIndex++) {
XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
if (rowIndex == fromRow) {
// The first merged cell is set with RESTART merge value
getCellCTTcPr(cell).addNewVMerge().setVal(STMerge.RESTART);
} else {
// Cells which join (merge) the first one,are set with CONTINUE
getCellCTTcPr(cell).addNewVMerge().setVal(STMerge.CONTINUE);
}
}
}
/*------------------------------------Word 文档信息--------------------------------------------------- */
/**
* @Description: 设置页面背景色
*/
public static void setDocumentbackground(XWPFDocument document, String bgColor) {
CTBackground bg = document.getDocument().isSetBackground() ? document
.getDocument().getBackground() : document.getDocument()
.addNewBackground();
bg.setColor(bgColor);
}
public static CTSectPr getDocumentCTSectPr(XWPFDocument document) {
CTSectPr sectPr = document.getDocument().getBody().isSetSectPr() ? document
.getDocument().getBody().getSectPr()
: document.getDocument().getBody().addNewSectPr();
return sectPr;
}
/**
* @Description: 页面Break
*/
public static void addNewPageBreak(XWPFDocument document, BreakType breakType) {
XWPFParagraph xp = document.createParagraph();
xp.createRun().addBreak(breakType);
}
/**
* @Description: 设置页面边框
*/
public void setPgBorders(XWPFDocument document, CTBorder top,
CTBorder right, CTBorder bottom, CTBorder left) {
CTSectPr sectPr = getDocumentCTSectPr(document);
CTPageBorders pd = sectPr.isSetPgBorders() ? sectPr.getPgBorders()
: sectPr.addNewPgBorders();
/*
* CTBorder bb = pd.addNewBottom(); bb.setVal(STBorder.SINGLE);
* bb.setSz(new BigInteger("4")); bb.setSpace(new BigInteger("24"));
* bb.setColor("FBB61F");
*/
if (top != null) {
pd.setTop(top);
}
if (right != null) {
pd.setRight(right);
}
if (bottom != null) {
pd.setBottom(bottom);
}
if (left != null) {
pd.setLeft(left);
}
}
/**
* @Description: 设置页面大小及纸张方向 landscape横向
*/
public static void setDocumentSize(XWPFDocument document, String width,
String height, STPageOrientation.Enum stValue) {
CTSectPr sectPr = getDocumentCTSectPr(document);
CTPageSz pgsz = sectPr.isSetPgSz() ? sectPr.getPgSz() : sectPr
.addNewPgSz();
pgsz.setH(new BigInteger(height));
pgsz.setW(new BigInteger(width));
pgsz.setOrient(stValue);
}
/**
* @Description: 设置页边距 (word中1厘米约等于567)
*/
public static void setDocumentMargin(XWPFDocument document, String left,
String top, String right, String bottom) {
CTSectPr sectPr = getDocumentCTSectPr(document);
CTPageMar ctpagemar = sectPr.addNewPgMar();
if (StringUtils.isNotBlank(left)) {
ctpagemar.setLeft(new BigInteger(left));
}
if (StringUtils.isNotBlank(top)) {
ctpagemar.setTop(new BigInteger(top));
}
if (StringUtils.isNotBlank(right)) {
ctpagemar.setRight(new BigInteger(right));
}
if (StringUtils.isNotBlank(bottom)) {
ctpagemar.setBottom(new BigInteger(bottom));
}
}
/**
* @Description: 保存文档
*/
public static void saveDocument(XWPFDocument document, String savePath)
throws Exception {
FileOutputStream fos = new FileOutputStream(savePath);
document.write(fos);
fos.close();
}
/**
* @Description: 打开word文档
*/
public static XWPFDocument openDocument(String filePath) throws Exception {
XWPFDocument xdoc = new XWPFDocument(
POIXMLDocument.openPackage(filePath));
return xdoc;
}
public static Map<Integer, String> getCellSnMap(XWPFTable table, int rowIndex) {
Map<Integer, String> map = new LinkedHashMap<>();
try {
XWPFTableRow row = table.getRow(rowIndex);
List<XWPFTableCell> cellList = row.getTableCells();
int length = cellList.size();
for (int i = 0; i < length; i++) {
map.put(i, cellList.get(i).getText());
}
} catch (Exception e) {
e.printStackTrace();
}
return map;
}
}
package com.patzn.cloud.service.lims.common;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xwpf.usermodel.*;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PoiUtil2007ForReplace {
public static ArrayList<String> getReplaceElements(XWPFDocument document,String regex) {
ArrayList<String> al = new ArrayList<>();
// 遍历段落
Iterator<XWPFParagraph> itPara = document.getParagraphsIterator();
while (itPara.hasNext()) {
XWPFParagraph paragraph = (XWPFParagraph) itPara.next();
al.addAll(PoiUtil2007ForReplace.getReplaceElements(regex, paragraph));
}
// 遍历表
Iterator<XWPFTable> itTable = document.getTablesIterator();
while (itTable.hasNext()) {
XWPFTable table = (XWPFTable) itTable.next();
int rcount = table.getNumberOfRows();
for (int i = 0; i < rcount; i++) {
XWPFTableRow row = table.getRow(i);
List<XWPFTableCell> cells = row.getTableCells();
for (XWPFTableCell cell : cells) {
List<XWPFParagraph> paraList=cell.getParagraphs();
for(XWPFParagraph paragraph:paraList){
al.addAll(PoiUtil2007ForReplace.getReplaceElements(regex, paragraph));
}
}
}
}
return al;
}
private static ArrayList<String> getReplaceElements(String regex, XWPFParagraph paragraph) {
// System.out.println("====================");
ArrayList<String> al = new ArrayList<>();
List<XWPFRun> runs = paragraph.getRuns();
for (int i = 0; i < runs.size(); i++) {
XWPFRun run=runs.get(i);
String runString = run.getText(run.getTextPosition());
// System.out.println("run["+i+"]:"+runString);
if(runString!=null){
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(runString);
while (matcher.find()) {
if (!al.contains(matcher.group())) {
al.add(matcher.group());
}
}
}
}
return al;
}
public static boolean replaceHeadText(XWPFDocument document, Map<String, String> map) {
try {
// 替换段落中的指定文字
List<XWPFParagraph> headers = document.getHeaderFooterPolicy().getDefaultHeader().getParagraphs();
for (XWPFParagraph paragraph : headers) {
List<XWPFRun> runs = paragraph.getRuns();
for (XWPFRun run : runs) {
String text = run.getText(0);
if (StringUtils.isNotEmpty(text)) {
for (Map.Entry<String, String> entry : map.entrySet()) {
String key = entry.getKey();
if (text.indexOf(key) != -1) {
Object value = entry.getValue();
if (value instanceof String) {
text = text.replace(key, value.toString());
run.setText(text, 0);
}
}
}
}
}
}
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
public static boolean replaceText(XWPFDocument document,Map<String, String> map) {
try {
// 替换段落中的指定文字
Iterator<XWPFParagraph> itPara = document.getParagraphsIterator();
while (itPara.hasNext()) {
XWPFParagraph paragraph = (XWPFParagraph) itPara.next();
PoiUtil2007ForReplace.replaceText(map, paragraph);
}
// 替换表格中的指定文字
Iterator<XWPFTable> itTable = document.getTablesIterator();
while (itTable.hasNext()) {
XWPFTable table = (XWPFTable) itTable.next();
int rcount = table.getNumberOfRows();
for (int i = 0; i < rcount; i++) {
XWPFTableRow row = table.getRow(i);
List<XWPFTableCell> cells = row.getTableCells();
for (XWPFTableCell cell : cells) {
List<XWPFParagraph> paraList=cell.getParagraphs();
for(XWPFParagraph paragraph:paraList){
PoiUtil2007ForReplace.replaceText(map, paragraph);
}
}
}
}
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
public static boolean replaceBookMarkText(XWPFDocument document,Map<String, String> map,Map<String,String> bookLabelList) {
try {
// 替换段落中的指定文字
Iterator<XWPFParagraph> itPara = document.getParagraphsIterator();
while (itPara.hasNext()) {
XWPFParagraph paragraph = (XWPFParagraph) itPara.next();
CTP ctp = paragraph.getCTP();
List<CTBookmark> bookmarks = ctp.getBookmarkStartList();
for(CTBookmark bookmark : bookmarks) {
String bookmarkName = bookmark.getName();
for(Map.Entry<String, String> entry:bookLabelList.entrySet()){
String bookmarkValue =entry.getKey();
if(bookmarkName!=null && bookmarkName.equals(bookmarkValue)) {
CTR ctr = ctp.addNewR();
CTText text = ctr.addNewT();
text.setStringValue(entry.getValue());
}
}
}
}
return true;
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
private static void replaceText(Map<String, String> map, XWPFParagraph paragraph) {
List<XWPFRun> runs = paragraph.getRuns();
for (int i = 0; i < runs.size(); i++) {
XWPFRun run=runs.get(i);
int position= run.getTextPosition();
if (position==-1&&null!=run.getText(position)){
String oneparaString = run.getText(run.getTextPosition());
if(oneparaString!=null){
for (Map.Entry<String, String> entry : map.entrySet()) {
oneparaString = oneparaString.replace(entry.getKey(), entry.getValue());
}
run.setText(oneparaString,0);
}
}
}
}
/**
* 根据正则表达式替换字符串
*/
public static boolean replaceText(XWPFDocument document,String oldText,String newText) {
try {
Map<String, String> replaceMap = new HashMap<>();
replaceMap.put(oldText, newText);
return PoiUtil2007ForReplace.replaceText(document, replaceMap);
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
/**
* 根据正则表达式替换字符串
* @param regex
* @param newText
* @return
*/
public static boolean replaceTextByRegex(XWPFDocument document,String regex,String newText) {
try {
Map<String, String> map = new HashMap<>();
List<String> replaceEles = PoiUtil2007ForReplace.getReplaceElements(document, regex);
for(String replaceEle:replaceEles){
map.put(replaceEle, newText);
}
return PoiUtil2007ForReplace.replaceText(document, map);
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
private static int getPictureType(String picType) {
int res = XWPFDocument.PICTURE_TYPE_PICT;
if (picType != null) {
if (picType.equalsIgnoreCase("png")) {
res = XWPFDocument.PICTURE_TYPE_PNG;
} else if (picType.equalsIgnoreCase("dib")) {
res = XWPFDocument.PICTURE_TYPE_DIB;
} else if (picType.equalsIgnoreCase("emf")) {
res = XWPFDocument.PICTURE_TYPE_EMF;
} else if (picType.equalsIgnoreCase("jpg") || picType.equalsIgnoreCase("jpeg")) {
res = XWPFDocument.PICTURE_TYPE_JPEG;
} else if (picType.equalsIgnoreCase("wmf")) {
res = XWPFDocument.PICTURE_TYPE_WMF;
}
}
return res;
}
public static Map<String,Object> getWordXWPFRunStyle(XWPFRun runOld) {
Map<String, Object> mapAttr = new HashMap<>();
mapAttr.put("Color", runOld.getColor());
if (-1 == runOld.getFontSize()) {
mapAttr.put("FontSize", 12);
} else {
mapAttr.put("FontSize", runOld.getFontSize());
}
mapAttr.put("Subscript", runOld.getSubscript());
mapAttr.put("Underline", runOld.getUnderline());
mapAttr.put("FontFamily", runOld.getFontFamily());
return mapAttr;
}
public static XWPFRun setWordXWPFRunStyle(XWPFRun runNew, Map<String,Object> mapAttr, String text, boolean flag) {
runNew.setColor((String) mapAttr.get("Color"));
if ("-1".equals(mapAttr.get("FontSize").toString())) {// 处理小四字号读取为-1的问题
runNew.setFontSize(12);
} else {
runNew.setFontSize((Integer) mapAttr.get("FontSize"));
}
runNew.setBold(flag);
runNew.setUnderline((UnderlinePatterns) mapAttr.get("Underline"));
runNew.setText(text);
runNew.setSubscript((VerticalAlign) mapAttr.get("Subscript"));
runNew.setFontFamily((String) mapAttr.get("FontFamily"));
return runNew;
}
/**
* 得到后缀
* @param name
* @return
*/
public static String getSuffix(String name){
return name.substring(name.lastIndexOf(".") + 1);
}
/**
* 保存
*
* @param destPath
* 保存的路径
* @throws Exception
*/
public static void save(XWPFDocument document,String destPath) throws Exception {
FileOutputStream outStream = new FileOutputStream(destPath);
document.write(outStream);
outStream.close();
}
/**
* 保存
*
* @param
*
* @throws Exception
*/
public static void save(XWPFDocument document,OutputStream outputStream) throws Exception {
document.write(outputStream);
}
/**
* 将输入流中的数据写入字节数组
*
* @param in
* @return
*/
public static byte[] inputStream2ByteArray(InputStream in, boolean isClose) {
byte[] byteArray = null;
try {
int total = in.available();
byteArray = new byte[total];
in.read(byteArray);
} catch (IOException e) {
e.printStackTrace();
} finally {
if (isClose) {
try {
in.close();
} catch (Exception e2) {
System.out.println("关闭流失败");
}
}
}
return byteArray;
}
}
package com.patzn.cloud.service.lims.common;
import com.google.common.collect.Lists;
import com.patzn.cloud.commons.enums.IBaseEnum;
import com.patzn.cloud.commons.toolkit.DateUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
import java.lang.reflect.Method;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author wwd
*/
public class StringHandleUtils {
public static String getContinuousStringData(String[] intString, String stringPre) {
StringBuffer result = new StringBuffer();
if (null == intString || intString.length == 0) {
return "";
}
if (intString.length == 1) {
return stringPre + intString[0];
}
for (String string : intString) {
try {
Integer.parseInt(string);
} catch (Exception e) {
return "";
}
}
int[] a = new int[intString.length];
for (int i = 0; i < intString.length; i++) {
a[i] = Integer.parseInt(intString[i]);
}
Arrays.sort(a);
if (a[0] + 1 != a[1]) {
result.append(stringPre + intString[0] + ",");
} else {
result.append(stringPre + intString[0] + "~");
}
for (int i = 1; i < a.length - 1; i++) {
if ((a[i] - 1 != a[i - 1]) & (a[i] + 1 != a[i + 1])) {
result.append(stringPre + intString[i] + ",");
} else if ((a[i] - 1 == a[i - 1]) & (a[i] + 1 != a[i + 1])) {
result.append(stringPre + intString[i] + ",");
} else if ((a[i] - 1 == a[i - 1]) & (a[i] + 1 == a[i + 1])) {
result.append("");
} else {
result.append(stringPre + intString[i] + "~");
}
}
result.append(stringPre + intString[a.length - 1]);
return result.toString();
}
public static String getNumFromString(String str) {
String regEx = "[^0-9]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(str);
String outNum = m.replaceAll("").trim();
return outNum;
}
public static String join(Collection<String> collection) {
return join(collection, "、");
}
public static String join(Collection<String> collection, String split) {
if (CollectionUtils.isEmpty(collection)) {
return "";
}
split = StringUtils.isEmpty(split) ? "," : split;
StringBuffer sb = new StringBuffer();
for (String s : collection) {
if (!sb.toString().contains(s)) {
sb.append(s).append("、");
}
}
return sb.toString().length() == 0 ? "" : sb.toString().substring(0, sb.toString().length() - 1);
}
public static String joinLong(Collection<Long> collection, String split) {
if (CollectionUtils.isEmpty(collection)) {
return "";
}
split = StringUtils.isEmpty(split) ? "," : split;
StringBuffer sb = new StringBuffer();
for (Long s : collection) {
if (!sb.toString().contains(s.toString())) {
sb.append(s).append("、");
}
}
return sb.toString().length() == 0 ? "" : sb.toString().substring(0, sb.toString().length() - 1);
}
public static String getReplacePreporty(String replace) {
if (StringUtils.isBlank(replace)) {
return "";
}
if (!replace.contains("${")) {
return replace;
}
if (!replace.contains("}")) {
return replace;
}
try {
if (replace.contains(".")) {
String replaced = replace.replace("}", "");
String[] arrayReplaced = replaced.split("\\.");
return arrayReplaced[1];
} else {
return replace.replace("$", "").replace("{", "").replace("}", "");
}
} catch (Exception e) {
return replace;
}
}
public static boolean isYesOrNo(String str) {
if (StringUtils.isEmpty(str)) {
return false;
}
return "是".equals(str) || "否".equals(str);
}
public static boolean equals(String str, String param) {
if (StringUtils.isEmpty(str)) {
return false;
}
return str.equals(param);
}
public static String getExcepLastOne(String string) {
if (StringUtils.isEmpty(string)) {
return "";
}
return string.substring(0, string.length() - 1);
}
public static String getSnJoinString(Map<String, List<String>> snMap) {
StringBuffer snBuffer = new StringBuffer();
for (Map.Entry<String, List<String>> map : snMap.entrySet()) {
String[] array = new String[map.getValue().size()];
int length = map.getValue().size();
for (int i = 0; i < length; i++) {
array[i] = map.getValue().get(i);
}
Arrays.sort(array);
snBuffer.append(StringHandleUtils.getContinuousStringData(array, map.getKey())).append(",");
}
return snBuffer.toString();
}
public static void setText(XWPFTable table, int rowIndex, int cellIndex, String content) {
XWPFTableCell cell = table.getRow(rowIndex).getCell(cellIndex);
cell.setVerticalAlignment(XWPFTableCell.XWPFVertAlign.CENTER);
CTTc cttc = cell.getCTTc();
CTP ctp = cttc.getPList().get(0);
CTPPr ctppr = ctp.getPPr();
if (ctppr == null) {
ctppr = ctp.addNewPPr();
}
CTJc ctjc = ctppr.getJc();
if (ctjc == null) {
ctjc = ctppr.addNewJc();
}
//水平居中
ctjc.setVal(STJc.CENTER);
cell.setText(null == content ? "" : content);
}
public static StringBuilder getAppendContent(StringBuilder builder, String content) {
if (StringUtils.isEmpty(content)) {
return builder;
}
if (builder.toString().contains(content)) {
return builder;
}
builder.append(content);
return builder;
}
public static List<String> compareSys() {
List<String> compareList = new ArrayList<>();
compareList.add("<");
compareList.add(">");
compareList.add("=");
compareList.add("≥");
compareList.add("≤");
compareList.add("#");
return compareList;
}
public static boolean compareIsOk(String compare) {
if (StringUtils.isBlank(compare)) {
return false;
}
return StringHandleUtils.compareSys().contains(compare);
}
/**
* 判断 limitValue 是否区间形式, 这样以 # 分隔的为区间形式: 1#9
*
* @param limitValue 限量值
* @return true or false
*/
public static boolean isInterval(String limitValue) {
if (StringUtils.isBlank(limitValue)) {
return false;
}
if (!limitValue.contains(StringStaticDataUtils.JING)) {
return false;
}
if (limitValue.split(StringStaticDataUtils.JING).length != 2) {
return false;
}
if (!NumberUtils.isCreatable(limitValue.split(StringStaticDataUtils.JING)[0])) {
return false;
}
if (!NumberUtils.isCreatable(limitValue.split(StringStaticDataUtils.JING)[1])) {
return false;
}
if (NumberUtils.createBigDecimal(limitValue.split(StringStaticDataUtils.JING)[0])
.compareTo(NumberUtils.createBigDecimal(limitValue.split(StringStaticDataUtils.JING)[1])) > 0) {
return false;
}
return true;
}
public static String getString(String string) {
if (StringUtils.isEmpty(string)) {
return "";
}
return string;
}
public static String getStringToSkewLine(String string) {
if (StringUtils.isEmpty(string)) {
return "/";
}
return string;
}
public static List<String> getDiffrent(Collection<String> list1, Collection<String> list2) {
List<String> diff = new ArrayList<>();
for (String str : list1) {
if (!list2.contains(str)) {
diff.add(str);
}
}
return diff;
}
public static String getAttributesFromCodeRules(String code) {
String[] codeArray = code.split("\\.");
if (codeArray.length < 2) {
return "";
}
return StringHandleUtils.getExcepLastOne(codeArray[1]);
}
public static String getFieldValueByFieldName(String fieldName, Object o) {
try {
String firstLetter = fieldName.substring(0, 1).toUpperCase();
String getter = "get" + firstLetter + fieldName.substring(1);
Method method = o.getClass().getMethod(getter, new Class[]{});
Object value = method.invoke(o, new Object[]{});
if (value instanceof Date) {
return DateUtils.toYearMonthDay((Date) value);
}
return value.toString();
} catch (Exception e) {
return "/";
}
}
public static Object getObjectValue(Object object) {
if (null == object) {
return "";
}
if (object instanceof Integer) {
if (object.toString().equalsIgnoreCase(StringStaticDataUtils.ONE)) {
return "是";
}
if (object.toString().equalsIgnoreCase(StringStaticDataUtils.ZERO)) {
return "否";
}
}
if (object instanceof IBaseEnum) {
return ((IBaseEnum) object).getDisplay();
}
return object;
}
public static boolean isOnlyZeroOne(String string) {
if (StringUtils.isBlank(string)) {
return false;
}
return StringStaticDataUtils.ONE.equals(string) || StringStaticDataUtils.ZERO.equals(string);
}
public static String getObjectDifferent(String title, Map<String, String> propertyNameMap, Map<String, List<Object>>... intArray) {
return StringHandleUtils.getObjectDifferent(title, propertyNameMap, Arrays.asList(intArray));
}
public static String getObjectDifferent(String title, Map<String, String> propertyNameMap, List<Map<String, List<Object>>> intArray) {
int length = 0;
for (Map<String, List<Object>> map : intArray) {
if (null != map) {
length += map.size();
}
}
if (length == 0) {
return "";
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(title);
for (Map<String, List<Object>> map : intArray) {
for (Map.Entry<String, List<Object>> content : map.entrySet()) {
stringBuilder.append("'").append(propertyNameMap.get(content.getKey())).append("'由'").append(StringHandleUtils.getObjectValue(content.getValue().get(1))).append("'修改为'").append(StringHandleUtils.getObjectValue(content.getValue().get(0))).append("'、");
}
}
return StringHandleUtils.getExcepLastOne(stringBuilder.toString());
}
public static String getObjectFromMap(Map<Integer, String> map, Integer key) {
for (Map.Entry<Integer, String> m : map.entrySet()) {
if (m.getKey().equals(key)) {
return m.getValue().replace("{", "").replace("}", "")
.replace("(", "").replace(")", "")
.replace("#", "").replace("&", "")
.replace("*", "")
.replace("@", "");
}
}
return "";
}
public static String getSameElement(List<String> list) {
String[] indexArr;
Map<String, String> map = new HashMap<>();
for (int i = 0; i < list.size(); i++) {
String key = list.get(i);
String old = map.get(key);
if (old != null) {
map.put(key, old + "," + (i + 1));
} else {
map.put(key, "" + (i + 1));
}
}
Iterator<String> it = map.keySet().iterator();
int index = -1;
List<String> repeatList = Lists.newArrayList();
while (it.hasNext()) {
String key = it.next();
String value = map.get(key);
if (value.indexOf(",") != -1) {
repeatList.add(key);
indexArr = value.split(",");
for (int i = 0; i < indexArr.length; i++) {
index = Integer.parseInt(indexArr[i]) - 1;
list.set(index, list.get(index) + (1 + i));
}
}
}
return StringHandleUtils.join(repeatList);
}
public static boolean containsString(String text, String... strings) {
for (String str : strings) {
if (text.contains(str)) {
return true;
}
}
return false;
}
public static <T extends Comparable<T>> boolean compareListEqual(List<T> a, List<T> b) {
if (a.size() != b.size()) {
return false;
}
Collections.sort(a);
Collections.sort(b);
for (int i = 0; i < a.size(); i++) {
if (!a.get(i).equals(b.get(i))) {
return false;
}
}
return true;
}
public static String convertBlankString(String str, String replace) {
return StringUtils.isBlank(str) ? replace : str;
}
public static String parse(CharSequence cs) {
return StringHandleUtils.parse(cs, "");
}
public static String parse(CharSequence cs, String defVal) {
if (StringUtils.isEmpty(defVal)) {
defVal = "";
}
return StringUtils.isEmpty(cs) ? defVal : cs.toString();
}
public static String getObjectFromMapAll(Map<Integer, String> map, Integer key) {
//改动时需注意,字母不可乱去
for (Map.Entry<Integer, String> entry : map.entrySet()) {
if (entry.getKey().equals(key)) {
return entry.getValue().replace("{", "").replace("}", "")
.replace("(", "").replace(")", "")
.replace("#", "").replace("&", "")
.replace("*", "")
.replace("@", "")
.replace(".", "")
.replace("I", "")
.replace("$", "");
}
}
return "";
}
public static String getSnJoinStringSimple(Map<String, List<String>> snMap) {
StringBuffer snBuffer = new StringBuffer();
for (Map.Entry<String, List<String>> map : snMap.entrySet()) {
String[] array = new String[map.getValue().size()];
int length = map.getValue().size();
for (int i = 0; i < length; i++) {
array[i] = map.getValue().get(i);
}
Arrays.sort(array);
snBuffer.append(getContinuousStringDataSimple(array, map.getKey())).append("、");
}
String result = snBuffer.toString();
if (StringUtils.isBlank(result)) {
return result;
} else {
return result.substring(0, result.length() - 1);
}
}
public static String getContinuousStringDataSimple(String[] intString, String stringPre) {
StringBuffer result = new StringBuffer();
if (ArrayUtils.isEmpty(intString)) {
return "";
}
if (intString.length == 1) {
return stringPre + intString[0];
}
for (String string : intString) {
try {
Integer.parseInt(string);
} catch (Exception e) {
return "";
}
}
int[] a = new int[intString.length];
for (int i = 0; i < intString.length; i++) {
a[i] = Integer.parseInt(intString[i]);
}
Arrays.sort(a);
if (a[0] + 1 != a[1]) {
result.append(intString[0] + "、");
} else {
result.append(intString[0] + "~");
}
for (int i = 1; i < a.length - 1; i++) {
if ((a[i] - 1 != a[i - 1]) & (a[i] + 1 != a[i + 1])) {
result.append(intString[i] + "、");
} else if ((a[i] - 1 == a[i - 1]) & (a[i] + 1 != a[i + 1])) {
result.append(intString[i] + "、");
} else if ((a[i] - 1 == a[i - 1]) & (a[i] + 1 == a[i + 1])) {
result.append("");
} else {
result.append(intString[i] + "~");
}
}
result.append(intString[a.length - 1]);
return stringPre + result.toString();
}
}
package com.patzn.cloud.service.lims.common;
import java.util.*;
public final class StringStaticDataUtils {
public static final String SUCCESS = "success";
public static final String FALSE = "false";
public static final String ZERO = "0";
public static final String ONE = "1";
public static final String JING = "#";
public static final String SELECT_WAITING_ITEM = "请选择待提交的项目";
public static final String CONTRACT_ID_NULL = "委托id未传递";
public static final String CONTRACT_WRONG = "委托有误";
public static final String SELECT_SAMPLE = "请选择样品";
public static final String DATA_WRONG = "数据有误";
public static final String MSG_TITLE_QC_TASK = "新的质控编制任务";
public static final Map<String,List<String>> mapItemFlows=new HashMap<>();
static {
List<String> draftItemList=new ArrayList<>();
draftItemList.add("ALLOT");
draftItemList.add("INPUT");
mapItemFlows.put("DRAFT",draftItemList);
List<String> allotItemList=new ArrayList<>();
allotItemList.add("INPUT");
mapItemFlows.put("ALLOT",allotItemList);
List<String> inputItemList=new ArrayList<>();
inputItemList.add("REVIEW");
inputItemList.add("AUDIT");
inputItemList.add("COLLECT");
mapItemFlows.put("INPUT",inputItemList);
List<String> reviewItemList=new ArrayList<>();
reviewItemList.add("AUDIT");
reviewItemList.add("COLLECT");
mapItemFlows.put("REVIEW",reviewItemList);
List<String> auditItemList=new ArrayList<>();
auditItemList.add("COLLECT");
mapItemFlows.put("AUDIT",auditItemList);
List<String> collectItemList=new ArrayList<>();
collectItemList.add("END");
mapItemFlows.put("COLLECT",collectItemList);
}
public static final Map<String,List<String>> mapFlows=new HashMap<>();
static {
List<String> draftList=new ArrayList<>();
draftList.add("SEARCH");
draftList.add("PLAN");
draftList.add("REVIEW");
draftList.add("SIGN");
draftList.add("SAMPLING_ARRANGE");
mapFlows.put("DRAFT",draftList);
List<String> searchList=new ArrayList<>();
searchList.add("PLAN");
searchList.add("REVIEW");
searchList.add("SIGN");
searchList.add("SAMPLING_ARRANGE");
mapFlows.put("SEARCH",searchList);
List<String> planList=new ArrayList<>();
planList.add("PROJECT_LEADER");
planList.add("REVIEW");
planList.add("SIGN");
planList.add("SAMPLING_ARRANGE");
mapFlows.put("PLAN",planList);
List<String> planCheckList=new ArrayList<>();
planCheckList.add("REVIEW");
planCheckList.add("SIGN");
planCheckList.add("SAMPLING_ARRANGE");
mapFlows.put("PROJECT_LEADER",planCheckList);
List<String> reviewList=new ArrayList<>();
reviewList.add("SIGN");
reviewList.add("SAMPLING_ARRANGE");
mapFlows.put("REVIEW",reviewList);
List<String> signList=new ArrayList<>();
signList.add("SAMPLING_ARRANGE");
mapFlows.put("SIGN",signList);
List<String> samplingArrangeList=new ArrayList<>();
samplingArrangeList.add("SAMPLING");
mapFlows.put("SAMPLING_ARRANGE",samplingArrangeList);
List<String> samplingList=new ArrayList<>();
samplingList.add("RECEIVE");
mapFlows.put("SAMPLING",samplingList);
List<String> receiveList=new ArrayList<>();
receiveList.add("WAIT_QC");
receiveList.add("TESTING");
mapFlows.put("RECEIVE",receiveList);
List<String> testingList=new ArrayList<>();
receiveList.add("REPORT_ALLOT");
mapFlows.put("TESTING",testingList);
List<String> reportAllotList=new ArrayList<>();
reportAllotList.add("REPORT_MAKE");
mapFlows.put("REPORT_ALLOT",reportAllotList);
List<String> reportMakeList=new ArrayList<>();
reportMakeList.add("REPORT_CHECK");
mapFlows.put("REPORT_MAKE",reportMakeList);
List<String> reportCheckList=new ArrayList<>();
reportCheckList.add("REPORT_ISSUE");
mapFlows.put("REPORT_CHECK",reportCheckList);
List<String> reportIssueList=new ArrayList<>();
reportIssueList.add("REPORT_PRINT");
mapFlows.put("REPORT_ISSUE",reportIssueList);
List<String> reportPrintList=new ArrayList<>();
reportPrintList.add("REPORT_FILE");
mapFlows.put("REPORT_PRINT",reportPrintList);
List<String> reportFileList=new ArrayList<>();
reportFileList.add("END");
mapFlows.put("REPORT_FILE",reportFileList);
}
public static final Map<String,String> mapFlowOption=new LinkedHashMap<>();
static {
mapFlowOption.put("DRAFT", "草稿");
mapFlowOption.put("SEARCH", "现场调查");
mapFlowOption.put("PLAN", "方案编制");
mapFlowOption.put("PROJECT_LEADER", "项目负责人评审");
mapFlowOption.put("TECHNOLOGY_LEADER", "技术负责人评审");
mapFlowOption.put("REVIEW", "采样委托评审");
mapFlowOption.put("SIGN", "采样委托签订");
mapFlowOption.put("SAMPLING_ARRANGE", "采样任务安排");
mapFlowOption.put("SAMPLING", "采样任务进行中");
mapFlowOption.put("RECEIVE", "待样品接收发放");
mapFlowOption.put("WAIT_QC", "待实验室加质控");
mapFlowOption.put("TESTING", "实验室检测中");
mapFlowOption.put("REPORT_ALLOT", "待报告编制分配");
mapFlowOption.put("REPORT_MAKE", "待报告编制");
mapFlowOption.put("REPORT_CHECK", "待报告审核");
mapFlowOption.put("REPORT_ISSUE", "待报告签发");
mapFlowOption.put("REPORT_PRINT", "待报告打印发放");
mapFlowOption.put("REPORT_FILE", "待报告归档");
mapFlowOption.put("END", "结束");
}
public static final Map<String,String> mapFlowItemOption=new LinkedHashMap<>();
static {
mapFlowItemOption.put("DRAFT", "初始");
mapFlowItemOption.put("ALLOT", "待分配");
mapFlowItemOption.put("CLAIM", "待认领");
mapFlowItemOption.put("INPUT", "待数据录入");
mapFlowItemOption.put("REVIEW", "待数据复核");
mapFlowItemOption.put("AUDIT", "待数据审核");
mapFlowItemOption.put("COLLECT", "数据汇总");
mapFlowItemOption.put("END", "检测完成");
}
public static final List<String> reportModelList=new ArrayList<>();
static {
reportModelList.add("envReport.docx");
reportModelList.add("envSendReport.docx");
reportModelList.add("envSampleItemReport.docx");
}
}
package com.patzn.cloud.service.lims.common;
import com.aspose.words.Document;
import com.aspose.words.SaveFormat;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
/**
* @version 1.0
* 说明 :
*/
public class Word2Pdf {
public static void main(String[] args) {
String sourceFilePath="L:/testPDF/test.xls";//可生成PDF 没问题
String desFilePath="L:\\testPDF\\PDF\\test.pdf";
word2pdf(sourceFilePath, desFilePath);
}
public static boolean getLicense() {
boolean result = false;
try {
InputStream is = Word2Pdf.class.getClassLoader().getResourceAsStream(
"classpath:statis/license.xml");
com.aspose.words.License aposeLic = new com.aspose.words.License();
aposeLic.setLicense(is);
result = true;
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
public static void word2pdf(String sourceFilePath,String desFilePath) {
if (!getLicense()) { // 验证License 若不验证则转化出的PDP文档会有水印产生
return;
}
try {
File file = new File(desFilePath); // 新建一个空白pdf文档
FileOutputStream os = new FileOutputStream(file);
Document doc = new Document(sourceFilePath); // Address是将要被转化的word文档
doc.save(os, SaveFormat.PDF); // 全面支持DOC, DOCX, OOXML, RTF HTML,
// OpenDocument, PDF, EPUB, XPS, SWF
// 相互转换 os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
package com.patzn.cloud.service.lims.common.service;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.Map;
public interface IExportService {
String storageWord(XWPFDocument doc, String filePath);
Map<String, Object> wordToMap(String docFilePath);
String filePath(String fileName);
InputStream entrustInputStreamPath(String fileName);
InputStream inputStreamPath(String fileName);
String fileFolderPath(String folder, String fileName);
/**
* <p>
* 下载 DOCX 文件
* </p>
*
* @param response 响应流
* @param fileName 文件名
* @param doc DOCX 文档对象
*/
void downloadDoc(HttpServletResponse response, String fileName, XWPFDocument doc);
void downloadXls(HttpServletResponse response, String fileName, HSSFWorkbook workbook);
void downloadXlsx(HttpServletResponse response, String fileName, XSSFWorkbook workbook);
void downloadXlsxs(HttpServletResponse response, String fileName, SXSSFWorkbook workbook);
XWPFDocument getXWPFDoc(String folder, String modelName);
XWPFDocument getXWPFDoc(InputStream io);
XSSFWorkbook getXSSFWorkbook(String modelName);
SXSSFWorkbook getSXSSFWorkbook(String modelName);
XSSFWorkbook getXSSFWorkbook(InputStream io);
HSSFWorkbook getHSSFWorkbook(String modelName);
}
package com.patzn.cloud.service.lims.common.service;
import com.patzn.cloud.commons.controller.Account;
import java.util.List;
public interface ILmsMsgService {
/**
* <p>
* 发送消息通知
* </p>
*
* @param uri 取拥有uri权限人员的参数
* @param content 发送消息的主体内容
* @param title 标题
* @param account 发送消息的人
* @param toUserId 接受消息的人
*/
void sendMsg(String uri, String content, String title, Account account, List<Long> toUserId);
/**
* <p>
* 发送消息通知
* </p>
*
* @param uri 取拥有uri权限人员的参数
* @param msgType 消息类型
* @param content 发送消息的主体内容
* @param title 标题
* @param account 发送消息的人
* @param toUserId 接受消息的人
*/
void sendMsg(String uri, String msgType, String content, String title, Account account, List<Long> toUserId);
/**
* <p>
* 给审批组下的人发消息
* </p>
*
* @param businessType 消息业务类型
* @param groupAlias 审批组别名
* @param content 消息主题内容
* @param title 标题
* @param account 发送消息的人
*/
void sendMsg(int businessType, String groupAlias, String content, String title, Account account);
}
package com.patzn.cloud.service.lims.common.service;
import com.patzn.cloud.commons.controller.Account;
import java.util.List;
public interface ISteelMsgService {
void sendMsg(String uri, String content, String title, Account account, List<Long> toUserId);
}
package com.patzn.cloud.service.lims.common.service.impl;
import com.patzn.cloud.commons.api.RestAssert;
import com.patzn.cloud.service.lims.common.service.IExportService;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
/**
* <p>
* 导出相关
* </p>
*
* @author wwd
* @since 2018-06-13
*/
@Service
public class ExportServiceImpl implements IExportService {
private final Logger logger = LoggerFactory.getLogger(ExportServiceImpl.class);
@Override
public String storageWord(XWPFDocument doc, String filePath) {
try (
ByteArrayOutputStream bos = new ByteArrayOutputStream();
FileOutputStream out = new FileOutputStream(filePath, true)
) {
doc.write(bos);
out.write(bos.toByteArray());
} catch (Exception e) {
logger.error("保存 word 异常", e);
return null;
}
return filePath;
}
@Override
public Map<String, Object> wordToMap(String docFilePath) {
String filePath = String.format("templates/word/model/%s", docFilePath);
// 兼容打包 JAR 压缩情况处理
logger.debug("doc 文件路径 {}", docFilePath);
XWPFDocument doc = null;
try (InputStream in = this.getClass().getClassLoader().getResourceAsStream(filePath)) {
doc = new XWPFDocument(in);
} catch (Exception e) {
logger.error("word 转 map 异常", e);
}
Map<String, Object> map = new HashMap<>(2);
if (null!=doc&&null != doc.getTables()) {
map.put("table", doc.getTables().iterator());
}
map.put("doc", doc);
return map;
}
@Override
public String filePath(String fileName) {
URL url = this.getClass().getClassLoader().getResource("templates/word/model/" + fileName);
RestAssert.fail(null == url, fileName + "不存在");
return url.getPath();
}
@Override
public String fileFolderPath(String folder,String fileName) {
URL url = this.getClass().getClassLoader().getResource("templates/word/"+folder+"/" + fileName);
RestAssert.fail(null == url, fileName + "不存在");
return url.getPath();
}
public String fileFolderPath(String fileName) {
URL url = this.getClass().getClassLoader().getResource("templates/excel/"+fileName);
RestAssert.fail(null == url, fileName + "不存在");
return url.getPath();
}
public InputStream fileInputStreamPath(String fileName) {
InputStream url = this.getClass().getClassLoader().getResourceAsStream("templates/excel/"+fileName);
return url;
}
@Override
public InputStream entrustInputStreamPath(String fileName) {
InputStream url = this.getClass().getClassLoader().getResourceAsStream("templates/word/entrust/"+fileName);
return url;
}
@Override
public InputStream inputStreamPath(String fileName) {
InputStream url = this.getClass().getClassLoader().getResourceAsStream("templates/"+fileName);
return url;
}
@Override
public void downloadDoc(HttpServletResponse response, String fileName, XWPFDocument doc) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
response.addHeader("Content-Disposition", String.format("attachment; filename=%s;charset=UTF-8", fileName));
try (
ByteArrayOutputStream bos = new ByteArrayOutputStream();
OutputStream os = response.getOutputStream()
) {
doc.write(bos);
os.write(bos.toByteArray());
os.flush();
} catch (Exception e) {
logger.error("word 转 map 异常", e);
}
}
@Override
public void downloadXls(HttpServletResponse response, String fileName, HSSFWorkbook workbook) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.addHeader("Content-Disposition", String.format("attachment; filename=%s;charset=UTF-8", fileName));
try (
ByteArrayOutputStream bos = new ByteArrayOutputStream();
OutputStream os = response.getOutputStream()
) {
workbook.write(bos);
os.write(bos.toByteArray());
os.flush();
} catch (Exception e) {
logger.error("excel 转 map 异常", e);
}
}
@Override
public void downloadXlsx(HttpServletResponse response, String fileName, XSSFWorkbook workbook) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.addHeader("Content-Disposition", String.format("attachment; filename=%s;charset=UTF-8", fileName));
try (
ByteArrayOutputStream bos = new ByteArrayOutputStream();
OutputStream os = response.getOutputStream()
) {
workbook.write(bos);
os.write(bos.toByteArray());
os.flush();
} catch (Exception e) {
logger.error("excel 转 map 异常", e);
}
}
@Override
public void downloadXlsxs(HttpServletResponse response, String fileName, SXSSFWorkbook workbook) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.addHeader("Content-Disposition", String.format("attachment; filename=%s;charset=UTF-8", fileName));
try (
ByteArrayOutputStream bos = new ByteArrayOutputStream();
OutputStream os = response.getOutputStream()
) {
workbook.write(bos);
os.write(bos.toByteArray());
os.flush();
} catch (Exception e) {
logger.error("excel 转 map 异常", e);
}
}
@Override
public XWPFDocument getXWPFDoc(String folder, String modelName) {
FileInputStream in;
XWPFDocument doc = null;
try {
in = new FileInputStream(new File(fileFolderPath(folder,modelName)));
doc = new XWPFDocument(in);
} catch (Exception e1) {
e1.printStackTrace();
}
return doc;
}
@Override
public XWPFDocument getXWPFDoc(InputStream io) {
XWPFDocument doc = null;
try {
doc = new XWPFDocument(io);
} catch (Exception e1) {
e1.printStackTrace();
}
return doc;
}
@Override
public XSSFWorkbook getXSSFWorkbook(String modelName){
InputStream is;
XSSFWorkbook xssfWorkbook=null;
try {
is = fileInputStreamPath(modelName);
xssfWorkbook = new XSSFWorkbook(is);
} catch (Exception e1) {
e1.printStackTrace();
}
return xssfWorkbook;
}
@Override
public SXSSFWorkbook getSXSSFWorkbook(String modelName){
InputStream is;
SXSSFWorkbook xssfWorkbook=null;
try {
is = fileInputStreamPath(modelName);
xssfWorkbook = new SXSSFWorkbook(new XSSFWorkbook(is));
xssfWorkbook.setCompressTempFiles(true); //压缩临时文件,很重要,否则磁盘很快就会被写满
} catch (Exception e1) {
e1.printStackTrace();
}
return xssfWorkbook;
}
@Override
public XSSFWorkbook getXSSFWorkbook(InputStream io) {
XSSFWorkbook xssfWorkbook=null;
try {
xssfWorkbook = new XSSFWorkbook(io);
} catch (Exception e1) {
e1.printStackTrace();
}
return xssfWorkbook;
}
@Override
public HSSFWorkbook getHSSFWorkbook(String modelName){
FileInputStream is;
HSSFWorkbook xssfWorkbook=null;
try {
is = new FileInputStream(new File(fileFolderPath(modelName)));
xssfWorkbook = new HSSFWorkbook(is);
} catch (Exception e1) {
e1.printStackTrace();
}
return xssfWorkbook;
}
}
\ No newline at end of file
//package com.patzn.cloud.service.lims.common.service.impl;
//import com.patzn.cloud.commons.controller.Account;
//import com.patzn.cloud.mq.MqMsg;
//import com.patzn.cloud.mq.MqProperties;
//import com.patzn.cloud.service.lims.common.service.ILmsMsgService;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.amqp.AmqpException;
//import org.springframework.amqp.core.AmqpTemplate;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
//@Service
//public class LmsMsgService implements ILmsMsgService {
//
// private final Logger logger = LoggerFactory.getLogger(getClass());
//
// @Autowired
// private AmqpTemplate amqpTemplate;
// @Autowired
// private MqProperties mqProperties;
// @Value("${spring.application.name}")
// private String service;
//
// @Override
// public void sendMsg(String uri, String content, String title, Account account, List<Long> toUserId) {
// sendMsg(uri, null, content, title, account, toUserId);
// }
//
// @Override
// public void sendMsg(String uri, String msgType, String content, String title, Account account, List<Long> toUserId) {
// try {
// MqMsg mqMsg = getMqMsg(uri, msgType, content, title, account, toUserId, 0, null);
// mqMsg.setService(service);
// amqpTemplate.convertAndSend(mqProperties.getTopic().getMeterWorkMsg(), mqMsg);
// } catch (AmqpException e) {
// logger.error("发送消息异常:", e);
// }
// }
//
// @Override
// public void sendMsg(int businessType, String groupAlias, String content, String title, Account account) {
// try {
// MqMsg mqMsg = getMqMsg(null, null, content, title, account, null, businessType, groupAlias);
// amqpTemplate.convertAndSend(mqProperties.getTopic().getMeterWorkMsg(), mqMsg);
// } catch (AmqpException e) {
// logger.error("发送消息异常:", e);
// }
// }
//
// private MqMsg getMqMsg(String uri, String msgType, String content, String title, Account account, List<Long> toUserId, int businessType, String groupAlias) {
// MqMsg mqMsg = new MqMsg();
//// mqMsg.setUid(account.getUserId());
//// // 消息类型
//// mqMsg.setMsgType(msgType);
//// if (StringUtils.isNotEmpty(msgType) && StringUtils.isEmpty(uri)) {
//// // 不是空的并且路由是空的,需要根据 msgType 查询标签的路由
//// mqMsg.setUri(EnvMessageTypeEnum.getByValue(msgType));
//// } else {
//// // 路由
//// mqMsg.setUri(uri);
//// }
//// // 企业ID
//// mqMsg.setCompanyId(account.getCompanyId());
//// // 发送人
//// mqMsg.setSender(account.getUserName());
//// // 标题
//// mqMsg.setTitle(title);
//// // 内容
//// mqMsg.setContent(content);
//// // 类型
//// mqMsg.setType(1);
//// // 服务名称
//// mqMsg.setService(service);
//// // 接收人集合
//// mqMsg.setReceiverIds(toUserId);
//// mqMsg.setBusinessType(businessType);
//// mqMsg.setBusiness(groupAlias);
// return mqMsg;
// }
//
//}
//
package com.patzn.cloud.service.lims.config;
import com.patzn.cloud.commons.exception.ExceptionAspect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AspectConfig {
@Bean
public ExceptionAspect exceptionAspect() {
return new ExceptionAspect();
}
}
package com.patzn.cloud.service.lims.config;
import com.netflix.loadbalancer.IRule;
import com.patzn.cloud.zuul.LocalRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.patzn.cloud.commons.controller.LoginHelper;
import feign.Request;
import feign.RequestInterceptor;
import feign.RequestTemplate;
/**
* <p>
* Feign拦截器
* </p>
*
* @author hubin
* @since 2017-09-28
*/
@Configuration
public class FeignConfig implements RequestInterceptor {
@Override
public void apply(RequestTemplate requestTemplate) {
LoginHelper.setAccessToken(requestTemplate);
}
@Bean
public Request.Options options() {
return new Request.Options(
10000,
10000
);
}
}
package com.patzn.cloud.service.lims.config;
import com.patzn.cloud.commons.spring.ServiceExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/**
* <p>
* 全局异常处理
* </p>
*
* @author hubin
* @since 2017-02-18
*/
@RestControllerAdvice
public class GlobalExceptionHandler extends ServiceExceptionHandler {
}
package com.patzn.cloud.service.lims.config;
import com.baomidou.jobs.starter.EnableJobs;
import org.springframework.context.annotation.Configuration;
/**
* @author dingzg
* @since 2019/10/18
*/
//@EnableJobs
//@Configuration
public class JobsConfig {
}
package com.patzn.cloud.service.lims.config;
import com.baomidou.dynamic.datasource.plugin.MasterSlaveAutoRoutingPlugin;
import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.plugins.PerformanceInterceptor;
import com.baomidou.mybatisplus.plugins.parser.ISqlParser;
import com.baomidou.mybatisplus.plugins.parser.SqlInfo;
import com.baomidou.mybatisplus.plugins.parser.tenant.TenantHandler;
import com.baomidou.mybatisplus.plugins.parser.tenant.TenantSqlParser;
import com.baomidou.mybatisplus.toolkit.PluginUtils;
import com.patzn.cloud.commons.controller.LoginHelper;
import com.patzn.cloud.commons.service.BlockAttackSqlParser;
import com.patzn.cloud.commons.spring.PatznMetaObjectHandler;
import net.sf.jsqlparser.expression.BinaryExpression;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.LongValue;
import net.sf.jsqlparser.schema.Table;
import net.sf.jsqlparser.statement.Statement;
import net.sf.jsqlparser.statement.insert.Insert;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.reflection.MetaObject;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* MybatisPlus 配置
* </p>
*
* @author hubin
* @since 2017-03-31
*/
@EnableTransactionManagement
@Configuration
@MapperScan("com.patzn.cloud.service.lims.*.mapper*")
public class MybatisPlusConfig {
@Autowired
protected HttpServletRequest request;
private Long currentCompanyId() {
try {
return LoginHelper.getAccount(request).getCompanyId();
} catch (Throwable t) {
// 不处理
return null;
}
}
/**
* mybatis-plus分页插件<br>
* 文档:http://mp.baomidou.com<br>
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
List<ISqlParser> sqlParserList = new ArrayList<>();
TenantSqlParser tenantSqlParser = new TenantSqlParser() {
@Override
public SqlInfo processParser(Statement statement) {
if (statement instanceof Insert) {
// 不处理插入操作
return null;
}
return super.processParser(statement);
}
@Override
protected BinaryExpression andExpression(Table table, Expression where) {
return super.andExpression(table, where);
}
@Override
public boolean allowProcess(MetaObject metaObject) {
MappedStatement mappedStatement = PluginUtils.getMappedStatement(metaObject);
if ("com.baomidou.mybatisplus.mapper.SqlRunner.SelectList".equals(mappedStatement.getId())) {
return false;
}
return true;
}
};
tenantSqlParser.setTenantHandler(new TenantHandler() {
@Override
public Expression getTenantId() {
return new LongValue(currentCompanyId());
}
@Override
public String getTenantIdColumn() {
return "company_id";
}
@Override
public boolean doTableFilter(String tableName) {
// 过滤不存在企业 ID 的表,兼容企业 ID 不存在定时任务可用
if (null == currentCompanyId()
|| "lms_chemical_stock_delivery".equals(tableName)
|| "lms_customer_detail".equals(tableName)
|| "lms_supplier_detail".equals(tableName)
|| "lms_equip_product".equals(tableName)
|| "lms_staff_rel_org".equals(tableName)
|| "lms_staff_item".equals(tableName)
|| "lms_staff_equip".equals(tableName)
|| "lms_staff_professional".equals(tableName)
|| "food_keywords".equals(tableName)) {
return true;
}
return false;
}
});
sqlParserList.add(tenantSqlParser);
sqlParserList.add(new BlockAttackSqlParser());
paginationInterceptor.setSqlParserList(sqlParserList);
return paginationInterceptor;
}
/**
* mybatis-plus SQL执行效率插件
*/
@Bean
@Profile({"dev", "test"})
public PerformanceInterceptor performanceInterceptor() {
return new PerformanceInterceptor();
}
/**
* 注入自动填充器
*/
@Bean
public MetaObjectHandler metaObjectHandler() {
return new PatznMetaObjectHandler();
}
/**
* 读写分离配置
*/
@Bean
@Profile({"test"})
public MasterSlaveAutoRoutingPlugin masterSlaveAutoRoutingPlugin(){
return new MasterSlaveAutoRoutingPlugin();
}
}
\ No newline at end of file
package com.patzn.cloud.service.lims.config;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.patzn.cloud.mq.MqAutoConfiguration;
import com.patzn.cloud.mq.log.LogDisruptor;
/**
* <p>
* RabbitMQ 消息推送服务配置
* </p>
*
* @author hubin
* @since 2018-01-05
*/
@Configuration
public class RabbitMQConfig extends MqAutoConfiguration {
/**
* 初始化耗材归类报警队列
*/
@Bean
public Queue chemicalClassifyWarningQueue() {
return new Queue(mqProperties.getTopic().getChemicalClassifyWarning());
}
/**
* 初始化跟踪日志队列
*/
@Bean
public Queue syslog() {
// 启动 lmax Disruptor
LogDisruptor.INSTANCE.start();
return new Queue(mqProperties.getTopic().getSyslog());
}
/**
* 初始化推送消息队列
*/
@Bean
public Queue pushMsgQueue() {
return new Queue(mqProperties.getTopic().getPushMsg());
}
/**
* 初始化期间核查消息队列
*/
@Bean
public Queue equipCheckQueue() {
return new Queue(mqProperties.getTopic().getEquipCheckMsg());
}
// /**
// * 初始化计量队列
// */
// @Bean
// public Queue meterQueue() {
// return new Queue(mqProperties.getTopic().getMeterWorkMsg());
// }
}
package com.patzn.cloud.service.lims.config;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import com.patzn.report.console.ReportServlet;
/**
* <p>
* 报表配置
* </p>
*
* @author hubin
* @since 2018-12-03
*/
//@Configuration
//@ImportResource("classpath:report-context.xml")
public class ReportConfig {
// @Bean
public ServletRegistrationBean initUReport() {
return new ServletRegistrationBean(new ReportServlet(), "/report/*");
}
}
\ No newline at end of file
package com.patzn.cloud.service.lims.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* <p>
* 服务配置属性,对应 yml 中配置
* </p>
*
* @author hubin
* @since 2018-07-17
*/
@Configuration
@ConfigurationProperties(prefix = "service")
public class ServiceProperties {
/**
* LibreOffice 转换路径 soffice
*/
private String soffice;
private String url;
public String getSoffice() {
return soffice;
}
public void setSoffice(String soffice) {
this.soffice = soffice;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
package com.patzn.cloud.service.lims.config;
import java.util.ArrayList;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.ApiSelectorBuilder;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* <p>
* RESTful 服务 API 管理框架 Swagger 配置初始化 <br>
* 官方地址:http://swagger.io<br>
* </p>
*
* @author hubin
* @since 2017-08-23
*/
@Configuration
@EnableSwagger2
@ConditionalOnProperty(prefix = "swagger", value = "enable")
public class SwaggerConfig {
/**
* 可以定义多个组,比如本类中定义把test和demo区分开了 (访问页面就可以看到效果了)
*/
@Bean
public Docket testApi() {
//全局参数配置
// List<Parameter> params = new ArrayList<>();
// Parameter jwtHeader = new ParameterBuilder()
// .name(RestConstants.TOKEN_FLAG)
// .defaultValue(RestConstants.TOKEN_DEFAULT)
// .description("访问 Token 登录授权 KEY")
// .modelRef(new ModelRef("string"))
// .parameterType("header")
// .required(false)
// .build();
// params.add(jwtHeader);
// API 配置
ApiSelectorBuilder asb = new Docket(DocumentationType.SWAGGER_2)
// .globalOperationParameters(params)
.apiInfo(this.apiInfo()).select();
asb.apis(RequestHandlerSelectors.basePackage("com.patzn.cloud.service"));
asb.paths(PathSelectors.any());
return asb.build();
}
private ApiInfo apiInfo() {
return new ApiInfo("Lims Service API",
"Lims 服务 API",
"1.0",
"NO terms of service",
new Contact("帕特智能", "", ""),
"帕特智能云",
"http://patzn.com"
, new ArrayList()
);
}
}
package com.patzn.cloud.service.lims.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import com.baomidou.kisso.web.interceptor.SSOSpringInterceptor;
import com.patzn.cloud.commons.spring.LoginHandlerInterceptor;
import com.patzn.cloud.commons.spring.WebServiceConfigurer;
import com.patzn.cloud.mq.log.LogInterceptor;
/**
* <p>
* WEB 初始化相关配置
* </p>
*
* @author hubin
* @since 2017-03-31
*/
@ControllerAdvice
@Configuration
public class WebConfig extends WebServiceConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// SSO 授权拦截器
SSOSpringInterceptor ssoInterceptor = new SSOSpringInterceptor();
ssoInterceptor.setHandlerInterceptor(new LoginHandlerInterceptor());
registry.addInterceptor(ssoInterceptor).addPathPatterns("/**");
// 表单重复提交拦截器
// registry.addInterceptor(new RepeatFormInterceptor()).excludePathPatterns("/list");
// 注入跟踪访问日志
registry.addInterceptor(new LogInterceptor().setService("lims"));
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}
}
package com.patzn.cloud.service.lims.excel.controller;
import com.patzn.cloud.commons.api.RestAssert;
import com.patzn.cloud.commons.controller.ServiceController;
import com.patzn.poibox.excel.ExcelHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
* <p>
* Excel 相关控制器
* </p>
*
* @author hubin
* @since 2018-04-08
*/
@Api(description = "Excel 相关操作")
@RestController
@RequestMapping("/v1/excel")
public class ExcelController extends ServiceController {
private static final Map<String, String> TPL = new HashMap<>();
static {
ExcelController.TPL.put("QuotationList", "报价单导入模板");
ExcelController.TPL.put("MeterAptitudeItemImport", "授权资质检测项目导入模板");
ExcelController.TPL.put("MeterSampleImport", "样品导入模板");
ExcelController.TPL.put("MeterAptitudeImport", "授权资质导入模板");
ExcelController.TPL.put("MeterOutAptitudeImport", "资质外计量器具导入模板");
ExcelController.TPL.put("MeterSendSampleImport", "出检样品导入模板");
}
@ApiOperation(value = "根据模板名称下载模板", notes = "根据模板名称下载导入模板")
@ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "模板名称", required = true, paramType = "path", dataType = "String"),
})
@GetMapping("/template/{name}")
public void template(@PathVariable("name") String name) {
RestAssert.fail(null == ExcelController.TPL.get(name), "导入模板不存请联系管理员");
try {
// 文件路径
String filePath = String.format("templates/excel/input/%s.xlsx", name);
// 兼容打包 JAR 压缩情况处理
ExcelHelper.excelTemplateDownload(response, ExcelController.TPL.get(name), getClass().getClassLoader().getResourceAsStream(filePath));
} catch (Throwable t) {
RestAssert.fail("该模板不存在");
}
}
}
package com.patzn.cloud.service.lims.handler;
public class ProgressEntity {
private String date;
private String content;
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
# 开发环境
server:
exception:
enable: false
swagger:
enable: true
service:
api-url: http://api.dev.patzn.com:7000
url: http://api.dev.patzn.com:7000
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
# url: jdbc:postgresql://localhost:5432/dev_lims_meter
username: postgres
password: 123456
url: jdbc:postgresql://192.168.0.115:5432/dev_lims_meter
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: 192.168.0.115
discovery:
health-check-interval: 5s
# host: localhost
rabbitmq:
host: 121.36.130.208
port: 5672
username: mqbase
password: mqb123#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: dev.topic.push.msg
sys-log: dev.topic.sys.log
chemical-classify-warning: dev.topic.chemical.classify.warning
equip-check-msg: dev.topic.equip.check.msg
report-make-msg: dev.topic.report.make.msg
meter-work-msg: dev.topic.soil.work.msg
### jobs
jobs:
admin-address: http://api.dev.patzn.com:7000/print
# 对象存储配置
oss:
bucket-name: pt-web-sys
aliyun:
endpoint: http://oss.test.patzn.com
folder: dev/soil
#libreOffice 安装信息
libreOffice:
url: C:/Program Files/LibreOffice
# ribbon 路由配置
food.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
print.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
res.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
convert.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
# 开发环境
server:
exception:
enable: false
swagger:
enable: true
service:
api-url: http://api.dev.patzn.com:7000
url: http://api.dev.patzn.com:7000
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
# url: jdbc:postgresql://localhost:5432/dev_lims_meter
username: dbmeter
password: sfdWrE39&d!Pt
url: jdbc:postgresql://139.9.144.39:5432/pertest_lims_meter
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: localhost
discovery:
health-check-interval: 5s
# host: localhost
rabbitmq:
host: 121.36.130.208
port: 5672
username: mqbase
password: mqb123#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: dev.topic.push.msg
sys-log: dev.topic.sys.log
chemical-classify-warning: dev.topic.chemical.classify.warning
equip-check-msg: dev.topic.equip.check.msg
env-work-msg: dev.topic.env.work.msg
food-work-msg: dev.topic.food.work.msg
food-statistics-customer-contract: dev.topic.food.statistics.customer.contract
food-statistics-contract-progress: dev.topic.food.statistics.contract.progress
food-statistics-sample-progress: dev.topic.food.statistics.sample.progress
report-make-msg: dev.topic.report.make.msg
### jobs
jobs:
admin-address: http://api.dev.patzn.com:7000/print
# 对象存储配置
oss:
bucket-name: pt-web-sys
aliyun:
endpoint: http://oss.test.patzn.com
folder: dev/soil
# ribbon 路由配置
food.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
print.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
res.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
convert.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
# 测试环境
server:
exception:
enable: false
swagger:
enable: true
service:
api-url: http://api.devtest.patzn.com
url: http://api.devtest.patzn.com
food-url: http://food.devtest.patzn.com
province-item-url: http://60.216.97.250:8087/
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:postgresql://114.116.10.31:5432/devtest_lims
username: dbdevtest
password: devTest&10@31!Bg
# 注册中心配置
cloud:
consul:
host: 114.116.10.31
rabbitmq:
host: 114.116.10.31
port: 5672
username: mqbase
password: mqb123#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: devtest.topic.push.msg
sys-log: devtest.topic.sys.log
chemical-classify-warning: devtest.topic.chemical.classify.warning
equip-check-msg: devtest.topic.equip.check.msg
env-work-msg: devtest.topic.env.work.msg
food-work-msg: devtest.topic.food.work.msg
food-statistics-customer-contract: devtest.topic.food.statistics.customer.contract
food-statistics-contract-progress: devtest.topic.food.statistics.contract.progress
food-statistics-sample-progress: devtest.topic.food.statistics.sample.progress
report-make-msg: devtest.topic.report.make.msg
# Mongodb GridFS
data:
mongodb:
uri: mongodb://114.116.10.31:27017/lims
grid-fs-database: lims
# Mongodb GridFS 存储
oss:
grid-fs: true
bucket-name: base
\ No newline at end of file
# 开发环境
server:
exception:
enable: false
swagger:
enable: true
service:
api-url: http://api.dev.patzn.com:7000
url: http://api.dev.patzn.com:7000
food-url: http://web.dev.patzn.com:8090
province-item-url: http://60.216.97.250:8087
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
# url: jdbc:postgresql://localhost:5432/dev_lims
username: devuser
password: wqa21$#&w#n
url: jdbc:postgresql://39.98.166.218:5432/dev_lims
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: 39.98.166.218
# host: localhost
rabbitmq:
host: 121.36.130.208
port: 5672
username: mqbase
password: mqb123#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: dev.topic.push.msg
sys-log: dev.topic.sys.log
chemical-classify-warning: dev.topic.chemical.classify.warning
equip-check-msg: dev.topic.equip.check.msg
env-work-msg: dev.topic.env.work.msg
food-work-msg: dev.topic.food.work.msg
food-statistics-customer-contract: dev.topic.food.statistics.customer.contract
food-statistics-contract-progress: dev.topic.food.statistics.contract.progress
food-statistics-sample-progress: dev.topic.food.statistics.sample.progress
report-make-msg: dev.topic.report.make.msg
### jobs
jobs:
admin-address: http://api.dev.patzn.com:7000/print
# 对象存储配置
oss:
bucket-name: pt-web-sys
aliyun:
endpoint: http://oss.test.patzn.com
folder: dev/soil
# ribbon 路由配置
food.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
print.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
res.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
convert.ribbon.NFLoadBalancerRuleClassName: com.patzn.cloud.zuul.LocalRule
# 生产环境
server:
exception:
subject: 河南奶牛 food 服务异常
service:
api-url: http://api.test.hndhi.com
food-url: http://food.test.hndhi.com
province-item-url: http://60.216.97.250:8087
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
username: dbnnadmin
password: ptcus!%&nn768
url: jdbc:postgresql://127.0.0.1:5432/pc_lims
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: 127.0.0.1
rabbitmq:
host: 127.0.0.1
port: 5672
username: patznrmq
password: mqnn456#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: pro.topic.push.msg
sys-log: pro.topic.sys.log
chemical-classify-warning: pro.topic.chemical.classify.warning
equip-check-msg: pro.topic.equip.check.msg
env-work-msg: pro.topic.env.work.msg
food-work-msg: pro.topic.food.work.msg
food-statistics-customer-contract: pro.topic.food.statistics.customer.contract
food-statistics-contract-progress: pro.topic.food.statistics.contract.progress
food-statistics-sample-progress: pro.topic.food.statistics.sample.progress
redis:
host: 127.0.0.1
password: ptnn456TQa
# Mongodb GridFS
data:
mongodb:
uri: mongodb://localhost:27017/lims
grid-fs-database: lims
# Mongodb GridFS 存储
oss:
grid-fs: true
bucket-name: base
### jobs
jobs:
admin-address: http://api.patzn.com/print
# 日志
logging:
config: classpath:log4j2-pro.xml
# 生产环境
server:
exception:
subject: 英格尔 food 服务异常
service:
api-url: http://api.fdlims.icas.org.cn
food-url: http://food.fdlims.icas.org.cn
province-item-url: http://60.216.97.250:8087
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
username: dbicaslims
password: ptcus!%&768
url: jdbc:postgresql://127.0.0.1:5432/pc_lims
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: 127.0.0.1
rabbitmq:
host: 127.0.0.1
port: 5672
username: patznrmq
password: mqcus123#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: pro.topic.push.msg
sys-log: pro.topic.sys.log
chemical-classify-warning: pro.topic.chemical.classify.warning
equip-check-msg: pro.topic.equip.check.msg
env-work-msg: pro.topic.env.work.msg
food-work-msg: pro.topic.food.work.msg
food-statistics-customer-contract: pro.topic.food.statistics.customer.contract
food-statistics-contract-progress: pro.topic.food.statistics.contract.progress
food-statistics-sample-progress: pro.topic.food.statistics.sample.progress
report-make-msg: pro.topic.report.make.msg
# Mongodb GridFS
data:
mongodb:
uri: mongodb://localhost:27017/lims
grid-fs-database: lims
redis:
host: 127.0.0.1
password: ptcli456TQa
# Mongodb GridFS 存储
oss:
grid-fs: true
### jobs
jobs:
admin-address: http://api.patzn.com/print
# 日志
logging:
config: classpath:log4j2-pro.xml
server:
exception:
subject: JLSC Food 服务异常
# 生产环境
service:
api-url: http://api.jlssckxyjy.cn
url: http://api.jlssckxyjy.cn
food-url: http://food.jlssckxyjy.cn
province-item-url: http://60.216.97.250:8087
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
username: jllims
password: psql_jl&568!
url: jdbc:postgresql://localhost:5432/jl_lims
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: localhost
rabbitmq:
host: localhost
port: 5672
username: mq_jlsc
password: rmq_jlsc&568!
publisher-confirms: true
virtual-host: /
topic:
push-msg: pro.topic.push.msg
sys-log: pro.topic.sys.log
chemical-classify-warning: pro.topic.chemical.classify.warning
equip-check-msg: pro.topic.equip.check.msg
env-work-msg: pro.topic.env.work.msg
food-work-msg: pro.topic.food.work.msg
food-statistics-customer-contract: pro.topic.food.statistics.customer.contract
food-statistics-contract-progress: pro.topic.food.statistics.contract.progress
food-statistics-sample-progress: pro.topic.food.statistics.sample.progress
report-make-msg: pro.topic.report.make.msg
data:
mongodb:
uri: mongodb://localhost:27017/lims
grid-fs-database: lims
redis:
host: localhost
password: redis_jlsc&568!
# 对象存储配置
oss:
grid-fs: true
bucket-name: base
### jobs
jobs:
admin-address: http://api.jlssckxyjy.cn/print
# 日志
logging:
config: classpath:log4j2-pro.xml
# 测试环境
server:
exception:
to: 1327531085@qq.com;18463106881@163.com
form: ptlims@163.com
subject: 性能测试 metr服务异常
swagger:
enable: true
service:
api-url: http://api.pertest.patzn.com
url: http://api.pertest.patzn.com
food-url: http://food.pertest.patzn.com
province-item-url: http://60.216.97.250:8087/
soffice: /opt/libreoffice6.2/program/soffice
spring:
datasource:
dynamic:
health: true
datasource:
master:
username: dbmeter
password: sfdWrE39&d!Pt
url: jdbc:postgresql://121.36.94.193:5432/test_lims_meter
driver-class-name: org.postgresql.Driver
slave:
username: dbmeter
password: sfdWrE39&d!Pt
url: jdbc:postgresql://121.36.94.193:5432/test_lims_meter
driver-class-name: org.postgresql.Driver
# 注册中心配置
cloud:
consul:
host: 124.70.150.247
redis:
host: 124.70.150.247
password: patzn123TQa
mail:
host: smtp.163.com
username: ptlims@163.com
password: HFQYDSHMSKTVYRQW
port: 25
protocol: smtp
default-encoding: UTF-8
rabbitmq:
host: 124.70.150.247
port: 5672
username: mqbase
password: mqb123#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: test.topic.push.msg
sys-log: test.topic.sys.log
chemical-classify-warning: test.topic.chemical.classify.warning
equip-check-msg: test.topic.equip.check.msg
env-work-msg: test.topic.env.work.msg
food-work-msg: test.topic.food.work.msg
food-statistics-customer-contract: test.topic.food.statistics.customer.contract
food-statistics-contract-progress: test.topic.food.statistics.contract.progress
food-statistics-sample-progress: test.topic.food.statistics.sample.progress
report-make-msg: test.topic.report.make.msg
# 对象存储配置
oss:
bucket-name: pt-web-sys
aliyun:
endpoint: http://oss.test.patzn.com
folder: pertest/soil
#libreOffice 安装信息
libreOffice:
url: /opt/libreOffice6.2
### jobs
jobs:
admin-address: http://api.pertest.patzn.com/print
\ No newline at end of file
# 生产环境
service:
api-url: http://api.patzn.com
url: http://api.patzn.com
food-url: http://food.patzn.com
province-item-url: http://60.216.97.250:8087
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
dynamic:
health: true
datasource:
master:
username: dbmeter
password: ptd895%$!321
url: jdbc:postgresql://116.63.140.241:5432/pc_lims_meter
driver-class-name: org.postgresql.Driver
slave:
username: dbmeter
password: ptd895%$!321
url: jdbc:postgresql://116.63.140.241:5432/pc_lims_meter
driver-class-name: org.postgresql.Driver
hikari:
minimum-idle: 5 #最小连接数量
idle-timeout: 180000 #空闲连接存活最大时间
maximum-pool-size: 100 #最大连接数,默认是10
max-lifetime: 1800000 #在连接池中的最长生命周期
connection-timeout: 600000 #超时时间
#validation-timeout: #默认是5秒
# 注册中心配置
cloud:
consul:
host: 124.70.154.133
rabbitmq:
host: 124.70.154.133
port: 5672
username: mqbase
password: mqb123#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: pro.topic.push.msg
sys-log: pro.topic.sys.log
chemical-classify-warning: pro.topic.chemical.classify.warning
equip-check-msg: pro.topic.equip.check.msg
env-work-msg: pro.topic.env.work.msg
food-work-msg: pro.topic.food.work.msg
food-statistics-customer-contract: pro.topic.food.statistics.customer.contract
food-statistics-contract-progress: pro.topic.food.statistics.contract.progress
food-statistics-sample-progress: pro.topic.food.statistics.sample.progress
report-make-msg: pro.topic.report.make.msg
redis:
database: 0
host: 124.70.154.133
port: 6379
password: patzn123TQa
#服务监控
boot:
admin:
client:
instance:
service-url: http://${network-ip}:${server.port}
name: food
username: "patznAdmin"
password: "asd9*765"
url:
- http://springadmin.patzn.com
# 对象存储配置
oss:
aliyun:
folder: soil
### jobs
jobs:
admin-address: http://api.patzn.com/print
# 日志
logging:
config: classpath:log4j2-pro.xml
#libreOffice 安装信息
libreOffice:
url: /opt/libreoffice6.2
server:
port: 8013
exception:
to: 929339256@qq.com;1516330897@qq.com;18463106881@163.com
subject: 时进检测 Food 服务异常
service:
api-url: http://api.taixiangcloud.com:9000
url: http://api.taixiangcloud.com:9000
food-url: http://food.taixiangcloud.com:9000
province-item-url: http://60.216.97.250:8087
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
username: dbsjjcadmin
password: ptcus!%&whsj778
url: jdbc:postgresql://192.168.8.187:5432/pc_lims
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: 192.168.8.187
rabbitmq:
host: 192.168.8.187
port: 5672
username: patznrmq
password: mqsjjc476#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: pro.topic.push.msg
sys-log: pro.topic.sys.log
chemical-classify-warning: pro.topic.chemical.classify.warning
equip-check-msg: pro.topic.equip.check.msg
env-work-msg: pro.topic.env.work.msg
food-work-msg: pro.topic.food.work.msg
food-statistics-customer-contract: pro.topic.food.statistics.customer.contract
food-statistics-contract-progress: pro.topic.food.statistics.contract.progress
food-statistics-sample-progress: pro.topic.food.statistics.sample.progress
report-make-msg: pro.topic.report.make.msg
redis:
host: 192.168.8.187
password: ptsjjc476TQa
# Mongodb GridFS
data:
mongodb:
uri: mongodb://192.168.8.187:27017/lims
grid-fs-database: lims
# Mongodb GridFS 存储
oss:
grid-fs: true
bucket-name: base
### jobs
jobs:
admin-address: http://api.taixiangcloud.com:9000/print
# 日志
logging:
config: classpath:log4j2-pro.xml
# 测试环境
server:
exception:
to: 1327531085@qq.com;18463106881@163.com
subject: 测试 food 服务异常
swagger:
enable: true
service:
api-url: http://api.test.patzn.com
url: http://api.test.patzn.com
food-url: http://food.test.patzn.com
province-item-url: http://60.216.97.250:8087/
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
dynamic:
health: true
datasource:
master:
username: dblims
password: sfdWrE33&d!Pt
url: jdbc:postgresql://119.3.109.49:5432/test_lims
driver-class-name: org.postgresql.Driver
slave:
username: dblims
password: sfdWrE33&d!Pt
url: jdbc:postgresql://119.3.109.49:5432/test_lims
driver-class-name: org.postgresql.Driver
# 注册中心配置
cloud:
consul:
host: 121.36.130.208
rabbitmq:
host: 121.36.130.208
port: 5672
username: mqbase
password: mqb123#@$5
publisher-confirms: true
virtual-host: /
topic:
push-msg: test.topic.push.msg
sys-log: test.topic.sys.log
chemical-classify-warning: test.topic.chemical.classify.warning
equip-check-msg: test.topic.equip.check.msg
env-work-msg: test.topic.env.work.msg
food-work-msg: test.topic.food.work.msg
food-statistics-customer-contract: test.topic.food.statistics.customer.contract
food-statistics-contract-progress: test.topic.food.statistics.contract.progress
food-statistics-sample-progress: test.topic.food.statistics.sample.progress
report-make-msg: test.topic.report.make.msg
# 对象存储配置
oss:
bucket-name: pt-web-sys
aliyun:
endpoint: http://oss.test.patzn.com
folder: test/food
#libreOffice 安装信息
libreOffice:
url: C:/Program Files/LibreOffice
### jobs
jobs:
admin-address: http://api.test.patzn.com/print
\ No newline at end of file
# 测试环境
server:
exception:
enable: false
swagger:
enable: true
service:
api-url: http://api.exetest.patzn.com
url: http://api.exetest.patzn.com
food-url: http://food.exetest.patzn.com
province-item-url: http://60.216.97.250:8087/
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
username: pglims
password: 1qazqwer
url: jdbc:postgresql://127.0.0.1:5432/testexe_lims
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: 127.0.0.1
rabbitmq:
host: 127.0.0.1
#host: 119.3.221.237,121.36.130.208,119.3.238.56
port: 5672
username: mquser
password: 1qazqwer
publisher-confirms: true
virtual-host: /
topic:
push-msg: test.topic.push.msg
sys-log: test.topic.sys.log
chemical-classify-warning: test.topic.chemical.classify.warning
equip-check-msg: test.topic.equip.check.msg
env-work-msg: test.topic.env.work.msg
food-work-msg: test.topic.food.work.msg
food-statistics-customer-contract: test.topic.food.statistics.customer.contract
food-statistics-contract-progress: test.topic.food.statistics.contract.progress
food-statistics-sample-progress: test.topic.food.statistics.sample.progress
# Mongodb GridFS
data:
mongodb:
uri: mongodb://localhost:27017/lims
grid-fs-database: lims
# Mongodb GridFS 存储
oss:
grid-fs: true
bucket-name: base
server:
port: 8013
exception:
to: 1516330897@qq.com;18463106881@163.com
subject: 威海检测 Food 服务异常
# 生产环境
service:
api-url: http://api.scjgj.weihai.gov.cn
url: http://api.scjgj.weihai.gov.cn
food-url: http://food.scjgj.weihai.gov.cn
province-item-url: http://60.216.97.250:8087
soffice: /opt/libreoffice6.1/program/soffice
spring:
datasource:
username: dbwhlad
password: ptd688%$_wh&321
url: jdbc:postgresql://192.168.235.219:5432/pc_lims
driver-class-name: org.postgresql.Driver
dynamic:
enabled: false
# 注册中心配置
cloud:
consul:
host: 192.168.235.217
rabbitmq:
host: 192.168.235.217
port: 5672
username: ptmqwh
password: mq_weihai#125
publisher-confirms: true
virtual-host: /
topic:
push-msg: pro.topic.push.msg
sys-log: pro.topic.sys.log
chemical-classify-warning: pro.topic.chemical.classify.warning
equip-check-msg: pro.topic.equip.check.msg
env-work-msg: pro.topic.env.work.msg
food-work-msg: pro.topic.food.work.msg
food-statistics-customer-contract: pro.topic.food.statistics.customer.contract
food-statistics-contract-progress: pro.topic.food.statistics.contract.progress
food-statistics-sample-progress: pro.topic.food.statistics.sample.progress
report-make-msg: pro.topic.report.make.msg
redis:
host: 192.168.235.217
port: 6379
password: patzn489Wza_weihai
# Mongodb GridFS
data:
mongodb:
uri: mongodb://192.168.235.245:27017/lims
grid-fs-database: lims
# Mongodb GridFS 存储
oss:
grid-fs: true
bucket-name: base
### jobs
jobs:
admin-address: http://api.scjgj.weihai.gov.cn/print
# 日志
logging:
config: classpath:log4j2-pro.xml
server:
port: 8015
exception:
to: 1781849245@qq.com
subject: Meter 服务异常
compression:
enabled: true
mime-types: application/json
spring:
# 环境 dev|test|pro
profiles:
active: dev
application:
name: soil
# 模板引擎配置
freemarker:
prefix: classpath:/templates/html
suffix: .html
cache: false
# thymeleaf模板配置
thymeleaf:
template-loader-path: classpath:/templates/
suffix: .html
cache: false
encoding: UTF-8
# 文件上传大小设置 50MB
servlet:
multipart:
max-request-size: 50MB
max-file-size: 50MB
datasource:
driver-class-name: org.postgresql.Driver
platform: postgres
continue-on-error: true
hikari:
minimum-idle: 5 #最小连接数量
idle-timeout: 180000 #空闲连接存活最大时间
maximum-pool-size: 20 #最大连接数,默认是10
max-lifetime: 1800000 #在连接池中的最长生命周期
connection-timeout: 600000 #超时时间
#validation-timeout: #默认是5秒
cloud:
loadbalancer:
retry:
enabled: true # 是否重试机制,默认 fasle
# 注册中心配置
consul:
host: localhost
port: 8500
discovery:
prefer-ip-address: true
ip-address: ${network-ip:${spring.cloud.client.ip-address}}
tags: version=1.0,author=pt
health-check-path: /actuator/health
health-check-interval: 15s
instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}
acl-token: 26fcba2e-c460-2644-be78-584ea3b91a0c
# 缓存配置
cache:
infinispan.config: infinispan.xml
caffeine.spec: maximumSize=500,expireAfterAccess=60s
# Redis 数据库索引(默认为0),如果设置为1,那么存入的key-value都存放在select 1中
redis:
database: 0
host: 124.70.150.247
port: 6379
password: patzn123TQa
mail:
host: smtp.exmail.qq.com
username: admin@qd-partner.com
password: 5Ddz2stH4yrcixo3
port: 587
protocol: smtp
default-encoding: UTF-8
main:
allow-bean-definition-overriding: true
#ribbon超时设置
ribbon:
OkToRetryOnAllOperations: true
MaxAutoRetriesNextServer: 2
MaxAutoRetries: 1
ReadTimeout: 600000
ConnectTimeout: 100000
res:
ribbon:
ReadTimeout: 600000
ConnectTimeout: 100000
standard:
ribbon:
ReadTimeout: 600000
ConnectTimeout: 100000
### jobs
#jobs:
# app-name: soil
# app-port: 8026
#mybatis
mybatis-plus:
mapper-locations: classpath:/mapper/*/*Mapper.xml
type-aliases-package: com.patzn.cloud.service.soil.entity
type-enums-package: com.patzn.cloud.service.soil.enums
global-config:
#字段策略 0:"忽略判断",1:"非 NULL 判断",2:"非空判断"
field-strategy: 2
# 逻辑删除
logic-delete-value: 1
logic-not-delete-value: 0
# 自定义 SQL 注入器
sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
sql-parser-cache: true
configuration:
cache-enabled: false
map-underscore-to-camel-case: true
# 单点登录
kisso:
config:
signAlgorithm: RS512
rsaCertstore: public.cert
# 日志
logging:
config: classpath:log4j2.xml
pattern:
console: "%-5level - %msg%n"
level:
- error
- com.memorynotfound=trace
management:
health:
defaults:
enabled: false
db:
enabled: true
endpoint:
health:
show-details: always
\ No newline at end of file
__________ __ .__ .___
\______ \_____ _/ |_________ ____ ____ | | ____ __ __ __| _/
| ___/\__ \\ __\___ // \ _/ ___\| | / _ \| | \/ __ |
| | / __ \| | / /| | \ \ \___| |_( <_> ) | / /_/ |
|____| (____ /__| /_____ \___| / \___ >____/\____/|____/\____ |
\/ \/ \/ \/ \/
Service-Soil 土工试验LIMS平台服务
<?xml version="1.0" encoding="UTF-8"?>
<infinispan>
<cache-container default-cache="default">
<local-cache name="default"/>
<local-cache name="resource">
<eviction max-entries="200"/>
<expiration lifespan="600000"/>
</local-cache>
</cache-container>
</infinispan>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--status,这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,你会看到log4j2内部各种详细输出。-->
<!--monitorInterval:Log4j2能够自动检测修改配置 文件和重新配置本身,设置间隔秒数。-->
<Configuration status="off" monitorInterval="600">
<properties>
<!--通用变量-->
<property name="LOG_HOME">../logs/patzn-service-food</property>
<property name="ERROR_LOG_FILE_NAME">error</property>
<property name="INFO_LOG_FILE_NAME">info</property>
<Property name="PATTERN">[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} - (%F:%L) - %m%n</Property>
</properties>
<Appenders>
<!-- ELK 日志分析 http://logging.apache.org/log4j/2.x/manual/appenders.html#SocketAppender
<Socket name="Logstash" host="114.115.217.147" port="5044">
<Filters>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY" />
</Filters>
<JsonLayout properties="true" compact="true" eventEol="true"/>
</Socket>
-->
<!-- 控制台日志打印 -->
<Console name="Console" target="SYSTEM_OUT">
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
<Filters>
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<!--输出日志的格式-->
<PatternLayout pattern="${PATTERN}"/>
</Console>
<!-- 服务器日志文件记录 -->
<RollingRandomAccessFile name="ErrorLog" fileName="${LOG_HOME}/${ERROR_LOG_FILE_NAME}.log"
filePattern="${LOG_HOME}/${ERROR_LOG_FILE_NAME}.log.%d{yyyy-MM-dd}.gz">
<PatternLayout pattern="${PATTERN}"/>
<Filters>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="128MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="InfoLog" fileName="${LOG_HOME}/${INFO_LOG_FILE_NAME}.log"
filePattern="${LOG_HOME}/${INFO_LOG_FILE_NAME}.log.%d{yyyy-MM-dd}.gz">
<PatternLayout pattern="${PATTERN}"/>
<Filters>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="200MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<!--AsyncLogger-->
<AsyncLogger name="com.patzn.cloud" level="info" includeLocation="true"/>
<AsyncLogger name="org.apache.ibatis" level="error" includeLocation="true"/>
<AsyncLogger name="org.springframework.web" level="error" includeLocation="true"/>
<!--root的logger-->
<AsyncRoot level="info" includeLocation="true">
<AppenderRef ref="Console"/>
<AppenderRef ref="InfoLog"/>
<AppenderRef ref="ErrorLog"/>
<AppenderRef ref="Logstash"/>
</AsyncRoot>
</Loggers>
</Configuration>
<?xml version="1.0" encoding="UTF-8"?>
<!--status,这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,你会看到log4j2内部各种详细输出。-->
<!--monitorInterval:Log4j2能够自动检测修改配置 文件和重新配置本身,设置间隔秒数。-->
<Configuration status="off" monitorInterval="600">
<properties>
<!--通用变量-->
<property name="LOG_HOME">../logs/patzn-service-meter</property>
<property name="ERROR_LOG_FILE_NAME">error</property>
<property name="INFO_LOG_FILE_NAME">info</property>
<Property name="PATTERN">[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} - (%F:%L) - %m%n</Property>
</properties>
<Appenders>
<!-- 控制台日志打印 -->
<Console name="Console" target="SYSTEM_OUT">
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
<Filters>
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<!--输出日志的格式-->
<PatternLayout pattern="${PATTERN}"/>
</Console>
<!-- 服务器日志文件记录 -->
<RollingRandomAccessFile name="ErrorLog" fileName="${LOG_HOME}/${ERROR_LOG_FILE_NAME}.log"
filePattern="${LOG_HOME}/${ERROR_LOG_FILE_NAME}.log.%d{yyyy-MM-dd}.gz">
<PatternLayout pattern="${PATTERN}"/>
<Filters>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="128MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="InfoLog" fileName="${LOG_HOME}/${INFO_LOG_FILE_NAME}.log"
filePattern="${LOG_HOME}/${INFO_LOG_FILE_NAME}.log.%d{yyyy-MM-dd}.gz">
<PatternLayout pattern="${PATTERN}"/>
<Filters>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="128MB"/>
</Policies>
<DefaultRolloverStrategy max="30"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<!--AsyncLogger-->
<AsyncLogger name="com.patzn.cloud" level="debug" includeLocation="true"/>
<AsyncLogger name="org.apache.ibatis" level="error" includeLocation="true"/>
<AsyncLogger name="springfox.documentation" level="error" includeLocation="true"/>
<AsyncLogger name="org.springframework.web" level="error" includeLocation="true"/>
<!--root的logger-->
<AsyncRoot level="error" includeLocation="true">
<AppenderRef ref="Console"/>
<AppenderRef ref="InfoLog"/>
<AppenderRef ref="ErrorLog"/>
</AsyncRoot>
</Loggers>
</Configuration>
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAucwkbQyl33CAIod4NT64
2Swwjh8izNBdXju6EQTBTGAWBcCBPG3Q2IoNN64jQzRURLlSDZ1oJIB0e65KBkQM
0y8IZcHKRG97f1lYQVWwlqdwtVkn1BwDdBNTRf2CO6fDwxGhukugX91f0KkgNv8B
NXB8AzB3f03XEyzxLFMD0Az8KaYfauc5CV+OP2aPUNEaChhmW2G5Nmmg45iFKCY9
I/UBKFsAeP7rrUxKErY1CSWdbPKeDSwNM+BRqDDNLudxN8Rz1XJzt3Zx2NPNEYbZ
VQDqm2ze/8baozvSsqvnIA3Izd6VuswCIhWkBStypO/q66jOjkv4qWifgNyccIPu
LQIDAQAB
-----END PUBLIC KEY-----
\ No newline at end of file
# 关闭默认报表存储器
report.disableFileProvider=true
report.service=food
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<import resource="classpath:report-console-context.xml"/>
<bean id="propertyConfigurer" parent="report.props">
<property name="location">
<value>classpath:report-config.properties</value>
</property>
</bean>
</beans>
\ No newline at end of file
var CreatedOKLodop7766=null;
//====判断是否需要安装CLodop云打印服务器:====
function needCLodop(){
try{
var ua=navigator.userAgent;
if (ua.match(/Windows\sPhone/i) !=null) return true;
if (ua.match(/iPhone|iPod/i) != null) return true;
if (ua.match(/Android/i) != null) return true;
if (ua.match(/Edge\D?\d+/i) != null) return true;
var verTrident=ua.match(/Trident\D?\d+/i);
var verIE=ua.match(/MSIE\D?\d+/i);
var verOPR=ua.match(/OPR\D?\d+/i);
var verFF=ua.match(/Firefox\D?\d+/i);
var x64=ua.match(/x64/i);
if ((verTrident==null)&&(verIE==null)&&(x64!==null))
return true; else
if ( verFF !== null) {
verFF = verFF[0].match(/\d+/);
if ((verFF[0]>= 41)||(x64!==null)) return true;
} else
if ( verOPR !== null) {
verOPR = verOPR[0].match(/\d+/);
if ( verOPR[0] >= 32 ) return true;
} else
if ((verTrident==null)&&(verIE==null)) {
var verChrome=ua.match(/Chrome\D?\d+/i);
if ( verChrome !== null ) {
verChrome = verChrome[0].match(/\d+/);
if (verChrome[0]>=41) return true;
};
};
return false;
} catch(err) {return true;};
};
//====页面引用CLodop云打印必须的JS文件:====
if (needCLodop()) {
var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
var oscript = document.createElement("script");
oscript.src ="http://localhost:8000/CLodopfuncs.js?priority=1";
head.insertBefore( oscript,head.firstChild );
//引用双端口(8000和18000)避免其中某个被占用:
oscript = document.createElement("script");
oscript.src ="http://localhost:18000/CLodopfuncs.js?priority=0";
head.insertBefore( oscript,head.firstChild );
};
//====获取LODOP对象的主过程:====
function getLodop(oOBJECT,oEMBED){
var strHtmInstall="<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='install_lodop32.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>";
var strHtmUpdate="<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='install_lodop32.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>";
var strHtm64_Install="<br><font color='#FF00FF'>打印控件未安装!点击这里<a href='install_lodop64.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>";
var strHtm64_Update="<br><font color='#FF00FF'>打印控件需要升级!点击这里<a href='install_lodop64.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>";
var strHtmFireFox="<br><br><font color='#FF00FF'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>";
var strHtmChrome="<br><br><font color='#FF00FF'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>";
var strCLodopInstall="<br><font color='#FF00FF'>CLodop云打印服务(localhost本地)未安装启动!点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>执行安装</a>,安装后请刷新页面。</font>";
var strCLodopUpdate="<br><font color='#FF00FF'>CLodop云打印服务需升级!点击这里<a href='CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>,升级后请刷新页面。</font>";
var LODOP;
try{
var isIE = (navigator.userAgent.indexOf('MSIE')>=0) || (navigator.userAgent.indexOf('Trident')>=0);
if (needCLodop()) {
try{ LODOP=getCLodop();} catch(err) {};
if (!LODOP && document.readyState!=="complete") {alert("C-Lodop没准备好,请稍后再试!"); return;};
if (!LODOP) {
if (isIE) document.write(strCLodopInstall); else
document.body.innerHTML=strCLodopInstall+document.body.innerHTML;
return;
} else {
if (CLODOP.CVERSION<"3.0.3.7") {
if (isIE) document.write(strCLodopUpdate); else
document.body.innerHTML=strCLodopUpdate+document.body.innerHTML;
};
if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED);
if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT);
};
} else {
var is64IE = isIE && (navigator.userAgent.indexOf('x64')>=0);
//=====如果页面有Lodop就直接使用,没有则新建:==========
if (oOBJECT!=undefined || oEMBED!=undefined) {
if (isIE) LODOP=oOBJECT; else LODOP=oEMBED;
} else if (CreatedOKLodop7766==null){
LODOP=document.createElement("object");
LODOP.setAttribute("width",0);
LODOP.setAttribute("height",0);
LODOP.setAttribute("style","position:absolute;left:0px;top:-100px;width:0px;height:0px;");
if (isIE) LODOP.setAttribute("classid","clsid:2105C259-1E0C-4534-8141-A753534CB4CA");
else LODOP.setAttribute("type","application/x-print-lodop");
document.documentElement.appendChild(LODOP);
CreatedOKLodop7766=LODOP;
} else LODOP=CreatedOKLodop7766;
//=====Lodop插件未安装时提示下载地址:==========
if ((LODOP==null)||(typeof(LODOP.VERSION)=="undefined")) {
if (navigator.userAgent.indexOf('Chrome')>=0)
document.body.innerHTML=strHtmChrome+document.body.innerHTML;
if (navigator.userAgent.indexOf('Firefox')>=0)
document.body.innerHTML=strHtmFireFox+document.body.innerHTML;
if (is64IE) document.write(strHtm64_Install); else
if (isIE) document.write(strHtmInstall); else
document.body.innerHTML=strHtmInstall+document.body.innerHTML;
return LODOP;
};
};
if (LODOP.VERSION<"6.2.2.1") {
if (!needCLodop()){
if (is64IE) document.write(strHtm64_Update); else
if (isIE) document.write(strHtmUpdate); else
document.body.innerHTML=strHtmUpdate+document.body.innerHTML;
};
return LODOP;
};
//===如下空白位置适合调用统一功能(如注册语句、语言选择等):===
//===========================================================
return LODOP;
} catch(err) {alert("getLodop出错:"+err);};
};
table {border-collapse: collapse; border-style: double;border-width:3px;border-color: black;}
td {border-width: 1px;border-style: solid;}
\ No newline at end of file
function test_script(){
document.write('<font color="red">这是用script加入的动态内容</font>');
}
\ No newline at end of file
<License>
<Data>
<Products>
<Product>Aspose.Total for Java</Product>
<Product>Aspose.Words for Java</Product>
</Products>
<EditionType>Enterprise</EditionType>
<SubscriptionExpiry>20991231</SubscriptionExpiry>
<LicenseExpiry>20991231</LicenseExpiry>
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
</Data>
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
</License>
\ No newline at end of file
12
\ No newline at end of file
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<title>打开Excel文件</title>
<script type="text/javascript">
function Save() {
document.getElementById("PageOfficeCtrl1").WebSave();
}
</script>
<script type="text/javascript">
function AddSeal() {
try{
document.getElementById("PageOfficeCtrl1").ZoomSeal.AddSeal();
}catch (e){ };
}
</script>
</head>
<body>
<div style="width:auto;height:700px;" th:utext="${pageoffice}"></div>
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
<title>打开Word文件</title>
<script type="text/javascript">
function Save() {
document.getElementById("PageOfficeCtrl1").WebSave();
}
</script>
<script type="text/javascript">
function AddSeal() {
try{
document.getElementById("PageOfficeCtrl1").ZoomSeal.AddSeal();
}catch (e){ };
}
</script>
</head>
<body>
<div style="width:1000px;height:700px;" th:utext="${pageoffice}"> </div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<SCRIPT type=text/javascript src="/lims/PrintSample10.js"></SCRIPT>
<title>WEB打印控件演示demo</title>
<style id="style1">
table {
border-width: 5px;
border-style: solid;
border-color: #0000FF;
}
td {
border-width: 1px;
border-style: solid;
}
</style>
<script language="javascript" src="/lims/LodopFuncs.js"></script>
</head>
<body id="body01">
<h2><font color="#009999">演示clodop打印</font>
</h2>
<p><a href="javascript:myPreview1()">打印设计</a></p>
<script language="javascript" type="text/javascript">
var LODOP; //声明为全局变量
function myPreview1(){
LODOP=getLodop();
LODOP.PRINT_INITA("0mm","0mm","60.01mm","40.01mm","打印标签");
LODOP.ADD_PRINT_TEXT(0,55,100,20,"备样标签");
LODOP.SET_PRINT_STYLEA(0,"FontName","楷体");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(18,11,67,20,"样品名称:");
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.ADD_PRINT_TEXT(19,67,155,19,"2017-04-06");
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.ADD_PRINT_TEXT(44,11,64,20,"样品编号:");
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.ADD_PRINT_TEXT(45,66,152,20,"14578411425");
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.ADD_PRINT_BARCODE(59,11,204,35,"128A","20170017-001");
LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
LODOP.ADD_PRINT_TEXT(99,9,80,20,"收样日期:");
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.ADD_PRINT_TEXT(98,72,135,20,"2017-08-06");
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.ADD_PRINT_TEXT(115,9,80,20,"保存条件:");
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.ADD_PRINT_TEXT(114,73,136,20,"shd=shhhwveedwsdsds");
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.PRINT_DESIGN();
};
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>正在打开编辑文档</title>
<script src="//s1.pstatp.com/cdn/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="http://api.dev.patzn.com:7000/lims/pageoffice.js" id="po_js_main"></script>
</head>
<body>
<a href="javascript:POBrowser.openWindowModeless('/lims/v1/page_office/word','width=1200px;height=800px;');">打开文件 </a>
<script>
function pageOffice() {
POBrowser.openWindowModeless('/lims/v1/page_office/word', 'width=1200px;height=800px;');
}
window.onload = pageOffice();
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>编辑原始记录</title>
<script type="text/javascript">
function Save() {
document.getElementById("PageOfficeCtrl1").WebSave();
}
</script>
<script type="text/javascript">
function AddSeal() {
try {
document.getElementById("PageOfficeCtrl1").ZoomSeal.AddSeal();
} catch (e) {
}
}
</script>
</head>
<body>
<div style="width:100%;height:1000px;">${pageoffice}</div>
</body>
</html>
package com.patzn.cloud.service.lims.test;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.rules.DbType;
import com.patzn.cloud.commons.generator.PostgresqlGenerator;
/**
* <p>
* 代码生成 run 执行
* </p>
*
* @author hubin
* @since 2017-08-28
*/
public class LimsCodeGenerator {
public static void main(String[] args) {
new PostgresqlGenerator().setDataSourceConfig(new DataSourceConfig()
.setDbType(DbType.POSTGRE_SQL)
.setDriverName("org.postgresql.Driver")
.setUrl("jdbc:postgresql://192.168.0.115:5432/dev_lims_soil")
.setUsername("postgres")
.setPassword("123456")
).execute("lims");
}
}
package com.patzn.cloud.service.lims.test;
import com.patzn.cloud.service.lims.common.OrderNumUtil;
import java.math.BigDecimal;
public class Test {
public static void main(String[] args) {
BigDecimal bigDecimal = new BigDecimal("12.011");
Integer i = bigDecimal.intValue();
System.out.println(i);
}
}
<License>
<Data>
<Products>
<Product>Aspose.Total for Java</Product>
<Product>Aspose.Words for Java</Product>
</Products>
<EditionType>Enterprise</EditionType>
<SubscriptionExpiry>20991231</SubscriptionExpiry>
<LicenseExpiry>20991231</LicenseExpiry>
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
</Data>
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
</License>
\ No newline at end of file
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1277902393338445826, 1268781858218270721, 1273458323299028994, '年度委托量统计', 0, 'annual_entrust', '/soil/statistics/annual_entrust', 'pt-config', NULL, 1, 80, '2020-06-30 17:50:47.507', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1277902393338445826, 1268781858218270721, 1273458323299028994, '年度委托量统计', 0, 'annual_entrust', '/soil/statistics/annual_entrust', 'pt-config', NULL, 1, 80, '2020-06-30 17:50:47.507', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1277858649444663297, 1268781858218270721, 1273458323299028994, '个人检测任务查询', 0, 'personal_task', '/soil/statistics/personal_task', 'pt-config', NULL, 1, 100, '2020-06-30 14:56:58.15', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1277802637236846593, 1268781858218270721, 1268848295913938945, '资质外分包', 0, 'cannot_sub', '/soil/subcontract/cannot_sub', 'pt-config', NULL, 1, 40, '2020-06-30 11:14:23.799', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1278140999856504833, 1268781858218270721, 1273458323299028994, '客户委托量统计', 0, 'customer_entrust', '/soil/statistics/customer_entrust', 'pt-config', NULL, 1, 120, '2020-07-01 09:38:55.734', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1278140999856504833, 1268781858218270721, 1273458323299028994, '客户委托量统计', 0, 'customer_entrust', '/soil/statistics/customer_entrust', 'pt-config', NULL, 1, 120, '2020-07-01 09:38:55.734', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1278144798369202177, 1268781858218270721, 1273458323299028994, '器具检测量统计', 0, 'sample_test_quantity', '/soil/statistics/sample_test_quantity', 'pt-config', NULL, 1, 20, '2020-07-01 09:54:01.37', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1278143467952750594, 1268781858218270721, 1273458323299028994, '证书及时率统计', 0, 'certificate_rate', '/soil/statistics/certificate_rate', 'pt-config', NULL, 1, 30, '2020-07-01 09:48:44.174', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1273458323299028994, 1268781858218270721, 1268782619882905602, '统计报表', 0, '/', '/', 'pt-config', NULL, 1, 8, '2020-06-18 11:31:38.643', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1273458323299028994, 1268781858218270721, 1268782619882905602, '统计报表', 0, '/', '/', 'pt-config', NULL, 1, 8, '2020-06-18 11:31:38.643', NULL);
\ No newline at end of file
INSERT INTO "public"."sys_resource" ( "id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename" )
INSERT INTO "public"."sys_resource" ( "id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename" )
VALUES
( 1282855147739758594, 1268781858218270721, 1268787138301747201, '资质外检测器具', 0, 'beyond_aptitude', '/soil/aptitude/beyond_aptitude', 'pt-config', NULL, 1, 40, '2020-07-14 09:51:16.175', NULL );
INSERT INTO "public"."sys_resource" ( "id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename" )
VALUES
( 1282915798893936641, 1268781858218270721, 1273458256580235266, '出检样品进度', 0, 'out_sample_progress', '/soil/progress/out_sample_progress', 'pt-config', NULL, 1, 1, '2020-07-14 13:52:16.536', NULL );
\ No newline at end of file
UPDATE "public"."sys_resource" SET "system_id" = 1268781858218270721, "pid" = 1272745249587859458, "name" = '资质外分包', "type" = 0, "code" = 'cannot_sub', "uri" = '/soil/subcontract/cannot_sub', "icon" = 'pt-config', "remark" = NULL, "status" = 1, "sort" = 40, "ctime" = '2020-06-30 11:14:23.799', "ename" = NULL WHERE "id" = 1277802637236846593;
UPDATE "public"."sys_resource" SET "system_id" = 1268781858218270721, "pid" = 1272745249587859458, "name" = '资质外分包', "type" = 0, "code" = 'cannot_sub', "uri" = '/soil/subcontract/cannot_sub', "icon" = 'pt-config', "remark" = NULL, "status" = 1, "sort" = 40, "ctime" = '2020-06-30 11:14:23.799', "ename" = NULL WHERE "id" = 1277802637236846593;
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283654543154823170, 1268781858218270721, 1273457432957341697, '导出项目统计表', 1, 'soil-contract-review-his-export', '/', NULL, NULL, 1, 1, '2020-07-16 14:47:46.893', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283654543154823170, 1268781858218270721, 1273457432957341697, '导出项目统计表', 1, 'soil-contract-review-his-export', '/', NULL, NULL, 1, 1, '2020-07-16 14:47:46.893', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283645241186795521, 1268781858218270721, 1272378493186887681, '收样', 1, 'soil-sample-manage-collect-btn', '/', NULL, NULL, 1, 1, '2020-07-16 14:10:49.131', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283643258472185858, 1268781858218270721, 1268853967397281793, '删除', 1, 'soil-send-soil-item-manage-remove', '/', NULL, NULL, 1, 1, '2020-07-16 14:02:56.415', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283643189320695810, 1268781858218270721, 1268853967397281793, '复制', 1, 'soil-send-soil-item-manage-copy', '/', NULL, NULL, 1, 1, '2020-07-16 14:02:39.928', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283643126783623170, 1268781858218270721, 1268853967397281793, '编辑', 1, 'soil-send-soil-item-manage-edit', '/', NULL, NULL, 1, 1, '2020-07-16 14:02:25.018', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283642359783833602, 1268781858218270721, 1272381134851821570, '编辑-判定', 1, 'soil-person-item-task-manage-judge-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:59:22.151', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283642266716422146, 1268781858218270721, 1272381134851821570, '编辑-填写检测值', 1, 'soil-person-item-task-manage-input-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:58:59.962', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641885596794881, 1268781858218270721, 1272381134851821570, '历史-附件', 1, 'soil-sample-input-his-accessory', '/', NULL, NULL, 1, 1, '2020-07-16 13:57:29.096', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641736921300994, 1268781858218270721, 1272381134851821570, '历史-查看证书', 1, 'soil-sample-input-his-view', '/', NULL, NULL, 1, 1, '2020-07-16 13:56:53.649', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641586781995009, 1268781858218270721, 1272381134851821570, '附件', 1, 'soil-sample-input-accessory', '/', NULL, NULL, 1, 1, '2020-07-16 13:56:17.853', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641494146596865, 1268781858218270721, 1272381134851821570, '仪器领用', 1, 'soil-sample-input-take', '/', NULL, NULL, 1, 1, '2020-07-16 13:55:55.767', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641415012663297, 1268781858218270721, 1272381134851821570, '车辆管理', 1, 'soil-sample-input-car', '/', NULL, NULL, 1, 1, '2020-07-16 13:55:36.9', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641316907892738, 1268781858218270721, 1272381134851821570, '编辑', 1, 'soil-sample-input-edit', '/', NULL, NULL, 1, 1, '2020-07-16 13:55:13.51', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641243474018305, 1268781858218270721, 1272381134851821570, '编制证书', 1, 'soil-sample-input-create', '/', NULL, NULL, 1, 1, '2020-07-16 13:54:56.002', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641167972352002, 1268781858218270721, 1272381134851821570, '提交至证书编制', 1, 'soil-sample-input-submit-create-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:54:38.001', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641083213856769, 1268781858218270721, 1272381134851821570, '提交', 1, 'soil-sample-input-submit-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:54:17.793', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283641005371768834, 1268781858218270721, 1272381134851821570, '车辆管理', 1, 'soil-sample-input-car-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:53:59.234', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283640929320648705, 1268781858218270721, 1272381134851821570, '仪器领用', 1, 'soil-sample-input-take-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:53:41.102', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283640106540810242, 1268781858218270721, 1272380941205000193, '历史-操作日志', 1, 'soil-sample-flow-his-record', '/', NULL, NULL, 1, 1, '2020-07-16 13:50:24.936', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283640002316550146, 1268781858218270721, 1272380941205000193, '历史-删除', 1, 'soil-sample-flow-his-remove', '/', NULL, NULL, 1, 1, '2020-07-16 13:50:00.087', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283639879045955586, 1268781858218270721, 1272380941205000193, '历史-附件', 1, 'soil-sample-flow-his-accessory', '/', NULL, NULL, 1, 1, '2020-07-16 13:49:30.697', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283639752357003265, 1268781858218270721, 1272380941205000193, '历史-提交', 1, 'soil-sample-flow-his-submit-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:49:00.492', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283639661227360258, 1268781858218270721, 1272380941205000193, '历史-添加', 1, 'soil-sample-flow-his-add-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:48:38.765', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283639372684410882, 1268781858218270721, 1272380941205000193, '附件', 1, 'soil-sample-flow-accessory', '/', NULL, NULL, 1, 1, '2020-07-16 13:47:29.971', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283639274667720705, 1268781858218270721, 1272380941205000193, '流转', 1, 'soil-sample-flow-flow-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:47:06.603', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283638433235812354, 1268781858218270721, 1272380394158706690, '任务分配历史-导入检测项目', 1, 'soil-task-alloca-his-import-item-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:43:45.989', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283638335588220930, 1268781858218270721, 1272380394158706690, '任务分配历史-任务重新分配', 1, 'soil-task-alloca-his-allocation-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:43:22.708', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283638202234519553, 1268781858218270721, 1272380394158706690, '任务分配历史-操作日志', 1, 'soil-task-alloca-his-record', '/', NULL, NULL, 1, 1, '2020-07-16 13:42:50.914', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283638082881404930, 1268781858218270721, 1272380394158706690, '任务分配历史-检测项目管理', 1, 'soil-task-alloca-his-item-manage', '/', NULL, NULL, 1, 1, '2020-07-16 13:42:22.458', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283637661622288385, 1268781858218270721, 1272380394158706690, '任务分配-导入检测项目', 1, 'soil-task-alloca-import-item-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:40:42.022', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283637511462010881, 1268781858218270721, 1272380394158706690, '任务分配-分配任务', 1, 'soil-task-alloca-allocation-btn', '/', NULL, NULL, 1, 1, '2020-07-16 13:40:06.221', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283637384919859201, 1268781858218270721, 1272380394158706690, '任务分配-操作日志', 1, 'soil-task-alloca-record', '/', NULL, NULL, 1, 1, '2020-07-16 13:39:36.051', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283637261393412097, 1268781858218270721, 1272380394158706690, '任务分配-检测项目管理', 1, 'soil-task-alloca-item-manage', '/', NULL, NULL, 1, 1, '2020-07-16 13:39:06.6', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283636764192227330, 1268781858218270721, 1272380394158706690, '删除', 1, 'soil-test-edit-remove', '/', NULL, NULL, 1, 1, '2020-07-16 13:37:08.058', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283636662216114177, 1268781858218270721, 1272380394158706690, '编辑', 1, 'soil-test-edit-edit', '/', NULL, NULL, 1, 1, '2020-07-16 13:36:43.745', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283612011712692225, 1268781858218270721, 1272380394158706690, '历史-操作日志', 1, 'soil-task-distribute-his-record', '/', NULL, NULL, 1, 1, '2020-07-16 11:58:46.607', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283611893714337794, 1268781858218270721, 1272380394158706690, '历史-附件', 1, 'soil-task-distribute-his-accessory', '/', NULL, NULL, 1, 1, '2020-07-16 11:58:18.474', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283611718149160961, 1268781858218270721, 1272380394158706690, '历史-任务分配历史', 1, 'soil-task-distribute-his-allocation-his', '/', NULL, NULL, 1, 1, '2020-07-16 11:57:36.616', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283611450456096769, 1268781858218270721, 1272380394158706690, '操作日志', 1, 'soil-task-distribute-record', '/', NULL, NULL, 1, 1, '2020-07-16 11:56:32.793', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283611368721694721, 1268781858218270721, 1272380394158706690, '附件', 1, 'soil-task-distribute-accessory', '/', NULL, NULL, 1, 1, '2020-07-16 11:56:13.306', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283610978282323970, 1268781858218270721, 1272380394158706690, '任务分配', 1, 'soil-task-distribute-allocation', '/', NULL, NULL, 1, 1, '2020-07-16 11:54:40.218', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283609535315918849, 1268781858218270721, 1272378493186887681, '历史-操作日志', 1, 'soil-receive-entrust-his-record', '/', NULL, NULL, 1, 1, '2020-07-16 11:48:56.188', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283609415367213058, 1268781858218270721, 1272378493186887681, '历史-附件', 1, 'soil-receive-entrust-his-accessory', '/', NULL, NULL, 1, 1, '2020-07-16 11:48:27.59', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283609299319209986, 1268781858218270721, 1272378493186887681, '历史-样品管理', 1, 'soil-receive-entrust-his-sample-manage', '/', NULL, NULL, 1, 1, '2020-07-16 11:47:59.977', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283609162584899586, 1268781858218270721, 1272378493186887681, '历史-详情', 1, 'soil-receive-entrust-his-detail', '/', NULL, NULL, 1, 1, '2020-07-16 11:47:27.322', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283578964560789505, 1268781858218270721, 1272378493186887681, '历史-样品交接发放登记表', 1, 'soil-receive-entrust-his-register-btn', '/', NULL, NULL, 1, 1, '2020-07-16 09:47:27.552', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283578015725338626, 1268781858218270721, 1272378493186887681, '操作日志', 1, 'soil-receive-entrust-record', '/', NULL, NULL, 1, 1, '2020-07-16 09:43:41.332', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283577877065842690, 1268781858218270721, 1272378493186887681, '附件', 1, 'soil-receive-entrust-accessory', '/', NULL, NULL, 1, 1, '2020-07-16 09:43:08.273', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283572744886108161, 1268781858218270721, 1272378493186887681, '样品管理', 1, 'soil-receive-entrust-sample-manage', '/', NULL, NULL, 1, 1, '2020-07-16 09:22:44.667', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283572662203793409, 1268781858218270721, 1272378493186887681, '详情', 1, 'soil-receive-entrust-detail', '/', NULL, NULL, 1, 1, '2020-07-16 09:22:24.953', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283381204863631362, 1268781858218270721, 1268853685586190338, '删除', 1, 'soil-out-soil-item-manage-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-15 20:41:37.966', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283381138383912962, 1268781858218270721, 1268853685586190338, '复制', 1, 'soil-item-manage-copy-operation', '/', NULL, NULL, 1, 1, '2020-07-15 20:41:22.116', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283381067030413314, 1268781858218270721, 1268853685586190338, '编辑', 1, 'soil-item-manage-edit-operation', '/', NULL, NULL, 1, 1, '2020-07-15 20:41:05.104', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283380657653760001, 1268781858218270721, 1271025547266224130, '检测结果-检定条件', 1, 'soil-person-item-task-manage-condition', '/', NULL, NULL, 1, 1, '2020-07-15 20:39:27.501', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283380545783283713, 1268781858218270721, 1271025547266224130, '检测结果-判定', 1, 'soil-person-item-task-manage-judge', '/', NULL, NULL, 1, 1, '2020-07-15 20:39:00.829', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283380347807940610, 1268781858218270721, 1271025547266224130, '检测结果-填写检测值', 1, 'soil-person-item-task-manage-input', '/', NULL, NULL, 1, 1, '2020-07-15 20:38:13.628', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283378920423374850, 1268781858218270721, 1271025547266224130, '历史-操作日志', 1, 'soil-out-personal-task-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:32:33.313', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283378801821040641, 1268781858218270721, 1271025547266224130, '历史-附件', 1, 'soil-out-personal-task-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:32:05.036', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283378659155984385, 1268781858218270721, 1271025547266224130, '查看证书', 1, 'soil-out-personal-task-his-view-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:31:31.022', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283378470282280961, 1268781858218270721, 1271025547266224130, '操作日志', 1, 'soil-out-personal-task-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:30:45.991', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283378364518711297, 1268781858218270721, 1271025547266224130, '附件', 1, 'soil-out-personal-task-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:30:20.775', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283378274928377858, 1268781858218270721, 1271025547266224130, '仪器领用', 1, 'soil-out-personal-task-take-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:29:59.415', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283378178354528257, 1268781858218270721, 1271025547266224130, '车辆管理', 1, 'soil-out-personal-task-car-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:29:36.391', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283378078383292418, 1268781858218270721, 1271025547266224130, '检测结果', 1, 'soil-out-personal-task-result-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:29:12.555', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283377981251600386, 1268781858218270721, 1271025547266224130, '编制证书', 1, 'soil-out-personal-task-create-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:28:49.397', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283377877346107394, 1268781858218270721, 1271025547266224130, '检定条件', 1, 'soil-out-personal-task-condition', '/', NULL, NULL, 1, 1, '2020-07-15 20:28:24.624', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283377795917889537, 1268781858218270721, 1271025547266224130, '提交至证书编制', 1, 'soil-out-personal-task-submit-create', '/', NULL, NULL, 1, 1, '2020-07-15 20:28:05.21', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283377704020688897, 1268781858218270721, 1271025547266224130, '提交', 1, 'soil-out-personal-task-submit', '/', NULL, NULL, 1, 1, '2020-07-15 20:27:43.3', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283377615902556162, 1268781858218270721, 1271025547266224130, '车辆管理', 1, 'soil-out-personal-task-car', '/', NULL, NULL, 1, 1, '2020-07-15 20:27:22.291', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283377504732528642, 1268781858218270721, 1271025547266224130, '仪器领用', 1, 'soil-out-personal-task-take', '/', NULL, NULL, 1, 1, '2020-07-15 20:26:55.786', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283376061434773505, 1268781858218270721, 1271024484853215234, '历史任务分配-导入检测项目', 1, 'soil-out-task-alloca-his-import', '/', NULL, NULL, 1, 1, '2020-07-15 20:21:11.677', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283375967666913282, 1268781858218270721, 1271024484853215234, '历史任务分配-任务重新分配', 1, 'soil-out-task-alloca-his-task', '/', NULL, NULL, 1, 1, '2020-07-15 20:20:49.322', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283375855746105346, 1268781858218270721, 1271024484853215234, '历史任务分配-操作日志', 1, 'soil-out-task-alloca-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:20:22.637', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283375759491022850, 1268781858218270721, 1271024484853215234, '历史任务分配-检测项目', 1, 'soil-out-task-alloca-his-item-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:19:59.688', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283375107234807810, 1268781858218270721, 1271024484853215234, '任务分配-导入检测项目', 1, 'soil-out-task-alloca-import', '/', NULL, NULL, 1, 1, '2020-07-15 20:17:24.178', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283375031649255425, 1268781858218270721, 1271024484853215234, '任务分配-分配任务', 1, 'soil-out-task-alloca-task', '/', NULL, NULL, 1, 1, '2020-07-15 20:17:06.157', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283374922312138754, 1268781858218270721, 1271024484853215234, '任务分配-操作日志', 1, 'soil-out-task-alloca-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:16:40.089', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283374807560175618, 1268781858218270721, 1271024484853215234, '任务分配-检测项目', 1, 'soil-out-task-alloca-item-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:16:12.731', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283373859311927297, 1268781858218270721, 1271024484853215234, '历史-操作日志', 1, 'soil-out-task-distribute-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:12:26.65', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283373722183352322, 1268781858218270721, 1271024484853215234, '历史-附件', 1, 'soil-out-task-distribute-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:11:53.956', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283373552007856130, 1268781858218270721, 1271024484853215234, '历史-任务分配', 1, 'soil-out-task-distribute-his-task-allocation-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:11:13.383', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283373237439250434, 1268781858218270721, 1271024484853215234, '操作日志', 1, 'soil-out-task-distribute-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:09:58.384', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283373134997569537, 1268781858218270721, 1271024484853215234, '附件', 1, 'soil-out-task-distribute-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:09:33.96', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283373048896897025, 1268781858218270721, 1271024484853215234, '任务分配', 1, 'soil-out-task-distribute-task-allocation-o', '/', NULL, NULL, 1, 1, '2020-07-15 20:09:13.432', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283313495333355522, 1268781858218270721, 1272519150769541122, '分包结果录入-判定', 1, 'sub-result-input-edit-judge', '/', NULL, NULL, 1, 1, '2020-07-15 16:12:34.756', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283313387845926914, 1268781858218270721, 1272519150769541122, '分包结果录入-填写检测值', 1, 'sub-result-input-edit-input-check-value', '/', NULL, NULL, 1, 1, '2020-07-15 16:12:09.129', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283313252567040001, 1268781858218270721, 1272519150769541122, '分包结果录入-完成', 1, 'sub-result-input-edit-complete', '/', NULL, NULL, 1, 1, '2020-07-15 16:11:36.876', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283313047729815554, 1268781858218270721, 1272519150769541122, '分包结果录入-删除', 1, 'sub-result-input-edit-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 16:10:48.04', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283312928204734466, 1268781858218270721, 1272519150769541122, '分包结果录入-复制', 1, 'sub-result-input-edit-copy-o', '/', NULL, NULL, 1, 1, '2020-07-15 16:10:19.542', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283312783241199617, 1268781858218270721, 1272519150769541122, '分包结果录入-编辑', 1, 'sub-result-input-edit-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 16:09:44.98', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283312200153251841, 1268781858218270721, 1272519150769541122, '分包样品管理-分包返库', 1, 'soil-sub-sample-manage-subpackage-return', '/', NULL, NULL, 1, 1, '2020-07-15 16:07:25.961', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283312055634313217, 1268781858218270721, 1272519150769541122, '分包样品管理-编辑', 1, 'subpackage-input-soil-sub-sample-manage-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 16:06:51.505', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283311814449250305, 1268781858218270721, 1272519150769541122, '分包样品管理-分包证书上传', 1, 'soil-sub-sample-manage-certificate-upload-o', '/', NULL, NULL, 1, 1, '2020-07-15 16:05:54.002', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283311481622839297, 1268781858218270721, 1272519150769541122, '分包样品管理-历史版本', 1, 'soil-sub-sample-manage-history-o', '/', NULL, NULL, 1, 1, '2020-07-15 16:04:34.65', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283311359237242882, 1268781858218270721, 1272519150769541122, '分包样品管理-分包结果录入', 1, 'soil-sub-sample-manage-subpackage-result-enter-o', '/', NULL, NULL, 1, 1, '2020-07-15 16:04:05.471', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283310379623989249, 1268781858218270721, 1272519150769541122, '历史操作日志', 1, 'soil-subpackage-input-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 16:00:11.913', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283310249508290561, 1268781858218270721, 1272519150769541122, '历史附件', 1, 'soil-subpackage-input-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 15:59:40.891', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283310077936091138, 1268781858218270721, 1272519150769541122, '历史分包样品管理', 1, 'soil-subpackage-input-his-sample-manage-o', '/', NULL, NULL, 1, 1, '2020-07-15 15:58:59.985', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283309766576128001, 1268781858218270721, 1272519150769541122, '历史编辑', 1, 'soil-subpackage-input-his-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 15:57:45.751', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283309073760993281, 1268781858218270721, 1272519150769541122, '操作日志', 1, 'soil-subpackage-input-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 15:55:00.571', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283308930932359170, 1268781858218270721, 1272519150769541122, '附件', 1, 'soil-subpackage-input-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 15:54:26.518', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283308832999555073, 1268781858218270721, 1272519150769541122, '分包样品管理', 1, 'soil-subpackage-input-subpackage-sample-manage-o', '/', NULL, NULL, 1, 1, '2020-07-15 15:54:03.169', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283287664703782914, 1268781858218270721, 1268849682672476162, '删除', 1, 'subcontractor-soil-subcontractor-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-15 14:29:56.254', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283287603039125505, 1268781858218270721, 1268849682672476162, '编辑', 1, 'subcontractor-soil-subcontractor-edit-operation', '/', NULL, NULL, 1, 1, '2020-07-15 14:29:41.552', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283287544868323329, 1268781858218270721, 1268849682672476162, '添加', 1, 'subcontractor-soil-subcontractor-add', '/', NULL, NULL, 1, 1, '2020-07-15 14:29:27.683', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283286518333390849, 1268781858218270721, 1268848896383082498, '分包出库', 1, 'soil-sub-sample-manage-subpackage-out', '/', NULL, NULL, 1, 1, '2020-07-15 14:25:22.938', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283286435252617218, 1268781858218270721, 1268848896383082498, '取消分包', 1, 'soil-sub-sample-manage-subpackage-cancel', '/', NULL, NULL, 1, 1, '2020-07-15 14:25:03.13', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283286329078005761, 1268781858218270721, 1268848896383082498, '分包信息登记', 1, 'soil-sub-sample-manage-subpackage-info-register', '/', NULL, NULL, 1, 1, '2020-07-15 14:24:37.816', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283286222454603777, 1268781858218270721, 1268848896383082498, '删除', 1, 'subpackage-task-soil-sub-sample-manage-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 14:24:12.395', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283286141261266946, 1268781858218270721, 1268848896383082498, '复制', 1, 'subpackage-task-soil-sub-sample-manage-copy-o', '/', NULL, NULL, 1, 1, '2020-07-15 14:23:53.037', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283286064178348034, 1268781858218270721, 1268848896383082498, '编辑', 1, 'subpackage-task-soil-sub-sample-manage-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 14:23:34.659', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283285585079779330, 1268781858218270721, 1268848896383082498, '历史附件', 1, 'soil-subpackage-task-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 14:21:40.433', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283285488908582913, 1268781858218270721, 1268848896383082498, '分包样品查询', 1, 'soil-subpackage-task-his-sample-query-o', '/', NULL, NULL, 1, 1, '2020-07-15 14:21:17.504', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283285222608027650, 1268781858218270721, 1268848896383082498, '操作日志', 1, 'soil-subpackage-task-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 14:20:14.013', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283285124121575425, 1268781858218270721, 1268848896383082498, '附件', 1, 'soil-subpackage-task-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 14:19:50.532', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283285000255389698, 1268781858218270721, 1268848896383082498, '分包样品管理', 1, 'soil-subpackage-task-subpackage-sample-manage-o', '/', NULL, NULL, 1, 1, '2020-07-15 14:19:21', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283282682466222081, 1268781858218270721, 1273457551186382850, '评审记录导入', 1, 'file-soil-contract-review-add-edit-import', '/', NULL, NULL, 1, 1, '2020-07-15 14:10:08.396', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283282461220880385, 1268781858218270721, 1273457551186382850, '评审记录添加', 1, 'contract-file-soil-contract-review-add-edit-add', '/', NULL, NULL, 1, 1, '2020-07-15 14:09:15.647', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283282338923364354, 1268781858218270721, 1273457551186382850, '评审记录删除', 1, 'soil-contract-review-add-edit-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-15 14:08:46.489', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283282206077173761, 1268781858218270721, 1273457551186382850, '评审记录编辑', 1, 'soil-contract-review-add-edit-edit-operation', '/', NULL, NULL, 1, 1, '2020-07-15 14:08:14.816', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283281645336477697, 1268781858218270721, 1273457551186382850, '操作日志', 1, 'soil-contract-file-record-operation', '/', NULL, NULL, 1, 1, '2020-07-15 14:06:01.125', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283281558677962754, 1268781858218270721, 1273457551186382850, '附件', 1, 'soil-contract-file-accessory-operation', '/', NULL, NULL, 1, 1, '2020-07-15 14:05:40.464', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283281517301153794, 1268781858218270721, 1273457551186382850, '样品管理', 1, 'soil-contract-file-sample-manage-operation', '/', NULL, NULL, 1, 1, '2020-07-15 14:05:30.599', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283281334333030401, 1268781858218270721, 1273457551186382850, '评审记录', 1, 'soil-contract-file-review-record-operation', '/', NULL, NULL, 1, 1, '2020-07-15 14:04:46.976', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283280079950921729, 1268781858218270721, 1273457432957341697, '历史操作日志', 1, 'soil-contract-review-his-record-operation', '/', NULL, NULL, 1, 1, '2020-07-15 13:59:47.908', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283279956319617025, 1268781858218270721, 1273457432957341697, '历史删除', 1, 'soil-contract-review-his-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-15 13:59:18.432', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283279850975477762, 1268781858218270721, 1273457432957341697, '历史附件', 1, 'soil-contract-review-his-accessory-operation', '/', NULL, NULL, 1, 1, '2020-07-15 13:58:53.316', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283279669668298753, 1268781858218270721, 1273457432957341697, '历史添加', 1, 'contract-review-soil-contract-review-his-add', '/', NULL, NULL, 1, 1, '2020-07-15 13:58:10.089', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283279211172151298, 1268781858218270721, 1273457432957341697, '评审导入', 1, 'review-soil-contract-review-add-edit-import', '/', NULL, NULL, 1, 1, '2020-07-15 13:56:20.775', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283279098085326850, 1268781858218270721, 1273457432957341697, '评审添加', 1, 'review-soil-contract-review-add-edit-add', '/', NULL, NULL, 1, 1, '2020-07-15 13:55:53.814', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283278790185664514, 1268781858218270721, 1273457432957341697, '评审删除', 1, 'review-soil-contract-review-add-edit-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 13:54:40.404', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283278603908235265, 1268781858218270721, 1273457432957341697, '评审编辑', 1, 'review-soil-contract-review-add-edit-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 13:53:55.992', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283276579808428034, 1268781858218270721, 1273457289507950593, '历史操作日志', 1, 'soil-contract-register-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 13:45:53.41', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283276457699655682, 1268781858218270721, 1273457289507950593, '历史删除', 1, 'soil-contract-register-his-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 13:45:24.296', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283276337549623298, 1268781858218270721, 1273457289507950593, '历史附件', 1, 'soil-contract-register-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 13:44:55.65', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283276171492933633, 1268781858218270721, 1273457289507950593, '历史添加', 1, 'soil-contract-register-his-add', '/', NULL, NULL, 1, 1, '2020-07-15 13:44:16.059', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283275484159754242, 1268781858218270721, 1273457289507950593, '编辑删除', 1, 'soil-contract-register-edit-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 13:41:32.186', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283248710642253825, 1268781858218270721, 1268846545383415810, '管理检测项目删除', 1, 'soil-review-item-manage-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:55:08.882', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283248574398676994, 1268781858218270721, 1268846545383415810, '管理检测项目复制', 1, 'soil-review-item-manage-copy-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:54:36.399', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283248406735568897, 1268781858218270721, 1268846545383415810, '管理检测项目编辑', 1, 'soil-review-item-manage-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:53:56.425', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283247990979379202, 1268781858218270721, 1268846545383415810, '样品管理导入检测项目', 1, 'review-soil-sample-manage-import-test-item', '/', NULL, NULL, 1, 1, '2020-07-15 11:52:17.301', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283247822771011585, 1268781858218270721, 1268846545383415810, '样品管理取消分包', 1, 'review-soil-sample-manage-subpackage-cancel', '/', NULL, NULL, 1, 1, '2020-07-15 11:51:37.197', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283247631930179585, 1268781858218270721, 1268846545383415810, '样品管理分包', 1, 'soil-review-soil-sample-manage-subpackage', '/', NULL, NULL, 1, 1, '2020-07-15 11:50:51.697', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283247491152560129, 1268781858218270721, 1268846545383415810, '样品管理删除', 1, 'soil-review-soil-sample-manage-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:50:18.133', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283247381635088385, 1268781858218270721, 1268846545383415810, '样品管理管理检测项目', 1, 'soil-review-soil-sample-manage-test-itm-manage-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:49:52.022', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283247251804602370, 1268781858218270721, 1268846545383415810, '样品管理编辑', 1, 'soil-review-soil-sample-manage-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:49:21.068', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283246562198110209, 1268781858218270721, 1268846545383415810, '操作日志', 1, 'soil-review-soil-review-entrust-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:46:36.653', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283246464936394753, 1268781858218270721, 1268846545383415810, '附件', 1, 'soil-review-soil-review-entrust-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:46:13.464', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283246362146586625, 1268781858218270721, 1268846545383415810, '样品管理', 1, 'soil-review-soil-review-entrust-sample-manage-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:45:48.957', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283246212426711041, 1268781858218270721, 1268846545383415810, '详情', 1, 'soil-review-soil-review-entrust-detail-operation', '/', NULL, NULL, 1, 1, '2020-07-15 11:45:13.261', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283246070655041538, 1268781858218270721, 1268846545383415810, '驳回', 1, 'soil-review-soil-review-entrust-reject', '/', NULL, NULL, 1, 1, '2020-07-15 11:44:39.46', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283246002438881281, 1268781858218270721, 1268846545383415810, '通过', 1, 'soil-review-soil-review-entrust-pass', '/', NULL, NULL, 1, 1, '2020-07-15 11:44:23.196', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283244292656021506, 1268781858218270721, 1275327239517265922, '管理检测项目删除', 1, 'client-online-soil-item-manage-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:37:35.552', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283244191388745729, 1268781858218270721, 1275327239517265922, '管理检测项目复制', 1, 'client-online-soil-item-manage-copy-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:37:11.408', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283244020647018498, 1268781858218270721, 1275327239517265922, '管理检测项目编辑', 1, 'client-online-soil-item-manage-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:36:30.701', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283242042638417921, 1268781858218270721, 1275327239517265922, '管理样品导入检测项目', 1, 'online-soil-sample-manage-import-test-item', '/', NULL, NULL, 1, 1, '2020-07-15 11:28:39.106', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283241897322561537, 1268781858218270721, 1275327239517265922, '管理样品取消分包', 1, 'online-soil-sample-manage-subpackage-cancel', '/', NULL, NULL, 1, 1, '2020-07-15 11:28:04.46', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283241750492561409, 1268781858218270721, 1275327239517265922, '管理样品分包', 1, 'client-online-soil-sample-manage-subpackage', '/', NULL, NULL, 1, 1, '2020-07-15 11:27:29.454', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283241686017720321, 1268781858218270721, 1275327239517265922, '管理样品新增', 1, 'client-online-soil-sample-manage-add', '/', NULL, NULL, 1, 1, '2020-07-15 11:27:14.081', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283241544271216641, 1268781858218270721, 1275327239517265922, '管理样品删除', 1, 'client-online-soil-sample-manage-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:26:40.286', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283241386900930562, 1268781858218270721, 1275327239517265922, '管理样品管理检测项目', 1, 'online-soil-sample-manage-test-item-manage-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:26:02.766', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283240945408491521, 1268781858218270721, 1275327239517265922, '管理样品编辑', 1, 'client-online-soil-sample-manage-edit-operation', '/', NULL, NULL, 1, 1, '2020-07-15 11:24:17.506', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283239365451923458, 1268781858218270721, 1275327239517265922, '历史操作日志', 1, 'soil-client-online-entrust-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:18:00.815', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283239229103489025, 1268781858218270721, 1275327239517265922, '历史查看样品', 1, 'soil-client-online-entrust-his-view-sample-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:17:28.307', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283239023351906305, 1268781858218270721, 1275327239517265922, '历史提交', 1, 'soil-client-online-entrust-his-submit', '/', NULL, NULL, 1, 1, '2020-07-15 11:16:39.252', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283238897401151489, 1268781858218270721, 1275327239517265922, '历史添加', 1, 'soil-client-online-entrust-his-add', '/', NULL, NULL, 1, 1, '2020-07-15 11:16:09.223', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283235202223521793, 1268781858218270721, 1268841187239747585, '导入', 1, 'go-out-test-soil-go-out-test-edit-import', '/', NULL, NULL, 1, 1, '2020-07-15 11:01:28.224', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283235095239409666, 1268781858218270721, 1268841187239747585, '编辑添加', 1, 'go-out-test-soil-go-out-test-edit-add', '/', NULL, NULL, 1, 1, '2020-07-15 11:01:02.717', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283234840510939137, 1268781858218270721, 1268841187239747585, '编辑删除', 1, 'go-out-test-soil-go-out-test-edit-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 11:00:01.985', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283234519088840706, 1268781858218270721, 1268841187239747585, '操作日志', 1, 'soil-go-out-entrust-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:58:45.352', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283234400020938754, 1268781858218270721, 1268841187239747585, '查看样品', 1, 'soil-go-out-entrust-his-view-sample-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:58:16.965', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283234247327301633, 1268781858218270721, 1268841187239747585, '历史提交', 1, 'soil-go-out-entrust-his-submit', '/', NULL, NULL, 1, 1, '2020-07-15 10:57:40.559', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283234109464723457, 1268781858218270721, 1268841187239747585, '历史添加', 1, 'soil-go-out-entrust-his-add', '/', NULL, NULL, 1, 1, '2020-07-15 10:57:07.69', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283233676461555714, 1268781858218270721, 1268841187239747585, '操作日志', 1, 'soil-go-out-entrust-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:55:24.454', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283233519082881026, 1268781858218270721, 1268841187239747585, '删除', 1, 'soil-go-out-entrust-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:54:46.932', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283233399553605633, 1268781858218270721, 1268841187239747585, '导出委托单', 1, 'soil-go-out-entrust-export-entrust-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:54:18.434', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283233282498969602, 1268781858218270721, 1268841187239747585, '附件', 1, 'soil-go-out-entrust-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:53:50.526', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283233164857131010, 1268781858218270721, 1268841187239747585, '管理样品', 1, 'soil-go-out-entrust-sample-manage-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:53:22.478', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283233051682226178, 1268781858218270721, 1268841187239747585, '编辑', 1, 'soil-go-out-entrust-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:52:55.495', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283232615294255105, 1268781858218270721, 1268841187239747585, '提交评审', 1, 'soil-go-out-entrust-submit-review', '/', NULL, NULL, 1, 1, '2020-07-15 10:51:11.452', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283230794777575426, 1268781858218270721, 1268839515746689025, '追加样品', 1, 'entrust-soil-sample-manage-read-add-sample', '/', NULL, NULL, 1, 1, '2020-07-15 10:43:57.408', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283230538224582657, 1268781858218270721, 1268839515746689025, '查看样品管理检测项目', 1, 'soil-sample-manage-read-test-item-manage-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:42:56.24', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283229952980762626, 1268781858218270721, 1268839515746689025, '导入检测项目', 1, 'entrust-soil-sample-manage-import-test-item', '/', NULL, NULL, 1, 1, '2020-07-15 10:40:36.707', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283229821258645505, 1268781858218270721, 1268839515746689025, '取消分包', 1, 'entrust-soil-sample-manage-subpackage-cancel', '/', NULL, NULL, 1, 1, '2020-07-15 10:40:05.302', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283229593176588290, 1268781858218270721, 1268839515746689025, '分包', 1, 'soil-entrust-soil-sample-manage-subpackage', '/', NULL, NULL, 1, 1, '2020-07-15 10:39:10.923', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283229520610934786, 1268781858218270721, 1268839515746689025, '导入样品', 1, 'soil-entrust-soil-sample-manage-import-sample', '/', NULL, NULL, 1, 1, '2020-07-15 10:38:53.623', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283229455913795586, 1268781858218270721, 1268839515746689025, '新增', 1, 'soil-entrust-soil-sample-manage-add', '/', NULL, NULL, 1, 1, '2020-07-15 10:38:38.197', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283229356630425601, 1268781858218270721, 1268839515746689025, '样品管理删除', 1, 'soil-entrust-soil-sample-manage-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-15 10:38:14.526', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283229203089539074, 1268781858218270721, 1268839515746689025, '管理检测项目', 1, 'soil-entrust-soil-sample-manage-test-item-manage', '/', NULL, NULL, 1, 1, '2020-07-15 10:37:37.919', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283228953180323841, 1268781858218270721, 1268839515746689025, '编辑', 1, 'soil-entrust-soil-sample-manage-edit-operation', '/', NULL, NULL, 1, 1, '2020-07-15 10:36:38.336', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283228678130450434, 1268781858218270721, 1268839515746689025, '删除', 1, 'soil-entrust-soil-item-manage-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-15 10:35:32.759', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283227542061268993, 1268781858218270721, 1268840892984156161, '操作日志', 1, 'soil-send-entrust-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:31:01.899', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283227403942838273, 1268781858218270721, 1268840892984156161, '查看样品', 1, 'soil-send-entrust-his-view-sample-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:30:28.969', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283221554021220354, 1268781858218270721, 1277802637236846593, '附件', 1, 'soil-cannot-sub-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:07:14.239', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283221452875579394, 1268781858218270721, 1277802637236846593, '查看样品', 1, 'soil-cannot-sub-his-view-sample-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:06:50.124', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283221268003241985, 1268781858218270721, 1277802637236846593, '删除', 1, 'soil-cannot-sub-edit-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:06:06.047', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283221147588968449, 1268781858218270721, 1277802637236846593, '导入', 1, 'cannot-sub-soil-cannot-sub-edit-import', '/', NULL, NULL, 1, 1, '2020-07-15 10:05:37.338', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283221086305992705, 1268781858218270721, 1277802637236846593, '添加', 1, 'cannot-sub-soil-cannot-sub-edit-add', '/', NULL, NULL, 1, 1, '2020-07-15 10:05:22.727', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283220894701797377, 1268781858218270721, 1277802637236846593, '删除', 1, 'soil-cannot-sub-remove-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:04:37.045', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283220785343709185, 1268781858218270721, 1277802637236846593, '附件', 1, 'soil-cannot-sub-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:04:10.972', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283220667743813634, 1268781858218270721, 1277802637236846593, '编辑', 1, 'soil-cannot-sub-edit-o', '/', NULL, NULL, 1, 1, '2020-07-15 10:03:42.934', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283220530690736129, 1268781858218270721, 1277802637236846593, '提交', 1, 'cannot-sub-soil-cannot-sub-submit', '/', NULL, NULL, 1, 1, '2020-07-15 10:03:10.258', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283220446972428290, 1268781858218270721, 1277802637236846593, '添加', 1, 'cannot-sub-soil-cannot-sub-add', '/', NULL, NULL, 1, 1, '2020-07-15 10:02:50.298', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283008691126091777, 1268781858218270721, 1272745084802043905, '操作日志', 1, 'soil-contract-accepted-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-14 20:01:23.77', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283008564319698945, 1268781858218270721, 1272745084802043905, '附件', 1, 'soil-contract-accepted-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-14 20:00:53.538', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283008449211219969, 1268781858218270721, 1272745084802043905, '报检样品查询', 1, 'soil-contract-accepted-his-check-sample-query-o', '/', NULL, NULL, 1, 1, '2020-07-14 20:00:26.094', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283008233179398146, 1268781858218270721, 1272745084802043905, '操作日志', 1, 'soil-contract-accepted-record-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:59:34.587', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283008072579497985, 1268781858218270721, 1272745084802043905, '附件', 1, 'soil-contract-accepted-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:58:56.298', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283007965721214978, 1268781858218270721, 1272745084802043905, '样品管理', 1, 'soil-contract-accepted-sample-manage-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:58:30.82', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283007848779825154, 1268781858218270721, 1272745084802043905, '详情', 1, 'soil-contract-accepted-detail-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:58:02.94', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283007649093206017, 1268781858218270721, 1272745084802043905, '驳回', 1, 'accepted-soil-contract-accepted-reject', '/', NULL, NULL, 1, 1, '2020-07-14 19:57:15.33', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283007591555743745, 1268781858218270721, 1272745084802043905, '通过', 1, 'accepted-soil-contract-accepted-pass', '/', NULL, NULL, 1, 1, '2020-07-14 19:57:01.612', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283007127762190337, 1268781858218270721, 1272743097628889090, '操作日志', 1, 'soil-contract-check-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:55:11.035', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283007001014517762, 1268781858218270721, 1272743097628889090, '附件', 1, 'soil-contract-check-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:54:40.816', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283006882483486722, 1268781858218270721, 1272743097628889090, '报检样品查询', 1, 'soil-contract-check-his-quote-sample-query-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:54:12.556', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283006550529490945, 1268781858218270721, 1272743097628889090, '操作日志', 1, 'soil-contract-check-record-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:52:53.412', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283006394304249858, 1268781858218270721, 1272743097628889090, '附件', 1, 'soil-contract-check-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:52:16.165', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283006279099301890, 1268781858218270721, 1272743097628889090, '报价样品', 1, 'soil-contract-check-quote-sample-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:51:48.698', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283006156327829505, 1268781858218270721, 1272743097628889090, '详情', 1, 'soil-contract-check-detail-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:51:19.427', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283006019790651393, 1268781858218270721, 1272743097628889090, '驳回', 1, 'quote-check-soil-contract-check-reject', '/', NULL, NULL, 1, 1, '2020-07-14 19:50:46.874', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283005935795519489, 1268781858218270721, 1272743097628889090, '通过', 1, 'quote-check-soil-contract-check-pass', '/', NULL, NULL, 1, 1, '2020-07-14 19:50:26.848', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283004822891479042, 1268781858218270721, 1272742123141074945, '操作日志', 1, 'soil-quote-register-his-record-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:46:01.511', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283004700329721858, 1268781858218270721, 1272742123141074945, '附件', 1, 'soil-quote-register-his-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:45:32.29', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283004576803274753, 1268781858218270721, 1272742123141074945, '报检样品查询', 1, 'soil-quote-register-his-quote-sample-query-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:45:02.839', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283002940135522306, 1268781858218270721, 1272742123141074945, '添加', 1, 'soil-quote-register-edit-add', '/', NULL, NULL, 1, 1, '2020-07-14 19:38:32.627', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283002471409467394, 1268781858218270721, 1272742123141074945, '删除', 1, 'soil-quote-register-edit-remove-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:36:40.874', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282995914416275458, 1268781858218270721, 1272742123141074945, '操作日志', 1, 'soil-quote-register-record-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:10:37.565', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282995771008827393, 1268781858218270721, 1272742123141074945, '删除', 1, 'soil-quote-register-remove-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:10:03.374', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282995610979352578, 1268781858218270721, 1272742123141074945, '附件', 1, 'soil-quote-register-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:09:25.22', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282995455903350786, 1268781858218270721, 1272742123141074945, '报价样品', 1, 'soil-quote-register-quote-sample-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:08:48.247', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282995270825492482, 1268781858218270721, 1272742123141074945, '编辑', 1, 'soil-quote-register-edit-o', '/', NULL, NULL, 1, 1, '2020-07-14 19:08:04.121', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282994759296565250, 1268781858218270721, 1272742123141074945, '提交', 1, 'quote-register-soil-quote-register-submit', '/', NULL, NULL, 1, 1, '2020-07-14 19:06:02.163', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282993165305856002, 1268781858218270721, 1272742123141074945, '添加', 1, 'quote-register-soil-quote-register-add', '/', NULL, NULL, 1, 10, '2020-07-14 18:59:42.126', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282976408381898753, 1268781858218270721, 1268840892984156161, '编辑导入', 1, 'send-test-soil-send-test-edit-import', '/', NULL, NULL, 1, 1, '2020-07-14 17:53:06.964', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282976326832046082, 1268781858218270721, 1268840892984156161, '编辑添加', 1, 'send-test-soil-send-test-edit-add', '/', NULL, NULL, 1, 1, '2020-07-14 17:52:47.521', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282976220611297281, 1268781858218270721, 1268840892984156161, '编辑删除', 1, 'send-test-soil-send-test-edit-remove-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:52:22.196', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975992139169793, 1268781858218270721, 1268840892984156161, '操作日志', 1, 'send-test-soil-send-entrust-record-operation', '/', NULL, NULL, 1, 1, '2020-07-14 17:51:27.724', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975937898430465, 1268781858218270721, 1268840892984156161, '删除', 1, 'send-test-soil-send-entrust-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-14 17:51:14.792', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975873268400129, 1268781858218270721, 1268840892984156161, '导出委托单', 1, 'send-test-soil-send-entrust-export-entrust-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:50:59.383', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975783770341377, 1268781858218270721, 1268840892984156161, '附件', 1, 'send-test-soil-send-entrust-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:50:38.045', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975734466297858, 1268781858218270721, 1268840892984156161, '管理样品', 1, 'send-test-soil-send-entrust-sample-manage-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:50:26.29', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975679705464833, 1268781858218270721, 1268840892984156161, '编辑', 1, 'send-test-soil-send-entrust-edit-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:50:13.234', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975565284851714, 1268781858218270721, 1268840892984156161, '提交', 1, 'send-test-soil-send-entrust-submit', '/', NULL, NULL, 1, 1, '2020-07-14 17:49:45.954', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975518174429186, 1268781858218270721, 1268840892984156161, '提交至评审', 1, 'send-test-soil-send-entrust-submit-review', '/', NULL, NULL, 1, 1, '2020-07-14 17:49:34.723', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282975472032890882, 1268781858218270721, 1268840892984156161, '添加', 1, 'send-test-soil-send-entrust-add', '/', NULL, NULL, 1, 1, '2020-07-14 17:49:23.721', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282972113666260994, 1268781858218270721, 1275327239517265922, '编辑删除', 1, 'online-soil-go-out-test-edit-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-14 17:36:03.024', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282972001930002434, 1268781858218270721, 1275327239517265922, '操作日志', 1, 'client-online-entrust-record-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:35:36.384', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282971944291876865, 1268781858218270721, 1275327239517265922, '删除', 1, 'soil-client-online-entrust-remove-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:35:22.642', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282971884745342978, 1268781858218270721, 1275327239517265922, '附件', 1, 'soil-client-online-entrust-accessory-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:35:08.446', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282971739144273922, 1268781858218270721, 1275327239517265922, '管理样品', 1, 'soil-client-online-entrust-sample-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:34:33.731', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282971681745223682, 1268781858218270721, 1275327239517265922, '编辑', 1, 'soil-client-online-entrust-edit-o', '/', NULL, NULL, 1, 1, '2020-07-14 17:34:20.046', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282971633384898562, 1268781858218270721, 1275327239517265922, '提交', 1, 'soil-client-online-entrust-submit', '/', NULL, NULL, 1, 1, '2020-07-14 17:34:08.516', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282968905329885186, 1268781858218270721, 1273457432957341697, '操作日志', 1, 'soil-contract-review-record-operation', '/', NULL, NULL, 1, 1, '2020-07-14 17:23:18.097', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282968854746578945, 1268781858218270721, 1273457432957341697, '删除', 1, 'soil-contract-review-remove-operation', '/', NULL, NULL, 1, 1, '2020-07-14 17:23:06.037', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282968766146101250, 1268781858218270721, 1273457432957341697, '附件', 1, 'soil-contract-review-accessory-operation', '/', NULL, NULL, 1, 1, '2020-07-14 17:22:44.913', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282968691542016001, 1268781858218270721, 1273457432957341697, '查看样品', 1, 'soil-contract-review-view-sample-operation', '/', NULL, NULL, 1, 1, '2020-07-14 17:22:27.126', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282968635178958850, 1268781858218270721, 1273457432957341697, '评审', 1, 'soil-contract-review-review-operation', '/', NULL, NULL, 1, 1, '2020-07-14 17:22:13.688', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282968571597504514, 1268781858218270721, 1273457432957341697, '驳回', 1, 'soil-contract-review-back', '/', NULL, NULL, 1, 1, '2020-07-14 17:21:58.529', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282961212674359298, 1268781858218270721, 1273457289507950593, '导入', 1, 'soil-contract-register-edit-import', '/', NULL, NULL, 1, 1, '2020-07-14 16:52:44.025', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282961160870510593, 1268781858218270721, 1273457289507950593, '添加', 1, 'soil-contract-register-edit-add', '/', NULL, NULL, 1, 1, '2020-07-14 16:52:31.674', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282960256821837825, 1268781858218270721, 1273457289507950593, '操作日志', 1, 'soil-contract-register-record-operation', '/', NULL, NULL, 1, 1, '2020-07-14 16:48:56.132', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282960139058364417, 1268781858218270721, 1273457289507950593, '删除', 1, 'soil-contract-register-remove-o', '/', NULL, NULL, 1, 1, '2020-07-14 16:48:28.055', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282959998058446849, 1268781858218270721, 1273457289507950593, '附件', 1, 'soil-contract-register-accessory', '/', NULL, NULL, 1, 1, '2020-07-14 16:47:54.438', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282959618276802562, 1268781858218270721, 1273457289507950593, '样品管理', 1, 'contract-register-soil-contract-register-sample-o', '/', NULL, NULL, 1, 1, '2020-07-14 16:46:23.891', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282959468242354178, 1268781858218270721, 1273457289507950593, '编辑', 1, 'contract-register-soil-contract-register-edit-o', '/', NULL, NULL, 1, 1, '2020-07-14 16:45:48.12', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282959314768576514, 1268781858218270721, 1273457289507950593, '提交', 1, 'contract-register-soil-contract-register-submit', '/', NULL, NULL, 1, 1, '2020-07-14 16:45:11.529', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1282959252428636162, 1268781858218270721, 1273457289507950593, '添加', 1, 'contract-register-soil-contract-register-add', '/', NULL, NULL, 1, 10, '2020-07-14 16:44:56.666', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283688752007299073, 1268781858218270721, 1272742123141074945, '导入', 1, 'quote-register-soil-quote-register-edit-import', '/', NULL, NULL, 1, 1, '2020-07-16 17:03:42.92', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283688752007299073, 1268781858218270721, 1272742123141074945, '导入', 1, 'quote-register-soil-quote-register-edit-import', '/', NULL, NULL, 1, 1, '2020-07-16 17:03:42.92', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283590593524482049, 1268781858218270721, 1273458256580235266, '委托进度查询', 0, 'entrust_progress', '/soil/progress/entrust_progress', 'pt-config', NULL, 1, 400, '2020-07-16 10:33:40.113', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1283590593524482049, 1268781858218270721, 1273458256580235266, '委托进度查询', 0, 'entrust_progress', '/soil/progress/entrust_progress', 'pt-config', NULL, 1, 400, '2020-07-16 10:33:40.113', NULL);
UPDATE "public"."sys_resource" SET "system_id" = 1268781858218270721, "pid" = 1273458323299028994, "name" = '器具检测量统计', "type" = 0, "code" = 'sample_test_quantity', "uri" = '/soil/statistics/sample_quantity', "icon" = 'pt-config', "remark" = NULL, "status" = 1, "sort" = 20, "ctime" = '2020-07-01 09:54:01.37', "ename" = NULL WHERE "id" = 1278144798369202177;
UPDATE "public"."sys_resource" SET "system_id" = 1268781858218270721, "pid" = 1273458323299028994, "name" = '器具检测量统计', "type" = 0, "code" = 'sample_test_quantity', "uri" = '/soil/statistics/sample_quantity', "icon" = 'pt-config', "remark" = NULL, "status" = 1, "sort" = 20, "ctime" = '2020-07-01 09:54:01.37', "ename" = NULL WHERE "id" = 1278144798369202177;
UPDATE "public"."sys_resource" SET "system_id" = 1268781858218270721, "pid" = 1272739142047895554, "name" = '报价单复审', "type" = 0, "code" = 'quote_check_second', "uri" = '/soil/business/quote_check_second', "icon" = 'pt-config', "remark" = '计量检定系统Meter', "status" = 0, "sort" = 89, "ctime" = '2020-06-17 12:17:11.692', "ename" = NULL WHERE "id" = 1273107398671732738;
UPDATE "public"."sys_resource" SET "system_id" = 1268781858218270721, "pid" = 1272739142047895554, "name" = '报价单复审', "type" = 0, "code" = 'quote_check_second', "uri" = '/soil/business/quote_check_second', "icon" = 'pt-config', "remark" = '计量检定系统Meter', "status" = 0, "sort" = 89, "ctime" = '2020-06-17 12:17:11.692', "ename" = NULL WHERE "id" = 1273107398671732738;
UPDATE "public"."sys_resource" SET "system_id" = 1268781858218270721, "pid" = 1272739142047895554, "name" = '报检单批准', "type" = 0, "code" = 'quote_approval', "uri" = '/soil/business/quote_approval', "icon" = 'pt-config', "remark" = '计量检定系统Meter', "status" = 0, "sort" = 85, "ctime" = '2020-06-16 12:10:41.211', "ename" = NULL WHERE "id" = 1272743373010112514;
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1293838246418014210, 902430624986546177, 1184666105085390849, '标准气体台账', 0, 'standard_gas_ledger', '/lims/standard_gas_ledger', 'paintbucket', NULL, 1, 8, '2020-08-13 17:14:10.955', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1293838246418014210, 902430624986546177, 1184666105085390849, '标准气体台账', 0, 'standard_gas_ledger', '/lims/standard_gas_ledger', 'paintbucket', NULL, 1, 8, '2020-08-13 17:14:10.955', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1293749875066757122, 1268781858218270721, 1268782619882905602, '首页', 0, 'workbench', '/', 'pt-config', NULL, 1, 900, '2020-08-13 11:23:01.583', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1288323277261873154, 1268781858218270721, 1271680229387034625, '模板管理', 0, 'report_template', '/soil/certificate/report_template', 'pt-config', '计量检定系统Meter', 1, 30, '2020-07-29 11:59:39.845', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1288323277261873154, 1268781858218270721, 1271680229387034625, '模板管理', 0, 'report_template', '/soil/certificate/report_template', 'pt-config', '计量检定系统Meter', 1, 30, '2020-07-29 11:59:39.845', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1290543513994240001, 1268781858218270721, 1271680431250497538, '在线编制证书', 1, 'soil-certificate-make-pageoffice-make', '/', NULL, NULL, 1, 4, '2020-08-04 15:02:05.532', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1290543513994240001, 1268781858218270721, 1271680431250497538, '在线编制证书', 1, 'soil-certificate-make-pageoffice-make', '/', NULL, NULL, 1, 4, '2020-08-04 15:02:05.532', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1290543358817574914, 1268781858218270721, 1271680431250497538, '编制证书', 1, 'soil-certificate-make-spread-js-make', '/', NULL, NULL, 1, 1, '2020-08-04 15:01:28.535', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1290548530520236034, 1268781858218270721, 1272381134851821570, '编制证书', 1, 'soil-sample-input-spread-js-create', '/', NULL, NULL, 1, 1, '2020-08-04 15:22:01.565', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1290549847053541378, 1268781858218270721, 1271025547266224130, '编制证书', 1, 'soil-out-personal-task-spread-js-create', '/', NULL, NULL, 1, 1, '2020-08-04 15:27:15.451', NULL);
UPDATE "public"."sys_resource" SET "system_id" = 1268781858218270721, "pid" = 1271025547266224130, "name" = '在线编制证书', "type" = 1, "code" = 'soil-out-personal-task-create-o', "uri" = '/', "icon" = NULL, "remark" = NULL, "status" = 1, "sort" = 1, "ctime" = '2020-07-15 20:28:49.397', "ename" = NULL WHERE "id" = 1283377981251600386;
ALTER TABLE "public"."meter_aptitude"
ALTER TABLE "public"."meter_aptitude"
ADD COLUMN "test_rank" varchar(120) COLLATE "pg_catalog"."default" DEFAULT NULL;
COMMENT ON COLUMN "public"."meter_aptitude"."test_rank" IS '等级';
ALTER TABLE "public"."meter_aptitude"
ADD COLUMN "remark" varchar(255);
COMMENT ON COLUMN "public"."meter_aptitude"."remark" IS '备注';
ALTER TABLE "public"."meter_aptitude"
ALTER COLUMN "cycle" DROP NOT NULL;
ALTER TABLE "public"."meter_aptitude"
ALTER COLUMN "extent" DROP NOT NULL;
\ No newline at end of file
ALTER TABLE "public"."meter_sample_quote"
ALTER TABLE "public"."meter_sample_quote"
ADD COLUMN "verification" varchar(150) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying;
COMMENT ON COLUMN "public"."meter_sample_quote"."verification" IS '检定依据';
\ No newline at end of file
CREATE TABLE "public"."meter_file_template" (
CREATE TABLE "public"."meter_file_template" (
"id" int8 NOT NULL DEFAULT NULL,
"company_id" int8 NOT NULL DEFAULT NULL,
"name" varchar(100) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL::character varying,
"alias" varchar(100) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL::character varying,
"bucket_name" varchar(100) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL::character varying,
"object_key" varchar(255) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL::character varying,
"version_id" varchar(100) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"type" varchar(30) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"uid" int8 NOT NULL DEFAULT NULL,
"ctime" timestamp(0) NOT NULL DEFAULT NULL::timestamp without time zone,
"classify_id" int8 DEFAULT NULL,
"service" varchar(100) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"sort" int2 NOT NULL DEFAULT 0,
"class_type" varchar(120) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL,
"remark" varchar(255) COLLATE "pg_catalog"."default" DEFAULT NULL
)
;
COMMENT ON COLUMN "public"."meter_file_template"."id" IS '主键';
COMMENT ON COLUMN "public"."meter_file_template"."company_id" IS '企业 ID';
COMMENT ON COLUMN "public"."meter_file_template"."name" IS '名称';
COMMENT ON COLUMN "public"."meter_file_template"."alias" IS '别名';
COMMENT ON COLUMN "public"."meter_file_template"."bucket_name" IS '桶名称';
COMMENT ON COLUMN "public"."meter_file_template"."object_key" IS '对象key';
COMMENT ON COLUMN "public"."meter_file_template"."version_id" IS '版本';
COMMENT ON COLUMN "public"."meter_file_template"."type" IS '类型';
COMMENT ON COLUMN "public"."meter_file_template"."uid" IS '用户 ID';
COMMENT ON COLUMN "public"."meter_file_template"."ctime" IS '创建时间';
COMMENT ON COLUMN "public"."meter_file_template"."classify_id" IS '分类 ID';
COMMENT ON COLUMN "public"."meter_file_template"."service" IS '服务名';
COMMENT ON COLUMN "public"."meter_file_template"."sort" IS '排序';
COMMENT ON COLUMN "public"."meter_file_template"."class_type" IS '类别';
COMMENT ON COLUMN "public"."meter_file_template"."remark" IS '备注';
COMMENT ON TABLE "public"."meter_file_template" IS '模板文件表';
-- ----------------------------
-- Primary Key structure for table meter_file_template
-- ----------------------------
ALTER TABLE "public"."meter_file_template" ADD CONSTRAINT "sys_file_template_pkey" PRIMARY KEY ("id");
CREATE TABLE "public"."meter_file_template_version" (
"id" int8 NOT NULL DEFAULT NULL,
"company_id" int8 NOT NULL DEFAULT NULL,
"name" varchar(100) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL::character varying,
"alias" varchar(100) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL::character varying,
"bucket_name" varchar(100) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL::character varying,
"object_key" varchar(255) COLLATE "pg_catalog"."default" NOT NULL DEFAULT NULL::character varying,
"version_id" varchar(100) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"type" varchar(30) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"uid" int8 NOT NULL DEFAULT NULL,
"ctime" timestamp(0) NOT NULL DEFAULT NULL::timestamp without time zone,
"template_id" int8 NOT NULL DEFAULT NULL
)
;
COMMENT ON COLUMN "public"."meter_file_template_version"."id" IS '主键';
COMMENT ON COLUMN "public"."meter_file_template_version"."company_id" IS '企业 ID';
COMMENT ON COLUMN "public"."meter_file_template_version"."name" IS '名称';
COMMENT ON COLUMN "public"."meter_file_template_version"."alias" IS '别名';
COMMENT ON COLUMN "public"."meter_file_template_version"."bucket_name" IS '桶名称';
COMMENT ON COLUMN "public"."meter_file_template_version"."object_key" IS '对象key';
COMMENT ON COLUMN "public"."meter_file_template_version"."version_id" IS '版本';
COMMENT ON COLUMN "public"."meter_file_template_version"."type" IS '类型';
COMMENT ON COLUMN "public"."meter_file_template_version"."uid" IS '用户 ID';
COMMENT ON COLUMN "public"."meter_file_template_version"."ctime" IS '创建时间';
COMMENT ON COLUMN "public"."meter_file_template_version"."template_id" IS '模板ID';
COMMENT ON TABLE "public"."meter_file_template_version" IS '模板文件历史表';
-- ----------------------------
-- Primary Key structure for table meter_file_template_version
-- ----------------------------
ALTER TABLE "public"."meter_file_template_version" ADD CONSTRAINT "meter_file_template_version_pkey" PRIMARY KEY ("id");
ALTER TABLE "public"."meter_report"
ADD COLUMN "bucket_name" varchar(100) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
ADD COLUMN "object_key" varchar(255) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
ADD COLUMN "version_id" varchar(100) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying;
COMMENT ON COLUMN "public"."meter_report"."bucket_name" IS '桶名称';
COMMENT ON COLUMN "public"."meter_report"."object_key" IS '对象key';
COMMENT ON COLUMN "public"."meter_report"."version_id" IS '版本';
ALTER TABLE "public"."meter_report"
ALTER TABLE "public"."meter_report"
ADD COLUMN "pdf_object_key" varchar(255);
COMMENT ON COLUMN "public"."meter_report"."pdf_object_key" IS 'pdf对象key';
ALTER TABLE "public"."meter_report"
ADD COLUMN "uname" varchar(100);
COMMENT ON COLUMN "public"."meter_report"."uname" IS '修改人';
CREATE TABLE "public"."meter_certificate_check_distribute" (
"id" int8 NOT NULL DEFAULT NULL,
"company_id" int8 DEFAULT NULL,
"deleted" int2 DEFAULT 0,
"uid" int8 DEFAULT NULL,
"ctime" timestamp(6) DEFAULT NULL::timestamp without time zone,
"lid" int8 DEFAULT NULL,
"ltime" timestamp(6) DEFAULT NULL::timestamp without time zone,
"sample_id" int8 NOT NULL DEFAULT NULL,
"distributer" varchar(100) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
"distributer_id" int8 DEFAULT NULL,
"distribute_time" timestamp(6) DEFAULT NULL::timestamp without time zone,
"user_id" int8 DEFAULT NULL,
"test_user" varchar(90) COLLATE "pg_catalog"."default" DEFAULT NULL::character varying
)
;
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."id" IS '主键';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."company_id" IS '企业ID';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."deleted" IS '是否删除0否1是';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."uid" IS '创建人ID';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."ctime" IS '创建时间';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."lid" IS '最后修改人ID';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."ltime" IS '最后修改时间';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."sample_id" IS '所属样品ID';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."distributer" IS '分配人';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."distributer_id" IS '分配人';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."distribute_time" IS '分配时间';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."user_id" IS '任务人ID';
COMMENT ON COLUMN "public"."meter_certificate_check_distribute"."test_user" IS '任务人';
-- ----------------------------
-- Primary Key structure for table meter_certificate_check_distribute
-- ----------------------------
ALTER TABLE "public"."meter_certificate_check_distribute" ADD CONSTRAINT "meter_certificate_check_distribute_pkey" PRIMARY KEY ("id");
ALTER TABLE "public"."meter_sample_operation"
ADD COLUMN "report_maker" varchar(100),
ADD COLUMN "report_maker_id" int8,
ADD COLUMN "report_make_time" timestamp;
COMMENT ON COLUMN "public"."meter_sample_operation"."report_maker" IS '报告编制人';
COMMENT ON COLUMN "public"."meter_sample_operation"."report_maker_id" IS '报告编制人ID';
COMMENT ON COLUMN "public"."meter_sample_operation"."report_make_time" IS '报告编制时间';
\ No newline at end of file
ALTER TABLE "public"."lms_equip_info"
ALTER TABLE "public"."lms_equip_info"
ALTER COLUMN "uncertainty" TYPE text COLLATE "pg_catalog"."default" USING "uncertainty"::text;
ALTER TABLE "public"."lms_equip_info"
ALTER COLUMN "range" TYPE text COLLATE "pg_catalog"."default" USING "range"::text;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment