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

xignzi006 发布系统代码

上级 7ad130d0
import { Subject } from 'rxjs';
import { TabExpViewBase } from '@/studio-core';
import AccountService from '@/service/account/account-service';
import DataPanelEngine from '@engine/view/data-panel-engine';
import DataPanelEngine from '@engine/uxview/data-panel-engine';
import TabExpViewEngine from '@engine/view/tab-exp-view-engine';
import AccountUIService from '@/uiservice/account/account-ui-service';
......@@ -137,6 +137,7 @@ export class AccountInfoBase extends TabExpViewBase {
this.datapanel.init({
view: this,
p2k: '',
datapanel: this.$refs.datapanel,
keyPSDEField: 'account',
majorPSDEField: 'accountname',
isLoadDefault: true,
......
因为 它太大了无法显示 源差异 。您可以改为 查看blob
......@@ -107,7 +107,7 @@ export class MainEditFormBase extends EditFormControlBase {
srfkey: new FormItemModel({ caption: '连接', detailType: 'FORMITEM', name: 'srfkey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 1 }),
srfmajortext: new FormItemModel({ caption: '关联名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
srfmajortext: new FormItemModel({ caption: '关联名称', detailType: 'FORMITEM', name: 'srfmajortext', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
srftempmode: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srftempmode', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
......@@ -117,7 +117,7 @@ export class MainEditFormBase extends EditFormControlBase {
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
connectionname: new FormItemModel({ caption: '关联名称', detailType: 'FORMITEM', name: 'connectionname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
connectionname: new FormItemModel({ caption: '关联名称', detailType: 'FORMITEM', name: 'connectionname', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 3 }),
createman: new FormItemModel({ caption: '建立人', detailType: 'FORMITEM', name: 'createman', visible: true, isShowCaption: true, form: this, disabled: false, enableCond: 0 }),
......
server:
port: 8080
#zuul网关路由设置
zuul:
routes:
fisaccount:
path: /fisaccounts/**
serviceId: ibizprojectoperations-poejectoperationsapi
stripPrefix: false
psaaccount:
path: /psaaccounts/**
serviceId: ibizprojectoperations-poejectoperationsapi
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
package cn.ibizlab.businesscentral.core.scheduling.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.businesscentral.core.scheduling.domain.FISAccount;
import cn.ibizlab.businesscentral.core.scheduling.filter.FISAccountSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[FISAccount] 服务对象接口
*/
@Component
public class FISAccountFallback implements FISAccountFeignClient{
public Page<FISAccount> select(){
return null;
}
public FISAccount create(FISAccount fisaccount){
return null;
}
public Boolean createBatch(List<FISAccount> fisaccounts){
return false;
}
public FISAccount update(String accountid, FISAccount fisaccount){
return null;
}
public Boolean updateBatch(List<FISAccount> fisaccounts){
return false;
}
public Boolean remove(String accountid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public FISAccount get(String accountid){
return null;
}
public FISAccount getDraft(){
return null;
}
public Boolean checkKey(FISAccount fisaccount){
return false;
}
public Boolean save(FISAccount fisaccount){
return false;
}
public Boolean saveBatch(List<FISAccount> fisaccounts){
return false;
}
public Page<FISAccount> searchDefault(FISAccountSearchContext context){
return null;
}
}
package cn.ibizlab.businesscentral.core.scheduling.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.businesscentral.core.scheduling.domain.FISAccount;
import cn.ibizlab.businesscentral.core.scheduling.filter.FISAccountSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[FISAccount] 服务对象接口
*/
@FeignClient(value = "ibizprojectoperations-poejectoperationsapi", contextId = "FISAccount", fallback = FISAccountFallback.class)
public interface FISAccountFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/fisaccounts/select")
Page<FISAccount> select();
@RequestMapping(method = RequestMethod.POST, value = "/fisaccounts")
FISAccount create(@RequestBody FISAccount fisaccount);
@RequestMapping(method = RequestMethod.POST, value = "/fisaccounts/batch")
Boolean createBatch(@RequestBody List<FISAccount> fisaccounts);
@RequestMapping(method = RequestMethod.PUT, value = "/fisaccounts/{accountid}")
FISAccount update(@PathVariable("accountid") String accountid,@RequestBody FISAccount fisaccount);
@RequestMapping(method = RequestMethod.PUT, value = "/fisaccounts/batch")
Boolean updateBatch(@RequestBody List<FISAccount> fisaccounts);
@RequestMapping(method = RequestMethod.DELETE, value = "/fisaccounts/{accountid}")
Boolean remove(@PathVariable("accountid") String accountid);
@RequestMapping(method = RequestMethod.DELETE, value = "/fisaccounts/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.GET, value = "/fisaccounts/{accountid}")
FISAccount get(@PathVariable("accountid") String accountid);
@RequestMapping(method = RequestMethod.GET, value = "/fisaccounts/getdraft")
FISAccount getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/fisaccounts/checkkey")
Boolean checkKey(@RequestBody FISAccount fisaccount);
@RequestMapping(method = RequestMethod.POST, value = "/fisaccounts/save")
Boolean save(@RequestBody FISAccount fisaccount);
@RequestMapping(method = RequestMethod.POST, value = "/fisaccounts/save")
Boolean saveBatch(@RequestBody List<FISAccount> fisaccounts);
@RequestMapping(method = RequestMethod.POST, value = "/fisaccounts/searchdefault")
Page<FISAccount> searchDefault(@RequestBody FISAccountSearchContext context);
}
package cn.ibizlab.businesscentral.core.scheduling.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.businesscentral.core.scheduling.domain.PSAccount;
import cn.ibizlab.businesscentral.core.scheduling.filter.PSAccountSearchContext;
import org.springframework.stereotype.Component;
/**
* 实体[PSAccount] 服务对象接口
*/
@Component
public class PSAccountFallback implements PSAccountFeignClient{
public Page<PSAccount> select(){
return null;
}
public PSAccount create(PSAccount psaccount){
return null;
}
public Boolean createBatch(List<PSAccount> psaccounts){
return false;
}
public PSAccount update(String accountid, PSAccount psaccount){
return null;
}
public Boolean updateBatch(List<PSAccount> psaccounts){
return false;
}
public Boolean remove(String accountid){
return false;
}
public Boolean removeBatch(Collection<String> idList){
return false;
}
public PSAccount get(String accountid){
return null;
}
public PSAccount getDraft(){
return null;
}
public Boolean checkKey(PSAccount psaccount){
return false;
}
public Boolean save(PSAccount psaccount){
return false;
}
public Boolean saveBatch(List<PSAccount> psaccounts){
return false;
}
public Page<PSAccount> searchDefault(PSAccountSearchContext context){
return null;
}
}
package cn.ibizlab.businesscentral.core.scheduling.client;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;
import cn.ibizlab.businesscentral.core.scheduling.domain.PSAccount;
import cn.ibizlab.businesscentral.core.scheduling.filter.PSAccountSearchContext;
import org.springframework.cloud.openfeign.FeignClient;
/**
* 实体[PSAccount] 服务对象接口
*/
@FeignClient(value = "ibizprojectoperations-poejectoperationsapi", contextId = "PSAccount", fallback = PSAccountFallback.class)
public interface PSAccountFeignClient {
@RequestMapping(method = RequestMethod.GET, value = "/psaccounts/select")
Page<PSAccount> select();
@RequestMapping(method = RequestMethod.POST, value = "/psaccounts")
PSAccount create(@RequestBody PSAccount psaccount);
@RequestMapping(method = RequestMethod.POST, value = "/psaccounts/batch")
Boolean createBatch(@RequestBody List<PSAccount> psaccounts);
@RequestMapping(method = RequestMethod.PUT, value = "/psaccounts/{accountid}")
PSAccount update(@PathVariable("accountid") String accountid,@RequestBody PSAccount psaccount);
@RequestMapping(method = RequestMethod.PUT, value = "/psaccounts/batch")
Boolean updateBatch(@RequestBody List<PSAccount> psaccounts);
@RequestMapping(method = RequestMethod.DELETE, value = "/psaccounts/{accountid}")
Boolean remove(@PathVariable("accountid") String accountid);
@RequestMapping(method = RequestMethod.DELETE, value = "/psaccounts/batch}")
Boolean removeBatch(@RequestBody Collection<String> idList);
@RequestMapping(method = RequestMethod.GET, value = "/psaccounts/{accountid}")
PSAccount get(@PathVariable("accountid") String accountid);
@RequestMapping(method = RequestMethod.GET, value = "/psaccounts/getdraft")
PSAccount getDraft();
@RequestMapping(method = RequestMethod.POST, value = "/psaccounts/checkkey")
Boolean checkKey(@RequestBody PSAccount psaccount);
@RequestMapping(method = RequestMethod.POST, value = "/psaccounts/save")
Boolean save(@RequestBody PSAccount psaccount);
@RequestMapping(method = RequestMethod.POST, value = "/psaccounts/save")
Boolean saveBatch(@RequestBody List<PSAccount> psaccounts);
@RequestMapping(method = RequestMethod.POST, value = "/psaccounts/searchdefault")
Page<PSAccount> searchDefault(@RequestBody PSAccountSearchContext context);
}
package cn.ibizlab.businesscentral.core.scheduling.domain;
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;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.businesscentral.util.domain.EntityClient;
/**
* ServiceApi [FIS账户] 对象
*/
@Data
public class FISAccount extends EntityClient implements Serializable {
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 客户
*/
@DEField(isKeyField=true)
@JSONField(name = "accountid")
@JsonProperty("accountid")
private String accountid;
/**
* 客户名称
*/
@JSONField(name = "accountname")
@JsonProperty("accountname")
private String accountname;
/**
* 设置 [客户名称]
*/
public void setAccountname(String accountname){
this.accountname = accountname ;
this.modify("accountname",accountname);
}
}
package cn.ibizlab.businesscentral.core.scheduling.domain;
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;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.businesscentral.util.domain.EntityClient;
/**
* ServiceApi [PS账户] 对象
*/
@Data
public class PSAccount extends EntityClient implements Serializable {
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 客户名称
*/
@JSONField(name = "accountname")
@JsonProperty("accountname")
private String accountname;
/**
* 客户
*/
@DEField(isKeyField=true)
@JSONField(name = "accountid")
@JsonProperty("accountid")
private String accountid;
/**
* 设置 [客户名称]
*/
public void setAccountname(String accountname){
this.accountname = accountname ;
this.modify("accountname",accountname);
}
}
package cn.ibizlab.businesscentral.core.scheduling.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.SearchContextBase;
/**
* ServiceApi数据实体[FISAccount] 查询条件对象
*/
@Slf4j
@Data
public class FISAccountSearchContext extends SearchContextBase {
private String n_accountname_like;//[客户名称]
}
package cn.ibizlab.businesscentral.core.scheduling.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.SearchContextBase;
/**
* ServiceApi数据实体[PSAccount] 查询条件对象
*/
@Slf4j
@Data
public class PSAccountSearchContext extends SearchContextBase {
private String n_accountname_like;//[客户名称]
}
package cn.ibizlab.businesscentral.core.scheduling.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.scheduling.domain.FISAccount;
import cn.ibizlab.businesscentral.core.scheduling.filter.FISAccountSearchContext;
/**
* 实体[FISAccount] 服务对象接口
*/
public interface IFISAccountService{
boolean create(FISAccount et) ;
void createBatch(List<FISAccount> list) ;
boolean update(FISAccount et) ;
void updateBatch(List<FISAccount> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
FISAccount get(String key) ;
FISAccount getDraft(FISAccount et) ;
boolean checkKey(FISAccount et) ;
boolean save(FISAccount et) ;
void saveBatch(List<FISAccount> list) ;
Page<FISAccount> searchDefault(FISAccountSearchContext context) ;
}
package cn.ibizlab.businesscentral.core.scheduling.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.scheduling.domain.PSAccount;
import cn.ibizlab.businesscentral.core.scheduling.filter.PSAccountSearchContext;
/**
* 实体[PSAccount] 服务对象接口
*/
public interface IPSAccountService{
boolean create(PSAccount et) ;
void createBatch(List<PSAccount> list) ;
boolean update(PSAccount et) ;
void updateBatch(List<PSAccount> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
PSAccount get(String key) ;
PSAccount getDraft(PSAccount et) ;
boolean checkKey(PSAccount et) ;
boolean save(PSAccount et) ;
void saveBatch(List<PSAccount> list) ;
Page<PSAccount> searchDefault(PSAccountSearchContext context) ;
}
package cn.ibizlab.businesscentral.core.scheduling.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.scheduling.domain.FISAccount;
import cn.ibizlab.businesscentral.core.scheduling.filter.FISAccountSearchContext;
import cn.ibizlab.businesscentral.core.scheduling.service.IFISAccountService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import cn.ibizlab.businesscentral.core.scheduling.client.FISAccountFeignClient;
/**
* 实体[FIS账户] 服务对象接口实现
*/
@Slf4j
@Service
public class FISAccountServiceImpl implements IFISAccountService {
@Autowired
FISAccountFeignClient fISAccountFeignClient;
@Override
public boolean create(FISAccount et) {
FISAccount rt = fISAccountFeignClient.create(et);
if(rt==null)
return false;
CachedBeanCopier.copy(rt,et);
return true;
}
public void createBatch(List<FISAccount> list){
fISAccountFeignClient.createBatch(list) ;
}
@Override
public boolean update(FISAccount et) {
FISAccount rt = fISAccountFeignClient.update(et.getAccountid(),et);
if(rt==null)
return false;
CachedBeanCopier.copy(rt,et);
return true;
}
public void updateBatch(List<FISAccount> list){
fISAccountFeignClient.updateBatch(list) ;
}
@Override
public boolean remove(String accountid) {
boolean result=fISAccountFeignClient.remove(accountid) ;
return result;
}
public void removeBatch(Collection<String> idList){
fISAccountFeignClient.removeBatch(idList);
}
@Override
public FISAccount get(String accountid) {
FISAccount et=fISAccountFeignClient.get(accountid);
if(et==null){
et=new FISAccount();
et.setAccountid(accountid);
}
else{
}
return et;
}
@Override
public FISAccount getDraft(FISAccount et) {
et=fISAccountFeignClient.getDraft();
return et;
}
@Override
public boolean checkKey(FISAccount et) {
return fISAccountFeignClient.checkKey(et);
}
@Override
@Transactional
public boolean save(FISAccount et) {
if(et.getAccountid()==null) et.setAccountid((String)et.getDefaultKey(true));
if(!fISAccountFeignClient.save(et))
return false;
return true;
}
@Override
public void saveBatch(List<FISAccount> list) {
fISAccountFeignClient.saveBatch(list) ;
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<FISAccount> searchDefault(FISAccountSearchContext context) {
Page<FISAccount> fISAccounts=fISAccountFeignClient.searchDefault(context);
return fISAccounts;
}
}
package cn.ibizlab.businesscentral.core.scheduling.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.scheduling.domain.PSAccount;
import cn.ibizlab.businesscentral.core.scheduling.filter.PSAccountSearchContext;
import cn.ibizlab.businesscentral.core.scheduling.service.IPSAccountService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import cn.ibizlab.businesscentral.core.scheduling.client.PSAccountFeignClient;
/**
* 实体[PS账户] 服务对象接口实现
*/
@Slf4j
@Service
public class PSAccountServiceImpl implements IPSAccountService {
@Autowired
PSAccountFeignClient pSAccountFeignClient;
@Override
public boolean create(PSAccount et) {
PSAccount rt = pSAccountFeignClient.create(et);
if(rt==null)
return false;
CachedBeanCopier.copy(rt,et);
return true;
}
public void createBatch(List<PSAccount> list){
pSAccountFeignClient.createBatch(list) ;
}
@Override
public boolean update(PSAccount et) {
PSAccount rt = pSAccountFeignClient.update(et.getAccountid(),et);
if(rt==null)
return false;
CachedBeanCopier.copy(rt,et);
return true;
}
public void updateBatch(List<PSAccount> list){
pSAccountFeignClient.updateBatch(list) ;
}
@Override
public boolean remove(String accountid) {
boolean result=pSAccountFeignClient.remove(accountid) ;
return result;
}
public void removeBatch(Collection<String> idList){
pSAccountFeignClient.removeBatch(idList);
}
@Override
public PSAccount get(String accountid) {
PSAccount et=pSAccountFeignClient.get(accountid);
if(et==null){
et=new PSAccount();
et.setAccountid(accountid);
}
else{
}
return et;
}
@Override
public PSAccount getDraft(PSAccount et) {
et=pSAccountFeignClient.getDraft();
return et;
}
@Override
public boolean checkKey(PSAccount et) {
return pSAccountFeignClient.checkKey(et);
}
@Override
@Transactional
public boolean save(PSAccount et) {
if(et.getAccountid()==null) et.setAccountid((String)et.getDefaultKey(true));
if(!pSAccountFeignClient.save(et))
return false;
return true;
}
@Override
public void saveBatch(List<PSAccount> list) {
pSAccountFeignClient.saveBatch(list) ;
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<PSAccount> searchDefault(PSAccountSearchContext context) {
Page<PSAccount> pSAccounts=pSAccountFeignClient.searchDefault(context);
return pSAccounts;
}
}
......@@ -4,7 +4,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-account-522-1">
<changeSet author="a_LAB01_e85d8801c" id="tab-account-528-1">
<createTable tableName="ACCOUNT">
<column name="ADDRESS1_PRIMARYCONTACTNAME" remarks="" type="VARCHAR(100)">
</column>
......@@ -2602,7 +2602,7 @@
<!--输出实体[CONNECTION]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-connection-12-34">
<changeSet author="a_LAB01_e85d8801c" id="tab-connection-13-34">
<createTable tableName="CONNECTION">
<column name="RECORD2OBJECTTYPECODE" remarks="" type="VARCHAR(30)">
</column>
......@@ -4169,6 +4169,8 @@
</changeSet>
<!--输出实体[FAX]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-fax-7-51">
<createTable tableName="FAX">
......@@ -7672,6 +7674,8 @@
</changeSet>
<!--输出实体[PERSONALDOCUMENTTEMPLATE]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-personaldocumenttemplate-2-83">
<createTable tableName="PERSONALDOCUMENTTEMPLATE">
......@@ -10978,31 +10982,31 @@
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-132">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-132">
<addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__ACCOUNT__PARENT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-133">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-133">
<addForeignKeyConstraint baseColumnNames="PRIMARYCONTACTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__CONTACT__PRIMAR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-134">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-134">
<addForeignKeyConstraint baseColumnNames="PREFERREDEQUIPMENTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__EQUIPMENT__PREF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EQUIPMENTID" referencedTableName="EQUIPMENT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-135">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-135">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__LEAD__ORIGINATI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-136">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-136">
<addForeignKeyConstraint baseColumnNames="DEFAULTPRICELEVELID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__PRICELEVEL__DEF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-137">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-137">
<addForeignKeyConstraint baseColumnNames="PREFERREDSERVICEID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__SERVICE__PREFER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-138">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-138">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-139">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-139">
<addForeignKeyConstraint baseColumnNames="TERRITORYID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__TERRITORY__TERR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TERRITORYID" referencedTableName="TERRITORY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-522-140">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-528-140">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
......@@ -11158,10 +11162,10 @@
<addForeignKeyConstraint baseColumnNames="ENTITYID" baseTableName="RELATIONSHIPS" constraintName="DER1N_COMPETITORSALESLITERATUR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="COMPETITORID" referencedTableName="COMPETITOR" validate="true"/>
</changeSet>
<!--输出实体[CONNECTION]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-connection-12-190">
<changeSet author="a_LAB01_e85d8801c" id="fk-connection-13-190">
<addForeignKeyConstraint baseColumnNames="RECORD1ROLEID" baseTableName="CONNECTION" constraintName="DER1N_CONNECTION__CONNECTIONRO" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONNECTIONROLEID" referencedTableName="CONNECTIONROLE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-connection-12-192">
<changeSet author="a_LAB01_e85d8801c" id="fk-connection-13-192">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="CONNECTION" constraintName="DER1N_CONNECTION__TRANSACTIONC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[CONNECTIONROLE]外键关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册