49 changed files with 879 additions and 305 deletions
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoveritems; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 21:19 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BusHandoItemListVo implements Vo { |
|||
private static final long serialVersionUID = -1010717413924813866L; |
|||
|
|||
@ApiModelProperty("清单名称") |
|||
private String name; |
|||
@ApiModelProperty("默认true") |
|||
private boolean state; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoveritems; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 21:21 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BusHandoverItemsListQuery implements Query { |
|||
private static final long serialVersionUID = -2469417654401015391L; |
|||
|
|||
private String vin; |
|||
|
|||
private String carSid; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoveritems; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 21:18 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BusHandoverItemsListVo implements Vo { |
|||
private static final long serialVersionUID = 6248282126372736711L; |
|||
|
|||
@ApiModelProperty("车架号") |
|||
private String vin; |
|||
|
|||
private List<BusHandoItemListVo> mainfest; |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoverwait; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 19:21 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BusHandoverWait extends BaseEntity { |
|||
private static final long serialVersionUID = -5863390741808170820L; |
|||
@ApiModelProperty("合同编号") |
|||
private String contractNo; |
|||
|
|||
@ApiModelProperty("付款方式key") |
|||
private String payTypeKey; |
|||
|
|||
@ApiModelProperty("付款方式value") |
|||
private String payTypeValue; |
|||
|
|||
@ApiModelProperty("客户名称") |
|||
private String customerName; |
|||
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
|
|||
@ApiModelProperty("车架号") |
|||
private String vinNo; |
|||
|
|||
@ApiModelProperty("车辆sid") |
|||
private String vinSid; |
|||
|
|||
@ApiModelProperty("付款状态key") |
|||
private String payStateKey; |
|||
|
|||
@ApiModelProperty("付款状态value") |
|||
private String payStateValue; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoverwait; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 19:39 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "待交车车辆") |
|||
@FeignClient( |
|||
contextId = "anrui-buscenter-BusHandoverWait", |
|||
name = "anrui-buscenter", |
|||
path = "v1/bushandoverwait", |
|||
fallback = BusHandoverWaitFeignFallback.class) |
|||
public interface BusHandoverWaitFeign { |
|||
|
|||
@ApiOperation("待交车车辆列表") |
|||
@PostMapping("/pagerList") |
|||
@ResponseBody |
|||
ResultBean<PagerVo<BusHandoverWaitVo>> pagerList(@RequestBody PagerQuery<BusHandoverWaitQuery> pagerQuery); |
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoverwait; |
|||
|
|||
import org.springframework.stereotype.Controller; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 19:45 |
|||
* @Description |
|||
*/ |
|||
@Controller |
|||
public class BusHandoverWaitFeignFallback { |
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoverwait; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 20:38 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BusHandoverWaitListVo implements Vo { |
|||
private static final long serialVersionUID = 4081821318088390025L; |
|||
private String vinNo; |
|||
private String vinSid; |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoverwait; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 19:53 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BusHandoverWaitQuery implements Query { |
|||
private static final long serialVersionUID = 1785723361109634458L; |
|||
|
|||
private String userSid; |
|||
|
|||
private String name; |
|||
|
|||
private String orgPath; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.yxt.anrui.buscenter.api.bushandoverwait; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 19:48 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BusHandoverWaitVo implements Vo { |
|||
private static final long serialVersionUID = 1901951619613827051L; |
|||
@ApiModelProperty("合同编号") |
|||
private String contractNo; |
|||
|
|||
@ApiModelProperty("合同状态") |
|||
private String contractState; |
|||
|
|||
@ApiModelProperty("合同sid") |
|||
private String contractSid; |
|||
|
|||
@ApiModelProperty("客户名称") |
|||
private String customerName; |
|||
|
|||
@ApiModelProperty("付款方式") |
|||
private String payType; |
|||
|
|||
private List<BusHandoverWaitListVo> list = new ArrayList<>(); |
|||
} |
@ -1,21 +1,34 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.buscenter.biz.bushandover.BusHandoverMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bushandover.BusHandoverVo"> |
|||
SELECT * FROM bus_handover <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.anrui.buscenter.api.bushandover.BusHandoverVo"> |
|||
SELECT * FROM bus_handover <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<!-- <select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bushandover.BusHandoverVo"> |
|||
SELECT * |
|||
FROM bus_handover |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.anrui.buscenter.api.bushandover.BusHandoverVo"> |
|||
SELECT * |
|||
FROM bus_handover |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="selectByOrderSid" resultType="com.yxt.anrui.buscenter.api.bushandover.BusHandoverWsVo"> |
|||
SELECT * FROM bus_handover where orderSid=#{orderSid} |
|||
</select> |
|||
SELECT * |
|||
FROM bus_handover |
|||
where orderSid = #{orderSid} |
|||
</select> |
|||
|
|||
<select id="selectCountByOrgSid" resultType="int"> |
|||
SELECT count(*) FROM bus_handover |
|||
WHERE createDate=#{date} AND orgSid=#{orgSid} AND billNo LIKE concat( #{billsType}, '%') |
|||
</select> |
|||
<select id="selectCountByOrgSid" resultType="int"> |
|||
SELECT count(*) |
|||
FROM bus_handover |
|||
WHERE createDate = #{date} |
|||
AND orgSid = #{orgSid} |
|||
AND billNo LIKE concat(#{billsType}, '%') |
|||
</select>--> |
|||
</mapper> |
@ -1,14 +1,20 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.buscenter.biz.bushandoveritems.BusHandoverItemsMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bushandoveritems.BusHandoverItemsVo"> |
|||
SELECT * FROM bus_handover_items <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
|
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<!--<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bushandoveritems.BusHandoverItemsVo"> |
|||
SELECT * |
|||
FROM bus_handover_items |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
|
|||
<select id="fetchByHandoverSid" resultType="com.yxt.anrui.buscenter.api.bushandoveritems.BusHandoverItemsVo"> |
|||
SELECT * FROM bus_handover_items where handoverSid=#{handoverSid} |
|||
</select> |
|||
SELECT * |
|||
FROM bus_handover_items |
|||
where handoverSid = #{handoverSid} |
|||
</select>--> |
|||
</mapper> |
@ -0,0 +1,25 @@ |
|||
package com.yxt.anrui.buscenter.biz.bushandoverwait; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWait; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitListVo; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 19:40 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface BusHandoverWaitMapper extends BaseMapper<BusHandoverWait> { |
|||
IPage<BusHandoverWaitVo> selectPageVo(IPage<BusHandoverWait> page, @Param(Constants.WRAPPER) QueryWrapper<BusHandoverWait> qw, @Param("name") String name); |
|||
|
|||
List<BusHandoverWaitListVo> selectByNo(String contractNo); |
|||
} |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|||
<mapper namespace="com.yxt.anrui.buscenter.biz.bushandoverwait.BusHandoverWaitMapper"> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitVo"> |
|||
select bh.contractNo, |
|||
bh.customerName, |
|||
bh.payTypeValue |
|||
from bus_handover_wait bh |
|||
<where> |
|||
${ew.sqlSegment} |
|||
<if test="name != null and name != ''"> |
|||
and concat(IFNULL(bh.contractNo |
|||
, '') |
|||
, ifnull(bh.customerName |
|||
, '')) LIKE concat('%' |
|||
, #{name} |
|||
, '%') |
|||
</if> |
|||
</where> |
|||
group by bh.contractNo |
|||
</select> |
|||
|
|||
<select id="selectByNo" resultType="com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitListVo"> |
|||
select vinNo, vinSid |
|||
from bus_handover_wait |
|||
where contractNo = #{contractNo} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.buscenter.biz.bushandoverwait; |
|||
|
|||
import com.yxt.anrui.base.api.basemiddleman.BaseMiddlemanVo; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitFeign; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitQuery; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 19:40 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "待交车车辆") |
|||
@Controller |
|||
@RequestMapping("v1/bushandoverwait") |
|||
public class BusHandoverWaitRest implements BusHandoverWaitFeign { |
|||
|
|||
@Autowired |
|||
private BusHandoverWaitService busHandoverWaitService; |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<BusHandoverWaitVo>> pagerList(PagerQuery<BusHandoverWaitQuery> pagerQuery) { |
|||
ResultBean<PagerVo<BusHandoverWaitVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<BusHandoverWaitVo> pv = busHandoverWaitService.pagerList(pagerQuery); |
|||
return rb.success().setData(pv); |
|||
} |
|||
} |
@ -0,0 +1,67 @@ |
|||
package com.yxt.anrui.buscenter.biz.bushandoverwait; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.base.api.commoncontract.CommonContract; |
|||
import com.yxt.anrui.base.api.commoncontract.CommonContractFeign; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWait; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitListVo; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitQuery; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitVo; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 19:40 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class BusHandoverWaitService extends MybatisBaseService<BusHandoverWaitMapper, BusHandoverWait> { |
|||
|
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
private CommonContractFeign commonContractFeign; |
|||
|
|||
public PagerVo<BusHandoverWaitVo> pagerList(PagerQuery<BusHandoverWaitQuery> pagerQuery) { |
|||
IPage<BusHandoverWait> page = PagerUtil.queryToPage(pagerQuery); |
|||
BusHandoverWaitQuery params = pagerQuery.getParams(); |
|||
QueryWrapper<BusHandoverWait> qw = new QueryWrapper<>(); |
|||
if (params != null) { |
|||
String orgPath = params.getOrgPath(); |
|||
if (StringUtils.isNotBlank(orgPath)) { |
|||
orgPath = sysStaffOrgFeign.getOrgSidByPath(params.getOrgPath()).getData(); |
|||
qw.eq("useOrgSid", orgPath); |
|||
} |
|||
} |
|||
IPage<BusHandoverWaitVo> pagging = baseMapper.selectPageVo(page, qw, params.getName()); |
|||
List<BusHandoverWaitVo> records = pagging.getRecords(); |
|||
records.removeAll(Collections.singleton(null)); |
|||
for (BusHandoverWaitVo record : records) { |
|||
String contractNo = record.getContractNo(); |
|||
//ToDo:是否欠款
|
|||
//根据合同编号查询合同信息以及车辆
|
|||
ResultBean<CommonContract> commonContractResultBean = commonContractFeign.selectByNo(contractNo); |
|||
CommonContract commonContract = commonContractResultBean.getData(); |
|||
if (commonContract != null) { |
|||
record.setContractSid(commonContract.getSid()); |
|||
} |
|||
//根据合同编号查询车辆列表
|
|||
List<BusHandoverWaitListVo> busHandoverWaitListVoList = baseMapper.selectByNo(contractNo); |
|||
record.setList(busHandoverWaitListVoList); |
|||
} |
|||
PagerVo<BusHandoverWaitVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 21:01 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class DeliveryConItemVo implements Vo { |
|||
private static final long serialVersionUID = 4064971177601849740L; |
|||
|
|||
@ApiModelProperty("清单名称") |
|||
private String name; |
|||
@ApiModelProperty("默认true") |
|||
private boolean state; |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 21:07 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class DeliveryConListQuery implements Query { |
|||
private static final long serialVersionUID = 713117993834046847L; |
|||
@ApiModelProperty("车架号") |
|||
private String vin; |
|||
|
|||
@ApiModelProperty("车辆sid") |
|||
private String carSid; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 21:00 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class DeliveryConListVo implements Vo { |
|||
private static final long serialVersionUID = 5291687469668857721L; |
|||
@ApiModelProperty("车架号") |
|||
private String vin; |
|||
|
|||
private List<DeliveryConItemVo> mainfest; |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 21:06 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class DeliveryConQuery implements Query { |
|||
private static final long serialVersionUID = 2384354329522590526L; |
|||
|
|||
private List<DeliveryConListQuery> list; |
|||
|
|||
private String userSid; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 20:58 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class DeliveryConVo implements Vo { |
|||
private static final long serialVersionUID = 3387249405937612233L; |
|||
|
|||
@ApiModelProperty("合同sid") |
|||
private String contractSid; |
|||
@ApiModelProperty("接收人") |
|||
private String name; |
|||
@ApiModelProperty("身份证号") |
|||
private String idNumber; |
|||
@ApiModelProperty("联系电话") |
|||
private String mobile; |
|||
@ApiModelProperty("交付日期") |
|||
private String date; |
|||
@ApiModelProperty("交付地点") |
|||
private String address; |
|||
private List<DeliveryConListVo> vinList; |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 15:41 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "交车确认") |
|||
@FeignClient( |
|||
contextId = "anrui-terminal-DeliveryConfirm", |
|||
name = "anrui-terminal", |
|||
path = "/autoservice/v1/deliveryConfirm", |
|||
fallback = DeliveryConfirmFeignFallback.class) |
|||
public interface DeliveryConfirmFeign { |
|||
|
|||
@ApiOperation("待交车列表") |
|||
@PostMapping("/getDeliveryConfirmNotList") |
|||
@ResponseBody |
|||
ResultBean<PagerVo<DeliveryConfirmVo>> getDeliveryConfirmNotList(@RequestBody PagerQuery<DeliveryConfirmQuery> pagerQuery); |
|||
|
|||
@ApiOperation("获取确认交付信息") |
|||
@PostMapping("/getDeliveryBill") |
|||
@ResponseBody |
|||
ResultBean<DeliveryConVo> getDeliveryBill(@RequestBody DeliveryConQuery deliveryConQuery); |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 15:42 |
|||
* @Description |
|||
*/ |
|||
@Component |
|||
public class DeliveryConfirmFeignFallback { |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 20:44 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class DeliveryConfirmQuery implements Query { |
|||
private static final long serialVersionUID = -608379809128769606L; |
|||
|
|||
private String userSid; |
|||
|
|||
private String name; |
|||
|
|||
private String orgPath; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 15:45 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class DeliveryConfirmVo implements Vo { |
|||
private static final long serialVersionUID = 2889347824395603659L; |
|||
@ApiModelProperty("合同编号") |
|||
private String contractNo; |
|||
@ApiModelProperty("合同状态") |
|||
private String contractStateKey; |
|||
@ApiModelProperty("合同状态") |
|||
private String contractStateValue; |
|||
@ApiModelProperty("客户名称") |
|||
private String customerName; |
|||
|
|||
@ApiModelProperty("付款方式") |
|||
private String payTypeValue; |
|||
|
|||
@ApiModelProperty("付款方式key") |
|||
private String payTypeKey; |
|||
|
|||
private List<DeliveryVo> list = new ArrayList<>(); |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.yxt.anrui.terminal.api.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 18:54 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class DeliveryVo implements Vo { |
|||
private static final long serialVersionUID = 1429737874187218432L; |
|||
|
|||
private String vinNo; |
|||
private String vinSid; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.terminal.biz.autoservice.deliveryConfirm; |
|||
|
|||
import com.yxt.anrui.terminal.api.autoservice.deliveryConfirm.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 15:43 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "交车确认") |
|||
@Controller |
|||
@RequestMapping("/autoservice/v1/deliveryConfirm") |
|||
public class DeliveryConfirmRest implements DeliveryConfirmFeign { |
|||
@Autowired |
|||
private DeliveryConfirmService deliveryConfirmService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<DeliveryConfirmVo>> getDeliveryConfirmNotList(PagerQuery<DeliveryConfirmQuery> pagerQuery) { |
|||
return deliveryConfirmService.getDeliveryConfirmNotList(pagerQuery); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<DeliveryConVo> getDeliveryBill(DeliveryConQuery deliveryConQuery) { |
|||
return deliveryConfirmService.getDeliveryBill(deliveryConQuery); |
|||
} |
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.yxt.anrui.terminal.biz.autoservice.deliveryConfirm; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.alibaba.fastjson.JSON; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitFeign; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitQuery; |
|||
import com.yxt.anrui.buscenter.api.bushandoverwait.BusHandoverWaitVo; |
|||
import com.yxt.anrui.terminal.api.autoservice.deliveryConfirm.DeliveryConQuery; |
|||
import com.yxt.anrui.terminal.api.autoservice.deliveryConfirm.DeliveryConVo; |
|||
import com.yxt.anrui.terminal.api.autoservice.deliveryConfirm.DeliveryConfirmQuery; |
|||
import com.yxt.anrui.terminal.api.autoservice.deliveryConfirm.DeliveryConfirmVo; |
|||
import com.yxt.anrui.terminal.config.CoverUtils; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Optional; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/11/10 20:46 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class DeliveryConfirmService { |
|||
|
|||
@Autowired |
|||
private BusHandoverWaitFeign busHandoverWaitFeign; |
|||
|
|||
public ResultBean<PagerVo<DeliveryConfirmVo>> getDeliveryConfirmNotList(PagerQuery<DeliveryConfirmQuery> pagerQuery) { |
|||
ResultBean<PagerVo<DeliveryConfirmVo>> rb = ResultBean.fireFail(); |
|||
PagerQuery<BusHandoverWaitQuery> pq = CoverUtils.getPagerQuery(pagerQuery); |
|||
ResultBean<PagerVo<BusHandoverWaitVo>> resultBean = busHandoverWaitFeign.pagerList(pq); |
|||
List<DeliveryConfirmVo> voList = Optional.ofNullable(resultBean.getData().getRecords()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), DeliveryConfirmVo.class)).collect(Collectors.toList()); |
|||
PagerVo<DeliveryConfirmVo> v = new PagerVo<>(); |
|||
BeanUtil.copyProperties(resultBean.getData(), v); |
|||
v.setRecords(voList); |
|||
return rb.success().setMsg("当前共查询到" + v.getTotal() + "条记录").setData(v); |
|||
} |
|||
|
|||
public ResultBean<DeliveryConVo> getDeliveryBill(DeliveryConQuery deliveryConQuery) { |
|||
return null; |
|||
} |
|||
} |
Loading…
Reference in new issue