Browse Source

Merge branch 'dev' into pre-production

visual
pref_mail@163.com 3 months ago
parent
commit
0b2aad8914
  1. 7
      blade-biz-common/src/main/java/org/springblade/common/constant/CodeNumConstant.java
  2. 6
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicTenantCodeController.java
  3. 10
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicTenantCodeService.java
  4. 38
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicTenantCodeServiceImpl.java
  5. 47
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
  6. 3
      blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java
  7. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  9. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  10. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

7
blade-biz-common/src/main/java/org/springblade/common/constant/CodeNumConstant.java

@ -4,13 +4,8 @@ public class CodeNumConstant {
public final static int WAYBILL = 1;//运单号
public final static int ORDER = 2;//订单号
public final static int PSCC = 3;//配送车次号
public final static int PSJH = 4;//配送计划号
public final static int LOCATION = 5;//库位号
public final static int TRAYS = 6;//托盘号
public final static int TRAYS = 8;//托盘号
public final static int PACKAGE = 7;//包件号
public final static int SHELF = 8;//货架号
public final static int PSKH = 9;//配送客户号
public final static int ABNORMAL_ORDER = 10;//异常工单号
public final static int TRUNKLINEBILLLADING = 11;//干线提货单号
public final static int TRUNKLINE_CARS_LOAD = 12;//干线配载批次号

6
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicTenantCodeController.java

@ -101,8 +101,8 @@ public class BasicTenantCodeController extends BladeController {
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入basicTenantCode")
public R save(@Valid @RequestBody BasicTenantCodeEntity basicTenantCode) {
boolean save = basicTenantCodeService.save(basicTenantCode);
return R.status(save);
R r = basicTenantCodeService.saveBasicTenantCodeEntity(basicTenantCode);
return r;
}
/**
@ -112,7 +112,7 @@ public class BasicTenantCodeController extends BladeController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入basicTenantCode")
public R update(@Valid @RequestBody BasicTenantCodeEntity basicTenantCode) {
return R.status(basicTenantCodeService.updateById(basicTenantCode));
return R.status(basicTenantCodeService.BasicTenantCodeEntity(basicTenantCode));
}
/**

10
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicTenantCodeService.java

@ -22,6 +22,7 @@ import com.logpm.basic.entity.BasicTenantCodeEntity;
import com.logpm.basic.excel.BasicTenantCodeExcel;
import com.logpm.basic.vo.BasicTenantCodeVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import java.util.List;
import java.util.Map;
@ -70,4 +71,13 @@ public interface IBasicTenantCodeService extends BaseService<BasicTenantCodeEnti
String shelfCode(String tenantId,String codeType);
BasicTenantCodeEntity findBasicTenantCodeByCodeAndShowType(String codeType, Integer showType);
/**
* 修改租户编码
* @param basicTenantCode
* @return
*/
boolean BasicTenantCodeEntity(BasicTenantCodeEntity basicTenantCode);
R saveBasicTenantCodeEntity(BasicTenantCodeEntity basicTenantCode);
}

38
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicTenantCodeServiceImpl.java

@ -19,19 +19,26 @@ package com.logpm.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basic.entity.BasicTenantCodeEntity;
import com.logpm.basic.excel.BasicTenantCodeExcel;
import com.logpm.basic.mapper.BasicTenantCodeMapper;
import com.logpm.basic.service.IBasicTenantCodeService;
import com.logpm.basic.vo.BasicTenantCodeVO;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.RedisKeyConstant;
import org.springblade.common.constant.basiccode.BasicCodeTypeConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* 租户设置编码 服务实现类
@ -43,6 +50,7 @@ import java.util.Map;
@AllArgsConstructor
public class BasicTenantCodeServiceImpl extends BaseServiceImpl<BasicTenantCodeMapper, BasicTenantCodeEntity> implements IBasicTenantCodeService {
private final BladeRedis redis;
@Override
public IPage<BasicTenantCodeEntity> list(Map<String, Object> basicTenantCode, IPage<BasicTenantCodeEntity> page) {
@ -92,6 +100,36 @@ public class BasicTenantCodeServiceImpl extends BaseServiceImpl<BasicTenantCodeM
return basicTenantCodeEntity;
}
@Override
public boolean BasicTenantCodeEntity(BasicTenantCodeEntity basicTenantCode) {
//删除此编码Redis存在的KEY
if (basicTenantCode.getCodeType().equals(BasicCodeTypeConstant.CLIENT_CODE.getValue())){
redis.del(RedisKeyConstant.FINAL_CLIENT_CODE + AuthUtil.getTenantId());
}
return this.updateById(basicTenantCode);
}
@Override
public R saveBasicTenantCodeEntity(BasicTenantCodeEntity basicTenantCode) {
//参数校验
if (Objects.isNull(basicTenantCode.getCodeType())){
return R.fail("CodeType参数缺失");
}
if (Objects.isNull(basicTenantCode.getShowType())){
return R.fail("ShowType参数缺失");
}
//查询此类编码是否存在
List<BasicTenantCodeEntity> list = this.list(Wrappers.<BasicTenantCodeEntity>query().lambda()
.eq(BasicTenantCodeEntity::getCodeType, basicTenantCode.getCodeType())
.eq(BasicTenantCodeEntity::getShowType, basicTenantCode.getShowType())
);
if (!list.isEmpty()) {
return R.fail("此编码配置已存在");
}
return R.status(this.save(basicTenantCode));
}
@Override
public boolean save(BasicTenantCodeEntity entity) {
String code = entity.getCode();

47
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

@ -168,16 +168,16 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
}
//对比两个客户信息进行比对
boolean flag = contrastOldClientAndNewClient(oldClientEntity, basicdataClient);
if (!flag){
if (!flag) {
log.info(">>>>>>>>>>>>>>>>>>>>>>>记录客户修改日志操作失败");
}
if (Objects.isNull(basicdataClient.getBladeRegionProvinceId())){
if (Objects.isNull(basicdataClient.getBladeRegionProvinceId())) {
basicdataClient.setBladeRegionProvinceId("");
}
if (Objects.isNull(basicdataClient.getBladeRegionAreaId())){
if (Objects.isNull(basicdataClient.getBladeRegionAreaId())) {
basicdataClient.setBladeRegionAreaId("");
}
if (Objects.isNull(basicdataClient.getBladeRegionCityId())){
if (Objects.isNull(basicdataClient.getBladeRegionCityId())) {
basicdataClient.setBladeRegionCityId("");
}
//修改
@ -324,13 +324,13 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
StringBuilder content = new StringBuilder();
Predicate<String> predicateClientName = Predicate.isEqual(oldClientEntity.getClientName());
boolean clientName = predicateClientName.test(newClientEntity.getClientName());
if (!clientName){
if (!clientName) {
//客户名称
content.append("客户名称由[").append(oldClientEntity.getClientName()).append("]变更为-->[").append(newClientEntity.getClientName()).append("],");
}
Predicate<String> predicateClientType = Predicate.isEqual(oldClientEntity.getClientType());
boolean clientType = predicateClientType.test(newClientEntity.getClientType());
if (!clientType){
if (!clientType) {
//类型
String oldClientTypeValue = DictBizCache.getValue(DictBizConstant.CLIENT_TYPE, oldClientEntity.getClientType());
String newClientTypeValue = DictBizCache.getValue(DictBizConstant.CLIENT_TYPE, newClientEntity.getClientType());
@ -338,21 +338,21 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
}
Predicate<String> predicateDetailedly = Predicate.isEqual(oldClientEntity.getDetailedly());
boolean detailedly = predicateDetailedly.test(newClientEntity.getDetailedly());
if (!detailedly){
if (!detailedly) {
//详细地址
content.append("详细地址由[").append(oldClientEntity.getDetailedly()).append("]变更为-->[").append(newClientEntity.getDetailedly()).append("],");
}
Predicate<Integer> predicateTypeService = Predicate.isEqual(oldClientEntity.getTypeService());
boolean typeService = predicateTypeService.test(newClientEntity.getTypeService());
if (!typeService){
if (!typeService) {
//配送类型
String oldDeliveryType = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, oldClientEntity.getTypeService());
String oldDeliveryType = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, oldClientEntity.getTypeService());
String newDeliveryType = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, newClientEntity.getTypeService());
content.append("配送类型由[").append(oldDeliveryType).append("]变更为-->[").append(newDeliveryType).append("],");
}
Predicate<String> predicateDefaultPaymentMethods = Predicate.isEqual(oldClientEntity.getDefaultPaymentMethods());
boolean defaultPaymentMethods = predicateDefaultPaymentMethods.test(newClientEntity.getDefaultPaymentMethods());
if (!defaultPaymentMethods){
if (!defaultPaymentMethods) {
//结算方式
String oldDefaultPaymentMethodsValue = DictBizCache.getValue(DictBizConstant.MAINLINE_WAYBILL_PAYMENTMETHOD, oldClientEntity.getDefaultPaymentMethods());
String newDefaultPaymentMethodsValue = DictBizCache.getValue(DictBizConstant.MAINLINE_WAYBILL_PAYMENTMETHOD, newClientEntity.getDefaultPaymentMethods());
@ -361,7 +361,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
String oldAddress = handleClientCityCode(oldClientEntity);
String newAddress = handleClientCityCode(newClientEntity);
if (!oldAddress.equals(newAddress)){
if (!oldAddress.equals(newAddress)) {
//地址变更
content.append("地址由[").append(oldAddress).append("]变更为-->[").append(newAddress).append("],");
}
@ -398,7 +398,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
if (!historicalContractEntities.isEmpty()) {
oldFileName = historicalContractEntities.get(0).getFileName();
}
if (!newClientEntity.getFileName().equals(oldFileName)){
if (!newClientEntity.getFileName().equals(oldFileName)) {
content.append("合同附件由[").append(oldFileName).append("]变更为-->[").append(newClientEntity.getFileName()).append("],");
}
}
@ -406,13 +406,13 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
//对于合同开始时间比对
Predicate<Date> predicateContractStartTime = Predicate.isEqual(oldClientEntity.getContractStartTime());
boolean contractStartTime = predicateContractStartTime.test(newClientEntity.getContractStartTime());
if (!contractStartTime){
if (!contractStartTime) {
content.append("合同开始时间由[").append(sdf.format(oldClientEntity.getContractStartTime())).append("]变更为-->[").append(sdf.format(oldClientEntity.getContractStartTime())).append("],");
}
//对于合同结束时间比对
Predicate<Date> predicateContractEntTime = Predicate.isEqual(oldClientEntity.getContractEntTime());
boolean contractEndTime = predicateContractEntTime.test(newClientEntity.getContractEntTime());
if (!contractEndTime){
if (!contractEndTime) {
content.append("合同开始时间由[").append(sdf.format(oldClientEntity.getContractEntTime())).append("]变更为-->[").append(sdf.format(newClientEntity.getContractEntTime())).append("],");
}
BasicdataClientLogEntity basicdataClientLogEntity = new BasicdataClientLogEntity();
@ -825,7 +825,8 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
for (ClientInfoVO clientInfoVO : ls) {
Long clientId = clientInfoVO.getClientId();
List<BasicdataStoreBrandEntity> storeBrandEntityList = collect.get(clientId);
if(storeBrandEntityList.size() == 1){
if (storeBrandEntityList != null && storeBrandEntityList.size() == 1) {
clientInfoVO.setBrandId(storeBrandEntityList.get(0).getBrandId());
}
list.add(JSON.parseObject(JSON.toJSONString(clientInfoVO)));
@ -932,23 +933,23 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
return R.success("校验成功");
}
private String handleClientCityCode(BasicdataClientEntity clientEntity){
private String handleClientCityCode(BasicdataClientEntity clientEntity) {
StringBuilder oldAddress = new StringBuilder();
if (!Objects.isNull(clientEntity.getBladeRegionProvinceId())){
if (!Objects.isNull(clientEntity.getBladeRegionProvinceId())) {
String provinceName = regionFeign.getName(clientEntity.getBladeRegionProvinceId());
if (Func.isNotEmpty(provinceName)){
if (Func.isNotEmpty(provinceName)) {
oldAddress.append(provinceName);
}
}
if (!Objects.isNull(clientEntity.getBladeRegionCityId())){
if (!Objects.isNull(clientEntity.getBladeRegionCityId())) {
String cityName = regionFeign.getName(clientEntity.getBladeRegionCityId());
if (Func.isNotEmpty(cityName)){
if (Func.isNotEmpty(cityName)) {
oldAddress.append(cityName);
}
}
if (!Objects.isNull(clientEntity.getBladeRegionAreaId())){
if (!Objects.isNull(clientEntity.getBladeRegionAreaId())) {
String areaName = regionFeign.getName(clientEntity.getBladeRegionAreaId());
if (Func.isNotEmpty(areaName)){
if (Func.isNotEmpty(areaName)) {
oldAddress.append(areaName);
}
}
@ -956,6 +957,4 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
}
}

3
blade-service/logpm-business/src/main/java/com/logpm/business/service/impl/BusinessPreOrderServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.business.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -398,7 +399,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
queryWrapper1.eq(BusinessPreOrderEntity::getInWarehouse, 1);
queryWrapper1.eq(BusinessPreOrderEntity::getIsDeleted, 0);
List<BusinessPreOrderEntity> list1 = baseMapper.selectList(queryWrapper1);
if (!list1.isEmpty()) {
if (CollUtil.isNotEmpty(list1)) {
return Resp.scanFail("扫描失败", "包件已入库");
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -728,7 +728,7 @@
lddl.train_number trainNumber,
lddl.vehicle_name vehicleName,
lddl.driver_name driverName,
lddl.driver_name driverName,
lddl.loading_team_name loadingTeamName,
lddl.unloading_team_name unLoadingTeamName,
CASE

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -625,7 +625,7 @@
and ldrs.stock_article_status in (1, 3)
) orderNum,
(
ldr.reservation_num + ldr.reservation_stock_list_num
ldr.reservation_num
) planNum,
(
ldr.reservation_stock_list_num

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -2087,12 +2087,13 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
}
DistributionStockListEntity stockListEntity = distributionStockListService.getById(distributionReservationStocklistEntity.getStocklistId());
Integer quantityOccupied = stockListEntity.getQuantityOccupied();
Integer total = quantityOccupied - oldReservationNum;
Integer total = quantityOccupied - oldReservationNum+ newReservationNum;
distributionReservationStocklistEntity.setReservationNum(distributionStockListDTO.getReservationNum());
allStockListEntityList.add(distributionReservationStocklistEntity);
distributionReservationStocklistService.updateById(distributionReservationStocklistEntity);
stockListEntity.setQuantityOccupied(total + distributionReservationStocklistEntity.getReservationNum());
stockListEntity.setQuantityOccupied(total);
distributionStockListService.updateById(stockListEntity);
oleInventoryList.remove(c);
// //TODO 查询具体的库存品数量增加还是减少
// Long reservationStocklistEntityId = distributionReservationStocklistEntity.getId();
// Long reservationId = distributionReservationStocklistEntity.getReservationId();

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -9013,6 +9013,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
signforEntity.setSjsigningTime(sdf.format(new Date()));
signforEntity.setDriverSigning(SignforDriverSigningStatusConstant.yiqianshou.getValue());
signforEntity.setSigneeName(user.getNickName());
signforEntity.setDriverRemarks(distributionSignfor.getDriverRemarks());
log.info("driverName>>>>>>>>>>>>>:{}", user.getNickName());
signforEntity.setSigneeId(user.getUserId());
return R.data(this.updateById(signforEntity));

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -392,7 +392,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (!distributionReservationEntities.isEmpty()) {
int packagePlanNum = distributionReservationEntities.stream().mapToInt(DistributionReservationEntity::getReservationNum).sum();
int inventoryPlanNum = distributionReservationEntities.stream().mapToInt(DistributionReservationEntity::getReservationStockListNum).sum();
vo.setPlanNum(packagePlanNum+inventoryPlanNum);
vo.setPlanNum(packagePlanNum);
vo.setInventoryNub(inventoryPlanNum);
}
}

Loading…
Cancel
Save