Commit bf6eff9a authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 062c42aa 7870d491
......@@ -295,6 +295,11 @@
<artifactId>reflectasm</artifactId>
<version>1.11.7</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
......@@ -569,6 +574,15 @@
<artifactId>sonar-maven-plugin</artifactId>
<version>3.4.0.905</version>
</plugin>
<!--忽略Junit测试-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
package pwc.taxtech.atms.common;
import com.github.pagehelper.PageInfo;
import lombok.Data;
import java.util.List;
/**
* TODO
*
* @Description :
*/
@Data
public class PageResultVo<T> {
private Integer pageNo;
private Integer pageSize;
private Long total;
private List<T> list;
public static <T> PageResultVo getPageResultVo(PageInfo pageInfo, List<T> list) {
PageResultVo<T> resultVo = new PageResultVo<>();
resultVo.setPageSize(pageInfo.getPageSize());
resultVo.setPageNo(pageInfo.getPageNum());
resultVo.setTotal(pageInfo.getTotal());
resultVo.setList(list);
return resultVo;
}
}
......@@ -93,7 +93,6 @@ public class DataImportController extends BaseController {
@RequestMapping(value = "RLITExcelFile", method = RequestMethod.POST)
public OperationResultDto importRLITExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
didiFileUploadService.uploadFile(file,"aaaa.xlsx","didi");
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
String valMsg = valParameter(file,orgList,periodDate);
if(StringUtils.isNotEmpty(valMsg)){
......
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import pwc.taxtech.atms.dto.ReturnData;
import pwc.taxtech.atms.entity.FileTypes;
import pwc.taxtech.atms.service.impl.FileTypesServiceImpl;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Controller
@RequestMapping("/api/v1/fileTypes")
public class FileTypesController {
@Autowired
private FileTypesServiceImpl fileTypesService;
/**
* 查询档案文件类型列表
* @return
*/
@RequestMapping("selectList")
@ResponseBody
public ReturnData selectFileTypesList(){
List<FileTypes> fileTypes = fileTypesService.selectFileTypesList();
ReturnData returnData = new ReturnData();
returnData.setItems(fileTypes);
returnData.setTotalCount(fileTypes.size());
return returnData;
}
/**
* 查询档案属性和档案类型给前端下拉选择框
* @return
*/
@PostMapping("/query4SelectionBox")
@ResponseBody
public Map<String,String> query4SelectionBox(){
// public Map<String,Map<Long,String>> query4SelectionBox(){
List<FileTypes> fileTypes = fileTypesService.query4SelectionBox();
// Map<Long,String> fileAttrList = fileTypes.stream().collect(Collectors.toMap(FileTypes::getId,FileTypes::getFileAttr));
// Map<Long,String> fileTypeList = fileTypes.stream().collect(Collectors.toMap(FileTypes::getId,FileTypes::getFileType));
Map<String,String> result = fileTypes.stream().collect(Collectors.toMap(FileTypes::getFileType,FileTypes::getFileAttr));
// Map<String,Map<Long,String>> result = new HashMap<>();
// result.put("fileAttrList",fileAttrList);
// result.put("fileTypeList",fileTypeList);
return result;
}
/**
* 添加档案文件类型
* @param fileTypes
* @return
*/
@PostMapping("add")
@ResponseBody
public boolean addFileTypes(@RequestBody FileTypes fileTypes){
return fileTypesService.addFileTypesList(fileTypes);
}
/**
* 删除档案文件类型
* @param fileTypes
* @return
*/
@PostMapping("delete")
@ResponseBody
public boolean deleteFileTypes(@RequestBody FileTypes fileTypes){
return fileTypesService.deleteFileTypes(fileTypes.getId());
}
/**
* 更新档案文件类型
* @param fileTypes
* @return
*/
@PostMapping("edit")
@ResponseBody
public boolean editFileTypes(@RequestBody FileTypes fileTypes){
return fileTypesService.editFilesType(fileTypes);
}
/**
* 导出excel
* @param response
*/
@RequestMapping("exportExcel")
@ResponseBody
public void exportExcelFile (HttpServletResponse response){
try {
Map<String, String> headers = new HashMap<String, String>();
headers.put("id", "id");
headers.put("file_attr", "档案属性");
headers.put("file_type", "档案类型");
headers.put("description", "说明");
headers.put("creator", "办事人");
headers.put("create_time", "创建时间");
headers.put("update_time", "更新时间");
headers.put("status", "状态");
headers.put("remarks", "备注");
List<FileTypes> fileTypes = fileTypesService.selectFileTypesList();
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("".getBytes("GB2312"), "ISO-8859-1"));
OutputStream ouputStream = response.getOutputStream();
ExcelUtil.exportExcel(headers, fileTypes, ouputStream);
}catch(Exception e){
e.printStackTrace();
}
}
}
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import pwc.taxtech.atms.dto.ReturnData;
import pwc.taxtech.atms.entity.OperationLogFileType;
import pwc.taxtech.atms.service.impl.OperationLogFileTypeServiceImpl;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/api/v1/operLogFileTypes")
public class OperationLogFileTypeController {
@Autowired
private OperationLogFileTypeServiceImpl operationLogFileTypeService;
/**
* 查询文件档案操作日志列表
* @return
*/
@RequestMapping("selectList")
@ResponseBody
public ReturnData selectFileTypesList(){
List<OperationLogFileType> operationLogFileType = operationLogFileTypeService.selectFileTypesList();
ReturnData returnData = new ReturnData();
returnData.setItems(operationLogFileType);
returnData.setTotalCount(operationLogFileType.size());
return returnData;
}
/**
* 添加文件档案操作日志
* @param operationLogFileType
* @return
*/
@RequestMapping("add")
@ResponseBody
public boolean addFileTypes(OperationLogFileType operationLogFileType){
return operationLogFileTypeService.addFileTypesList(operationLogFileType);
}
/**
* 删除文件档案操作日志
* @param id
* @return
*/
@RequestMapping("delete")
@ResponseBody
public boolean deleteFileTypes(String id){
return operationLogFileTypeService.deleteFileTypes(id);
}
/**
* 更新文件档案操作日志
* @param operationLogFileType
* @return
*/
@RequestMapping("edit")
@ResponseBody
public boolean editFileTypes(OperationLogFileType operationLogFileType){
return operationLogFileTypeService.editFilesType(operationLogFileType);
}
/**
* 导出文件档案操作日志
* @param response
*/
@RequestMapping("exportExcel")
@ResponseBody
public void exportExcelFile (HttpServletResponse response){
try {
Map<String, String> headers = new HashMap<String, String>();
headers.put("id", "id");
headers.put("operation_content", "操作内容");
headers.put("module_name", "模块名称");
headers.put("operation_object", "操作对象");
headers.put("operation_action", "操作action");
headers.put("original_state", "原始状态");
headers.put("update_state", "更新状态");
headers.put("operation_user", "操作者");
headers.put("ip", "操作ip");
headers.put("comment", "内容");
headers.put("create_time", "创建时间");
List<OperationLogFileType> fileTypes = operationLogFileTypeService.selectFileTypesList();
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("".getBytes("GB2312"), "ISO-8859-1"));
OutputStream ouputStream = response.getOutputStream();
ExcelUtil.exportExcel(headers, fileTypes, ouputStream);
}catch(Exception e){
e.printStackTrace();
}
}
}
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import pwc.taxtech.atms.dto.ReturnData;
import pwc.taxtech.atms.entity.OperationLogTaxDocument;
import pwc.taxtech.atms.service.impl.OperationLogTaxDocServiceImpl;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/api/v1/operLogTaxDoc")
public class OperationLogTaxDocController {
@Autowired
private OperationLogTaxDocServiceImpl operationLogTaxDocService;
@RequestMapping("selectList")
@ResponseBody
public ReturnData selectTaxDocumentList(){
List<OperationLogTaxDocument> operationLogTaxDocuments = operationLogTaxDocService.selectTaxDocumentList();
ReturnData returnData = new ReturnData();
returnData.setItems(operationLogTaxDocuments);
returnData.setTotalCount(operationLogTaxDocuments.size());
return returnData;
}
@RequestMapping("add")
@ResponseBody
public boolean addTaxDocuments(OperationLogTaxDocument operationLogTaxDocument){
return operationLogTaxDocService.addTaxDocumentList(operationLogTaxDocument);
}
@RequestMapping("delete")
@ResponseBody
public boolean deleteTaxDocuments(String id){
return operationLogTaxDocService.deleteTaxDocument(id);
}
@RequestMapping("edit")
@ResponseBody
public boolean editTaxDocuments(OperationLogTaxDocument operationLogTaxDocument){
return operationLogTaxDocService.editFilesType(operationLogTaxDocument);
}
@RequestMapping("exportExcel")
@ResponseBody
public void exportExcelFile (HttpServletResponse response){
try {
Map<String, String> headers = new HashMap<String, String>();
headers.put("id", "id");
headers.put("operation_content", "操作内容");
headers.put("module_name", "模块名称");
headers.put("operation_object", "操作对象");
headers.put("operation_action", "操作action");
headers.put("original_state", "原始状态");
headers.put("update_state", "更新状态");
headers.put("operation_user", "操作者");
headers.put("ip", "操作ip");
headers.put("comment", "内容");
headers.put("create_time", "创建时间");
List<OperationLogTaxDocument> TaxDocuments = operationLogTaxDocService.selectTaxDocumentList();
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("".getBytes("GB2312"), "ISO-8859-1"));
OutputStream ouputStream = response.getOutputStream();
ExcelUtil.exportExcel(headers, TaxDocuments, ouputStream);
}catch(Exception e){
e.printStackTrace();
}
}
}
package pwc.taxtech.atms.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.PageResultVo;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.dto.TaxDocumentDto;
import pwc.taxtech.atms.entity.TaxDocument;
import pwc.taxtech.atms.service.impl.TaxDocumentServiceImpl;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Controller
@RequestMapping("/api/v1/taxDoc")
public class TaxDocumentController {
@Autowired
private TaxDocumentServiceImpl taxDocumentService;
@PostMapping("selectList")
@ResponseBody
public PageResultVo<TaxDocument> selectTaxDocumentList(@RequestBody TaxDocumentDto taxDocumentDto) {
Page<TaxDocument> page = PageHelper.startPage(taxDocumentDto.getCurrentPage(), taxDocumentDto.getPageSize());
taxDocumentService.selectTaxDocumentList(taxDocumentDto);
PageInfo<TaxDocument> taxDocumentPageInfo = page.toPageInfo();
List<TaxDocument> list = taxDocumentPageInfo.getList();
return PageResultVo.getPageResultVo(taxDocumentPageInfo, list);
}
@PostMapping("/queryWhetherData")
@ResponseBody
public boolean queryWhetherData(@RequestBody TaxDocument taxDocument) {
return taxDocumentService.queryWhetherData(taxDocument);
}
@PostMapping("add")
@ResponseBody
public boolean addTaxDocument(@RequestBody TaxDocument taxDocument) {
return taxDocumentService.addTaxDocumentList(taxDocument);
}
@PostMapping("delete")
@ResponseBody
public boolean deleteTaxDocument(@RequestBody TaxDocument taxDocument) {
return taxDocumentService.deleteTaxDocument(taxDocument.getId());
}
@PostMapping("/batchDelete")
@ResponseBody
public boolean batchDelete(@RequestBody TaxDocumentDto taxDocumentDto) {
return taxDocumentService.batchDelete(taxDocumentDto.getIds());
}
@PostMapping("edit")
@ResponseBody
public boolean editTaxDocument(@RequestBody TaxDocument taxDocument) {
return taxDocumentService.editFilesType(taxDocument);
}
@RequestMapping("exportExcel")
@ResponseBody
public void exportExcelFile(HttpServletResponse response,@RequestBody TaxDocumentDto taxDocumentDto) {
try {
Map<String, String> headers = new HashMap<String, String>();
headers.put("id", "id");
headers.put("file_attr", "档案属性");
headers.put("file_type", "档案类型");
headers.put("file_name", "档案名称");
headers.put("business_line", "业务线");
headers.put("company_name", "公司名称");
headers.put("tax_type", "税种");
headers.put("file_time", "文件日期");
headers.put("effective_time", "有效日期");
headers.put("creator", "创建人");
headers.put("create_time", "创建时间");
headers.put("upload_time", "上传日期");
headers.put("storage_area", "实物存放地点");
headers.put("keeper", "保管人");
headers.put("remark", "档案备注");
headers.put("file_position_url", "文件存储的位置");
List<TaxDocument> TaxDocument = taxDocumentService.selectTaxDocumentList(taxDocumentDto);
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("".getBytes("GB2312"), "ISO-8859-1"));
OutputStream ouputStream = response.getOutputStream();
ExcelUtil.exportExcel(headers, TaxDocument, ouputStream);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 文件上传接口 createByZhangzezheng
*
* @param picture 图片文件
* @param modual 模块名
* @return
*/
@RequestMapping("upload")
@ResponseBody
public String upload(@RequestPart("file") MultipartFile picture, @RequestParam(required = false) String modual) {
String fileName = picture.getOriginalFilename();
String pictureName = UUID.randomUUID().toString() + fileName.substring(fileName.lastIndexOf("."));
String dir = DateUtils.getStringDateShort();
String typePath = "";
try {
String fileSavePath = File.separator + "images";
if (StringUtils.isBlank(modual)) {
modual = "default";
}
if (StringUtils.isNotBlank(modual)) {
typePath = modual + File.separator + dir;
}
File basePath = new File(fileSavePath + File.separator + typePath);
if (!basePath.exists()) {
basePath.mkdirs();
}
picture.transferTo(new File(fileSavePath + File.separator + typePath + File.separator + pictureName));
} catch (Exception e) {
e.printStackTrace();
}
return "images" + File.separator + typePath + File.separator + pictureName;
}
}
package pwc.taxtech.atms.dto;
import java.util.List;
public class ReturnData {
int totalCount;
List items;
public ReturnData(int totalCount, List items) {
this.totalCount = totalCount;
this.items = items;
}
public ReturnData() {
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public List getItems() {
return items;
}
public void setItems(List items) {
this.items = items;
}
}
package pwc.taxtech.atms.dto;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 档案列表查询传输对象
*/
public class TaxDocumentDto {
private int currentPage = 1;
private int pageSize = 10;
private String fileAttr;//档案属性
private Integer fileTypeId;//文件类型的id
private String fileType;//档案类型
private String fileName;//档案名称
private String businessLine;//业务线
private Integer companyId;//公司代码Id
private String companyName;//公司名称
private String taxType;//税种
private Date fileBeginTime;//文件生效日期_开始
private Date fileEndTTime;//文件生效日期_结束
private Date effectiveBeginTime;//到期日_开始
private Date effectiveEndTime;//到期日_结束
private String storageArea;//实物存放地点
private String remark;//档案备注
private String filePositionUrl;//文件存储的位置
private String creator;//创建人
private Date uploadBeginTime;//上传日期_开始
private Date uploadEndTime;//上传日期_结束
private String keeper;//实物保管人
private String physicalIndexNumber;//实物索引号
private Date ownBeginTime;//所属期间_开始
private Date ownEndTime;//所属期间_结束
private Integer auditStatus;//审核状态
private String fileOriginalName;//上传文件原名
private List<Long> ids = new ArrayList<>();//批量删除id
public List<Long> getIds() {
return ids;
}
public void setIds(List<Long> ids) {
this.ids = ids;
}
public String getFileOriginalName() {
return fileOriginalName;
}
public void setFileOriginalName(String fileOriginalName) {
this.fileOriginalName = fileOriginalName;
}
public Date getFileBeginTime() {
return fileBeginTime;
}
public void setFileBeginTime(Date fileBeginTime) {
this.fileBeginTime = fileBeginTime;
}
public Date getFileEndTTime() {
return fileEndTTime;
}
public void setFileEndTTime(Date fileEndTTime) {
this.fileEndTTime = fileEndTTime;
}
public Date getEffectiveBeginTime() {
return effectiveBeginTime;
}
public void setEffectiveBeginTime(Date effectiveBeginTime) {
this.effectiveBeginTime = effectiveBeginTime;
}
public Date getEffectiveEndTime() {
return effectiveEndTime;
}
public void setEffectiveEndTime(Date effectiveEndTime) {
this.effectiveEndTime = effectiveEndTime;
}
public Date getOwnBeginTime() {
return ownBeginTime;
}
public void setOwnBeginTime(Date ownBeginTime) {
this.ownBeginTime = ownBeginTime;
}
public Date getOwnEndTime() {
return ownEndTime;
}
public void setOwnEndTime(Date ownEndTime) {
this.ownEndTime = ownEndTime;
}
public String getPhysicalIndexNumber() {
return physicalIndexNumber;
}
public void setPhysicalIndexNumber(String physicalIndexNumber) {
this.physicalIndexNumber = physicalIndexNumber;
}
public Integer getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(Integer auditStatus) {
this.auditStatus = auditStatus;
}
public String getKeeper() {
return keeper;
}
public void setKeeper(String keeper) {
this.keeper = keeper;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public Date getUploadBeginTime() {
return uploadBeginTime;
}
public void setUploadBeginTime(Date uploadBeginTime) {
this.uploadBeginTime = uploadBeginTime;
}
public Date getUploadEndTime() {
return uploadEndTime;
}
public void setUploadEndTime(Date uploadEndTime) {
this.uploadEndTime = uploadEndTime;
}
public String getFileAttr() {
return fileAttr;
}
public void setFileAttr(String fileAttr) {
this.fileAttr = fileAttr;
}
public Integer getFileTypeId() {
return fileTypeId;
}
public void setFileTypeId(Integer fileTypeId) {
this.fileTypeId = fileTypeId;
}
public String getFileType() {
return fileType;
}
public void setFileType(String fileType) {
this.fileType = fileType;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getBusinessLine() {
return businessLine;
}
public void setBusinessLine(String businessLine) {
this.businessLine = businessLine;
}
public Integer getCompanyId() {
return companyId;
}
public void setCompanyId(Integer companyId) {
this.companyId = companyId;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getTaxType() {
return taxType;
}
public void setTaxType(String taxType) {
this.taxType = taxType;
}
public String getStorageArea() {
return storageArea;
}
public void setStorageArea(String storageArea) {
this.storageArea = storageArea;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getFilePositionUrl() {
return filePositionUrl;
}
public void setFilePositionUrl(String filePositionUrl) {
this.filePositionUrl = filePositionUrl;
}
public int getCurrentPage() {
return currentPage;
}
public void setCurrentPage(int currentPage) {
this.currentPage = currentPage;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
}
package pwc.taxtech.atms.dto.vatdto;
public class VidCountDto {
private String vid;
private String group;
private Integer period;
public String getVid() {
return vid;
}
public void setVid(String vid) {
this.vid = vid;
}
public String getGroup() {
return group;
}
public void setGroup(String group) {
this.group = group;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public VidCountDto(String vid, String group, Integer period) {
this.vid = vid;
this.group = group;
this.period = period;
}
}
......@@ -22,4 +22,5 @@ public class Exceptions {
public static final FormulaException PROJECT_NOT_FOUND = new FormulaException("project not found");;
public static final FormulaException PSUM_CELL_TEMP_NULL = new FormulaException("cell template group is null or empty");
public static final ApiException NOT_FOUND_INSTANCE_EXCEPTION = new NotFoundException("not found instance");
public static final FormulaException parameterError = new FormulaException("formula parameter is error");
}
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.dao.FileTypesMapper;
import pwc.taxtech.atms.entity.FileTypes;
import pwc.taxtech.atms.entity.FileTypesExample;
import pwc.taxtech.atms.entity.OperationLogFileType;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
* 查询
*/
@Slf4j
@Service
public class FileTypesServiceImpl {
@Resource
private FileTypesMapper fileTypesMapper;
@Autowired
private AuthUserHelper authUserHelper;
@Autowired
private OperationLogFileTypeServiceImpl operationLogFileTypeService;
public List<FileTypes> selectFileTypesList() {
FileTypesExample example = new FileTypesExample();
return fileTypesMapper.selectByExample(example);
}
/**
* 查询档案属性和档案类型给前端下拉选择框
* @return
*/
public List<FileTypes> query4SelectionBox() {
return fileTypesMapper.query4SelectionBox();
}
@Transactional
public boolean addFileTypesList(FileTypes fileTypes) {
try {
//对必填字段进行转换成json对象
requiredFieldFormatToJson(fileTypes);
//设置当前时间 当前创建人信息
fileTypes.setCreateTime(new Date());
fileTypes.setCreator(authUserHelper.getCurrentAuditor().get());
fileTypes.setCreatorId(authUserHelper.getCurrentUserId());
int num = fileTypesMapper.insert(fileTypes);
if (num > 0) {
OperationLogFileType actionEntity = buildOperationLogFileType();
actionEntity.setOperationAction("新增");
actionEntity.setUpdateState(fileTypes.toString());
boolean result = operationLogFileTypeService.addFileTypesList(actionEntity);
if (result) {
return true;
} else {
throw new RuntimeException("FileTypesServiceImpl addFileTypesList log error");
}
} else {
return false;
}
} catch (Exception e) {
log.error("FileTypesServiceImpl addFileTypesList error : " + e.getMessage());
return false;
}
}
@Transactional
public boolean deleteFileTypes(Long id) {
try {
int num = fileTypesMapper.deleteByPrimaryKey(id);
if (num > 0) {
OperationLogFileType actionEntity = buildOperationLogFileType();
actionEntity.setOperationAction("删除");
boolean result = operationLogFileTypeService.addFileTypesList(actionEntity);
if (result) {
return true;
} else {
throw new RuntimeException("FileTypesServiceImpl deleteFileTypes log error");
}
} else {
return false;
}
} catch (Exception e) {
log.error("FileTypesServiceImpl deleteFileTypes error : " + e.getMessage());
return false;
}
}
@Transactional
public boolean editFilesType(FileTypes fileTypes) {
try {
//对必填字段进行转换成json对象
requiredFieldFormatToJson(fileTypes);
fileTypes.setUpdateTime(new Date());
int num = fileTypesMapper.updateByPrimaryKey(fileTypes);
if (num > 0) {
OperationLogFileType actionEntity = buildOperationLogFileType();
actionEntity.setOperationAction("更新");
//设置更新值
actionEntity.setOriginalState(fileTypesMapper.selectByPrimaryKey(fileTypes.getId()).toString());
actionEntity.setUpdateState(fileTypes.toString());
boolean result = operationLogFileTypeService.addFileTypesList(actionEntity);
if (result) {
return true;
} else {
throw new RuntimeException("FileTypesServiceImpl editFilesType log error");
}
} else {
return false;
}
} catch (Exception e) {
log.error("FileTypesServiceImpl editFilesType error : " + e.getMessage());
return false;
}
}
/**
* 构建日志对象
*
* @return
*/
private OperationLogFileType buildOperationLogFileType() {
OperationLogFileType actionEntity = new OperationLogFileType();
actionEntity.setId("FileType:"+UUID.randomUUID().toString());
actionEntity.setOperationContent("系统管理");
actionEntity.setModuleName("档案管理");
actionEntity.setOperationObject("税务档案类型设置");
actionEntity.setOperationUser(authUserHelper.getCurrentAuditor().get());
actionEntity.setIp(authUserHelper.getClientIp());
actionEntity.setCreateTime(new Date());
return actionEntity;
}
/**
* 对必填字段进行格式化为JSON 存到数据库中
*
* @param fileTypes
*/
private void requiredFieldFormatToJson(FileTypes fileTypes) {
if (fileTypes.getRequiredField().size() > 0) {
String requiredFieldJson = JSONObject.toJSONString(fileTypes.getRequiredField());
fileTypes.setRequiredFieldJson(requiredFieldJson);
}
}
}
package pwc.taxtech.atms.service.impl;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.OperationLogFileTypeMapper;
import pwc.taxtech.atms.entity.OperationLogFileType;
import pwc.taxtech.atms.entity.OperationLogFileTypeExample;
import javax.annotation.Resource;
import java.util.List;
/**
* 查询
*/
@Service
public class OperationLogFileTypeServiceImpl {
@Resource
private OperationLogFileTypeMapper operationLogFileTypeMapper;
public List<OperationLogFileType> selectFileTypesList(){
OperationLogFileTypeExample example = new OperationLogFileTypeExample();
return operationLogFileTypeMapper.selectByExample(example);
}
public boolean addFileTypesList(OperationLogFileType operationLogFileType){
int num = operationLogFileTypeMapper.insert(operationLogFileType);
if(num>0){
return true;
}else{
return false;
}
}
public boolean deleteFileTypes(String id){
int num = operationLogFileTypeMapper.deleteByPrimaryKey(id);
if(num>0){
return true;
}else{
return false;
}
}
public boolean editFilesType(OperationLogFileType operationLogFileType){
int num = operationLogFileTypeMapper.updateByPrimaryKey(operationLogFileType);
if(num>0){
return true;
}else{
return false;
}
}
}
package pwc.taxtech.atms.service.impl;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.OperationLogTaxDocumentMapper;
import pwc.taxtech.atms.entity.OperationLogTaxDocument;
import pwc.taxtech.atms.entity.OperationLogTaxDocumentExample;
import javax.annotation.Resource;
import java.util.List;
/**
* 查询
*/
@Service
public class OperationLogTaxDocServiceImpl {
@Resource
private OperationLogTaxDocumentMapper operationLogTaxDocumentMapper;
public List<OperationLogTaxDocument> selectTaxDocumentList(){
OperationLogTaxDocumentExample example = new OperationLogTaxDocumentExample();
return operationLogTaxDocumentMapper.selectByExample(example);
}
public boolean addTaxDocumentList(OperationLogTaxDocument operationLogTaxDocument){
int num = operationLogTaxDocumentMapper.insert(operationLogTaxDocument);
if(num>0){
return true;
}else{
return false;
}
}
public boolean deleteTaxDocument(String id){
int num = operationLogTaxDocumentMapper.deleteByPrimaryKey(id);
if(num>0){
return true;
}else{
return false;
}
}
public boolean editFilesType(OperationLogTaxDocument operationLogTaxDocument){
int num = operationLogTaxDocumentMapper.updateByPrimaryKey(operationLogTaxDocument);
if(num>0){
return true;
}else{
return false;
}
}
}
......@@ -132,4 +132,11 @@ public class FormulaAgent {
return cellData;
}
public List<CellTemplatePerGroupDto> getCellDataByPos(Long templateId, Integer period, String cellRow, String cellCol, String projectId){
return adminMp.getCellDataByPos(templateId, period, cellRow, cellCol, projectId);
}
public List<CellTemplatePerGroupDto> getTableData(String tableName, String getField, String selectFilter, String year, String selectPeriod) {
return adminMp.getTableData(tableName, getField, selectFilter, year, selectPeriod);
}
}
......@@ -552,6 +552,8 @@ public class ReportServiceImpl extends BaseService {
private ProfitLossStatementMapper profitLossStatementMapper;
@Autowired
private JournalEntryMapper journalEntryMapper;
@Autowired
private DataUtil dataUtil;
/* @Autowired
private CitJour*/
//数据校验
......@@ -593,7 +595,7 @@ public class ReportServiceImpl extends BaseService {
Map<String, Object> map = new HashMap<>();
map.put("period", periodParam);
map.put("projectId", projectId);
Map<String, Object> mapProject = new DataUtil().getProjectById(projectId);
Map<String, Object> mapProject = dataUtil.getProjectById(projectId);
map.put("companyCode", mapProject.get("code"));
map.put("companyName", mapProject.get("name"));
List<JournalEntry> journalEntries = journalEntryMapper.selectNowAdjustData(map2);
......@@ -623,8 +625,14 @@ public class ReportServiceImpl extends BaseService {
setStatus(genJob, STATUS_END);
map.put("validateResult", "success");
map.put("result", "");
map.put("tmsPeriod", journalEntries.get(0).getTmsPeriod());
map.put("organizationId", journalEntries.get(0).getOrganizationId());
if(journalEntries.size()==0){
map.put("tmsPeriod", 0);
}else{
map.put("tmsPeriod", journalEntries.get(0).getTmsPeriod());
}
map.put("organizationId", mapProject.get("organizationId"));
insertDataValidateResult(map);
periodJobMapper.updateByPrimaryKey(genJob);
}
......
......@@ -10,9 +10,8 @@ import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.vat.entity.PeriodDataSource;
import pwc.taxtech.atms.vat.entity.PeriodDataSourceDetail;
import pwc.taxtech.atms.vat.entity.PeriodFormulaBlock;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.FormulaAgent;
import java.lang.reflect.Field;
......@@ -139,7 +138,7 @@ public class FunctionBase {
dataSource.setPeriod(period);
dataSource.setProjectId(projectId);
SpringContextUtil.periodDataSourceMapper.insertSelective(dataSource);
if(CollectionUtils.isNotEmpty(dataSourceList)){
if (CollectionUtils.isNotEmpty(dataSourceList)) {
for (Object obj : dataSourceList) {
if (obj.getClass() == java.util.ArrayList.class) {
for (Object obj2 : (ArrayList<Object>) obj) {
......@@ -163,7 +162,7 @@ public class FunctionBase {
SpringContextUtil.periodDataSourceDetailMapper.insertSelective(dataSourceDetail);
}
}
}else{
} else {
PeriodDataSourceDetail dataSourceDetail = new PeriodDataSourceDetail();
dataSourceDetail.setId(SpringContextUtil.distributedIdService.nextId());
dataSourceDetail.setDataSourceId(dataSourceId);
......@@ -214,10 +213,10 @@ public class FunctionBase {
String evalStr = OperandResolver.coerceValueToString(eval);
LOGGER.debug("[Formula_debug] eval other cell value {}", evalStr);
try {
BigDecimal bigDecimal= new BigDecimal(evalStr);
BigDecimal bigDecimal = new BigDecimal(evalStr);
if (!dss.isEmpty()) {
return bigDecimal.add(dss.get(0).getAmount());
}else {
return bigDecimal.add(dss.get(0).getAmount());
} else {
return bigDecimal;
}
} catch (Exception e) {
......@@ -230,4 +229,35 @@ public class FunctionBase {
return new BigDecimal(0);
}
public String StringBuddler(String target, String design) {
if (target.equals("")) {
target = design;
} else {
target = target + ", " + design;
}
return target;
}
public Long getSUM2Data(Long reportTemplateId, Integer period, Map map) {
String bufferString = "";
Long refValue = null;
PeriodCellTemplateExample example = new PeriodCellTemplateExample();
PeriodCellTemplateExample.Criteria criteria = example.createCriteria();
criteria.andReportTemplateIdEqualTo(reportTemplateId);
criteria.andPeriodEqualTo(period);
criteria.andColumnIndexEqualTo(Integer.parseInt(map.get("colIndex").toString()));
criteria.andRowIndexBetween(Integer.parseInt(map.get("rowIndexBegin").toString()), Integer.parseInt(map.get("rowIndexEnd").toString()));
List<PeriodCellTemplate> periodCellTemplates = SpringContextUtil.periodCellTemplateMapper.selectByExample(example);
for (PeriodCellTemplate p : periodCellTemplates) {
StringBuddler(bufferString, p.getCellTemplateId().toString());
}
List<PeriodCellData> list = SpringContextUtil.periodCellDataMapper.selectDataByCellTemplateIdAround(bufferString);
for (PeriodCellData periodCellData : list) {
if (refValue == null) refValue = Long.parseLong(periodCellData.getData());
refValue += Long.parseLong(periodCellData.getData());
}
return refValue;
}
}
package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverInteger;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
/**
* @ClassName RSUMIF
* Description TODO 公式还需要校验
* @Author pwc kevin
* @Date 3/8/2019 5:21 PM
* Version 1.0
**/
public class RSUMIF extends FunctionBase implements FreeRefFunction {
final static ValueEval defaultEval = new StringEval("0");
static final Logger LOGGER = LoggerFactory.getLogger(BB.class);
String tableName;
String getField;//取值列字段
Map<String, String> fileterMap = new HashMap<String, String>();
String year;
int period;
String selectPeriod = "";
String selectFilter = "";
Long result;
int argsLength;
int selectCount;
public RSUMIF(FormulaContext formulaContext) {
super(formulaContext);
}
@Override
public ValueEval evaluate(ValueEval[] valueEvals, OperationEvaluationContext operationEvaluationContext) {
try {
return wrapExceptionEval(valueEvals, operationEvaluationContext);
} catch (Exception e) {
if (e instanceof FormulaException)
LOGGER.warn("Formula Exception || {}", e.getMessage());
e.printStackTrace();
return defaultEval;
}
}
public ValueEval wrapExceptionEval(ValueEval[] args, OperationEvaluationContext ec) throws Exception {
List<Object> ds = new ArrayList<>();
parameterCheck(args);
setWhere(args, ec);
List<CellTemplatePerGroupDto> tableData = null;
try {
tableData = agent.getTableData(tableName, getField, selectFilter, year, selectPeriod);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("公式参数配置错误");
}
for (CellTemplatePerGroupDto cellTemplatePerGroupDto : tableData) {
result = result + Long.parseLong(cellTemplatePerGroupDto.getData());
}
return new NumberEval(result);
}
//进行参数验证
public void parameterCheck(ValueEval[] args) {
argsLength = args.length;
if (argsLength < 4) {//参数小于3当做异常处理, 最后俩参数可以取默认值
throw Exceptions.parameterError;
}
}
private void setWhere(ValueEval[] args, OperationEvaluationContext ec) {
try {
selectCount = (argsLength - 4) / 2;
tableName = resolverString(args, ec, 0);
getField = resolverString(args, ec, 1);
period = resolverInteger(args, ec, argsLength - 1);//会计期间
year = resolverString(args, ec, argsLength - 2);//会计年度
if (selectCount % 2 != 0)
throw Exceptions.parameterError;
for (int i = 3; i < selectCount * 2 + 3; i++) {
if (i % 2 != 0) {
fileterMap.put(resolverString(args, ec, i), resolverString(args, ec, i + 1));
}
}
if (period == 0) {
selectPeriod = "t.period = " + formulaContext.getPeriod();
} else if (period == -99) {
selectPeriod = "t.period between '0' and " + (formulaContext.getPeriod() - 1);
} else if (period == 99) {
selectPeriod = "t.period between '0' and " + (formulaContext.getPeriod() - 1);
} else {
selectPeriod = "t.period between " + (formulaContext.getPeriod() - period) + " and " + (formulaContext.getPeriod() - 1);
}
for (Map.Entry<String, String> entry : fileterMap.entrySet()) {
if (selectFilter.equals("")) {
selectFilter = "t." + entry.getKey() + entry.getValue();
} else {
selectFilter = selectFilter + " and " + "t." + entry.getKey() + entry.getValue();
}
}
} catch (EvaluationException e) {
e.printStackTrace();
}
}
}
package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.exception.Exceptions;
/**
* author kevin
*/
import java.math.BigDecimal;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
public class SUM extends FunctionBase implements FreeRefFunction {
final static ValueEval defaultEval = new StringEval("0");
static final Logger LOGGER = LoggerFactory.getLogger(BB.class);
public BigDecimal cellValue;
public SUM(FormulaContext formulaContext) {
super(formulaContext);
}
//检查参数合法性
public String parameter(String parameter) {
if (parameter.length() != 2)
throw Exceptions.parameterError;
return parameter;
}
//数据获取
public BigDecimal getData(String cellPos) {
String cellCol = cellPos.substring(0, 1);
String cellRow = cellPos.substring(1, 1);
Long reportTemplateGroupId = formulaContext.getReportTemplateGroupId();
return BigDecimal.valueOf(Long.parseLong(agent.getCellDataByPos(reportTemplateGroupId, formulaContext.getPeriod(), cellRow, cellCol, formulaContext.getProjectId()).get(0).getData()));
}
//进行sum计算
public BigDecimal sum(BigDecimal bigDecimal) {
cellValue.add(bigDecimal);
return cellValue;
}
@Override
public ValueEval evaluate(ValueEval[] valueEvals, OperationEvaluationContext operationEvaluationContext) {
for (int i = 0, j = valueEvals.length; i < j; i++) {
try {
return new NumberEval(sum(getData(parameter(resolverString(valueEvals, operationEvaluationContext, i)))).doubleValue());
} catch (EvaluationException e) {
e.printStackTrace();
return defaultEval;
}
}
return defaultEval;
}
}
package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.math.BigDecimal;
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;
/**
* author kevin
* todo 需要检验公式的准确性
*/
public class SUM2 extends FunctionBase implements FreeRefFunction {
final static ValueEval defaultEval = new StringEval("0");
static final Logger LOGGER = LoggerFactory.getLogger(BB.class);
public BigDecimal cellValue;
public SUM2(FormulaContext formulaContext) {
super(formulaContext);
}
//检查参数合法性
public Map parameterCheck(ValueEval[] valueEvals, OperationEvaluationContext ec) {
Map<String, Object> map = new HashMap<String, Object>();
if(valueEvals.length != 2)
throw Exceptions.parameterError;
try {
String argsOne = resolverString(valueEvals, ec, 0);
String argsTwo = resolverString(valueEvals, ec, 1);
if(!argsOne.substring(0,1).equals(argsTwo.substring(0,1)))
throw Exceptions.parameterError;
map.put("colIndex", argsOne.substring(0,1));
map.put("rowIndexBegin", argsOne.substring(1,1));
map.put("rowIndexEnd", argsTwo.subSequence(1,1));
} catch (EvaluationException e) {
e.printStackTrace();
return null;
}
return map;
}
@Override
public ValueEval evaluate(ValueEval[] valueEvals, OperationEvaluationContext operationEvaluationContext) {
Map map = parameterCheck(valueEvals, operationEvaluationContext);
if(map != null){
return new NumberEval(getSUM2Data(formulaContext.getReportTemplateGroupId(), formulaContext.getPeriod(), map));
};
return null;
/* for (int i = 0, j = valueEvals.length; i < j; i++) {
try {
return new NumberEval(sum(getData(parameter(resolverString(valueEvals, operationEvaluationContext, i)))).doubleValue());
} catch (EvaluationException e) {
e.printStackTrace();
return defaultEval;
}
}*/
}
}
......@@ -19,6 +19,11 @@
<artifactId>mybatis</artifactId>
<version>3.4.5</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.40</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
......@@ -52,5 +57,10 @@
<version>1.3.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.40</version>
</dependency>
</dependencies>
</project>
package pwc.taxtech.atms.dao;
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.FileTypes;
import pwc.taxtech.atms.entity.FileTypesExample;
import java.util.List;
@Mapper
public interface FileTypesMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
long countByExample(FileTypesExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
int deleteByExample(FileTypesExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
int insert(FileTypes record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
int insertSelective(FileTypes record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
List<FileTypes> selectByExampleWithRowbounds(FileTypesExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
List<FileTypes> selectByExample(FileTypesExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
FileTypes selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") FileTypes record, @Param("example") FileTypesExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
int updateByExample(@Param("record") FileTypes record, @Param("example") FileTypesExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(FileTypes record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table file_types
*
* @mbg.generated
*/
int updateByPrimaryKey(FileTypes record);
List<FileTypes> query4SelectionBox();
}
\ No newline at end of file
......@@ -58,7 +58,6 @@ public interface FormulaAdminMapper extends MyMapper {
List<GroupId> getTemplateGroupId(@Param("projectId") String projectId);
@Select("SELECT " +
" p.id " +
"FROM " +
......@@ -97,41 +96,41 @@ public interface FormulaAdminMapper extends MyMapper {
" source_cell.row_name AS rowName," +
" source_cell.data_type AS resultType " +
"from (" +
" select " +
" template.template_id AS reportTemplateID," +
" template.template_group_id AS reportTemplateGroupID," +
" template.code AS reportCode," +
" cell_template.row_index AS rowIndex " +
" from period_template as template " +
" inner join period_cell_template as cell_template" +
" on template.template_id = cell_template.report_template_id" +
" where template.template_group_id = #{templateGroupId}" +
" and template.is_active_association = 1" +
" and template.code = #{code}" +
" and template.project_id = #{projectId}" +
" and template.period = #{period}" +
" and cell_template.project_id = #{projectId}" +
" and cell_template.period = #{period}" +
" and cell_template.column_index = #{rowColumnIndex}" +
" and cell_template.row_name = #{rowName}) as detail," +
" select " +
" template.template_id AS reportTemplateID," +
" template.template_group_id AS reportTemplateGroupID," +
" template.code AS reportCode," +
" cell_template.row_index AS rowIndex " +
" from period_template as template " +
" inner join period_cell_template as cell_template" +
" on template.template_id = cell_template.report_template_id" +
" where template.template_group_id = #{templateGroupId}" +
" and template.is_active_association = 1" +
" and template.code = #{code}" +
" and template.project_id = #{projectId}" +
" and template.period = #{period}" +
" and cell_template.project_id = #{projectId}" +
" and cell_template.period = #{period}" +
" and cell_template.column_index = #{rowColumnIndex}" +
" and cell_template.row_name = #{rowName}) as detail," +
" period_cell_template as source_cell" +
" where source_cell.project_id = #{projectId}" +
" and source_cell.period = #{period}" +
" and detail.reportTemplateID = source_cell.report_template_id" +
" and detail.rowIndex = source_cell.row_index" +
" and source_cell.column_index = #{columnIndex}"
)
)
List<CellTemplatePerGroupDto> getCellTemplateByNameAndIndex(
@Param("templateGroupId") Long templateGroupId,
@Param("code") String code,
@Param("rowColumnIndex") Integer rowColumnIndex,
@Param("rowName") String rowName,
@Param("columnIndex") Integer columnIndex,
@Param("projectId") String projectId,
@Param("period") Integer period);
@Param("templateGroupId") Long templateGroupId,
@Param("code") String code,
@Param("rowColumnIndex") Integer rowColumnIndex,
@Param("rowName") String rowName,
@Param("columnIndex") Integer columnIndex,
@Param("projectId") String projectId,
@Param("period") Integer period);
List<CellTemplatePerGroupDto> getCellTemplateByTypeAndIndex(
List<CellTemplatePerGroupDto> getCellTemplateByTypeAndIndex(
@Param("templateGroupId") Long templateGroupId,
@Param("projectId") String projectId,
@Param("code") String code,
......@@ -144,4 +143,48 @@ public interface FormulaAdminMapper extends MyMapper {
@Param("orgId") String orgId,
@Param("startDate") String startDate,
@Param("endDate") String endDate);
@Select("" +
"SELECT " +
" cell_template.cell_template_id AS cellTemplateID, " +
" template.template_id AS reportTemplateID, " +
" template.template_group_id AS reportTemplateGroupID, " +
" cell_template.row_index AS rowIndex, " +
" cell_template.column_index AS columnIndex, " +
" template.code AS reportCode, " +
" cell_template.column_name AS columnName, " +
" cell_template.row_name AS rowName, " +
" cell_template.data_type AS resultType " +
"d.data AS content" +
"FROM " +
" period_template template " +
" LEFT JOIN period_cell_template cell_template ON template.template_id = cell_template.report_template_id " +
" LEFT JOIN period_cell_data d on d.cell_template_id = cell_template.cell_template_id" +
"WHERE " +
" template.template_id IN ( SELECT template_id FROM period_template WHERE template_group_id = #{templateGroupId} " +
" AND is_active_association = 1 AND code = #{code} ) " +
" AND row_index = #{cellRow} " +
" AND column_index = #{cellCol} " +
" AND template.project_id = #{projectId} " +
" AND template.period = #{period} " +
" AND cell_template.project_id = #{projectId} " +
" AND cell_template.period = #{period}" +
"")
List<CellTemplatePerGroupDto> getCellDataByPos(@Param("templateId") Long templateId, @Param("period") Integer period, @Param("cellRow") String cellRow, @Param("cellCol") String cellCol, @Param("projectId") String projectId);
@Select("" +
"SELECT " +
"${getField} as data" +
"FROM ${tableName} " +
"inner join project pro on pro.organization_id = t.organization_id " +
" and ${selectFilter}" +
" and pro.year = #{year}" +
"")
List<CellTemplatePerGroupDto> getTableData(@Param("tableName") String tableName,
@Param("getField") String getField,
@Param("selectFilter") String selectFilter,
@Param("year") String year,
@Param("selectPeriod") String selectPeriod);
}
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.OperationLogFileType;
import pwc.taxtech.atms.entity.OperationLogFileTypeExample;
@Mapper
public interface OperationLogFileTypeMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
long countByExample(OperationLogFileTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
int deleteByExample(OperationLogFileTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
int insert(OperationLogFileType record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
int insertSelective(OperationLogFileType record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
List<OperationLogFileType> selectByExampleWithRowbounds(OperationLogFileTypeExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
List<OperationLogFileType> selectByExample(OperationLogFileTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
OperationLogFileType selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") OperationLogFileType record, @Param("example") OperationLogFileTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
int updateByExample(@Param("record") OperationLogFileType record, @Param("example") OperationLogFileTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(OperationLogFileType record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_file_type
*
* @mbg.generated
*/
int updateByPrimaryKey(OperationLogFileType record);
}
\ No newline at end of file
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.OperationLogTaxDocument;
import pwc.taxtech.atms.entity.OperationLogTaxDocumentExample;
@Mapper
public interface OperationLogTaxDocumentMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
long countByExample(OperationLogTaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
int deleteByExample(OperationLogTaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
int insert(OperationLogTaxDocument record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
int insertSelective(OperationLogTaxDocument record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
List<OperationLogTaxDocument> selectByExampleWithRowbounds(OperationLogTaxDocumentExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
List<OperationLogTaxDocument> selectByExample(OperationLogTaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
OperationLogTaxDocument selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") OperationLogTaxDocument record, @Param("example") OperationLogTaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
int updateByExample(@Param("record") OperationLogTaxDocument record, @Param("example") OperationLogTaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(OperationLogTaxDocument record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_tax_document
*
* @mbg.generated
*/
int updateByPrimaryKey(OperationLogTaxDocument record);
}
\ No newline at end of file
package pwc.taxtech.atms.dao;
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.TaxDocument;
import pwc.taxtech.atms.entity.TaxDocumentExample;
import java.util.List;
@Mapper
public interface TaxDocumentMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
long countByExample(TaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
int deleteByExample(TaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
int insert(TaxDocument record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
int insertSelective(TaxDocument record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
List<TaxDocument> selectByExampleWithRowbounds(TaxDocumentExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
List<TaxDocument> selectByExample(TaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
TaxDocument selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") TaxDocument record, @Param("example") TaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
int updateByExample(@Param("record") TaxDocument record, @Param("example") TaxDocumentExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(TaxDocument record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_document
*
* @mbg.generated
*/
int updateByPrimaryKey(TaxDocument record);
/**
* 根据id 逻辑删除
* @param id
* @return
*/
int updateEnableToF(Long id);
}
\ No newline at end of file
......@@ -15,6 +15,24 @@ public class CellTemplatePerGroupDto {
private String rowName;
private String columnName;
private Integer resultType;
private Long Content;
String Data;
public String getData() {
return Data;
}
public void setData(String data) {
Data = data;
}
public Long getContent() {
return Content;
}
public void setContent(Long content) {
Content = content;
}
public String getCellTemplateId() {
return cellTemplateId;
......
This diff is collapsed.
......@@ -107,4 +107,6 @@ public interface PeriodCellDataMapper extends MyVatMapper {
int updateByPrimaryKey(PeriodCellData record);
int batchInsert(List<PeriodCellData> list);
List<PeriodCellData> selectDataByCellTemplateIdAround(@Param("bufferString") String bufferString);
}
\ No newline at end of file
......@@ -92,4 +92,11 @@
</foreach>;
SELECT 1 FROM DUAL;
</insert>
<select id = "selectDataByCellTemplateIdAround" parameterType="java.lang.String" resultType="pwc.taxtech.atms.vat.entity.PeriodCellData">
select * from period_cell_data t where 1=1
<if test="bufferString != null and bufferString != '' ">
and t.cell_template_id in #{bufferString}
</if>
</select>
</mapper>
\ No newline at end of file
This diff is collapsed.
......@@ -231,10 +231,21 @@ grunt.initConfig({
"Scripts/fancy-tree/jquery.fancytree.wide.js",
"Scripts/fancy-tree/jquery.fancytree.filter.js",
"Scripts/fancy-tree/jquery.fancytree-all-deps.min.js",
"Scripts/viewer/viewer.js",
"Scripts/xlsx/shim.min.js",
"Scripts/xlsx/xlsx.full.min.js",
"Scripts/position-calculator/position-calculator.min.js"],
dest: '<%= pkg.bundleTemp %>/util.js'
},
jqueryval: {
angularFileUpload:{
src: ["Scripts/angular-file-upload.js"],
dest: '<%= pkg.bundleTemp %>/angular-file-upload.js'
},
PDFObject:{
src: ["Scripts/PDFObject.js"],
dest: '<%= pkg.bundleTemp %>/PDFObject.js'
},
jqueryval: {
src: ["Scripts/jquery.validate*"],
dest: '<%= pkg.bundleTemp %>/jqueryval.js'
},
......@@ -548,7 +559,7 @@ grunt.registerTask('build', '生产构建任务', function () {
});
grunt.registerTask('dev', '开发环境', function () {
grunt.task.run(['concat:adminHomePageJs', 'concat:adminHomePageLess','concat:basicDataJs',
grunt.task.run(['concat:adminHomePageJs', 'concat:adminHomePageLess','concat:basicDataJs','concat:angularFileUpload','concat:PDFObject',
'concat:basicDataLess', 'concat:systemConfigurationJs','concat:systemConfigurationLess',
'concat:basicDataCss', 'concat:infrastructureJs','concat:infrastructureLess',
'concat:commonCss', 'concat:commonLess','concat:adminApp','concat:noPermissionPageJs','concat:noPermissionPageLess',
......
This diff is collapsed.
This diff is collapsed.
......@@ -11,7 +11,7 @@ var bindModule = function (thisModule, controllerProvider, compileProvider, filt
};
// register common module for shared functionalities for all other feature modules
var commonModule = angular.module('app.common', ['pascalprecht.translate', 'ngAnimate', 'ui.grid', 'ui.grid.selection', 'ui.grid.selection', 'ui.grid.treeView', 'ui.grid.resizeColumns', 'ui.grid.grouping', 'ui.grid.exporter', 'app.config', 'ui.grid.edit'])
var commonModule = angular.module('app.common', ['pascalprecht.translate', 'ngAnimate', 'ui.grid', 'ui.grid.selection', 'ui.grid.selection', 'ui.grid.treeView', 'ui.grid.resizeColumns', 'ui.grid.grouping', 'ui.grid.exporter', 'app.config', 'ui.grid.edit','angularFileUpload'])
.run(['$log', function ($log) {
$log.debug('app.common.run()...');
}])
......@@ -258,6 +258,23 @@ var frameworkModule = angular.module('app.framework', ['app.webservices', 'app.c
sticky: true
});
$stateProvider.state({
name: 'taxDocumentManage',
url: '/documentManage/taxDocumentManage/:id',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat,appTranslation.appPart]);
}],
template: '<tax-document-list servicetypeid="2"></tax-document-list>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'overviewAssetsManage',
url: '/overview/assetsManage',
......@@ -290,21 +307,7 @@ var frameworkModule = angular.module('app.framework', ['app.webservices', 'app.c
sticky: true
});
$stateProvider.state({
name: 'taxDocumentManage',
url: '/documentManage/taxDocumentManage/:id',
views: {
'@': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.appPart]);
}],
template: '<document-manage></document-manage>',
}
},
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'overviewDataImp',
......
......@@ -174,7 +174,7 @@
cancel: function () {
// reverse changes
this.update(lastValue);
if(this.obj[0].value) this.update(lastValue);
this.hide();
},
......@@ -521,4 +521,4 @@
CancelBtnText: 'Cancel'
};
})(window.jQuery);
\ No newline at end of file
})(window.jQuery);
This diff is collapsed.
This diff is collapsed.
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
if(!Object.keys)Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=r.length;return function(n){if(typeof n!=="object"&&typeof n!=="function"||n===null)throw new TypeError("Object.keys called on non-object");var o=[];for(var a in n)if(t.call(n,a))o.push(a);if(e)for(var l=0;l<i;++l)if(t.call(n,r[l]))o.push(r[l]);return o}}();if(!String.prototype.trim)String.prototype.trim=function(){var t=this.replace(/^\s+/,"");for(var e=t.length-1;e>=0;--e)if(!t.charAt(e).match(/^\s/))return t.slice(0,e+1);return""};if(!Array.prototype.forEach)Array.prototype.forEach=function(t){var e=this.length>>>0,r=arguments[1]||void 0;for(var i=0;i<e;++i)if(i in this)r?t.call(r,this[i],i,this):t(this[i],i,this)};if(!Array.prototype.map)Array.prototype.map=function(t){var e=this.length>>>0,r=arguments[1]||void 0,i=new Array(e);for(var n=0;n<e;++n)if(n in this)i[n]=r?t.call(r,this[n],n,this):t(this[n],n,this);return i};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(t){var e=this.length>>>0,r=arguments[1]|0||0;for(r<0&&(r+=e)<0&&(r=0);r<e;++r)if(this[r]===t)return r;return-1};if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(t){var e=this.length>>>0,r=e-1;for(;r>=0;--r)if(this[r]===t)return r;return-1};if(!Array.isArray)Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"};if(!Date.prototype.toISOString)Date.prototype.toISOString=function(){function t(t,e){return("0000000"+t).slice(-(e||2))}return function e(){var e=this.getUTCFullYear(),r="";if(e>9999)r="+"+t(e,6);else if(e<0)r="-"+t(-e,6);else r=t(e,4);return[r,t(this.getUTCMonth()+1),t(this.getUTCDate())].join("-")+"T"+[t(this.getUTCHours()),t(this.getUTCMinutes()),t(this.getUTCSeconds())].join(":")+"."+t(this.getUTCMilliseconds(),3)+"Z"}}();if(typeof ArrayBuffer!=="undefined"&&!ArrayBuffer.prototype.slice)ArrayBuffer.prototype.slice=function(t,e){if(t==null)t=0;if(t<0){t+=this.byteLength;if(t<0)t=0}if(t>=this.byteLength)return new Uint8Array(0);if(e==null)e=this.byteLength;if(e<0){e+=this.byteLength;if(e<0)e=0}if(e>this.byteLength)e=this.byteLength;if(t>e)return new Uint8Array(0);var r=new ArrayBuffer(e-t);var i=new Uint8Array(r);var n=new Uint8Array(this,t,e-t);if(i.set)i.set(n);else while(t<=--e)i[e-t]=n[e];return r};if(typeof Uint8Array!=="undefined"&&!Uint8Array.prototype.slice)Uint8Array.prototype.slice=function(t,e){if(t==null)t=0;if(t<0){t+=this.length;if(t<0)t=0}if(t>=this.length)return new Uint8Array(0);if(e==null)e=this.length;if(e<0){e+=this.length;if(e<0)e=0}if(e>this.length)e=this.length;if(t>e)return new Uint8Array(0);var r=new Uint8Array(e-t);while(t<=--e)r[e-t]=this[e];return r};var IE_SaveFile=function(){try{if(typeof IE_SaveFile_Impl=="undefined")document.write(['<script type="text/vbscript" language="vbscript">','IE_GetProfileAndPath_Key = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\"','Function IE_GetProfileAndPath(key): Set wshell = CreateObject("WScript.Shell"): IE_GetProfileAndPath = wshell.RegRead(IE_GetProfileAndPath_Key & key): IE_GetProfileAndPath = wshell.ExpandEnvironmentStrings("%USERPROFILE%") & "!" & IE_GetProfileAndPath: End Function','Function IE_SaveFile_Impl(FileName, payload): Dim data, plen, i, bit: data = CStr(payload): plen = Len(data): Set fso = CreateObject("Scripting.FileSystemObject"): fso.CreateTextFile FileName, True: Set f = fso.GetFile(FileName): Set stream = f.OpenAsTextStream(2, 0): For i = 1 To plen Step 3: bit = Mid(data, i, 2): stream.write Chr(CLng("&h" & bit)): Next: stream.Close: IE_SaveFile_Impl = True: End Function',"|/script>".replace("|","<")].join("\r\n"));if(typeof IE_SaveFile_Impl=="undefined")return void 0;var t=function(){var t="";try{t=IE_GetProfileAndPath("{374DE290-123F-4565-9164-39C4925E467B}")}catch(e){try{t=IE_GetProfileAndPath("Personal")}catch(e){try{t=IE_GetProfileAndPath("Desktop")}catch(e){throw e}}}var r=t.split("!");DDP=r[1].replace("%USERPROFILE%",r[0]);return function(t){return DDP+"\\"+t}}();function e(t){var e=[];var r=typeof t=="string";for(var i=0;i<t.length;++i)e.push(("00"+(r?t.charCodeAt(i):t[i]).toString(16)).slice(-2));var n=e.join("|");return n}return function(r,i){return IE_SaveFile_Impl(t(i),e(r))}}catch(r){return void 0}}();var IE_LoadFile=function(){try{if(typeof IE_LoadFile_Impl=="undefined")document.write(['<script type="text/vbscript" language="vbscript">','Function IE_LoadFile_Impl(FileName): Dim out(), plen, i, cc: Set fso = CreateObject("Scripting.FileSystemObject"): Set f = fso.GetFile(FileName): Set stream = f.OpenAsTextStream(1, 0): plen = f.Size: ReDim out(plen): For i = 1 To plen Step 1: cc = Hex(Asc(stream.read(1))): If Len(cc) < 2 Then: cc = "0" & cc: End If: out(i) = cc: Next: IE_LoadFile_Impl = Join(out,""): End Function',"|/script>".replace("|","<")].join("\r\n"));if(typeof IE_LoadFile_Impl=="undefined")return void 0;function t(t){var e=[];for(var r=0;r<t.length;r+=2)e.push(String.fromCharCode(parseInt(t.slice(r,r+2),16)));var i=e.join("");return i}return function(e){return t(IE_LoadFile_Impl(e))}}catch(e){return void 0}}();if(typeof window!=="undefined"&&typeof window.getComputedStyle!=="function"){window.getComputedStyle=function(t,e){return this.el=t,this.getPropertyValue=function(e){var r=/(\-([a-z]){1})/g;return e=="float"&&(e="styleFloat"),r.test(e)&&(e=e.replace(r,function(){return arguments[2].toUpperCase()})),t.currentStyle[e]?t.currentStyle[e]:null},this}}
\ No newline at end of file
This diff is collapsed.
......@@ -86,6 +86,7 @@
<script type="text/javascript" src="bundles/angular-cache.js"></script>
<script type="text/javascript" src="bundles/echarts.js"></script>
<script type="text/javascript" src="bundles/mentio.js"></script>
<script type="text/javascript" src="bundles/angular-file-upload.js"></script>
<script type="text/javascript" src="bundles/adminApp.js"></script>
<script type="text/javascript" src="bundles/common.js"></script>
<script type="text/javascript" src="bundles/framework.js"></script>
......@@ -96,7 +97,6 @@
<script type="text/javascript" src="bundles/ivh-treeview.js"></script>
<script type="text/javascript" src="bundles/ui-select.js"></script>
<script type="text/javascript" src="bundles/spreadio.js"></script>
<script type="text/javascript">
//window.location.href = '/Home/Admin/#/userDetail/808b7a8c-0265-4497-9adb-6b7a757bd2f2';
//window.location.href = '/Home/Admin/#/role';
......
......@@ -99,6 +99,8 @@
<script type="text/javascript" src="bundles/angular-cache.js"></script>
<script type="text/javascript" src="bundles/echarts.js"></script>
<script type="text/javascript" src="bundles/jsword.js"></script>
<script type="text/javascript" src="bundles/angular-file-upload.js"></script>
<script type="text/javascript" src="bundles/PDFObject.js"></script>
<script type="text/javascript" src="bundles/app.js"></script>
<script type="text/javascript" src="bundles/common.js"></script>
......
......@@ -136,6 +136,7 @@
"MenuTaxOperationManagement": "Tax Operation",
"MenuTaxPolicyManagement": "Tax Policy",
"MenuVAT": "VAT",
"TaxDocumentManagement": "Doc Management",
"MenuListApproval": "List approval",
"MobileManufacturingIndustry": "Mobile manufacturing",
"ModelException": "Model exception",
......@@ -339,4 +340,4 @@
"~MustBeEndOneApp": "I Must be the End One, please!"
}
\ No newline at end of file
}
......@@ -151,4 +151,5 @@
"ImportErrorMsg":"Three are {NumberOfError} error(s),Please revise and import again(only import the error record(s)).",
"CustomerImportDataFormatError" :"Import customer list with data format error",
"UnSave": "You need save first!"
}
\ No newline at end of file
"addFileType": "add File Type"
}
......@@ -423,6 +423,7 @@
"MenuTaxPolicyManagement": "税务政策管理平台",
"MenuVAT": "增值税申报",
"MenuListApproval": "报表审批",
"TaxDocumentManagement": "档案管理",
"Mid": "中",
"MobileManufacturingIndustry": "汽车制造业",
"ModelAlert": "模型异常",
......@@ -885,4 +886,4 @@
"RevenueTypeConfiguration":"收入类型配置",
"~MustBeEndOneApp": "I Must be the End One, please!"
}
\ No newline at end of file
}
......@@ -93,9 +93,24 @@
"ProjectYearCol": "年份",
"AssignRoleCol": "分配角色",
"SequenceNoCol": "序号",
"TaxGroup":"税种",
"PCompany": "所属机构",
"TaxGroup":"税种",
"DocumentAttr": "档案属性",
"DocumentType": "档案类型",
"DocumentName": "档案名称",
"EntityIndex": "实物索引号",
"EntityCustodian": "保管人",
"EntityStorageLocation": "实物存放地点",
"Duration": "所属期间",
"AvailabilityDate": "生效日期",
"CorporationName": "公司名称",
"DocumentTypeSets": "税务档案类型设置",
"Explain": "说明",
"RequiredFields": "必填字段",
"State": "状态",
"PCompany": "所属机构",
"Enable": "启用",
"Disable": "禁用",
"ReportTemplate": "报表模板",
"UserExistsInfo": "用户名已存在!",
......@@ -478,4 +493,4 @@
"PerPage":"每页",
"EnterpriseAccountSetOrgOnlyOncePerYear":"账套设置,一年之内同一个账套不能出现两次及以上!",
"Export": "导出"
}
\ No newline at end of file
}
{
"DocumentAttr":"档案属性",
"DocumentType":"档案类型",
"DocumentName":"档案名称",
"BusinessLine":"业务线",
"CorporationName":"公司名称",
"AvailabilityDate":"文件生效日期",
"Duration":"所属期间",
"DueDate":"到期日",
"TaxType":"税种",
"EntityIndex":"实物索引号",
"EntityStorageLocation":"实物存放地点",
"EntityCustodian":"保管人",
"ApprovalStatus":"审批状态",
"UploadDate":"上传日期",
"Creator":"创建人",
"Remarks":"档案备注",
"MoreFields":"查看更多",
"LessFields":"收起",
"Search":"查询",
"Reset":"重置",
"Preview":"预览",
"DelRecord":"删除记录",
"CreateRecord":"新建记录",
"ExportTable":"导出列表",
"DownloadAttachment":"下载附件",
"Log":"日志",
"MultiUpload":"批量上传",
"UnFile":"未支持的文件类型",
"UnRecord":"当前记录没有附件信息",
"UnReadFile":"文件内有不规则内容,无法读取,暂不支持预览",
"NeedLoadUp":"请先上传文件",
"UploadLimit":"上传文件失败超过5个,请重新编辑",
"FailUpload":"文件上传失败,请重新上传",
"NeedChecked":"请先勾选至少一项",
"Deleted":"删除成功",
"Uploaded":"上传成功",
"Edited":"编辑成功",
"Created":"新建成功",
"CoverConfirm":"当前记录已经存在,是否进行覆盖?",
"NoData":"当前无数据可下载",
"PleaseSelected":"请选择",
"PleaseType":"请输入",
"EntityStorageDescription":"请将实物档案存放地址精确到某个档案柜",
"multiUpload":"批量上传",
"UploadAttach":"上传附件",
"Edit":"编辑",
"DocumentPath":"档案路径",
"PreviewFile":"预览文件"
}
\ No newline at end of file
infrastructureModule.directive('docManageView', ['$log',
function ($log) {
'use strict';
$log.debug('landManage.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/admin/infrastructure/docManage/doc-manage.html' + '?_=' + Math.random(),
scope: {},
controller: 'docManageController',
link: function ($scope, $element, $attr) {
//all validation put here
$scope.periodOptions = {
bindingOptions: {
value: "editLand.period"
},
onKeyPress: function (e) {
var event = e.jQueryEvent,
str = event.key || String.fromCharCode(event.which);
if (/^[\.\,e]$/.test(str))
event.preventDefault();
},
};
}
};
}
]);
\ No newline at end of file
/**
* Created by Administrator on 2019/2/28 0028.
*/
infrastructureModule.factory('docManageService',
['$http', '$q', 'apiConfig', 'apiInterceptor','jqFetch',
function ($http, $q, apiConfig, apiInterceptor,jqFetch) {
'use strict';
return {
getMainList: function (params) {
return jqFetch.get(apiInterceptor.webApiHostUrl + '/fileTypes/selectList', params);
},
addFileType: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/add', params);
},
editFileType: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/edit', params);
},
};
}]);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.for-fake-input{width:100%;margin:0;height:inherit;border:0;outline:none;font-size:inherit;padding:0}.select-simulator{height:inherit;border:0;width:100%;font-size:inherit;border-radius:3px;background-color:#fff;background-image:none;position:relative;overflow:hidden}.select-simulator-option-menu{border:1px solid #dadada;position:absolute;max-height:15rem;overflow:auto;z-index:11;left:0;top:0;width:0;background-color:white;font-size:1rem;border-radius:5px;box-shadow:0 2px 2px rgba(210,210,210,0.7);border-top:1px solid #dedede;border-bottom:1px solid #b7b7b7}.select-simulator-option-menu ul{padding:0}.select-simulator-option-menu ul li{padding:0 8px;list-style:none}.select-simulator-option-menu ul li:hover{background-color:#e7e8e0}.select-simulator-option-menu ul li:nth-child(odd){background-color:#efefef}.select-simulator-option-menu ul li>label{padding-bottom:5px;margin:0}.input-reset-button{position:absolute;margin:0;border:0;background:#fff;top:0;right:0;color:#969696;overflow:hidden;outline:none}.input-reset-button:before{content:"x";height:inherit;width:inherit;position:relative}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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