# Conflicts:
#	ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java
dongdingding
dongdingding 1 day ago
commit 0f39478fe5

@ -151,7 +151,7 @@ public class AssetCurrentController extends BaseController {
throw new ServiceException("请选择已有单位!");
}
List<AssetCurrent> list1 = assetCurrentService.lambdaQuery().eq(AssetCurrent::getXtmc, assetCurrent.getXtmc()).eq(AssetCurrent::getDwmc, assetCurrent.getDwmc()).list();
if (list1 != null&& !list1.isEmpty()){
if (list1 != null && !list1.isEmpty()) {
throw new ServiceException("不允许新增重复资产!");
}

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

@ -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();

@ -53,8 +53,21 @@
l.*
FROM
asset_current a
LEFT JOIN ( SELECT asset_id, NAME, tyshxydm, lxr, lxdh, gyszcdz, sfwtc FROM asset_supply_chain WHERE type = 5
GROUP BY asset_id,NAME, tyshxydm, lxr, lxdh, gyszcdz, sfwtc ) b ON a.id = b.asset_id
LEFT JOIN (
SELECT
asset_id,
NAME,
tyshxydm,
lxr,
lxdh,
gyszcdz,
sfwtc,
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
FROM
asset_supply_chain
WHERE
type = 5
) b ON a.id = b.asset_id AND b.row_num = 1
LEFT JOIN (
SELECT
asset_id,
@ -63,20 +76,13 @@
lxr AS lxr1,
lxdh AS lxdh1,
gyszcdz AS gyszcdz1,
sfwtc AS sfwtc1
sfwtc AS sfwtc1,
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
FROM
asset_supply_chain
WHERE
type = 7
GROUP BY
asset_id,
NAME,
tyshxydm,
lxr,
lxdh,
gyszcdz,
sfwtc
) c ON a.id = c.asset_id
) c ON a.id = c.asset_id AND c.row_num = 1
LEFT JOIN (
SELECT
asset_id,
@ -89,18 +95,13 @@
yjxlh,
yjbbxx,
yjyt,
yjbsxx
yjbsxx,
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
FROM
asset_basic_network
WHERE
type = 1
GROUP BY
asset_id,
sblx,
pp,
sb_ip,
czxt,czxtbb,yjxh,yjxlh,yjbbxx,yjyt,yjbsxx
) d ON a.id = d.asset_id
) d ON a.id = d.asset_id AND d.row_num = 1
LEFT JOIN (
SELECT
asset_id,
@ -111,26 +112,32 @@
yjxlh AS wlyjxlh,
yjbbxx AS wlyjbbxx,
yjyt AS wlyjyt,
yjbsxx AS wlyjbsxx
yjbsxx AS wlyjbsxx,
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
FROM
asset_basic_network
WHERE
type = 2
GROUP BY
) e ON a.id = e.asset_id AND e.row_num = 1
LEFT JOIN (
SELECT
asset_id,
sblx,
pp,sb_ip,yjxh,yjxlh,yjbbxx,yjyt,yjbsxx
) e ON a.id = e.asset_id
LEFT JOIN ( SELECT
asset_id, sblx AS aqwlsblx, pp AS aqwlpp, sb_ip AS aqwlsbIp,
sblx AS aqwlsblx,
pp AS aqwlpp,
sb_ip AS aqwlsbIp,
yjxh AS aqyjxh,
yjxlh AS aqyjxlh,
yjbbxx AS aqyjbbxx,
yjyt AS aqyjyt,
yjbsxx AS aqyjbswz
FROM asset_basic_network WHERE type = 3 GROUP BY asset_id,sblx,pp,sb_ip,yjxh,yjxlh,yjbbxx,yjyt,yjbsxx ) l ON a.id = l.asset_id
yjbsxx AS aqyjbswz,
ROW_NUMBER() OVER (PARTITION BY asset_id ORDER BY create_time) AS row_num
FROM
asset_basic_network
WHERE
type = 3
) l ON a.id = l.asset_id AND l.row_num = 1
<where>
a.del_flag = '0' and a.isbf = '0'
a.del_flag = '0'
<if test="req.xtmc!=null and req.xtmc!='' ">
and a.xtmc like concat('%',#{req.xtmc},'%')
</if>

Loading…
Cancel
Save