dongdingding
杜函宇 21 hours 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("平台类型")
private String ptlx;

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

Loading…
Cancel
Save