Git Product home page Git Product logo

Comments (6)

xin-lai avatar xin-lai commented on May 10, 2024

这个建议不错,后续会支持。得抽精力。可以考虑自己PR,并不难。
大哥,英文不错啊,给我们写写英文文档呗。

from magicodes.ie.

kasugaharu avatar kasugaharu commented on May 10, 2024

感谢回复~哈哈,有道加中式翻译的成果;
另外还有一个建议,最近碰到的导入问题:
导入处理 Excel时,一部分错误是Excel模板中定义的错误,还有一部分则是业务上的错误(e.g.存在重复的数据库唯一列,导入的某些数据非法....)
我们会把这些错误的数据返回给用户,一般来说会返回一个Excel文件告知用户导入的数据存在业务问题.
这时出现了一个问题:
我们进行导入操作验证完成后需要将上述的不满足系统业务的数据返回,此时需要进行一次导出操作
image
生成的导入模板和此时的导出模板并不相同....
image

能否够考虑对此时的错误数据使用导入模板导出返回给用户方便用户修改之后进行2次上传

from magicodes.ie.

xin-lai avatar xin-lai commented on May 10, 2024

有的。你看导入结果那个类,包含:

        /// <summary>
        ///     验证错误
        /// </summary>
        public virtual IList<DataRowErrorInfo> RowErrors { get; set; }

        /// <summary>
        ///     模板错误
        /// </summary>
        public virtual IList<TemplateErrorInfo> TemplateErrors { get; set; }

        /// <summary>
        ///     导入异常信息
        /// </summary>
        public virtual Exception Exception { get; set; }

另外还支持生成错误标注文件,哪一行哪个数据报错都会标注。
这些教程中都有写。

from magicodes.ie.

kasugaharu avatar kasugaharu commented on May 10, 2024

你好~
RowErrors 这个地方我知道
这里的错误是模型中定义的,当模型验证失败会返回一个Excel 同时标注模型上的错误.
image

而我的意思是,数据模型上数据验证已经通过,但是无法满足业务系统的需求的情况;
比如说 我们在导入用户数据的时候发现有一条数据已经存在于数据库中了,或者这条导入的数据某些字段在系统中关联的外键不存在...

这部分业务错误的数据需要我们返回给用户并提醒用户这些数据存在的问题;这个时候需要我们导出一份错误数据的Excel

这里最好是开放一个 生成错误标注文件的方法,提供手动生成并且补充 错误原因(业务错误)

from magicodes.ie.

kasugaharu avatar kasugaharu commented on May 10, 2024

稍后 我PR一个版本 给您看看

from magicodes.ie.

xin-lai avatar xin-lai commented on May 10, 2024

收到。非常期待。
另外你刚说的可以基于筛选器来实现。有单元测试示例,教程好像还没写。

from magicodes.ie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.