Browse Source

Merge branch 'dev' into pre-production

master
汤建军 11 months ago
parent
commit
7400b3d905
  1. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java
  2. 56
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java
  3. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockWrapper.java

7
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataClientEntity.java

@ -140,6 +140,13 @@ public class BasicdataClientEntity extends TenantEntity {
@ApiModelProperty(value = "客户类型;1 C端 2 B端") @ApiModelProperty(value = "客户类型;1 C端 2 B端")
@TableField(exist = false) @TableField(exist = false)
private Integer typeService; private Integer typeService;
/**
* 客户类型;1 C端 2 B端
*/
@ApiModelProperty(value = "客户类型;1 C端 2 B端")
@TableField(exist = false)
private String typeServiceName;
/** /**
* 省份 * 省份
*/ */

56
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataClientController.java

@ -51,8 +51,10 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 基础客户表 控制器 * 基础客户表 控制器
@ -87,16 +89,17 @@ public class BasicdataClientController extends BladeController {
.eq(BasicdataStoreContactEntity::getShopId, detail.getId()) .eq(BasicdataStoreContactEntity::getShopId, detail.getId())
.eq(BasicdataStoreContactEntity::getDefaultType, 1) .eq(BasicdataStoreContactEntity::getDefaultType, 1)
); );
if(ObjectUtils.isNotNull(one)){ if (ObjectUtils.isNotNull(one)) {
detail.setLinkman(one.getLinkman()); detail.setLinkman(one.getLinkman());
detail.setPhone(one.getPhone()); detail.setPhone(one.getPhone());
} }
if(!list.isEmpty()){ if (!list.isEmpty()) {
detail.setTypeServiceBusiness(list); detail.setTypeServiceBusiness(list);
} }
return R.data(detail); return R.data(detail);
} }
/** /**
* 基础客户表 分页 * 基础客户表 分页
*/ */
@ -107,27 +110,55 @@ public class BasicdataClientController extends BladeController {
Object o = basicdataClient.get("contractStartTime"); Object o = basicdataClient.get("contractStartTime");
Object o1 = basicdataClient.get("contractEntTime"); Object o1 = basicdataClient.get("contractEntTime");
Object o2 = basicdataClient.get("pid"); Object o2 = basicdataClient.get("pid");
basicdataClient.put("contractStartTime",null); basicdataClient.put("contractStartTime", null);
basicdataClient.put("contractEntTime",null); basicdataClient.put("contractEntTime", null);
QueryWrapper<BasicdataClientEntity> queryWrapper = Condition.getQueryWrapper(basicdataClient, BasicdataClientEntity.class); QueryWrapper<BasicdataClientEntity> queryWrapper = Condition.getQueryWrapper(basicdataClient, BasicdataClientEntity.class);
/* queryWrapper.apply(o != null, /* queryWrapper.apply(o != null,
"date_format (contract_start_time,'%Y-%m-%d') >= date_format ({0},'%Y-%m-%d')", o) "date_format (contract_start_time,'%Y-%m-%d') >= date_format ({0},'%Y-%m-%d')", o)
.apply(o1 != null, .apply(o1 != null,
"date_format (contract_ent_time,'%Y-%m-%d') <= date_format ({0},'%Y-%m-%d')", o1);*/ "date_format (contract_ent_time,'%Y-%m-%d') <= date_format ({0},'%Y-%m-%d')", o1);*/
if(ObjectUtils.isNotNull(o)){ if (ObjectUtils.isNotNull(o)) {
queryWrapper.between("contract_start_time",o,o1); queryWrapper.between("contract_start_time", o, o1);
} }
if(ObjectUtils.isNotNull(o2)){ if (ObjectUtils.isNotNull(o2)) {
queryWrapper.eq("pid",o2); queryWrapper.eq("pid", o2);
}else{ } else {
queryWrapper.eq("pid","0"); queryWrapper.eq("pid", "0");
} }
queryWrapper.orderByDesc("create_time"); queryWrapper.orderByDesc("create_time");
IPage<BasicdataClientEntity> pages = basicdataClientService.page(Condition.getPage(query),queryWrapper); IPage<BasicdataClientEntity> pages = basicdataClientService.page(Condition.getPage(query), queryWrapper);
pages.getRecords().forEach( i ->{ pages.getRecords().forEach(i -> {
List<BasicdataStoreBusinessEntity> list = basicdataStoreBusinessService.list(Wrappers.<BasicdataStoreBusinessEntity>query().lambda().eq(BasicdataStoreBusinessEntity::getClientId, i.getId())); List<BasicdataStoreBusinessEntity> list = basicdataStoreBusinessService.list(Wrappers.<BasicdataStoreBusinessEntity>query().lambda().eq(BasicdataStoreBusinessEntity::getClientId, i.getId()));
i.setTypeServiceBusiness(list); i.setTypeServiceBusiness(list);
//查询客户绑定第一位联系人
List<BasicdataStoreContactEntity> listed = basicdataStoreContactService.list(Wrappers.<BasicdataStoreContactEntity>query().lambda().eq(BasicdataStoreContactEntity::getShopId, i.getId()));
if (Func.isNotEmpty(listed)) {
String string = listed.stream().sorted(Comparator.comparing(BasicdataStoreContactEntity::getCreateTime)).findFirst().map(BasicdataStoreContactEntity::getLinkman).get();
i.setLinkman(string);
}
List<String> collect = list.stream().filter(f -> Func.isNotEmpty(f.getMold())).map(BasicdataStoreBusinessEntity::getMold).collect(Collectors.toList());
if (collect.size() > 0) {
//进行
String s = collect.get(0);
switch (s) {
case "1":
i.setTypeServiceName("商配");
break;
case "2":
i.setTypeServiceName("市配");
break;
case "3":
i.setTypeServiceName("自提");
break;
case "4":
i.setTypeServiceName("三方中转");
break;
}
}
//处理客户的配送类型
// if(!i.getCreateUser().equals(null)){ // if(!i.getCreateUser().equals(null)){
// R<User> userR = userClient.userInfoById(i.getCreateUser()); // R<User> userR = userClient.userInfoById(i.getCreateUser());
// i.setCreateUserName(userR.getData().getName()); // i.setCreateUserName(userR.getData().getName());
@ -157,6 +188,7 @@ public class BasicdataClientController extends BladeController {
List<BasicdataClientEntity> pages = basicdataClientService.listName(name); List<BasicdataClientEntity> pages = basicdataClientService.listName(name);
return R.data(pages); return R.data(pages);
} }
/** /**
* 基础客户表查询 * 基础客户表查询
*/ */

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -1646,13 +1646,18 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
//运单 //运单
case 1: case 1:
List<Long> ids = baseMapper.getOrderListByWaybill(code); List<Long> ids = baseMapper.getOrderListByWaybill(code);
if (Func.isEmpty(ids) ){
deliveryOrderInfoVO.setDeliveryNum(a);
deliveryOrderInfoVO.setSigningNum(b);
return R.data(deliveryOrderInfoVO);
}
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda() List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.in(DistributionReservationStockarticleEntity::getStockArticleId, ids) .in(DistributionReservationStockarticleEntity::getStockArticleId, ids)
.ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationPackageStatusConstant.quxiao.getValue()) .ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationPackageStatusConstant.quxiao.getValue())
); );
if (Func.isNotEmpty(reservationStockarticleEntityList)){ if (Func.isNotEmpty(reservationStockarticleEntityList)){
for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) { for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) {
if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())){ if (IsOrNoConstant.no.getValue().equals(reservationStockarticleEntity.getIsZero())){
//查询包件数量 //查询包件数量
List<DistributionReservationPackageEntity> packageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda() List<DistributionReservationPackageEntity> packageEntityList = distributionReservationPackageService.list(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.eq(DistributionReservationPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId()) .eq(DistributionReservationPackageEntity::getStockArticleId, reservationStockarticleEntity.getStockArticleId())

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockWrapper.java

@ -58,7 +58,7 @@ public class DistributionStockWrapper extends BaseEntityWrapper<DistributionStoc
if(ObjectUtils.isNotNull(list) && ObjectUtils.isNotNull(list.get(0))){ if(ObjectUtils.isNotNull(list) && ObjectUtils.isNotNull(list.get(0))){
DistributionDeliveryListEntity byId = deliveryListService.getById(list.get(0).getDeliveryId()); DistributionDeliveryListEntity byId = deliveryListService.getById(list.get(0).getDeliveryId());
if(ObjectUtils.isNotNull(byId)){ if(ObjectUtils.isNotNull(byId)){
entity.setDeliveryListCode(byId.getNoteNumber()); entity.setDeliveryListCode(byId.getTrainNumber());
} }
} }
} }

Loading…
Cancel
Save