Commit bf0ad59f by linboxuan

trademarktransactionSve update tmBatchUpload

parent 18e7fae8
......@@ -226,10 +226,33 @@ class TrademarktransactionService extends ServiceBase {
// count作为插入成功数量
var count = 0;
for (var i = 0; i < objlist.length; i++) {
// 2020 0914 lin 新增 以下校验,校验规则为上传模版的5个字段
if(!objlist[i].excelName) {
objlist[i]["publish_status"] = "fail"
continue;
}
if(!objlist[i].code) {
objlist[i]["publish_status"] = "fail"
continue;
}
if(!objlist[i].business_quoted_price) {
objlist[i]["publish_status"] = "fail"
continue;
}
if(!objlist[i].contacts) {
objlist[i]["publish_status"] = "fail"
continue;
}
if(!objlist[i].mobile) {
objlist[i]["publish_status"] = "fail"
continue;
}
var tmInfo = await this.dao.model.findOne({
where: {
channel_code: objlist[i].channel_code,
code: objlist[i].code,
// 2020 0914 lin 修改 批传接口新增查询条件
publish_status: "uppershelf"
},
attributes: [
"id",
......
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