Commit c2921303 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle' of http://code.tech.tax.asia.pwcinternal.com/root/atms…

Merge branch 'dev_oracle' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_oracle_sherlock
parents 06c45adc a913acb5
......@@ -16,9 +16,12 @@ public class DataInitTest extends CommonIT {
@Test
public void initStandardAccount() {
try {
List<String> lines = FileUtils.readLines(new File("C:\\Users\\Eddie Wu\\Desktop\\隆基科目整理.csv"), StandardCharsets.UTF_8);
List<String> lines = FileUtils.readLines(new File("C:\\Users\\Eddie Wu\\Desktop\\隆基科目表(最终版)_1106.csv"), StandardCharsets.UTF_8);
lines.remove(0);
String[] parent = null;
String[] parent1 = null;
String[] parent2 = null;
String[] parent3 = null;
String[] parent4 = null;
for (String line : lines) {
if (StringUtils.isBlank(line)) {
continue;
......@@ -32,10 +35,18 @@ public class DataInitTest extends CommonIT {
account.setName(StringUtils.isBlank(name) ? cols[7] : name);
if (StringUtils.isNotBlank(cols[0])) {
parent = cols;
} else {
account.setParentCode(parent[6]);
parent1 = cols;
} else if (StringUtils.isNotBlank(cols[1])) {
parent2 = cols;
account.setParentCode(parent1[6]);
} else if (StringUtils.isNotBlank(cols[2])) {
parent3 = cols;
account.setParentCode(parent2[6]);
} else if (StringUtils.isNotBlank(cols[3])) {
parent4 = cols;
account.setParentCode(parent3[6]);
}
account.setFullName(cols[7]);
account.setAcctProp(Integer.valueOf(cols[9]));
int acctLevel = 1;
......@@ -61,4 +72,8 @@ public class DataInitTest extends CommonIT {
e.printStackTrace();
}
}
public static void main(String[] args) {
System.out.println(CommonUtils.getUUID());
}
}
......@@ -40,5 +40,13 @@
<artifactId>jackson-databind</artifactId>
<version>2.9.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core -->
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.7</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.GlBalance;
import pwc.taxtech.atms.vat.entity.GlBalanceExample;
@Mapper
public interface GlBalanceMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
*
* @mbg.generated
*/
long countByExample(GlBalanceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
*
* @mbg.generated
*/
int deleteByExample(GlBalanceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
*
* @mbg.generated
*/
int insert(GlBalance record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
*
* @mbg.generated
*/
int insertSelective(GlBalance record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
*
* @mbg.generated
*/
List<GlBalance> selectByExample(GlBalanceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") GlBalance record, @Param("example") GlBalanceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.GL_BALANCE
*
* @mbg.generated
*/
int updateByExample(@Param("record") GlBalance record, @Param("example") GlBalanceExample example);
}
\ No newline at end of file
package pwc.taxtech.atms.gen;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class MyBatisGeneratorTest {
public static void main(String[] args) throws Exception {
try {
List<String> warnings = new ArrayList<>();
boolean overwrite = true;
//配置文件
// File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig.xml").getPath());
File configFile = new File(MyBatisGeneratorTest.class.getClassLoader().getResource("generatorConfig-invoice.xml").getPath());
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -313,37 +313,37 @@
},
function (isConfirm) {
if (isConfirm) {
vatReportService.hasManualDataSource(vatSessionService.project.id,vatSessionService.month).then(function (hasManual) {
if(hasManual){
swal({
title: "warning!",
text: "是否保留手工数据!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Yes'),
cancelButtonText: $translate.instant('No'),
closeOnConfirm: true,
closeOnCancel: true
},
function (isConfirm) {
if (isConfirm) {
doStartCaculate(true);
}else{
doStartCaculate(false);
}
});
}else{
doStartCaculate(false);
}
vatReportService.hasManualDataSource(vatSessionService.project.id, vatSessionService.month).then(function (hasManual) {
if (hasManual) {
setTimeout(function () {
swal({
title: "warning!",
text: "是否保留手工数据!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Yes'),
cancelButtonText: $translate.instant('No'),
closeOnConfirm: true,
closeOnCancel: true
},
function (tmpConfirm) {
if (tmpConfirm) {
doStartCaculate(true);
} else {
doStartCaculate(false);
}
});
}, 500);
} else {
doStartCaculate(false);
}
});
}
else {
} else {
swal.close();
}
});
}
else {
});
} else {
doStartCaculate(false);
}
};
......@@ -364,31 +364,33 @@
},
function (isConfirm) {
if (isConfirm) {
vatReportService.hasManualDataSource(vatSessionService.project.id,vatSessionService.month).then(function (hasManual) {
if(hasManual){
swal({
title: "warning!",
text: "是否保留手工数据!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Yes'),
cancelButtonText: $translate.instant('No'),
closeOnConfirm: true,
closeOnCancel: true
},
function (isConfirm) {
if (isConfirm) {
doStartCaculate2(true);
}else{
doStartCaculate2(false);
}
});
}else{
doStartCaculate2(false);
}
vatReportService.hasManualDataSource(vatSessionService.project.id, vatSessionService.month).then(function (hasManual) {
if (hasManual) {
setTimeout(function () {
swal({
title: "warning!",
text: "是否保留手工数据!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Yes'),
cancelButtonText: $translate.instant('No'),
closeOnConfirm: true,
closeOnCancel: true
},
function (isConfirm) {
if (isConfirm) {
doStartCaculate2(true);
} else {
doStartCaculate2(false);
}
});
}, 500);
} else {
doStartCaculate2(false);
}
});
}
}
else {
swal.close();
}
......
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