zjh
2023-09-14 3194e189b44e22cf293c6cd88d9af854a287077d
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjOrderDetailMapper.java
@@ -107,7 +107,7 @@
    @Insert("\tINSERT INTO tj_order_detail(\n" +
            "\torder_detail_id,\n" +
//            "\torder_detail_id,\n" +
            "  order_id,\n" +
            "  pro_id,\n" +
            "  pro_result,\n" +
@@ -118,11 +118,11 @@
            "  create_id,\n" +
            "  pro_type) \n" +
            "  \n" +
            "     SELECT a.id,#{orderId},a.pro_id,IFNULL(b.pro_default,''),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) FROM tb_transition a LEFT JOIN tj_project b ON a.pro_id=b.pro_id  WHERE a.cus_id=#{cusId} \n" +
            "     SELECT #{orderId},a.pro_id,IFNULL(b.pro_default,''),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) FROM tb_transition a LEFT JOIN tj_project b ON a.pro_id=b.pro_id  WHERE a.cus_id=#{cusId} \n" +
            "\t\t\n" +
            "\tUNION\n" +
            "  \n" +
            "\tSELECT DISTINCT a.parent_pro_id,#{orderId},a.parent_pro_id,IFNULL(b.pro_default,''),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) FROM tb_transition a LEFT JOIN tj_project b ON a.parent_pro_id=b.pro_id  WHERE a.cus_id=#{cusId}")
            "\tSELECT #{orderId},a.parent_pro_id,IFNULL(b.pro_default,''),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) FROM tb_transition a LEFT JOIN tj_project b ON a.parent_pro_id=b.pro_id  WHERE a.cus_id=#{cusId}")
     boolean saveTjOrderDetailsByCusId(@Param("cusId")String cusId,@Param("orderId")String orderId,@Param("userName")String userName,@Param("userId") String userId);