提交 e28a2eaf 编写于 作者: MoneyQ's avatar MoneyQ

更新 %ITEM%Service.java.ftl

上级 24ec7e76
......@@ -32,14 +32,13 @@ TARGET=PSAPPDATAENTITY
<#assign itemCodeNameLC = itemCodeName?lower_case>
<#assign itemSysApiCodeName = deapi.getPSSysServiceAPI().getCodeName()>
<#assign itemSysApiCodeNameLC = deapi.getPSSysServiceAPI().getCodeName()?lower_case>
package ${pub.getPKGCodeName()}.${app.getPKGCodeName()?lower_case}.${de.getPSSystemModule().codeName?lower_case}.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import feign.Client;
import feign.Contract;
......@@ -47,13 +46,14 @@ import feign.Feign;
import feign.codec.Decoder;
import feign.codec.Encoder;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.DigestUtils;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient;
import org.springframework.stereotype.Service;
import ${pub.getPKGCodeName()}.util.feign.suport.SearchContextFeignEncode;
import ${pub.getPKGCodeName()}.${app.getPKGCodeName()?lower_case}.${de.getPSSystemModule().codeName?lower_case}.domain.${item.getCodeName()};
......@@ -74,7 +74,10 @@ import ${pub.getPKGCodeName()}.util.config.WFActivitiEngineClientProperties;
import ${pub.getPKGCodeName()}.util.feign.WFEngineFeignClient;
</#if>
</#if>
import ${pub.getPKGCodeName()}.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Service
public class ${item.getCodeName()}Service {
......@@ -457,9 +460,21 @@ public class ${item.getCodeName()}Service {
// 登录用户信息
LoginUser loginUser = SpringContextHolder.getCurLoginUser();
if (loginUser == null) {
JSONObject jsonLoginUser = data.getJSONObject("loginuser");
if (jsonLoginUser == null) {
data.put("srfmsg", "用户未登录");
return false;
}
// 组织信息存储
wfinstance.setOriginpersonid(jsonLoginUser.getString("personId"));
wfinstance.setOriginpersonname(jsonLoginUser.getString("orgUserName"));
wfinstance.setOriginorgid(jsonLoginUser.getString("orgId"));
wfinstance.setOriginorgname(jsonLoginUser.getString("orgName"));
wfinstance.setOriginorgdeptid(jsonLoginUser.getString("orgDeptId"));
wfinstance.setOriginorgdeptname(jsonLoginUser.getString("orgDeptName"));
loginuserStr = jsonLoginUser.getString("personId");
} else {
// 组织信息存储
wfinstance.setOriginpersonid(loginUser.getPersonId());
wfinstance.setOriginpersonname(loginUser.getOrgUserName());
......@@ -470,6 +485,8 @@ public class ${item.getCodeName()}Service {
loginuserStr = loginUser.getPersonId();
}
}
wfinstance = uniWFFeignClient.createWFInstance(wfinstance);
${itemCodeNameLC}.set${de.getDefaultPSDEWF().getWFInstPSDEField().getCodeName()?cap_first}(wfinstance.getWfinstanceid());
client.update(${itemCodeNameLC}${keyCNLC}, ${itemCodeNameLC});
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册