Przeglądaj źródła

修改班结打印小票

MS-QJVSRANLTYEO\Administrator 4 lat temu
rodzic
commit
c1f2e58e75

+ 13 - 2
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardSettingDetailController.java

@@ -1,6 +1,9 @@
 package com.yijia.customer.controller;
 
 import java.util.List;
+
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.system.service.ISysDeptService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -22,7 +25,7 @@ import com.yijia.common.core.page.TableDataInfo;
 
 /**
  * 客户电子会员卡充值优惠设置明细Controller
- * 
+ *
  * @author yijia
  * @date 2021-04-06
  */
@@ -32,7 +35,8 @@ public class CustomerCardSettingDetailController extends BaseController
 {
     @Autowired
     private ICustomerCardSettingDetailService customerCardSettingDetailService;
-
+    @Autowired
+    private ISysDeptService deptService;
     /**
      * 查询客户电子会员卡充值优惠设置明细列表
      */
@@ -52,6 +56,13 @@ public class CustomerCardSettingDetailController extends BaseController
     @GetMapping("/listDetailInfo")
     public TableDataInfo listDetailInfo(CustomerCardSettingDetail customerCardSettingDetail)
     {
+        if(customerCardSettingDetail!=null &&customerCardSettingDetail.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(customerCardSettingDetail.getStationId());
+            List<String> list = deptService.selectDeptId(dept);
+            customerCardSettingDetail.setStationIdList(list);
+            customerCardSettingDetail.setStationId(null);
+        }
         startPage();
         List<CustomerCardSettingDetail> list = customerCardSettingDetailService.listDetailInfo(customerCardSettingDetail);
         return getDataTable(list);

+ 18 - 9
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardSettingDetail.java

@@ -8,7 +8,7 @@ import com.yijia.common.core.domain.BaseEntity;
 
 /**
  * 客户电子会员卡充值优惠设置明细对象 customer_card_setting_detail
- * 
+ *
  * @author yijia
  * @date 2021-04-06
  */
@@ -38,6 +38,15 @@ public class CustomerCardSettingDetail extends BaseEntity
     private String isMarket;
     private String presentScale;
     private String enjoyIntegralMultiple;
+    private Long stationId;
+
+    public Long getStationId() {
+        return stationId;
+    }
+
+    public void setStationId(Long stationId) {
+        this.stationId = stationId;
+    }
 
     public String getEnjoyIntegralMultiple() {
         return enjoyIntegralMultiple;
@@ -139,39 +148,39 @@ public class CustomerCardSettingDetail extends BaseEntity
     @Excel(name = "赠送金额值或者赠送c充值金额的比例")
     private BigDecimal presentAmt;
 
-    public void setId(Long id) 
+    public void setId(Long id)
     {
         this.id = id;
     }
 
-    public Long getId() 
+    public Long getId()
     {
         return id;
     }
-    public void setParentId(Long parentId) 
+    public void setParentId(Long parentId)
     {
         this.parentId = parentId;
     }
 
-    public Long getParentId() 
+    public Long getParentId()
     {
         return parentId;
     }
-    public void setSettingRuleType(String settingRuleType) 
+    public void setSettingRuleType(String settingRuleType)
     {
         this.settingRuleType = settingRuleType;
     }
 
-    public String getSettingRuleType() 
+    public String getSettingRuleType()
     {
         return settingRuleType;
     }
-    public void setPresentAmt(BigDecimal presentAmt) 
+    public void setPresentAmt(BigDecimal presentAmt)
     {
         this.presentAmt = presentAmt;
     }
 
-    public BigDecimal getPresentAmt() 
+    public BigDecimal getPresentAmt()
     {
         return presentAmt;
     }

+ 7 - 7
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardSettingDetailMapper.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.customer.mapper.CustomerCardSettingDetailMapper">
-    
+
     <resultMap type="CustomerCardSettingDetail" id="CustomerCardSettingDetailResult">
         <result property="id"    column="id"    />
         <result property="parentId"    column="parent_id"    />
@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectCustomerCardSettingDetailList" parameterType="CustomerCardSettingDetail" resultMap="CustomerCardSettingDetailResult">
         <include refid="selectCustomerCardSettingDetailVo"/>
-        <where>  
+        <where>
             <if test="parentId != null "> and parent_id = #{parentId}</if>
             <if test="settingRuleType != null  and settingRuleType != ''"> and setting_rule_type = #{settingRuleType}</if>
             <if test="discountAmtStart != null "> and discount_amt_start = #{discountAmtStart}</if>
@@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilName != null "> and oil_name = #{oilName}</if>
             <if test="status != null "> and status = #{status}</if>
             <if test="stationIdList != null ">
-                and station_id in
+                and b.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
@@ -69,12 +69,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </if>
         </where>
     </select>
-    
+
     <select id="selectCustomerCardSettingDetailById" parameterType="Long" resultMap="CustomerCardSettingDetailResult">
         <include refid="selectCustomerCardSettingDetailVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertCustomerCardSettingDetail" parameterType="CustomerCardSettingDetail">
         insert into customer_card_setting_detail
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCustomerCardSettingDetailByIds" parameterType="String">
-        delete from customer_card_setting_detail where id in 
+        delete from customer_card_setting_detail where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
@@ -135,4 +135,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null"> and status = #{status}</if>
         </where>
     </delete>
-</mapper>
+</mapper>

+ 8 - 8
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.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.customer.mapper.CustomerManageMapper">
-    
+
     <resultMap type="CustomerManage" id="CustomerManageResult">
         <result property="id"    column="id"    />
         <result property="memberId"    column="member_id"    />
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectCustomerManageList" parameterType="CustomerManage" resultMap="CustomerManageResult">
         <include refid="selectCustomerManageVo"/>
-        <where>  
+        <where>
             <if test="memberId != null  and memberId != ''"> and member_id = #{memberId}</if>
             <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
             <if test="commendMan != null  and commendMan != ''"> and commend_man = #{commendMan}</if>
@@ -80,12 +80,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by  id desc
     </select>
-    
+
     <select id="selectCustomerManageById" parameterType="Long" resultMap="CustomerManageResult">
         <include refid="selectCustomerManageVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertCustomerManage" parameterType="CustomerManage" useGeneratedKeys="true" keyProperty="id">
         insert into customer_manage
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -187,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCustomerManageByIds" parameterType="String">
-        delete from customer_manage where id in 
+        delete from customer_manage where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
@@ -215,7 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <!--    </select>-->
     <select id="selectCustomerManage" parameterType="CustomerManage" resultMap="CustomerManageResult">
         SELECT sy.*,px.pay_date from (
-        SELECT m.member_id,m.customer_name,m.phone_number,m.car_number,GROUP_CONCAT(DISTINCT(m.oil_name)) oil_name,GROUP_CONCAT(DISTINCT(m.grade)) as grade,m.union_id,p.points as integral,sum(CASE c.card_oils_type  WHEN '1' THEN  c.amt ELSE 0 END ) qy_amt,sum(CASE c.card_oils_type  WHEN '2' THEN  c.amt ELSE 0 END ) cy_amt
+        SELECT m.member_id,m.customer_name,m.phone_number,m.mina_user_id,m.car_number,GROUP_CONCAT(DISTINCT(m.oil_name)) oil_name,GROUP_CONCAT(DISTINCT(m.grade)) as grade,m.union_id,p.points as integral,sum(CASE c.card_oils_type  WHEN '1' THEN  c.amt ELSE 0 END ) qy_amt,sum(CASE c.card_oils_type  WHEN '2' THEN  c.amt ELSE 0 END ) cy_amt
             from customer_manage m
             left join customer_points p on m.union_id = p.union_id and m.station_id = p.station_id
             left join customer_electronic_card c on c.union_id =m.union_id and c.station_id = m.station_id
@@ -233,7 +233,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
                 <if test="customerName != null  and customerName != ''"> and m.customer_name like concat('%', #{customerName}, '%')</if>
             </where>
-            GROUP BY m.union_id,m.member_id,m.customer_name,m.phone_number, m.car_number,p.points,c.station_id
+            GROUP BY m.union_id,m.member_id,m.customer_name,m.phone_number, m.car_number,m.mina_user_id,p.points,c.station_id
         ) sy
         LEFT JOIN (SELECT max(pay_date) pay_date ,po.consumer
         from pay_order po
@@ -249,4 +249,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         GROUP BY  po.consumer) px on sy.customer_name =  px.consumer
         order by px.pay_date desc
     </select>
-</mapper>
+</mapper>

+ 2 - 2
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationClassStructureController.java

@@ -45,7 +45,7 @@ import com.yijia.common.core.page.TableDataInfo;
 
 /**
  * 班结管理Controller
- * 
+ *
  * @author yijia
  * @date 2020-12-31
  */
@@ -943,7 +943,7 @@ public class StationClassStructureController extends BaseController
                     //查询打印机信息
                     Map params  =new HashMap();
                     params.put("stationId", list.get(0).getStationId());
-                    params.put("deviceType", "3");
+                    params.put("deviceType", "1");
                     Map mp  = stationDeviceManageService.getPrinterSnByStationId(params);
                     if(mp!=null&&mp.containsKey("device_no") && mp.get("device_no")!= null && mp.get("device_no")!=""){
                         String sn = mp.get("device_no").toString();