From aa9ad12c7d6da9f2118cf8c9daf5d9bad3b1ff1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Sat, 17 Feb 2024 14:19:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/statistics/statisticsProject/index.vue | 2 +- .../service/impl/SmzSspProblemmodifyServiceImpl.java | 12 +++++++++++- .../mapper/trouble/SmzSspProblemmodifyMapper.xml | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/statistics/statisticsProject/index.vue b/ruoyi-ui/src/views/statistics/statisticsProject/index.vue index a76763fe..54f43a2e 100644 --- a/ruoyi-ui/src/views/statistics/statisticsProject/index.vue +++ b/ruoyi-ui/src/views/statistics/statisticsProject/index.vue @@ -178,7 +178,7 @@ 未开通 - + diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/trouble/service/impl/SmzSspProblemmodifyServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/trouble/service/impl/SmzSspProblemmodifyServiceImpl.java index 86f1e3c7..de6db163 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/trouble/service/impl/SmzSspProblemmodifyServiceImpl.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/trouble/service/impl/SmzSspProblemmodifyServiceImpl.java @@ -9,7 +9,9 @@ import com.ruoyi.common.enums.PublicStateEnum; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.mapper.SysDeptMapper; +import com.yanzhu.jh.project.domain.SurProject; import com.yanzhu.jh.project.domain.SurProjectUserinfo; +import com.yanzhu.jh.project.mapper.SurProjectMapper; import com.yanzhu.jh.project.mapper.SurProjectUserinfoMapper; import com.yanzhu.jh.trouble.domain.SmzSspAuditinfo; import com.yanzhu.jh.trouble.domain.SmzSspFileinfo; @@ -34,6 +36,9 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi @Autowired private SysDeptMapper deptMapper; + @Autowired + private SurProjectMapper surProjectMapper; + @Autowired private SmzSspAuditinfoMapper smzSspAuditinfoMapper; @@ -118,7 +123,11 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi if(smzSspProblemmodify.getSmarkUrl()!=null){ smzSspProblemmodify.setMarksPicture(smzSspProblemmodify.getSmarkUrl().split(",")[0]); } - smzSspProblemmodify.setCreateTime(DateUtils.getNowDate()); + //兼容项目名称为空的异常... + if(StringUtils.isEmpty(smzSspProblemmodify.getProblemArea())){ + SurProject surProject = surProjectMapper.selectSurProjectById(smzSspProblemmodify.getProjectId()); + smzSspProblemmodify.setProblemArea(surProject.getProjectName()); + } SysDept sysDept = deptMapper.selectDeptByUserName(smzSspProblemmodify.getCreateUser()); //当前角色时管理员时,修改角色为集团公司 String roleType = ""; @@ -152,6 +161,7 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi roleType = DeptTypeEnum.FBDWTYPE.getCode(); } smzSspProblemmodify.setRoleType(Convert.toInt(roleType)); + smzSspProblemmodify.setCreateTime(DateUtils.getNowDate()); smzSspProblemmodifyMapper.insertSmzSspProblemmodify(smzSspProblemmodify); SmzSspAuditinfo smzSspAuditinfo = new SmzSspAuditinfo(); smzSspAuditinfo.setMainId(smzSspProblemmodify.getId()); diff --git a/yanzhu-jh/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml b/yanzhu-jh/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml index 98d116a0..b76b5655 100644 --- a/yanzhu-jh/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml @@ -610,8 +610,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"