소스 검색

修改供应商

zhs 3 년 전
부모
커밋
6e9636d683

+ 23 - 0
src/main/java/com/supplier/config/SaticScheduleTask.java

@@ -0,0 +1,23 @@
+package com.supplier.config;
+
+import com.supplier.model.PrivateOrder;
+import com.supplier.service.PrivateOrderService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * 定时任务
+ */
+@Component
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling   // 2.开启定时任务
+public class SaticScheduleTask {
+    @Autowired
+    private PrivateOrderService privateOrderService;
+
+}

+ 1 - 0
src/main/java/com/supplier/mapper/PrivateOrderMapper.java

@@ -19,4 +19,5 @@ public interface PrivateOrderMapper {
     int getPrivateOrderType(PrivateOrder privateOrder);
 
     List<PrivateOrder> getPrivateOrderZeor(PrivateOrder privateOrder);
+
 }

+ 1 - 2
src/main/resources/config/mapping/SupplierReleaseMapper.xml

@@ -5,8 +5,7 @@
     <!-- 新增路线 -->
     <insert id="addRelease" parameterType="SupplierRelease">
         insert into bus_supplier_release(code,uuid,demand_uuid,jdrq,update_date,price_all,title_img,offer_name,price_detail,contract_file,price_detail_text,other)
-        values (#{code},#{uuid},#{demandUuid},format(SYSDATETIME(),'yyyy-MM-dd hh:mm:ss'),format(SYSDATETIME(),'yyyy-MM-dd hh:mm:ss'),#{priceAll},#{titleImg},#{offerName},#{priceDetail},#{contractFile},#{priceDetailText},#{other});
-        update bus_private_ordering set order_type = 1 where uuid = #{demandUuid};
+        values (#{code},#{uuid},#{demandUuid},format(SYSDATETIME(),'yyyy-MM-dd hh:mm:ss'),format(SYSDATETIME(),'yyyy-MM-dd hh:mm:ss'),#{priceAll},#{titleImg},#{offerName},#{priceDetail},#{contractFile},#{priceDetailText},#{other})
     </insert>
     <!-- 新增每天内容 -->
     <insert id="addReleaseDay" parameterType="SupplierReleaseDay">

+ 2 - 2
src/main/resources/config/mapping/privateOrderMapper.xml

@@ -22,10 +22,10 @@
             b.*
         FROM
         ( SELECT *, ROW_NUMBER ( ) OVER ( ORDER BY ID ) AS RowId FROM bus_private_ordering ) AS b
-        JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE order_type = 0 AND demand_uuid NOT IN ( SELECT demand_uuid FROM bus_private_ordering_type WHERE code = #{code} AND order_type != 0 ) ) AS c ON b.uuid = c.demand_uuid
+        JOIN ( SELECT code,uuid FROM bus_private_ordering WHERE uuid NOT IN ( SELECT demand_uuid FROM bus_private_ordering_type WHERE code = #{code} AND order_type != 0 ) ) AS c ON b.uuid = c.uuid
         WHERE
         RowId BETWEEN #{page} AND #{limit}
-        AND uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
+        AND b.uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
         <if test="startTime != null and startTime !=''">
             and CONVERT (datetime, start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, end_time) <![CDATA[ <= ]]> #{endTime}
         </if>

+ 22 - 19
src/main/resources/static/css/demandForSingle/offer.css

@@ -7,7 +7,7 @@
     padding-left: 41px;
 }
 .destination_end{
-    font-size: 16px;
+    font-size: 18px;
     margin-left: 34px;
     margin-right: 36px;
     color: #666666;
@@ -19,25 +19,25 @@
     margin-bottom: 2px;
 }
 .start_end_time{
-    font-size: 16px;
+    font-size: 18px;
     margin-right: 36px;
     color: #666666;
     line-height: 30px;
 }
 .people_number{
-    font-size: 16px;
+    font-size: 18px;
     margin-right: 36px;
     color: #666666;
     line-height: 30px;
 }
 .amount_range{
-    font-size: 16px;
+    font-size: 18px;
     margin-right: 36px;
     color: #666666;
     line-height: 30px;
 }
 .hotel_scale{
-    font-size: 16px;
+    font-size: 18px;
     color: #666666;
     line-height: 30px;
 }
@@ -69,7 +69,7 @@
     display: flex;
     align-items: center;
     padding-bottom: 120px;
-    font-size: 26px;
+    font-size: 18px;
     color: #000;
 }
 .timeline li i[data-v-2d69a44a] {
@@ -81,7 +81,7 @@
     top: 24px;
     left: 6px;
     z-index: 1;
-    width: 6px;
+    width: 1px;
     height: 138px;
     background-color: #e3e4e5;
 }
@@ -111,7 +111,7 @@
     float: left;
     width: calc(100% - 188px - 6px);
     /*height: 100%;*/
-    border-left: 6px solid #e3e4e5;
+    border-left: 1px solid #e3e4e5;
     margin-top: 60px;
 }
 .content_right .content_add_div{
@@ -149,7 +149,7 @@
     background-color: #f4f4f4;
     width: calc(100% - 32px - 48px);
     float: right;
-    font-size: 18px;
+    font-size: 16px;
     font-weight: 700;
 }
 .content_add_div .layui-inline{
@@ -166,7 +166,7 @@
     border: 0;
     background-color: #f4f4f4;
     height: 100%;
-    font-size: 18px;
+    font-size: 16px;
     font-weight: 700;
     color: #333333;
     border-radius: 10px;
@@ -182,8 +182,10 @@
     border: 1px solid #e3e4e5;
 }
 .add_date{
+    width: 35px;
+    height: 35px;
     position: absolute;
-    bottom: 0;
+    bottom: 3px;
     right: 1%;
     cursor: pointer;
     margin-bottom: 20px;
@@ -284,15 +286,15 @@
     transition: all.3s;
     transform: translate(-31px);
     position: relative;
-    right: 78px;
+    right: 72px;
 }
 .operation-leader[data-v-67b53f28] {
     display: flex;
     align-items: center;
     justify-content: center;
-    width: 56px;
-    min-width: 56px;
-    height: 56px;
+    width: 46px;
+    min-width: 46px;
+    height: 46px;
     margin-right: 46px;
     background-color: #fff;
     border: 2px solid #0095f3;
@@ -438,10 +440,11 @@
 }
 .del_date{
     float: left;
-    width: 42px;
-    height: 42px;
+    width: 35px;
+    height: 35px;
     border-radius: 50%;
     position: absolute;
+    top: 4px;
     right: -5%;
     background-color: #ccc;
     color: #ffff;
@@ -546,7 +549,7 @@
 }
 .name_private_offer span{
     float: left;
-    width: 125px;
+    width: 150px;
     font-size: 18px;
     font-family: PingFang SC, PingFang SC-Bold;
     font-weight: 700;
@@ -559,7 +562,7 @@
     height: 48px;
     border: 1px solid #e3e4e5;
     border-radius: 10px;
-    font-size: 18px;
+    font-size: 16px;
     padding-left: 20px;
 }
 .name_private_offer .cover_img{

+ 32 - 17
src/main/resources/static/js/demandForSingle/offer/function.js

@@ -253,6 +253,18 @@ delPlay = function(obj){
 //新增路线信息
 function submitAdd(){
     layer.load(3);
+    var priceAll = $(".all_price input[name=priceAll]").val(); //总价
+    var titleName = $("input[name=offerName]").val();
+    if(titleName == null || titleName == ""){
+        layer.msg("请输入报价单名称", {icon: 2, time: 1000});
+        layer.closeAll("loading");
+        return false;
+    }
+    if(priceAll == null || priceAll == ""){
+        layer.msg("请输入总价", {icon: 2, time: 1000});
+        layer.closeAll("loading");
+        return false;
+    }
     let arryValue = theValues();
     $.ajax({
         url: "/supplierRelease/" + urlAddUpate,
@@ -264,7 +276,7 @@ function submitAdd(){
             "uuid": releaseUUid,
             "priceAll": arryValue.priceAll,
             "titleImg": titleImg,
-            "offerName": arryValue.offerName,
+            "offerName": arryValue.titleName,
             "other": arryValue.other,
             "priceDetail": arryValue.priceDetail,
             "priceDetailText": arryValue.priceDetailText,
@@ -431,7 +443,7 @@ function elementDrawing(data){
     $.each(data.data[0].releasePlay, (index, elem) => {
         if(elem.typeVal == "0"){
             $(".content_add_div[daynum="+ elem.dayNum +"] .play_div").append("<!-- 景点 -->\n" +
-                "                    <div class=\"play_content_div scenic_spot_div "+ elem.uuid +"\">\n" +
+                "                    <div class=\"play_content_div scenic_spot_div "+ elem.uuid + "-" + elem.typeVal +"\">\n" +
                 "                        <div class=\"title_name_spot\">\n" +
                 "                            <svg viewBox=\"0 0 1024 1024\" class=\"title_name_img\">\n" +
                 "                                <path d=\"M512 64C317.92 64 160 221.92 160 416c0 187.36 315.424 520.032 328.832 534.08C494.88 956.448 503.264 960 512 960c0.224 0 0.48 0 0.704 0 8.992 0 17.472-4.192 23.392-10.944l109.216-125.12C790.432 646.176 864 508.928 864 416 864 221.92 706.08 64 512 64zM512 576c-88.384 0-160-71.616-160-160s71.616-160 160-160 160 71.616 160 160S600.384 576 512 576z\" p-id=\"2190\"></path>\n" +
@@ -478,7 +490,7 @@ function elementDrawing(data){
                 "                    </div>");
         }else if(elem.typeVal == "1"){
             $(".content_add_div[daynum="+ elem.dayNum +"] .play_div").append("<!-- 酒店 -->\n" +
-                "                    <div class=\"play_content_div scenic_spot_div "+ elem.uuid +"\">\n" +
+                "                    <div class=\"play_content_div scenic_spot_div "+ elem.uuid + "-" + elem.typeVal +"\">\n" +
                 "                        <div class=\"title_name_spot\">\n" +
                 "                            <svg viewBox=\"0 0 1024 1024\" class=\"title_name_img\">\n" +
                 "                                <path d=\"M512 64C317.92 64 160 221.92 160 416c0 187.36 315.424 520.032 328.832 534.08C494.88 956.448 503.264 960 512 960c0.224 0 0.48 0 0.704 0 8.992 0 17.472-4.192 23.392-10.944l109.216-125.12C790.432 646.176 864 508.928 864 416 864 221.92 706.08 64 512 64zM512 576c-88.384 0-160-71.616-160-160s71.616-160 160-160 160 71.616 160 160S600.384 576 512 576z\" p-id=\"2190\"></path>\n" +
@@ -506,7 +518,7 @@ function elementDrawing(data){
                 "                    </div>");
         }else if(elem.typeVal == "2"){
             $(".content_add_div[daynum="+ elem.dayNum +"] .play_div").append("<!-- 包车,车型-->\n" +
-                "                    <div class=\"play_content_div scenic_spot_div "+ elem.uuid +"\">\n" +
+                "                    <div class=\"play_content_div scenic_spot_div "+ elem.uuid + "-" + elem.typeVal +"\">\n" +
                 "                        <div class=\"title_name_spot\">\n" +
                 "                            <svg viewBox=\"0 0 1024 1024\" class=\"title_name_img\">\n" +
                 "                                <path d=\"M512 64C317.92 64 160 221.92 160 416c0 187.36 315.424 520.032 328.832 534.08C494.88 956.448 503.264 960 512 960c0.224 0 0.48 0 0.704 0 8.992 0 17.472-4.192 23.392-10.944l109.216-125.12C790.432 646.176 864 508.928 864 416 864 221.92 706.08 64 512 64zM512 576c-88.384 0-160-71.616-160-160s71.616-160 160-160 160 71.616 160 160S600.384 576 512 576z\" p-id=\"2190\"></path>\n" +
@@ -554,7 +566,7 @@ function elementDrawing(data){
         var imgUrlArray = elem.imgUrl == null ? new Array() : elem.imgUrl.split(",");
         var videoUrlArray = elem.videoUrl == null ? new Array() : elem.videoUrl.split(",");
         for(var i = 0; i < imgUrlArray.length; i++){
-            $("." + elem.uuid + " .editor-assets-content").append("<div class=\"editor-assets-content-info\" data-v-400c2eb9=\"\">\n" +
+            $("."+ elem.uuid + "-" + elem.typeVal +" .editor-assets-content").append("<div class=\"editor-assets-content-info\" data-v-400c2eb9=\"\">\n" +
                 "                                    <div class=\"el-image\" data-v-400c2eb9=\"\"><img style='width: 100px;height: 100px;' alt=\"upload-assets\"\n" +
                 "                                                                                  src="+ imgUrlArray[i] +"\n" +
                 "                                                                                  class=\"el-image__inner el-image__preview\"\n" +
@@ -567,7 +579,7 @@ function elementDrawing(data){
                 "                                </div>");
         }
         for(var j = 0; j < videoUrlArray.lengthl; j++){
-            $("." + elem.uuid + " .editor-assets-content").append("<video src="+ videoUrlArray[j] +" controls=\"\" data-v-400c2eb9=\"\"></video>");
+            $("."+ elem.uuid + "-" + elem.typeVal +" .editor-assets-content").append("<video src="+ videoUrlArray[j] +" controls=\"\" data-v-400c2eb9=\"\"></video>");
         }
     })
     addUrl(uuid);
@@ -627,6 +639,7 @@ function theValues(){
     var titleName = $("input[name=offerName]").val();
     var priceDetail = $("input[name=priceDetail]").val();
     var priceDetailText = $("textarea[name=priceDetailText]").val();
+
     var other = "";//其他
     $.each($(".radio_icon_color"), (index, item) => {
         other += $(item).next().text() + ",";
@@ -636,16 +649,6 @@ function theValues(){
     map.other = other.substring(0, other.length - 1);
     map.priceDetail = priceDetail;
     map.priceDetailText = priceDetailText;
-    if(titleName == null || titleName == ""){
-        layer.msg("请输入报价单名称", {icon: 2, time: 1000});
-        layer.closeAll("loading");
-        return false;
-    }
-    if(priceAll == null || priceAll == ""){
-        layer.msg("请输入总价", {icon: 2, time: 1000});
-        layer.closeAll("loading");
-        return false;
-    }
     //取值
     $.each($(".content_add_div"), (index, item) => {
         var dayNum = $(item).attr("dayNum"); //天数
@@ -743,6 +746,18 @@ function theValues(){
 //保存模板
 function submitAddTemplate(){
     layer.load(3);
+    var priceAll = $(".all_price input[name=priceAll]").val(); //总价
+    var titleName = $("input[name=offerName]").val();
+    if(titleName == null || titleName == ""){
+        layer.msg("请输入报价单名称", {icon: 2, time: 1000});
+        layer.closeAll("loading");
+        return false;
+    }
+    if(priceAll == null || priceAll == ""){
+        layer.msg("请输入总价", {icon: 2, time: 1000});
+        layer.closeAll("loading");
+        return false;
+    }
     let arryValue = theValues();
     $.ajax({
         url: "/template/addSupplierRelease",
@@ -752,7 +767,7 @@ function submitAddTemplate(){
             "releasePlayString": arryValue.releasePlayString,
             "priceAll": arryValue.priceAll,
             "titleImg": titleImg,
-            "offerName": arryValue.offerName,
+            "offerName": arryValue.titleName,
             "travelTime": $(".start_end_time").text(),
             "other": arryValue.other,
         }),

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2 - 0
src/main/resources/static/js/webIm/Easemob-chat-3.6.3.js


+ 140 - 0
src/main/resources/static/js/webIm/WebIMConfig.js

@@ -0,0 +1,140 @@
+/**
+ * git do not control webim.config.js
+ * everyone should copy webim.config.js.demo to webim.config.js
+ * and have their own configs.
+ * In this way , others won't be influenced by this config while git pull.
+ *
+ */
+
+// for react native
+// var location = {
+//     protocol: "https"
+// }
+
+function getUrl(){
+    var apiUrl = (window.location.protocol === "https:" ? "https:" : "http:") + "//a1-hsb.easemob.com"
+    var xmppUrl = "im-api.easemob.com"
+    if(window.location.href.indexOf("webim-h5.easemob.com") !== -1 || window.location.href.indexOf("localhost") !== -1 || window.location.href.indexOf("172.17.2.168") !== -1){
+        apiUrl = (window.location.protocol === "https:" ? "https:" : "http:") + "//a1-hsb-ly.easemob.com"
+        xmppUrl = "im-api.easemob.com"
+    }
+    // else if(window.location.href.indexOf("webim-hsb.easemob.com") !== -1){
+    //     apiUrl = (window.location.protocol === "https:" ? "https:" : "http:") + "//a1-hsb.easemob.com"
+    //     xmppUrl = "im-api-hsb.easemob.com"
+    // }
+    return {
+        apiUrl: apiUrl,
+        xmppUrl: xmppUrl
+    }
+}
+
+
+var config = {
+    /*
+     * XMPP server
+     */
+    xmppURL: (window.location.protocol === "https:" ? "https:" : "http:") + "//im-api-v2.easemob.com/ws",
+    // xmppURL: "im-api.easemob.com",
+    // xmppURL: '172.17.2.139:5280',
+    /*
+     * Backend REST API URL
+     */
+    // apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//a1.easemob.com',
+    // ios must be https!!! by lwz
+    // apiURL: "https://a1.easemob.com",
+    apiURL: (window.location.protocol === "https:" ? "https:" : "http:") + "//a1.easemob.com",
+    // apiURL: (location.protocol === 'https:' ? 'https:' : 'http:') + '//172.17.3.155:8080',
+    /*
+     * Application AppKey
+     */
+    appkey: "easemob-demo#easeim",
+    // appkey: "1108200309157490#bpttest",
+    
+
+    /*
+     * Application Host
+     */
+    Host: "easemob.com",
+    /*
+     * Whether to use HTTPS
+     * @parameter {Boolean} true or false
+     */
+    https: true,
+    isHttpDNS: false,
+    /*
+     * isMultiLoginSessions
+     * true: A visitor can sign in to multiple webpages and receive messages at all the webpages.
+     * false: A visitor can sign in to only one webpage and receive messages at the webpage.
+     */
+    isMultiLoginSessions: true,
+    /**
+     * Whether to use window.doQuery()
+     * @parameter {Boolean} true or false
+     */
+    isWindowSDK: false,
+    /**
+     * isSandBox=true:  xmppURL: 'im-api.sandbox.easemob.com',  apiURL: '//a1.sdb.easemob.com',
+     * isSandBox=false: xmppURL: 'im-api.easemob.com',          apiURL: '//a1.easemob.com',
+     * @parameter {Boolean} true or false
+     */
+    isSandBox: false,
+    /**
+     * Whether to console.log in strophe.log()
+     * @parameter {Boolean} true or false
+     */
+    isDebug: true,
+    /**
+     * Whether to show logs in strophe
+     * @parameter {Boolean} true or false
+     */
+    isStropheLog: false,
+    /**
+     * will auto connect the xmpp server autoReconnectNumMax times in background when client is offline.
+     * won't auto connect if autoReconnectNumMax=0.
+     */
+    autoReconnectNumMax: 5,
+    /**
+     * the interval secons between each atuo reconnectting.
+     * works only if autoReconnectMaxNum >= 2.
+     */
+    autoReconnectInterval: 2,
+    /**
+     * webrtc supports WebKit and https only
+     */
+    isWebRTC: window.RTCPeerConnection && /^https\:$/.test(window.location.protocol),
+    /**
+     *  cn: chinese
+     *  us: english
+     */
+    i18n: "cn",
+    /*
+     * Set to auto sign-in
+     */
+    isAutoLogin: true,
+    /**
+     * Size of message cache for person to person
+     */
+    p2pMessageCacheSize: 500,
+    /**
+     * When a message arrived, the receiver send an ack message to the
+     * sender, in order to tell the sender the message has delivered.
+     * See call back function onReceivedMessage
+     */
+    delivery: false,
+    /**
+     * Size of message cache for group chating like group, chatroom etc
+     */
+    groupMessageCacheSize: 200,
+    /**
+     * 5 actual logging methods, ordered and available:
+     * 'TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR'
+     */
+
+    loglevel: "ERROR",
+
+    /**
+     * enable localstorage for history messages
+     */
+    enableLocalStorage: true
+}
+

+ 2 - 0
src/main/resources/templates/indexHome.html

@@ -7,6 +7,8 @@
     <script src="/layui/layui.js"></script>
     <script src="/js/jquery.js"></script>
     <script src="/js/common.js"></script>
+    <script src="/js/webIm/WebIMConfig.js"></script>
+    <script src="/js/webIm/Easemob-chat-3.6.3.js"></script>
     <script src="/js/indexHome.js"></script>
     <!-- 公共样式 -->
     <link rel="stylesheet" href="/css/common.css">