java110
2022-10-12 96ca6eb708096fabb301f75a89b163d681dd781c
优化加入 停车卷核销功能
3个文件已修改
373 ■■■■■ 已修改文件
java110-bean/src/main/java/com/java110/dto/parkingCouponCarOrder/ParkingCouponCarOrderDto.java 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-db/src/main/resources/mapper/acct/ParkingCouponCarOrderV1ServiceDaoImplMapper.xml 242 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-acct/src/main/java/com/java110/acct/cmd/parkingCouponCar/SaveParkingCouponCarOrderCmd.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-bean/src/main/java/com/java110/dto/parkingCouponCarOrder/ParkingCouponCarOrderDto.java
@@ -1,6 +1,7 @@
package com.java110.dto.parkingCouponCarOrder;
import com.java110.dto.PageDto;
import java.io.Serializable;
import java.util.Date;
@@ -15,14 +16,18 @@
public class ParkingCouponCarOrderDto extends PageDto implements Serializable {
    private String pccId;
private String machineId;
private String orderId;
private String paId;
private String carNum;
private String remark;
private String communityId;
private String carOutId;
private String machineName;
    private String machineId;
    private String orderId;
    private String paId;
    private String paName;
    private String carNum;
    private String remark;
    private String communityId;
    private String carOutId;
    private String machineName;
    private String couponName;
    private String shopName;
    private Date createTime;
@@ -30,58 +35,60 @@
    private String statusCd = "0";
    public String getPccId() {
        return pccId;
    }
public void setPccId(String pccId) {
        this.pccId = pccId;
    }
public String getMachineId() {
    public String getMachineId() {
        return machineId;
    }
public void setMachineId(String machineId) {
    public void setMachineId(String machineId) {
        this.machineId = machineId;
    }
public String getOrderId() {
    public String getOrderId() {
        return orderId;
    }
public void setOrderId(String orderId) {
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
public String getPaId() {
    public String getPaId() {
        return paId;
    }
public void setPaId(String paId) {
    public void setPaId(String paId) {
        this.paId = paId;
    }
public String getCarNum() {
    public String getCarNum() {
        return carNum;
    }
public void setCarNum(String carNum) {
    public void setCarNum(String carNum) {
        this.carNum = carNum;
    }
public String getRemark() {
    public String getRemark() {
        return remark;
    }
public void setRemark(String remark) {
    public void setRemark(String remark) {
        this.remark = remark;
    }
public String getCommunityId() {
    public String getCommunityId() {
        return communityId;
    }
public void setCommunityId(String communityId) {
    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }
public String getCarOutId() {
        return carOutId;
    }
public void setCarOutId(String carOutId) {
        this.carOutId = carOutId;
    }
public String getMachineName() {
    public String getMachineName() {
        return machineName;
    }
public void setMachineName(String machineName) {
    public void setMachineName(String machineName) {
        this.machineName = machineName;
    }
@@ -101,4 +108,44 @@
    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }
    public String getPaName() {
        return paName;
    }
    public void setPaName(String paName) {
        this.paName = paName;
    }
    public String getCouponName() {
        return couponName;
    }
    public void setCouponName(String couponName) {
        this.couponName = couponName;
    }
    public String getShopName() {
        return shopName;
    }
    public void setShopName(String shopName) {
        this.shopName = shopName;
    }
    public String getPccId() {
        return pccId;
    }
    public void setPccId(String pccId) {
        this.pccId = pccId;
    }
    public String getCarOutId() {
        return carOutId;
    }
    public void setCarOutId(String carOutId) {
        this.carOutId = carOutId;
    }
}
java110-db/src/main/resources/mapper/acct/ParkingCouponCarOrderV1ServiceDaoImplMapper.xml
@@ -5,138 +5,154 @@
<mapper namespace="parkingCouponCarOrderV1ServiceDaoImpl">
    <!-- 保存停车卷核销信息 add by wuxw 2018-07-03 -->
    <insert id="saveParkingCouponCarOrderInfo" parameterType="Map">
        insert into parking_coupon_car_order(
pcc_id,machine_id,order_id,pa_id,car_num,remark,community_id,car_out_id,machine_name
) values (
#{pccId},#{machineId},#{orderId},#{paId},#{carNum},#{remark},#{communityId},#{carOutId},#{machineName}
)
        pcc_id,machine_id,order_id,pa_id,car_num,remark,community_id,car_out_id,machine_name
        ) values (
        #{pccId},#{machineId},#{orderId},#{paId},#{carNum},#{remark},#{communityId},#{carOutId},#{machineName}
        )
    </insert>
    <!-- 查询停车卷核销信息 add by wuxw 2018-07-03 -->
    <select id="getParkingCouponCarOrderInfo" parameterType="Map" resultType="Map">
        select  t.pcc_id,t.pcc_id pccId,t.machine_id,t.machine_id machineId,t.order_id,t.order_id orderId,t.pa_id,t.pa_id paId,t.car_num,t.car_num carNum,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.car_out_id,t.car_out_id carOutId,t.machine_name,t.machine_name machineName
from parking_coupon_car_order t
where 1 =1
<if test="pccId !=null and pccId != ''">
   and t.pcc_id= #{pccId}
</if>
<if test="machineId !=null and machineId != ''">
   and t.machine_id= #{machineId}
</if>
<if test="orderId !=null and orderId != ''">
   and t.order_id= #{orderId}
</if>
<if test="paId !=null and paId != ''">
   and t.pa_id= #{paId}
</if>
<if test="carNum !=null and carNum != ''">
   and t.car_num= #{carNum}
</if>
<if test="remark !=null and remark != ''">
   and t.remark= #{remark}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="communityId !=null and communityId != ''">
   and t.community_id= #{communityId}
</if>
<if test="carOutId !=null and carOutId != ''">
   and t.car_out_id= #{carOutId}
</if>
<if test="machineName !=null and machineName != ''">
   and t.machine_name= #{machineName}
</if>
order by t.create_time desc
<if test="page != -1 and page != null ">
   limit #{page}, #{row}
</if>
        select t.pcc_id,t.pcc_id pccId,t.machine_id,t.machine_id machineId,t.order_id,t.order_id orderId,t.pa_id,t.pa_id
        paId,t.car_num,t.car_num carNum,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id
        communityId,t.car_out_id,t.car_out_id carOutId,t.machine_name,t.machine_name machineName,pcs.pa_name paName,
        pcs.shop_name shopName,pc.`name` couponName
        from parking_coupon_car_order t
        left join parking_coupon_car pcc on t.pcc_id = pcc.pcc_id and pcc.status_cd = '0'
        left join parking_coupon_shop pcs on pcc.coupon_shop_id = pcs.coupon_shop_id and pcs.status_cd = '0'
        left join parking_coupon pc on pcc.coupon_id = pc.coupon_id and pc.status_cd = '0'
        where 1 =1
        <if test="pccId !=null and pccId != ''">
            and t.pcc_id= #{pccId}
        </if>
        <if test="machineId !=null and machineId != ''">
            and t.machine_id= #{machineId}
        </if>
        <if test="orderId !=null and orderId != ''">
            and t.order_id= #{orderId}
        </if>
        <if test="paId !=null and paId != ''">
            and t.pa_id= #{paId}
        </if>
        <if test="carNum !=null and carNum != ''">
            and t.car_num= #{carNum}
        </if>
        <if test="carNumLike !=null and carNumLike != ''">
            and t.car_num like concat('%',#{carNumLike},'%')
        </if>
        <if test="shopNameLike !=null and shopNameLike != ''">
            and pcs.shop_name like concat('%',#{shopNameLike},'%')
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="carOutId !=null and carOutId != ''">
            and t.car_out_id= #{carOutId}
        </if>
        <if test="machineName !=null and machineName != ''">
            and t.machine_name= #{machineName}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <!-- 修改停车卷核销信息 add by wuxw 2018-07-03 -->
    <update id="updateParkingCouponCarOrderInfo" parameterType="Map">
        update  parking_coupon_car_order t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if>
<if test="pccId !=null and pccId != ''">
, t.pcc_id= #{pccId}
</if>
<if test="machineId !=null and machineId != ''">
, t.machine_id= #{machineId}
</if>
<if test="paId !=null and paId != ''">
, t.pa_id= #{paId}
</if>
<if test="carNum !=null and carNum != ''">
, t.car_num= #{carNum}
</if>
<if test="remark !=null and remark != ''">
, t.remark= #{remark}
</if>
<if test="communityId !=null and communityId != ''">
, t.community_id= #{communityId}
</if>
<if test="carOutId !=null and carOutId != ''">
, t.car_out_id= #{carOutId}
</if>
<if test="machineName !=null and machineName != ''">
, t.machine_name= #{machineName}
</if>
 where 1=1 <if test="orderId !=null and orderId != ''">
and t.order_id= #{orderId}
</if>
        update parking_coupon_car_order t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="pccId !=null and pccId != ''">
            , t.pcc_id= #{pccId}
        </if>
        <if test="machineId !=null and machineId != ''">
            , t.machine_id= #{machineId}
        </if>
        <if test="paId !=null and paId != ''">
            , t.pa_id= #{paId}
        </if>
        <if test="carNum !=null and carNum != ''">
            , t.car_num= #{carNum}
        </if>
        <if test="remark !=null and remark != ''">
            , t.remark= #{remark}
        </if>
        <if test="communityId !=null and communityId != ''">
            , t.community_id= #{communityId}
        </if>
        <if test="carOutId !=null and carOutId != ''">
            , t.car_out_id= #{carOutId}
        </if>
        <if test="machineName !=null and machineName != ''">
            , t.machine_name= #{machineName}
        </if>
        where 1=1
        <if test="orderId !=null and orderId != ''">
            and t.order_id= #{orderId}
        </if>
    </update>
    <!-- 查询停车卷核销数量 add by wuxw 2018-07-03 -->
     <select id="queryParkingCouponCarOrdersCount" parameterType="Map" resultType="Map">
        select  count(1) count
from parking_coupon_car_order t
where 1 =1
<if test="pccId !=null and pccId != ''">
   and t.pcc_id= #{pccId}
</if>
<if test="machineId !=null and machineId != ''">
   and t.machine_id= #{machineId}
</if>
<if test="orderId !=null and orderId != ''">
   and t.order_id= #{orderId}
</if>
<if test="paId !=null and paId != ''">
   and t.pa_id= #{paId}
</if>
<if test="carNum !=null and carNum != ''">
   and t.car_num= #{carNum}
</if>
<if test="remark !=null and remark != ''">
   and t.remark= #{remark}
</if>
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if>
<if test="communityId !=null and communityId != ''">
   and t.community_id= #{communityId}
</if>
<if test="carOutId !=null and carOutId != ''">
   and t.car_out_id= #{carOutId}
</if>
<if test="machineName !=null and machineName != ''">
   and t.machine_name= #{machineName}
</if>
    <select id="queryParkingCouponCarOrdersCount" parameterType="Map" resultType="Map">
        select count(1) count
        from parking_coupon_car_order t
        left join parking_coupon_car pcc on t.pcc_id = pcc.pcc_id and pcc.status_cd = '0'
        left join parking_coupon_shop pcs on pcc.coupon_shop_id = pcs.coupon_shop_id and pcs.status_cd = '0'
        left join parking_coupon pc on pcc.coupon_id = pc.coupon_id and pc.status_cd = '0'
        where 1 =1
        <if test="pccId !=null and pccId != ''">
            and t.pcc_id= #{pccId}
        </if>
        <if test="machineId !=null and machineId != ''">
            and t.machine_id= #{machineId}
        </if>
        <if test="orderId !=null and orderId != ''">
            and t.order_id= #{orderId}
        </if>
        <if test="paId !=null and paId != ''">
            and t.pa_id= #{paId}
        </if>
        <if test="carNum !=null and carNum != ''">
            and t.car_num= #{carNum}
        </if>
        <if test="carNumLike !=null and carNumLike != ''">
            and t.car_num like concat('%',#{carNumLike},'%')
        </if>
        <if test="shopNameLike !=null and shopNameLike != ''">
            and pcs.shop_name like concat('%',#{shopNameLike},'%')
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="carOutId !=null and carOutId != ''">
            and t.car_out_id= #{carOutId}
        </if>
        <if test="machineName !=null and machineName != ''">
            and t.machine_name= #{machineName}
        </if>
     </select>
    </select>
</mapper>
service-acct/src/main/java/com/java110/acct/cmd/parkingCouponCar/SaveParkingCouponCarOrderCmd.java
@@ -28,9 +28,9 @@
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 类表述:保存
@@ -55,12 +55,12 @@
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
        Assert.hasKeyAndValue(reqJson, "pccId", "请求报文中未包含pccId");
Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
Assert.hasKeyAndValue(reqJson, "paId", "请求报文中未包含paId");
Assert.hasKeyAndValue(reqJson, "machineId", "请求报文中未包含machineId");
Assert.hasKeyAndValue(reqJson, "machineName", "请求报文中未包含machineName");
Assert.hasKeyAndValue(reqJson, "carNum", "请求报文中未包含carNum");
Assert.hasKeyAndValue(reqJson, "carOutId", "请求报文中未包含carOutId");
        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
        Assert.hasKeyAndValue(reqJson, "paId", "请求报文中未包含paId");
        Assert.hasKeyAndValue(reqJson, "machineId", "请求报文中未包含machineId");
        Assert.hasKeyAndValue(reqJson, "machineName", "请求报文中未包含machineName");
        Assert.hasKeyAndValue(reqJson, "carNum", "请求报文中未包含carNum");
        Assert.hasKeyAndValue(reqJson, "carOutId", "请求报文中未包含carOutId");
    }
@@ -68,7 +68,7 @@
    @Java110Transactional
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
       ParkingCouponCarOrderPo parkingCouponCarOrderPo = BeanConvertUtil.covertBean(reqJson, ParkingCouponCarOrderPo.class);
        ParkingCouponCarOrderPo parkingCouponCarOrderPo = BeanConvertUtil.covertBean(reqJson, ParkingCouponCarOrderPo.class);
        parkingCouponCarOrderPo.setOrderId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
        int flag = parkingCouponCarOrderV1InnerServiceSMOImpl.saveParkingCouponCarOrder(parkingCouponCarOrderPo);