Compare commits

..

No commits in common. '0a8be55162203947da3a078a0ceed8e3a846661b' and 'ac4db0939e50a9ddb08f64c04e1f940c9b849e0c' have entirely different histories.

@ -156,10 +156,9 @@ public class AssetAppController extends BaseController {
//如果有任务也修改任务这边
AssetAppJyPo one = assetAppJyService.lambdaQuery()
.isNotNull(AssetAppJyPo::getTaskId)
.ne(AssetAppJyPo::getStatus, 5)
.eq(AssetAppJyPo::getStatus,"1")
.eq(AssetAppJyPo::getAssetId, byId.getAssetId()).one();
if(one!=null){
Integer status = one.getStatus();
Integer taskId = one.getTaskId();
Long appId = one.getAppId();
BeanUtil.copyProperties(byId, one);
@ -167,7 +166,6 @@ public class AssetAppController extends BaseController {
one.setTaskId(taskId);
one.setAuditState(null);
one.setAuditYy(null);
one.setStatus(status);
assetAppJyService.updateById(one);
}
}

@ -144,11 +144,6 @@ public class AssetCurrentController extends BaseController {
@PreAuthorize("@ss.hasAnyRoles('admin,common')")
@Transactional(rollbackFor = Exception.class)
public AjaxResult insert(@RequestBody @Valid AssetCurrent assetCurrent) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetCurrent.getDwmc())
.eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException("请选择已有单位!");
}
StringBuilder a = new StringBuilder();
if (assetCurrent.getGlymList() != null) {
assetCurrent.getGlymList().forEach(x -> {
@ -447,18 +442,16 @@ public class AssetCurrentController extends BaseController {
//如果有任务也修改任务这边
AssetCurrentCpPo one = assetCurrentCpService.lambdaQuery()
.isNotNull(AssetCurrentCpPo::getTaskId)
.ne(AssetCurrentCpPo::getStatus, 5)
.eq(AssetCurrentCpPo::getStatus,"1")
.eq(AssetCurrentCpPo::getId, byId.getId()).one();
if(one!=null){
Integer taskId = one.getTaskId();
Long appId = one.getCurrentId();
Integer status = one.getStatus();
BeanUtil.copyProperties(byId, one);
one.setCurrentId(appId);
one.setTaskId(taskId);
one.setAuditState(null);
one.setAuditYy(null);
one.setStatus(status);
assetCurrentCpService.updateById(one);
QueryWrapper<AssetSupplyChainCpPo> queryWrapper2 = new QueryWrapper<>();
@ -568,20 +561,18 @@ public class AssetCurrentController extends BaseController {
Integer i = unitService.selectTaskId(assetCurrent.getDwmc(), "0");
if(i!=null){
QueryWrapper<AssetCurrentCpPo> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("id", assetCurrent.getId());
queryWrapper1.eq("status","1");
queryWrapper1.eq("task_id",i);
queryWrapper1.ne("status", 5);
AssetCurrentCpPo x = assetCurrentCpService.getOne(queryWrapper1);
assetCurrentCpService.remove(queryWrapper1);
Integer status = x.getStatus();
Long currentId = x.getCurrentId();
AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo();
BeanUtil.copyProperties(assetCurrent, assetCurrentCpPo);
assetCurrentCpPo.setTaskId(i);
assetCurrentCpPo.setCurrentId(currentId);
assetCurrentCpPo.setStatus(status);
assetCurrentCpService.updateById(assetCurrentCpPo);
assetCurrentCpPo.setStatus(1);
assetCurrentCpService.save(assetCurrentCpPo);
QueryWrapper<AssetSupplyChainCpPo> queryWrapper2 = new QueryWrapper<>();
queryWrapper2.eq("asset_id", assetCurrent.getId());
@ -629,6 +620,7 @@ public class AssetCurrentController extends BaseController {
//新增其他联系人
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
}
}
return success();
}
@ -709,9 +701,7 @@ public class AssetCurrentController extends BaseController {
//读取所有的字段
ExcelUtil<AssetExport> util = new ExcelUtil<>(AssetExport.class);
List<AssetExport> proList = util.importExcel(file.getInputStream());
int j = 0;
for (AssetExport items : proList) {
j++;
AssetCurrent as = new AssetCurrent();
//copy新增到新的现有资产表里面
BeanUtil.copyProperties(items, as);
@ -725,11 +715,6 @@ public class AssetCurrentController extends BaseController {
assetSupplyChainService.deleteIdList(a1);
assetBasicNetworkService.deleteIdList(a1);
} else {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, items.getDwmc())
.eq(Unit::getDelFlag, 0).list();
if (list == null || list.isEmpty()) {
throw new ServiceException(j + "行单位未入库!");
}
assetCurrentService.save(as);
}

@ -150,10 +150,9 @@ public class AssetEmailController extends BaseController {
//如果有任务也修改任务这边
AssetEmailJyPo one = assetEmailJyService.lambdaQuery()
.isNotNull(AssetEmailJyPo::getTaskId)
.ne(AssetEmailJyPo::getStatus, 5)
.eq(AssetEmailJyPo::getStatus,"1")
.eq(AssetEmailJyPo::getAssetId, byId.getAssetId()).one();
if(one!=null){
Integer status = one.getStatus();
Integer taskId = one.getTaskId();
Long appId = one.getEmailId();
BeanUtil.copyProperties(byId, one);
@ -161,7 +160,6 @@ public class AssetEmailController extends BaseController {
one.setTaskId(taskId);
one.setAuditState(null);
one.setAuditYy(null);
one.setStatus(status);
assetEmailJyService.updateById(one);
}
}

@ -13,7 +13,6 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tc.entity.AssetEmail;
import com.ruoyi.tc.entity.AssetMiniPrograms;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetAppJyPo;
import com.ruoyi.tc.entity.po.AssetEmailJyPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo;
import com.ruoyi.tc.entity.request.AssetAuditPageRequest;
@ -153,18 +152,16 @@ public class AssetMiniProgramsController extends BaseController {
//如果有任务也修改任务这边
AssetMiniProgramsJyPo one = assetMiniProgramsJyService.lambdaQuery()
.isNotNull(AssetMiniProgramsJyPo::getTaskId)
.ne(AssetMiniProgramsJyPo::getStatus, 5)
.eq(AssetMiniProgramsJyPo::getStatus,"1")
.eq(AssetMiniProgramsJyPo::getAssetId, byId.getAssetId()).one();
if(one!=null){
Integer taskId = one.getTaskId();
Long appId = one.getMiniId();
Integer status = one.getStatus();
BeanUtil.copyProperties(byId, one);
one.setMiniId(appId);
one.setTaskId(taskId);
one.setAuditState(null);
one.setAuditYy(null);
one.setStatus(status);
assetMiniProgramsJyService.updateById(one);
}
}

@ -166,10 +166,9 @@ public class AssetOfficialAccountController {
//如果有任务也修改任务这边
AssetOfficialAccountJyPo one = assetOfficialAccountJyService.lambdaQuery()
.isNotNull(AssetOfficialAccountJyPo::getTaskId)
.ne(AssetOfficialAccountJyPo::getStatus, 5)
.eq(AssetOfficialAccountJyPo::getStatus,"1")
.eq(AssetOfficialAccountJyPo::getAssetId, byId.getAssetId()).one();
if(one!=null){
Integer status = one.getStatus();
Integer taskId = one.getTaskId();
Long appId = one.getAccountId();
BeanUtil.copyProperties(byId, one);
@ -177,7 +176,6 @@ public class AssetOfficialAccountController {
one.setTaskId(taskId);
one.setAuditState(null);
one.setAuditYy(null);
one.setStatus(status);
assetOfficialAccountJyService.updateById(one);
}
}

@ -4,9 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.tc.entity.AssetApp;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetAppJyPo;
import com.ruoyi.tc.entity.po.AssetEmailCpPo;
@ -89,11 +87,6 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
*/
@Override
public Boolean add(AssetApp assetApp) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetApp.getSsdw())
.eq(Unit::getDelFlag, 0).list();
if(list==null || list.isEmpty()){
throw new ServiceException("请选择已有单位!");
}
save(assetApp);
AssetAppCpPo a = new AssetAppCpPo();
BeanUtil.copyProperties(assetApp, a);
@ -118,18 +111,14 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
updateById(assetApp);
AssetAppCpPo one = assetAppCpService.lambdaQuery()
.eq(AssetAppCpPo::getAssetId, assetApp.getId())
.ne(AssetAppCpPo::getStatus, 5)
.eq(AssetAppCpPo::getStatus,"1")
.isNotNull(AssetAppCpPo::getTaskId)
.one();
if (one != null) {
Integer status = one.getStatus();
Integer taskId = one.getTaskId();
Long appId = one.getAppId();
BeanUtil.copyProperties(assetApp, one);
one.setStatus(status);
one.setTaskId(taskId);
one.setTaskId(unitService.selectTaskId(assetApp.getSsdw(), "4"));
one.setAssetId(assetApp.getId());
one.setAppId(appId);
one.setStatus(0);
return assetAppCpService.updateById(one);
}else {
return true;

@ -4,9 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.tc.entity.AssetEmail;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetEmailCpPo;
import com.ruoyi.tc.entity.po.AssetEmailJyPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsCpPo;
@ -89,11 +87,6 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
*/
@Override
public Boolean add(AssetEmail assetEmail) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetEmail.getSsdw())
.eq(Unit::getDelFlag, 0).list();
if(list==null || list.isEmpty()){
throw new ServiceException("请选择已有单位!");
}
save(assetEmail);
AssetEmailCpPo a = new AssetEmailCpPo();
BeanUtil.copyProperties(assetEmail, a);
@ -117,17 +110,13 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
updateById(assetEmail);
AssetEmailCpPo one = assetEmailCpService.lambdaQuery()
.eq(AssetEmailCpPo::getAssetId, assetEmail.getId())
.ne(AssetEmailCpPo::getStatus, 5)
.eq(AssetEmailCpPo::getStatus,"1")
.isNotNull(AssetEmailCpPo::getTaskId).one();
if (one != null) {
Integer status = one.getStatus();
Integer taskId = one.getTaskId();
Long appId = one.getEmailId();
BeanUtil.copyProperties(assetEmail, one);
one.setStatus(status);
one.setTaskId(taskId);
one.setTaskId(unitService.selectTaskId(assetEmail.getSsdw(), "3"));
one.setAssetId(assetEmail.getId());
one.setEmailId(appId);
one.setStatus(0);
return assetEmailCpService.updateById(one);
}else {
return true;

@ -4,10 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.tc.entity.AssetMiniPrograms;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsCpPo;
import com.ruoyi.tc.entity.po.AssetMiniProgramsJyPo;
import com.ruoyi.tc.entity.request.AssetMiniProgramsPageRequest;
@ -82,11 +79,6 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
*/
@Override
public Boolean add(AssetMiniPrograms assetMiniPrograms) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetMiniPrograms.getSsdw())
.eq(Unit::getDelFlag, 0).list();
if(list==null || list.isEmpty()){
throw new ServiceException("请选择已有单位!");
}
save(assetMiniPrograms);
AssetMiniProgramsCpPo assetMiniProgramsCpPo = new AssetMiniProgramsCpPo();
BeanUtil.copyProperties(assetMiniPrograms,assetMiniProgramsCpPo);
@ -110,17 +102,13 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
updateById(assetMiniPrograms);
AssetMiniProgramsCpPo one = assetMiniProgramsCpService.lambdaQuery()
.eq(AssetMiniProgramsCpPo::getAssetId, assetMiniPrograms.getId())
.ne(AssetMiniProgramsCpPo::getStatus, 5)
.eq(AssetMiniProgramsCpPo::getStatus,"1")
.isNotNull(AssetMiniProgramsCpPo::getTaskId).one();
if (one!=null){
Integer status = one.getStatus();
Integer taskId = one.getTaskId();
Long miniId = one.getMiniId();
BeanUtil.copyProperties(assetMiniPrograms,one);
one.setTaskId(taskId);
one.setTaskId(unitService.selectTaskId(assetMiniPrograms.getSsdw(),"1"));
one.setAssetId(assetMiniPrograms.getId());
one.setStatus(status);
one.setMiniId(miniId);
one.setStatus(0);
return assetMiniProgramsCpService.updateById(one);
}else{
return true;

@ -4,10 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.tc.entity.AssetOfficialAccount;
import com.ruoyi.tc.entity.Unit;
import com.ruoyi.tc.entity.po.AssetAppCpPo;
import com.ruoyi.tc.entity.po.AssetEmailCpPo;
import com.ruoyi.tc.entity.po.AssetOfficialAccountCpPo;
import com.ruoyi.tc.entity.po.AssetOfficialAccountJyPo;
@ -86,11 +83,6 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
*/
@Override
public Boolean add(AssetOfficialAccount assetOfficialAccount) {
List<Unit> list = unitService.lambdaQuery().eq(Unit::getNickName, assetOfficialAccount.getSsdw())
.eq(Unit::getDelFlag, 0).list();
if(list==null || list.isEmpty()){
throw new ServiceException("请选择已有单位!");
}
save(assetOfficialAccount);
AssetOfficialAccountCpPo a = new AssetOfficialAccountCpPo();
BeanUtil.copyProperties(assetOfficialAccount, a);
@ -114,18 +106,14 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
updateById(assetOfficialAccount);
AssetOfficialAccountCpPo one = assetOfficialAccountCpService.lambdaQuery()
.eq(AssetOfficialAccountCpPo::getAssetId, assetOfficialAccount.getId())
.ne(AssetOfficialAccountCpPo::getStatus, 5)
.eq(AssetOfficialAccountCpPo::getStatus,"1")
.isNotNull(AssetOfficialAccountCpPo::getTaskId)
.one();
if (one != null) {
Integer status = one.getStatus();
Integer taskId = one.getTaskId();
Long appId = one.getAccountId();
BeanUtil.copyProperties(assetOfficialAccount, one);
one.setTaskId(taskId);
one.setTaskId(unitService.selectTaskId(assetOfficialAccount.getSsdw(), "2"));
one.setAssetId(assetOfficialAccount.getId());
one.setStatus(status);
one.setAccountId(appId);
one.setStatus(0);
return assetOfficialAccountCpService.updateById(one);
}else {
return true;

Loading…
Cancel
Save