feat(gather): 新增配置任务功能并重构数据源配置
- 新增 ConfigTask 相关实体、控制器、服务和映射器 - 重构 DataSourceConfig 相关代码,改为使用 VO 和 DTO - 更新 TSupplier 相关代码,使用 MyBatis-Plus - 优化分页相关代码,使用统一的 PageDomain 类- 添加必要的依赖和注解dev
parent
a2d4bf58ca
commit
b2035c440e
@ -0,0 +1,37 @@
|
||||
package com.lyr.gather.kis.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.lyr.common.core.controller.BaseController;
|
||||
import com.lyr.common.core.page.TableDataInfo;
|
||||
import com.lyr.gather.kis.domain.vo.TSupplierVO;
|
||||
import com.lyr.gather.kis.service.TSupplierService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/10/30
|
||||
* @description TODO
|
||||
**/
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/kis/supplier")
|
||||
public class TSupplierServiceController extends BaseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private TSupplierService tSupplierService;
|
||||
|
||||
|
||||
@GetMapping("/list/{dataSource}")
|
||||
public TableDataInfo page(@NotNull(message = "数据源名称不能为空")
|
||||
@PathVariable("dataSource") String datasourceName,
|
||||
@RequestParam("pageNum") Integer pageNum,
|
||||
@RequestParam("pageSize") Integer pageSize) {
|
||||
IPage<TSupplierVO> all = tSupplierService.page(pageNum, pageSize, datasourceName);
|
||||
return getDataTable(all);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.lyr.gather.kis.convert;
|
||||
|
||||
|
||||
import com.lyr.gather.kis.domain.model.TSupplier;
|
||||
import com.lyr.gather.kis.domain.vo.TSupplierVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TSupplierConvert {
|
||||
|
||||
TSupplierConvert INSTANCE = Mappers.getMapper(TSupplierConvert.class);
|
||||
|
||||
TSupplierVO convert(TSupplier bean);
|
||||
|
||||
List<TSupplierVO> converts(List<TSupplier> beans);
|
||||
}
|
@ -1,16 +1,17 @@
|
||||
package com.lyr.gather.domain.model;
|
||||
package com.lyr.gather.kis.domain.model;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class TSupplier {
|
||||
public class TSupplier implements Serializable {
|
||||
|
||||
private Integer fItemId;
|
||||
private String fAddress;
|
@ -0,0 +1,112 @@
|
||||
package com.lyr.gather.kis.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/11/1
|
||||
* @description TODO
|
||||
**/
|
||||
@Data
|
||||
public class TSupplierVO implements Serializable {
|
||||
|
||||
|
||||
private Integer fItemId;
|
||||
private String fAddress;
|
||||
private String fCity;
|
||||
private String fProvince;
|
||||
private String fCountry;
|
||||
private String fPostalCode;
|
||||
private String fPhone;
|
||||
private String fFax;
|
||||
private String fEmail;
|
||||
private String fHomePage;
|
||||
private String fCreditLimit;
|
||||
private String fTaxId;
|
||||
private String fBank;
|
||||
private String fAccount;
|
||||
private String fBrNo;
|
||||
private Integer fBoundAttr;
|
||||
private Integer fErpClsId;
|
||||
private String fShortName;
|
||||
private Integer fPriorityId;
|
||||
private Integer fPGroupId;
|
||||
private Integer fStatus;
|
||||
private Integer fLanguageId;
|
||||
private Integer fRegionId;
|
||||
private Integer fTrade;
|
||||
private Double fMinPoValue;
|
||||
private Double fMaxDebitDate;
|
||||
private String fLegalPerson;
|
||||
private String fContact;
|
||||
private String fContactAcct;
|
||||
private String fPhoneAcct;
|
||||
private String fFaxAcct;
|
||||
private String fZipAcct;
|
||||
private String fEmailAcct;
|
||||
private String fAddrAcct;
|
||||
private Float fTax;
|
||||
private Integer fCyId;
|
||||
private Integer fSetId;
|
||||
private Integer fSetDLineId;
|
||||
private String fTaxNum;
|
||||
private Integer fPriceClsId;
|
||||
private Integer fOperId;
|
||||
private String fCiqNumber;
|
||||
private Short fDeleted;
|
||||
private Short fSaleMode;
|
||||
private String fName;
|
||||
private String fNumber;
|
||||
private Integer fParentId;
|
||||
private String fShortNumber;
|
||||
private Integer fArAccountId;
|
||||
private Integer fApAccountId;
|
||||
private Integer fPreAcctId;
|
||||
private BigDecimal fLastTradeAmount;
|
||||
private BigDecimal fLastRPAmount;
|
||||
private String fFavorPolicy;
|
||||
private Integer fDepartment;
|
||||
private Integer fEmployee;
|
||||
private String fCorperate;
|
||||
private Date fBeginTradeDate;
|
||||
private Date fEndTradeDate;
|
||||
private Date fLastTradeDate;
|
||||
private Date fLastReceiveDate;
|
||||
private String fCashDiscount;
|
||||
private Integer fCurrencyId;
|
||||
private Double fMaxDealAmount;
|
||||
private Double fMinForeReceiveRate;
|
||||
private Double fMinReserveRate;
|
||||
private Double fMaxForePayAmount;
|
||||
private Double fMaxForePayRate;
|
||||
private Integer fDebtLevel;
|
||||
private Integer fCreditDays;
|
||||
private BigDecimal fValueAddRate;
|
||||
private Integer fPayTaxAcctId;
|
||||
private BigDecimal fDiscount;
|
||||
private Integer fTypeId;
|
||||
private BigDecimal fCreditAmount;
|
||||
private String fCreditLevel;
|
||||
private Integer fStockIdAssignee;
|
||||
private Integer fBr;
|
||||
private String fRegmark;
|
||||
private Boolean fLicAndPermit;
|
||||
private String fLicence;
|
||||
private Date fPaperPeriod;
|
||||
private Integer fAlarmPeriod;
|
||||
private Integer fOtherArAcctId;
|
||||
private Integer fOtherApAcctId;
|
||||
private Integer fPreArAcctId;
|
||||
private String fHelpCode;
|
||||
private Timestamp fModifyTime;
|
||||
private Integer fCreditDegree;
|
||||
private String fRightUserId;
|
||||
private Integer fPaymentTime;
|
||||
private String fSMSPhoneNumber;
|
||||
private String fFullName;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.lyr.gather.kis.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.lyr.gather.kis.domain.vo.TSupplierVO;
|
||||
|
||||
public interface TSupplierService {
|
||||
|
||||
IPage<TSupplierVO> page(Integer pageNum, Integer pageSize, String dataSource);
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.lyr.gather.kis.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.lyr.gather.kis.convert.TSupplierConvert;
|
||||
import com.lyr.gather.kis.domain.vo.TSupplierVO;
|
||||
import com.lyr.gather.kis.mapper.TSupplierMapper;
|
||||
import com.lyr.gather.kis.service.TSupplierService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/11/1
|
||||
* @description TODO
|
||||
**/
|
||||
@Service
|
||||
public class TSupplierServiceImpl implements TSupplierService {
|
||||
|
||||
|
||||
@Resource
|
||||
private TSupplierMapper tSupplierMapper;
|
||||
|
||||
@Override
|
||||
public IPage<TSupplierVO> page(Integer pageNum, Integer pageSize, String dataSource) {
|
||||
IPage<TSupplierVO> page = tSupplierMapper.page(new Page(pageNum, pageSize), dataSource)
|
||||
.convert(TSupplierConvert.INSTANCE::convert);
|
||||
return page;
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.lyr.gather.local.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.lyr.common.annotation.Log;
|
||||
import com.lyr.common.core.controller.BaseController;
|
||||
import com.lyr.common.core.domain.AjaxResult;
|
||||
import com.lyr.common.core.page.TableDataInfo;
|
||||
import com.lyr.common.enums.BusinessType;
|
||||
import com.lyr.gather.local.domain.req.ConfigTaskEditReq;
|
||||
import com.lyr.gather.local.domain.req.ConfigTaskReq;
|
||||
import com.lyr.gather.local.domain.vo.ConfigTaskPageVO;
|
||||
import com.lyr.gather.local.service.IConfigTaskService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/11/5
|
||||
* @description TODO
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/gather/task")
|
||||
public class ConfigTaskController extends BaseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private IConfigTaskService configTaskService;
|
||||
|
||||
/**
|
||||
* 查询数据源配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('gather:task:list')")
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo page(ConfigTaskReq req) {
|
||||
IPage<ConfigTaskPageVO> page = configTaskService.page(req);
|
||||
return getDataTable(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取数据源配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('gather:task:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(configTaskService.getInfo(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据源配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('gather:task:add')")
|
||||
@Log(title = "数据源配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ConfigTaskEditReq req) {
|
||||
return toAjax(configTaskService.add(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据源配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('gather:task:edit')")
|
||||
@Log(title = "数据源配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ConfigTaskEditReq req) {
|
||||
return toAjax(configTaskService.edit(req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据源配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('gather:task:remove')")
|
||||
@Log(title = "数据源配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(configTaskService.remove(ids));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.lyr.gather.local.convert;
|
||||
|
||||
import com.lyr.gather.local.domain.model.ConfigTask;
|
||||
import com.lyr.gather.local.domain.vo.ConfigTaskPageVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper
|
||||
public interface ConfigTaskConvert {
|
||||
|
||||
|
||||
ConfigTaskConvert INSTANCE = Mappers.getMapper(ConfigTaskConvert.class);
|
||||
|
||||
|
||||
ConfigTaskPageVO convertVO(ConfigTask configTask);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.lyr.gather.domain;
|
||||
package com.lyr.gather.local.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.ibatis.annotations.Insert;
|
@ -1,4 +1,4 @@
|
||||
package com.lyr.gather.domain.model;
|
||||
package com.lyr.gather.local.domain.model;
|
||||
|
||||
import com.lyr.common.annotation.Excel;
|
||||
import lombok.Data;
|
@ -0,0 +1,9 @@
|
||||
package com.lyr.gather.local.domain.req;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/11/5
|
||||
* @description TODO
|
||||
**/
|
||||
public class ConfigTaskEditReq {
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.lyr.gather.local.domain.req;
|
||||
|
||||
import com.lyr.common.annotation.Excel;
|
||||
import com.lyr.common.core.page.PageDomain;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/11/5
|
||||
* @description TODO
|
||||
**/
|
||||
|
||||
@Data
|
||||
public class ConfigTaskReq extends PageDomain {
|
||||
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
@Excel(name = "表名")
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 明细
|
||||
*/
|
||||
@Excel(name = "明细")
|
||||
private String tableDescription;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注")
|
||||
private String tableNote;
|
||||
|
||||
/**
|
||||
* 0禁用/ 1启用
|
||||
*/
|
||||
@Excel(name = "0禁用/ 1启用")
|
||||
private Integer enable;
|
||||
|
||||
/**
|
||||
* cron表达式
|
||||
*/
|
||||
@Excel(name = "cron表达式")
|
||||
private String cron;
|
||||
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.lyr.gather.local.domain.vo;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/11/5
|
||||
* @description TODO
|
||||
**/
|
||||
public class ConfigTaskInfoVO
|
||||
{
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.lyr.gather.local.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lyr.gather.local.domain.model.ConfigTask;
|
||||
|
||||
public interface ConfigTaskMapper extends BaseMapper<ConfigTask> {
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package com.lyr.gather.mapper;
|
||||
package com.lyr.gather.local.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lyr.gather.domain.model.DataSourceConfig;
|
||||
import com.lyr.gather.local.domain.model.DataSourceConfig;
|
||||
|
||||
public interface DataSourceConfigMapper extends BaseMapper<DataSourceConfig> {
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.lyr.gather.local.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lyr.gather.local.domain.model.ConfigTask;
|
||||
import com.lyr.gather.local.domain.req.ConfigTaskEditReq;
|
||||
import com.lyr.gather.local.domain.req.ConfigTaskReq;
|
||||
import com.lyr.gather.local.domain.vo.ConfigTaskInfoVO;
|
||||
import com.lyr.gather.local.domain.vo.ConfigTaskPageVO;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/11/5
|
||||
* @description TODO
|
||||
**/
|
||||
public interface IConfigTaskService extends IService<ConfigTask> {
|
||||
|
||||
|
||||
IPage<ConfigTaskPageVO> page(ConfigTaskReq req);
|
||||
|
||||
ConfigTaskInfoVO getInfo(Long id);
|
||||
|
||||
int add(ConfigTaskEditReq req);
|
||||
|
||||
int edit(ConfigTaskEditReq req);
|
||||
|
||||
int remove(Long[] ids);
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.lyr.gather.local.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.lyr.gather.local.convert.ConfigTaskConvert;
|
||||
import com.lyr.gather.local.domain.model.ConfigTask;
|
||||
import com.lyr.gather.local.domain.req.ConfigTaskEditReq;
|
||||
import com.lyr.gather.local.domain.req.ConfigTaskReq;
|
||||
import com.lyr.gather.local.domain.vo.ConfigTaskInfoVO;
|
||||
import com.lyr.gather.local.domain.vo.ConfigTaskPageVO;
|
||||
import com.lyr.gather.local.mapper.ConfigTaskMapper;
|
||||
import com.lyr.gather.local.service.IConfigTaskService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author liyc
|
||||
* @date 2024/11/5
|
||||
* @description TODO
|
||||
**/
|
||||
@Service
|
||||
public class ConfigTaskServiceImpl extends ServiceImpl<ConfigTaskMapper, ConfigTask> implements IConfigTaskService {
|
||||
|
||||
@Resource
|
||||
private ConfigTaskMapper configTaskMapper;
|
||||
|
||||
@Override
|
||||
public IPage<ConfigTaskPageVO> page(ConfigTaskReq req) {
|
||||
IPage<ConfigTaskPageVO> page = this.lambdaQuery() //
|
||||
.eq(ConfigTask::getDataSource, req.getName())//
|
||||
.eq(ConfigTask::getEnable, req.getEnable()) //
|
||||
.like(StringUtils.isNoneEmpty(req.getTableName()), ConfigTask::getTableName, req.getTableName())//
|
||||
.like(StringUtils.isNoneEmpty(req.getTableDescription()), ConfigTask::getTableDescription, req.getTableDescription())//
|
||||
.like(StringUtils.isNoneEmpty(req.getTableNote()), ConfigTask::getTableNote, req.getTableNote())//
|
||||
.page(req.toPage()) //
|
||||
.convert(configTask -> ConfigTaskConvert.INSTANCE.convertVO((ConfigTask) configTask));
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigTaskInfoVO getInfo(Long id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int add(ConfigTaskEditReq req) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int edit(ConfigTaskEditReq req) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Long[] ids) {
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package com.lyr.gather.convert;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.lyr.gather.domain.DataSourceConfigDTO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2024-10-31T16:39:16+0800",
|
||||
comments = "version: 1.6.2, compiler: javac, environment: Java 1.8.0_392 (Amazon.com Inc.)"
|
||||
)
|
||||
public class DataSourceConfigConvertImpl implements DataSourceConfigConvert {
|
||||
|
||||
@Override
|
||||
public DruidDataSource convert(DataSourceConfigDTO bean) {
|
||||
if ( bean == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
DruidDataSource druidDataSource = new DruidDataSource();
|
||||
|
||||
druidDataSource.setName( bean.getName() );
|
||||
druidDataSource.setUsername( bean.getUsername() );
|
||||
druidDataSource.setPassword( bean.getPassword() );
|
||||
|
||||
return druidDataSource;
|
||||
}
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
package com.lyr.gather.kis.convert;
|
||||
|
||||
import com.lyr.gather.kis.domain.model.TSupplier;
|
||||
import com.lyr.gather.kis.domain.vo.TSupplierVO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2024-11-06T10:37:36+0800",
|
||||
comments = "version: 1.6.2, compiler: javac, environment: Java 1.8.0_392 (Amazon.com Inc.)"
|
||||
)
|
||||
public class TSupplierConvertImpl implements TSupplierConvert {
|
||||
|
||||
@Override
|
||||
public TSupplierVO convert(TSupplier bean) {
|
||||
if ( bean == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
TSupplierVO tSupplierVO = new TSupplierVO();
|
||||
|
||||
tSupplierVO.setFItemId( bean.getFItemId() );
|
||||
tSupplierVO.setFAddress( bean.getFAddress() );
|
||||
tSupplierVO.setFCity( bean.getFCity() );
|
||||
tSupplierVO.setFProvince( bean.getFProvince() );
|
||||
tSupplierVO.setFCountry( bean.getFCountry() );
|
||||
tSupplierVO.setFPostalCode( bean.getFPostalCode() );
|
||||
tSupplierVO.setFPhone( bean.getFPhone() );
|
||||
tSupplierVO.setFFax( bean.getFFax() );
|
||||
tSupplierVO.setFEmail( bean.getFEmail() );
|
||||
tSupplierVO.setFHomePage( bean.getFHomePage() );
|
||||
tSupplierVO.setFCreditLimit( bean.getFCreditLimit() );
|
||||
tSupplierVO.setFTaxId( bean.getFTaxId() );
|
||||
tSupplierVO.setFBank( bean.getFBank() );
|
||||
tSupplierVO.setFAccount( bean.getFAccount() );
|
||||
tSupplierVO.setFBrNo( bean.getFBrNo() );
|
||||
tSupplierVO.setFBoundAttr( bean.getFBoundAttr() );
|
||||
tSupplierVO.setFErpClsId( bean.getFErpClsId() );
|
||||
tSupplierVO.setFShortName( bean.getFShortName() );
|
||||
tSupplierVO.setFPriorityId( bean.getFPriorityId() );
|
||||
tSupplierVO.setFPGroupId( bean.getFPGroupId() );
|
||||
tSupplierVO.setFStatus( bean.getFStatus() );
|
||||
tSupplierVO.setFLanguageId( bean.getFLanguageId() );
|
||||
tSupplierVO.setFRegionId( bean.getFRegionId() );
|
||||
tSupplierVO.setFTrade( bean.getFTrade() );
|
||||
tSupplierVO.setFMinPoValue( bean.getFMinPoValue() );
|
||||
tSupplierVO.setFMaxDebitDate( bean.getFMaxDebitDate() );
|
||||
tSupplierVO.setFLegalPerson( bean.getFLegalPerson() );
|
||||
tSupplierVO.setFContact( bean.getFContact() );
|
||||
tSupplierVO.setFContactAcct( bean.getFContactAcct() );
|
||||
tSupplierVO.setFPhoneAcct( bean.getFPhoneAcct() );
|
||||
tSupplierVO.setFFaxAcct( bean.getFFaxAcct() );
|
||||
tSupplierVO.setFZipAcct( bean.getFZipAcct() );
|
||||
tSupplierVO.setFEmailAcct( bean.getFEmailAcct() );
|
||||
tSupplierVO.setFAddrAcct( bean.getFAddrAcct() );
|
||||
tSupplierVO.setFTax( bean.getFTax() );
|
||||
tSupplierVO.setFCyId( bean.getFCyId() );
|
||||
tSupplierVO.setFSetId( bean.getFSetId() );
|
||||
tSupplierVO.setFSetDLineId( bean.getFSetDLineId() );
|
||||
tSupplierVO.setFTaxNum( bean.getFTaxNum() );
|
||||
tSupplierVO.setFPriceClsId( bean.getFPriceClsId() );
|
||||
tSupplierVO.setFOperId( bean.getFOperId() );
|
||||
tSupplierVO.setFCiqNumber( bean.getFCiqNumber() );
|
||||
tSupplierVO.setFDeleted( bean.getFDeleted() );
|
||||
tSupplierVO.setFSaleMode( bean.getFSaleMode() );
|
||||
tSupplierVO.setFName( bean.getFName() );
|
||||
tSupplierVO.setFNumber( bean.getFNumber() );
|
||||
tSupplierVO.setFParentId( bean.getFParentId() );
|
||||
tSupplierVO.setFShortNumber( bean.getFShortNumber() );
|
||||
tSupplierVO.setFArAccountId( bean.getFArAccountId() );
|
||||
tSupplierVO.setFApAccountId( bean.getFApAccountId() );
|
||||
tSupplierVO.setFPreAcctId( bean.getFPreAcctId() );
|
||||
tSupplierVO.setFLastTradeAmount( bean.getFLastTradeAmount() );
|
||||
tSupplierVO.setFLastRPAmount( bean.getFLastRPAmount() );
|
||||
tSupplierVO.setFFavorPolicy( bean.getFFavorPolicy() );
|
||||
tSupplierVO.setFDepartment( bean.getFDepartment() );
|
||||
tSupplierVO.setFEmployee( bean.getFEmployee() );
|
||||
tSupplierVO.setFCorperate( bean.getFCorperate() );
|
||||
tSupplierVO.setFBeginTradeDate( bean.getFBeginTradeDate() );
|
||||
tSupplierVO.setFEndTradeDate( bean.getFEndTradeDate() );
|
||||
tSupplierVO.setFLastTradeDate( bean.getFLastTradeDate() );
|
||||
tSupplierVO.setFLastReceiveDate( bean.getFLastReceiveDate() );
|
||||
tSupplierVO.setFCashDiscount( bean.getFCashDiscount() );
|
||||
tSupplierVO.setFCurrencyId( bean.getFCurrencyId() );
|
||||
tSupplierVO.setFMaxDealAmount( bean.getFMaxDealAmount() );
|
||||
tSupplierVO.setFMinForeReceiveRate( bean.getFMinForeReceiveRate() );
|
||||
tSupplierVO.setFMinReserveRate( bean.getFMinReserveRate() );
|
||||
tSupplierVO.setFMaxForePayAmount( bean.getFMaxForePayAmount() );
|
||||
tSupplierVO.setFMaxForePayRate( bean.getFMaxForePayRate() );
|
||||
tSupplierVO.setFDebtLevel( bean.getFDebtLevel() );
|
||||
tSupplierVO.setFCreditDays( bean.getFCreditDays() );
|
||||
tSupplierVO.setFValueAddRate( bean.getFValueAddRate() );
|
||||
tSupplierVO.setFPayTaxAcctId( bean.getFPayTaxAcctId() );
|
||||
tSupplierVO.setFDiscount( bean.getFDiscount() );
|
||||
tSupplierVO.setFTypeId( bean.getFTypeId() );
|
||||
tSupplierVO.setFCreditAmount( bean.getFCreditAmount() );
|
||||
tSupplierVO.setFCreditLevel( bean.getFCreditLevel() );
|
||||
tSupplierVO.setFStockIdAssignee( bean.getFStockIdAssignee() );
|
||||
tSupplierVO.setFBr( bean.getFBr() );
|
||||
tSupplierVO.setFRegmark( bean.getFRegmark() );
|
||||
tSupplierVO.setFLicAndPermit( bean.getFLicAndPermit() );
|
||||
tSupplierVO.setFLicence( bean.getFLicence() );
|
||||
tSupplierVO.setFPaperPeriod( bean.getFPaperPeriod() );
|
||||
tSupplierVO.setFAlarmPeriod( bean.getFAlarmPeriod() );
|
||||
tSupplierVO.setFOtherArAcctId( bean.getFOtherArAcctId() );
|
||||
tSupplierVO.setFOtherApAcctId( bean.getFOtherApAcctId() );
|
||||
tSupplierVO.setFPreArAcctId( bean.getFPreArAcctId() );
|
||||
tSupplierVO.setFHelpCode( bean.getFHelpCode() );
|
||||
tSupplierVO.setFModifyTime( bean.getFModifyTime() );
|
||||
tSupplierVO.setFCreditDegree( bean.getFCreditDegree() );
|
||||
tSupplierVO.setFRightUserId( bean.getFRightUserId() );
|
||||
tSupplierVO.setFPaymentTime( bean.getFPaymentTime() );
|
||||
tSupplierVO.setFSMSPhoneNumber( bean.getFSMSPhoneNumber() );
|
||||
tSupplierVO.setFFullName( bean.getFFullName() );
|
||||
|
||||
return tSupplierVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TSupplierVO> converts(List<TSupplier> beans) {
|
||||
if ( beans == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<TSupplierVO> list = new ArrayList<TSupplierVO>( beans.size() );
|
||||
for ( TSupplier tSupplier : beans ) {
|
||||
list.add( convert( tSupplier ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.lyr.gather.local.convert;
|
||||
|
||||
import com.lyr.gather.local.domain.model.ConfigTask;
|
||||
import com.lyr.gather.local.domain.vo.ConfigTaskPageVO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2024-11-06T10:37:36+0800",
|
||||
comments = "version: 1.6.2, compiler: javac, environment: Java 1.8.0_392 (Amazon.com Inc.)"
|
||||
)
|
||||
public class ConfigTaskConvertImpl implements ConfigTaskConvert {
|
||||
|
||||
@Override
|
||||
public ConfigTaskPageVO convertVO(ConfigTask configTask) {
|
||||
if ( configTask == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ConfigTaskPageVO configTaskPageVO = new ConfigTaskPageVO();
|
||||
|
||||
configTaskPageVO.setId( configTask.getId() );
|
||||
configTaskPageVO.setTableName( configTask.getTableName() );
|
||||
configTaskPageVO.setTableDescription( configTask.getTableDescription() );
|
||||
configTaskPageVO.setTableNote( configTask.getTableNote() );
|
||||
configTaskPageVO.setEnable( configTask.getEnable() );
|
||||
configTaskPageVO.setCron( configTask.getCron() );
|
||||
|
||||
return configTaskPageVO;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.lyr.gather.local.convert;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.lyr.gather.local.domain.DataSourceConfigDTO;
|
||||
import com.lyr.gather.local.domain.model.DataSourceConfig;
|
||||
import com.lyr.gather.local.domain.vo.DataSourceConfigNavVO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2024-11-06T10:37:36+0800",
|
||||
comments = "version: 1.6.2, compiler: javac, environment: Java 1.8.0_392 (Amazon.com Inc.)"
|
||||
)
|
||||
public class DataSourceConfigConvertImpl implements DataSourceConfigConvert {
|
||||
|
||||
@Override
|
||||
public DruidDataSource convert(DataSourceConfigDTO bean) {
|
||||
if ( bean == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
DruidDataSource druidDataSource = new DruidDataSource();
|
||||
|
||||
druidDataSource.setName( bean.getName() );
|
||||
druidDataSource.setUsername( bean.getUsername() );
|
||||
druidDataSource.setPassword( bean.getPassword() );
|
||||
|
||||
return druidDataSource;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceConfigNavVO convertVO(DataSourceConfig bean) {
|
||||
if ( bean == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
DataSourceConfigNavVO dataSourceConfigNavVO = new DataSourceConfigNavVO();
|
||||
|
||||
dataSourceConfigNavVO.setId( bean.getId() );
|
||||
dataSourceConfigNavVO.setAlias( bean.getAlias() );
|
||||
dataSourceConfigNavVO.setName( bean.getName() );
|
||||
dataSourceConfigNavVO.setDbType( bean.getDbType() );
|
||||
dataSourceConfigNavVO.setUrl( bean.getUrl() );
|
||||
dataSourceConfigNavVO.setUsername( bean.getUsername() );
|
||||
dataSourceConfigNavVO.setPassword( bean.getPassword() );
|
||||
dataSourceConfigNavVO.setDriverClassName( bean.getDriverClassName() );
|
||||
dataSourceConfigNavVO.setIsEnabled( bean.getIsEnabled() );
|
||||
|
||||
return dataSourceConfigNavVO;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue