项目库标准详情
This commit is contained in:
+6
@@ -8,6 +8,7 @@ import com.jero.modules.laws.common.constant.FieldCommon;
|
||||
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||
import com.jero.modules.laws.standard.service.ILawsNodeRelationService;
|
||||
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import com.jero.modules.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.enums.TableNameEnum;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -33,6 +34,9 @@ public class LawsDomesticController {
|
||||
private ILawsCommonService lawsCommonService;
|
||||
@Autowired
|
||||
private ILawsNodeRelationService lawsNodeRelationService;
|
||||
@Autowired
|
||||
private ILawsStandardCollectionService lawsStandardCollectionService;
|
||||
|
||||
|
||||
private static final String MODULE_VALUE = TableNameEnum.DOMESTIC_REGULATIONS.getValue();
|
||||
|
||||
@@ -92,6 +96,8 @@ public class LawsDomesticController {
|
||||
@ApiOperation(value="国内法规标准-根据ids和模块标识删除信息", notes="国内法规标准-根据ids和模块标识删除信息")
|
||||
@PostMapping(value = "deleteByIdsAndModule")
|
||||
public Result<String> deleteByIdsAndModule(@RequestBody Map<String,Object> parameterMap) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
return Result.OK(lawsCommonService.deleteByIdsAndModule((String) parameterMap.get("ids"), MODULE_VALUE));
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -8,6 +8,7 @@ import com.jero.modules.laws.common.constant.FieldCommon;
|
||||
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||
import com.jero.modules.laws.standard.service.ILawsNodeRelationService;
|
||||
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import com.jero.modules.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.enums.TableNameEnum;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -33,6 +34,8 @@ public class LawsEnterpriseController {
|
||||
private ILawsCommonService lawsCommonService;
|
||||
@Autowired
|
||||
private ILawsNodeRelationService lawsNodeRelationService;
|
||||
@Autowired
|
||||
private ILawsStandardCollectionService lawsStandardCollectionService;
|
||||
|
||||
private static final String MODULE_VALUE = TableNameEnum.ENTERPRISE_STANDARDS.getValue();
|
||||
|
||||
@@ -92,6 +95,8 @@ public class LawsEnterpriseController {
|
||||
@ApiOperation(value="企业法规标准-根据ids和模块标识删除信息", notes="企业法规标准-根据ids和模块标识删除信息")
|
||||
@PostMapping(value = "deleteByIdsAndModule")
|
||||
public Result<String> deleteByIdsAndModule(@RequestBody Map<String,Object> parameterMap) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
return Result.OK(lawsCommonService.deleteByIdsAndModule((String) parameterMap.get("ids"), MODULE_VALUE));
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -8,6 +8,7 @@ import com.jero.modules.laws.common.constant.FieldCommon;
|
||||
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||
import com.jero.modules.laws.standard.service.ILawsNodeRelationService;
|
||||
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import com.jero.modules.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.enums.TableNameEnum;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -33,6 +34,8 @@ public class LawsOverseasController {
|
||||
private ILawsCommonService lawsCommonService;
|
||||
@Autowired
|
||||
private ILawsNodeRelationService lawsNodeRelationService;
|
||||
@Autowired
|
||||
private ILawsStandardCollectionService lawsStandardCollectionService;
|
||||
|
||||
private static final String MODULE_VALUE = TableNameEnum.FOREIGN_REGULATIONS.getValue();
|
||||
|
||||
@@ -92,6 +95,8 @@ public class LawsOverseasController {
|
||||
@ApiOperation(value="海外法规标准-根据ids和模块标识删除信息", notes="海外法规标准-根据ids和模块标识删除信息")
|
||||
@PostMapping(value = "deleteByIdsAndModule")
|
||||
public Result<String> deleteByIdsAndModule(@RequestBody Map<String,Object> parameterMap) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId((String) parameterMap.get("ids"));
|
||||
return Result.OK(lawsCommonService.deleteByIdsAndModule((String) parameterMap.get("ids"), MODULE_VALUE));
|
||||
}
|
||||
|
||||
|
||||
+8
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
||||
import com.jero.modules.laws.standard.mapper.LawsDomesticStandardMapper;
|
||||
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
@@ -26,6 +28,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
public class LawsDomesticStandardServiceImpl extends ServiceImpl<LawsDomesticStandardMapper, LawsDomesticStandard> implements ILawsDomesticStandardService {
|
||||
|
||||
@Autowired
|
||||
private ILawsStandardCollectionService lawsStandardCollectionService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@@ -91,6 +95,8 @@ public class LawsDomesticStandardServiceImpl extends ServiceImpl<LawsDomesticSta
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId(id);
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
@@ -102,6 +108,8 @@ public class LawsDomesticStandardServiceImpl extends ServiceImpl<LawsDomesticSta
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardIds(ids);
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
+8
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.laws.standard.entity.LawsOverseasStandard;
|
||||
import com.jero.modules.laws.standard.mapper.LawsOverseasStandardMapper;
|
||||
import com.jero.modules.laws.standard.service.ILawsOverseasStandardService;
|
||||
import com.jero.modules.personal.service.ILawsStandardCollectionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
@@ -26,6 +28,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
public class LawsOverseasStandardServiceImpl extends ServiceImpl<LawsOverseasStandardMapper, LawsOverseasStandard> implements ILawsOverseasStandardService {
|
||||
|
||||
@Autowired
|
||||
private ILawsStandardCollectionService lawsStandardCollectionService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
@@ -91,6 +95,8 @@ public class LawsOverseasStandardServiceImpl extends ServiceImpl<LawsOverseasSta
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardId(id);
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
@@ -102,6 +108,8 @@ public class LawsOverseasStandardServiceImpl extends ServiceImpl<LawsOverseasSta
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
//删除标准时同步删除这个标准的收藏数据
|
||||
lawsStandardCollectionService.deleteByStandardIds(ids);
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -99,14 +99,14 @@ public class LawsStandardCollection implements Serializable {
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date newModelImplementationDate;
|
||||
private String newModelImplementationDate;
|
||||
|
||||
/**在产车实施日期*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date onTheProductionDate;
|
||||
private String onTheProductionDate;
|
||||
|
||||
/**标准状态*/
|
||||
@TableField(exist = false)
|
||||
|
||||
+3
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 标准收藏
|
||||
* @Author: jero-boot
|
||||
@@ -39,6 +41,7 @@ public interface ILawsStandardCollectionService extends IService<LawsStandardCol
|
||||
* 删除标准收藏
|
||||
*/
|
||||
void deleteByStandardId(String id);
|
||||
void deleteByStandardIds(List<String> ids);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+13
@@ -131,4 +131,17 @@ public class LawsStandardCollectionServiceImpl extends ServiceImpl<LawsStandardC
|
||||
wrapper.eq(LawsStandardCollection::getStandardId, id);
|
||||
remove(wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除标准收藏
|
||||
*/
|
||||
@Override
|
||||
public void deleteByStandardIds(List<String> ids) {
|
||||
if (ids.isEmpty()){
|
||||
return;
|
||||
}
|
||||
LambdaQueryWrapper<LawsStandardCollection> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(LawsStandardCollection::getStandardId, ids);
|
||||
remove(wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
+52
-8
@@ -66,6 +66,11 @@ public class LawsAssessController extends JeroController<LawsAssess, ILawsAssess
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
String projectId = lawsAssess.getProjectId();
|
||||
if (StringUtils.isBlank(projectId)){
|
||||
return Result.error("请在项目内查询!");
|
||||
}
|
||||
lawsAssess.setDelFlag("0");
|
||||
IPage<LawsAssess> pageList = lawsAssessService.queryPage(lawsAssess, pageNo, pageSize, req);
|
||||
this.assignment(pageList.getRecords());
|
||||
return Result.OK(pageList);
|
||||
@@ -112,14 +117,29 @@ public class LawsAssessController extends JeroController<LawsAssess, ILawsAssess
|
||||
return Result.error("请至少选择一个标准进行调取!");
|
||||
}
|
||||
//查询当前项目已绑定的标准,为了不造成重复绑定
|
||||
List<LawsAssess> assessArrayList = lawsAssessService.getAllByProjectId(lawsAssessAddVo.getProjectId());
|
||||
List<String> collect = assessArrayList.stream().map(LawsAssess::getStandardId).distinct().collect(Collectors.toList());
|
||||
//查询该项目下所有未删除的标准
|
||||
List<LawsAssess> allByProjectIdNotDeleted = lawsAssessService.getAllByProjectIdNotDeleted(lawsAssessAddVo.getProjectId());
|
||||
List<String> allByProjectIdNotDeletedIdList = allByProjectIdNotDeleted.stream().map(LawsAssess::getStandardId).distinct().collect(Collectors.toList());
|
||||
//查询该项目下所有删除的标准
|
||||
List<LawsAssess> allByProjectIdDeleted = lawsAssessService.getAllByProjectIdDeleted(lawsAssessAddVo.getProjectId());
|
||||
List<String> allByProjectIdDeletedIdList = allByProjectIdDeleted.stream().map(LawsAssess::getStandardId).distinct().collect(Collectors.toList());
|
||||
|
||||
Date now = new Date();
|
||||
List<LawsAssess> lawsAssesses = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(domesticStandardId)){
|
||||
List<String> asList = Arrays.asList(domesticStandardId.split(","));
|
||||
for (String id : asList) {
|
||||
if (collect.contains(id)){
|
||||
if (allByProjectIdNotDeletedIdList.contains(id)){
|
||||
//如果已存在跳过新增
|
||||
continue;
|
||||
}
|
||||
if (allByProjectIdDeletedIdList.contains(id)){
|
||||
//如果已删除则恢复未删除状态
|
||||
LawsAssess lawsAssess = lawsAssessService.getById(id);
|
||||
lawsAssess.setDelFlag("0");
|
||||
lawsAssess.setCreateTime(now);
|
||||
lawsAssess.setUpdateTime(now);
|
||||
lawsAssessService.updateById(lawsAssess);
|
||||
continue;
|
||||
}
|
||||
LawsAssess lawsAssess = new LawsAssess();
|
||||
@@ -138,7 +158,17 @@ public class LawsAssessController extends JeroController<LawsAssess, ILawsAssess
|
||||
if (StringUtils.isNotBlank(overseasStandardId)){
|
||||
List<String> asList = Arrays.asList(overseasStandardId.split(","));
|
||||
for (String id : asList) {
|
||||
if (collect.contains(id)){
|
||||
if (allByProjectIdNotDeletedIdList.contains(id)){
|
||||
//如果已存在跳过新增
|
||||
continue;
|
||||
}
|
||||
if (allByProjectIdDeletedIdList.contains(id)){
|
||||
//如果已删除则恢复未删除状态
|
||||
LawsAssess lawsAssess = lawsAssessService.getById(id);
|
||||
lawsAssess.setDelFlag("0");
|
||||
lawsAssess.setCreateTime(now);
|
||||
lawsAssess.setUpdateTime(now);
|
||||
lawsAssessService.updateById(lawsAssess);
|
||||
continue;
|
||||
}
|
||||
LawsAssess lawsAssess = new LawsAssess();
|
||||
@@ -174,12 +204,25 @@ public class LawsAssessController extends JeroController<LawsAssess, ILawsAssess
|
||||
}
|
||||
Date now = new Date();
|
||||
List<LawsAssess> lawsAssesses = new ArrayList<>();
|
||||
List<LawsAssess> assessArrayList = lawsAssessService.getAllByProjectId(lawsAssessAddVo.getProjectId());
|
||||
List<String> collect = assessArrayList.stream().map(LawsAssess::getStandardId).distinct().collect(Collectors.toList());
|
||||
List<LawsAssess> copyAssessArrayList = lawsAssessService.getAllByProjectId(copyProjectId);
|
||||
List<LawsAssess> allByProjectIdNotDeleted = lawsAssessService.getAllByProjectIdNotDeleted(lawsAssessAddVo.getProjectId());
|
||||
List<LawsAssess> allByProjectIdDeleted = lawsAssessService.getAllByProjectIdDeleted(lawsAssessAddVo.getProjectId());
|
||||
List<String> allByProjectIdNotDeletedIdList = allByProjectIdNotDeleted.stream().map(LawsAssess::getStandardId).distinct().collect(Collectors.toList());
|
||||
List<String> allByProjectIdDeletedIdList = allByProjectIdDeleted.stream().map(LawsAssess::getStandardId).distinct().collect(Collectors.toList());
|
||||
//获取要拷贝项目的未删除标准
|
||||
List<LawsAssess> copyAssessArrayList = lawsAssessService.getAllByProjectIdNotDeleted(copyProjectId);
|
||||
for (LawsAssess lawsAssess : copyAssessArrayList) {
|
||||
String standardId = lawsAssess.getStandardId();
|
||||
if (collect.contains(standardId)){
|
||||
if (allByProjectIdNotDeletedIdList.contains(standardId)){
|
||||
//如果已存在跳过新增
|
||||
continue;
|
||||
}
|
||||
if (allByProjectIdDeletedIdList.contains(standardId)){
|
||||
//如果已删除则恢复未删除状态
|
||||
LawsAssess assess = lawsAssessService.getById(standardId);
|
||||
assess.setDelFlag("0");
|
||||
assess.setCreateTime(now);
|
||||
assess.setUpdateTime(now);
|
||||
lawsAssessService.updateById(assess);
|
||||
continue;
|
||||
}
|
||||
LawsAssess assess = new LawsAssess();
|
||||
@@ -203,6 +246,7 @@ public class LawsAssessController extends JeroController<LawsAssess, ILawsAssess
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* 同步删除未符合项、专项项目库;
|
||||
*/
|
||||
@AutoLog(value = "项目-标准评估-通过id删除")
|
||||
@ApiOperation(value="项目-标准评估-通过id删除", notes="项目-标准评估-通过id删除")
|
||||
|
||||
-133
@@ -1,26 +1,17 @@
|
||||
package com.jero.modules.projectLibrary.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.projectLibrary.entity.LawsAssessResults;
|
||||
import com.jero.modules.projectLibrary.service.ILawsAssessResultsService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.ibatis.annotations.Results;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
|
||||
/**
|
||||
@@ -39,12 +30,6 @@ public class LawsAssessResultsController extends JeroController<LawsAssessResult
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lawsAssessResults
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标准评估结果-分页列表查询")
|
||||
@ApiOperation(value="标准评估结果-分页列表查询", notes="标准评估结果-分页列表查询")
|
||||
@@ -56,122 +41,4 @@ public class LawsAssessResultsController extends JeroController<LawsAssessResult
|
||||
IPage<LawsAssessResults> pageList = lawsAssessResultsService.queryPage(lawsAssessResults, pageNo, pageSize, req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param lawsAssessResults
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标准评估结果-列表查询")
|
||||
@ApiOperation(value="标准评估结果-列表查询", notes="标准评估结果-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsAssessResults>> queryList(LawsAssessResults lawsAssessResults, HttpServletRequest req) {
|
||||
List<LawsAssessResults> list = lawsAssessResultsService.queryList(lawsAssessResults, req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param lawsAssessResults
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标准评估结果-添加")
|
||||
@ApiOperation(value="标准评估结果-添加", notes="标准评估结果-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<T> add(@Validated @RequestBody LawsAssessResults lawsAssessResults) {
|
||||
lawsAssessResultsService.add(lawsAssessResults);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param lawsAssessResults
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标准评估结果-编辑")
|
||||
@ApiOperation(value="标准评估结果-编辑", notes="标准评估结果-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<T> edit(@Validated @RequestBody LawsAssessResults lawsAssessResults) {
|
||||
lawsAssessResultsService.editById(lawsAssessResults);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标准评估结果-通过id删除")
|
||||
@ApiOperation(value="标准评估结果-通过id删除", notes="标准评估结果-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
lawsAssessResultsService.deleteById(map.get("id"));
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标准评估结果-批量删除")
|
||||
@ApiOperation(value="标准评估结果-批量删除", notes="标准评估结果-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
this.lawsAssessResultsService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "标准评估结果-通过id查询")
|
||||
@ApiOperation(value="标准评估结果-通过id查询", notes="标准评估结果-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<LawsAssessResults> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LawsAssessResults lawsAssessResults = lawsAssessResultsService.queryById(id);
|
||||
if(lawsAssessResults==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(lawsAssessResults);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param lawsAssessResults
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LawsAssessResults lawsAssessResults) {
|
||||
return super.exportXls(request, lawsAssessResults, LawsAssessResults.class, "标准评估结果");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<LawsAssessResults> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LawsAssessResults.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -98,6 +98,10 @@ public class LawsAssess implements Serializable {
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
|
||||
/**删除状态(0-正常,1-删除)*/
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-删除)")
|
||||
private String delFlag;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "英文名称")
|
||||
|
||||
+46
-57
@@ -1,22 +1,19 @@
|
||||
package com.jero.modules.projectLibrary.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
|
||||
/**
|
||||
@@ -36,99 +33,91 @@ public class LawsAssessResults implements Serializable {
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String orgCode;
|
||||
private String id;
|
||||
|
||||
/**标准ID*/
|
||||
@Excel(name = "标准ID", width = 15)
|
||||
@ApiModelProperty(value = "标准ID")
|
||||
private java.lang.String standardId;
|
||||
private String standardId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "标准编号", width = 15)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private java.lang.String standardNum;
|
||||
private String standardNumber;
|
||||
|
||||
/**标准名称*/
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
private String standardName;
|
||||
|
||||
/**项目ID*/
|
||||
@Excel(name = "项目ID", width = 15)
|
||||
@ApiModelProperty(value = "项目ID")
|
||||
private java.lang.String projectId;
|
||||
private String projectId;
|
||||
|
||||
/**项目名称*/
|
||||
@Excel(name = "项目名称", width = 15)
|
||||
@ApiModelProperty(value = "项目名称")
|
||||
private java.lang.String projectName;
|
||||
private String projectName;
|
||||
|
||||
/**条款ID*/
|
||||
@Excel(name = "条款ID", width = 15)
|
||||
@ApiModelProperty(value = "条款ID")
|
||||
private java.lang.String termId;
|
||||
private String termId;
|
||||
|
||||
/**条款号*/
|
||||
@Excel(name = "条款号", width = 15)
|
||||
@ApiModelProperty(value = "条款号")
|
||||
private java.lang.String termNum;
|
||||
private String termNum;
|
||||
|
||||
/**条款名称*/
|
||||
@Excel(name = "条款名称", width = 15)
|
||||
@ApiModelProperty(value = "条款名称")
|
||||
private java.lang.String termName;
|
||||
private String termName;
|
||||
|
||||
/**责任部门ID*/
|
||||
@Excel(name = "责任部门ID", width = 15)
|
||||
@ApiModelProperty(value = "责任部门ID")
|
||||
private java.lang.String departmentId;
|
||||
private String departmentId;
|
||||
|
||||
/**设计工程师ID*/
|
||||
@Excel(name = "设计工程师ID", width = 15)
|
||||
@ApiModelProperty(value = "设计工程师ID")
|
||||
private java.lang.String engineerId;
|
||||
private String engineerId;
|
||||
|
||||
/**设计工程师名字*/
|
||||
@Excel(name = "设计工程师名字", width = 15)
|
||||
@ApiModelProperty(value = "设计工程师名字")
|
||||
private java.lang.String engineerName;
|
||||
private String engineerName;
|
||||
|
||||
/**预计整改完成日期*/
|
||||
@Excel(name = "预计整改完成日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "预计整改完成日期")
|
||||
private java.util.Date expectedTime;
|
||||
private Date expectedTime;
|
||||
|
||||
/**实际整改完成日期*/
|
||||
@Excel(name = "实际整改完成日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "实际整改完成日期")
|
||||
private java.util.Date realityTime;
|
||||
private Date realityTime;
|
||||
|
||||
/**整改状态(1-待整改、2-整改中、3-审批中、4-已完成)*/
|
||||
@Excel(name = "整改状态(1-待整改、2-整改中、3-审批中、4-已完成)", width = 15)
|
||||
@Dict(dicCode = "assess_rectification")
|
||||
@ApiModelProperty(value = "整改状态(1-待整改、2-整改中、3-审批中、4-已完成)")
|
||||
private java.lang.String state;
|
||||
private String state;
|
||||
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
}
|
||||
|
||||
+1
@@ -110,6 +110,7 @@ public class LawsEvaluationNotMet implements Serializable {
|
||||
@ApiModelProperty(value = "实际整改完成日期")
|
||||
private java.util.Date realityTime;
|
||||
/**整改状态(1-待整改、2-整改中、3-审批中、4-已完成)*/
|
||||
@Dict(dicCode = "assess_rectification")
|
||||
@Excel(name = "整改状态(1-待整改、2-整改中、3-审批中、4-已完成)", width = 15)
|
||||
@ApiModelProperty(value = "整改状态(1-待整改、2-整改中、3-审批中、4-已完成)")
|
||||
private java.lang.String state;
|
||||
|
||||
+9
-9
@@ -58,14 +58,6 @@ public interface ILawsAssessService extends IService<LawsAssess> {
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
@@ -74,5 +66,13 @@ public interface ILawsAssessService extends IService<LawsAssess> {
|
||||
*/
|
||||
LawsAssess queryById(String id);
|
||||
|
||||
List<LawsAssess> getAllByProjectId(String projectId);
|
||||
/**
|
||||
* 查询该项目下所有未删除的标准
|
||||
*/
|
||||
List<LawsAssess> getAllByProjectIdNotDeleted(String projectId);
|
||||
|
||||
/**
|
||||
* 查询该项目下所有删除的标准
|
||||
*/
|
||||
List<LawsAssess> getAllByProjectIdDeleted(String projectId);
|
||||
}
|
||||
|
||||
+16
-13
@@ -95,18 +95,9 @@ public class LawsAssessServiceImpl extends ServiceImpl<LawsAssessMapper, LawsAss
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
LawsAssess lawsAssess = getById(id);
|
||||
lawsAssess.setDelFlag("1");
|
||||
updateById(lawsAssess);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,12 +112,24 @@ public class LawsAssessServiceImpl extends ServiceImpl<LawsAssessMapper, LawsAss
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LawsAssess> getAllByProjectId(String projectId) {
|
||||
public List<LawsAssess> getAllByProjectIdNotDeleted(String projectId) {
|
||||
if (StringUtils.isBlank(projectId)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
LambdaQueryWrapper<LawsAssess> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(LawsAssess::getProjectId, projectId);
|
||||
wrapper.eq(LawsAssess::getDelFlag, "0");
|
||||
return list(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LawsAssess> getAllByProjectIdDeleted(String projectId) {
|
||||
if (StringUtils.isBlank(projectId)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
LambdaQueryWrapper<LawsAssess> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(LawsAssess::getProjectId, projectId);
|
||||
wrapper.eq(LawsAssess::getDelFlag, "1");
|
||||
return list(wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user