供应链相关问题修复

This commit is contained in:
liux 2025-08-19 18:02:09 +08:00
parent ac5557cf92
commit 3a5bfa3950
9 changed files with 20 additions and 15 deletions

View File

@ -22,5 +22,5 @@ public class SupplierScoreRuleAddDTO {
@ApiModelProperty("设定分数")
private BigDecimal setScore;
@ApiModelProperty("区间分数设定集合")
private @Valid List<SupplierScoreRuleSectionAddDTO> sectionListDTO;
private @Valid List<SupplierScoreRuleSectionAddDTO> sectionVOList;
}

View File

@ -60,5 +60,5 @@ public interface WarehouseInfoMapper {
*/
public int deleteImsWarehouseInfoByWarehouseIds(Long[] warehouseIds);
int findWarehouseCode(String warehouseCode);
int findWarehouseCode(WarehouseInfo imsWarehouseInfo);
}

View File

@ -305,7 +305,7 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
reportInventoryBase.setRecordType(1);
reportInventoryBase.setRecordDate(LocalDate.now());
reportInventoryBase.setRecordTime(LocalDateTime.now());
reportInventoryBase.setOutIntoType(3L);
reportInventoryBase.setOutIntoType(imsOutInventory.getIntoType());
reportInventoryBase.setMaterialId(detail.getMaterialId());
reportInventoryBase.setSupplierId(detail.getSupplierId());
reportInventoryBase.setUnitId(detail.getUnitId());
@ -322,7 +322,7 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
reportInventoryBase.setProductDate(detail.getProductDate());
reportInventoryBase.setExpireTime(detail.getExpireTime());
reportInventoryBase.setFetchUserId(-1L);
reportInventoryBase.setOperatorId("王大力");
reportInventoryBase.setOperatorId(SecurityUtils.getLoginUser().getUsername());
reportInventoryBase.setOperateTime(DateUtils.getNowDate());
if(Objects.nonNull(detail.getInventoryId())){
reportInventoryBaseMapper.insertReportInventoryBase(reportInventoryBase); //新增库存记录基础信息

View File

@ -370,7 +370,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
reportInventoryBase.setRecordType(2);
reportInventoryBase.setRecordDate(LocalDate.now());
reportInventoryBase.setRecordTime(LocalDateTime.now());
reportInventoryBase.setOutIntoType(3L);
reportInventoryBase.setOutIntoType(imsOutInventory.getOutType());
reportInventoryBase.setMaterialId(detail.getMaterialId());
reportInventoryBase.setSupplierId(detail.getSupplierId());
reportInventoryBase.setUnitId(detail.getUnitId());
@ -386,8 +386,8 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
reportInventoryBase.setProductDate(detail.getProductDate());
reportInventoryBase.setExpireTime(detail.getExpireTime());
reportInventoryBase.setFetchUserId(-1L);
reportInventoryBase.setOperatorId("王大力");
reportInventoryBase.setFetchUserId(imsOutInventory.getFetchUserId());
reportInventoryBase.setOperatorId(SecurityUtils.getLoginUser().getUsername());
reportInventoryBase.setOperateTime(DateUtils.getNowDate());
reportInventoryBaseMapper.insertReportInventoryBase(reportInventoryBase); //新增库存记录基础信息

View File

@ -85,9 +85,9 @@ public class SupplierScoreRuleServiceImpl extends ServiceImpl<SupplierScoreRuleM
ruleId = Id.next();
supplierScoreRule.setRuleId(ruleId);
this.baseMapper.insert(supplierScoreRule);
} while (CollUtil.isEmpty(supplierScoreRuleAddDTO.getSectionListDTO()));
} while (CollUtil.isEmpty(supplierScoreRuleAddDTO.getSectionVOList()));
var9 = supplierScoreRuleAddDTO.getSectionListDTO().iterator();
var9 = supplierScoreRuleAddDTO.getSectionVOList().iterator();
while (var9.hasNext()) {
SupplierScoreRuleSectionAddDTO supplierScoreRuleSectionAddDTO = var9.next();
@ -126,10 +126,10 @@ public class SupplierScoreRuleServiceImpl extends ServiceImpl<SupplierScoreRuleM
SupplierScoreRule updateRule = new SupplierScoreRule();
BeanUtil.copyProperties(supplierScoreRuleAddDTO, updateRule);
this.baseMapper.update(updateRule, Wrappers.lambdaQuery(SupplierScoreRule.class).eq(SupplierScoreRule::getRuleId, ruleId));
} while (CollUtil.isEmpty(supplierScoreRuleAddDTO.getSectionListDTO()));
} while (CollUtil.isEmpty(supplierScoreRuleAddDTO.getSectionVOList()));
this.supplierScoreRuleSectionMapper.delete(Wrappers.lambdaQuery(SupplierScoreRuleSection.class).eq(SupplierScoreRuleSection::getRuleId, ruleId));
Iterator<SupplierScoreRuleSectionAddDTO> var12 = supplierScoreRuleAddDTO.getSectionListDTO().iterator();
Iterator<SupplierScoreRuleSectionAddDTO> var12 = supplierScoreRuleAddDTO.getSectionVOList().iterator();
while (var12.hasNext()) {
SupplierScoreRuleSectionAddDTO supplierScoreRuleSectionAddDTO = var12.next();

View File

@ -53,7 +53,7 @@ public class WarehouseInfoServiceImpl implements IWarehouseInfoService {
imsWarehouseInfo.setCreateTime(DateUtils.getNowDate());
try {
//检查仓库id是否唯一唯一的话进行下面否在返回进行提示
int warehouseCode = imsWarehouseInfoMapper.findWarehouseCode(imsWarehouseInfo.getWarehouseCode());
int warehouseCode = imsWarehouseInfoMapper.findWarehouseCode(imsWarehouseInfo);
if (warehouseCode>0) {
throw new ServiceException("仓库编码已存在");
}
@ -73,7 +73,7 @@ public class WarehouseInfoServiceImpl implements IWarehouseInfoService {
public int updateImsWarehouseInfo(WarehouseInfo imsWarehouseInfo) {
imsWarehouseInfo.setUpdateTime(DateUtils.getNowDate());
try {
int warehouseCode = imsWarehouseInfoMapper.findWarehouseCode(imsWarehouseInfo.getWarehouseCode());
int warehouseCode = imsWarehouseInfoMapper.findWarehouseCode(imsWarehouseInfo);
if (warehouseCode>0) {
throw new ServiceException("仓库编码已存在");
}

View File

@ -124,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectCookDishesVo">
SELECT
SELECT DISTINCT
cd.dishes_id,
meal_type,
custom_id,

View File

@ -229,6 +229,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="content.warehouseId != null and content.warehouseId != ''">
AND a.warehouse_id = #{content.warehouseId}
</if>
<if test="content.fetchStatus != null and content.fetchStatus != ''">
AND a.fetch_status = #{content.fetchStatus}
</if>
</where>
order by a.create_time desc
</select>

View File

@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findWarehouseCode" resultType="java.lang.Integer">
select count(1)
from ims_warehouse_info
where warehouse_code = #{warehouseCode}
where warehouse_code = #{warehouseCode} and warehouse_id != #{warehouseId}
</select>
<insert id="insertImsWarehouseInfo" parameterType="com.bonus.canteen.core.ims.domain.WarehouseInfo" useGeneratedKeys="true" keyProperty="warehouseId">