Commit 446acf7e authored by frank.xa.zhang's avatar frank.xa.zhang

add invoice and voucher datasource manually --part2 ---not finished yet

parent 233eaf29
......@@ -122,7 +122,7 @@ public class FtpService {
if (StringUtils.isNotBlank(config.getFtpHost())) {
CloseableHttpClient client = HttpClients.createDefault();
HttpGet httpGet = new HttpGet(requestPrefix + config.getFtpHost() + ":8000/" + fileUrl);
HttpGet httpGet = new HttpGet(requestPrefix + config.getFtpHost() + ":1886/" + fileUrl);
CloseableHttpResponse response = null;
try {
response = client.execute(httpGet);
......
......@@ -59,7 +59,7 @@ public class TemplateGroupController {
if (pathList != null && pathList.size() > 0) {
for (String path : pathList) {
try {
ftpService.delete(path);
//ftpService.delete(path);
} catch (Exception e) {
}
}
......
......@@ -6,12 +6,12 @@ import java.util.List;
/** @see PwC.Tax.Tech.Atms.Application.Dto\TaxAdminDto\TemplateGroupDto.cs */
public class TemplateGroupDto {
private Long id;
private String id;
private String name;
private String serviceTypeId;
private Date updateTime;
private Date createTime;
private Long copyFrom;
private String copyFrom;
private String industryIds;
private Integer payTaxType;
private Integer groupType;
......@@ -19,11 +19,11 @@ public class TemplateGroupDto {
private List<TemplateFormulaDto> changedFormulas;
private List<String> sheetNameList;
public Long getId() {
public String getId() {
return id;
}
public void setId(Long iD) {
public void setId(String iD) {
id = iD;
}
......@@ -59,11 +59,11 @@ public class TemplateGroupDto {
this.createTime = createTime;
}
public Long getCopyFrom() {
public String getCopyFrom() {
return copyFrom;
}
public void setCopyFrom(Long copyFrom) {
public void setCopyFrom(String copyFrom) {
this.copyFrom = copyFrom;
}
......
......@@ -241,7 +241,8 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
sb.append(s).append(",");
}
String tempStr = sb.toString();
return tempStr.substring(0, tempStr.length() - 2);
return StringUtils.removeEnd(tempStr,",");
// return tempStr.substring(0, tempStr.length() - 2);
}
return null;
......
......@@ -94,9 +94,9 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
@Override
public OperationResultDto<Object> updateTemplateGroupName(TemplateGroupDto templateGroupDto) {
TemplateGroup entity = templateGroupMapper.selectByPrimaryKey(templateGroupDto.getId());
TemplateGroup entity = templateGroupMapper.selectByPrimaryKey(Long.parseLong(templateGroupDto.getId()));
TemplateGroupExample example = new TemplateGroupExample();
example.createCriteria().andNameEqualTo(templateGroupDto.getName()).andIdNotEqualTo(templateGroupDto.getId()).andServiceTypeIdEqualTo(entity.getServiceTypeId()).andIndustryIdsEqualTo(entity.getIndustryIds()).andPayTaxTypeEqualTo(entity.getPayTaxType());
example.createCriteria().andNameEqualTo(templateGroupDto.getName()).andIdNotEqualTo(Long.parseLong(templateGroupDto.getId())).andServiceTypeIdEqualTo(entity.getServiceTypeId()).andIndustryIdsEqualTo(entity.getIndustryIds()).andPayTaxTypeEqualTo(entity.getPayTaxType());
List<TemplateGroup> templateGroups = templateGroupMapper.selectByExample(example);
if (!templateGroups.isEmpty()) {
OperationResultDto<Object> result = new OperationResultDto<>();
......@@ -114,7 +114,7 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public OperationResultDto<Object> deleteTemplateGroup(TemplateGroupDto templateGroupDto) {
OperationResultDto<Object> result = new OperationResultDto<>();
TemplateGroup templateGroupDb = templateGroupMapper.selectByPrimaryKey(templateGroupDto.getId());
TemplateGroup templateGroupDb = templateGroupMapper.selectByPrimaryKey(Long.parseLong(templateGroupDto.getId()));
if (templateGroupDb.getIsSystemType()) {
result.setResult(false);
......@@ -122,7 +122,7 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
return result;
}
List<String> userOranizationNameList = organizationServiceTemplateGroupMapper.getOrgnizationServiceTemplateGroupOrgNames(templateGroupDto.getId());
List<String> userOranizationNameList = organizationServiceTemplateGroupMapper.getOrgnizationServiceTemplateGroupOrgNames(Long.parseLong(templateGroupDto.getId()));
if (userOranizationNameList != null && !userOranizationNameList.isEmpty()) {
result.setResult(false);
result.setResultMsg(TemplateGroupMessage.ORGANIZATION_USED_TEMPLATE_GROUP);
......@@ -382,7 +382,7 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
}
try {
String uid = authUserHelper.getCurrentUserID();
TemplateGroup templateGroup = templateGroupMapper.selectByPrimaryKey(templateGroupDto.getCopyFrom());
TemplateGroup templateGroup = templateGroupMapper.selectByPrimaryKey(Long.parseLong(templateGroupDto.getCopyFrom()));
Long newGroupID = distributedIDService.nextId();
Long groupID = templateGroup.getId();
Date now = new Date();
......
......@@ -328,9 +328,9 @@ WHERE
b.ID
FROM
KeyValueReference b
INNER JOIN CellTemplate c ON b.CellTemplateID = c.ID
INNER JOIN cell_template c ON b.CellTemplateID = c.ID
WHERE
c.ReportTemplateID = #{templateDbID,jdbcType=VARCHAR}
c.report_template_id = #{templateDbID,jdbcType=VARCHAR}
) x)
</delete>
<resultMap id="financialStatementDetail" type="pwc.taxtech.atms.dto.FinancialStatementDetail">
......
......@@ -293,7 +293,7 @@
m.organization_id = #{orgId}
order by m.service_type_id
</select>
<select id="getOrgnizationServiceTemplateGroupOrgNames" parameterType="java.lang.String" resultType="java.lang.String">
<select id="getOrgnizationServiceTemplateGroupOrgNames" parameterType="java.lang.Long" resultType="java.lang.String">
SELECT
q.Name
FROM
......
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