Commit 072dc907 authored by chase's avatar chase

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

parents 5d2c5dca 68eb9555
......@@ -22,6 +22,7 @@ import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
import static javax.servlet.http.HttpServletResponse.SC_OK;
/**
* CIT数据预览功能模块Controller
* @author zhikai.z.wei
*/
@RestController
......@@ -31,12 +32,22 @@ public class CitDataPreviewController extends BaseController {
@Autowired
private CitDataPreviewServiceImpl citDataPreviewService;
/**
* 日记账合并版数据的获取
* @param citJournalAdjustDto
* @return
*/
@PostMapping("getJournalMergeData")
public PageInfo<CitJournalAdjustDto> getJournalMergeData(@RequestBody CitJournalAdjustDto citJournalAdjustDto) {
logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citJournalAdjustDto)));
return citDataPreviewService.getJournalMergeData(citJournalAdjustDto);
}
/**
* 日记账合并版导出
* @param paras
* @param response
*/
@RequestMapping(value = "exportJournalMergeData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportJournalMergeData(@RequestBody CitJournalAdjustDto paras, HttpServletResponse response) {
int count = citDataPreviewService.exportJournalMergeData2(paras, response);
......@@ -48,13 +59,22 @@ public class CitDataPreviewController extends BaseController {
}
/**
* 试算平衡表生成版的数据获取
* @param citTrialBalanceDto
* @return
*/
@PostMapping("getTbGeneVerData")
public PageInfo<CitTrialBalanceDto> getTbGeneVerData(@RequestBody CitTrialBalanceDto citTrialBalanceDto) {
logger.debug(String.format("CIT日记账合并预览 Condition:%s", JSON.toJSONString(citTrialBalanceDto)));
return citDataPreviewService.getTbGeneVerData(citTrialBalanceDto);
}
/**
* 试算平衡表生成版的导出
* @param paras
* @param response
*/
@RequestMapping(value = "exportTbGeneVerData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportTbGeneVerData(@RequestBody CitTrialBalanceDto paras, HttpServletResponse response) {
// response.setContentType("application/vnd.ms-excel;charset=utf-8");
......@@ -86,13 +106,23 @@ public class CitDataPreviewController extends BaseController {
}
}
/**
* 试算平衡表Mapping版的数据获取
* @param citTrialBalanceDto
* @return
*/
@PostMapping("getTbMappingVerData")
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);
}
/**
* 试算平衡表Mapping版的导出
* @param paras
* @param response
*/
@RequestMapping(value = "exportTbMappingVerData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportTbMappingVerData(@RequestBody CitTrialBalanceDto paras, HttpServletResponse response) {
int count = citDataPreviewService.exportTbMappingVerData2(paras, response);
......
......@@ -17,7 +17,7 @@ import java.util.List;
import static pwc.taxtech.atms.constant.enums.EnumCitImportType.JournalAdjust;
/**
* @Description 资产相关Controller
* @Description CIT文件导入Controller
* @Author zhikai.z.wei
*/
@RestController
......@@ -28,14 +28,22 @@ public class CitImportExcelController {
@Autowired
private CitImportExcelServiceImpl citImportExcelService;
/**
* CIT文件导入
* @param file
* @param orgIds
* @param periodDate
* @param importType
* @param importFileType
* @return
*/
@RequestMapping(value = "/citImportExcel", method = RequestMethod.POST)
public @ResponseBody
OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam(required = false) String orgIds,
@RequestParam String periodDate,
@RequestParam Integer importType,
@RequestParam Integer importFileType){
logger.info("CIT调整版日记账导入");
logger.info("CIT文件导入");
OperationResultDto opeResultDto = new OperationResultDto();
try{
if (file == null || file.getSize() <= 0) {
......
......@@ -41,6 +41,7 @@ import java.util.List;
import java.util.Map;
/**
* CIT数据预览功能模块
* @author zhikai.z.wei
* @Date: 02/03/2019
* @Description:
......@@ -76,7 +77,7 @@ public class CitDataPreviewServiceImpl extends BaseService {
}
/**
* 日记账导出
* 日记账导出(第一种方式)
* @param citJournalAdjustDto
* @param os
* @return
......@@ -101,6 +102,12 @@ public class CitDataPreviewServiceImpl extends BaseService {
}
}
/**
* 日记账导出(第二种方式)
* @param citJournalAdjustDto
* @param response
* @return
*/
public int exportJournalMergeData2(CitJournalAdjustDto citJournalAdjustDto, HttpServletResponse response){
CitJournalEntryAdjust citJournalEntryAdjust = beanUtil.copyProperties(citJournalAdjustDto, new CitJournalEntryAdjust());
List<CitJournalEntryAdjust> journalMerges = citJournalMapper.getJournalMerge(citJournalEntryAdjust);
......@@ -117,6 +124,10 @@ public class CitDataPreviewServiceImpl extends BaseService {
return 1;
}
/**
* 日记账导出(第一种方式)所用到的获取Excel表头
* @return
*/
private Map<String, String> generalJMHeader() {
Map<String, String> header = new LinkedHashMap<>();
header.put("ApprovalStatus","审批状态");
......@@ -169,7 +180,7 @@ public class CitDataPreviewServiceImpl extends BaseService {
}
/**
* 试算平衡表生成版的导出
* 试算平衡表生成版的导出(第一种方式)
* @param citTrialBalanceDto
* @param os
* @return
......@@ -220,6 +231,10 @@ public class CitDataPreviewServiceImpl extends BaseService {
return 1;
}
/**
* 试算平衡表生成版的导出(第一种方式)所用到的生成Excel的表头
* @return
*/
private Map<String, String> generalTbGeneVerHeader() {
Map<String, String> header = new LinkedHashMap<>();
header.put("AccountCode","科目代码");
......@@ -255,7 +270,7 @@ public class CitDataPreviewServiceImpl extends BaseService {
}
/**
* 试算平衡表Mapping版的导出
* 试算平衡表Mapping版的导出(第一种方式)
* @param citTrialBalanceDto
* @param os
* @return
......
......@@ -64,6 +64,9 @@ public class CitImportExcelServiceImpl extends BaseService {
@Resource
private ProjectMapper projectMapper;
@Resource
private CitTbamMapper citTbamMapper;
/**
* 根据导入的文件类型进行方法分发
*
......@@ -284,11 +287,19 @@ public class CitImportExcelServiceImpl extends BaseService {
if (EnumTbImportType.CoverImport.getCode().equals(importType)) {
//覆盖导入要删除原有的该操作人在当前期间导入的数据,且更改之前导入的日志记录状态
msg = "覆盖导入成功";
CitJournalEntryAdjustExample example = new CitJournalEntryAdjustExample();
CitJournalEntryAdjustExample.Criteria criteria = example.createCriteria();
criteria.andCreatedByEqualTo(currentUserName);
criteria.andPeriodEqualTo(period);
citJournalEntryAdjustMapper.deleteByExample(example);
CitJournalEntryAdjustExample citJEAExample = new CitJournalEntryAdjustExample();
citJEAExample.createCriteria().andCreatedByEqualTo(currentUserName).andPeriodEqualTo(period).andOrganizationIdIn(orgList);
logger.info("删除符合条件的日记账");
citJournalEntryAdjustMapper.deleteByExample(citJEAExample);
//删除自动生成的试算平衡表相关数据
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());
}
int insertBatchNum = citJournalEntryAdjustMapper.insertBatch(journalAdjustList);
......@@ -299,7 +310,9 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLog.setErrorMsg(msg);
citDataImportLogList.add(citDataImportLog);
//导入日志录入到数据库
addDataImportLog(citDataImportLogList);
//根据日记账自动生成试算平衡表,即试算平衡表生成版
autoGeneTB(period, orgId, orgList);
saveResult.setResult(true);
saveResult.setResultMsg("导入成功");
......@@ -518,7 +531,8 @@ public class CitImportExcelServiceImpl extends BaseService {
continue;
}
DecimalFormat df=new DecimalFormat("0");
citDAMapping.setAcctCode(df.format(cellValue));
// String s = cellValue.toString();
citDAMapping.setAcctCode(cellValue.toString());
cellValue = CitCommonUtil.getValue(rowData.getCell(6));
if(cellValue == null){
......@@ -1203,7 +1217,7 @@ public class CitImportExcelServiceImpl extends BaseService {
}
/**
* 自动生成试算平衡表
* 自动生成试算平衡表和join出Mapping版的attribute mapping TB
* @param period
* @param orgList
* @return
......@@ -1215,14 +1229,17 @@ public class CitImportExcelServiceImpl extends BaseService {
StringBuilder periodSb = new StringBuilder();
periodSb.append(period);
periodSb.append("%");
//第二步,查出cit_journal_entry_adjust该期间的调整日记账,
List<CitJournalEntryAdjust> citJournalEntryAdjustList = citJournalEntryAdjustMapper.sumAmountByCondition(periodSb.toString(), orgList);
//第二步,查出cit_journal_entry_adjust该期间的调整日记账,
List<CitTrialBalance> trialBalanceList = new ArrayList<>();
//存放TB与Mapping结合的实体
List<CitTbam> citTbamList = new ArrayList<>();
String currentUserName = authUserHelper.getCurrentAuditor().get();
for (CitJournalEntryAdjust citJournal:citJournalEntryAdjustList) {
CitTrialBalance trialBalance = new CitTrialBalance();
trialBalance.setId(idService.nextId());
trialBalance.setPeriod(period);
trialBalance.setCreateBy(currentUserName);
trialBalance.setOrganizationId(orgId);
......@@ -1249,10 +1266,33 @@ public class CitImportExcelServiceImpl extends BaseService {
//计算出期末余额,期末余额为期初余额+借方发生额-贷方发生额
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);
}
int insertBatch = citTrialBalanceMapper.insertBatch(trialBalanceList);
int insertBatch1 = citTbamMapper.insertBatch(citTbamList);
autoGeneResult.setResult(true);
autoGeneResult.setResultMsg("自动生成TB成功");
return autoGeneResult;
......
......@@ -131,7 +131,6 @@ public class FormulaAgent {
public PeriodCellData getCellData(String templateId, String cellId, int periodId, String projectId) {
PeriodReport report = getReportByTemplate(templateId, periodId, projectId);
MyAsserts.assertNotNull(report, Exceptions.BB_REPORT_NULL);
PeriodCellData cellData = getCellDataListByTemplate(cellId, report.getId());
MyAsserts.assertNotNull(cellData, Exceptions.BB_CELL_DATA_NULL);
return cellData;
......@@ -153,48 +152,71 @@ public class FormulaAgent {
if (split[0].indexOf(">=") != -1) {
filterValue = "> " + split[1] + "and" + filter + " =" + split[1];
}
if (split[0].indexOf("<=") != -1) {
} else if (split[0].indexOf("<=") != -1) {
filterValue = "< " + split[1] + "and" + filter + " =" + split[1];
} else {
filterValue = split[0] + "'" + split[1] + "'";
}
if ("cit_balance_sheet_prc_adjust".equals(tableName) || ("cit_profit_prc_adjust".equals(tableName))) {
try {
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, true);
} catch (Exception e) {
e.printStackTrace();
}
}
if ("CITZCFZB".equals(tableName) || ("CITLRB".equals(tableName))) {
try {
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, false);
} catch (Exception e) {
e.printStackTrace();
}
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, true);
return null;
}
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, String year, boolean bool) {
String sql = "select " + getField + " from " + tableName + " where 1=1 and " + filter + filterValue;
String _p = "";
if (formulaContext.getPeriod() - period < 10) {
_p = year + "'0" + (formulaContext.getPeriod() - period) + "'";
} else {
_p = year + (formulaContext.getPeriod() - period);
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, String year, boolean bool) throws Exception {
String sql = "select " + getField + " from " + tableName + " where 1=1 and " + filter + filterValue;
String _p = insertZero(formulaContext.getPeriod() - Math.abs(period));
String _period = insertZero(formulaContext.getPeriod());
String per = insertZero((formulaContext.getPeriod() - 1));
if (!bool) {
if (period == 0) {
sql += " and tms_period = " + year + _period;
} else if (period == -99) {
sql += " and tms_period between " + year + "01 and " + year + per;
} else if (period == 99) {
sql += " and tms_period between " + year + "01 and " + year + _period;
} else {
if (period > 0)
throw new Exception("参数不正确");
sql += " and tms_period between " + year + _p + " and " + year + per;
}
}
if (period == 0) {
sql += " and tms-period = " + formulaContext.getPeriod();
} else if (period == -99) {
sql += "and tms-period between '" + year + "01' and " + (formulaContext.getPeriod() - 1);
} else if (period == 99) {
sql += "and tms-period between '" + year + "01' and " + (formulaContext.getPeriod());
if (bool)
sql += " and period = " + year;
return sql;
}
public static String insertZero(Integer itr) {
String str = null;
if (itr < 10) {
str = "0" + itr;
} else {
sql += "and tms-period between " + _p + "and " + (formulaContext.getPeriod() - 1);
}
if (bool) {
sql += " and period = '" + year + period + "'";
str = "" + itr;
}
return sql;
return str;
}
@Autowired
JdbcTemplate jdbcTemplate;
public static void main(String[] args) {
System.out.println(buildSql("balance_sheet", "end_bal", "beg_bal", "> 0.00", 201810, "2", null));
;
}
/* public static void main(String[] args) {
FormulaAgent formulaAgent = new FormulaAgent();
FormulaContext formulaContext = new FormulaContext();
formulaContext.setPeriod(3);
formulaAgent.getTableDataByName("CITLRB", "end_bal", "item_name", "= 小帅哥", -3, "2018", formulaContext);
}*/
public Long getTableDataByName(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
List<Map<String, Object>> stringObjectMap = jdbcTemplate.queryForList(buildSql(TableRule.map.get(tableName), getField, filter, filterValue, period, year, formulaContext));
......
......@@ -512,7 +512,7 @@ public class ReportGeneratorImpl {
FreeRefFunction[] functionImpls = {new SGSR(formulaContext), new FSJZ(formulaContext), new ND(formulaContext),
new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext),new WPNAME(formulaContext),new WPTYPE(formulaContext), new SUM2(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext), new SUM2(formulaContext),
new SUM(formulaContext), new RSUMIF(formulaContext), new TABLESUMIF(formulaContext)};
UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls);
UDFFinder udfToolpack = new AggregatingUDFFinder(udfs);
......
......@@ -60,7 +60,7 @@ public class ReportServiceImpl extends BaseService {
private final static Logger logger = LoggerFactory.getLogger(ReportServiceImpl.class);
private BlockingQueue<PeriodJob> queue = new LinkedBlockingQueue<>();
private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX",
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR","WPNAME","WPTYPE"};
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR","WPNAME","WPTYPE", "SUM2", "RSUMIF", "TABLESUMIF", "SUM"};
@Autowired
private ReportGeneratorImpl reportGenerator;
......@@ -507,12 +507,9 @@ public class ReportServiceImpl extends BaseService {
@Override
public void run() {
try {
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
//进行数据校验
DataValidation(periodParam, projectId,genJob );
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
PeriodResources resources = reportGenerator.getPeriodResources(projectId, periodParam,
templates.stream().map(Template::getId).collect(Collectors.toList()));
......
......@@ -5,13 +5,9 @@ import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.TableRule;
import pwc.taxtech.atms.exception.Exceptions;
import java.util.HashMap;
import java.util.Map;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverInteger;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
......@@ -66,7 +62,6 @@ public class TABLESUMIF extends FunctionBase implements FreeRefFunction {
e.printStackTrace();
return new NumberEval(0.00);
}
return new NumberEval(0.00);
}
}
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.
......@@ -133,7 +133,22 @@
<select id ="selectByCondition" parameterType="pwc.taxtech.atms.entity.CitEAMAssetsDisposal" resultType="pwc.taxtech.atms.entity.CitEAMAssetsDisposal">
select
id, organization_id as organizationId, project_id as projectId, period, source, occur_period as occurPeriod, asset_label_number as assetLabelNumber,
compensation_sale_amount as compensationSaleAmount, created_by as createBy, updated_by as updateBy, create_time as createTime, update_time as updateTime
compensation_sale_amount as compensationSaleAmount, created_by as createBy, updated_by as updateBy, create_time as createTime, update_time as updateTime,
oa_asset_bill_type oaAssetBillType,
oa_asset_number oaAssetNumber,
scrap_reason scrapReason,
asset_number assetNumber,
asset_label_number assetLabelNumber,
compensation_sale_amount compensationSaleAmount,
liable_employee_num liableEmployeeNum,
liable_employee_name liableEmployeeName,
remit_employee_num remitEmployeeNum,
remit_employee_name remitEmployeeName,
remit_time remitTime,
remit_amount remitAmount,
gathering_company_name gatheringCompanyName,
gathering_company_account gatheringCompanyAccount,
remark
from cit_eam_assets_disposal
WHERE
<include refid="QueryCondition"/>
......
......@@ -209,7 +209,37 @@
advance advance,
approved_standard_invoice_amount approvedStandardInvoiceAmount,
created_by createdBy,
create_time createTime
create_time createTime,
remark,
credit_prepaid_accounts as creditPrepaidAccounts,
debit_advance_gene as debitAdvanceGene,
ledger_id ledgerId,
exchange_rate exchangeRate,
reclassify_amount reclassifyAmount ,
check_one checkOne,
advance_write_off advanceWriteOff,
usable_balance usableBalance,
usable_invoice_amount usableInvoiceAmount,
paid_invoice_amount paidInvoiceAmount,
approved_standard_invoice_amount approvedStandardInvoiceAmount,
unexecuted_service_schedule unexecutedServiceSchedule,
advance advance ,
coupa_total_accept coupaTotalAccept,
executed_service_schedule executedServiceSchedule,
order_amount orderAmount,
currency currency,
standard_money standardMoney,
item item
supplier supplier,
cost_center costCenter,
cost_center_code costCenterCode,
po_subject_code poSubjectCode,
purchase_person purchasePerson,
lading_bill_person ladingBillPerson,
po_row poRow,
po_no poNo,
po_create_time poCreateTime,
from cit_salary_advance
WHERE
<include refid="QueryCondition"/>
......
<?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
......@@ -1141,7 +1141,56 @@
"assetLabelNumber" : "资产标签号",
"compensationSaleAmount" : "赔偿/变卖金额",
"EAMDisposal" : "EAM资产处理金额",
"MainBodyCode": "主体代码"
"MainBodyCode": "主体代码",
"remark" : "摘要",
"creditPrepaidAccounts" : "贷:预付账款",
"debitAdvanceGene" : "借:预提费用-系统生成",
"ledgerId" : "账套",
"exchangeRate" : "汇率",
"reclassifyAmount" : "重分类金额",
"checkOne" : "校验",
"advanceWriteOff" : "预提/(预付)冲销",
"usableBalance" : "可用预付款余额",
"usableInvoiceAmount" : "可用预付款发票金额",
"paidInvoiceAmount" : "已付标准发票总金额",
"approvedStandardInvoiceAmount" : "已批准标准发票金额",
"unexecutedServiceSchedule" : "未执行服务金额",
"advance": "预提",
"coupaTotalAccept": "COUPA接收合计",
"executedServiceSchedule" : "已执行服务进度",
"orderAmount" : "订购金额",
"currency" : "币种",
"standardMoney": "本位币",
"item" : "ITEM",
"supplier" : "供应商",
"costCenter" : "成本中心",
"costCenterCode" : "成本中心CODE",
"poSubjectCode" : "PO主体CODE",
"purchasePerson" : "请购人",
"ladingBillPerson":"提单人",
"poRow":"PO行",
"poNo":"PO号",
"zczzrxx" : "资产责任人信息",
"xkrxx" : "汇款人信息",
"skgsxx" : "收款公司信息",
"occurPeriod": "发生期间",
"oaAssetBillType" : "相关OA资产单单据类型",
"oaAssetNumber" : "相关OA资产单单号",
"scrapReason" : "报废原因",
"assetNumber" : "资产编号",
"assetLabelNumber" : "资产标签号",
"compensationSaleAmount" : "赔偿/变卖金额",
"liableEmployeeNum" : "员工工号",
"liableEmployeeName" : "员工姓名",
"remitEmployeeNum" : "员工工号",
"remitEmployeeName" : "员工姓名",
"remitTime" : "汇款时间",
"remitAmount" : "汇款金额",
"gatheringCompanyName" : "收款公司名称",
"gatheringCompanyAccount":"收款公司账号"
}
\ No newline at end of file
......@@ -28,12 +28,36 @@
function initAssetResultDxGrid() {
var dupColumns = [
{ caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50, allowEditing: false, fixed: true },
{ caption: $translate.instant('period'), dataField: "period", width: '15%', allowEditing: false, fixed: true },
{ caption: $translate.instant('source'), dataField: "source", width: '15%', allowEditing: false, fixed: true },
{ caption: $translate.instant('assetLabelNumber'), dataField: "assetLabelNumber", width: '15%', allowEditing: false, fixed: true },
{ caption: $translate.instant('compensationSaleAmount'), dataField: "compensationSaleAmount", width: '15%', allowEditing: false, fixed: true },
{ caption: $translate.instant('createdBy'), dataField: "createBy", width: '15%', allowEditing: false, fixed: true },
{ caption: $translate.instant('createTime'), dataField: "createTime", width: '15%', allowEditing: false, fixed: true }
{ caption: $translate.instant('occurPeriod'), dataField: "occurPeriod", allowEditing: false, fixed: true },
{ caption: $translate.instant('oaAssetBillType'), dataField: "oaAssetBillType", allowEditing: false, fixed: true },
{ caption: $translate.instant('oaAssetNumber'), dataField: "oaAssetNumber", allowEditing: false, fixed: true },
{ caption: $translate.instant('scrapReason'), dataField: "scrapReason", allowEditing: false, fixed: true },
{ caption: $translate.instant('assetNumber'), dataField: "assetNumber", allowEditing: false, fixed: true },
{ caption: $translate.instant('assetLabelNumber'), dataField: "assetLabelNumber", allowEditing: false, fixed: true },
{ caption: $translate.instant('compensationSaleAmount'), dataField: "compensationSaleAmount", allowEditing: false, fixed: true },
{
caption: $translate.instant('zczzrxx'), alignment: 'center',
columns: [
{ caption: $translate.instant('liableEmployeeNum'), dataField: "liableEmployeeNum", allowEditing: false, fixed: true },
{ caption: $translate.instant('liableEmployeeName'), dataField: "liableEmployeeName", allowEditing: false, fixed: true }
]
},{
caption: $translate.instant('xkrxx'), alignment: 'center',
columns: [
{ caption: $translate.instant('remitEmployeeNum'), dataField: "remitEmployeeNum", allowEditing: false, fixed: true },
{ caption: $translate.instant('remitEmployeeName'), dataField: "remitEmployeeName", allowEditing: false, fixed: true },
{ caption: $translate.instant('remitTime'), dataField: "remitTime", allowEditing: false, fixed: true },
{ caption: $translate.instant('remitAmount'), dataField: "remitAmount", allowEditing: false, fixed: true }
]
},
{
caption: $translate.instant('skgsxx'), alignment: 'center',
columns: [
{ caption: $translate.instant('gatheringCompanyName'), dataField: "gatheringCompanyName", allowEditing: false, fixed: true },
{ caption: $translate.instant('gatheringCompanyAccount'), dataField: "gatheringCompanyAccount", allowEditing: false, fixed: true }
]
},
{ caption: $translate.instant('remark'), dataField: "remark", allowEditing: false, fixed: true }
];
$scope.assetsResultGridOptions = {
......
......@@ -30,15 +30,36 @@
function initAssetResultDxGrid() {
var dupColumns = [
{ caption: $translate.instant('ImportErrorPopUpNoCol'), dataField: "index", width: 50, allowEditing: false, fixed: true },
{ caption: $translate.instant('poSubjectName'), dataField: "poSubjectName", width: '30%', allowEditing: false, fixed: true },
/* { caption: $translate.instant('organizationId'), dataField: "organizationId", width: 120, allowEditing: false, fixed: true },
{ caption: $translate.instant('ProjectNameCol'), dataField: "projectName", width: 120, allowEditing: false, fixed: true },*/
{ caption: $translate.instant('period'), dataField: "period", width: '15%', allowEditing: false, fixed: true },
{ caption: $translate.instant('source'), dataField: "source", width: '15%', allowEditing: false, fixed: true },
{ caption: $translate.instant('advancePrice'), dataField: "advance", width: '15%', allowEditing: false, fixed: true },
{ caption: $translate.instant('approvedPrice'), dataField: "approvedStandardInvoiceAmount", width: 200, allowEditing: false, fixed: true },
/* { caption: $translate.instant('createBy'), dataField: "createdBy", width: 200, allowEditing: false, fixed: true },*/
{ caption: $translate.instant('createTime'), dataField: "createTime", width: '15%', allowEditing: false, fixed: true }
{ caption: $translate.instant('poNo'), dataField: "poNo", allowEditing: false, fixed: true },
{ caption: $translate.instant('poRow'), dataField: "poRow", allowEditing: false, fixed: true },
{ caption: "PO创建日期", dataField: "createTime", allowEditing: false, fixed: true },
{ caption: $translate.instant('ladingBillPerson'), dataField: "ladingBillPerson", allowEditing: false, fixed: true },
{ caption: $translate.instant('purchasePerson'), dataField: "purchasePerson", width: 200, allowEditing: false, fixed: true },
{ caption: $translate.instant('poSubjectCode'), dataField: "poSubjectCode", allowEditing: false, fixed: true },
{ caption: $translate.instant('poSubjectName'), dataField: "poSubjectName", allowEditing: false, fixed: true },
{ caption: $translate.instant('costCenterCode'), dataField: "costCenterCode", allowEditing: false, fixed: true },
{ caption: $translate.instant('costCenter'), dataField: "costCenter", allowEditing: false, fixed: true },
{ caption: $translate.instant('supplier'), dataField: "supplier", allowEditing: false, fixed: true },
{ caption: $translate.instant('item'), dataField: "item", allowEditing: false, fixed: true },
{ caption: $translate.instant('standardMoney'), dataField: "standardMoney", allowEditing: false, fixed: true },
{ caption: $translate.instant('currency'), dataField: "currency", allowEditing: false, fixed: true },
{ caption: $translate.instant('orderAmount'), dataField: "orderAmount", allowEditing: false, fixed: true },
{ caption: $translate.instant('executedServiceSchedule'), dataField: "executedServiceSchedule", allowEditing: false, fixed: true },
{ caption: $translate.instant('coupaTotalAccept'), dataField: "coupaTotalAccept", allowEditing: false, fixed: true },
{ caption: $translate.instant('advance'), dataField: "advance", allowEditing: false, fixed: true },
{ caption: $translate.instant('unexecutedServiceSchedule'), dataField: "unexecutedServiceSchedule", allowEditing: false, fixed: true },
{ caption: $translate.instant('approvedStandardInvoiceAmount'), dataField: "approvedStandardInvoiceAmount", allowEditing: false, fixed: true },
{ caption: $translate.instant('paidInvoiceAmount'), dataField: "paidInvoiceAmount", allowEditing: false, fixed: true },
{ caption: $translate.instant('usableInvoiceAmount'), dataField: "usableInvoiceAmount", allowEditing: false, fixed: true },
{ caption: $translate.instant('usableBalance'), dataField: "usableBalance", allowEditing: false, fixed: true },
{ caption: $translate.instant('advanceWriteOff'), dataField: "advanceWriteOff", allowEditing: false, fixed: true },
{ caption: $translate.instant('checkOne'), dataField: "checkOne", allowEditing: false, fixed: true },
{ caption: $translate.instant('reclassifyAmount'), dataField: "reclassifyAmount", allowEditing: false, fixed: true },
{ caption: $translate.instant('exchangeRate'), dataField: "exchangeRate", allowEditing: false, fixed: true },
{ caption: $translate.instant('ledgerId'), dataField: "ledgerId", allowEditing: false, fixed: true },
{ caption: $translate.instant('debitAdvanceGene'), dataField: "debitAdvanceGene", allowEditing: false, fixed: true },
{ caption: $translate.instant('creditPrepaidAccounts'), dataField: "creditPrepaidAccounts", allowEditing: false, fixed: true },
{ caption: $translate.instant('remark'), dataField: "remark", allowEditing: false, fixed: true }
];
$scope.assetsResultGridOptions = {
......@@ -77,10 +98,8 @@
visible: true
},
onRowUpdating: function (e) {
},
onToolbarPreparing: function (e) {
}
}
}
......@@ -110,7 +129,6 @@
var initListData = function(){
citPreviewDataService.getCitPreviewSalaryAdvanceDataList($scope.queryParams).success(function (res) {
$scope.listData = commonWebService._index(res.list);
$scope.queryParams.pagingOptions.totalItems = res.pageInfo.totalCount;
//$scope.$apply();
......
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