Browse Source

add:备货BUG修复,预约库存品BUG修复,编码BUG修复,签收复核备注BUG修复

visual
pref_mail@163.com 6 months ago
parent
commit
95dcd69008
  1. 6
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicTenantCodeController.java
  2. 10
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicTenantCodeService.java
  3. 38
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicTenantCodeServiceImpl.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  6. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  7. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

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();

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