|
@@ -123,11 +123,9 @@ class GljDao extends OprDao{
|
|
|
|
|
|
mixUpdateGljItems (repId, lastOpr, updateItems, addItems, rIds, callback) {
|
|
|
if (updateItems.length == 0 && rIds.length == 0) {
|
|
|
- console.log(1);
|
|
|
GljDao.addGljItems(repId, lastOpr, addItems, callback);
|
|
|
}
|
|
|
else if(rIds.length > 0 && updateItems.length > 0){
|
|
|
- console.log(2);
|
|
|
async.parallel([
|
|
|
function (cb) {
|
|
|
GljDao.removeGljItems(repId, lastOpr, rIds, cb);
|
|
@@ -145,11 +143,9 @@ class GljDao extends OprDao{
|
|
|
})
|
|
|
}
|
|
|
else if (rIds.length > 0 && updateItems.length === 0) {
|
|
|
- console.log(3);
|
|
|
GljDao.removeGljItems(repId, lastOpr, rIds, callback);
|
|
|
}
|
|
|
else if(updateItems.length > 0 || addItems.length > 0){
|
|
|
- console.log(4);
|
|
|
GljDao.updateGljItems(repId, lastOpr, updateItems, function(err, results){
|
|
|
if (err) {
|
|
|
callback(true, "Fail to update", false);
|