Commit 6b7e0730 authored by eddie.woo's avatar eddie.woo

modify

parent 5fb70b65
......@@ -456,6 +456,22 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webResources>
<resource>
<directory>lib/</directory>
<targetPath>WEB-INF/lib</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<!-- tomcat7的插件, 不同tomcat版本这个也不一样 -->
......
package pwc.taxtech.atms.common.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SystemConfig {
@Value("${longi_api_basic_user}")
private String longiApiBasicUser;
@Value("${longi_api_basic_pwd}")
private String longiApiBasicPwd;
@Value("${longi_api_gl_balance}")
private String longiApiGlBalance;
public String getLongiApiBasicUser() {
return this.longiApiBasicUser;
}
public void setLongiApiBasicUser(String longiApiBasicUser) {
this.longiApiBasicUser = longiApiBasicUser;
}
public String getLongiApiBasicPwd() {
return this.longiApiBasicPwd;
}
public void setLongiApiBasicPwd(String longiApiBasicPwd) {
this.longiApiBasicPwd = longiApiBasicPwd;
}
public String getLongiApiGlBalance() {
return this.longiApiGlBalance;
}
public void setLongiApiGlBalance(String longiApiGlBalance) {
this.longiApiGlBalance = longiApiGlBalance;
}
}
......@@ -45,17 +45,7 @@ public class LgGlBalanceJob extends QuartzJobBean {
}
for (Organization organization : orgList) {
try {
//查找mapping
EnterpriseAccountSetOrgExample setOrgExample = new EnterpriseAccountSetOrgExample();
setOrgExample.createCriteria().andOrganizationIdEqualTo(organization.getId());
EnterpriseAccountSetOrg accountSetOrg = setOrgMapper.selectByExample(setOrgExample).get(0);
//查找企业账套
EnterpriseAccountExample accountExample = new EnterpriseAccountExample();
accountExample.createCriteria().andEnterpriseAccountSetIdEqualTo(accountSetOrg.getEnterpriseAccountSetId());
List<EnterpriseAccount> accountList = accountMapper.selectByExample(accountExample);
for (EnterpriseAccount account : accountList) {
}
} catch (Exception e) {
LOGGER.error("LgGlBalanceJob error. Organization: " + organization.getId(), e);
}
......
package pwc.taxtech.atms.dto;
import pwc.taxtech.atms.vat.entity.GlBalance;
public class GlBalanceDto extends GlBalance {
private String accountName;
public String getAccountName() {
return this.accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
}
package pwc.taxtech.atms.service.impl;
import cn.pwc.soap.client.GLBalanceClient;
import cn.pwc.soap.client.common.BasicUser;
import cn.pwc.soap.client.domain.GLBalanceDto;
import cn.pwc.soap.client.domain.GlBalanceParam;
import cn.pwc.soap.client.domain.SoapResponse;
import com.alibaba.fastjson.JSON;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.ServiceException;
import pwc.taxtech.atms.common.config.SystemConfig;
import pwc.taxtech.atms.dao.EnterpriseAccountMapper;
import pwc.taxtech.atms.dao.EnterpriseAccountSetOrgMapper;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.vat.dao.GlBalanceMapper;
import pwc.taxtech.atms.vat.entity.GlBalance;
import pwc.taxtech.atms.vat.entity.GlBalanceExample;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class LgGlBalanceService extends BaseService {
@Resource
private SystemConfig systemConfig;
@Resource(name = "enterpriseAccountMapper")
private EnterpriseAccountMapper accountMapper;
@Resource(name = "enterpriseAccountSetOrgMapper")
private EnterpriseAccountSetOrgMapper setOrgMapper;
@Resource
private GlBalanceMapper glBalanceMapper;
/**
* 科目余额数据同步
*
* @param org Organization
* @param period YYYY-MM
* @throws ServiceException ex
*/
public void queryGlBalance(Organization org, String period) throws ServiceException {
if (StringUtils.isBlank(systemConfig.getLongiApiGlBalance())) {
throw new ServiceException("EmptyUrlError");
}
//查找mapping
EnterpriseAccountSetOrgExample setOrgExample = new EnterpriseAccountSetOrgExample();
setOrgExample.createCriteria().andOrganizationIdEqualTo(org.getId());
EnterpriseAccountSetOrg accountSetOrg = setOrgMapper.selectByExample(setOrgExample).get(0);
//查找企业账套
EnterpriseAccountExample accountExample = new EnterpriseAccountExample();
accountExample.createCriteria().andEnterpriseAccountSetIdEqualTo(accountSetOrg.getEnterpriseAccountSetId());
List<EnterpriseAccount> accountList = accountMapper.selectByExample(accountExample);
for (EnterpriseAccount account : accountList) {
SoapResponse<List<GLBalanceDto>> response = GLBalanceClient.queryGLBalance(systemConfig.getLongiApiGlBalance(),
new GlBalanceParam(org.getClientCode(), period, account.getCode()),
StringUtils.isAnyBlank(systemConfig.getLongiApiBasicUser(), systemConfig.getLongiApiBasicPwd()) ?
null : new BasicUser(systemConfig.getLongiApiBasicUser(), systemConfig.getLongiApiBasicPwd()));
if (response.getStatus() != SoapResponse.SUCCESS) {
logger.error("queryGLBalance error." + JSON.toJSONString(response));
throw new ServiceException("ErrorResponse");
}
//分组去重,重复的取第一个元素
response.getData().stream().collect(Collectors.groupingBy(o -> StringUtils.joinWith("_",
o.getSegment1(), o.getSegment3(), o.getSegment4()))).values().forEach(list -> {
GlBalance glBalance = new GlBalance();
beanUtil.copyProperties(list.get(0), glBalance);
GlBalanceExample example = new GlBalanceExample();
example.createCriteria().andSegment1EqualTo(glBalance.getSegment1()).andSegment3EqualTo(glBalance.getSegment3())
.andSegment4EqualTo(glBalance.getSegment4()).andPeriodNameEqualTo(glBalance.getPeriodName());
List<GlBalance> tmpList;
if ((tmpList = glBalanceMapper.selectByExample(example)).size() > 0) {
glBalance.setId(tmpList.get(0).getId());
glBalanceMapper.updateByPrimaryKeySelective(glBalance);
} else {
glBalance.setId(idService.nextId());
glBalanceMapper.insertSelective(glBalance);
}
});
}
}
}
......@@ -32,4 +32,9 @@ max_file_length=${max_file_length}
distributed_id_datacenter=${distributed_id_datacenter}
distributed_id_machine=${distributed_id_machine}
api.url=${api.url}
\ No newline at end of file
api.url=${api.url}
# Longi config
longi_api_basic_user=${longi_api_basic_user}
longi_api_basic_pwd=${longi_api_basic_pwd}
longi_api_gl_balance=${longi_api_gl_balance}
\ No newline at end of file
......@@ -40,3 +40,8 @@ distributed_id_datacenter=1
distributed_id_machine=1
api.url=http://etms.longi-silicon.com:8180
# Longi config
longi_api_basic_user=
longi_api_basic_pwd=
longi_api_gl_balance=http://39.105.197.175:13000/ETMSSB/Erp/GLBalance/ProxyServices/ErpQueryGLBalanceSoapProxy?wsdl
......@@ -34,3 +34,8 @@ distributed_id_datacenter=10
distributed_id_machine=10
api.url=http://etms.longi-silicon.com:8182
# Longi config
longi_api_basic_user=
longi_api_basic_pwd=
longi_api_gl_balance=http://39.105.197.175:13000/ETMSSB/Erp/GLBalance/ProxyServices/ErpQueryGLBalanceSoapProxy?wsdl
......@@ -9,7 +9,7 @@
<property name="beginningDelimiter" value="&quot;"/>
<property name="endingDelimiter" value="&quot;"/>
<property name="javaFileEncoding" value="UTF-8" />
<!--<plugin type="cn.pwc.demo.util.MapperAnnotationPlugin" />-->
<!--<plugin type="pwc.taxtech.atms.plugin.MapperAnnotationPlugin" />-->
<plugin type="org.mybatis.generator.plugins.MapperAnnotationPlugin"/>
<!--<plugin type="org.mybatis.generator.plugins.RowBoundsPlugin" />-->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin" />
......@@ -234,7 +234,7 @@
<!--<columnOverride column="PERIOD" javaType="java.lang.Integer" />-->
<!--</table>-->
<table tableName="GL_BALANCE" schema="tax_admin" domainObjectName="GlBalance">
<table tableName="GL_BALANCE" schema="tax_admin_longi" domainObjectName="GlBalance">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="ID" javaType="java.lang.Long" />
......
......@@ -40,6 +40,10 @@
<artifactId>jackson-databind</artifactId>
<version>2.9.4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core -->
<dependency>
......
......@@ -3,6 +3,7 @@ package pwc.taxtech.atms.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.EnterpriseAccountDto;
import pwc.taxtech.atms.entity.EnterpriseAccount;
......@@ -11,6 +12,7 @@ import pwc.taxtech.atms.entity.EnterpriseAccountExample;
import java.util.List;
@Mapper
@Repository
public interface EnterpriseAccountMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
......
......@@ -3,6 +3,7 @@ package pwc.taxtech.atms.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.EnterpriseAccountSetOrgDto;
import pwc.taxtech.atms.entity.EnterpriseAccountSetOrg;
......@@ -11,6 +12,7 @@ import pwc.taxtech.atms.entity.EnterpriseAccountSetOrgExample;
import java.util.List;
@Mapper
@Repository
public interface EnterpriseAccountSetOrgMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
......
......@@ -4,6 +4,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.DimensionValueOrgDto;
import pwc.taxtech.atms.dpo.OrgBasicDto;
......@@ -15,6 +16,7 @@ import pwc.taxtech.atms.entity.OrganizationExample;
import java.util.List;
@Mapper
@Repository
public interface OrganizationMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
......
......@@ -11,7 +11,7 @@ import pwc.taxtech.atms.vat.entity.GlBalanceExample;
public interface GlBalanceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -19,7 +19,7 @@ public interface GlBalanceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -27,7 +27,15 @@ public interface GlBalanceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -35,7 +43,7 @@ public interface GlBalanceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -43,7 +51,7 @@ public interface GlBalanceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -51,7 +59,15 @@ public interface GlBalanceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
GlBalance selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -59,9 +75,25 @@ public interface GlBalanceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
int updateByExample(@Param("record") GlBalance record, @Param("example") GlBalanceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(GlBalance record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
int updateByPrimaryKey(GlBalance record);
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ import java.util.List;
public class GlBalanceExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.GL_BALANCE
* This field corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -15,7 +15,7 @@ public class GlBalanceExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.GL_BALANCE
* This field corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -23,7 +23,7 @@ public class GlBalanceExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.GL_BALANCE
* This field corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -31,7 +31,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -41,7 +41,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -51,7 +51,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -61,7 +61,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -71,7 +71,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -81,7 +81,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -91,7 +91,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -101,7 +101,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -113,7 +113,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -127,7 +127,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -138,7 +138,7 @@ public class GlBalanceExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
* This method corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -150,7 +150,7 @@ public class GlBalanceExample {
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.GL_BALANCE
* This class corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......@@ -1918,7 +1918,7 @@ public class GlBalanceExample {
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.GL_BALANCE
* This class corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated do_not_delete_during_merge
*/
......@@ -1931,7 +1931,7 @@ public class GlBalanceExample {
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.GL_BALANCE
* This class corresponds to the database table TAX_ADMIN_LONGI.GL_BALANCE
*
* @mbg.generated
*/
......
......@@ -6,7 +6,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="ID" jdbcType="DECIMAL" property="id" />
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CODE_COMBINATION_ID" jdbcType="DECIMAL" property="codeCombinationId" />
<result column="CODE_COMBINATION_CODE" jdbcType="VARCHAR" property="codeCombinationCode" />
<result column="CODE_COMBINATION_DESCRIPTION" jdbcType="VARCHAR" property="codeCombinationDescription" />
......@@ -127,6 +127,24 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from GL_BALANCE
where ID = #{id,jdbcType=DECIMAL}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from GL_BALANCE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.GlBalanceExample">
<!--
WARNING - @mbg.generated
......@@ -466,4 +484,122 @@
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.GlBalance">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update GL_BALANCE
<set>
<if test="codeCombinationId != null">
CODE_COMBINATION_ID = #{codeCombinationId,jdbcType=DECIMAL},
</if>
<if test="codeCombinationCode != null">
CODE_COMBINATION_CODE = #{codeCombinationCode,jdbcType=VARCHAR},
</if>
<if test="codeCombinationDescription != null">
CODE_COMBINATION_DESCRIPTION = #{codeCombinationDescription,jdbcType=VARCHAR},
</if>
<if test="attribute12 != null">
ATTRIBUTE12 = #{attribute12,jdbcType=VARCHAR},
</if>
<if test="segment1 != null">
SEGMENT1 = #{segment1,jdbcType=VARCHAR},
</if>
<if test="segment2 != null">
SEGMENT2 = #{segment2,jdbcType=VARCHAR},
</if>
<if test="segment3 != null">
SEGMENT3 = #{segment3,jdbcType=VARCHAR},
</if>
<if test="segment4 != null">
SEGMENT4 = #{segment4,jdbcType=VARCHAR},
</if>
<if test="segment5 != null">
SEGMENT5 = #{segment5,jdbcType=VARCHAR},
</if>
<if test="segment6 != null">
SEGMENT6 = #{segment6,jdbcType=VARCHAR},
</if>
<if test="segment7 != null">
SEGMENT7 = #{segment7,jdbcType=VARCHAR},
</if>
<if test="periodName != null">
PERIOD_NAME = #{periodName,jdbcType=VARCHAR},
</if>
<if test="beginDrBalance != null">
BEGIN_DR_BALANCE = #{beginDrBalance,jdbcType=DECIMAL},
</if>
<if test="beginCrBalance != null">
BEGIN_CR_BALANCE = #{beginCrBalance,jdbcType=DECIMAL},
</if>
<if test="ptdDr != null">
PTD_DR = #{ptdDr,jdbcType=DECIMAL},
</if>
<if test="ptdCr != null">
PTD_CR = #{ptdCr,jdbcType=DECIMAL},
</if>
<if test="ytdDr != null">
YTD_DR = #{ytdDr,jdbcType=DECIMAL},
</if>
<if test="ytdCr != null">
YTD_CR = #{ytdCr,jdbcType=DECIMAL},
</if>
<if test="endDrBalance != null">
END_DR_BALANCE = #{endDrBalance,jdbcType=DECIMAL},
</if>
<if test="endCrBalance != null">
END_CR_BALANCE = #{endCrBalance,jdbcType=DECIMAL},
</if>
<if test="attr1 != null">
ATTR1 = #{attr1,jdbcType=VARCHAR},
</if>
<if test="attr2 != null">
ATTR2 = #{attr2,jdbcType=VARCHAR},
</if>
<if test="attr3 != null">
ATTR3 = #{attr3,jdbcType=VARCHAR},
</if>
<if test="attr4 != null">
ATTR4 = #{attr4,jdbcType=VARCHAR},
</if>
<if test="attr5 != null">
ATTR5 = #{attr5,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=DECIMAL}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.GlBalance">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update GL_BALANCE
set CODE_COMBINATION_ID = #{codeCombinationId,jdbcType=DECIMAL},
CODE_COMBINATION_CODE = #{codeCombinationCode,jdbcType=VARCHAR},
CODE_COMBINATION_DESCRIPTION = #{codeCombinationDescription,jdbcType=VARCHAR},
ATTRIBUTE12 = #{attribute12,jdbcType=VARCHAR},
SEGMENT1 = #{segment1,jdbcType=VARCHAR},
SEGMENT2 = #{segment2,jdbcType=VARCHAR},
SEGMENT3 = #{segment3,jdbcType=VARCHAR},
SEGMENT4 = #{segment4,jdbcType=VARCHAR},
SEGMENT5 = #{segment5,jdbcType=VARCHAR},
SEGMENT6 = #{segment6,jdbcType=VARCHAR},
SEGMENT7 = #{segment7,jdbcType=VARCHAR},
PERIOD_NAME = #{periodName,jdbcType=VARCHAR},
BEGIN_DR_BALANCE = #{beginDrBalance,jdbcType=DECIMAL},
BEGIN_CR_BALANCE = #{beginCrBalance,jdbcType=DECIMAL},
PTD_DR = #{ptdDr,jdbcType=DECIMAL},
PTD_CR = #{ptdCr,jdbcType=DECIMAL},
YTD_DR = #{ytdDr,jdbcType=DECIMAL},
YTD_CR = #{ytdCr,jdbcType=DECIMAL},
END_DR_BALANCE = #{endDrBalance,jdbcType=DECIMAL},
END_CR_BALANCE = #{endCrBalance,jdbcType=DECIMAL},
ATTR1 = #{attr1,jdbcType=VARCHAR},
ATTR2 = #{attr2,jdbcType=VARCHAR},
ATTR3 = #{attr3,jdbcType=VARCHAR},
ATTR4 = #{attr4,jdbcType=VARCHAR},
ATTR5 = #{attr5,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
</mapper>
\ No newline at end of file
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