change create and update api , susee
This commit is contained in:
parent
aeffbf45b3
commit
f4cefa0268
@ -211,41 +211,5 @@ exports.UpdateObligationEmiTracking = async (req, res) =>
|
||||
|
||||
|
||||
|
||||
exports.excel = async (req, res) =>
|
||||
{
|
||||
const { getJsDateFromExcel } = require("excel-date-to-js");
|
||||
const reader = require('xlsx')
|
||||
// Reading our test file
|
||||
const file = reader.readFile('./cr_policy.xlsx')
|
||||
|
||||
let data = []
|
||||
|
||||
|
||||
const sheets = file.SheetNames[1]
|
||||
const temp = reader.utils.sheet_to_json(
|
||||
file.Sheets[file.SheetNames[1]])
|
||||
temp.forEach(async(element) => {
|
||||
var tempData ={
|
||||
property_ownership_document_available: Object.values(element)[0],
|
||||
type_of_property: Object.values(element)[1],
|
||||
property_used_in_business: Object.values(element)[2],
|
||||
property_free_loan_taken: Object.values(element)[3],
|
||||
property_in_the_name_of_applicant:Object.values(element)[4],
|
||||
loan_obligated_in_cet:Object.values(element)[5],
|
||||
property_created_in_last_eight_yr:Object.values(element)[6],
|
||||
value_to_be_considered: Object.values(element)[7],
|
||||
mv_to_be_added_to_atnw: Object.values(element)[8],
|
||||
final_value_considered:Object.values(element)[9]
|
||||
}
|
||||
await Gst.create(tempData)
|
||||
});
|
||||
|
||||
// CreditFacilityCurrentDertail.bulkCreate(data).then((data)=>res.send(data)).catch()
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
cr_policy.xlsx
BIN
cr_policy.xlsx
Binary file not shown.
Loading…
Reference in New Issue
Block a user