|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.glxp.api.controller.basic;
|
|
|
|
package com.glxp.api.controller.basic;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.copier.CopyOptions;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
@ -279,13 +280,27 @@ public class UdiRlSupController extends BaseController {
|
|
|
|
udiRelevanceEntity.setId(Long.parseLong(rlidStr));
|
|
|
|
udiRelevanceEntity.setId(Long.parseLong(rlidStr));
|
|
|
|
udiRelevanceEntity.setLockStatus(1);
|
|
|
|
udiRelevanceEntity.setLockStatus(1);
|
|
|
|
udiRelevanceEntity.setGroupBuy(udiInfoExportRequest.getSupplementRequest().getGroupBuy());
|
|
|
|
udiRelevanceEntity.setGroupBuy(udiInfoExportRequest.getSupplementRequest().getGroupBuy());
|
|
|
|
|
|
|
|
udiRelevanceEntity.setUpdateTime(new Date());
|
|
|
|
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
|
|
|
|
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
|
|
|
|
UdiProductEntity udiProductEntity = new UdiProductEntity();
|
|
|
|
UdiProductEntity udiProductEntity = new UdiProductEntity();
|
|
|
|
BeanUtil.copyProperties(udiInfoExportRequest.getSupplementRequest(), udiProductEntity);
|
|
|
|
BeanUtil.copyProperties(udiInfoExportRequest.getSupplementRequest(), udiProductEntity);
|
|
|
|
//处理是否需要扫码字段
|
|
|
|
//处理是否需要扫码字段
|
|
|
|
classifyCodeService.updateRequireScanCode(udiProductEntity);
|
|
|
|
classifyCodeService.updateRequireScanCode(udiProductEntity);
|
|
|
|
|
|
|
|
udiProductEntity.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity1 = udiRelevanceService.selectById(Long.valueOf(rlidStr));
|
|
|
|
|
|
|
|
UdiProductEntity byUuid = udiProductService.findByUuid(udiRelevanceEntity1.getUuid());
|
|
|
|
|
|
|
|
if (byUuid != null){
|
|
|
|
|
|
|
|
byUuid.setCatalogname1(udiProductEntity.getCatalogname1());
|
|
|
|
|
|
|
|
byUuid.setCatalogname2(udiProductEntity.getCatalogname2());
|
|
|
|
|
|
|
|
byUuid.setCatalogname3(udiProductEntity.getCatalogname3());
|
|
|
|
|
|
|
|
byUuid.setYbbm(udiProductEntity.getYbbm());
|
|
|
|
|
|
|
|
byUuid.setManufactory(udiProductEntity.getManufactory());
|
|
|
|
|
|
|
|
byUuid.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
udiProductService.updateUdiInfo(byUuid);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
udiProductService.insertUdiInfo(udiProductEntity);
|
|
|
|
udiProductService.insertUdiInfo(udiProductEntity);
|
|
|
|
|
|
|
|
}
|
|
|
|
return ResultVOUtils.success("选入成功!");
|
|
|
|
return ResultVOUtils.success("选入成功!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|