dongdingding
杜函宇 1 day ago
parent 212cd71a27
commit 43658fec38

@ -186,7 +186,7 @@ public class AssetOfficialAccount extends BaseClass implements Serializable {
/** /**
* *
*/ */
@Excel(name = "平台类型", sort = 99) @Excel(name = "平台类型", sort = 99,readConverterExp = "1=微信,2=抖音,3=微博,4=今日头条,5=快手,6=B站,7=小红书")
@ApiModelProperty("平台类型") @ApiModelProperty("平台类型")
private String ptlx; private String ptlx;

@ -88,12 +88,14 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
*/ */
@Override @Override
public Boolean add(AssetOfficialAccount assetOfficialAccount) { public Boolean add(AssetOfficialAccount assetOfficialAccount) {
List<Unit> list3 = unitService.lambdaQuery().eq(Unit::getNickName, assetOfficialAccount.getSsdw()).eq(Unit::getDelFlag, 0).list(); // List<Unit> list3 = unitService.lambdaQuery()
if (list3 == null || list3.isEmpty()) { // .eq(Unit::getNickName, assetOfficialAccount.getSsdw()).eq(Unit::getDelFlag, 0).list();
throw new ServiceException("请选择已有单位!"); // if (list3 == null || list3.isEmpty()) {
} // throw new ServiceException("请选择已有单位!");
// }
List<AssetOfficialAccount> list1 = lambdaQuery().eq(AssetOfficialAccount::getSsdw, assetOfficialAccount.getSsdw())
List<AssetOfficialAccount> list1 = lambdaQuery()
.eq(AssetOfficialAccount::getSsdw, assetOfficialAccount.getSsdw())
.eq(AssetOfficialAccount::getGzhmc, assetOfficialAccount.getGzhmc()).list(); .eq(AssetOfficialAccount::getGzhmc, assetOfficialAccount.getGzhmc()).list();
if (list1 != null&& !list1.isEmpty()){ if (list1 != null&& !list1.isEmpty()){
throw new ServiceException("不允许新增重复资产!"); throw new ServiceException("不允许新增重复资产!");
@ -145,15 +147,12 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
*/ */
@Override @Override
public Boolean edit(AssetOfficialAccount assetOfficialAccount) { public Boolean edit(AssetOfficialAccount assetOfficialAccount) {
List<AssetOfficialAccount> list4= lambdaQuery()
List<Unit> list3 = unitService.lambdaQuery().eq(Unit::getNickName, assetOfficialAccount.getSsdw()).eq(Unit::getDelFlag, 0).list(); .eq(AssetOfficialAccount::getSsdw, assetOfficialAccount.getSsdw())
if (list3 == null || list3.isEmpty()) { .eq(AssetOfficialAccount::getGzhmc, assetOfficialAccount.getGzhmc()).list();
throw new ServiceException("请选择已有单位!"); if (list4 != null&& !list4.isEmpty()){
throw new ServiceException("不允许新增重复资产!");
} }
if (assetOfficialAccount.getCdList() != null && !assetOfficialAccount.getCdList().isEmpty()) { if (assetOfficialAccount.getCdList() != null && !assetOfficialAccount.getCdList().isEmpty()) {
StringBuilder a = new StringBuilder(); StringBuilder a = new StringBuilder();
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();

Loading…
Cancel
Save