bug修改
This commit is contained in:
parent
f459e21f05
commit
96b495dc43
@ -1284,11 +1284,6 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isSubProject() {
|
||||
UserInfo user = SecurityUtils.getUser();
|
||||
return Objects.equals(user.getAccountType(), 6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SystemUser> getSystemUserList(Map<String, Object> map) {
|
||||
@ -1511,6 +1506,12 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSubProject() {
|
||||
UserInfo user = SecurityUtils.getUser();
|
||||
return Objects.equals(user.getAccountType(), 6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupplier() {
|
||||
UserInfo user = SecurityUtils.getUser();
|
||||
|
||||
@ -103,18 +103,10 @@ public class ProjectEnterpriseController {
|
||||
@ApiImplicitParam(name = "id", value = "项目劳务公司关联ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<ProjectEnterprise> delete(@RequestBody Map<String,Object> map) {
|
||||
Result<ProjectEnterprise> result = new Result<ProjectEnterprise>();
|
||||
ProjectEnterprise projectEnterprise = projectEnterpriseService.getById(MapUtils.getString(map,"id"));
|
||||
if(projectEnterprise==null) {
|
||||
result.error500(MessageUtil.get("notFindErr"));
|
||||
}else {
|
||||
boolean ok = projectEnterpriseService.removeById(MapUtils.getString(map,"id"));
|
||||
if(ok) {
|
||||
result.successMsg(MessageUtil.get("deleteSucess"));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
String id = MapUtils.getString(map, "id");
|
||||
projectEnterpriseService.delete(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
@ -126,15 +118,8 @@ public class ProjectEnterpriseController {
|
||||
@ApiImplicitParam(name = "ids", value = "项目劳务公司关联ID字符串", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<ProjectEnterprise> deleteBatch(@RequestBody Map<String,Object> map) {
|
||||
Result<ProjectEnterprise> result = new Result<ProjectEnterprise>();
|
||||
String ids=MapUtils.getString(map,"ids");
|
||||
if(ids==null || "".equals(ids.trim())) {
|
||||
result.error500(MessageUtil.get("parameterErr"));
|
||||
}else {
|
||||
this.projectEnterpriseService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
result.successMsg(MessageUtil.get("deleteSucess"));
|
||||
}
|
||||
return result;
|
||||
projectEnterpriseService.deleteBatch(map);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -22,7 +22,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
@ApiModel(value="ProjectEnterprise实体类",description="ProjectEnterprise")
|
||||
public class ProjectEnterprise implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**项目-企业关联表*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="项目-企业关联表")
|
||||
@ -39,13 +39,11 @@ public class ProjectEnterprise implements Serializable {
|
||||
/**企业类型*/
|
||||
@Excel(name = "企业类型", width = 15)
|
||||
@ApiModelProperty(value="企业类型")
|
||||
|
||||
private java.lang.Long enterpriseTypeId ;
|
||||
|
||||
/**父级企业ID*/
|
||||
@Excel(name = "父级企业ID", width = 15)
|
||||
@ApiModelProperty(value="父级企业ID")
|
||||
|
||||
private java.lang.Long parentEnterpriseId ;
|
||||
|
||||
@Excel(name = "类型,1项目,2企业", width = 15)
|
||||
@ -57,14 +55,19 @@ public class ProjectEnterprise implements Serializable {
|
||||
private java.lang.String projectDirectorName ;
|
||||
|
||||
@Excel(name = "项目负责人电话", width = 15)
|
||||
@ApiModelProperty(value="项目负责人电话")
|
||||
private java.lang.String projectDirectorPhone ;
|
||||
@ApiModelProperty(value = "项目负责人电话")
|
||||
private java.lang.String projectDirectorPhone;
|
||||
|
||||
/**排序*/
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Excel(name = "排序", width = 15)
|
||||
@ApiModelProperty(value="排序")
|
||||
private java.lang.Integer sortNum ;
|
||||
@ApiModelProperty(value = "排序")
|
||||
private java.lang.Integer sortNum;
|
||||
|
||||
@ApiModelProperty(value="是否是项目部公司,1否,2是")
|
||||
private java.lang.Integer departmentType ;
|
||||
@ApiModelProperty(value = "是否是项目部公司,1否,2是")
|
||||
private java.lang.Integer departmentType;
|
||||
|
||||
@ApiModelProperty(value = "祖级列表")
|
||||
private java.lang.String ancestors;
|
||||
}
|
||||
|
||||
@ -33,4 +33,7 @@ public interface ProjectEnterpriseMapper extends BaseMapper<ProjectEnterprise> {
|
||||
void updateEnterpriseType(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> selectExternalEnterpriseList(Map<String, Object> map);
|
||||
|
||||
void updateAncestors(@Param("oldAncestor") String oldAncestor, @Param("newAncestor") String newAncestor, @Param("projectSn") String projectSn, @Param("id") Long id);
|
||||
|
||||
}
|
||||
|
||||
@ -102,4 +102,10 @@
|
||||
and a.social_code = #{socialCode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateAncestors">
|
||||
UPDATE project_enterprise
|
||||
SET ancestors=REPLACE(ancestors, #{oldAncestor}, #{newAncestor})
|
||||
WHERE ancestors LIKE N'${oldAncestor},${id}%' and project_sn = #{projectSn}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@ -30,4 +30,9 @@ public interface IProjectEnterpriseService extends IService<ProjectEnterprise> {
|
||||
Map<String, Object> bindProjectCompany(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> selectExternalEnterpriseList(Map<String, Object> map);
|
||||
|
||||
void delete(String id);
|
||||
|
||||
void deleteBatch(Map<String, Object> map);
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.project.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -24,10 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@ -81,16 +79,48 @@ public class ProjectEnterpriseServiceImpl extends ServiceImpl<ProjectEnterpriseM
|
||||
if (count > 0) {
|
||||
throw new OpenAlertException(MessageUtil.get("existsEnterpriseErr"));
|
||||
}
|
||||
|
||||
boolean top = projectEnterprise.getParentEnterpriseId() == null || projectEnterprise.getParentEnterpriseId() == 0;
|
||||
if (top) {
|
||||
projectEnterprise.setParentEnterpriseId(0L);
|
||||
projectEnterprise.setAncestors("0");
|
||||
} else {
|
||||
ProjectEnterprise pOrg = projectEnterpriseMapper.selectOne(new LambdaQueryWrapper<ProjectEnterprise>()
|
||||
.eq(ProjectEnterprise::getId, projectEnterprise.getParentEnterpriseId()));
|
||||
if (pOrg == null) {
|
||||
throw new OpenAlertException("上级不存在");
|
||||
}
|
||||
projectEnterprise.setAncestors(pOrg.getAncestors() + "," + pOrg.getId());
|
||||
}
|
||||
projectEnterpriseMapper.insert(projectEnterprise);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editProjectEnterprise(ProjectEnterprise projectEnterprise) {
|
||||
ProjectEnterprise projectEnterpriseEntity = projectEnterpriseMapper.selectById(projectEnterprise.getId());
|
||||
if (projectEnterpriseEntity == null) {
|
||||
ProjectEnterprise oldPo = projectEnterpriseMapper.selectById(projectEnterprise.getId());
|
||||
if (oldPo == null) {
|
||||
throw new OpenAlertException(MessageUtil.get("notFindErr"));
|
||||
}
|
||||
projectEnterpriseMapper.updateById(projectEnterprise);
|
||||
|
||||
if (!Objects.equals(oldPo.getParentEnterpriseId(), projectEnterprise.getParentEnterpriseId())) {
|
||||
ProjectEnterprise pOrg = projectEnterpriseMapper.selectById(projectEnterprise.getParentEnterpriseId());
|
||||
// 修改子部门
|
||||
boolean top = projectEnterprise.getParentEnterpriseId() == null || projectEnterprise.getParentEnterpriseId() == 0;
|
||||
if (top) {
|
||||
projectEnterprise.setParentEnterpriseId(0L);
|
||||
projectEnterprise.setAncestors("0");
|
||||
} else {
|
||||
if (pOrg == null) {
|
||||
throw new OpenAlertException("上级部门不存在");
|
||||
}
|
||||
projectEnterprise.setAncestors(pOrg.getAncestors() + "," + pOrg.getId());
|
||||
}
|
||||
baseMapper.updateAncestors(oldPo.getAncestors(), projectEnterprise.getAncestors(), projectEnterprise.getProjectSn(), projectEnterprise.getId());
|
||||
baseMapper.updateById(projectEnterprise);
|
||||
} else {
|
||||
projectEnterprise.setAncestors(null);
|
||||
baseMapper.updateById(projectEnterprise);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -148,4 +178,29 @@ public class ProjectEnterpriseServiceImpl extends ServiceImpl<ProjectEnterpriseM
|
||||
public List<Map<String, Object>> selectExternalEnterpriseList(Map<String, Object> map) {
|
||||
return projectEnterpriseMapper.selectExternalEnterpriseList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
ProjectEnterprise xzProjectOrg = baseMapper.selectById(id);
|
||||
if (xzProjectOrg == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
List<ProjectEnterprise> xzProjectOrgs = baseMapper.selectList(new LambdaQueryWrapper<ProjectEnterprise>()
|
||||
.eq(ProjectEnterprise::getParentEnterpriseId, id));
|
||||
if (CollUtil.isNotEmpty(xzProjectOrgs)) {
|
||||
throw new OpenAlertException("有下级劳务公司,无法删除");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBatch(Map<String, Object> map) {
|
||||
String ids = MapUtils.getString(map, "ids");
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
throw new OpenAlertException(MessageUtil.get("parameterErr"));
|
||||
}
|
||||
for (String id : Arrays.asList(ids.split(","))) {
|
||||
delete(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,19 +67,8 @@ public class QualityRegionController {
|
||||
@ApiOperation(value = "编辑质量—检查部位信息", notes = "编辑质量—检查部位信息" , httpMethod="POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<QualityRegion> edit(@RequestBody QualityRegion qualityRegion) {
|
||||
Result<QualityRegion> result = new Result<QualityRegion>();
|
||||
QualityRegion qualityRegionEntity = qualityRegionService.getById(qualityRegion.getId());
|
||||
if(qualityRegionEntity==null) {
|
||||
result.error500(MessageUtil.get("notFindErr"));
|
||||
}else {
|
||||
boolean ok = qualityRegionService.updateById(qualityRegion);
|
||||
|
||||
if(ok) {
|
||||
result.successMsg(MessageUtil.get("editSucess"));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
qualityRegionService.edit(qualityRegion);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -83,6 +83,8 @@ public class QualityRegion implements Serializable {
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
@ApiModelProperty(value = "祖级列表")
|
||||
private java.lang.String ancestors;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<QualityRegion> children;
|
||||
|
||||
@ -7,6 +7,7 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityRegion;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 质量—检查部位
|
||||
@ -24,4 +25,6 @@ public interface QualityRegionMapper extends BaseMapper<QualityRegion> {
|
||||
QualityRegion getPeerNewQualityRegion(Map<String, Object> param);
|
||||
|
||||
void updateDutyNull(String id);
|
||||
|
||||
void updateAncestors(@Param("oldAncestor") String oldAncestor, @Param("newAncestor") String newAncestor, @Param("projectSn") String projectSn, @Param("id") Long id);
|
||||
}
|
||||
|
||||
@ -29,4 +29,10 @@
|
||||
duty_name = null
|
||||
where duty_id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateAncestors">
|
||||
UPDATE quality_region
|
||||
SET ancestors=REPLACE(ancestors, #{oldAncestor}, #{newAncestor})
|
||||
WHERE ancestors LIKE N'${oldAncestor},${id}%' and project_sn = #{projectSn}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@ -10,7 +10,7 @@ import java.util.Map;
|
||||
/**
|
||||
* @Description: 质量—检查部位
|
||||
* @author: pds
|
||||
* @date: 2020-10-21
|
||||
* @date: 2020-10-21
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IQualityRegionService extends IService<QualityRegion> {
|
||||
@ -20,4 +20,6 @@ public interface IQualityRegionService extends IService<QualityRegion> {
|
||||
void addQualityRegion(QualityRegion qualityRegion);
|
||||
|
||||
void deleteQualityRegion(Map<String, Object> map);
|
||||
|
||||
void edit(QualityRegion qualityRegion);
|
||||
}
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
package com.zhgd.xmgl.modules.quality.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.tree.TreeUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityRegion;
|
||||
import com.zhgd.xmgl.modules.quality.mapper.QualityRegionMapper;
|
||||
import com.zhgd.xmgl.modules.quality.service.IQualityRegionService;
|
||||
import com.zhgd.xmgl.modules.xz.entity.XzProjectOrg;
|
||||
import com.zhgd.xmgl.util.ListUtils;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
@ -18,7 +20,7 @@ import java.util.*;
|
||||
/**
|
||||
* @Description: 质量—检查部位
|
||||
* @author: pds
|
||||
* @date: 2020-10-21
|
||||
* @date: 2020-10-21
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@ -54,55 +56,96 @@ public class QualityRegionServiceImpl extends ServiceImpl<QualityRegionMapper, Q
|
||||
|
||||
@Override
|
||||
public void addQualityRegion(QualityRegion qualityRegion) {
|
||||
if(qualityRegion.getParentRegion()==null){
|
||||
if (qualityRegion.getParentRegion() == null) {
|
||||
qualityRegion.setParentRegion(0L);
|
||||
}
|
||||
Map<String, Object> param=new HashMap<>();
|
||||
param.put("projectSn",qualityRegion.getProjectSn());
|
||||
param.put("parentRegion",qualityRegion.getParentRegion());
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put("projectSn", qualityRegion.getProjectSn());
|
||||
param.put("parentRegion", qualityRegion.getParentRegion());
|
||||
qualityRegion.setCreateTime(new Date());
|
||||
QualityRegion tempQualityRegion=qualityRegionMapper.getPeerNewQualityRegion(param);
|
||||
if(tempQualityRegion!=null){
|
||||
String end = tempQualityRegion.getRegionCode().substring(tempQualityRegion.getRegionCode().length() -2,tempQualityRegion.getRegionCode().length());
|
||||
String start = tempQualityRegion.getRegionCode().substring(0,tempQualityRegion.getRegionCode().length()-2);
|
||||
Integer num=Integer.valueOf(end)+1;
|
||||
if(num<10){
|
||||
start=start+"0"+num;
|
||||
}else{
|
||||
start=start+num;
|
||||
QualityRegion tempQualityRegion = qualityRegionMapper.getPeerNewQualityRegion(param);
|
||||
if (tempQualityRegion != null) {
|
||||
String end = tempQualityRegion.getRegionCode().substring(tempQualityRegion.getRegionCode().length() - 2, tempQualityRegion.getRegionCode().length());
|
||||
String start = tempQualityRegion.getRegionCode().substring(0, tempQualityRegion.getRegionCode().length() - 2);
|
||||
Integer num = Integer.valueOf(end) + 1;
|
||||
if (num < 10) {
|
||||
start = start + "0" + num;
|
||||
} else {
|
||||
start = start + num;
|
||||
}
|
||||
qualityRegion.setRegionCode(start);
|
||||
}else{
|
||||
if(qualityRegion.getParentRegion()==0){
|
||||
} else {
|
||||
if (qualityRegion.getParentRegion() == 0) {
|
||||
qualityRegion.setRegionCode("01");
|
||||
}else{
|
||||
QualityRegion parentQualityRegion=qualityRegionMapper.selectById(qualityRegion.getParentRegion());
|
||||
String end = parentQualityRegion.getRegionCode().substring(parentQualityRegion.getRegionCode().length() -2,parentQualityRegion.getRegionCode().length());
|
||||
String start = parentQualityRegion.getRegionCode().substring(0,parentQualityRegion.getRegionCode().length()-2);
|
||||
Integer num=Integer.valueOf(end)+1;
|
||||
if(num<10){
|
||||
start=start+"0"+num;
|
||||
}else{
|
||||
start=start+num;
|
||||
} else {
|
||||
QualityRegion parentQualityRegion = qualityRegionMapper.selectById(qualityRegion.getParentRegion());
|
||||
String end = parentQualityRegion.getRegionCode().substring(parentQualityRegion.getRegionCode().length() - 2, parentQualityRegion.getRegionCode().length());
|
||||
String start = parentQualityRegion.getRegionCode().substring(0, parentQualityRegion.getRegionCode().length() - 2);
|
||||
Integer num = Integer.valueOf(end) + 1;
|
||||
if (num < 10) {
|
||||
start = start + "0" + num;
|
||||
} else {
|
||||
start = start + num;
|
||||
}
|
||||
qualityRegion.setRegionCode(start);
|
||||
}
|
||||
}
|
||||
|
||||
boolean top = qualityRegion.getParentRegion() == null || qualityRegion.getParentRegion() == 0;
|
||||
if (top) {
|
||||
qualityRegion.setParentRegion(0L);
|
||||
qualityRegion.setAncestors("0");
|
||||
} else {
|
||||
QualityRegion pOrg = qualityRegionMapper.selectOne(new LambdaQueryWrapper<QualityRegion>()
|
||||
.eq(QualityRegion::getId, qualityRegion.getParentRegion()));
|
||||
if (pOrg == null) {
|
||||
throw new OpenAlertException("上级不存在");
|
||||
}
|
||||
qualityRegion.setAncestors(pOrg.getAncestors() + "," + pOrg.getId());
|
||||
}
|
||||
qualityRegionMapper.insert(qualityRegion);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteQualityRegion(Map<String, Object> map) {
|
||||
deleteRegion(MapUtils.getLong(map,"id"));
|
||||
deleteRegion(MapUtils.getLong(map, "id"));
|
||||
}
|
||||
private void deleteRegion(Long id){
|
||||
QueryWrapper<QualityRegion> queryWrapper=new QueryWrapper();
|
||||
queryWrapper.lambda().eq(QualityRegion::getParentRegion,id);
|
||||
List<QualityRegion> list=qualityRegionMapper.selectList(queryWrapper);
|
||||
if(list.size()>0){
|
||||
for(QualityRegion qualityRegion:list){
|
||||
|
||||
@Override
|
||||
public void edit(QualityRegion qualityRegion) {
|
||||
QualityRegion oldPo = getById(qualityRegion.getId());
|
||||
if (oldPo == null) {
|
||||
throw new OpenAlertException(MessageUtil.get("notFindErr"));
|
||||
}
|
||||
|
||||
if (!Objects.equals(oldPo.getParentRegion(), qualityRegion.getParentRegion())) {
|
||||
QualityRegion pOrg = qualityRegionMapper.selectById(qualityRegion.getParentRegion());
|
||||
// 修改子部门
|
||||
boolean top = qualityRegion.getParentRegion() == null || qualityRegion.getParentRegion() == 0;
|
||||
if (top) {
|
||||
qualityRegion.setParentRegion(0L);
|
||||
qualityRegion.setAncestors("0");
|
||||
} else {
|
||||
if (pOrg == null) {
|
||||
throw new OpenAlertException("上级部门不存在");
|
||||
}
|
||||
qualityRegion.setAncestors(pOrg.getAncestors() + "," + pOrg.getId());
|
||||
}
|
||||
baseMapper.updateAncestors(oldPo.getAncestors(), qualityRegion.getAncestors(), qualityRegion.getProjectSn(), qualityRegion.getId());
|
||||
baseMapper.updateById(qualityRegion);
|
||||
} else {
|
||||
qualityRegion.setAncestors(null);
|
||||
baseMapper.updateById(qualityRegion);
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteRegion(Long id) {
|
||||
QueryWrapper<QualityRegion> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.lambda().eq(QualityRegion::getParentRegion, id);
|
||||
List<QualityRegion> list = qualityRegionMapper.selectList(queryWrapper);
|
||||
if (list.size() > 0) {
|
||||
for (QualityRegion qualityRegion : list) {
|
||||
deleteRegion(qualityRegion.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,11 +239,9 @@ public class XzTaskProgressController {
|
||||
return taskProgressService.exportXls(paramMap, request);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "工作一览(统计)", notes = "工作一览(统计)", httpMethod = "POST")
|
||||
@ApiOperation(value = "甘特图统计", notes = "甘特图统计", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "type", value = "1.本月2.下月", paramType = "body", required = false, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = "/countTaskProgress")
|
||||
public Result<CountTaskProgressVo> countTaskProgress(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
|
||||
@ -164,6 +164,8 @@ public class XzTaskProgress implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "所属企业表外键ID")
|
||||
private java.lang.Long enterpriseId;
|
||||
@ApiModelProperty(value = "区域id")
|
||||
private java.lang.Long qualityRegionId;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -5,10 +5,11 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CountTaskProgressVo {
|
||||
@ApiModelProperty("工作总数")
|
||||
private Integer workCount;
|
||||
@ApiModelProperty("延迟工作(那按照实际开始时间来算,实际开始时间提前就算提前工作,实际开始时间逾期就算延迟工作)")
|
||||
private Integer delayCount;
|
||||
@ApiModelProperty("提前工作(那按照实际开始时间来算,实际开始时间提前就算提前工作,实际开始时间逾期就算延迟工作)")
|
||||
private Integer aheadCount;
|
||||
@ApiModelProperty("项目总进度")
|
||||
private Double projectTotalProgress;
|
||||
@ApiModelProperty("项目总天数")
|
||||
private Integer projectTotalDayNum;
|
||||
@ApiModelProperty("项目剩余天数")
|
||||
private Integer projectSurplusDayNum;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user