forked from I3-YF/i3plus-mes-yfai
对账单信息
parent
97a1df04d8
commit
d8d0c0721a
@ -0,0 +1,159 @@
|
||||
package cn.estsh.i3plus.ext.mes.apiservice.schedulejob;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.mes.apiservice.schedulejob.BaseMesScheduleJob;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.*;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.*;
|
||||
import cn.estsh.impp.framework.boot.init.ApplicationProperties;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.google.common.base.Objects;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.mvel2.util.Make;
|
||||
import org.quartz.DisallowConcurrentExecution;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @author castle, 暂时没有客供品移库
|
||||
* @version 1.0
|
||||
* @date 2021/2/2 16:44
|
||||
**/
|
||||
@Slf4j
|
||||
@DisallowConcurrentExecution
|
||||
@Component
|
||||
@ApiOperation("生成对账数据job")
|
||||
public class MesAccountJob extends BaseMesScheduleJob {
|
||||
|
||||
@Autowired
|
||||
private MesProductRecordLogRepository mesProductRecordLogRepository;
|
||||
|
||||
@Autowired
|
||||
private MesProductionRecordRepository mesProductionRecordRepository;
|
||||
|
||||
@Autowired
|
||||
private MesEquipmentLogDetailRepository mesEquipmentLogDetailRepository;
|
||||
|
||||
@Autowired
|
||||
private MesEquipmentRepository mesEquipmentRepository;
|
||||
|
||||
@Autowired
|
||||
private MesMouldMultiCavityRepository mesMouldMultiCavityRepository;
|
||||
|
||||
public MesAccountJob() {
|
||||
super(MesAccountJob.class, "生成对账数据job");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void executeMesJob(JobExecutionContext context, ApplicationProperties applicationProperties) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
|
||||
jsonObject.putIfAbsent("organizeCode", "CK01");
|
||||
jsonObject.putIfAbsent("userName", "job");
|
||||
|
||||
String organizeCode = jsonObject.getStr("organizeCode");
|
||||
String userName = jsonObject.getStr("userName");
|
||||
if (null == organizeCode) {
|
||||
log.error("请添加需要对账的工厂代码!");
|
||||
return;
|
||||
}
|
||||
if (null == userName) {
|
||||
userName = "JOB";
|
||||
}
|
||||
List<String> list = Stream.of("760BFoaming").collect(Collectors.toList());
|
||||
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getInPackList(list, "equipmentCode", ddlPackBean);
|
||||
DdlPreparedPack.getNumEqualPack(10, "equipmentType", ddlPackBean);
|
||||
|
||||
List<MesEquipment> equipments = mesEquipmentRepository.findByHqlWhere(ddlPackBean);
|
||||
if (CollectionUtils.isEmpty(equipments)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
for (MesEquipment equipment : equipments) {
|
||||
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getStringEqualPack(equipment.getEquipmentCode(), "equipmentCode", packBean);
|
||||
|
||||
DdlPreparedPack.getStringSmallerNotEqualPack("2024-09-13 08:00:00", "createDatetime", packBean);
|
||||
DdlPreparedPack.getStringBiggerPack("2024-09-12 08:00:00", "createDatetime", packBean);
|
||||
|
||||
DdlPreparedPack.getOrderBy("createDatetime", CommonEnumUtil.ASC_OR_DESC.ASC.getValue(), packBean);
|
||||
List<MesProductRecordLog> recordLogs = mesProductRecordLogRepository.findByHqlWhere(packBean);
|
||||
recordLogs = recordLogs.stream().filter(productRecordLog ->(!Objects.equal(productRecordLog.getType(), "record") && !Objects.equal(productRecordLog.getType(), "logdetail"))
|
||||
|| (Objects.equal(productRecordLog.getType(), "logdetail") && StringUtils.isEmpty(productRecordLog.getPartNo()))).collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isEmpty(recordLogs)) {
|
||||
return;
|
||||
}
|
||||
if (equipment.getEquipmentCode().contains("HT")) {
|
||||
String partNo = "";
|
||||
List<MesProductRecordLog> productRecordLogList = new ArrayList<>();
|
||||
|
||||
for (MesProductRecordLog log : recordLogs) {
|
||||
if (!StringUtils.isEmpty(log.getPartNo()) && log.getEquipVariableName() != null
|
||||
&& !log.getEquipVariableName().contains("InjDataSeries")) {
|
||||
continue;
|
||||
}
|
||||
if (log.getType().equals("logdetail") && log.getEquipVariableName().contains("InjDataSeries")) {
|
||||
if (StringUtils.isEmpty(log.getEquipVariableValue())) {
|
||||
continue;
|
||||
}
|
||||
DdlPackBean mouldMultipackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getStringEqualPack(log.getEquipVariableValue(), "mouldNo", mouldMultipackBean);
|
||||
List<MesMouldMultiCavity> mesMouldMultiCavities = mesMouldMultiCavityRepository.findByHqlWhere(mouldMultipackBean);
|
||||
if (CollectionUtils.isEmpty(mesMouldMultiCavities)) {
|
||||
continue;
|
||||
} else {
|
||||
List<String> partList = mesMouldMultiCavities.stream().map(MesMouldMultiCavity::getPartNo).distinct().collect(Collectors.toList());
|
||||
partNo = String.join(",", partList);
|
||||
log.setPartNo(partNo);
|
||||
}
|
||||
} else {
|
||||
log.setPartNo(partNo);
|
||||
if (!StringUtils.isEmpty(partNo)) {
|
||||
productRecordLogList.add(log);
|
||||
}
|
||||
}
|
||||
}
|
||||
mesProductRecordLogRepository.saveAll(productRecordLogList);
|
||||
} else {
|
||||
String partNo = "";
|
||||
List<MesProductRecordLog> productRecordLogs = new ArrayList<>();
|
||||
for (MesProductRecordLog log : recordLogs) {
|
||||
|
||||
if (log.getType().equals("monitor") && !StringUtils.isEmpty(log.getPartNo())) {
|
||||
partNo = log.getPartNo();
|
||||
} else {
|
||||
|
||||
log.setPartNo(partNo);
|
||||
if (!StringUtils.isEmpty(partNo)) {
|
||||
productRecordLogs.add(log);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
mesProductRecordLogRepository.saveAll(productRecordLogs);
|
||||
}
|
||||
}
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,160 @@
|
||||
package cn.estsh.i3plus.ext.mes.apiservice.schedulejob;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.mes.apiservice.schedulejob.BaseMesScheduleJob;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.*;
|
||||
import cn.estsh.i3plus.pojo.mes.repository.*;
|
||||
import cn.estsh.impp.framework.boot.init.ApplicationProperties;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.quartz.DisallowConcurrentExecution;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @author castle, 暂时没有客供品移库
|
||||
* @version 1.0
|
||||
* @date 2021/2/2 16:44
|
||||
**/
|
||||
@Slf4j
|
||||
@DisallowConcurrentExecution
|
||||
@Component
|
||||
@ApiOperation("生成对账数据job")
|
||||
public class MesGenerateAccountJob extends BaseMesScheduleJob {
|
||||
|
||||
@Autowired
|
||||
private MesProductRecordLogRepository mesProductRecordLogRepository;
|
||||
|
||||
@Autowired
|
||||
private MesProductionRecordRepository mesProductionRecordRepository;
|
||||
|
||||
@Autowired
|
||||
private MesEquipmentLogDetailRepository mesEquipmentLogDetailRepository;
|
||||
|
||||
@Autowired
|
||||
private MesEquipmentRepository mesEquipmentRepository;
|
||||
|
||||
@Autowired
|
||||
private MesMouldMultiCavityRepository mesMouldMultiCavityRepository;
|
||||
|
||||
public MesGenerateAccountJob() {
|
||||
super(MesGenerateAccountJob.class, "生成对账数据job");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void executeMesJob(JobExecutionContext context, ApplicationProperties applicationProperties) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
|
||||
jsonObject.putIfAbsent("organizeCode", "CK01");
|
||||
jsonObject.putIfAbsent("userName", "job");
|
||||
|
||||
String organizeCode = jsonObject.getStr("organizeCode");
|
||||
String userName = jsonObject.getStr("userName");
|
||||
if (null == organizeCode) {
|
||||
log.error("请添加需要对账的工厂代码!");
|
||||
return;
|
||||
}
|
||||
if (null == userName) {
|
||||
userName = "JOB";
|
||||
}
|
||||
List<String> list = Stream.of("HT1400", "50THotPress").collect(Collectors.toList());
|
||||
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getInPackList(list, "equipmentCode", ddlPackBean);
|
||||
|
||||
List<MesEquipment> equipments = mesEquipmentRepository.findByHqlWhere(ddlPackBean);
|
||||
if (CollectionUtils.isEmpty(equipments)) {
|
||||
return;
|
||||
}
|
||||
for (MesEquipment equipment : equipments) {
|
||||
if (equipment.getEquipmentName().contains("HT")) {
|
||||
// 插入加工记录
|
||||
DdlPackBean packBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getStringEqualPack(equipment.getEquipmentCode(), "equipmentCode", packBean);
|
||||
DdlPreparedPack.getStringBiggerNotEqualPack("2024-09-12 00:00:00", "createDatetime", packBean);
|
||||
|
||||
List<MesProductionRecord> productionRecords = mesProductionRecordRepository.findByHqlWhere(packBean);
|
||||
List<MesProductRecordLog> mesProductRecordLogs = new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(productionRecords)) {
|
||||
for (MesProductionRecord productionRecord : productionRecords) {
|
||||
MesProductRecordLog mesProductRecordLog = new MesProductRecordLog();
|
||||
try {
|
||||
BeanUtils.copyProperties(productionRecord, mesProductRecordLog);
|
||||
mesProductRecordLog.setType("加工记录");
|
||||
mesProductRecordLogs.add(mesProductRecordLog);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 插入opc logdetail数据
|
||||
DdlPackBean mesEquipmentLogDetailBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
|
||||
DdlPreparedPack.getStringEqualPack(equipment.getEquipmentCode(), "equipmentCode", mesEquipmentLogDetailBean);
|
||||
DdlPreparedPack.getStringLikeEqualPack("ShotCounter", "equipVariableName", mesEquipmentLogDetailBean);
|
||||
DdlPreparedPack.getStringBiggerNotEqualPack("2024-09-12 00:00:00", "createDatetime", mesEquipmentLogDetailBean);
|
||||
|
||||
List<MesEquipmentLogDetail> equipmentLogDetails = mesEquipmentLogDetailRepository.findByHqlWhere(mesEquipmentLogDetailBean);
|
||||
if (!CollectionUtils.isEmpty(equipmentLogDetails)) {
|
||||
for (MesEquipmentLogDetail mesEquipmentLogDetail : equipmentLogDetails) {
|
||||
MesProductRecordLog mesProductRecordLog = new MesProductRecordLog();
|
||||
try {
|
||||
BeanUtils.copyProperties(mesEquipmentLogDetail, mesProductRecordLog);
|
||||
mesProductRecordLog.setType("设备日志信息");
|
||||
mesProductRecordLogs.add(mesProductRecordLog);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
// 更新磨具号数据得到的partNo
|
||||
DdlPackBean mesEquipmentDetailBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
|
||||
DdlPreparedPack.getStringEqualPack(equipment.getEquipmentCode(), "equipmentCode", mesEquipmentDetailBean);
|
||||
DdlPreparedPack.getStringLikeEqualPack("InjDataSeries", "equipVariableName", mesEquipmentDetailBean);
|
||||
DdlPreparedPack.getStringSmallerNotEqualPack("2024-09-12 00:00:00", "createDatetime", mesEquipmentDetailBean);
|
||||
DdlPreparedPack.getOrderBy("createDatetime", CommonEnumUtil.ASC_OR_DESC.DESC.getValue(), mesEquipmentDetailBean);
|
||||
|
||||
List<MesEquipmentLogDetail> equipmentLogDetailList = mesEquipmentLogDetailRepository.findByHqlTopWhere(mesEquipmentLogDetailBean, 20);
|
||||
if (!CollectionUtils.isEmpty(equipmentLogDetailList)) {
|
||||
for (MesEquipmentLogDetail mesEquipmentLogDetail : equipmentLogDetails) {
|
||||
MesProductRecordLog mesProductRecordLog = new MesProductRecordLog();
|
||||
try {
|
||||
BeanUtils.copyProperties(mesEquipmentLogDetail, mesProductRecordLog);
|
||||
mesProductRecordLog.setType("模具号");
|
||||
|
||||
DdlPackBean mouldMultipackBean = DdlPackBean.getDdlPackBean(organizeCode);
|
||||
DdlPreparedPack.getStringEqualPack(mesEquipmentLogDetail.getEquipVariableValue(),"mouldNo", mouldMultipackBean);
|
||||
List<MesMouldMultiCavity> mesMouldMultiCavities = mesMouldMultiCavityRepository.findByHqlWhere(mouldMultipackBean);
|
||||
|
||||
mesProductRecordLogs.add(mesProductRecordLog);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mesProductRecordLogRepository.saveAll(mesProductRecordLogs);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,297 @@
|
||||
#\u9879\u76EE\u7AEF\u53E3
|
||||
server.port=8300
|
||||
#\u672C\u673Aip
|
||||
impp.server.ip=localhost
|
||||
#\u94FE\u8DEF\u8FFD\u8E2Azipkin\u63A7\u5236\u53F0ip\u5730\u5740
|
||||
impp.console.ip=http://10.195.88.71:8010
|
||||
################ \u529F\u80FD\u914D\u7F6E1 ################
|
||||
#mes webservice\u5F00\u5173
|
||||
mes.webservice.open=true
|
||||
#\u5DE5\u4F5C\u533AID,\u4E0D\u540C\u670D\u52A1\u5668\u4E0D\u540CID 0 - 31
|
||||
impp.snowflake.work.id=19
|
||||
#\u6570\u636E\u4ED3\u533AID 0 - 31 \u6709\u9ED8\u8BA4\u56FA\u5B9AID
|
||||
impp.snowflake.database.id=11
|
||||
#\u82E5\u65E0\u6CD5\u8FDE\u63A5\u6CE8\u518C\u4E2D\u5FC3\uFF0C\u662F\u5426\u9700\u8981\u4E00\u76F4\u68C0\u6D4B\u52A0\u5165
|
||||
impp.cluster.fetch=false
|
||||
#\u670D\u52A1\u6CE8\u518C\u4E2D\u5FC3
|
||||
impp.cluster.regist.center=http://10.195.88.71:8000/eureka/
|
||||
#\u65E5\u5FD7\u9ED8\u8BA4\u4F7F\u7528log4j2
|
||||
logging.config=classpath:log4j2-spring.xml
|
||||
########\u5E73\u53F0\u76F8\u5173\u53C2\u6570##########
|
||||
#\u662F\u5426\u5F00\u542Fredis\u7F13\u5B58
|
||||
impp.config.redis=true
|
||||
#\u662F\u5426\u5F00\u542Fmongo
|
||||
impp.config.mongo=true
|
||||
#\u662F\u5426\u5F00\u542FrabbitMQ
|
||||
impp.config.rabbitmq=false
|
||||
#\u662F\u5426\u5F00\u542Fswagger
|
||||
impp.config.swagger=true
|
||||
#\u662F\u5426\u5F00\u542Fwebsocket
|
||||
impp.config.websocket=true
|
||||
#\u662F\u5426\u5F00\u542F\u6587\u4EF6\u670D\u52A1
|
||||
impp.config.fileserver=fastdfs
|
||||
#\u662F\u5426\u5BF9\u53D1\u5E03\u670D\u52A1\u8FDB\u884C\u8BE6\u7EC6\u65E5\u5FD7\u5206\u6790
|
||||
impp.log.detail.controller=false
|
||||
#\u662F\u5426\u5BF9\u8C03\u7528\u670D\u52A1\u8FDB\u884C\u8BE6\u7EC6\u65E5\u5FD7\u5206\u6790
|
||||
impp.log.detail.service=false
|
||||
################ \u961F\u5217\u5904\u7406 ################
|
||||
#\u7AD9\u5185\u4FE1
|
||||
impp.mq.queue.letter=true
|
||||
#\u90AE\u4EF6
|
||||
impp.mq.queue.mail=true
|
||||
#\u5B9A\u65F6\u4EFB\u52A1
|
||||
impp.mq.queue.schedule=true
|
||||
#SWEB\u901A\u77E5\u5904\u7406\u961F\u5217
|
||||
impp.mq.queue.sweb.notice=true
|
||||
################################ \u5176\u4ED6\u529F\u80FD\u8BBE\u7F6E ################################
|
||||
#elasticsearch ip \u591A\u4E2A\u7528\u9017\u53F7\u9694\u5F00
|
||||
elasticsearch.ip=10.195.88.71:9200
|
||||
################ FastDfs \u914D\u7F6E ################
|
||||
#tracker\u670D\u52A1\u5668ip
|
||||
fastdfs.tracker_servers=10.195.88.71:22122
|
||||
# tracker\u7684http\u7AEF\u53E3
|
||||
fastdfs.http_tracker_http_port=22122
|
||||
# \u4F7F\u7528\u81EA\u5B9A\u4E49\u5DE5\u5177\u83B7\u53D6\u6587\u4EF6\u5C55\u793A\u5730\u5740
|
||||
fastdfs.http.ui.host=http://dfs.estsh.com
|
||||
#\u5BC6\u7801
|
||||
#fastdfs.http.secret_key=
|
||||
#\u8FDE\u63A5\u8D85\u65F6
|
||||
fastdfs.connect_timeout_in_seconds=500000
|
||||
#\u4F20\u8F93\u8D85\u65F6
|
||||
fastdfs.network_timeout_in_seconds=60000000
|
||||
fastdfs.charset=UTF-8
|
||||
# token \u9632\u76D7\u94FE\u529F\u80FD
|
||||
fastdfs.http_anti_steal_token=no
|
||||
#redisIP
|
||||
redis.hostName=10.195.88.71
|
||||
#\u7AEF\u53E3\u53F7
|
||||
redis.port=6379
|
||||
#\u5982\u679C\u6709\u5BC6\u7801
|
||||
redis.password=Admin123!
|
||||
##\u5176\u4ED6redis\u914D\u7F6E\u9700\u8981\u8C03\u6574\u7684\u52A0\u5728\u6B64\u5904
|
||||
################## rabbitMQ\u914D\u7F6E ####################
|
||||
spring.rabbitmq.vhost=/
|
||||
spring.rabbitmq.host=10.195.88.71
|
||||
spring.rabbitmq.port=5672
|
||||
spring.rabbitmq.username=estsh
|
||||
spring.rabbitmq.password=estsh123
|
||||
##\u5176\u4ED6rabbitMq\u914D\u7F6E\u9700\u8981\u8C03\u6574\u7684\u52A0\u5728\u6B64\u5904
|
||||
################ \u529F\u80FD\u914D\u7F6E2 ################
|
||||
#\u662F\u5426\u5F00\u542Fredis
|
||||
mes.redis.open=true
|
||||
#\u662F\u5426\u5141\u8BB8\u524D\u7AEF\u8DE8\u57DF\u63D0\u4EA4
|
||||
impp.web.cross=true
|
||||
################ \u6388\u6743\u8FC7\u6EE4\u914D\u7F6E ################
|
||||
#\u7528\u6237\u6388\u6743\u8FC7\u6EE4\u8DEF\u5F84
|
||||
filter.shiro.user.filteruri=/mes/operate/*
|
||||
#\u7528\u6237\u6388\u6743\u8FC7\u6EE4\u8DEF\u5F84
|
||||
filter.shiro.admin.filteruri=/mes/adoperate/*
|
||||
#\u7528\u6237\u6388\u6743\u8FC7\u6EE4\u8DEF\u5F84
|
||||
filter.shiro.saadmin.filteruri=/mes/saoperate/*
|
||||
################ \u4E91\u914D\u7F6E \uFF08\u4EE5projectName\u4F5C\u4E3A\u5E94\u7528\u540D\uFF09 ################
|
||||
#\u662F\u5426\u5F00\u542F\u5FAE\u670D
|
||||
eureka.client.enabled=false
|
||||
#\uFF08\u53C2\u6570\u914D\u7F6E\uFF09\u6CE8\u518C\u4E2D\u5FC3\u5730\u5740 -\u300B i3plus-ics\uFF0C\u591A\u4E2A\u7528\u9017\u53F7\u5206\u9694
|
||||
eureka.client.service-url.defaultZone=${impp.cluster.regist.center}
|
||||
#\u533A\u57DF\uFF08\u6E90\u7801\u4E2D\u5305\u542BdefaultZone\uFF0C\u6240\u4EE5\u9ED8\u8BA4\u4F7F\u7528defaultZone\uFF09
|
||||
#eureka.client.region=estsh
|
||||
#eureka.client.service-url.estsh:http://192.168.1.20:8000/eureka/,http://192.168.1.20:8001/eureka/
|
||||
################ \u672C\u673A\u5FAE\u670D\u914D\u7F6E ################
|
||||
#\u672C\u670D\u52A1\u4E3B\u673Aip\uFF08\u82E5\u591A\u4E2A\u7F51\u5361\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u672C\u670D\u52A1ip\uFF09
|
||||
eureka.instance.ip-address=${impp.server.ip}
|
||||
#\u672C\u670D\u52A1\u5B9E\u4F8BID
|
||||
eureka.instance.instance-id=${impp.server.ip}:${server.port}
|
||||
#\u672C\u670D\u52A1\u4E3B\u673A\u540D
|
||||
eureka.instance.hostname=${impp.server.ip}
|
||||
#\u672C\u670D\u52A1\u72B6\u6001\u9875\u9762
|
||||
eureka.instance.status-page-url=http://${impp.server.ip}:${server.port}/swagger-ui.html
|
||||
#\u5C06\u81EA\u5DF1\u7684IP\u6CE8\u518C\u5230Eureka Server\u3002\u82E5\u4E0D\u914D\u7F6E\u6216\u8BBE\u7F6E\u4E3Afalse\uFF0C\u8868\u793A\u6CE8\u518C\u5FAE\u670D\u52A1\u6240\u5728\u64CD\u4F5C\u7CFB\u7EDF\u7684hostname\u5230Eureka Server
|
||||
eureka.instance.prefer-ip-address=true
|
||||
#\u662F\u5426\u8FDB\u884C\u5065\u5EB7\u68C0\u67E5
|
||||
eureka.client.healthcheck.enabled=true
|
||||
################ \u68C0\u6D4B\u673A\u5236 ################
|
||||
#\u5FC3\u8DF3\u95F4\u9694\u5468\u671F\uFF0C\u5B95\u673A\u9650\u5236\uFF08\u79D2\uFF09\uFF0C30\u79D2\u6CA1\u53CD\u5E94\u89C6\u4E3A\u5B95\u673A
|
||||
eureka.instance.lease-expiration-duration-in-seconds=30
|
||||
#\u5FC3\u8DF3\u5468\u671F
|
||||
eureka.instance.lease-renewal-interval-in-seconds=20
|
||||
#client\u8FDE\u63A5Eureka\u670D\u52A1\u7AEF\u540E\u7684\u7A7A\u95F2\u7B49\u5F85\u65F6\u95F4\uFF0C\u9ED8\u8BA4\u4E3A30 \u79D2
|
||||
eureka.client.eureka-connection-idle-timeout-seconds=1
|
||||
#\u6700\u521D\u590D\u5236\u5B9E\u4F8B\u4FE1\u606F\u5230eureka\u670D\u52A1\u5668\u6240\u9700\u7684\u65F6\u95F4\uFF08s\uFF09\uFF0C\u9ED8\u8BA4\u4E3A40\u79D2
|
||||
eureka.client.initial-instance-info-replication-interval-seconds=1
|
||||
#\u95F4\u9694\u591A\u957F\u65F6\u95F4\u518D\u6B21\u590D\u5236\u5B9E\u4F8B\u4FE1\u606F\u5230eureka\u670D\u52A1\u5668\uFF0C\u9ED8\u8BA4\u4E3A30\u79D2
|
||||
eureka.client.instance-info-replication-interval-seconds=1
|
||||
#\u4ECEeureka\u670D\u52A1\u5668\u6CE8\u518C\u8868\u4E2D\u83B7\u53D6\u6CE8\u518C\u4FE1\u606F\u7684\u65F6\u95F4\u95F4\u9694\uFF08s\uFF09\uFF0C\u9ED8\u8BA4\u4E3A30\u79D2
|
||||
eureka.client.registry-fetch-interval-seconds=1
|
||||
################ \u6253\u5F00feign\u7684\u7194\u65AD ################
|
||||
feign.hystrix.enabled=true
|
||||
#\u8BFB\u53D6\u6570\u636E\u65F6\u957F
|
||||
ribbon.ReadTimeout=100000
|
||||
#\u8FDE\u63A5\u65F6\u957F
|
||||
ribbon.ConnectTimeout=100000
|
||||
#\u91CD\u8BD5
|
||||
ribbon.maxAutoRetries=2
|
||||
#\u54CD\u5E94\u8D85\u8FC7\u65F6\u957F\uFF0C\u8FDB\u884C\u7194\u65AD\uFF08\u7194\u65AD\u8D85\u65F6\u9700\u8981\u5927\u4E8E\u8BFB\u53D6\u65F6\u957F\u53CA\u8FDE\u63A5\u65F6\u957F\uFF09
|
||||
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=150000
|
||||
#\u96C6\u7FA4\u540D
|
||||
eureka.instance.metadata-map.cluster=impp_cluster
|
||||
################ \u94FE\u8DEF\u8FFD\u8E2A ################
|
||||
#\u4F7F\u7528web\u65B9\u5F0F\u4F20\u8F93\u4FE1\u606F
|
||||
spring.zipkin.sender.type=web
|
||||
#\u94FE\u8DEF\u8FFD\u8E2A\u670D\u52A1\u7684\u5730\u5740
|
||||
spring.zipkin.base-url=${impp.console.ip}
|
||||
#\u8FFD\u8E2A\u6DF1\u5EA6\uFF0C\u767E\u5206\u6BD4\uFF0C1\u662F\u5168\u90E8
|
||||
spring.sleuth.sampler.probability=1.0
|
||||
################ \u65E5\u5FD7\u636E\u6E90 ################
|
||||
spring.data.mongodb.database=mongoDBSource
|
||||
spring.data.mongodb.uri=10.195.88.71:27017
|
||||
spring.data.mongodb.username=sa
|
||||
spring.data.mongodb.password=i3plus
|
||||
spring.data.mongodb.port=27017
|
||||
################ \u4E3B\u6570\u636E\u6E90 ################
|
||||
|
||||
##############\u5B9A\u65F6\u4EFB\u52A1\u6301\u4E45\u5316##############
|
||||
impp.schedule.open=true
|
||||
impp.schedule.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
impp.schedule.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3306/impp_i3_schedule?autoReconnect=true&useSSL=false&characterEncoding=utf-8
|
||||
impp.schedule.datasource.username=root
|
||||
impp.schedule.datasource.password=@E#e7@saWE!293**((367
|
||||
impp.schedule.datasource.max-connections=20
|
||||
#\u5B9A\u65F6\u4EFB\u52A1\u5728\u670D\u52A1\u542F\u52A8\u540E\u591A\u5C11\u79D2\u6267\u884C
|
||||
impp.schedule.start.after-second=20
|
||||
#\u662F\u5426\u96C6\u7FA4\u90E8\u7F72
|
||||
impp.schedule.datasource.is-clustered=true
|
||||
#\u6267\u884C\u68C0\u6D4B\uFF08\u6BEB\u79D2\uFF09\uFF0C\u82E5\u5B95\u673A\u7531\u5176\u4ED6\u5B9A\u65F6\u5668\u6267\u884C
|
||||
impp.schedule.datasource.cluster-checkin-interval=30000
|
||||
#\u7EBF\u7A0B\u6570
|
||||
impp.schedule.thread-count=10
|
||||
#\u7EBF\u7A0B\u4F18\u5148\u7EA7\uFF081-10\uFF09\u9ED8\u8BA4\u4E3A5
|
||||
impp.schedule.thread-priority=5
|
||||
################ \u6570\u636E\u6C60\u8BBE\u7F6E ################
|
||||
## \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF0C\u9ED8\u8BA4\u662F10
|
||||
spring.datasource.hikari.maximum-pool-size=100
|
||||
## \u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5\u6570\u91CF
|
||||
spring.datasource.hikari.minimum-idle=10
|
||||
## \u7A7A\u95F2\u8FDE\u63A5\u5B58\u6D3B\u6700\u5927\u65F6\u95F4\uFF0C\u9ED8\u8BA4600000\uFF0810\u5206\u949F\uFF09
|
||||
spring.datasource.hikari.idle-timeout=600000
|
||||
## \u6B64\u5C5E\u6027\u63A7\u5236\u6C60\u4E2D\u8FDE\u63A5\u7684\u6700\u957F\u751F\u547D\u5468\u671F\uFF0C\u503C0\u8868\u793A\u65E0\u9650\u751F\u547D\u5468\u671F\uFF0C\u9ED8\u8BA41800000\u537330\u5206\u949F
|
||||
spring.datasource.hikari.max-lifetime=1800000
|
||||
## \u6570\u636E\u5E93\u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4,\u9ED8\u8BA430\u79D2\uFF0C\u537330000
|
||||
spring.datasource.hikari.connection-timeout=30000
|
||||
################ JPA\u8BBE\u7F6E\u8BBE\u7F6E ################
|
||||
# mysql
|
||||
spring.jpa.database=MYSQL
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
|
||||
##Sql-server##
|
||||
#spring.jpa.database=sql_server
|
||||
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServerDialect
|
||||
##oracle##
|
||||
#spring.jpa.database=oracle
|
||||
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
|
||||
# mysql
|
||||
spring.datasource.validationQuery=SELECT 1
|
||||
##Sql-server##
|
||||
# spring.datasource.validationQuery=SELECT 1
|
||||
##oracle##
|
||||
# spring.datasource.validationQuery=SELECT 1 FROM DUAL
|
||||
#ImprovedNamingStrategy / physical_naming_strategy java\u5C5E\u6027\u6620\u5C04\u5230\u6570\u636E\u5E93\u5B57\u6BB5\u65F6\u547D\u540D\u89C4\u5219
|
||||
# spring.jpa.properties.hibernate.physical_naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy/org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
|
||||
#\u8868\u5173\u7CFBcreate,create-drop,update,validate
|
||||
spring.jpa.properties.hibernate.hbm2ddl.auto=none
|
||||
#\u662F\u5426\u663E\u793Asql
|
||||
spring.jpa.show-sql=true
|
||||
################ \u6388\u6743\u914D\u7F6E ################
|
||||
slm.api.password=4C9479EBEFA6FA6E232EF25EFA49C4D2
|
||||
slm.app.id=20190513
|
||||
###################\uFFFD\uFFFD\u013F\uFFFD\uFFFD\uFFFD\u077F\uFFFD\u02B5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00B7\uFFFD\uFFFD##################################################
|
||||
project.entity.path=cn.estsh.i3plus.pojo
|
||||
|
||||
|
||||
############################????#######################################
|
||||
###spring.shardingsphere.datasource.names=master,slave
|
||||
spring.shardingsphere.datasource.names=master,slave
|
||||
##??
|
||||
spring.shardingsphere.datasource.master.type=com.zaxxer.hikari.HikariDataSource
|
||||
spring.shardingsphere.datasource.master.driver-class-name= com.mysql.jdbc.Driver
|
||||
spring.shardingsphere.datasource.master.JdbcUrl=jdbc:mysql://10.193.8.88:3306/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8
|
||||
spring.shardingsphere.datasource.master.username=root
|
||||
spring.shardingsphere.datasource.master.password=@E#e7@saWE!293**((367
|
||||
|
||||
spring.shardingsphere.datasource.master.maximum-pool-size=200
|
||||
spring.shardingsphere.datasource.master.minimum-idle=200
|
||||
spring.shardingsphere.datasource.master.idle-timeout=500000
|
||||
spring.shardingsphere.datasource.master.connection-timeout=600000
|
||||
spring.shardingsphere.datasource.master.max-lifetime=7000000
|
||||
spring.shardingsphere.datasource.master.connection-test-query=select 1
|
||||
spring.shardingsphere.datasource.master.keep-alive-time=3500000
|
||||
|
||||
|
||||
##??
|
||||
spring.shardingsphere.datasource.slave.type=com.zaxxer.hikari.HikariDataSource
|
||||
spring.shardingsphere.datasource.slave.driver-class-name= com.mysql.jdbc.Driver
|
||||
spring.shardingsphere.datasource.slave.JdbcUrl=jdbc:mysql://10.193.8.88:3306/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8
|
||||
spring.shardingsphere.datasource.slave.username=root
|
||||
spring.shardingsphere.datasource.slave.password=@E#e7@saWE!293**((367
|
||||
|
||||
spring.shardingsphere.datasource.slave.maximum-pool-size=200
|
||||
spring.shardingsphere.datasource.slave.minimum-idle=200
|
||||
spring.shardingsphere.datasource.slave.idle-timeout=500000
|
||||
spring.shardingsphere.datasource.slave.connection-timeout=600000
|
||||
spring.shardingsphere.datasource.slave.max-lifetime=7000000
|
||||
spring.shardingsphere.datasource.slave.connection-test-query=select 1
|
||||
spring.shardingsphere.datasource.slave.keep-alive-time=3500000
|
||||
|
||||
|
||||
impp.pisces1.datasource.isopen = false
|
||||
#spring.shardingsphere.sharding.tables.mes_equipment_log_detail.actual-data-nodes=ds0.mes_equipment_log_detail_$->{[152,156,300]}
|
||||
spring.shardingsphere.sharding.tables.mes_equipment_log_detail.actual-data-nodes=ds0.mes_equipment_log_detail_$->{['ck01_152','ck01_156','ck01_300']}
|
||||
spring.shardingsphere.sharding.tables.mes_equipment_log_detail.table-strategy.inline.sharding-column=equip_id
|
||||
spring.shardingsphere.sharding.tables.mes_equipment_log_detail.table-strategy.inline.algorithm-expression=mes_equipment_log_detail_$->{equip_id}
|
||||
|
||||
#\u7ED1\u5B9A\u8868
|
||||
spring.shardingsphere.sharding.binding-tables[0]=mes_equipment_log,mes_equipment_log_detail
|
||||
|
||||
|
||||
#impp.write.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
#impp.write.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3316/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||
#impp.write.datasource.username=root
|
||||
#impp.write.datasource.password=estsh123
|
||||
#impp.read.datasource.type=com.zaxxer.hikari.HikariDataSource
|
||||
#impp.read.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
#impp.read.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3336/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||
#impp.read.datasource.username=root
|
||||
#impp.read.datasource.password=estsh123
|
||||
|
||||
|
||||
##??????
|
||||
spring.shardingsphere.sharding.master-slave-rules.ds0.master-data-source-name=master
|
||||
spring.shardingsphere.sharding.master-slave-rules.ds0.slave-data-source-names=slave
|
||||
#??datasource ????????????????
|
||||
#??? gg
|
||||
#spring.shardingsphere.sharding.default-data-source-name=ds0
|
||||
#??????????sql??
|
||||
spring.shardingsphere.props.sql.show = false
|
||||
|
||||
spring.shardingsphere.props.max.connections.size.per.query = 10
|
||||
|
||||
impp.schedule.scheduleType=xxljob
|
||||
xxl.job.admin.addresses=http://10.195.88.71:10010/xxl-job-admin
|
||||
### xxl-job, access token
|
||||
xxl.job.accessToken=
|
||||
### xxl-job executor appname
|
||||
#xxl.job.executor.appname=${project.name}
|
||||
xxl.job.executor.appname=i3mes-castle
|
||||
### xxl-job executor registry-address: default use address to registry , otherwise use ip:port if address is null
|
||||
xxl.job.executor.address=
|
||||
### xxl-job executor server-info
|
||||
xxl.job.executor.ip=172.24.96.1
|
||||
#xxl.job.executor.ip=
|
||||
#xxl.job.executor.port=9999
|
||||
xxl.job.executor.port=8888
|
||||
### xxl-job executor log-path
|
||||
xxl.job.executor.logpath=
|
||||
### xxl-job executor log-retention-days
|
||||
xxl.job.executor.logretentiondays=10
|
||||
xxl.job.basePackage=cn.estsh.i3plus.ext.mes.apiservice.schedulejob
|
||||
|
||||
|
||||
impp.app.ext.base-packages=cn.estsh.i3plus.ext.mes.apiservice
|
@ -0,0 +1,64 @@
|
||||
#\u5B89\u9053\u62D3\u6570\u636E\u6E90
|
||||
impp.yfas.datasource.isopen=true
|
||||
#WMS\u6570\u636E\u6E90
|
||||
impp.mes.datasource.isopen=true
|
||||
#\u6570\u636E\u6E90\u7684\u522B\u540D
|
||||
impp.mes.datasource.alias=mesDataSource
|
||||
impp.mes.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
impp.mes.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3306/impp_i3_mes?autoReconnect=true&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||
#impp.mes.datasource.jdbc-url=jdbc:sqlserver://139.224.200.147:20037;DatabaseName=impp_i3_mes;
|
||||
impp.mes.datasource.username=root
|
||||
#impp.mes.datasource.password=Test123!
|
||||
impp.mes.datasource.password=estsh123
|
||||
#Admin123!
|
||||
|
||||
|
||||
#\u6570\u636E\u6E90\u7684\u522B\u540D
|
||||
impp.yfas.datasource.alias=yfasDataSource
|
||||
impp.yfas.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
impp.yfas.datasource.jdbc-url=jdbc:mysql://10.195.88.71:3316/impp_i3_wms_sap_if?autoReconnect=true&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||
#impp.yfas.datasource.jdbc-url=jdbc:sqlserver://139.224.200.147:20037;DatabaseName=impp_i3_mes;
|
||||
impp.yfas.datasource.username=root
|
||||
impp.yfas.datasource.password=estsh123
|
||||
|
||||
|
||||
|
||||
#\u6570\u636E\u6E90\u7684\u522B\u540D
|
||||
#impp.wms.datasource.isopen=true
|
||||
#impp.wms.datasource.alias=wmsDataSource
|
||||
#impp.wms.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
#impp.wms.datasource.jdbc-url=jdbc:mysql://dbmaster:3306/impp_i3_wms?autoReconnect=true&useSSL=false&characterEncoding=utf-8
|
||||
#impp.wms.datasource.username=root
|
||||
#impp.wms.datasource.password=estsh123
|
||||
#
|
||||
##SWEB??????????
|
||||
#impp.sweb.datasource.isopen=true
|
||||
#impp.sweb.datasource.alias=swebDataSource
|
||||
#impp.sweb.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
#impp.sweb.datasource.jdbc-url=jdbc:mysql://dbmaster:3306/impp_i3_wms?autoReconnect=true&useSSL=false&characterEncoding=utf-8
|
||||
#impp.sweb.datasource.username=root
|
||||
#impp.sweb.datasource.password=estsh123
|
||||
|
||||
#Pisces数据源
|
||||
impp.pisces.datasource.isopen=true
|
||||
impp.pisces.datasource.alias=piscesDataSource
|
||||
impp.pisces.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
impp.pisces.datasource.jdbc-url=jdbc:sqlserver://172.28.239.113:1433;SelectMethod=cursor;DatabaseName=PiscesTest;applicationIntent=schemaOnly;selectedSchema=MES
|
||||
impp.pisces.datasource.username=sa
|
||||
impp.pisces.datasource.password=sahasnopassword
|
||||
|
||||
#Pisces数据源
|
||||
impp.pisces1.datasource.isopen=true
|
||||
impp.pisces1.datasource.alias=piscesDataSource
|
||||
impp.pisces1.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
impp.pisces1.datasource.jdbc-url=jdbc:sqlserver://172.28.239.113:1433;SelectMethod=cursor;DatabaseName=PiscesTest;applicationIntent=schemaOnly;selectedSchema=MES
|
||||
impp.pisces1.datasource.username=sa
|
||||
impp.pisces1.datasource.password=sahasnopassword
|
||||
|
||||
#Pisces中间表数据源
|
||||
impp.pisces1.datasource.isopen=true
|
||||
impp.pisces1.datasource.alias=pisces1DataSource
|
||||
impp.pisces1.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
impp.pisces1.datasource.jdbc-url=jdbc:sqlserver://172.28.16.73:1433;SelectMethod=cursor;DatabaseName=YFMES_DATACENTER;applicationIntent=schemaOnly;selectedSchema=MES
|
||||
impp.pisces1.datasource.username=sa
|
||||
impp.pisces1.datasource.password=sahasnopassword
|
Loading…
Reference in New Issue