|
@@ -187,11 +187,11 @@ const checkStageBills = async function (stage, decimal, preStage) {
|
|
|
|
|
|
const doComplete = async function() {
|
|
const doComplete = async function() {
|
|
try {
|
|
try {
|
|
- const tender = await querySql('Select * From zh_tender');
|
|
|
|
|
|
+ const tender = await querySql('Select * From zh_tender Where id >= 11405');
|
|
for (const t of tender) {
|
|
for (const t of tender) {
|
|
console.log(`Update Tender ${t.id}:`);
|
|
console.log(`Update Tender ${t.id}:`);
|
|
const info = await querySql('Select * From zh_tender_info where tid = ?', [t.id]);
|
|
const info = await querySql('Select * From zh_tender_info where tid = ?', [t.id]);
|
|
- const decimal = info[0].decimal ? JSON.parse(info[0].decimal) : defaultInfo.parseInfo.decimal;
|
|
|
|
|
|
+ const decimal = info.length > 0 && info[0].decimal ? JSON.parse(info[0].decimal) : defaultInfo.defaultInfo.decimal;
|
|
|
|
|
|
const changes = await querySql('Select * From zh_change where tid = ?', [t.id]);
|
|
const changes = await querySql('Select * From zh_change where tid = ?', [t.id]);
|
|
for (const c of changes) {
|
|
for (const c of changes) {
|
|
@@ -215,7 +215,7 @@ const doCompleteTest = async function(tid) {
|
|
for (const t of tender) {
|
|
for (const t of tender) {
|
|
console.log(`Update Tender ${t.id}:`);
|
|
console.log(`Update Tender ${t.id}:`);
|
|
const info = await querySql('Select * From zh_tender_info where tid = ?', [t.id]);
|
|
const info = await querySql('Select * From zh_tender_info where tid = ?', [t.id]);
|
|
- const decimal = info[0].decimal ? JSON.parse(info[0].decimal) : defaultInfo.parseInfo.decimal;
|
|
|
|
|
|
+ const decimal = info.length > 0 && info[0].decimal ? JSON.parse(info[0].decimal) : defaultInfo.defaultInfo.decimal;
|
|
|
|
|
|
const changes = await querySql('Select * From zh_change where tid = ?', [t.id]);
|
|
const changes = await querySql('Select * From zh_change where tid = ?', [t.id]);
|
|
for (const c of changes) {
|
|
for (const c of changes) {
|