fix
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
<result property="addresseeAddress" column="addressee_address" jdbcType="VARCHAR"/>
|
<result property="addresseeAddress" column="addressee_address" jdbcType="VARCHAR"/>
|
||||||
<result property="declareGoodsLogisticsWarehouse" column="declare_goods_logistics_warehouse"
|
<result property="declareGoodsLogisticsWarehouse" column="declare_goods_logistics_warehouse"
|
||||||
jdbcType="VARCHAR"/>
|
jdbcType="VARCHAR"/>
|
||||||
|
<result property="declareGoodsType" column="declare_goods_type" jdbcType="VARCHAR"/>
|
||||||
<result property="declareGoodsDate" column="declare_goods_date" jdbcType="VARCHAR"/>
|
<result property="declareGoodsDate" column="declare_goods_date" jdbcType="VARCHAR"/>
|
||||||
<result property="warehouseDeliveryDate" column="warehouse_delivery_date" jdbcType="VARCHAR"/>
|
<result property="warehouseDeliveryDate" column="warehouse_delivery_date" jdbcType="VARCHAR"/>
|
||||||
<result property="orderCreateTime" column="order_create_time" jdbcType="TIMESTAMP"/>
|
<result property="orderCreateTime" column="order_create_time" jdbcType="TIMESTAMP"/>
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
addressee_district, addressee_address, declare_goods_logistics_warehouse, declare_goods_date,
|
addressee_district, addressee_address, declare_goods_logistics_warehouse, declare_goods_date,
|
||||||
warehouse_delivery_date, order_create_time, order_update_time, order_create_user, order_update_user,
|
warehouse_delivery_date, order_create_time, order_update_time, order_create_user, order_update_user,
|
||||||
receiving_firm_name, receiving_ms_bank_account, receiving_ms_bank_branch, bank_unionPay_account,
|
receiving_firm_name, receiving_ms_bank_account, receiving_ms_bank_branch, bank_unionPay_account,
|
||||||
receiving_create_time, receiving_update_time, receiving_create_user, receiving_update_user
|
receiving_create_time, receiving_update_time, receiving_create_user, receiving_update_user,
|
||||||
|
declare_goods_type
|
||||||
</sql>
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/04/16/20:46
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DeclareGoodsDateDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "报货日期,例如:星期一(星期六,星期天)/每月1号")
|
||||||
|
private String declareGoods;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "报货日期,例如:星期一(星期六,星期天)/每月1号")
|
||||||
|
private String deliverGoods;
|
||||||
|
}
|
||||||
@@ -58,6 +58,10 @@ public class OrderSysInfoDO {
|
|||||||
@Column(name = "declare_goods_logistics_warehouse")
|
@Column(name = "declare_goods_logistics_warehouse")
|
||||||
private String declareGoodsLogisticsWarehouse;
|
private String declareGoodsLogisticsWarehouse;
|
||||||
|
|
||||||
|
/** 报货类型 */
|
||||||
|
@Column(name = "declare_goods_type")
|
||||||
|
private String declareGoodsType;
|
||||||
|
|
||||||
/** 报货日期 */
|
/** 报货日期 */
|
||||||
@Column(name = "declare_goods_date")
|
@Column(name = "declare_goods_date")
|
||||||
private String declareGoodsDate;
|
private String declareGoodsDate;
|
||||||
|
|||||||
@@ -48,7 +48,10 @@ public class OrderSysInfoRequest {
|
|||||||
@ApiModelProperty(value = "报货物流仓库(编码)" )
|
@ApiModelProperty(value = "报货物流仓库(编码)" )
|
||||||
private String declareGoodsLogisticsWarehouse;
|
private String declareGoodsLogisticsWarehouse;
|
||||||
|
|
||||||
@ApiModelProperty(value = "报货日期" )
|
@ApiModelProperty(value = "报货类型 0-按周报货 1-按月报货 2-自提" )
|
||||||
|
private String declareGoodsType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "报货日期 数组格式\"[{ 报货日期 \"declareGoods\": \"\",送货日期\"deliverGoods\":\"\"}]" )
|
||||||
private String declareGoodsDate;
|
private String declareGoodsDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "仓库配送日期" )
|
@ApiModelProperty(value = "仓库配送日期" )
|
||||||
@@ -101,6 +104,7 @@ public class OrderSysInfoRequest {
|
|||||||
orderSysInfoDO.setAddresseeDistrict(this.addresseeDistrict);
|
orderSysInfoDO.setAddresseeDistrict(this.addresseeDistrict);
|
||||||
orderSysInfoDO.setAddresseeAddress(this.addresseeAddress);
|
orderSysInfoDO.setAddresseeAddress(this.addresseeAddress);
|
||||||
orderSysInfoDO.setDeclareGoodsLogisticsWarehouse(this.declareGoodsLogisticsWarehouse);
|
orderSysInfoDO.setDeclareGoodsLogisticsWarehouse(this.declareGoodsLogisticsWarehouse);
|
||||||
|
orderSysInfoDO.setDeclareGoodsType(this.declareGoodsType);
|
||||||
orderSysInfoDO.setDeclareGoodsDate(this.declareGoodsDate);
|
orderSysInfoDO.setDeclareGoodsDate(this.declareGoodsDate);
|
||||||
orderSysInfoDO.setWarehouseDeliveryDate(this.warehouseDeliveryDate);
|
orderSysInfoDO.setWarehouseDeliveryDate(this.warehouseDeliveryDate);
|
||||||
|
|
||||||
@@ -113,7 +117,7 @@ public class OrderSysInfoRequest {
|
|||||||
}
|
}
|
||||||
public Boolean check(){
|
public Boolean check(){
|
||||||
if (Objects.equals(this.type, OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())){
|
if (Objects.equals(this.type, OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())){
|
||||||
if (StringUtils.isAnyBlank(this.xgjRegionId,this.xgjVicePresident,this.declareGoodsDate,this.declareGoodsLogisticsWarehouse,this.warehouseDeliveryDate)){
|
if (StringUtils.isAnyBlank(this.xgjRegionId,this.xgjVicePresident,this.declareGoodsDate,this.declareGoodsLogisticsWarehouse,this.declareGoodsType)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.request;
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.dto.DeclareGoodsDateDTO;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -191,11 +192,11 @@ public class ZxjpApiRequest {
|
|||||||
@ApiModelProperty(value = "报货物流仓库(编码)")
|
@ApiModelProperty(value = "报货物流仓库(编码)")
|
||||||
private String declareGoodsLogisticsWarehouse ;
|
private String declareGoodsLogisticsWarehouse ;
|
||||||
|
|
||||||
@ApiModelProperty(value = "报货日期")
|
@ApiModelProperty(value = "报货类型 0-按周报货 1-按月报货 2-自提" )
|
||||||
private String declareGoodsDate ;
|
private String declareGoodsType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "仓库配送日期")
|
@ApiModelProperty(value = "报货日期" )
|
||||||
private String warehouseDeliveryDate ;
|
private List<DeclareGoodsDateDTO> declareGoodsDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "收款公司名称")
|
@ApiModelProperty(value = "收款公司名称")
|
||||||
private String receivingFirmName;
|
private String receivingFirmName;
|
||||||
|
|||||||
@@ -150,7 +150,10 @@ public class BuildInformationResponse {
|
|||||||
@ApiModelProperty(value = "报货物流仓库" )
|
@ApiModelProperty(value = "报货物流仓库" )
|
||||||
private String declareGoodsLogisticsWarehouseName;
|
private String declareGoodsLogisticsWarehouseName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "报货日期" )
|
@ApiModelProperty(value = "报货类型 0-按周报货 1-按月报货 2-自提" )
|
||||||
|
private String declareGoodsType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "报货日期 数组格式\"[{ 报货日期declareGoods: \"\",送货日期deliverGoods:\"\"}]" )
|
||||||
private String declareGoodsDate;
|
private String declareGoodsDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "仓库配送日期" )
|
@ApiModelProperty(value = "仓库配送日期" )
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
|||||||
orderSysInfoDO.setAddresseeDistrict(request.getAddresseeDistrict());
|
orderSysInfoDO.setAddresseeDistrict(request.getAddresseeDistrict());
|
||||||
orderSysInfoDO.setAddresseeAddress(request.getAddresseeAddress());
|
orderSysInfoDO.setAddresseeAddress(request.getAddresseeAddress());
|
||||||
orderSysInfoDO.setDeclareGoodsLogisticsWarehouse(request.getDeclareGoodsLogisticsWarehouse());
|
orderSysInfoDO.setDeclareGoodsLogisticsWarehouse(request.getDeclareGoodsLogisticsWarehouse());
|
||||||
|
orderSysInfoDO.setDeclareGoodsType(request.getDeclareGoodsType());
|
||||||
orderSysInfoDO.setDeclareGoodsDate(request.getDeclareGoodsDate());
|
orderSysInfoDO.setDeclareGoodsDate(request.getDeclareGoodsDate());
|
||||||
orderSysInfoDO.setWarehouseDeliveryDate(request.getWarehouseDeliveryDate());
|
orderSysInfoDO.setWarehouseDeliveryDate(request.getWarehouseDeliveryDate());
|
||||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus())) {
|
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus())) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package com.cool.store.service.impl;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
|
import com.cool.store.dto.DeclareGoodsDateDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.DownSystemTypeEnum;
|
import com.cool.store.enums.DownSystemTypeEnum;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
@@ -13,8 +14,11 @@ import com.cool.store.mapper.ApplyLicenseMapper;
|
|||||||
import com.cool.store.mapper.SignFranchiseMapper;
|
import com.cool.store.mapper.SignFranchiseMapper;
|
||||||
import com.cool.store.request.ZxjpApiRequest;
|
import com.cool.store.request.ZxjpApiRequest;
|
||||||
import com.cool.store.service.SyncDataService;
|
import com.cool.store.service.SyncDataService;
|
||||||
|
import com.cool.store.utils.JSONUtils;
|
||||||
|
import com.cool.store.utils.JsonUtils;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -140,8 +144,8 @@ public class SyncDataServiceImpl implements SyncDataService {
|
|||||||
request.setAddresseeDistrict(orderSysInfoDO.getAddresseeDistrict());
|
request.setAddresseeDistrict(orderSysInfoDO.getAddresseeDistrict());
|
||||||
request.setAddresseeAddress(orderSysInfoDO.getAddresseeAddress());
|
request.setAddresseeAddress(orderSysInfoDO.getAddresseeAddress());
|
||||||
request.setDeclareGoodsLogisticsWarehouse(orderSysInfoDO.getDeclareGoodsLogisticsWarehouse());
|
request.setDeclareGoodsLogisticsWarehouse(orderSysInfoDO.getDeclareGoodsLogisticsWarehouse());
|
||||||
request.setDeclareGoodsDate(orderSysInfoDO.getDeclareGoodsDate());
|
request.setDeclareGoodsType(orderSysInfoDO.getDeclareGoodsType());
|
||||||
request.setWarehouseDeliveryDate(orderSysInfoDO.getWarehouseDeliveryDate());
|
request.setDeclareGoodsDate(JSONUtils.parseToListOrMap(orderSysInfoDO.getDeclareGoodsDate(), new TypeReference<List<DeclareGoodsDateDTO>>() {}));
|
||||||
request.setReceivingFirmName(orderSysInfoDO.getReceivingFirmName());
|
request.setReceivingFirmName(orderSysInfoDO.getReceivingFirmName());
|
||||||
request.setReceivingMSBankAccount(orderSysInfoDO.getReceivingMsBankAccount());
|
request.setReceivingMSBankAccount(orderSysInfoDO.getReceivingMsBankAccount());
|
||||||
request.setReceivingMSBankBranch(orderSysInfoDO.getReceivingMsBankBranch());
|
request.setReceivingMSBankBranch(orderSysInfoDO.getReceivingMsBankBranch());
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.cool.store.utils;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
public class JSONUtils {
|
||||||
|
|
||||||
|
// 创建 ObjectMapper 实例(建议单例)
|
||||||
|
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 JSON 字符串解析为指定类型的对象
|
||||||
|
*
|
||||||
|
* @param jsonString JSON 字符串
|
||||||
|
* @param clazz 目标类型的 Class 对象
|
||||||
|
* @param <T> 泛型类型
|
||||||
|
* @return 转换后的对象
|
||||||
|
*/
|
||||||
|
public static <T> T parseToObject(String jsonString, Class<T> clazz) {
|
||||||
|
if (StringUtil.isBlank(jsonString) || clazz == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return objectMapper.readValue(jsonString, clazz);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
throw new RuntimeException("JSON 解析失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 JSON 字符串解析为指定类型的对象列表
|
||||||
|
*
|
||||||
|
* @param jsonString JSON 字符串
|
||||||
|
* @param typeRef TypeReference,用于描述复杂类型(如 List<T>)
|
||||||
|
* @param <T> 泛型类型
|
||||||
|
* @return 转换后的对象列表
|
||||||
|
*/
|
||||||
|
public static <T> T parseToListOrMap(String jsonString, TypeReference<T> typeRef) {
|
||||||
|
if (StringUtil.isBlank(jsonString) || typeRef == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return objectMapper.readValue(jsonString, typeRef);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
throw new RuntimeException("JSON 解析失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将对象转换为 JSON 字符串
|
||||||
|
*
|
||||||
|
* @param object 待转换的对象
|
||||||
|
* @return JSON 字符串
|
||||||
|
*/
|
||||||
|
public static String toJsonString(Object object) {
|
||||||
|
if (object == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return objectMapper.writeValueAsString(object);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
throw new RuntimeException("对象转 JSON 失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user