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