ShuanghongS 6 ay önce
ebeveyn
işleme
9dbbcf7d2f

+ 3 - 3
main_new_version.php

@@ -103,14 +103,14 @@ switch ($action) {
             //     "children"=>array(array("index" =>$index.'-1',"label" =>"Operation Log","path"=>"/Operationlog")));
             $systemManagement = array("index"=>"$index","label"=>"System Management","icon"=>"icon_system__management_fill_b","type"=>"list"); 
             $children  = array(); 
-            //$children[] = array("index" =>$index.'-1',"label" =>"System Message","path"=>"/system-message");
-            //$children[] = array("index" =>$index.'-2',"label" =>"System Settings","path"=>"/SystemSettings");  
+            $children[] = array("index" =>$index.'-1',"label" =>"System Message","path"=>"/system-message");
+            $children[] = array("index" =>$index.'-2',"label" =>"System Settings","path"=>"/SystemSettings");  
             //只有chud的账户可以看日志记录
             if(strtolower(_getLoginName()) == "chud" 
                 || strtolower(_getLoginName()) == strtolower("IT.Andywu") 
                 || strtolower(_getLoginName()) == "ra.admin"){
                     $children[] = array("index" =>$index.'-3',"label" =>"Operation Log","path"=>"/Operationlog");
-                    //$children[] = array("index" =>$index.'-4',"label" =>"Prompt Configuration","path"=>"/PromptConfiguration");  
+                    $children[] = array("index" =>$index.'-4',"label" =>"Prompt Configuration","path"=>"/PromptConfiguration");  
             }
             $systemManagement["children"] = $children;
             if (!empty($children)){

+ 3 - 1
service/robot.class.php

@@ -414,17 +414,19 @@ class robot{
                 exit();
             }
 
-            $is_fixedAnswer_end = false;
             if ($question_type == 'Predefined Question'){
                 $answer = $this->doFixedAnswerAndLog($serial_no,$fixed_faq,$question_content);
 
                 //判断固定回答是否结束
+                $is_fixedAnswer_end = false;
                 $fixedChat = common::excuteObjectSql("select * from public.kln_robot_chat_fixed where fixed_faq = '$fixed_faq'");
                 if (empty($fixedChat['secondary_interaction_content']) || $question_content != $fixedChat['fixed_faq'] ){
                     $is_fixedAnswer_end = true;
                 } 
             } else {
                 $answer = $this->doFreeAnswerAndLog($serial_no,$model,$systemPrompt, $question_content, $history = []);
+                //自由问题固定为true
+                $is_fixedAnswer_end = true;
             }
 
             $return = array("type"=>"markdown","is_fixedAnswer_end"=>$is_fixedAnswer_end,"data" =>$answer);

+ 2 - 2
utils/common.class.php

@@ -2701,7 +2701,7 @@ class common {
 
             //如果数据为空,用这个fileds配置的 把模板里值逐个替换为空
             $fileds = array("ctnr","size","h_bol","carrier","vessel","voyage","grs_kgs","ams_commodity","seal_no",
-                "shipper_city","consignee_city","last_status_315_code","last_status_city","last_status_315_date");
+                "place_of_receipt_exp","place_of_delivery_exp","last_status_315_code","last_status_city","last_status_315_date");
             //Container Information替换
             $reference = utils::replacementsFixed($data[0],$reference,$fileds);
 
@@ -2889,7 +2889,7 @@ class common {
             }
 
             //如果数据为空,用这个fileds配置的 把模板里值逐个替换为空
-            $fileds = array("tracking_no","h_bol","question_content","transport_mode","shipper_city","consignee_city","carrier","vessel","voyage","link");
+            $fileds = array("tracking_no","h_bol","question_content","transport_mode","place_of_receipt_exp","place_of_delivery_exp","carrier","vessel","voyage","link");
             $ref_data = array();
             if(!empty($data)){
                 $ref_data = $data[0];

+ 3 - 3
utils/utils.class.php

@@ -1098,9 +1098,9 @@ class utils {
 
     public static function getDmoeSqlForAi($type){
         $data= array();
-        $data["Shipments arriving in the next 7 days."] =  "select oo.serial_no,h_bol,place_of_receipt_exp,place_of_delivery_exp,description,eta,order_from,cargo_type 
+        $data["Shipments arriving in the next 7 days."] =  "select serial_no,h_bol,place_of_receipt_exp,place_of_delivery_exp,description,eta,order_from,cargo_type 
          from (
-         	SELECT h_bol, place_of_receipt_exp, place_of_delivery_exp,m.description,eta,order_from, o.cargo_type
+         	SELECT  oo.serial_no,h_bol, place_of_receipt_exp, place_of_delivery_exp,m.description,eta,order_from, o.cargo_type
          		FROM public.kln_ocean oo
                 inner join LATERAL (select case when is_hazardous = 't' then 'Dangerous Goods'::text else 'General'::text end as cargo_type 
 			        from public.ocean o where o.serial_no = oo.serial_no) o on true
@@ -1130,7 +1130,7 @@ class utils {
                         and a.update_date > '2025-04-06') po
             )t";
         $data["What is the current status of my active shipments?"] ="with oo as(
-            SELECT h_bol, place_of_receipt_exp, place_of_delivery_exp,serial_no,transport_mode,order_from,oo.serial_no
+            SELECT h_bol, place_of_receipt_exp, place_of_delivery_exp,serial_no,transport_mode,order_from
             FROM public.kln_ocean oo
             WHERE  <{ExtendHand_KLN}> and ((oo.ata is not null and oo.ata >= CURRENT_DATE - INTERVAL '3 months' AND oo.ata < CURRENT_DATE) 
                 or not exists( select 1 from public.ocean_milestone a where a.serial_no = oo.serial_no and a.act_date is not null  and a.code = 'IFFDEL')) and oo.transport_mode = 'sea' and order_from = 'public' order by id limit 10