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

@ -151,7 +151,7 @@ public class AssetCurrentController extends BaseController {
throw new ServiceException("请选择已有单位!"); throw new ServiceException("请选择已有单位!");
} }
List<AssetCurrent> list1 = assetCurrentService.lambdaQuery().eq(AssetCurrent::getXtmc, assetCurrent.getXtmc()).eq(AssetCurrent::getDwmc, assetCurrent.getDwmc()).list(); 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("不允许新增重复资产!"); 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("平台类型") @ApiModelProperty("平台类型")
private String ptlx; private String ptlx;
@ -193,6 +194,7 @@ public class AssetOfficialAccount extends BaseClass implements Serializable {
* *
*/ */
@ApiModelProperty("粉丝数") @ApiModelProperty("粉丝数")
@Excel(name = "粉丝数", sort = 100)
private String fss; private String fss;
/** /**

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

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

Loading…
Cancel
Save