提交 e2e4adfc 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 4b20591a
......@@ -40,14 +40,14 @@
mvn install
cd ..
mvn install
cd ps-app/ps-app-web
mvn clean package -Pprod
cd ps-boot
mvn clean package
echo 'echo "$para1"' > apppasswd.sh
chmod -R 777 *
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh root@172.16.102.61 "mkdir -p /ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6"
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' scp -r ./target/ps-app-web.jar root@172.16.102.61:/ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh root@172.16.102.61 "ps -ef | grep '/ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6'| tr -s ' '|cut -d' ' -f2,8,9 | grep -v grep | grep 'jar' | cut -d' ' -f1|xargs --no-run-if-empty kill -9"
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh root@172.16.102.61 "source /etc/profile;source ~/.bash_profile; nohup java -jar -Xms512m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=128m /ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6/ps-app-web.jar >>/ibiz/nodes/node1/7B163728-8A01-45A9-862D-13C620F053F6/ps_appps 应用-`date --date='0 days ago' +%Y-%m-%d`.log 2>&1 &"
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh root@172.16.102.61 "mkdir -p /ibiz/nodes/node1/F2F47711-2592-4F2B-9C54-F0722AEA90D5"
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' scp -r ./target/ps.jar root@172.16.102.61:/ibiz/nodes/node1/F2F47711-2592-4F2B-9C54-F0722AEA90D5
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh root@172.16.102.61 "ps -ef | grep '/ibiz/nodes/node1/F2F47711-2592-4F2B-9C54-F0722AEA90D5'| tr -s ' '|cut -d' ' -f2,8,9 | grep -v grep | grep 'jar' | cut -d' ' -f1|xargs --no-run-if-empty kill -9"
setsid env SSH_ASKPASS='./apppasswd.sh' DISPLAY='none:0' ssh root@172.16.102.61 "source /etc/profile;source ~/.bash_profile; nohup java -jar -Xms512m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=128m /ibiz/nodes/node1/F2F47711-2592-4F2B-9C54-F0722AEA90D5/ps.jar >>/ibiz/nodes/node1/F2F47711-2592-4F2B-9C54-F0722AEA90D5/ps_apips 服务-`date --date='0 days ago' +%Y-%m-%d`.log 2>&1 &"
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -77,6 +77,14 @@ public class PS implements Serializable {
@JsonIgnore
private boolean pSIdDirtyFlag;
/**
* NGRID
*/
private String ngrid;
@JsonIgnore
private boolean ngridDirtyFlag;
/**
* 获取 [更新时间]
......@@ -253,6 +261,31 @@ public class PS implements Serializable {
return this.pSIdDirtyFlag ;
}
/**
* 获取 [NGRID]
*/
@JsonProperty("ngrid")
public String getNgrid(){
return this.ngrid ;
}
/**
* 设置 [NGRID]
*/
@JsonProperty("ngrid")
public void setNgrid(String ngrid){
this.ngrid = ngrid ;
this.ngridDirtyFlag = true ;
}
/**
* 获取 [NGRID]脏标记
*/
@JsonIgnore
public boolean getNgridDirtyFlag(){
return this.ngridDirtyFlag ;
}
}
server:
devmode: false
port: 8204
devmode: true
port: 8080
servlet:
session:
cookie:
......@@ -17,11 +17,11 @@ spring:
security:
cas:
server:
host: https://passport.ibizlab.cn
host: http://passportcs.ibizlab.cn
login: ${security.cas.server.host}/login
logout: ${security.cas.server.host}/logout
service:
host: http://172.16.102.61:${server.port}
host: http://localhost:${server.port}
login: /login/cas
logout: /logout
......@@ -36,7 +36,7 @@ logging:
app:
web:
url: http://172.16.102.61:${server.port}
url: http://localhost:${server.port}
wfstarturl: /#/%s/null/editview
# wfviewurl: /#/dewfdataredirectview
wfviewurl: /#/appwfdataredirectview
......
server:
port: 8080
port: 8201
spring:
application:
......@@ -8,6 +8,29 @@ spring:
nacos:
discovery:
server-addr: 172.16.102.211:8848
datasource:
password: 'D17c6@06'
username: a_LAB01_a0e25d193
url: jdbc:mysql://172.16.186.185:3306/a_LAB01_a0e25d193?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
driver-class-name: com.mysql.jdbc.Driver
filters: stat,wall,log4j2
#配置初始化大小/最小/最大
initial-size: 1
min-idle: 1
max-active: 20
#获取连接等待超时时间
max-wait: 60000
#间隔多久进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis: 60000
#一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
#打开PSCache,并指定每个连接上PSCache的大小。oracle设为true,mysql设为false。分库分表较多推荐设置为false
pool-prepared-statements: false
max-pool-prepared-statement-per-connection-size: 20
feign:
sentinel:
......
......@@ -85,6 +85,15 @@ public class PS implements Serializable {
@JSONField(serialize=false)
private boolean pSIdDirtyFlag;
/**
* NGRID
*/
private String ngrid;
@JsonIgnore
@JSONField(serialize=false)
private boolean ngridDirtyFlag;
/**
* 获取 [更新时间]
......@@ -275,6 +284,33 @@ public class PS implements Serializable {
public boolean getPSIdDirtyFlag(){
return this.pSIdDirtyFlag ;
}
/**
* 获取 [NGRID]
*/
@JsonProperty("ngrid")
@JSONField(name="ngrid")
public String getNgrid(){
return this.ngrid ;
}
/**
* 设置 [NGRID]
*/
@JsonProperty("ngrid")
@JSONField(name="ngrid")
public void setNgrid(String ngrid){
this.ngrid = ngrid ;
this.ngridDirtyFlag = true ;
}
/**
* 获取 [NGRID]脏标记
*/
@JsonIgnore
@JSONField(serialize=false)
public boolean getNgridDirtyFlag(){
return this.ngridDirtyFlag ;
}
}
......@@ -22,6 +22,8 @@ public class PSCreateAndStartIMLogicImpl implements IPSCreateAndStartIMLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private com.ibiz.core.module.service.IPSService psservice;
@Autowired
private com.ibiz.core.module2.service.IIMService imservice;
......@@ -38,6 +40,7 @@ public class PSCreateAndStartIMLogicImpl implements IPSCreateAndStartIMLogic{
com.ibiz.core.module2.domain.IM pscreateandstartimim =new com.ibiz.core.module2.domain.IM();
kieSession.insert(pscreateandstartimim);
kieSession.setGlobal("pscreateandstartimim",pscreateandstartimim);
kieSession.setGlobal("psservice",psservice);
kieSession.setGlobal("imservice",imservice);
kieSession.setGlobal("iBzSysPsDefaultService",iBzSysDefaultService);
kieSession.startProcess("com.ibiz.core.module.service.logic.pscreateandstartim");
......
package com.ibiz.core.module.valuerule.anno.ps;
import com.ibiz.core.module.valuerule.validator.ps.PSNgridDefaultValidator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;
/**
* 值规则注解
* 实体:PS
* 属性:Ngrid
* 值规则:Default
*/
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {PSNgridDefaultValidator.class})
public @interface PSNgridDefault {
//是否默认检查
boolean flag() default true;
//值规则名称
String info() default "默认规则";
//值规则信息,如果为空,使用值规则名称。
String message() default "内容长度必须小于等于[100]";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
package com.ibiz.core.module.valuerule.validator.ps;
import lombok.extern.slf4j.Slf4j;
import com.ibiz.util.valuerule.DefaultValueRule;
import com.ibiz.util.valuerule.VRCondition;
import com.ibiz.util.valuerule.condition.*;
import com.ibiz.core.module.valuerule.anno.ps.PSNgridDefault;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
/**
* 值规则注解解析类
* 实体:PS
* 属性:Ngrid
* 值规则:Default
* 值规则信息:内容长度必须小于等于[100]
*/
@Slf4j
@Component("PSNgridDefaultValidator")
public class PSNgridDefaultValidator implements ConstraintValidator<PSNgridDefault, String>,Validator {
private static final String MESSAGE = "值规则校验失败:【内容长度必须小于等于[100]】";
@Override
public boolean isValid(String value, ConstraintValidatorContext context) {
boolean isValid = doValidate(value);
if(!isValid) {
context.disableDefaultConstraintViolation();
context.buildConstraintViolationWithTemplate(MESSAGE)
.addConstraintViolation();
}
return doValidate(value);
}
@Override
public boolean supports(Class<?> aClass) {
return true;
}
@Override
public void validate(Object o, Errors errors) {
if( o!=null && supports(o.getClass())){
if (!doValidate((String) o)){
errors.reject(MESSAGE);
}
}
}
public boolean doValidate(String value) {
DefaultValueRule<String> valueRule = new DefaultValueRule<>("默认值规则",MESSAGE,"Ngrid",value)
//字符串长度,重复检查模式,重复值范围,基础值规则,是否递归检查。
.init(100,"NONE",null,null,false);
return valueRule.isValid();
}
}
......@@ -95,4 +95,16 @@ public interface PS{
*/
boolean getPSIdDirtyFlag();
/**
* NGRID
*/
String getNgrid();
void setNgrid(String ngrid);
/**
* 获取 [NGRID]脏标记
*/
boolean getNgridDirtyFlag();
}
......@@ -3,6 +3,7 @@ package com.ibiz.module.logic.pslogic.createandstartim;
import java.util.Map;
global com.ibiz.core.module.domain.PS pscreateandstartimdefault;
global com.ibiz.core.module2.domain.IM pscreateandstartimim;
global com.ibiz.core.module.service.IPSService psservice;
global com.ibiz.core.module2.service.IIMService imservice;
global com.ibiz.core.module.service.IPSService iBzSysPsDefaultService;
......@@ -14,12 +15,12 @@ ruleflow-group "pscreateandstartimprepareparam1"
when
then
pscreateandstartimim.setBz(pscreateandstartimdefault.getBz());
pscreateandstartimim.setBmldids(pscreateandstartimdefault.getCreateMan());
pscreateandstartimim.setHqbmids(pscreateandstartimdefault.getCreateMan());
pscreateandstartimim.setKgsldids(pscreateandstartimdefault.getCreateMan());
pscreateandstartimim.setKgsldids(pscreateandstartimdefault.getCreateMan());
pscreateandstartimim.setLdids(pscreateandstartimdefault.getCreateMan());
pscreateandstartimim.setNgshids(pscreateandstartimdefault.getCreateMan());
pscreateandstartimim.setBmld(pscreateandstartimdefault.getNgrid());
pscreateandstartimim.setHqbmids(pscreateandstartimdefault.getNgrid());
pscreateandstartimim.setKgsld(pscreateandstartimdefault.getNgrid());
pscreateandstartimim.setKgsld(pscreateandstartimdefault.getNgrid());
pscreateandstartimim.setLd(pscreateandstartimdefault.getNgrid());
pscreateandstartimim.setNgsh(pscreateandstartimdefault.getNgrid());
pscreateandstartimim.setIMId(pscreateandstartimdefault.getPSId());
pscreateandstartimim.setIMName(pscreateandstartimdefault.getPSName());
pscreateandstartimim.setSblb("10");
......@@ -35,6 +36,16 @@ ruleflow-group "pscreateandstartimbegin"
then
end
//逻辑处理节点[获取完成ps信息]
rule "deaction2"
ruleflow-group "pscreateandstartimdeaction2"
when
then
psservice.get(pscreateandstartimdefault);
update(pscreateandstartimdefault);//更新fact中变量值
update(pscreateandstartimim);//更新fact中变量值
end
//逻辑处理节点[调用im接口]
rule "deaction1"
ruleflow-group "pscreateandstartimdeaction1"
......
......@@ -10,12 +10,15 @@
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="pscreateandstartimprepareparam1" id="ecc621eaf9240a435520850ed05cd83d" implementation="http://www.jboss.org/drools/rule" name="准备IM"/>
<startEvent id="d8cd9ea53b43b0f6b7c982f59bab1922" isInterrupting="true"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="pscreateandstartimdeaction2" id="68561BD7-CEC8-4A0F-BCB3-915F33F1CFF2" implementation="http://www.jboss.org/drools/rule" name="获取完成PS信息"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="pscreateandstartimdeaction1" id="6e74256d1f33db7a3ab25919671fce06" implementation="http://www.jboss.org/drools/rule" name="调用IM接口"/>
<endEvent id="6e74256d1f33db7a3ab25919671fce06_End" name="End"/>
<sequenceFlow id="6e74256d1f33db7a3ab25919671fce06_End_Line" sourceRef="6e74256d1f33db7a3ab25919671fce06" targetRef="6e74256d1f33db7a3ab25919671fce06_End"/>
<sequenceFlow id="4c80ec402a9aa74e2bae76e70c05d463" sourceRef="d8cd9ea53b43b0f6b7c982f59bab1922" targetRef="ecc621eaf9240a435520850ed05cd83d">
<sequenceFlow id="141A08AC-0D4B-42C5-922B-DFE8F6C3282A" sourceRef="68561BD7-CEC8-4A0F-BCB3-915F33F1CFF2" targetRef="ecc621eaf9240a435520850ed05cd83d">
</sequenceFlow>
<sequenceFlow id="6712c5b8a7fbec1ccd474517c3ad0ad0" sourceRef="ecc621eaf9240a435520850ed05cd83d" targetRef="6e74256d1f33db7a3ab25919671fce06">
<sequenceFlow id="EDCBBD4E-B504-4BE7-A41B-6C0C0F7B8E49" sourceRef="d8cd9ea53b43b0f6b7c982f59bab1922" targetRef="68561BD7-CEC8-4A0F-BCB3-915F33F1CFF2">
</sequenceFlow>
<sequenceFlow id="47D4EEB8-6DC3-418D-B31A-AFBACB6E38B6" sourceRef="ecc621eaf9240a435520850ed05cd83d" targetRef="6e74256d1f33db7a3ab25919671fce06">
</sequenceFlow>
</process>
</definitions>
......
......@@ -128,6 +128,8 @@ public class T_PSRepositoryImpl extends ServiceImpl<T_PSMapper, T_PSImpl> implem
domain.setCreateMan(po.getCreateMan());
//if(po.getPSIdDirtyFlag())
domain.setPSId(po.getPSId());
//if(po.getNgridDirtyFlag())
domain.setNgrid(po.getNgrid());
return domain ;
}
......@@ -157,6 +159,8 @@ public class T_PSRepositoryImpl extends ServiceImpl<T_PSMapper, T_PSImpl> implem
po.setCreateMan(domain.getCreateMan());
if(domain.getPSIdDirtyFlag())
po.setPSId(domain.getPSId());
if(domain.getNgridDirtyFlag())
po.setNgrid(domain.getNgrid());
return po ;
}
......
......@@ -103,6 +103,17 @@ public class T_PSImpl implements PS,Serializable {
@TableField(exist = false)
private boolean pSIdDirtyFlag;
/**
* [NGRID]
*/
private String ngrid;
/**
* [NGRID]脏标记
*/
@JsonIgnore
@TableField(exist = false)
private boolean ngridDirtyFlag;
/**
* 获取 [更新时间]
*/
......@@ -257,4 +268,26 @@ public class T_PSImpl implements PS,Serializable {
public boolean getPSIdDirtyFlag(){
return this.pSIdDirtyFlag ;
}
/**
* 获取 [NGRID]
*/
public String getNgrid(){
return this.ngrid ;
}
/**
* 设置 [NGRID]
*/
public void setNgrid(String ngrid){
this.ngrid = ngrid ;
this.ngridDirtyFlag = true ;
}
/**
* 获取 [NGRID]脏标记
*/
@JsonIgnore
public boolean getNgridDirtyFlag(){
return this.ngridDirtyFlag ;
}
}
\ No newline at end of file
......@@ -15,6 +15,7 @@
<if test="true == et.pSNameDirtyFlag"> psname = #{et.pSName}, </if>
<if test="true == et.createManDirtyFlag"> createman = #{et.createMan}, </if>
<if test="true == et.pSIdDirtyFlag"> psid = #{et.pSId}, </if>
<if test="true == et.ngridDirtyFlag"> ngrid = #{et.ngrid}, </if>
</trim>
where t.psid = #{et.pSId}
</update>
......@@ -32,7 +33,7 @@
<!--输出平台内配置的数据查询[DEFAULT]-->
<select id="searchDefault" parameterType="com.ibiz.core.module.filter.PSSearchContext" resultMap="T_PSResultMap" databaseId="mysql">
select t1.* from (
<![CDATA[ SELECT t1.`BZ`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`PSID`, t1.`PSNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_PS` t1 ]]>
<![CDATA[ SELECT t1.`BZ`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`NGRID`, t1.`PSID`, t1.`PSNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_PS` t1 ]]>
<![CDATA[ ]]>
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
......
......@@ -96,6 +96,16 @@ public class PSDTO implements Serializable {
@JsonIgnore
private boolean pSIdDirtyFlag;
/**
* 属性 [NGRID]
*
*/
@PSNgridDefault(info = "默认规则")
private String ngrid;
@JsonIgnore
private boolean ngridDirtyFlag;
/**
* 获取 [UPDATEDATE]
......@@ -272,6 +282,31 @@ public class PSDTO implements Serializable {
return pSIdDirtyFlag ;
}
/**
* 获取 [NGRID]
*/
@JsonProperty("ngrid")
public String getNgrid(){
return ngrid ;
}
/**
* 设置 [NGRID]
*/
@JsonProperty("ngrid")
public void setNgrid(String ngrid){
this.ngrid = ngrid ;
this.ngridDirtyFlag = true ;
}
/**
* 获取 [NGRID]脏标记
*/
@JsonIgnore
public boolean getNgridDirtyFlag(){
return ngridDirtyFlag ;
}
public PS toDO() {
......@@ -290,6 +325,8 @@ public class PSDTO implements Serializable {
srfdomain.setCreateMan(createMan);
if(getPSIdDirtyFlag())
srfdomain.setPSId(pSId);
if(getNgridDirtyFlag())
srfdomain.setNgrid(ngrid);
return srfdomain;
}
......@@ -311,6 +348,8 @@ public class PSDTO implements Serializable {
this.setCreateMan(srfdomain.getCreateMan());
if(srfdomain.getPSIdDirtyFlag())
this.setPSId(srfdomain.getPSId());
if(srfdomain.getNgridDirtyFlag())
this.setNgrid(srfdomain.getNgrid());
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册