Authored by caoyan

Merge branch 'dev_确认收货优化' into test6.9.7

# Conflicts:
#	order/src/main/java/com/yoho/ufo/order/service/IBuyerOrderService.java
#	order/src/main/java/com/yoho/ufo/order/service/impl/BuyerOrderServiceImpl.java
... ... @@ -16,9 +16,9 @@ public interface AbnormalPackageMapper {
int insert(AbnormalPackage abnormalPackage);
int update(@Param("operateUid") Integer operateUid, @Param("updateTime") Integer updateTime, @Param("sellerWaybillCode") String sellerWaybillCode);
int update(@Param("operateUid") Integer operateUid, @Param("updateTime") Integer updateTime, @Param("sellerWaybillCode") String sellerWaybillCode, @Param("depotNo")Integer depotNo);
int selectValidCnt(@Param("sellerWaybillCode") String sellerWaybillCode);
int selectValidCnt(@Param("sellerWaybillCode") String sellerWaybillCode, @Param("depotNo") Integer depotNo);
List<String> selectValidSellerWaybillCodeList(@Param("buyerOrderReq") BuyerOrderReq buyerOrderReq);
}
... ...
... ... @@ -23,6 +23,8 @@ public class AbnormalPackage implements Serializable {
private Integer updateTime;
private Integer depotNo;
public Integer getId() {
return id;
}
... ... @@ -71,6 +73,14 @@ public class AbnormalPackage implements Serializable {
this.updateTime = updateTime;
}
public Integer getDepotNo() {
return depotNo;
}
public void setDepotNo(Integer depotNo) {
this.depotNo = depotNo;
}
@Override
public String toString() {
return "AbnormalExpress{" +
... ...
... ... @@ -8,14 +8,18 @@
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="operate_uid" property="operateUid" jdbcType="INTEGER" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
<result column="depot_no" property="depotNo" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List">
id, seller_waybillCode, is_del, create_time, operate_uid, update_time
id, seller_waybillCode, is_del, create_time, operate_uid, update_time, depot_no
</sql>
<select id="selectValidCnt" resultType="java.lang.Integer">
<select id="selectValidCnt" resultType="java.lang.Integer" parameterType="com.yoho.order.model.BuyerOrderReq">
select count(1) from abnormal_package where is_del = 0
<if test="depotNo !=null ">
and depot_no = #{depotNo}
</if>
<if test="sellerWaybillCode!=null and sellerWaybillCode != ''">
and seller_waybillCode = #{sellerWaybillCode}
</if>
... ... @@ -23,6 +27,9 @@
<select id="selectValidSellerWaybillCodeList" resultType="java.lang.String" parameterType="com.yoho.order.model.BuyerOrderReq">
select seller_waybillCode from abnormal_package where is_del=0
<if test="buyerOrderReq.depotNo !=null ">
and depot_no = #{buyerOrderReq.depotNo}
</if>
<if test="buyerOrderReq.sellerWaybillCode!=null and buyerOrderReq.sellerWaybillCode != ''">
and seller_waybillCode = #{buyerOrderReq.sellerWaybillCode}
</if>
... ... @@ -37,12 +44,12 @@
</select>
<insert id="insert" parameterType="com.yoho.order.model.AbnormalPackage">
insert into abnormal_package(id, seller_waybillCode, is_del, create_time, operate_uid, update_time)
values (#{id}, #{sellerWaybillCode}, #{isDel}, #{createTime}, #{operateUid}, #{updateTime})
insert into abnormal_package(id, seller_waybillCode, is_del, create_time, operate_uid, update_time, depot_no)
values (#{id}, #{sellerWaybillCode}, #{isDel}, #{createTime}, #{operateUid}, #{updateTime}, #{depotNo})
</insert>
<update id="update">
update abnormal_package set operate_uid=#{operateUid}, update_time=#{updateTime}, is_del=0
update abnormal_package set operate_uid=#{operateUid}, update_time=#{updateTime}, depot_no=#{depotNo}, is_del=0
where seller_waybillCode = #{sellerWaybillCode}
</update>
</mapper>
\ No newline at end of file
... ...
... ... @@ -115,7 +115,8 @@ public interface IBuyerOrderService {
// 查询鉴定室列表
List<IdentifyCenterResp> queryIdentifyCenter();
int addAbnormalPackage(String sellerWaybillCode);
int addAbnormalPackage(String sellerWaybillCode, String phoneUid);
PageResponseBO<String> queryAbnormalPackage(BuyerOrderReq req);
... ...
... ... @@ -262,18 +262,14 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
@Autowired
private AbnormalPackageMapper abnormalPackageMapper;
//南京月结账号
// private static final String NANJING_CUSTID = "0255045253";
// private static final String NANJING_CUSTID = "9999999999";
//北京月结账号
// private static final String BEIJING_CUSTID = "0100026158";
// private static final String BEIJING_CUSTID = "9999999999";
private static final Integer PAY_METHOD_MONTHLY = 1;//寄付月结
private static final Integer PAY_METHOD_FREIGHT_COLLECT = 2;//到付
private static final Integer DEPOT_NO_BEIJING= 0;//北京
private static final Integer DEPOT_NO_NANJING=1;//南京
//已收货
private static final Byte QC_STATUS_RECEIVED = 0;
... ... @@ -366,11 +362,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
return resultMap;
}
public Map<String, Integer> getCountForQc(BuyerOrderReq req){
if(null == req.getDepotNo()) {
req.setDepotNo(1);//默认南京
private Integer getDepotNoByPhoneUid(String phoneUid) {
if(StringUtils.isEmpty(phoneUid)) {
return DEPOT_NO_NANJING;
}
PhoneUidDepot record = phoneUidDepotMapper.selectByphoneUid(phoneUid);
if(null != record) {
return record.getDepotNo();
}else {
return DEPOT_NO_NANJING;
}
}
public Map<String, Integer> getCountForQc(BuyerOrderReq req){
req.setDepotNo(getDepotNoByPhoneUid(req.getPhoneUid()));
//根据查询条件(订单号或卖家运单号)
if(StringUtils.isNotEmpty(req.getQueryStr())) {
return queryOrderNumByStatus(req.getQueryStr(), req.getDepotNo());
... ... @@ -388,7 +395,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
resultMap.put("problemNum", problemNum);
//查询异常包裹
resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(null));
resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(null, req.getDepotNo()));
return resultMap;
}
... ... @@ -425,7 +432,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
resultMap.put("alreadyDeliverNum", alreadyDeliverNum);
resultMap.put("problemNum", problemNum);
//查询异常包裹
resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(queryStr));
resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(queryStr, depotNo));
return resultMap;
}
... ... @@ -750,6 +757,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
@Override
public PageResponseBO<BuyerOrderResp> queryOrderListByStatusForQc(BuyerOrderReq req) {
req.setDepotNo(getDepotNoByPhoneUid(req.getPhoneUid()));
Byte status = req.getStatus();
List<Byte> checkStatusList = Lists.newArrayList();
String platformExpressInfoFlag = "";
... ... @@ -2532,11 +2540,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
}
@Override
public int addAbnormalPackage(String sellerWaybillCode) {
public int addAbnormalPackage(String sellerWaybillCode, String phoneUid) {
Integer depotNo = getDepotNoByPhoneUid(phoneUid);
//数据库已存在
AbnormalPackage pkg = abnormalPackageMapper.selectBySellerWaybillCode(sellerWaybillCode);
if(null != pkg) {
return abnormalPackageMapper.update(new UserHelper().getUserId(), DateUtil.getCurrentTimeSeconds(), sellerWaybillCode);
return abnormalPackageMapper.update(new UserHelper().getUserId(), DateUtil.getCurrentTimeSeconds(), sellerWaybillCode, depotNo);
}
pkg = new AbnormalPackage();
... ... @@ -2544,15 +2553,19 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
pkg.setIsDel(0);
pkg.setCreateTime(DateUtil.getCurrentTimeSeconds());
pkg.setOperateUid(new UserHelper().getUserId());
pkg.setDepotNo(depotNo);
return abnormalPackageMapper.insert(pkg);
}
@Override
public PageResponseBO<String> queryAbnormalPackage(BuyerOrderReq req){
int total = abnormalPackageMapper.selectValidCnt(req.getSellerWaybillCode());
Integer depotNo = getDepotNoByPhoneUid(req.getPhoneUid());
int total = abnormalPackageMapper.selectValidCnt(req.getSellerWaybillCode(), depotNo);
if(total == 0){
return null;
}
req.setDepotNo(depotNo);
List<String> list = abnormalPackageMapper.selectValidSellerWaybillCodeList(req);
PageResponseBO<String> result=new PageResponseBO<>();
result.setPage(req.getPage());
... ...