zangguocen преди 4 години
родител
ревизия
318b1b2884

+ 7 - 3
yijia-admin/src/main/java/com/yijia/web/controller/common/CommonController.java

@@ -19,7 +19,7 @@ import com.yijia.framework.config.ServerConfig;
 
 /**
  * 通用请求处理
- * 
+ *
  * @author yijia
  */
 @RestController
@@ -32,7 +32,7 @@ public class CommonController
 
     /**
      * 通用下载请求
-     * 
+     *
      * @param fileName 文件名称
      * @param delete 是否删除
      */
@@ -76,7 +76,11 @@ public class CommonController
             String filePath = YiJiaConfig.getUploadPath();
             // 上传并返回新文件名称
             String fileName = FileUploadUtils.upload(filePath, file);
-            String url = serverConfig.getUrl() + fileName;
+            String urls = serverConfig.getUrl() + fileName;
+            System.out.println("----===============fileName:"+fileName);
+            System.out.println("----===============getImageurl:"+ YiJiaConfig.getImageUrl() );
+            System.out.println("----===============getImageurl:"+ YiJiaConfig.getProfile());
+            String url = YiJiaConfig.getImageUrl() + fileName;
             AjaxResult ajax = AjaxResult.success();
             ajax.put("fileName", fileName);
             ajax.put("url", url);

+ 0 - 3
yijia-admin/src/main/java/com/yijia/web/controller/system/SysDeptController.java

@@ -6,8 +6,6 @@ import java.util.List;
 
 import com.yijia.common.core.domain.TreeSelect;
 import com.yijia.common.core.domain.model.LoginUser;
-import com.yijia.common.utils.bean.BeanUtils;
-import com.yijia.system.domain.SysDeptDemo;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -161,7 +159,6 @@ public class SysDeptController extends BaseController
     /**
      * 新增部门
      */
-    @PreAuthorize("@ss.hasPermi('system:dept:add')")
     @Log(title = "部门管理", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@Validated @RequestBody SysDept dept)

+ 1 - 1
yijia-admin/src/main/resources/application-druid.yml

@@ -7,7 +7,7 @@ spring:
             # 主库数据源
             master:
                 #url: jdbc:mysql://47.105.116.204:3306/jiaduoduo_db_debug?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_debug?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://115.28.211.17:3306/jiaduoduo_db_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: develop
                 password: 1234.Abcd
                 #url: jdbc:mysql://localhost:3306/jiaduoduo_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8

+ 4 - 4
yijia-admin/src/main/resources/application.yml

@@ -13,12 +13,12 @@ yijia:
   #profile: /home/uploadfile/images
   #imageurl:http://upload.huijy.net:8088/images
   #测试服务器
-  profile: /home/uploadfile/images
-  imageurl: http://upload.huijy.net:8088/images
+  # profile: /home/uploadfile/images
+  # imageurl: http://upload.huijy.net:8088/images
   #本地测试服务
-  # profile: E:/img
+  profile: E:/img
   #图片地址
-  #imageUrl: http://localhost:8080/profile
+  imageUrl: http://localhost:8080/profile
   # 获取ip地址开关
   addressEnabled: false
   # 验证码开关

+ 10 - 1
yijia-common/src/main/java/com/yijia/common/config/YiJiaConfig.java

@@ -5,7 +5,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * 读取项目相关配置
- * 
+ *
  * @author yijia
  */
 @Component
@@ -30,6 +30,9 @@ public class YiJiaConfig
     /** 获取地址开关 */
     private static boolean addressEnabled;
 
+    private static String imageUrl;
+
+
     public String getName()
     {
         return name;
@@ -80,6 +83,12 @@ public class YiJiaConfig
         YiJiaConfig.profile = profile;
     }
 
+    public static String getImageUrl() {
+        return imageUrl;
+    }
+
+    public void setImageUrl(String imageUrl) { YiJiaConfig.imageUrl = imageUrl;}
+
     public static boolean isAddressEnabled()
     {
         return addressEnabled;

+ 4 - 1
yijia-common/src/main/java/com/yijia/common/utils/file/FileUploadUtils.java

@@ -146,7 +146,10 @@ public class FileUploadUtils
     {
         int dirLastIndex = YiJiaConfig.getProfile().length() + 1;
         String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
-        String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
+        //String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
+        System.out.println("--------------fileName:"+fileName);
+        System.out.println("--------------currentDir:"+currentDir);
+        String pathFileName ="/" + currentDir + "/" + fileName;
         return pathFileName;
     }
 

+ 2 - 2
yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

@@ -177,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </where>
             GROUP BY m.union_id,m.member_id,m.customer_name,m.phone_number,m.mina_user_id, m.car_number,p.points,c.station_id
         ) sy
-        LEFT JOIN (SELECT max(pay_date) pay_date ,po.consumer
+        LEFT JOIN (SELECT max(pay_date) pay_date ,po.consumer_id
         from pay_order po
         <where>
             <if test="stationIdList != null ">
@@ -188,7 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 </foreach>
             </if>
         </where>
-        GROUP BY  po.consumer) px on sy.customer_name =  px.consumer
+        GROUP BY  po.consumer_id) px on sy.mina_user_id =  px.consumer_id
         order by px.pay_date desc
     </select>
 </mapper>

+ 12 - 13
yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.station.mapper.PayOrderMapper">
-    
+
     <resultMap type="PayOrder" id="PayOrderResult">
         <result property="orderId"    column="order_id"    />
         <result property="orderNo"    column="order_no"    />
@@ -53,16 +53,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <sql id="selectPayOrderVo">
-        select order_id, order_no, station_id, station_name, status, consumer_id, consumer, oil_gun, oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel, pay_date, created_date, order_type, car_no, customer_phone, customer_grade from pay_order
+        select order_id, order_no, station_id,d.dept_name as station_name, p.status,consumer_id, consumer, oil_gun,
+         oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt,
+          discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt,
+           other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel,
+            pay_date, created_date, order_type, car_no, customer_phone, customer_grade
+            from pay_order p join sys_dept d on p.station_id =d.dept_id
     </sql>
 
     <select id="selectPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult">
         <include refid="selectPayOrderVo"/>
-        <where>  
+        <where>
             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="status != null  and status != ''"> and p.status = #{status}</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer like concat('%', #{consumer}, '%')</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
@@ -124,7 +128,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
             <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
             <if test="consumer != null  and consumer != ''"> and consumer = #{consumer}</if>
@@ -412,7 +415,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <where>
                 <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
                 <if test="stationId != null "> and station_id = #{stationId}</if>
-                <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
                 <if test="status != null  and status != ''"> and status = #{status}</if>
                 <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
             </where>
@@ -423,7 +425,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">order_no,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="status != null">status,</if>
             <if test="consumerId != null">consumer_id,</if>
             <if test="consumer != null">consumer,</if>
@@ -463,7 +464,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="status != null">#{status},</if>
             <if test="consumerId != null">#{consumerId},</if>
             <if test="consumer != null">#{consumer},</if>
@@ -507,7 +507,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
             <if test="orderNo != null">order_no = #{orderNo},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="status != null">status = #{status},</if>
             <if test="consumerId != null">consumer_id = #{consumerId},</if>
             <if test="consumer != null">consumer = #{consumer},</if>
@@ -552,10 +551,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deletePayOrderByIds" parameterType="String">
-        delete from pay_order where order_id in 
+        delete from pay_order where order_id in
         <foreach item="orderId" collection="array" open="(" separator="," close=")">
             #{orderId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 14 - 10
yijia-station/src/main/resources/mapper/station/StationClassStructureMapper.xml

@@ -54,7 +54,13 @@
     </resultMap>
 
     <sql id="selectStationClassStructureVo">
-        select id, order_no, station_id, station_name, oil_gun, oil_name, oil_pirce, oil_type, consumer_id, consumer, amt, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, print_num, class_structure_no, class_start_date, class_structure_date, class_structure_man, oils, receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt, car_no, customer_phone, customer_grade from station_class_structure
+        select id, order_no, station_id, d.dept_name as station_name, oil_gun, oil_name, oil_pirce, oil_type,
+        consumer_id, consumer, amt, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type,
+        print_num, class_structure_no, class_start_date, class_structure_date, class_structure_man, oils,
+         receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, zfb_amt,
+         pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt, car_no,
+         customer_phone, customer_grade
+          from station_class_structure s join sys_dept d on s.station_id = d.dept_id
     </sql>
 
     <select id="selectStationClassStructureList" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
@@ -125,8 +131,10 @@
         GROUP BY a.oil_name,a.station_id,a.class_start_date,a.class_structure_date,a.class_structure_man
     </select>
     <select id="selectStationClassStructureMax" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-        select id, station_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt, station_name, order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, oil_type, print_num, class_structure_no, class_structure_date, class_structure_man, oils
-        from station_class_structure
+        select id, station_id, order_no, oil_gun, oil_name, consumer_id, consumer, amt,d.dept_name as station_name,
+        order_liters, pay_type, pay_way, pay_date, oil_personnel, order_type, oil_type, print_num,
+        class_structure_no, class_structure_date, class_structure_man, oils
+        from station_class_structure s join sys_dept d on s.station_id = d.dept_id
         where id = (
         SELECT MAX(id) from station_class_structure
         <where>
@@ -151,17 +159,17 @@
     </select>
     <!--根据班次号汇总班结数据-->
     <select id="selectSummyClassStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-        select  class_structure_no,class_start_date,class_structure_date,station_id,station_name,count(order_no) as num,
+        select  class_structure_no,class_start_date,class_structure_date,station_id,d.dept_name as station_name,count(order_no) as num,
         sum(order_liters) as order_liters,sum(receivable_amt) as receivable_amt,sum(amt) as amt,class_structure_man,
         sum(print_num) as print_num,sum(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt,
         sum(dzk_amt) as dzk_amt,sum(discount_amt) as discount_amt,SUM(pos_amt) as pos_amt,sum(xj_amt) as xj_amt
-        from station_class_structure
+        from station_class_structure s join sys_dept d on s.station_id = d.dept_id
         <where>
             <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
             <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
-        GROUP BY class_structure_no,class_start_date,station_id,station_name,class_structure_date,class_structure_man
+        GROUP BY class_structure_no,class_start_date,station_id,d.dept_name,class_structure_date,class_structure_man
     </select>
     <!--按员工/支付方式汇总数据-->
     <!--    SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt-->
@@ -273,7 +281,6 @@
         <where>
             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
             <if test="oilGun != null  and oilGun != ''"> and oil_gun = #{oilGun}</if>
             <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
             <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if>
@@ -320,7 +327,6 @@
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">order_no,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="oilGun != null">oil_gun,</if>
             <if test="oilName != null">oil_name,</if>
             <if test="oilPirce != null">oil_pirce,</if>
@@ -363,7 +369,6 @@
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="oilGun != null">#{oilGun},</if>
             <if test="oilName != null">#{oilName},</if>
             <if test="oilPirce != null">#{oilPirce},</if>
@@ -410,7 +415,6 @@
         <trim prefix="SET" suffixOverrides=",">
             <if test="orderNo != null">order_no = #{orderNo},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="oilGun != null">oil_gun = #{oilGun},</if>
             <if test="oilName != null">oil_name = #{oilName},</if>
             <if test="oilPirce != null">oil_pirce = #{oilPirce},</if>

+ 0 - 1
yijia-system/src/main/java/com/yijia/system/service/impl/SysDeptServiceImpl.java

@@ -5,7 +5,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.stream.Collectors;
 
-import com.yijia.system.domain.SysDeptDemo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.yijia.common.annotation.DataScope;