组织架构

duhanyu
杜函宇 5 months ago
parent 62b6610647
commit 6eb958fa41

@ -27,6 +27,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -77,9 +78,6 @@ public class AssetCurrentController extends BaseController {
private UnitOtherConcatCpService unitOtherConcatCpService; private UnitOtherConcatCpService unitOtherConcatCpService;
/** /**
* *
* *
@ -146,7 +144,7 @@ public class AssetCurrentController extends BaseController {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult insert(@RequestBody @Valid AssetCurrent assetCurrent) { public AjaxResult insert(@RequestBody @Valid AssetCurrent assetCurrent) {
StringBuilder a = new StringBuilder(); StringBuilder a = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) { if (assetCurrent.getGlymList() != null) {
assetCurrent.getGlymList().forEach(x -> { assetCurrent.getGlymList().forEach(x -> {
a.append(x.getKey()); a.append(x.getKey());
a.append(","); a.append(",");
@ -154,7 +152,7 @@ public class AssetCurrentController extends BaseController {
} }
assetCurrent.setGlym(a.toString()); assetCurrent.setGlym(a.toString());
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) { if (assetCurrent.getGlIpList() != null) {
assetCurrent.getGlymList().forEach(x -> { assetCurrent.getGlymList().forEach(x -> {
b.append(x.getKey()); b.append(x.getKey());
b.append(","); b.append(",");
@ -167,21 +165,21 @@ public class AssetCurrentController extends BaseController {
assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId()); assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId());
assetBusinessFormService.save(assetCurrent.getXjgywxt()); assetBusinessFormService.save(assetCurrent.getXjgywxt());
} }
if (!assetCurrent.getGylxxList().isEmpty()) { if (assetCurrent.getGylxxList() != null) {
for (AssetSupplyChain items : assetCurrent.getGylxxList()) { for (AssetSupplyChain items : assetCurrent.getGylxxList()) {
items.setAssetId(assetCurrent.getId()); items.setAssetId(assetCurrent.getId());
} }
//新增供应链 //新增供应链
assetSupplyChainService.saveBatch(assetCurrent.getGylxxList()); assetSupplyChainService.saveBatch(assetCurrent.getGylxxList());
} }
if (!assetCurrent.getJcwlList().isEmpty()) { if (assetCurrent.getJcwlList() != null) {
for (AssetBasicNetwork items : assetCurrent.getJcwlList()) { for (AssetBasicNetwork items : assetCurrent.getJcwlList()) {
items.setAssetId(assetCurrent.getId()); items.setAssetId(assetCurrent.getId());
} }
//新增基础网络 //新增基础网络
assetBasicNetworkService.saveBatch(assetCurrent.getJcwlList()); assetBasicNetworkService.saveBatch(assetCurrent.getJcwlList());
} }
if (!assetCurrent.getOtherConcat().isEmpty()) { if (assetCurrent.getOtherConcat() != null) {
for (UnitOtherConcat items : assetCurrent.getOtherConcat()) { for (UnitOtherConcat items : assetCurrent.getOtherConcat()) {
items.setAssetId(assetCurrent.getId()); items.setAssetId(assetCurrent.getId());
} }
@ -206,7 +204,7 @@ public class AssetCurrentController extends BaseController {
assetCurrentCpPo.getXjgywxt().setTaskId(assetTask.getId()); assetCurrentCpPo.getXjgywxt().setTaskId(assetTask.getId());
assetBusinessFormCpService.save(assetCurrentCpPo.getXjgywxt()); assetBusinessFormCpService.save(assetCurrentCpPo.getXjgywxt());
} }
if (!assetCurrent.getGylxxList().isEmpty()) { if (assetCurrent.getGylxxList() != null) {
for (AssetSupplyChainCpPo items : assetCurrentCpPo.getGylxxList()) { for (AssetSupplyChainCpPo items : assetCurrentCpPo.getGylxxList()) {
items.setAssetId(id); items.setAssetId(id);
items.setTaskId(assetTask.getId()); items.setTaskId(assetTask.getId());
@ -214,7 +212,7 @@ public class AssetCurrentController extends BaseController {
//新增供应链 //新增供应链
assetSupplyChainCpService.saveBatch(assetCurrentCpPo.getGylxxList()); assetSupplyChainCpService.saveBatch(assetCurrentCpPo.getGylxxList());
} }
if (!assetCurrent.getJcwlList().isEmpty()) { if (assetCurrent.getJcwlList() != null) {
for (AssetBasicNetworkCpPo items : assetCurrentCpPo.getJcwlList()) { for (AssetBasicNetworkCpPo items : assetCurrentCpPo.getJcwlList()) {
items.setAssetId(assetCurrent.getId()); items.setAssetId(assetCurrent.getId());
items.setTaskId(assetTask.getId()); items.setTaskId(assetTask.getId());
@ -222,7 +220,7 @@ public class AssetCurrentController extends BaseController {
//新增基础网络 //新增基础网络
assetBasicNetworkCpService.saveBatch(assetCurrentCpPo.getJcwlList()); assetBasicNetworkCpService.saveBatch(assetCurrentCpPo.getJcwlList());
} }
if (!assetCurrent.getOtherConcat().isEmpty()) { if (assetCurrent.getOtherConcat() != null) {
for (UnitOtherConcatCpPo items : assetCurrentCpPo.getOtherConcat()) { for (UnitOtherConcatCpPo items : assetCurrentCpPo.getOtherConcat()) {
items.setAssetId(assetCurrent.getId()); items.setAssetId(assetCurrent.getId());
items.setTaskId(assetTask.getId()); items.setTaskId(assetTask.getId());
@ -247,7 +245,7 @@ public class AssetCurrentController extends BaseController {
@PutMapping @PutMapping
public AjaxResult update(@RequestBody @Valid AssetCurrent assetCurrent) { public AjaxResult update(@RequestBody @Valid AssetCurrent assetCurrent) {
StringBuilder a = new StringBuilder(); StringBuilder a = new StringBuilder();
if (!assetCurrent.getGlymList().isEmpty()) { if (assetCurrent.getGlymList() != null) {
assetCurrent.getGlymList().forEach(x -> { assetCurrent.getGlymList().forEach(x -> {
a.append(x.getKey()); a.append(x.getKey());
a.append(","); a.append(",");
@ -255,7 +253,7 @@ public class AssetCurrentController extends BaseController {
} }
assetCurrent.setGlym(a.toString()); assetCurrent.setGlym(a.toString());
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
if (!assetCurrent.getGlIpList().isEmpty()) { if (assetCurrent.getGlIpList() != null) {
assetCurrent.getGlymList().forEach(x -> { assetCurrent.getGlymList().forEach(x -> {
b.append(x.getKey()); b.append(x.getKey());
b.append(","); b.append(",");
@ -272,7 +270,7 @@ public class AssetCurrentController extends BaseController {
assetCurrent.getXjgywxt().setId(null); assetCurrent.getXjgywxt().setId(null);
assetBusinessFormService.save(assetCurrent.getXjgywxt()); assetBusinessFormService.save(assetCurrent.getXjgywxt());
} }
if (!assetCurrent.getGylxxList().isEmpty()) { if (assetCurrent.getGylxxList() != null) {
for (AssetSupplyChain items : assetCurrent.getGylxxList()) { for (AssetSupplyChain items : assetCurrent.getGylxxList()) {
items.setAssetId(assetCurrent.getId()); items.setAssetId(assetCurrent.getId());
items.setId(null); items.setId(null);
@ -280,7 +278,7 @@ public class AssetCurrentController extends BaseController {
//新增供应链 //新增供应链
assetSupplyChainService.saveBatch(assetCurrent.getGylxxList()); assetSupplyChainService.saveBatch(assetCurrent.getGylxxList());
} }
if (!assetCurrent.getJcwlList().isEmpty()) { if (assetCurrent.getJcwlList() != null) {
for (AssetBasicNetwork items : assetCurrent.getJcwlList()) { for (AssetBasicNetwork items : assetCurrent.getJcwlList()) {
items.setAssetId(assetCurrent.getId()); items.setAssetId(assetCurrent.getId());
items.setId(null); items.setId(null);
@ -288,7 +286,7 @@ public class AssetCurrentController extends BaseController {
//新增基础网络 //新增基础网络
assetBasicNetworkService.saveBatch(assetCurrent.getJcwlList()); assetBasicNetworkService.saveBatch(assetCurrent.getJcwlList());
} }
if (!assetCurrent.getOtherConcat().isEmpty()) { if (assetCurrent.getOtherConcat() != null) {
for (UnitOtherConcat items : assetCurrent.getOtherConcat()) { for (UnitOtherConcat items : assetCurrent.getOtherConcat()) {
items.setAssetId(assetCurrent.getId()); items.setAssetId(assetCurrent.getId());
items.setConcatId(null); items.setConcatId(null);
@ -361,7 +359,19 @@ public class AssetCurrentController extends BaseController {
AssetCurrent as = new AssetCurrent(); AssetCurrent as = new AssetCurrent();
//copy新增到新的现有资产表里面 //copy新增到新的现有资产表里面
BeanUtil.copyProperties(items, as); BeanUtil.copyProperties(items, as);
AssetCurrent one = assetCurrentService.lambdaQuery().eq(AssetCurrent::getXtmc, as.getXtmc())
.eq(AssetCurrent::getDwmc, as.getDwmc()).one();
if (one != null) {
as.setId(one.getId());
assetCurrentService.updateById(as);
List<Long> a1 = new ArrayList<>();
a1.add(one.getId());
assetSupplyChainService.deleteIdList(a1);
assetBasicNetworkService.deleteIdList(a1);
} else {
assetCurrentService.save(as); assetCurrentService.save(as);
}
//新增系统建设单位 //新增系统建设单位
AssetSupplyChain s1 = new AssetSupplyChain(); AssetSupplyChain s1 = new AssetSupplyChain();
BeanUtil.copyProperties(items, s1); BeanUtil.copyProperties(items, s1);
@ -416,8 +426,16 @@ public class AssetCurrentController extends BaseController {
AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo(); AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo();
BeanUtil.copyProperties(as, assetCurrentCpPo); BeanUtil.copyProperties(as, assetCurrentCpPo);
assetCurrentCpPo.setTaskId(assetTask.getId()); assetCurrentCpPo.setTaskId(assetTask.getId());
AssetCurrentCpPo two = assetCurrentCpService.lambdaQuery().eq(AssetCurrentCpPo::getXtmc, as.getXtmc())
.eq(AssetCurrentCpPo::getDwmc, as.getDwmc()).one();
if (two != null) {
assetCurrentCpPo.setId(two.getId());
assetCurrentCpService.updateById(assetCurrentCpPo);
assetSupplyChainCpService.deletByAssetIdandTaskId(id,assetTask.getId());
assetBasicNetworkCpService.deletByAssetIdandTaskId(id,assetTask.getId());
} else {
assetCurrentCpService.save(assetCurrentCpPo); assetCurrentCpService.save(assetCurrentCpPo);
}
//新增系统建设单位 //新增系统建设单位
AssetSupplyChainCpPo co1 = new AssetSupplyChainCpPo(); AssetSupplyChainCpPo co1 = new AssetSupplyChainCpPo();
BeanUtil.copyProperties(items, co1); BeanUtil.copyProperties(items, co1);

@ -3,20 +3,19 @@ package com.ruoyi.tc.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.request.UnitRequest;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.request.UnitRequest;
import com.ruoyi.tc.service.ExamineInfoService; import com.ruoyi.tc.service.ExamineInfoService;
import com.ruoyi.tc.service.UnitOtherConcatService; import com.ruoyi.tc.service.UnitOtherConcatService;
import com.ruoyi.tc.service.UnitService; import com.ruoyi.tc.service.UnitService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -24,9 +23,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
/** /**
* (unit) * (unit)
@ -36,7 +33,7 @@ import java.util.Map;
*/ */
@Api(tags = "单位表控制层") @Api(tags = "单位表控制层")
@RestController @RestController
@PreAuthorize("@ss.hasAnyRoles('admin,common')") //@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@RequestMapping("/tc/unit") @RequestMapping("/tc/unit")
public class UnitController { public class UnitController {
@ -52,6 +49,9 @@ public class UnitController {
@Resource @Resource
private ISysUserService iSysUserService; private ISysUserService iSysUserService;
@Resource
private ISysDeptService iSysDeptService;
/** /**
* *
*/ */
@ -70,7 +70,7 @@ public class UnitController {
@ApiOperation(value = "获取所有单位列表", response = Unit.class) @ApiOperation(value = "获取所有单位列表", response = Unit.class)
@GetMapping("/allList") @GetMapping("/allList")
public AjaxResult allList(UnitRequest unit) { public AjaxResult allList(UnitRequest unit) {
return AjaxResult.success(unitService.selectUnitList( unit)); return AjaxResult.success(unitService.selectUnitList(unit));
} }
/** /**
@ -95,12 +95,38 @@ public class UnitController {
public AjaxResult importData(MultipartFile file) throws Exception { public AjaxResult importData(MultipartFile file) throws Exception {
ExcelUtil<Unit> util = new ExcelUtil<>(Unit.class); ExcelUtil<Unit> util = new ExcelUtil<>(Unit.class);
List<Unit> list = util.importExcel(file.getInputStream()); List<Unit> list = util.importExcel(file.getInputStream());
unitService.saveBatch(list); //做组织架构的处理和更新处理
Map<String,String> a1 = new HashMap<>(); List<SysDept> sd = iSysDeptService.selectDeptList(new SysDept());
Set<String> set = new HashSet<>();
for (SysDept i : sd) {
set.add(i.getDeptName());
}
List<Unit> list1 = unitService.list();
for (int i = 0; i < list.size(); i++) {
for (Unit unit : list1) {
if (unit.getNickName().equals(list.get(i).getNickName())
&& unit.getUserName().equals(list.get(i).getUserName())
) {
list.get(i).setId(unit.getId());
}
}
if (set.contains(list.get(i).getDeptName())) {
for (SysDept s : sd) {
if (list.get(i).getDeptName().equals(s.getDeptName())) {
list.get(i).setDeptId(s.getDeptId());
}
}
} else {
throw new ServiceException("第" + i + "行,组织机构名称填写错误!");
}
}
//批量新增或者修改单位
unitService.saveOrUpdateBatch(list);
Map<String, String> a1 = new HashMap<>();
for (Unit x : list) { for (Unit x : list) {
//查询用户表是否存在该用户 //查询用户表是否存在该用户
String s = unitService.validUser(x); String s = unitService.validUser(x);
a1.put(x.getUserName(),s); a1.put(x.getUserName(), s);
} }
return AjaxResult.success(a1); return AjaxResult.success(a1);
} }
@ -117,7 +143,7 @@ public class UnitController {
@ApiOperation(value = "根据用户编号获取详细信息") @ApiOperation(value = "根据用户编号获取详细信息")
@GetMapping("/{id}") @GetMapping("/{id}")
public AjaxResult getInfo(@PathVariable(value = "id") Long id) { public AjaxResult getInfo(@PathVariable(value = "id") Long id) {
System.out.println(SecurityUtils.encryptPassword("TcZc@2024")); // System.out.println(SecurityUtils.encryptPassword("TcZc@2024"));
return AjaxResult.success(unitService.getById(id)); return AjaxResult.success(unitService.getById(id));
} }
@ -135,15 +161,15 @@ public class UnitController {
//新增单位到单位信息表 //新增单位到单位信息表
unitService.save(unit); unitService.save(unit);
//新增其他联系人 //新增其他联系人
if(!unit.getOtherConcat().isEmpty()){ if (unit.getOtherConcat()!=null) {
unit.getOtherConcat().forEach(x->{ unit.getOtherConcat().forEach(x -> {
x.setUnitId(unit.getId()); x.setUnitId(unit.getId());
}); });
unitOtherConcatService.saveBatch(unit.getOtherConcat()); unitOtherConcatService.saveBatch(unit.getOtherConcat());
} }
//新增检查信息 //新增检查信息
if(!unit.getJcxxList().isEmpty()){ if (unit.getJcxxList()!=null) {
unit.getJcxxList().forEach(x->{ unit.getJcxxList().forEach(x -> {
x.setUnitId(unit.getId()); x.setUnitId(unit.getId());
}); });
examineInfoService.saveBatch(unit.getJcxxList()); examineInfoService.saveBatch(unit.getJcxxList());
@ -161,22 +187,24 @@ public class UnitController {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult edit(@Valid @RequestBody Unit x) { public AjaxResult edit(@Valid @RequestBody Unit x) {
Unit byId = unitService.getById(x.getId()); Unit byId = unitService.getById(x.getId());
if(!byId.getUserName().equals(x.getUserName()) || !byId.getNickName().equals(x.getNickName())){ if (!byId.getUserName().equals(x.getUserName()) || !byId.getNickName().equals(x.getNickName())) {
throw new ServiceException("单位名称和社会信用代码不允许修改!"); throw new ServiceException("单位名称和社会信用代码不允许修改!");
} }
unitService.updateById(x); unitService.updateById(x);
//先删除 //先删除
unitOtherConcatService.deleteByUnitIds(x.getId()); unitOtherConcatService.deleteByUnitIds(x.getId());
examineInfoService.deleteByUnitIds(x.getId()); examineInfoService.deleteByUnitIds(x.getId());
if(!x.getOtherConcat().isEmpty()){ unitService.validUser(x);
x.getOtherConcat().forEach(y->{
if (x.getOtherConcat()!=null) {
x.getOtherConcat().forEach(y -> {
y.setUnitId(x.getId()); y.setUnitId(x.getId());
y.setConcatId(null); y.setConcatId(null);
}); });
unitOtherConcatService.saveBatch(x.getOtherConcat()); unitOtherConcatService.saveBatch(x.getOtherConcat());
} }
if(!x.getJcxxList().isEmpty()){ if (x.getJcxxList()!=null) {
x.getJcxxList().forEach(y->{ x.getJcxxList().forEach(y -> {
y.setUnitId(x.getId()); y.setUnitId(x.getId());
y.setJcid(null); y.setJcid(null);
}); });
@ -194,9 +222,9 @@ public class UnitController {
public AjaxResult remove(@PathVariable Long id) { public AjaxResult remove(@PathVariable Long id) {
List<String> userNames = unitService.selectByIds(id); List<String> userNames = unitService.selectByIds(id);
//逻辑删除单位和用户 //逻辑删除单位和用户
if(!userNames.isEmpty()){ if (!userNames.isEmpty()) {
for (String it : userNames) { for (String it : userNames) {
if(it!=null){ if (it != null) {
unitService.deleteUsers(it); unitService.deleteUsers(it);
} }
} }

@ -0,0 +1,134 @@
package com.ruoyi.tc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.tc.baseClass.BaseClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* (asset_app)
*
* @author du
*/
@Data
@ApiModel("资产移动应用程序")
@TableName(value = "asset_app")
public class AssetApp extends BaseClass implements Serializable {
@ApiModelProperty("id")
private Long id;
/**
*
*/
@ApiModelProperty("所属单位")
@Excel(name = "所属单位", sort = 1, width = 24)
private String ssdw;
/**
*
*/
@ApiModelProperty("移动应用名称")
@Excel(name = "移动应用名称", sort = 2, width = 22)
private String appName;
/**
*
*/
@Excel(name = "包名", sort = 3, width = 28)
@ApiModelProperty("包名")
private String pack;
/**
* icp
*/
@Excel(name = "icp备案状态",dictType = "app_icp_state",comboReadDict = true,sort = 4, width = 22)
@ApiModelProperty("icp备案状态字典")
private String icpState;
/**
* icp
*/
@Excel(name = "icp备案号", sort = 5)
@ApiModelProperty("icp备案号")
private String icpbah;
/**
*
*/
@Excel(name = "统一社会信用代码", sort = 6,width = 22)
@ApiModelProperty("统一社会信用代码")
private String tyshxydm;
/**
*
*/
@Excel(name = "文件名", sort = 7,width = 22)
@ApiModelProperty("文件名")
private String wjm;
/**
*
*/
@ApiModelProperty("所属行业(字典)")
@Excel(name = "所属行业",dictType = "app_sshy",comboReadDict = true,sort = 8, width = 18)
private String sshy;
/**
*
*/
@Excel(name = "重点行业",dictType = "app_zdhy",comboReadDict = true,sort = 9, width = 18)
@ApiModelProperty("重点行业(字典)")
private String zdhy;
/**
*
*/
@Excel(name = "行政区划",dictType = "app_xzqh",comboReadDict = true,sort = 10, width = 18)
@ApiModelProperty("行政区划(字典)")
private String xzqh;
/**
*
*/
@Excel(name = "简介",sort = 11, width = 28)
@ApiModelProperty("简介")
private String jj;
/**
*
*/
@Excel(name = "安全加固情况",dictType = "app_aqjgqk",comboReadDict = true,sort = 12, width = 18)
@ApiModelProperty("安全加固情况(字典)")
private String aqjgqk;
/**
*
*/
@Excel(name = "版本信息",sort = 13, width = 20)
@ApiModelProperty("版本信息")
private String bbxx;
/**
*
*/
@Excel(name = "版本信息(版本号)",sort = 14, width = 24)
@ApiModelProperty("版本号")
private String bbh;
/**
* MD5
*/
@Excel(name = "版本信息MD5",sort = 15, width = 28)
@ApiModelProperty("版本信息MD5")
private String bbxxMd5;
/**
*
*/
@Excel(name = "版本信息(上架平台)",sort = 16, width = 24)
@ApiModelProperty("版本信息(上架平台)")
private String bbxxSjpt;
/**
*
*/
@Excel(name = "文件大小",sort = 17, width = 20)
@ApiModelProperty("文件大小")
private String wjdx;
/**
* 0 2
*/
@ApiModelProperty("删除标志0代表存在 2代表删除")
private String delFlag;
}

@ -41,12 +41,6 @@ public class AssetCurrent extends BaseClass implements Serializable {
@Excel(name = "*系统名称",sort = 2,width = 40,required = true) @Excel(name = "*系统名称",sort = 2,width = 40,required = true)
private String xtmc; private String xtmc;
// /**
// * 资产类型
// */
// @ApiModelProperty("资产类型")
// private String zclx;
/** /**
* *
*/ */
@ -128,8 +122,8 @@ public class AssetCurrent extends BaseClass implements Serializable {
/** /**
* ip, * ip,
*/ */
// @Excel(name ="关联资产(多个资产用逗号隔开,例如{\"ipv4\"",sort = 7,width = 60) @Excel(name ="关联资产(多个资产用逗号隔开,例如{\"ipv4\"",sort = 7,width = 60)
@Excel(name ="关联资产(多个资产用逗号隔开,例如\n{\"ipv4\":[\"1.1.1.1:8080\",\"2.2.2.2:8080\"],\"ipv6\":\n[\"fe80::ec3e:9cff:fe25:687b\",\"de71::ec3e:9cff:fe25:687b\"]}",sort = 7,width = 60) // @Excel(name ="关联资产(多个资产用逗号隔开,例如\n{\"ipv4\":[\"1.1.1.1:8080\",\"2.2.2.2:8080\"],\"ipv6\":\n[\"fe80::ec3e:9cff:fe25:687b\",\"de71::ec3e:9cff:fe25:687b\"]}",sort = 7,width = 60)
@Size(max= 500,message="关联ip长度不能超过500") @Size(max= 500,message="关联ip长度不能超过500")
@ApiModelProperty("关联ip多个用,分隔)") @ApiModelProperty("关联ip多个用,分隔)")
private String glIp; private String glIp;
@ -150,8 +144,8 @@ public class AssetCurrent extends BaseClass implements Serializable {
* *
*/ */
//@NotNull //@NotNull
// @Excel(name = "是否关基系统",dictType = "is_no",comboReadDict = true,sort = 10) @Excel(name = "是否关基系统",dictType = "is_no",comboReadDict = true,sort = 10)
@Excel(name = "*是否关基系统",dictType = "is_no",comboReadDict = true,sort = 10) // @Excel(name = "*是否关基系统",dictType = "is_no",comboReadDict = true,sort = 10)
@ApiModelProperty("是否关基系统(字典)") @ApiModelProperty("是否关基系统(字典)")
private String gjxt; private String gjxt;
/** /**
@ -194,8 +188,8 @@ public class AssetCurrent extends BaseClass implements Serializable {
/** /**
* *
*/ */
// @Excel(name = "系统状态",dictType = "zc_xtzt",comboReadDict = true,sort = 36) @Excel(name = "系统状态",dictType = "zc_xtzt",comboReadDict = true,sort = 36)
@Excel(name = "*系统状态",dictType = "zc_xtzt",comboReadDict = true,sort = 36) // @Excel(name = "*系统状态",dictType = "zc_xtzt",comboReadDict = true,sort = 36)
//@NotNull //@NotNull
@ApiModelProperty("系统状态(字典)") @ApiModelProperty("系统状态(字典)")
private String xtzt; private String xtzt;
@ -254,8 +248,8 @@ public class AssetCurrent extends BaseClass implements Serializable {
/** /**
* , * ,
*/ */
// @Excel(width = 60,name = "系统特征(多选,多个特征用逗号隔开。选项为",sort = 52) @Excel(width = 60,name = "系统特征(多选,多个特征用逗号隔开。选项为",sort = 52)
@Excel(width = 60,name = "系统特征多选多个特征用逗号隔开。选项为党政机关门户网站、重点新闻网站大型网络平台系统业务覆盖单个地市级行政区30%以上人口的工作、生活系统业务覆盖10万人以上用水、用电、用气、用油、取暖或交通出行存储超过5万人以上个人敏感信息存储超过100万条以上地理、人口、资源等国家基础数据",sort = 52) // @Excel(width = 60,name = "系统特征多选多个特征用逗号隔开。选项为党政机关门户网站、重点新闻网站大型网络平台系统业务覆盖单个地市级行政区30%以上人口的工作、生活系统业务覆盖10万人以上用水、用电、用气、用油、取暖或交通出行存储超过5万人以上个人敏感信息存储超过100万条以上地理、人口、资源等国家基础数据",sort = 52)
@ApiModelProperty("系统特征(,分隔)") @ApiModelProperty("系统特征(,分隔)")
private String xttz; private String xttz;
/** /**
@ -506,8 +500,8 @@ public class AssetCurrent extends BaseClass implements Serializable {
/** /**
* ICP-ICP * ICP-ICP
*/ */
// @Excel(name = "ICP备案编号",sort = 25,width = 46) @Excel(name = "ICP备案编号",sort = 25,width = 46)
@Excel(name = "ICP备案编号ICP备案状态选择为是则必填",sort = 25,width = 46) // @Excel(name = "ICP备案编号ICP备案状态选择为是则必填",sort = 25,width = 46)
//@NotBlank //@NotBlank
@Size(max= 50,message="ICP备案信息-ICP备案编号长度不能超过50") @Size(max= 50,message="ICP备案信息-ICP备案编号长度不能超过50")
@ApiModelProperty("ICP备案信息-ICP备案编号") @ApiModelProperty("ICP备案信息-ICP备案编号")
@ -693,10 +687,10 @@ public class AssetCurrent extends BaseClass implements Serializable {
/** /**
* - * -
*/ */
// @Excel(name = "是否有第三方测评",width = 45,dictType = "is_no",comboReadDict = true,sort = 45) @Excel(name = "是否有第三方测评",width = 45,dictType = "is_no",comboReadDict = true,sort = 45)
@ApiModelProperty("等保信息-是否有第三方测评") @ApiModelProperty("等保信息-是否有第三方测评")
//@NotNull //@NotNull
@Excel(name = "是否有第三方测评(是否是等保系统选择是则必填)",width = 45,dictType = "is_no",comboReadDict = true,sort = 45) // @Excel(name = "是否有第三方测评(是否是等保系统选择是则必填)",width = 45,dictType = "is_no",comboReadDict = true,sort = 45)
private String dbxxSfydsfcp; private String dbxxSfydsfcp;
@ApiModelProperty("地理位置-省") @ApiModelProperty("地理位置-省")
@ -1045,4 +1039,7 @@ public class AssetCurrent extends BaseClass implements Serializable {
@ApiModelProperty("报废原因") @ApiModelProperty("报废原因")
private String bfyy; private String bfyy;
@ApiModelProperty("不通过原因")
private String btgyy;
} }

@ -0,0 +1,137 @@
package com.ruoyi.tc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.tc.baseClass.BaseClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* (asset_email)
* @author du
* @since 2024/11/13 14:44
*/
@Data
@ApiModel("电子邮件资产表")
@TableName(value = "asset_email")
public class AssetEmail extends BaseClass implements Serializable {
@ApiModelProperty("id")
private Long id;
/**
*
*/
@Excel(name = "所属单位", sort = 1, width = 24)
@ApiModelProperty("所属单位")
private String ssdw;
/**
*
*/
@Excel(name = "电子邮箱后缀", sort = 2, width = 20)
@ApiModelProperty("电子邮箱后缀")
private String dzyxhz;
/**
*
*/
@Excel(name = "建设类型", sort = 3, width = 20,dictType = "email_jslx",comboReadDict = true)
@ApiModelProperty("建设类型(字典)")
private String jslx;
/**
*
*/
@Excel(name = "邮箱系统供应商", sort = 4, width = 24)
@ApiModelProperty("邮箱系统供应商")
private String yjxtgys;
/**
*
*/
@Excel(name = "密码算法", sort = 5, width = 22)
@ApiModelProperty("密码算法")
private String mmsf;
/**
* )
*/
@Excel(name = "邮寄系统状态", sort = 6, width = 20,dictType = "email_state",comboReadDict = true)
@ApiModelProperty("邮寄系统状态(字典)")
private String yjxtzc;
/**
*
*/
@Excel(name = "安全防护系统", sort = 7, dictType = "email_hasorno",comboReadDict = true)
@ApiModelProperty("安全防护系统(字典)")
private String aqfhxt;
/**
* (
*/
@Excel(name = "安全备份环境", sort = 8, dictType = "email_hasorno",comboReadDict = true)
@ApiModelProperty("安全备份环境(字典)")
private String aqbfhj;
/**
*
*/
@Excel(name = "数字证书厂商", sort = 9)
@ApiModelProperty("数字证书厂商")
private String szzscs;
/**
* 线
*/
@Excel(name = "上线时间", sort = 10)
@ApiModelProperty("上线时间")
private String sxsj;
/**
*
*/
@Excel(name = "所属行业",dictType = "app_sshy",comboReadDict = true,sort = 11, width = 18)
@ApiModelProperty("所属行业(字典)")
private String sshy;
/**
*
*/
@Excel(name = "重点行业",dictType = "app_zdhy",comboReadDict = true,sort = 12, width = 18)
@ApiModelProperty("重点行业(字典)")
private String zdhy;
/**
*
*/
@Excel(name = "行政区划",dictType = "app_xzqh",comboReadDict = true,sort = 13, width = 18)
@ApiModelProperty("行政区划(字典)")
private String xzqh;
/**
*
*/
@Excel(name = "简介",sort = 14, width = 28)
@ApiModelProperty("简介")
private String jj;
/**
*
*/
@Excel(name = "系统责任人",sort = 15)
@ApiModelProperty("系统责任人")
private String xtzrr;
/**
*
*/
@Excel(name = "系统责任人电话",sort = 16)
@ApiModelProperty("系统责任人电话")
private String xtzrrdh;
/**
*
*/
@Excel(name = "系统责任人邮箱",sort = 17)
@ApiModelProperty("系统责任人邮箱")
private String xtzrryx;
/**
*
*/
@Excel(name = "系统责任人地址",sort = 18)
@ApiModelProperty("系统责任人地址")
private String xtzrrdz;
@ApiModelProperty("删除标志0代表存在 2代表删除")
private String delFlag;
}

@ -0,0 +1,205 @@
package com.ruoyi.tc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.tc.baseClass.BaseClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
/**
* (asset_mini_programs)
*
* @author du
* @since 2024/11/13 14:44
*/
@Data
@ApiModel("小程序资产表")
@TableName(value = "asset_mini_programs")
public class AssetMiniPrograms extends BaseClass implements Serializable {
/**
*
*/
@ApiModelProperty("id")
private Long id;
/**
*
*/
@Excel(name = "所属单位", sort = 1, width = 22)
@ApiModelProperty("所属单位")
private String ssdw;
/**
*
*/
@Excel(name = "小程序名称", sort = 2, width = 22)
@ApiModelProperty("小程序名称")
private String xcxmc;
/**
* appid
*/
@Excel(name = "APPID", sort = 3, width = 22)
@ApiModelProperty("appid")
private String appId;
/**
*
*/
@Excel(name = "认证主体", sort = 4, width = 26)
@ApiModelProperty("认证主体")
private String rzzt;
/**
*
*/
@Excel(name = "统一社会信用代码", sort = 5)
@ApiModelProperty("统一社会信用代码")
private String tyshxydm;
/**
*
*/
@Excel(name = "小程序包状态", sort = 6,dictType = "email_state",comboReadDict = true)
@ApiModelProperty("小程序状态(字典)")
private String state;
/**
* ID
*/
@Excel(name = "账号原始ID", sort = 6,dictType = "email_state",comboReadDict = true)
@ApiModelProperty("账号原始ID")
private String ysId;
/**
* ()
*/
@Size(max= 10,message="编码长度不能超过10")
@ApiModelProperty("小程序包状态(字典)")
@Length(max= 10,message="编码长度不能超过10")
private String packState;
/**
* (
*/
@Size(max= 10,message="编码长度不能超过10")
@ApiModelProperty("认证状态(字典)")
@Length(max= 10,message="编码长度不能超过10")
private String rzState;
/**
*
*/
@Size(max= 50,message="编码长度不能超过50")
@ApiModelProperty("认证时间")
@Length(max= 50,message="编码长度不能超过50")
private String rzsj;
/**
*
*/
@Size(max= 255,message="编码长度不能超过255")
@ApiModelProperty("认证类型(字典)")
@Length(max= 255,message="编码长度不能超过255")
private String rzlx;
/**
* icp
*/
@Size(max= 100,message="编码长度不能超过100")
@ApiModelProperty("icp备案状态")
@Length(max= 100,message="编码长度不能超过100")
private String icpState;
/**
*
*/
@Size(max= 255,message="编码长度不能超过255")
@ApiModelProperty("域命白名单")
@Length(max= 255,message="编码长度不能超过255")
private String ymbmd;
/**
*
*/
@Size(max= 255,message="编码长度不能超过255")
@ApiModelProperty("服务类目")
@Length(max= 255,message="编码长度不能超过255")
private String fwlm;
/**
*
*/
@Size(max= 100,message="编码长度不能超过100")
@ApiModelProperty("行业电子邮箱")
@Length(max= 100,message="编码长度不能超过100")
private String hydzyx;
/**
*
*/
@Size(max= 10,message="编码长度不能超过10")
@ApiModelProperty("所属行业(字典)")
@Length(max= 10,message="编码长度不能超过10")
private String sshy;
/**
* ()
*/
@Size(max= 10,message="编码长度不能超过10")
@ApiModelProperty("重点行业(字典)")
@Length(max= 10,message="编码长度不能超过10")
private String zdhy;
/**
* )
*/
@Size(max= 10,message="编码长度不能超过10")
@ApiModelProperty("行政区划(字典)")
@Length(max= 10,message="编码长度不能超过10")
private String xzqh;
/**
*
*/
@Size(max= 500,message="编码长度不能超过500")
@ApiModelProperty("系统简介")
@Length(max= 500,message="编码长度不能超过500")
private String xtjj;
/**
*
*/
@Size(max= 50,message="编码长度不能超过50")
@ApiModelProperty("系统责任人")
@Length(max= 50,message="编码长度不能超过50")
private String xtzrr;
/**
*
*/
@Size(max= 50,message="编码长度不能超过50")
@ApiModelProperty("系统责任人电话")
@Length(max= 50,message="编码长度不能超过50")
private String xtzrrdh;
/**
*
*/
@Size(max= 50,message="编码长度不能超过50")
@ApiModelProperty("系统责任人邮箱")
@Length(max= 50,message="编码长度不能超过50")
private String xtzrryx;
/**
*
*/
@Size(max= 255,message="编码长度不能超过255")
@ApiModelProperty("系统责任人地址")
@Length(max= 255,message="编码长度不能超过255")
private String xtzrrdz;
/**
* appid
*/
@Size(max= 255,message="编码长度不能超过255")
@ApiModelProperty("引用插件appid")
@Length(max= 255,message="编码长度不能超过255")
private String yycjAppid;
/**
*
*/
@Size(max= 255,message="编码长度不能超过255")
@ApiModelProperty("引用插件开发者")
@Length(max= 255,message="编码长度不能超过255")
private String yycjKfz;
/**
* 0 2
*/
@ApiModelProperty("删除标志0代表存在 2代表删除")
private String delFlag;
}

@ -0,0 +1,166 @@
package com.ruoyi.tc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.tc.baseClass.BaseClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* (asset_official_account)
*
* @author du
* @since 2024/11/13 14:44
*/
@Data
@ApiModel("公众号资产表")
@TableName(value = "asset_official_account")
public class AssetOfficialAccount extends BaseClass implements Serializable {
@ApiModelProperty("id")
private Long id;
/**
*
*/
@Excel(name = "所属单位", sort = 1, width = 24)
@ApiModelProperty("所属单位")
private String ssdw;
/**
*
*/
@Excel(name = "公众号名称", sort = 2, width = 20)
@ApiModelProperty("公众号名称")
private String gzhmc;
/**
*
*/
@Excel(name = "微信号", sort = 3, width = 22)
@ApiModelProperty("微信号")
private String wxh;
/**
*
*/
@Excel(name = "认证主体", sort = 4, width = 24)
@ApiModelProperty("认证主体")
private String rzzt;
/**
*
*/
@Excel(name = "统一社会信用代码", sort = 5, width = 24)
@ApiModelProperty("统一社会信用代码")
private String tyshxydm;
/**
*
*/
@Excel(name = "公众号状态", sort = 6, dictType = "gzh_state", comboReadDict = true)
@ApiModelProperty("公众号状态(字典)")
private String gzhzt;
/**
* id
*/
@Excel(name = "公众号ID", sort = 7)
@ApiModelProperty("公众号id")
private String gzhId;
/**
*
*/
@Excel(name = "公众号类型", sort = 8, dictType = "gzh_lx", comboReadDict = true)
@ApiModelProperty("公众号类型(字典)")
private String gzhlx;
/**
*
*/
@Excel(name = "公众号类型", sort = 9, dictType = "gzh_rzzt", comboReadDict = true)
@ApiModelProperty("认证状态(字典)")
private String rzState;
/**
*
*/
@Excel(name = "认证时间", sort = 10)
@ApiModelProperty("认证时间")
private String rzsj;
/**
*
*/
@Excel(name = "认证类型", sort = 11, dictType = "gzh_rzlx", comboReadDict = true)
@ApiModelProperty("认证类型(字典)")
private String rzlx;
/**
*
*/
@Excel(name = "所属行业", dictType = "app_sshy", comboReadDict = true, sort = 12, width = 18)
@ApiModelProperty("所属行业(字典)")
private String sshy;
/**
*
*/
@Excel(name = "重点行业", dictType = "app_zdhy", comboReadDict = true, sort = 13, width = 18)
@ApiModelProperty("重点行业(字典)")
private String zdhy;
/**
*
*/
@Excel(name = "行政区划", dictType = "app_xzqh", comboReadDict = true, sort = 14, width = 18)
@ApiModelProperty("行政区划(字典)")
private String xzqh;
/**
*
*/
@Excel(name = "系统简介", sort = 15, width = 26)
@ApiModelProperty("系统简介")
private String xtjj;
/**
*
*/
@Excel(name = "系统责任人", sort = 16)
@ApiModelProperty("系统责任人")
private String xtzrr;
/**
*
*/
@Excel(name = "系统责任人电话", sort = 17)
@ApiModelProperty("系统责任人电话")
private String xtzrrdh;
/**
*
*/
@Excel(name = "系统责任人邮箱", sort = 18)
@ApiModelProperty("系统责任人邮箱")
private String xtzrryx;
/**
*
*/
@Excel(name = "系统责任人地址", sort = 19)
@ApiModelProperty("系统责任人地址")
private String xtzrrdz;
/**
*
*/
@Excel(name = "菜单信息(菜单名称)", sort = 20)
@ApiModelProperty("菜单名称")
private String cdmc;
/**
*
*/
@Excel(name = "菜单信息(菜单链接)", sort = 21,width = 28)
@ApiModelProperty("菜单链接")
private String cdlj;
/**
*
*/
@Excel(name = "菜单信息(菜单类型)", sort = 22, dictType = "gzh_cdlx", comboReadDict = true)
@ApiModelProperty("菜单类型")
private String cdlx;
/**
* 0 2
*/
@ApiModelProperty("删除标志0代表存在 2代表删除")
private String delFlag;
}

@ -11,6 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -29,11 +30,26 @@ public class Unit implements Serializable {
@TableId(type = IdType.AUTO,value = "id") @TableId(type = IdType.AUTO,value = "id")
private Long id; private Long id;
@NotBlank @NotBlank
@ApiModelProperty("单位名称/用户昵称") @ApiModelProperty("单位名称/用户昵称")
@Excel(name = "单位名称*",required = true) @Excel(name = "单位名称*",required = true)
private String nickName; private String nickName;
@NotNull
@ApiModelProperty("组织机构部门id")
private Long deptId;
@ApiModelProperty("组织机构名称(部门名称)")
@Excel(name = "组织机构名称*",required = true)
@TableField(exist = false)
private String deptName;
@ApiModelProperty("组织机构名称加上父级deptId部门名称,返回体")
@TableField(exist = false)
private String ancestors;
@ApiModelProperty("单位简称") @ApiModelProperty("单位简称")
@Excel(name = "单位简称") @Excel(name = "单位简称")
private String dwjc; private String dwjc;

@ -174,6 +174,7 @@ public class AssetCurrentCpPo extends BaseClass implements Serializable {
@ApiModelProperty("使用人") @ApiModelProperty("使用人")
@TableField(exist = false)
private String syr; private String syr;
/** /**
* C- * C-

@ -15,6 +15,9 @@ public class UnitRequest {
// @ApiModelProperty("1 查询已有资产的单位") // @ApiModelProperty("1 查询已有资产的单位")
// private String isSearch; // private String isSearch;
@ApiModelProperty("组织机构代码")
private Long deptId;
@ApiModelProperty("统一社会信用代码") @ApiModelProperty("统一社会信用代码")
private String userName; private String userName;

@ -35,6 +35,7 @@ public class AssetCurrentServiceImpl extends ServiceImpl<AssetCurrentMapper, Ass
@Resource @Resource
private UnitOtherConcatService unitOtherConcatService; private UnitOtherConcatService unitOtherConcatService;
/** /**
* *
* *
@ -44,7 +45,7 @@ public class AssetCurrentServiceImpl extends ServiceImpl<AssetCurrentMapper, Ass
*/ */
@Override @Override
public Page<AssetCurrent> page(Page<AssetCurrent> page, AssetCurrentPageRequest as) { public Page<AssetCurrent> page(Page<AssetCurrent> page, AssetCurrentPageRequest as) {
return baseMapper.page(page,as); return baseMapper.page(page, as);
} }
/** /**
@ -67,19 +68,19 @@ public class AssetCurrentServiceImpl extends ServiceImpl<AssetCurrentMapper, Ass
@Override @Override
public AssetCurrent selectOne(Serializable id) { public AssetCurrent selectOne(Serializable id) {
AssetCurrent byId = getById(id); AssetCurrent byId = getById(id);
byId.setGylxxList(assetSupplyChainService.lambdaQuery().eq(AssetSupplyChain::getAssetId,id).eq(AssetSupplyChain::getDelFlag,"0").list()); byId.setGylxxList(assetSupplyChainService.lambdaQuery().eq(AssetSupplyChain::getAssetId, id).eq(AssetSupplyChain::getDelFlag, "0").list());
byId.setJcwlList(assetBasicNetworkService.lambdaQuery().eq(AssetBasicNetwork::getAssetId,id).eq(AssetBasicNetwork::getDelFlag,"0").list()); byId.setJcwlList(assetBasicNetworkService.lambdaQuery().eq(AssetBasicNetwork::getAssetId, id).eq(AssetBasicNetwork::getDelFlag, "0").list());
byId.setXjgywxt(assetBusinessFormService.lambdaQuery().eq(AssetBusinessForm::getAssetId,id).eq(AssetBusinessForm::getDelFlag,"0").one()); byId.setXjgywxt(assetBusinessFormService.lambdaQuery().eq(AssetBusinessForm::getAssetId, id).eq(AssetBusinessForm::getDelFlag, "0").one());
byId.setOtherConcat(unitOtherConcatService.lambdaQuery().eq(UnitOtherConcat::getAssetId,id).eq(UnitOtherConcat::getDelFlag,"0").list()); byId.setOtherConcat(unitOtherConcatService.lambdaQuery().eq(UnitOtherConcat::getAssetId, id).eq(UnitOtherConcat::getDelFlag, "0").list());
List<Acomma> a1 = new ArrayList<>(); List<Acomma> a1 = new ArrayList<>();
Arrays.asList(byId.getGlym().split(",")).forEach(x->{ Arrays.asList(byId.getGlym().split(",")).forEach(x -> {
Acomma acomma = new Acomma(); Acomma acomma = new Acomma();
acomma.setKey(x); acomma.setKey(x);
a1.add(acomma); a1.add(acomma);
}); });
byId.setGlymList(a1); byId.setGlymList(a1);
List<Acomma> a2 = new ArrayList<>(); List<Acomma> a2 = new ArrayList<>();
Arrays.asList(byId.getGlIp().split(",")).forEach(x->{ Arrays.asList(byId.getGlIp().split(",")).forEach(x -> {
Acomma acomma = new Acomma(); Acomma acomma = new Acomma();
acomma.setKey(x); acomma.setKey(x);
a2.add(acomma); a2.add(acomma);

@ -65,17 +65,23 @@ public class UnitServiceImpl extends ServiceImpl<UnitMapper, Unit> implements Un
*/ */
@Override @Override
public String validUser(Unit x) { public String validUser(Unit x) {
if (x.getUserName() != null) { if (x.getUserName() != null && x.getNickName() != null) {
String password = PasswordGenerator.password(); String password = PasswordGenerator.password();
SysUser user = new SysUser(); SysUser user = new SysUser();
user.setUserName(x.getUserName()); user.setUserName(x.getUserName());
user.setPassword(SecurityUtils.encryptPassword(password)); user.setPassword(SecurityUtils.encryptPassword(password));
user.setNickName(x.getNickName()); user.setNickName(x.getNickName());
user.setDeptId(x.getDeptId());
SysUser u = userService.selectUserByUserName(x.getUserName()); SysUser u = userService.selectUserByUserName(x.getUserName());
//如果存在用户就做修改
//不存在用户就做新增
if (StringUtils.isNull(u)) { if (StringUtils.isNull(u)) {
userService.insertUser(user); userService.insertUser(user);
Long[] roles = new Long[]{100L}; Long[] roles = new Long[]{100L};
userService.insertUserAuth(user.getUserId(), roles); userService.insertUserAuth(user.getUserId(), roles);
} else {
u.setDeptId(x.getDeptId());
userService.updateUserProfile(u);
} }
return password; return password;
} else { } else {

@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<id property="id" column="id" /> <id property="id" column="id" />
<result property="userName" column="user_name"/> <result property="userName" column="user_name"/>
<result property="nickName" column="nick_name"/> <result property="nickName" column="nick_name"/>
<result property="deptId" column="dept_id"/>
<result property="dwjc" column="dwjc"/> <result property="dwjc" column="dwjc"/>
<result property="ssqyprovince" column="ssqyprovince"/> <result property="ssqyprovince" column="ssqyprovince"/>
<result property="ssqycity" column="ssqycity"/> <result property="ssqycity" column="ssqycity"/>
@ -84,9 +85,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<select id="selectUnitList" parameterType="unit" resultMap="unitResult"> <select id="selectUnitList" parameterType="unit" resultMap="unitResult">
select a.* from unit_info a select a.*,d.dept_name as deptName from unit_info a
left join sys_dept d on a.dept_id = d.dept_id
<where> <where>
a.del_flag = '0' a.del_flag = '0' and d.del_flag = '0'
<if test="req.nickName != null and req.nickName != '' "> <if test="req.nickName != null and req.nickName != '' ">
and a.nick_name like concat('%',#{req.nickName},'%') and a.nick_name like concat('%',#{req.nickName},'%')
</if> </if>
@ -96,13 +98,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="req.userName != null and req.userName != '' "> <if test="req.userName != null and req.userName != '' ">
and a.user_name like concat('%',#{req.userName},'%') and a.user_name like concat('%',#{req.userName},'%')
</if> </if>
<if test="req.deptId != null ">
AND (a.dept_id = #{req.deptId} OR a.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{req.deptId}, ancestors) ))
</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
<select id="getById" parameterType="unit" resultMap="unitResult"> <select id="getById" parameterType="unit">
select a.*,c.*,e.* from unit_info a select a.*,c.*,e.*,d.dept_name as deptName,
IF(d.ancestors != 0,concat(d.ancestors,',',d.dept_id),d.dept_id)
as ancestors from unit_info a
left join unit_other_contact c on a.id = c.unit_id left join unit_other_contact c on a.id = c.unit_id
left join unit_examine_info e on a.id = e.unit_id left join unit_examine_info e on a.id = e.unit_id
left join sys_dept d on a.dept_id = d.dept_id
where id = #{id} where id = #{id}
</select> </select>

Loading…
Cancel
Save