选入DI同步三期设置
parent
f2d12b3cb2
commit
f8cda1703c
@ -0,0 +1,44 @@
|
||||
package com.glxp.api.admin.util;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UdiInfoUtil {
|
||||
|
||||
|
||||
public static UdiInfoEntity initUdiInfoEntity(UdiInfoEntity udiInfoEntity) {
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhph()) && "否".equals(udiInfoEntity.getScbssfbhph())) {
|
||||
udiInfoEntity.setAllowNoBatch(true);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhscrq()) && "否".equals(udiInfoEntity.getScbssfbhscrq())) {
|
||||
udiInfoEntity.setAllowNoProduct(true);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhsxrq()) && "否".equals(udiInfoEntity.getScbssfbhsxrq())) {
|
||||
udiInfoEntity.setAllowNoExpire(true);
|
||||
}
|
||||
return udiInfoEntity;
|
||||
}
|
||||
|
||||
public static List<UdiInfoEntity> initUdiInfoEntitys(List<UdiInfoEntity> udiInfoEntitys) {
|
||||
if (CollUtil.isNotEmpty(udiInfoEntitys)) {
|
||||
for (UdiInfoEntity udiInfoEntity : udiInfoEntitys) {
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhph()) && "否".equals(udiInfoEntity.getScbssfbhph())) {
|
||||
udiInfoEntity.setAllowNoBatch(true);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhscrq()) && "否".equals(udiInfoEntity.getScbssfbhscrq())) {
|
||||
udiInfoEntity.setAllowNoProduct(true);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(udiInfoEntity.getScbssfbhsxrq()) && "否".equals(udiInfoEntity.getScbssfbhsxrq())) {
|
||||
udiInfoEntity.setAllowNoExpire(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return udiInfoEntitys;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue