Quellcode durchsuchen

修改罗湖批量分配任务脚本

ZZJ vor 3 Jahren
Ursprung
Commit
6d49ed310f
1 geänderte Dateien mit 35 neuen und 34 gelöschten Zeilen
  1. 35 34
      src/views/system/jbdScan/js/manualConfirmationJS.js

+ 35 - 34
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -337,11 +337,14 @@ export default {
                    }
                    console.log('finalWtdIdList',finalWtdIdList)
                })
-                 3、任务分配     【2022/11/23 取消 直接 批量开检测子流程】
-                 3-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
-                 3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开任务分配流程,一个样品可能对应多个检测
-                 3-3、委托表找zhan_shi_biao_id_ 修改  t_lhwtzsb "zhuang_tai_"为"任务分配进行中"
+               */
 
+              /*
+                 3、任务分配     【2022/11/23 取消 直接 批量开检测子流程】【2022/11/30 胡老师又要】
+                 3-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
+                 3-2、根据每个样品一个任务分配流程 遍历样品表开任务分配流程
+                 3-3、委托表找zhan_shi_biao_id_ 修改  t_lhwtzsb "zhuang_tai_"为"待任务分配"
+              */
                // console.log('委托单及样品信息',wtdAndYpb)
                // console.log('委托单id列表 ',lhwtbID)
                // console.log('展示表id列表 ',lhwtzsbID)
@@ -351,10 +354,10 @@ export default {
                let rws = []
               if(wtdAndYpb.length>0){
                  for(var i in wtdAndYpb){
-                   let strs = wtdAndYpb[i].jian_ce_xiang_mu_.split(',')
-                       for(var l in strs){
+                  //  let strs = wtdAndYpb[i].jian_ce_xiang_mu_.split(',')
+                      //  for(var l in strs){
                         let rw = {}
-                         rw["ren_wu_ming_cheng"] = strs[l] //检测项目
+                        //  rw["ren_wu_ming_cheng"] = strs[l] //检测项目
                          rw["yang_pin_ming_che"] = wtdAndYpb[i].yang_pin_ming_che//样品名称
                          rw["yang_pin_bian_hao"] = wtdAndYpb[i].yang_pin_bian_hao//样品编号
                          rw["wei_tuo_lei_xing_"] = wtdAndYpb[i].wei_tuo_lei_xing_ //委托类型
@@ -383,18 +386,18 @@ export default {
                              yplxz = yplxz+','+ wtdAndYpb[i].yang_pin_lei_si_ //样品类型
                            }
                          }
-                         rw["yang_pin_lei_xing"] = yplxz //样品类型
-                         rw["wei_tuo_id_"] = wtdAndYpb[i].wtID  //委托id
-                         rw["he_tong_id_"] = wtdAndYpb[i].he_tong_id_ //合同id
-                         rw["zhuang_tai_"] = '待任务分配'//状态
-                         rw["wan_cheng_shi_jia"] = wtdAndYpb[i].song_jian_shi_jia  //送检日期
-                         rw["bao_gao_bian_zhi_"] = ypInfoList[i].bao_gao_bian_zhi_  //报告编制人
-                         rw["bao_gao_shen_he_y"] = ypInfoList[i].bao_gao_shen_he_y  //报告审核人
-                         rw["bao_gao_lei_xing_"] = wtdAndYpb[i].bao_gao_lei_xing_  //报告类型
-                         rw["xin_xiang_mu_ming"] = wtdAndYpb[i].xiang_mu_ming_che   //项目名称
-                         rw["zhan_shi_biao_id_"] = wtdAndYpb[i].zhan_shi_biao_id_  //展示表id
+                         rw["yang_pin_lei_xing"] = yplxz        //  样品类型
+                         rw["wei_tuo_id_"] = wtdAndYpb[i].wtID  //  委托id
+                         rw["he_tong_id_"] = wtdAndYpb[i].he_tong_id_ //  合同id
+                         rw["zhuang_tai_"] = '待任务分配'       //  状态
+                         rw["wan_cheng_shi_jia"] = wtdAndYpb[i].song_jian_shi_jia   // 送检日期
+                         rw["bao_gao_bian_zhi_"] = ypInfoList[i].bao_gao_bian_zhi_  // 报告编制人
+                         rw["bao_gao_shen_he_y"] = ypInfoList[i].bao_gao_shen_he_y  // 报告审核人
+                         rw["bao_gao_lei_xing_"] = wtdAndYpb[i].bao_gao_lei_xing_   // 报告类型
+                         rw["xin_xiang_mu_ming"] = wtdAndYpb[i].xiang_mu_ming_che   // 项目名称
+                         rw["zhan_shi_biao_id_"] = wtdAndYpb[i].zhan_shi_biao_id_   // 展示表id
                          rws.push(rw)
-                        }
+                        // }
                   }
                    // console.log("任务分配",rws)
                  repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":'+JSON.stringify(rws)+',"defKey":"Process_04o0csc","formKey":"lhrwfp"}')
@@ -406,18 +409,21 @@ export default {
                 if(lhwtzsbID.length > 0){
                   repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
                 }
-                */
+                
+
+
+
+
 
                /*
-                3、【任务分配2022/11/23 取消 直接 批量开检测子流程】
+                3、【任务分配2022/11/23 取消 直接 批量开检测子流程】【2022/11/30 取消】
                  3-1、根据 wtdAndYpb 的 wtID 更改委托表的 委托状态 wei_tuo_zhuang_ta 变成 已完成
                  3-2、根据每个样品对应的检测项目,开启一个或多个任务 / 遍历样品表开检测子流程,一个样品可能对应多个检测
                  3-3、委托表找zhan_shi_biao_id_ 修改  t_lhwtzsb "zhuang_tai_"为"待环境监控"
-               */
+                 
+                 repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
+                 */
 
-               repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
-
-// console.log('dWhere : ',dWhere)
 
           /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID   */
           for (let num in dWhere) {
@@ -427,7 +433,6 @@ export default {
                 if (resArr.length == 1) {
                   if (resArr[0].wei_zhi_zhuang_ta == "空余") {
                     repostCurd('update', '{"tableName":"t_ypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","ru_ku_shi_jian_":"' + this_.dateFormat() + '"}}').then(res => {
-                      // console.log("原本位置为空余 ,新位置更新成功")
                     })
                   } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
                     // 新增一条新的位置记录,使用旧的位置记录 修改它的样品编号,入库时间,标识UUID
@@ -449,7 +454,6 @@ export default {
                     cfNew["biao_zhi_uuid_"] = uuidList[num]
                     cfNewList.push(cfNew)
                     let uuid = cfNew["biao_zhi_uuid_"];
-                    // console.log('原本位置为占用 ,新位置插入成功')
 
                     repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(cfNewList) + '}').then(res => {
                       let selectsql = "select id_ from t_ypcfwz where biao_zhi_uuid_='" + uuid + "'";
@@ -459,22 +463,18 @@ export default {
                         // console.log('zzj abc ',abc)
                         // console.log('zzj dataid ',dataid)
                         if (changeWeiZhi && !changesyWeiZhi) {
-                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"cun_fang_wei_zhi_":"' + dataid + '"}}').then(res => {
-                            // console.log('回填样品收样位置')
-                          })
+                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"cun_fang_wei_zhi_":"' + dataid + '"}}')
                         } else {
-                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_cun_fang":"' + dataid + '"}}').then(res => {
-                            // console.log('回填样品留样位置')
-                          })
+                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_cun_fang":"' + dataid + '"}}')
                         }
                       })
-
                     })
                   }
                 }
               })
           }
-
+          
+          /*
                let ffbSql = "select * from t_lhfbb where FIND_IN_SET( parent_id_,'"+ fbbIdStr +"')"
                repostCurd('sql',ffbSql).then(response => {
                  let ffbList = response.variables.data
@@ -546,6 +546,7 @@ export default {
               if(lhwtzsbID.length > 0){
                 repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"检测进行中"}}')
               }
+              */
 
           })