Browse Source

Merge remote-tracking branch 'origin/test' into test

newStockUp
zhenghaoyu 2 years ago
parent
commit
605956fe8e
  1. 50
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java
  2. 6
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStoreBrandVO.java
  3. 2
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataZonePriceVO.java
  4. 2
      blade-service/logpm-basic/src/main/java/com/logpm/basic/BasicApplication.java
  5. 41
      blade-service/logpm-basic/src/main/resources/application-test.yml
  6. 10
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataStoreBrandController.java
  7. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java
  8. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
  9. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataZonePriceController.java
  10. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataZonePriceDTO.java
  11. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataShopMapper.xml
  12. 6
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataStorageServicesMapper.xml
  13. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataStoreBrandMapper.java
  14. 10
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataStoreBrandMapper.xml
  15. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataStoreContactMapper.xml
  16. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml
  17. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml
  18. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataStoreBrandService.java
  19. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataZonePriceService.java
  20. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataStoreBrandServiceImpl.java
  21. 12
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataZonePriceServiceImpl.java
  22. 41
      blade-service/logpm-basicdata/src/main/resources/application-test.yml

50
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java

@ -282,30 +282,30 @@ public class BasicdataVehicleEntity extends TenantEntity {
*/
@ApiModelProperty(value = "GPS型号")
private String gpsModel;
// /**
// * 预留1
// */
// @ApiModelProperty(value = "预留1")
// private String reserve1;
// /**
// * 预留2
// */
// @ApiModelProperty(value = "预留2")
// private String reserve2;
// /**
// * 预留3
// */
// @ApiModelProperty(value = "预留3")
// private String reserve3;
// /**
// * 预留4
// */
// @ApiModelProperty(value = "预留4")
// private String reserve4;
// /**
// * 预留5
// */
// @ApiModelProperty(value = "预留5")
// private String reserve5;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
}

6
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataStoreBrandVO.java

@ -32,4 +32,10 @@ import lombok.EqualsAndHashCode;
public class BasicdataStoreBrandVO extends BasicdataStoreBrandEntity {
private static final long serialVersionUID = 1L;
private String storeName;
private String brandName;
private String storeBrandName;
}

2
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataZonePriceVO.java

@ -35,4 +35,6 @@ public class BasicdataZonePriceVO extends BasicdataZonePriceEntity {
private String name;
private String brandName;
}

2
blade-service/logpm-basic/src/main/java/com/logpm/basic/BasicApplication.java

@ -1,11 +1,9 @@
package com.logpm.basic;
import org.springblade.common.constant.LauncherConstant;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.cloud.client.BladeCloudApplication;
import org.springblade.core.cloud.feign.EnableBladeFeign;
import org.springblade.core.launch.BladeApplication;
/**

41
blade-service/logpm-basic/src/main/resources/application-test.yml

@ -3,8 +3,43 @@ server:
port: 8300
#数据源配置
#spring:
# datasource:
# url: ${blade.datasource.dev.url}
# username: ${blade.datasource.dev.username}
# password: ${blade.datasource.dev.password}
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
url: ${blade.datasource.test.url}
username: ${blade.datasource.test.username}
password: ${blade.datasource.test.password}
dynamic:
druid:
#通用校验配置
validation-query: select 1
#启用sql日志拦截器
proxy-filters:
- sqlLogInterceptor
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:
master:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basic.master.url}
username: ${blade.datasource.basic.master.username}
password: ${blade.datasource.basic.master.password}
slave:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basic.slave.url}
username: ${blade.datasource.basic.slave.username}
password: ${blade.datasource.basic.slave.password}

10
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataStoreBrandController.java

@ -78,6 +78,16 @@ public class BasicdataStoreBrandController extends BladeController {
IPage<BasicdataStoreBrandEntity> pages = basicdataStoreBrandService.page(Condition.getPage(query), Condition.getQueryWrapper(basicdataStoreBrand, BasicdataStoreBrandEntity.class));
return R.data(pages);
}
/**
* 门店品牌中间表 分页
*/
@GetMapping("/listName")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入basicdataStoreBrand")
public R<List<BasicdataStoreBrandVO>> listName(String name) {
List<BasicdataStoreBrandVO> pages = basicdataStoreBrandService.listName(name);
return R.data(pages);
}
/**
* 门店品牌中间表 自定义分页

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataVehicleController.java

@ -29,6 +29,7 @@ import lombok.AllArgsConstructor;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -81,6 +82,7 @@ public class BasicdataVehicleController extends BladeController {
BasicdataVehicleVO basicdataVehicleVO = new BasicdataVehicleVO();
BeanUtils.copyProperties(detail,basicdataVehicleVO);
List<String> urls =basicdataVehicleService.selectPhotoBymasterId(basicdataVehicleVO.getId());
log.info("urls>>>>>{}",urls);
if (urls.size()>0){basicdataVehicleVO.setHistoricPhotos(StringUtils.join(urls, ","));}
return R.data(basicdataVehicleVO);
}

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java

@ -153,6 +153,7 @@ public class BasicdataWarehouseController extends BladeController {
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam List<String> ids) {
boolean result = warehouseService.removeWarehouse(ids);
return R.status(result);
}

7
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataZonePriceController.java

@ -16,6 +16,7 @@
*/
package com.logpm.basicdata.controller;
import com.logpm.basicdata.dto.BasicdataZonePriceDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -138,8 +139,10 @@ public class BasicdataZonePriceController extends BladeController {
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入basicdataZonePrice")
public R submit(@Valid @RequestBody BasicdataZonePriceEntity basicdataZonePrice) {
return R.status(basicdataZonePriceService.saveOrUpdate(basicdataZonePrice));
public R submit(@Valid @RequestBody BasicdataZonePriceDTO basicdataZonePrice) {
return R.status(basicdataZonePriceService.ownSaveOrUpdate(basicdataZonePrice));
}
/**

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataZonePriceDTO.java

@ -20,6 +20,8 @@ import com.logpm.basicdata.entity.BasicdataZonePriceEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Map;
/**
* 区域品牌价格表 数据传输对象实体类
*
@ -31,4 +33,6 @@ import lombok.EqualsAndHashCode;
public class BasicdataZonePriceDTO extends BasicdataZonePriceEntity {
private static final long serialVersionUID = 1L;
private Map<String,String> fei;
private Map<String,String> feishi;
}

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataShopMapper.xml

@ -22,6 +22,7 @@
from logpm_basicdata_shop lbs
left JOIN logpm_basicdata_client lbc on lbs.client_id = lbc.id
<where>
lbs.is_deleted = 0
<if test="param.clientId != null and param.clientId != ''"> and lbc.client_name like concat('%',#{param.clientId},'%')</if>
<if test="param.storeCode != null and param.storeCode != ''">and lbs.store_code like concat('%',#{param.storeCode},'%')</if>
<if test="param.storeName != null and param.storeName != ''">and lbs.store_name like concat('%',#{param.storeName},'%')</if>
@ -30,8 +31,6 @@
<if test="param.bladeRegionAreaId != null and param.bladeRegionAreaId != ''">and lbs.blade_region_area_id like concat('%',#{param.bladeRegionAreaId},'%')</if>
<if test="param.checkInTime != null ">and date_format (lbs.check_in_time,'%Y-%m-%d') <![CDATA[ >= ]]> date_format (#{param.checkInTime},'%Y-%m-%d') </if>
<if test="param.postSetTime != null ">and date_format (lbs.post_set_time,'%Y-%m-%d') <![CDATA[ <= ]]> date_format (#{param.postSetTime},'%Y-%m-%d') </if>
</where>
</select>

6
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataStorageServicesMapper.xml

@ -17,9 +17,9 @@
LEFT JOIN logpm_basicdata_store_contact lbsc on lbsc.id = lbss.forwarding_unit
<where>
lbss.is_deleted = 0
<if test="param.shopId != null and param.shopId != null"> and lbs.store_name = #{param.shopId} </if>
<if test="param.forwardingUnit != null and param.forwardingUnit != null"> and lbsc.linkman = #{param.forwardingUnit} </if>
<if test="param.warehouseService != null and param.warehouseService != null"> and lbss.warehouseService = #{param.warehouseService} </if>
<if test="param.shopId != null and param.shopId != null"> and lbs.store_name like concat('%',#{param.shopId},'%') </if>
<if test="param.forwardingUnit != null and param.forwardingUnit != null"> and lbsc.linkman like concat('%',#{param.forwardingUnit} ,'%') </if>
<if test="param.warehouseService != null and param.warehouseService != null"> and lbss.warehouse_service like concat('%',#{param.warehouseService},'%') </if>
</where>
</select>

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataStoreBrandMapper.java

@ -51,4 +51,5 @@ public interface BasicdataStoreBrandMapper extends BaseMapper<BasicdataStoreBran
*/
List<BasicdataStoreBrandExcel> exportBasicdataStoreBrand(@Param("ew") Wrapper<BasicdataStoreBrandEntity> queryWrapper);
List<BasicdataStoreBrandVO> listName(String name);
}

10
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataStoreBrandMapper.xml

@ -5,7 +5,15 @@
<!-- 通用查询映射结果 -->
<resultMap id="basicdataStoreBrandResultMap" type="com.logpm.basicdata.entity.BasicdataStoreBrandEntity">
</resultMap>
<select id="listName" resultType="com.logpm.basicdata.vo.BasicdataStoreBrandVO">
select lbsb.tenant_id, lbsb.create_user, lbsb.create_time, lbsb.update_user, lbsb.update_time, lbsb.status, lbsb.is_deleted, lbsb.create_dept, lbsb.id, lbsb.reserve1,
lbsb.reserve2,lbsb.reserve3, lbsb.reserve4, lbsb.reserve5, lbsb.shop_id, lbsb.brand_id,lbs.store_name storeName, lbb.brand_name brandName,
CONCAT(lbs.store_name,' - ', lbb.brand_name ) AS storeBrandName
from logpm_basicdata_store_brand lbsb
LEFT JOIN logpm_basicdata_brand lbb on lbsb.brand_id = lbb.id
LEFT JOIN logpm_basicdata_shop lbs on lbsb.shop_id = lbs.id
WHERE concat(lbs.store_name,lbb.brand_name) like concat('%',#{name},'%')
</select>
<select id="selectBasicdataStoreBrandPage" resultMap="basicdataStoreBrandResultMap">
select * from logpm_basicdata_store_brand where is_deleted = 0

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataStoreContactMapper.xml

@ -10,7 +10,8 @@
<select id="selectBasicdataStoreContactPage" resultType="com.logpm.basicdata.vo.BasicdataStoreContactVO">
select lbsc.tenant_id, lbsc.create_user, lbsc.create_time,lbsc.update_user,lbsc.update_time, lbsc.status, lbsc.is_deleted, lbsc.create_dept, lbsc.id, lbsc.reserve1, lbsc.reserve2,
lbsc.reserve3, lbsc.reserve4, lbsc.reserve5, lbsc.shop_id, lbsc.linkman, lbsc.phone,lbs.store_name storeName
from logpm_basicdata_store_contact lbsc LEFT JOIN logpm_basicdata_shop lbs on lbs.id = lbsc.shop_id
from logpm_basicdata_store_contact lbsc
LEFT JOIN logpm_basicdata_shop lbs on lbs.id = lbsc.shop_id
where lbsc.is_deleted = 0
</select>

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataVehicleMapper.xml

@ -131,7 +131,7 @@
lbv.gps_model gpsModel,
(
SELECT
lbvp.photo_url
group_concat(lbvp.photo_url)
FROM
logpm_basicdata_vehicle_photo lbvp
where
@ -139,7 +139,7 @@
AND lbvp.create_time &lt;= DATE_SUB( CURDATE(), INTERVAL 1 YEAR )
ORDER BY
lbvp.create_time
LIMIT 1
LIMIT 3
) historicPhotos
FROM
logpm_basicdata_vehicle lbv

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataWarehouseMapper.xml

@ -51,8 +51,8 @@
UPDATE logpm_warehouse_warehouse
SET is_deleted = 1
WHERE
NOT EXISTS ( SELECT b.id FROM logpm_warehouse_goods_area b WHERE b.warehouse_id = #{id} )
AND NOT EXISTS (SELECT f.id FROM logpm_basic_team_group f WHERE f.belong_to=#{id})
NOT EXISTS ( SELECT b.id FROM logpm_warehouse_goods_area b WHERE b.warehouse_id = #{id} AND b.is_deleted = 0)
AND NOT EXISTS (SELECT f.id FROM logpm_basic_team_group f WHERE f.belong_to=#{id} AND f.is_deleted = 0 )
AND id = #{id}
</update>

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataStoreBrandService.java

@ -50,4 +50,6 @@ public interface IBasicdataStoreBrandService extends BaseService<BasicdataStoreB
List<BasicdataStoreBrandExcel> exportBasicdataStoreBrand(Wrapper<BasicdataStoreBrandEntity> queryWrapper);
Boolean submitSave(BasicdataStoreBrandEntity basicdataStoreBrand);
List<BasicdataStoreBrandVO> listName(String name);
}

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataZonePriceService.java

@ -17,6 +17,7 @@
package com.logpm.basicdata.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.basicdata.dto.BasicdataZonePriceDTO;
import com.logpm.basicdata.entity.BasicdataZonePriceEntity;
import com.logpm.basicdata.vo.BasicdataZonePriceVO;
import com.logpm.basicdata.excel.BasicdataZonePriceExcel;
@ -55,4 +56,6 @@ public interface IBasicdataZonePriceService extends BaseService<BasicdataZonePri
BasicdataZonePriceVO getOneDetail(BasicdataZonePriceEntity basicdataZonePrice);
List<BasicdataZonePriceEntity> pageListName(String name);
Boolean ownSaveOrUpdate(BasicdataZonePriceDTO basicdataZonePrice);
}

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataStoreBrandServiceImpl.java

@ -65,4 +65,9 @@ public class BasicdataStoreBrandServiceImpl extends BaseServiceImpl<BasicdataSto
return this.saveOrUpdate(basicdataStoreBrand);
}
@Override
public List<BasicdataStoreBrandVO> listName(String name) {
return baseMapper.listName(name);
}
}

12
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataZonePriceServiceImpl.java

@ -17,8 +17,7 @@
package com.logpm.basicdata.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.dto.BasicdataZonePriceDTO;
import com.logpm.basicdata.entity.BasicdataZonePriceEntity;
import com.logpm.basicdata.vo.BasicdataZonePriceVO;
import com.logpm.basicdata.excel.BasicdataZonePriceExcel;
@ -71,4 +70,13 @@ public class BasicdataZonePriceServiceImpl extends BaseServiceImpl<BasicdataZone
return baseMapper.pageListName(name);
}
@Override
public Boolean ownSaveOrUpdate(BasicdataZonePriceDTO basicdataZonePrice) {
return false;
// return this.saveOrUpdate(basicdataZonePrice);
}
}

41
blade-service/logpm-basicdata/src/main/resources/application-test.yml

@ -3,8 +3,43 @@ server:
port: 8400
#数据源配置
#spring:
# datasource:
# url: ${blade.datasource.dev.url}
# username: ${blade.datasource.dev.username}
# password: ${blade.datasource.dev.password}
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
url: ${blade.datasource.test.url}
username: ${blade.datasource.test.username}
password: ${blade.datasource.test.password}
dynamic:
druid:
#通用校验配置
validation-query: select 1
#启用sql日志拦截器
proxy-filters:
- sqlLogInterceptor
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:
master:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basicdata.master.url}
username: ${blade.datasource.basicdata.master.username}
password: ${blade.datasource.basicdata.master.password}
slave:
druid:
#独立校验配置
validation-query: select 1
#oracle校验
#validation-query: select 1 from dual
url: ${blade.datasource.basicdata.slave.url}
username: ${blade.datasource.basicdata.slave.username}
password: ${blade.datasource.basicdata.slave.password}

Loading…
Cancel
Save