Commit 77ed2226 authored by gary's avatar gary

1、excel导入-发票记录

2、excel导入-已认证发票清单
parent 13db73b9
......@@ -135,6 +135,19 @@ public class DateUtils {
return period;
}
/**
* 将yyyymm 字符串转换为区间格式 yyyyMM
*
* @param dateStr
* @return
*/
public static Integer strToPeriod2(String dateStr) {
dateStr = dateStr.replace(" ","");
Integer period = Integer.valueOf(dateStr);
return period;
}
/**
* 将短时间格式字符串转换为时间 yyyy-MM-dd
*
......@@ -175,6 +188,19 @@ public class DateUtils {
return strtodate;
}
/**
* 将短时间格式字符串转换为时间 yyyy-MM-dd
*
* @param strDate
* @return
*/
public static Date strToDate4(String strDate) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
ParsePosition pos = new ParsePosition(0);
Date strtodate = formatter.parse(strDate, pos);
return strtodate;
}
/**
* 得到现在时间
*
......
......@@ -8,7 +8,9 @@ public enum EnumImportType {
AdjustmentTable(4),
CashFlow(5),
CoupaPurchasingReport(6),
InvoiceData(7)
InvoiceData(7),
CertifiedInvoicesList(8),
InvoiceRecord(9)
;
private Integer code;
......
......@@ -164,6 +164,39 @@ public class DataImportController extends BaseController {
}
}
@ResponseBody
@RequestMapping(value = "IRExcelFile", method = RequestMethod.POST)
public OperationResultDto importIRExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
}
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
return dataImportService.importIRExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("importIRExcelFile error.", e);
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
@ResponseBody
@RequestMapping(value = "CILExcelFile", method = RequestMethod.POST)
public OperationResultDto importCILExcelFile(@RequestParam MultipartFile file,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
}
return dataImportService.importCILExcelFile(file, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("importCILExcelFile error.", e);
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
@ResponseBody
@RequestMapping(value = "displayImportLog", method = RequestMethod.GET)
public List<DataImportLogDto> displayImportLog(@RequestParam Integer type) {
......
package pwc.taxtech.atms.vat.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.MyVatMapper;
import pwc.taxtech.atms.vat.entity.CertifiedInvoicesList;
import pwc.taxtech.atms.vat.entity.CertifiedInvoicesListExample;
@Mapper
public interface CertifiedInvoicesListMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
long countByExample(CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int deleteByExample(CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int insert(CertifiedInvoicesList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int insertSelective(CertifiedInvoicesList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
List<CertifiedInvoicesList> selectByExampleWithRowbounds(CertifiedInvoicesListExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
List<CertifiedInvoicesList> selectByExample(CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
CertifiedInvoicesList selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") CertifiedInvoicesList record, @Param("example") CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int updateByExample(@Param("record") CertifiedInvoicesList record, @Param("example") CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(CertifiedInvoicesList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int updateByPrimaryKey(CertifiedInvoicesList record);
int insertBatch(List<CertifiedInvoicesList> cils);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.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.MyVatMapper;
import pwc.taxtech.atms.vat.entity.InvoiceRecord;
import pwc.taxtech.atms.vat.entity.InvoiceRecordExample;
@Mapper
public interface InvoiceRecordMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
long countByExample(InvoiceRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
int deleteByExample(InvoiceRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
int insert(InvoiceRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
int insertSelective(InvoiceRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
List<InvoiceRecord> selectByExampleWithRowbounds(InvoiceRecordExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
List<InvoiceRecord> selectByExample(InvoiceRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
InvoiceRecord selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") InvoiceRecord record, @Param("example") InvoiceRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
int updateByExample(@Param("record") InvoiceRecord record, @Param("example") InvoiceRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(InvoiceRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table invoice_record
*
* @mbg.generated
*/
int updateByPrimaryKey(InvoiceRecord record);
int insertBatch(List<InvoiceRecord> cils);
}
\ No newline at end of file
......@@ -23,7 +23,6 @@
var error, expand_all_parents, expand_level, for_all_ancestors, for_each_branch, get_parent, n, on_treeData_change, select_branch, selected_branch, tree;
error = function (s) {
console.log('ERROR:' + s);
debugger;
return void 0;
};
if (attrs.iconExpand == null) {
......@@ -488,7 +487,6 @@
tree.last_descendant = function (b) {
var last_child;
if (b == null) {
debugger;
}
n = b.children.length;
if (n === 0) {
......
......@@ -1270,6 +1270,24 @@ var dataImpModule = angular.module('app.dataImp', ['ui.grid', 'ui.router','ui.gr
sticky: true
});
$stateProvider.state({
name: 'certifiedInvoicesListImportDistribution',
url: "/importDistribution/certifiedInvoicesList",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<data-import-certified-invoices-list></data-import-certified-invoices-list>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.dataImp),
sticky: true
});
$stateProvider.state({
name: 'citJournalAdjustImportDistribution',
url: "/importDistribution/citJournalAdjust",
......
......@@ -548,6 +548,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
loadEnterpriseAccountSetList();
getAllDimensionList();
loadprojectClient();
initDatePicker();
};
// 验证账套
......@@ -981,7 +982,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 登记状态
$scope.regStatusList = constant.RegStatusList;
$scope.architectureTypeList = constant.ArchitectureTypeList;
$scope.trueFalse = constant.TrueFalse;
$scope.trueFalse = constant.trueFalse;
};
// 省改变时联动市
......@@ -1048,6 +1049,14 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
};
};
var initDatePicker = function () {
$('.startDatepicker').datepicker({
format: "yyyy/mm/dd",
startDate: new Date().formatDateTime('yyyy-MM-dd'),
minuteStep: 10
});
};
// 获取修改机构的时候,自定义维度列表
var getUpdateOrgSetDimension = function (orgid, dimensionValueOrgList) {
var dimensionList = _.filter($scope.dimensionList, function (data) {
......
......@@ -674,7 +674,6 @@
};
var downloadTemplate = function () {
$('#busy-indicator-container').show();
templateService.downloadTemplate(constant.importFileType.adjustmentTable).success(function (data, status, headers) {
var octetStreamMime = 'application/octet-stream';
var contentType = headers('content-type') || octetStreamMime;
......@@ -701,7 +700,6 @@
}).error(function () {
SweetAlert.error($translate.instant('PleaseContactAdministrator'));
});
$('#busy-indicator-container').hide();
};
//导入事件
......
......@@ -33,12 +33,12 @@
<button type="button" atms-permission permission-control-type="ngIf"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate="AddImportBtn"
ng-click="doUploadPL(importEnum.AddImport)"></button>
ng-click="doUploadBS(importEnum.AddImport)"></button>
<button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate="CoverImportBtn"
ng-click="doUploadPL(importEnum.CoverImport)"></button>
ng-click="doUploadBS(importEnum.CoverImport)"></button>
......
......@@ -672,7 +672,6 @@
//导入事件
var doUploadPL = function (importType) {
debugger;
var impExl = $scope.importExcelFile;
var deferred = $q.defer();
......
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