fix 开店管理增加合同签约,门店编码trim 修复导出字段没值

This commit is contained in:
shuo.wang
2025-05-06 17:18:54 +08:00
parent 70c114db24
commit c5bcfee942
6 changed files with 30 additions and 12 deletions

View File

@@ -295,7 +295,13 @@
a.shop_status as shopStatus,
a.detail_address as shopAddress
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
<if test="request.contractStartTime !=null and request.contractEndTime != null">
left join xfsg_sign_franchise c on a.id = c.shop_id
</if>
where a.deleted = 0
<if test="request.contractStartTime !=null and request.contractEndTime !=null">
and c.create_time between #{request.contractStartTime} and #{request.contractEndTime}
</if>
<if test="request.partnerKeyword != null and request.partnerKeyword != ''">
and (b.username like concat('%', #{request.partnerKeyword}, '%') or b.mobile like concat('%',
#{request.partnerKeyword}, '%'))

View File

@@ -285,6 +285,7 @@
#{regionId}
</foreach>
</if>
order by a.update_time desc
</where>
</select>

View File

@@ -49,4 +49,9 @@ public class PreparationDTO {
private Integer joinMode;
private Integer storeType;
private Long pointId;
}

View File

@@ -45,4 +45,8 @@ public class BranchShopRequest extends PageBasicInfo{
@NotNull
private Integer flag;
@ApiModelProperty("合同开始时间")
private Date contractStartTime;
@ApiModelProperty("合同结束时间")
private Date contractEndTime;
}

View File

@@ -291,7 +291,7 @@ public class ShopServiceImpl implements ShopService {
if (Objects.isNull(shopInfo)) {
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
}
shopInfo.setShopCode(request.getShopCode());
shopInfo.setShopCode(request.getShopCode().trim());
shopInfo.setShopName(request.getShopName());
shopInfo.setUpdateTime(new Date());
shopInfo.setUpdateUserId(userId);
@@ -405,7 +405,7 @@ public class ShopServiceImpl implements ShopService {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
shopInfo.setUpdateUserId(userId);
shopInfo.setUpdateTime(new Date());
shopInfo.setShopCode(request.getShopCode());
shopInfo.setShopCode(request.getShopCode().trim());
shopInfo.setShopName(request.getShopName());
shopInfo.setWantShopAreaId(request.getWantShopAreaId());
shopInfo.setRegionId(request.getRegionId());
@@ -506,6 +506,7 @@ public class ShopServiceImpl implements ShopService {
for (PreparationDTO dto : preparations) {
BranchShopResponse response = new BranchShopResponse();
response.setShopAddress(dto.getShopAddress());
response.setStoreType(dto.getStoreType());
response.setShopId(dto.getId());
response.setLineId(dto.getLineId());
response.setUsername(dto.getUsername());

View File

@@ -265,43 +265,44 @@ public class SyncDataServiceImpl implements SyncDataService {
if (StringUtils.isBlank(shopInfoDO.getShopCode())) {
return null;
}
String shopCode = shopInfoDO.getShopCode().trim();
if (String.valueOf(FranchiseBrandEnum.ZXJP.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
//M10001
if (shopInfoDO.getShopCode().matches("M\\d*")) {
if (shopCode.matches("M\\d*")) {
return "MX" + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
}
//FS10001
if (shopInfoDO.getShopCode().matches("FS\\d*")) {
if (shopCode.matches("FS\\d*")) {
return "FS" + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
}
// MS10001
if (shopInfoDO.getShopCode().matches("MS\\d*")) {
if (shopCode.matches("MS\\d*")) {
return "MS" + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
}
// S10001
if (shopInfoDO.getShopCode().matches("S\\d*")) {
if (shopCode.matches("S\\d*")) {
return shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
}
}
if (String.valueOf(FranchiseBrandEnum.MZG.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
if (shopInfoDO.getShopCode().matches("MZGM\\d*")) {
if (shopCode.matches("MZGM\\d*")) {
return FranchiseBrandEnum.MZG.getDesc() + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
}
if (shopInfoDO.getShopCode().matches("MZGS\\d*")) {
if (shopCode.matches("MZGS\\d*")) {
return FranchiseBrandEnum.MZG.getDesc() + shopInfoDO.getShopName();
}
}
if (String.valueOf(FranchiseBrandEnum.ZJS.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
if (shopInfoDO.getShopCode().matches("LX\\d*")) {
if (shopCode.matches("LX\\d*")) {
return "LX" + FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
}
if (shopInfoDO.getShopCode().matches("X\\d*")) {
if (shopCode.matches("X\\d*")) {
return "X" + FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
}
if (shopInfoDO.getShopCode().matches("Q\\d*")) {
if (shopCode.matches("Q\\d*")) {
return "Q" + FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName() + "(" + lineInfoDO.getUsername() + ")";
}
if (shopInfoDO.getShopCode().matches("Z\\d*")) {
if (shopCode.matches("Z\\d*")) {
return FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName();
}
}