Commit d62b1024 authored by frank.xa.zhang's avatar frank.xa.zhang

Merge branch 'dev_eddie' into dev_frank

parents b16be625 a10fa2f6
This diff is collapsed.
package pwc.taxtech.atms.controller;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.service.FormulaService;
@RestController
@RequestMapping("/api/v1/formula")
public class FormulaController extends BaseController {
@Autowired
FormulaService formulaService;
@ResponseBody
@ApiOperation(value = "")
@RequestMapping(value = "get", method = RequestMethod.GET)
public OperationResultDto getAllFormulaList() {
try {
return OperationResultDto.success(formulaService.getAllFormulaList());
} catch (Exception e) {
logger.error("getAllFormulaList error.", e);
}
return OperationResultDto.error();
}
@ResponseBody
@ApiOperation(value = "")
@RequestMapping(value = "param/get", method = RequestMethod.GET)
public OperationResultDto getAllFormulaConfigList() {
try {
return OperationResultDto.success(formulaService.getAllFormulaParamList());
} catch (Exception e) {
logger.error("getAllFormulaConfigList error.", e);
}
return OperationResultDto.error();
}
@ResponseBody
@ApiOperation(value = "")
@RequestMapping(value = "parammapping/get", method = RequestMethod.GET)
public OperationResultDto getAllFormulaParamMappingList() {
try {
return OperationResultDto.success(formulaService.getAllFormulaParamMappingList());
} catch (Exception e) {
logger.error("getAllFormulaParamMappingList error.", e);
}
return OperationResultDto.error();
}
}
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entitiy.FormulaConfig;
import pwc.taxtech.atms.entitiy.FormulaConfigExample;
@Mapper
public interface FormulaConfigMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
long countByExample(FormulaConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
int deleteByExample(FormulaConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
int deleteByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
int insert(FormulaConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
int insertSelective(FormulaConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
List<FormulaConfig> selectByExampleWithRowbounds(FormulaConfigExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
List<FormulaConfig> selectByExample(FormulaConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
FormulaConfig selectByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") FormulaConfig record, @Param("example") FormulaConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
int updateByExample(@Param("record") FormulaConfig record, @Param("example") FormulaConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(FormulaConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaConfig
*
* @mbg.generated
*/
int updateByPrimaryKey(FormulaConfig record);
}
\ No newline at end of file
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entitiy.FormulaParamConfig;
import pwc.taxtech.atms.entitiy.FormulaParamConfigExample;
@Mapper
public interface FormulaParamConfigMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
long countByExample(FormulaParamConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
int deleteByExample(FormulaParamConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
int deleteByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
int insert(FormulaParamConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
int insertSelective(FormulaParamConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
List<FormulaParamConfig> selectByExampleWithRowbounds(FormulaParamConfigExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
List<FormulaParamConfig> selectByExample(FormulaParamConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
FormulaParamConfig selectByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") FormulaParamConfig record, @Param("example") FormulaParamConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
int updateByExample(@Param("record") FormulaParamConfig record, @Param("example") FormulaParamConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(FormulaParamConfig record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
int updateByPrimaryKey(FormulaParamConfig record);
}
\ No newline at end of file
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entitiy.FormulaParamMapping;
import pwc.taxtech.atms.entitiy.FormulaParamMappingExample;
@Mapper
public interface FormulaParamMappingMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
long countByExample(FormulaParamMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
int deleteByExample(FormulaParamMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
int deleteByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
int insert(FormulaParamMapping record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
int insertSelective(FormulaParamMapping record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
List<FormulaParamMapping> selectByExampleWithRowbounds(FormulaParamMappingExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
List<FormulaParamMapping> selectByExample(FormulaParamMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
FormulaParamMapping selectByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") FormulaParamMapping record, @Param("example") FormulaParamMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
int updateByExample(@Param("record") FormulaParamMapping record, @Param("example") FormulaParamMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(FormulaParamMapping record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
int updateByPrimaryKey(FormulaParamMapping record);
}
\ No newline at end of file
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entitiy.FormulaParamOption;
import pwc.taxtech.atms.entitiy.FormulaParamOptionExample;
@Mapper
public interface FormulaParamOptionMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
long countByExample(FormulaParamOptionExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
int deleteByExample(FormulaParamOptionExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
int deleteByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
int insert(FormulaParamOption record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
int insertSelective(FormulaParamOption record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
List<FormulaParamOption> selectByExampleWithRowbounds(FormulaParamOptionExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
List<FormulaParamOption> selectByExample(FormulaParamOptionExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
FormulaParamOption selectByPrimaryKey(String ID);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") FormulaParamOption record, @Param("example") FormulaParamOptionExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
int updateByExample(@Param("record") FormulaParamOption record, @Param("example") FormulaParamOptionExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(FormulaParamOption record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
int updateByPrimaryKey(FormulaParamOption record);
}
\ No newline at end of file
package pwc.taxtech.atms.dao.dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.FormulaConfigMapper;
import pwc.taxtech.atms.entitiy.FormulaConfig;
import pwc.taxtech.atms.entitiy.FormulaConfigExample;
import java.util.List;
@Service
public class FormulaConfigDao {
@Autowired
FormulaConfigMapper mapper;
public List<FormulaConfig> getAll() {
FormulaConfigExample example = new FormulaConfigExample();
return mapper.selectByExample(example);
}
}
package pwc.taxtech.atms.dao.dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.FormulaParamConfigMapper;
import pwc.taxtech.atms.entitiy.FormulaParamConfig;
import pwc.taxtech.atms.entitiy.FormulaParamConfigExample;
import java.util.List;
@Service
public class FormulaParamConfigDao {
@Autowired
FormulaParamConfigMapper mapper;
public List<FormulaParamConfig> getAll() {
FormulaParamConfigExample example = new FormulaParamConfigExample();
return mapper.selectByExample(example);
}
}
package pwc.taxtech.atms.dao.dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.FormulaParamMappingMapper;
import pwc.taxtech.atms.entitiy.FormulaParamMapping;
import pwc.taxtech.atms.entitiy.FormulaParamMappingExample;
import java.util.List;
@Service
public class FormulaParamMappingDao {
@Autowired
FormulaParamMappingMapper mapper;
public List<FormulaParamMapping> getAll() {
FormulaParamMappingExample example = new FormulaParamMappingExample();
return mapper.selectByExample(example);
}
}
package pwc.taxtech.atms.dao.dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.FormulaParamOptionMapper;
import pwc.taxtech.atms.entitiy.FormulaParamOption;
import pwc.taxtech.atms.entitiy.FormulaParamOptionExample;
import java.util.List;
@Service
public class FormulaParamOptionDao {
@Autowired
FormulaParamOptionMapper mapper;
public List<FormulaParamOption> getAll() {
FormulaParamOptionExample example = new FormulaParamOptionExample();
return mapper.selectByExample(example);
}
}
package pwc.taxtech.atms.dto.formula;
import java.util.List;
public class FormulaParamConfigDto {
public String ID;
public String name;
public String displayFormat;
public int paramType;
public int paramDataType;
public List<FormulaParamOptionDto> options;
public String getID() {
return ID;
}
public void setID(String ID) {
this.ID = ID;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDisplayFormat() {
return displayFormat;
}
public void setDisplayFormat(String displayFormat) {
this.displayFormat = displayFormat;
}
public int getParamType() {
return paramType;
}
public void setParamType(int paramType) {
this.paramType = paramType;
}
public int getParamDataType() {
return paramDataType;
}
public void setParamDataType(int paramDataType) {
this.paramDataType = paramDataType;
}
public List<FormulaParamOptionDto> getOptions() {
return options;
}
public void setOptions(List<FormulaParamOptionDto> options) {
this.options = options;
}
}
package pwc.taxtech.atms.dto.formula;
public class FormulaParamMappingDto {
public String ID;
public String formulaID;
public String formulaParamID;
public int paramIndex;
public String getID() {
return ID;
}
public void setID(String ID) {
this.ID = ID;
}
public String getFormulaID() {
return formulaID;
}
public void setFormulaID(String formulaID) {
this.formulaID = formulaID;
}
public String getFormulaParamID() {
return formulaParamID;
}
public void setFormulaParamID(String formulaParamID) {
this.formulaParamID = formulaParamID;
}
public int getParamIndex() {
return paramIndex;
}
public void setParamIndex(int paramIndex) {
this.paramIndex = paramIndex;
}
}
package pwc.taxtech.atms.dto.formula;
public class FormulaParamOptionDto {
public String ID;
public String formulaParamID;
public String value;
public String name;
public String shortName;
public int optionIndex;
public String getID() {
return ID;
}
public void setID(String ID) {
this.ID = ID;
}
public String getFormulaParamID() {
return formulaParamID;
}
public void setFormulaParamID(String formulaParamID) {
this.formulaParamID = formulaParamID;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public int getOptionIndex() {
return optionIndex;
}
public void setOptionIndex(int optionIndex) {
this.optionIndex = optionIndex;
}
}
package pwc.taxtech.atms.entitiy;
import java.io.Serializable;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table FormulaParamConfig
*
* @mbg.generated do_not_delete_during_merge
*/
public class FormulaParamConfig implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamConfig.ID
*
* @mbg.generated
*/
private String ID;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamConfig.Name
*
* @mbg.generated
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamConfig.DisplayFormat
*
* @mbg.generated
*/
private String displayFormat;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamConfig.ParamType
*
* @mbg.generated
*/
private Integer paramType;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamConfig.ParamDataType
*
* @mbg.generated
*/
private Integer paramDataType;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamConfig.ID
*
* @return the value of FormulaParamConfig.ID
*
* @mbg.generated
*/
public String getID() {
return ID;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamConfig.ID
*
* @param ID the value for FormulaParamConfig.ID
*
* @mbg.generated
*/
public void setID(String ID) {
this.ID = ID == null ? null : ID.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamConfig.Name
*
* @return the value of FormulaParamConfig.Name
*
* @mbg.generated
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamConfig.Name
*
* @param name the value for FormulaParamConfig.Name
*
* @mbg.generated
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamConfig.DisplayFormat
*
* @return the value of FormulaParamConfig.DisplayFormat
*
* @mbg.generated
*/
public String getDisplayFormat() {
return displayFormat;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamConfig.DisplayFormat
*
* @param displayFormat the value for FormulaParamConfig.DisplayFormat
*
* @mbg.generated
*/
public void setDisplayFormat(String displayFormat) {
this.displayFormat = displayFormat == null ? null : displayFormat.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamConfig.ParamType
*
* @return the value of FormulaParamConfig.ParamType
*
* @mbg.generated
*/
public Integer getParamType() {
return paramType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamConfig.ParamType
*
* @param paramType the value for FormulaParamConfig.ParamType
*
* @mbg.generated
*/
public void setParamType(Integer paramType) {
this.paramType = paramType;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamConfig.ParamDataType
*
* @return the value of FormulaParamConfig.ParamDataType
*
* @mbg.generated
*/
public Integer getParamDataType() {
return paramDataType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamConfig.ParamDataType
*
* @param paramDataType the value for FormulaParamConfig.ParamDataType
*
* @mbg.generated
*/
public void setParamDataType(Integer paramDataType) {
this.paramDataType = paramDataType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamConfig
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", ID=").append(ID);
sb.append(", name=").append(name);
sb.append(", displayFormat=").append(displayFormat);
sb.append(", paramType=").append(paramType);
sb.append(", paramDataType=").append(paramDataType);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.entitiy;
import java.io.Serializable;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table FormulaParamMapping
*
* @mbg.generated do_not_delete_during_merge
*/
public class FormulaParamMapping implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamMapping.ID
*
* @mbg.generated
*/
private String ID;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamMapping.FormulaID
*
* @mbg.generated
*/
private String formulaID;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamMapping.FormulaParamID
*
* @mbg.generated
*/
private String formulaParamID;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamMapping.ParamIndex
*
* @mbg.generated
*/
private Integer paramIndex;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamMapping.ID
*
* @return the value of FormulaParamMapping.ID
*
* @mbg.generated
*/
public String getID() {
return ID;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamMapping.ID
*
* @param ID the value for FormulaParamMapping.ID
*
* @mbg.generated
*/
public void setID(String ID) {
this.ID = ID == null ? null : ID.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamMapping.FormulaID
*
* @return the value of FormulaParamMapping.FormulaID
*
* @mbg.generated
*/
public String getFormulaID() {
return formulaID;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamMapping.FormulaID
*
* @param formulaID the value for FormulaParamMapping.FormulaID
*
* @mbg.generated
*/
public void setFormulaID(String formulaID) {
this.formulaID = formulaID == null ? null : formulaID.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamMapping.FormulaParamID
*
* @return the value of FormulaParamMapping.FormulaParamID
*
* @mbg.generated
*/
public String getFormulaParamID() {
return formulaParamID;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamMapping.FormulaParamID
*
* @param formulaParamID the value for FormulaParamMapping.FormulaParamID
*
* @mbg.generated
*/
public void setFormulaParamID(String formulaParamID) {
this.formulaParamID = formulaParamID == null ? null : formulaParamID.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamMapping.ParamIndex
*
* @return the value of FormulaParamMapping.ParamIndex
*
* @mbg.generated
*/
public Integer getParamIndex() {
return paramIndex;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamMapping.ParamIndex
*
* @param paramIndex the value for FormulaParamMapping.ParamIndex
*
* @mbg.generated
*/
public void setParamIndex(Integer paramIndex) {
this.paramIndex = paramIndex;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamMapping
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", ID=").append(ID);
sb.append(", formulaID=").append(formulaID);
sb.append(", formulaParamID=").append(formulaParamID);
sb.append(", paramIndex=").append(paramIndex);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.entitiy;
import java.io.Serializable;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table FormulaParamOption
*
* @mbg.generated do_not_delete_during_merge
*/
public class FormulaParamOption implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamOption.ID
*
* @mbg.generated
*/
private String ID;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamOption.FormulaParamID
*
* @mbg.generated
*/
private String formulaParamID;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamOption.Value
*
* @mbg.generated
*/
private String value;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamOption.Name
*
* @mbg.generated
*/
private String name;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamOption.ShortName
*
* @mbg.generated
*/
private String shortName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column FormulaParamOption.OptionIndex
*
* @mbg.generated
*/
private Integer optionIndex;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamOption.ID
*
* @return the value of FormulaParamOption.ID
*
* @mbg.generated
*/
public String getID() {
return ID;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamOption.ID
*
* @param ID the value for FormulaParamOption.ID
*
* @mbg.generated
*/
public void setID(String ID) {
this.ID = ID == null ? null : ID.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamOption.FormulaParamID
*
* @return the value of FormulaParamOption.FormulaParamID
*
* @mbg.generated
*/
public String getFormulaParamID() {
return formulaParamID;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamOption.FormulaParamID
*
* @param formulaParamID the value for FormulaParamOption.FormulaParamID
*
* @mbg.generated
*/
public void setFormulaParamID(String formulaParamID) {
this.formulaParamID = formulaParamID == null ? null : formulaParamID.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamOption.Value
*
* @return the value of FormulaParamOption.Value
*
* @mbg.generated
*/
public String getValue() {
return value;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamOption.Value
*
* @param value the value for FormulaParamOption.Value
*
* @mbg.generated
*/
public void setValue(String value) {
this.value = value == null ? null : value.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamOption.Name
*
* @return the value of FormulaParamOption.Name
*
* @mbg.generated
*/
public String getName() {
return name;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamOption.Name
*
* @param name the value for FormulaParamOption.Name
*
* @mbg.generated
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamOption.ShortName
*
* @return the value of FormulaParamOption.ShortName
*
* @mbg.generated
*/
public String getShortName() {
return shortName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamOption.ShortName
*
* @param shortName the value for FormulaParamOption.ShortName
*
* @mbg.generated
*/
public void setShortName(String shortName) {
this.shortName = shortName == null ? null : shortName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column FormulaParamOption.OptionIndex
*
* @return the value of FormulaParamOption.OptionIndex
*
* @mbg.generated
*/
public Integer getOptionIndex() {
return optionIndex;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column FormulaParamOption.OptionIndex
*
* @param optionIndex the value for FormulaParamOption.OptionIndex
*
* @mbg.generated
*/
public void setOptionIndex(Integer optionIndex) {
this.optionIndex = optionIndex;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table FormulaParamOption
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", ID=").append(ID);
sb.append(", formulaParamID=").append(formulaParamID);
sb.append(", value=").append(value);
sb.append(", name=").append(name);
sb.append(", shortName=").append(shortName);
sb.append(", optionIndex=").append(optionIndex);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.formula.FormulaParamConfigDto;
import pwc.taxtech.atms.dto.formula.FormulaParamMappingDto;
import pwc.taxtech.atms.entitiy.FormulaConfig;
import java.util.List;
public interface FormulaService {
List<FormulaConfig> getAllFormulaList();
List<FormulaParamConfigDto> getAllFormulaParamList();
List<FormulaParamMappingDto> getAllFormulaParamMappingList();
}
package pwc.taxtech.atms.service.impl;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.dao.dao.FormulaConfigDao;
import pwc.taxtech.atms.dao.dao.FormulaParamConfigDao;
import pwc.taxtech.atms.dao.dao.FormulaParamMappingDao;
import pwc.taxtech.atms.dao.dao.FormulaParamOptionDao;
import pwc.taxtech.atms.dto.formula.FormulaParamConfigDto;
import pwc.taxtech.atms.dto.formula.FormulaParamMappingDto;
import pwc.taxtech.atms.dto.formula.FormulaParamOptionDto;
import pwc.taxtech.atms.entitiy.FormulaConfig;
import pwc.taxtech.atms.entitiy.FormulaParamConfig;
import pwc.taxtech.atms.entitiy.FormulaParamMapping;
import pwc.taxtech.atms.entitiy.FormulaParamOption;
import pwc.taxtech.atms.service.FormulaService;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@Service
public class FormulaServiceImpl extends BaseService implements FormulaService {
@Autowired
FormulaConfigDao formulaConfigDao;
@Autowired
FormulaParamOptionDao formulaParamOptionDao;
@Autowired
FormulaParamConfigDao paramConfigDao;
@Autowired
FormulaParamMappingDao paramMappingDao;
@Override
public List<FormulaConfig> getAllFormulaList() {
return formulaConfigDao.getAll();
}
@Override
public List<FormulaParamConfigDto> getAllFormulaParamList() {
List<FormulaParamOption> paramOpts = formulaParamOptionDao.getAll();
List<FormulaParamOptionDto> paramOptions = paramOpts.stream().map(x -> {
FormulaParamOptionDto dto = new FormulaParamOptionDto();
return CommonUtils.copyProperties(x, dto);
}).collect(Collectors.toList());
List<FormulaParamConfig> paramCfg = paramConfigDao.getAll();
List<FormulaParamConfigDto> list = paramCfg.stream().map(x -> {
FormulaParamConfigDto dto = new FormulaParamConfigDto();
return CommonUtils.copyProperties(x, dto);
}).collect(Collectors.toList());
Set<String> optionFormulaIDs = paramOptions.stream().map(FormulaParamOptionDto::getFormulaParamID).collect(Collectors.toSet());
list.forEach(x -> {
x.setOptions(Lists.newArrayList());
if (optionFormulaIDs.contains(x.getID())) {
x.getOptions().addAll(paramOptions.stream().filter(y -> StringUtils.equals(y.getFormulaParamID(),
x.getID())).collect(Collectors.toList()));
}
});
return list;
}
@Override
public List<FormulaParamMappingDto> getAllFormulaParamMappingList() {
List<FormulaParamMapping> paramMap = paramMappingDao.getAll();
return paramMap.stream().map(x -> {
FormulaParamMappingDto dto = new FormulaParamMappingDto();
return CommonUtils.copyProperties(x, dto);
}).collect(Collectors.toList());
}
}
......@@ -106,7 +106,7 @@ public class StdAccountServiceImpl extends BaseService implements StdAccountServ
StandardAccountExample example = new StandardAccountExample();
example.createCriteria().andRuleTypeEqualTo((int)StandAccountConstant.TWO).andIsActiveEqualTo(ActiveStatus.Active).andIndustryIDEqualTo(industryID);
example.setOrderByClause("order by code");
example.setOrderByClause("Code");
List<StandardAccount> items = standardAccountMapper.selectByExample(example);
List<StandardAccountDto> dtos = new ArrayList<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment