Commit 68eb9555 authored by zhkwei's avatar zhkwei

CIT数据处理一些数据的前置准备,数据导入数据预览bug的修改

parent 08fc627f
...@@ -22,6 +22,7 @@ import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT; ...@@ -22,6 +22,7 @@ import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
import static javax.servlet.http.HttpServletResponse.SC_OK; import static javax.servlet.http.HttpServletResponse.SC_OK;
/** /**
* CIT数据预览功能模块Controller
* @author zhikai.z.wei * @author zhikai.z.wei
*/ */
@RestController @RestController
...@@ -31,12 +32,22 @@ public class CitDataPreviewController extends BaseController { ...@@ -31,12 +32,22 @@ public class CitDataPreviewController extends BaseController {
@Autowired @Autowired
private CitDataPreviewServiceImpl citDataPreviewService; private CitDataPreviewServiceImpl citDataPreviewService;
/**
* 日记账合并版数据的获取
* @param citJournalAdjustDto
* @return
*/
@PostMapping("getJournalMergeData") @PostMapping("getJournalMergeData")
public PageInfo<CitJournalAdjustDto> getJournalMergeData(@RequestBody CitJournalAdjustDto citJournalAdjustDto) { public PageInfo<CitJournalAdjustDto> getJournalMergeData(@RequestBody CitJournalAdjustDto citJournalAdjustDto) {
logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citJournalAdjustDto))); logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citJournalAdjustDto)));
return citDataPreviewService.getJournalMergeData(citJournalAdjustDto); return citDataPreviewService.getJournalMergeData(citJournalAdjustDto);
} }
/**
* 日记账合并版导出
* @param paras
* @param response
*/
@RequestMapping(value = "exportJournalMergeData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "exportJournalMergeData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportJournalMergeData(@RequestBody CitJournalAdjustDto paras, HttpServletResponse response) { public void exportJournalMergeData(@RequestBody CitJournalAdjustDto paras, HttpServletResponse response) {
int count = citDataPreviewService.exportJournalMergeData2(paras, response); int count = citDataPreviewService.exportJournalMergeData2(paras, response);
...@@ -48,13 +59,22 @@ public class CitDataPreviewController extends BaseController { ...@@ -48,13 +59,22 @@ public class CitDataPreviewController extends BaseController {
} }
/**
* 试算平衡表生成版的数据获取
* @param citTrialBalanceDto
* @return
*/
@PostMapping("getTbGeneVerData") @PostMapping("getTbGeneVerData")
public PageInfo<CitTrialBalanceDto> getTbGeneVerData(@RequestBody CitTrialBalanceDto citTrialBalanceDto) { public PageInfo<CitTrialBalanceDto> getTbGeneVerData(@RequestBody CitTrialBalanceDto citTrialBalanceDto) {
logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citTrialBalanceDto))); logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citTrialBalanceDto)));
return citDataPreviewService.getTbGeneVerData(citTrialBalanceDto); return citDataPreviewService.getTbGeneVerData(citTrialBalanceDto);
} }
/**
* 试算平衡表生成版的导出
* @param paras
* @param response
*/
@RequestMapping(value = "exportTbGeneVerData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "exportTbGeneVerData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportTbGeneVerData(@RequestBody CitTrialBalanceDto paras, HttpServletResponse response) { public void exportTbGeneVerData(@RequestBody CitTrialBalanceDto paras, HttpServletResponse response) {
// response.setContentType("application/vnd.ms-excel;charset=utf-8"); // response.setContentType("application/vnd.ms-excel;charset=utf-8");
...@@ -86,13 +106,23 @@ public class CitDataPreviewController extends BaseController { ...@@ -86,13 +106,23 @@ public class CitDataPreviewController extends BaseController {
} }
} }
/**
* 试算平衡表Mapping版的数据获取
* @param citTrialBalanceDto
* @return
*/
@PostMapping("getTbMappingVerData") @PostMapping("getTbMappingVerData")
public PageInfo<CitTrialBalanceDto> getTbMappingVerData(@RequestBody CitTrialBalanceDto citTrialBalanceDto) { public PageInfo<CitTrialBalanceDto> getTbMappingVerData(@RequestBody CitTrialBalanceDto citTrialBalanceDto) {
logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citTrialBalanceDto))); logger.debug(String.format("CIT算平衡表Mapping版 Condition:%s", JSON.toJSONString(citTrialBalanceDto)));
return citDataPreviewService.getTbMappingVerData(citTrialBalanceDto); return citDataPreviewService.getTbMappingVerData(citTrialBalanceDto);
} }
/**
* 试算平衡表Mapping版的导出
* @param paras
* @param response
*/
@RequestMapping(value = "exportTbMappingVerData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "exportTbMappingVerData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportTbMappingVerData(@RequestBody CitTrialBalanceDto paras, HttpServletResponse response) { public void exportTbMappingVerData(@RequestBody CitTrialBalanceDto paras, HttpServletResponse response) {
int count = citDataPreviewService.exportTbMappingVerData2(paras, response); int count = citDataPreviewService.exportTbMappingVerData2(paras, response);
......
...@@ -17,7 +17,7 @@ import java.util.List; ...@@ -17,7 +17,7 @@ import java.util.List;
import static pwc.taxtech.atms.constant.enums.EnumCitImportType.JournalAdjust; import static pwc.taxtech.atms.constant.enums.EnumCitImportType.JournalAdjust;
/** /**
* @Description 资产相关Controller * @Description CIT文件导入Controller
* @Author zhikai.z.wei * @Author zhikai.z.wei
*/ */
@RestController @RestController
...@@ -28,14 +28,22 @@ public class CitImportExcelController { ...@@ -28,14 +28,22 @@ public class CitImportExcelController {
@Autowired @Autowired
private CitImportExcelServiceImpl citImportExcelService; private CitImportExcelServiceImpl citImportExcelService;
/**
* CIT文件导入
* @param file
* @param orgIds
* @param periodDate
* @param importType
* @param importFileType
* @return
*/
@RequestMapping(value = "/citImportExcel", method = RequestMethod.POST) @RequestMapping(value = "/citImportExcel", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam(required = false) String orgIds, OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam(required = false) String orgIds,
@RequestParam String periodDate, @RequestParam String periodDate,
@RequestParam Integer importType, @RequestParam Integer importType,
@RequestParam Integer importFileType){ @RequestParam Integer importFileType){
logger.info("CIT调整版日记账导入"); logger.info("CIT文件导入");
OperationResultDto opeResultDto = new OperationResultDto(); OperationResultDto opeResultDto = new OperationResultDto();
try{ try{
if (file == null || file.getSize() <= 0) { if (file == null || file.getSize() <= 0) {
......
...@@ -41,6 +41,7 @@ import java.util.List; ...@@ -41,6 +41,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* CIT数据预览功能模块
* @author zhikai.z.wei * @author zhikai.z.wei
* @Date: 02/03/2019 * @Date: 02/03/2019
* @Description: * @Description:
...@@ -76,7 +77,7 @@ public class CitDataPreviewServiceImpl extends BaseService { ...@@ -76,7 +77,7 @@ public class CitDataPreviewServiceImpl extends BaseService {
} }
/** /**
* 日记账导出 * 日记账导出(第一种方式)
* @param citJournalAdjustDto * @param citJournalAdjustDto
* @param os * @param os
* @return * @return
...@@ -101,6 +102,12 @@ public class CitDataPreviewServiceImpl extends BaseService { ...@@ -101,6 +102,12 @@ public class CitDataPreviewServiceImpl extends BaseService {
} }
} }
/**
* 日记账导出(第二种方式)
* @param citJournalAdjustDto
* @param response
* @return
*/
public int exportJournalMergeData2(CitJournalAdjustDto citJournalAdjustDto, HttpServletResponse response){ public int exportJournalMergeData2(CitJournalAdjustDto citJournalAdjustDto, HttpServletResponse response){
CitJournalEntryAdjust citJournalEntryAdjust = beanUtil.copyProperties(citJournalAdjustDto, new CitJournalEntryAdjust()); CitJournalEntryAdjust citJournalEntryAdjust = beanUtil.copyProperties(citJournalAdjustDto, new CitJournalEntryAdjust());
List<CitJournalEntryAdjust> journalMerges = citJournalMapper.getJournalMerge(citJournalEntryAdjust); List<CitJournalEntryAdjust> journalMerges = citJournalMapper.getJournalMerge(citJournalEntryAdjust);
...@@ -117,6 +124,10 @@ public class CitDataPreviewServiceImpl extends BaseService { ...@@ -117,6 +124,10 @@ public class CitDataPreviewServiceImpl extends BaseService {
return 1; return 1;
} }
/**
* 日记账导出(第一种方式)所用到的获取Excel表头
* @return
*/
private Map<String, String> generalJMHeader() { private Map<String, String> generalJMHeader() {
Map<String, String> header = new LinkedHashMap<>(); Map<String, String> header = new LinkedHashMap<>();
header.put("ApprovalStatus","审批状态"); header.put("ApprovalStatus","审批状态");
...@@ -169,7 +180,7 @@ public class CitDataPreviewServiceImpl extends BaseService { ...@@ -169,7 +180,7 @@ public class CitDataPreviewServiceImpl extends BaseService {
} }
/** /**
* 试算平衡表生成版的导出 * 试算平衡表生成版的导出(第一种方式)
* @param citTrialBalanceDto * @param citTrialBalanceDto
* @param os * @param os
* @return * @return
...@@ -220,6 +231,10 @@ public class CitDataPreviewServiceImpl extends BaseService { ...@@ -220,6 +231,10 @@ public class CitDataPreviewServiceImpl extends BaseService {
return 1; return 1;
} }
/**
* 试算平衡表生成版的导出(第一种方式)所用到的生成Excel的表头
* @return
*/
private Map<String, String> generalTbGeneVerHeader() { private Map<String, String> generalTbGeneVerHeader() {
Map<String, String> header = new LinkedHashMap<>(); Map<String, String> header = new LinkedHashMap<>();
header.put("AccountCode","科目代码"); header.put("AccountCode","科目代码");
...@@ -255,7 +270,7 @@ public class CitDataPreviewServiceImpl extends BaseService { ...@@ -255,7 +270,7 @@ public class CitDataPreviewServiceImpl extends BaseService {
} }
/** /**
* 试算平衡表Mapping版的导出 * 试算平衡表Mapping版的导出(第一种方式)
* @param citTrialBalanceDto * @param citTrialBalanceDto
* @param os * @param os
* @return * @return
......
...@@ -64,6 +64,9 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -64,6 +64,9 @@ public class CitImportExcelServiceImpl extends BaseService {
@Resource @Resource
private ProjectMapper projectMapper; private ProjectMapper projectMapper;
@Resource
private CitTbamMapper citTbamMapper;
/** /**
* 根据导入的文件类型进行方法分发 * 根据导入的文件类型进行方法分发
* *
...@@ -284,11 +287,19 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -284,11 +287,19 @@ public class CitImportExcelServiceImpl extends BaseService {
if (EnumTbImportType.CoverImport.getCode().equals(importType)) { if (EnumTbImportType.CoverImport.getCode().equals(importType)) {
//覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态 //覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态
msg = "覆盖导入成功"; msg = "覆盖导入成功";
CitJournalEntryAdjustExample example = new CitJournalEntryAdjustExample(); CitJournalEntryAdjustExample citJEAExample = new CitJournalEntryAdjustExample();
CitJournalEntryAdjustExample.Criteria criteria = example.createCriteria(); citJEAExample.createCriteria().andCreatedByEqualTo(currentUserName).andPeriodEqualTo(period).andOrganizationIdIn(orgList);
criteria.andCreatedByEqualTo(currentUserName); logger.info("删除符合条件的日记账");
criteria.andPeriodEqualTo(period); citJournalEntryAdjustMapper.deleteByExample(citJEAExample);
citJournalEntryAdjustMapper.deleteByExample(example); //删除自动生成的试算平衡表相关数据
CitTrialBalanceExample citTbExample = new CitTrialBalanceExample();
citTbExample.createCriteria().andPeriodEqualTo(period).andCreateByEqualTo(currentUserName).andOrganizationIdIn(orgList);
int deleteByExample = citTrialBalanceMapper.deleteByExample(citTbExample);
logger.info("删除符合条件的试算平衡表数据");
CitTbamExample citTbamExample = new CitTbamExample();
citTbamExample.createCriteria().andPeriodEqualTo(period).andCreateByEqualTo(currentUserName).andOrganizationIdIn(orgList);
logger.info("删除符合条件的试算平衡表Mapping数据");
citTbamMapper.deleteByExample(citTbamExample);
updateImportLog(EnumCitImportType.JournalAdjust.getCode()); updateImportLog(EnumCitImportType.JournalAdjust.getCode());
} }
int insertBatchNum = citJournalEntryAdjustMapper.insertBatch(journalAdjustList); int insertBatchNum = citJournalEntryAdjustMapper.insertBatch(journalAdjustList);
...@@ -299,7 +310,9 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -299,7 +310,9 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLog.setErrorMsg(msg); citDataImportLog.setErrorMsg(msg);
citDataImportLogList.add(citDataImportLog); citDataImportLogList.add(citDataImportLog);
//导入日志录入到数据库
addDataImportLog(citDataImportLogList); addDataImportLog(citDataImportLogList);
//根据日记账自动生成试算平衡表,即试算平衡表生成版
autoGeneTB(period, orgId, orgList); autoGeneTB(period, orgId, orgList);
saveResult.setResult(true); saveResult.setResult(true);
saveResult.setResultMsg("导入成功"); saveResult.setResultMsg("导入成功");
...@@ -518,7 +531,8 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -518,7 +531,8 @@ public class CitImportExcelServiceImpl extends BaseService {
continue; continue;
} }
DecimalFormat df=new DecimalFormat("0"); DecimalFormat df=new DecimalFormat("0");
citDAMapping.setAcctCode(df.format(cellValue)); // String s = cellValue.toString();
citDAMapping.setAcctCode(cellValue.toString());
cellValue = CitCommonUtil.getValue(rowData.getCell(6)); cellValue = CitCommonUtil.getValue(rowData.getCell(6));
if(cellValue == null){ if(cellValue == null){
...@@ -1203,7 +1217,7 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -1203,7 +1217,7 @@ public class CitImportExcelServiceImpl extends BaseService {
} }
/** /**
* 自动生成试算平衡表 * 自动生成试算平衡表和join出Mapping版的attribute mapping TB
* @param period * @param period
* @param orgList * @param orgList
* @return * @return
...@@ -1215,14 +1229,17 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -1215,14 +1229,17 @@ public class CitImportExcelServiceImpl extends BaseService {
StringBuilder periodSb = new StringBuilder(); StringBuilder periodSb = new StringBuilder();
periodSb.append(period); periodSb.append(period);
periodSb.append("%"); periodSb.append("%");
//第二步,查出cit_journal_entry_adjust该期间的调整日记账,
List<CitJournalEntryAdjust> citJournalEntryAdjustList = citJournalEntryAdjustMapper.sumAmountByCondition(periodSb.toString(), orgList); List<CitJournalEntryAdjust> citJournalEntryAdjustList = citJournalEntryAdjustMapper.sumAmountByCondition(periodSb.toString(), orgList);
//第二步,查出cit_journal_entry_adjust该期间的调整日记账,
List<CitTrialBalance> trialBalanceList = new ArrayList<>(); List<CitTrialBalance> trialBalanceList = new ArrayList<>();
//存放TB与Mapping结合的实体
List<CitTbam> citTbamList = new ArrayList<>();
String currentUserName = authUserHelper.getCurrentAuditor().get(); String currentUserName = authUserHelper.getCurrentAuditor().get();
for (CitJournalEntryAdjust citJournal:citJournalEntryAdjustList) { for (CitJournalEntryAdjust citJournal:citJournalEntryAdjustList) {
CitTrialBalance trialBalance = new CitTrialBalance(); CitTrialBalance trialBalance = new CitTrialBalance();
trialBalance.setId(idService.nextId());
trialBalance.setPeriod(period); trialBalance.setPeriod(period);
trialBalance.setCreateBy(currentUserName); trialBalance.setCreateBy(currentUserName);
trialBalance.setOrganizationId(orgId); trialBalance.setOrganizationId(orgId);
...@@ -1249,10 +1266,33 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -1249,10 +1266,33 @@ public class CitImportExcelServiceImpl extends BaseService {
//计算出期末余额,期末余额为期初余额+借方发生额-贷方发生额 //计算出期末余额,期末余额为期初余额+借方发生额-贷方发生额
trialBalance.setEndingBalance(lastYearBegBla.add(citJournal.getAccountedDr()).subtract(citJournal.getAccountedCr())); trialBalance.setEndingBalance(lastYearBegBla.add(citJournal.getAccountedDr()).subtract(citJournal.getAccountedCr()));
//根据科目代码及期间查询出相应底稿&科目Mapping数据并赋值给实体CitTBam
CitDraftAccountMappingExample citDAMappingExample = new CitDraftAccountMappingExample();
citDAMappingExample.createCriteria().andAcctCodeEqualTo(citJournal.getSubjectCode()).andPeriodEqualTo(period);
List<CitDraftAccountMapping> citDraftAccountMappings = citDAMappingMapper.selectByExample(citDAMappingExample);
for (CitDraftAccountMapping daMapping : citDraftAccountMappings) {
CitTbam citTbam = new CitTbam();
//把根据日记账算出的TB数据复制到Mapping的TB
beanUtil.copyProperties(trialBalance,citTbam);
citTbam.setId(idService.nextId());
citTbam.setAttribute(daMapping.getAttribute());
citTbamList.add(citTbam);
}
// citDraftAccountMappings.stream().forEach(daMapping -> {
// citTbam.setId(idService.nextId());
// citTbam.setAttribute(daMapping.getAttribute());
// citTbamList.add(citTbam);
// if("70019900".equals(citTbam.getAccountCode())){
// System.out.println(citTbam.getId());
// }
// });
trialBalance.setId(idService.nextId());
trialBalanceList.add(trialBalance); trialBalanceList.add(trialBalance);
} }
int insertBatch = citTrialBalanceMapper.insertBatch(trialBalanceList); int insertBatch = citTrialBalanceMapper.insertBatch(trialBalanceList);
int insertBatch1 = citTbamMapper.insertBatch(citTbamList);
autoGeneResult.setResult(true); autoGeneResult.setResult(true);
autoGeneResult.setResultMsg("自动生成TB成功"); autoGeneResult.setResultMsg("自动生成TB成功");
return autoGeneResult; return autoGeneResult;
......
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.entity.CitTbam;
import pwc.taxtech.atms.entity.CitTbamExample;
@Mapper
public interface CitTbamMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
long countByExample(CitTbamExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
int deleteByExample(CitTbamExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
int insert(CitTbam record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
int insertSelective(CitTbam record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
List<CitTbam> selectByExampleWithRowbounds(CitTbamExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
List<CitTbam> selectByExample(CitTbamExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
CitTbam selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") CitTbam record, @Param("example") CitTbamExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
int updateByExample(@Param("record") CitTbam record, @Param("example") CitTbamExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(CitTbam record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_tbam
*
* @mbg.generated
*/
int updateByPrimaryKey(CitTbam record);
/**
* 批量插入数据
* @author zhikai.z.wei
* @param citTbamList
* @return
*/
int insertBatch(List<CitTbam> citTbamList);
}
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.dao.CitTbamMapper">
<insert id="insertBatch" parameterType="java.util.List">
insert into cit_tbam
(<include refid="Base_Column_List"/>)
values
<foreach collection="list" item="item" index="index" separator=",">
<trim prefix="(" suffix=")" suffixOverrides=",">
<choose>
<when test="item.id != null">#{item.id,jdbcType=BIGINT},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.organizationId != null">#{item.organizationId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.date != null">#{item.date,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.source != null">#{item.source,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.period != null">#{item.period,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.accountPeriod != null">#{item.accountPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.attribute != null">#{item.attribute,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.accountCode != null">#{item.accountCode,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.accountDescription != null">#{item.accountDescription,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.debitAmount != null">#{item.debitAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.creditAmount != null">#{item.creditAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.beginningBalance != null">#{item.beginningBalance,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.endingBalance != null">#{item.endingBalance,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.createTime != null">#{item.createTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
</trim>
</foreach>;
SELECT 1 FROM DUAL;
</insert>
</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