Merge remote-tracking branch 'origin/master'
This commit is contained in:
+37
-2
@@ -6,7 +6,10 @@ import com.jero.modules.project.mapper.ProjectTaskPlanningMapper;
|
||||
import com.jero.modules.project.service.IProjectTaskPlanningService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 法规/认证任务计划 (各阶段确认进度) 表
|
||||
@@ -64,14 +67,46 @@ public class ProjectTaskPlanningServiceImpl extends ServiceImpl<ProjectTaskPlann
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过项目id查询
|
||||
* 通过项目id查询,并按升序排序
|
||||
*
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProjectTaskPlanning queryByProjectId(String projectId) {
|
||||
return getById(projectId);
|
||||
ProjectTaskPlanning projectTaskPlanning = getById(projectId);
|
||||
Date listConfirmation = projectTaskPlanning.getListConfirmation();//法规清单确认
|
||||
Date legalTaskConfirmation = projectTaskPlanning.getLegalTaskConfirmation();//法规任务确认
|
||||
Date designDeadline = projectTaskPlanning.getDesignDeadline();//设计符合性确认截止时间
|
||||
Date prehomoDeadline = projectTaskPlanning.getPrehomoDeadline();//PreHomo确认截止时间
|
||||
Date attestationStartTime = projectTaskPlanning.getAttestationStartTime();//认证开始
|
||||
Date attestationEndTime = projectTaskPlanning.getAttestationEndTime();//认证结束
|
||||
Date verifyDeadline = projectTaskPlanning.getVerifyDeadline();
|
||||
List dateList=new ArrayList();
|
||||
dateList.add(projectTaskPlanning.getListConfirmation());
|
||||
dateList.add(projectTaskPlanning.getLegalTaskConfirmation());
|
||||
dateList.add(projectTaskPlanning.getDesignDeadline());
|
||||
dateList.add(projectTaskPlanning.getPrehomoDeadline());
|
||||
dateList.add(projectTaskPlanning.getAttestationStartTime());
|
||||
dateList.add(projectTaskPlanning.getAttestationEndTime());
|
||||
dateList.add(projectTaskPlanning.getVerifyDeadline());
|
||||
//Collections.sort(dateList);
|
||||
|
||||
List<Map<Date, Object>> list = new ArrayList<>();
|
||||
/* for (ProjectTaskPlanning plann : dateList) {
|
||||
Map<Date, Object> map = new HashMap<>();
|
||||
if ("file_name".equals(onlCgformField.getDbFieldName())) {
|
||||
//跳转详情的标识
|
||||
map.put("click", "true");
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
for(int i=dateList.size();i>0;i++){
|
||||
|
||||
}
|
||||
return getById(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+29
-9
@@ -91,12 +91,11 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
@ApiOperation(value="区域管理表-添加", notes="区域管理表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
@RequiresPermissions("area:add")
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformArea onlCgformArea,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformArea onlCgformArea) {
|
||||
int count=onlCgformAreaService.queryExitAreaName(onlCgformArea);
|
||||
if (count > 0) {
|
||||
//中英切换-属性类型+展示区域列
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
}else{
|
||||
return Result.error("Under the same module, the display area name cannot be duplicate!");
|
||||
@@ -121,7 +120,12 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
public Result<?> edit(@Validated @RequestBody OnlCgformArea onlCgformArea) {
|
||||
int count=onlCgformAreaService.queryExitAreaName(onlCgformArea);
|
||||
if (count > 0) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
}else{
|
||||
return Result.error("Under the same module, the display area name cannot be duplicate!");
|
||||
}
|
||||
}else {
|
||||
onlCgformAreaService.editById(onlCgformArea);
|
||||
return Result.OK("编辑成功!");
|
||||
@@ -138,11 +142,17 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
@ApiOperation(value="区域管理表-通过id删除", notes="区域管理表-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
@RequiresPermissions("area:delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
OnlCgformArea onlCgformArea = onlCgformAreaService.queryById(id);
|
||||
int count=onlCgformTagService.queryExitArea(onlCgformArea);
|
||||
if (count > 0) {
|
||||
return Result.error("该“展示区域”有关联数据,无法删除!");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
return Result.error("该展示区域有关联数据,无法删除!");
|
||||
}else{
|
||||
return Result.error("This exhibition area has associated data and cannot be deleted!");
|
||||
}
|
||||
}else {
|
||||
onlCgformAreaService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
@@ -176,7 +186,12 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
OnlCgformArea onlCgformArea = onlCgformAreaService.queryById(id);
|
||||
if(onlCgformArea==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
return Result.error("未找到对应数据");
|
||||
}else{
|
||||
return Result.error("No corresponding data was found.");
|
||||
}
|
||||
}
|
||||
return Result.OK(onlCgformArea);
|
||||
}
|
||||
@@ -216,7 +231,12 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
public Result<?> selectShowAreaById(@RequestParam(name="id",required=true) String id) {
|
||||
OnlCgformArea onlCgformArea = (OnlCgformArea) onlCgformAreaService.selectShowAreaById(id);
|
||||
if(onlCgformArea==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
return Result.error("未找到对应数据");
|
||||
}else{
|
||||
return Result.error("No corresponding data was found.");
|
||||
}
|
||||
}
|
||||
return Result.OK(onlCgformArea);
|
||||
}
|
||||
|
||||
+43
-7
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
@@ -125,7 +126,12 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
this.onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_SPLIT_ID.getValue()), "normal");
|
||||
}
|
||||
}else{
|
||||
throw new JeroBootException("属性已存在,请检查");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
throw new JeroBootException("属性已存在,请检查");
|
||||
}else{
|
||||
throw new JeroBootException("Attribute already exists, please check!");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
onlCgformTagService.add(onlCgformTag);
|
||||
@@ -152,7 +158,12 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
public Result<?> edit(@Validated @RequestBody OnlCgformTag onlCgformTag) {
|
||||
checkData();
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) {
|
||||
return Result.error("固定字段,不可修改");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
return Result.error("固定字段,不可修改");
|
||||
}else{
|
||||
return Result.error("Fixed field, which cannot be modified.");
|
||||
}
|
||||
}else {
|
||||
QueryWrapper<OnlCgformTag> queryWrapper=new QueryWrapper<>();
|
||||
//查询同一模块下,同名数据
|
||||
@@ -179,7 +190,12 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
this.onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_SPLIT_ID.getValue()), "normal");
|
||||
}
|
||||
}else {//有未删数据,报错
|
||||
return Result.error("属性已存在,请检查");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
return Result.error("属性已存在,请检查");
|
||||
}else{
|
||||
return Result.error("Attribute already exists, please check!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@@ -235,7 +251,12 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
OnlCgformTag onlCgformTag = onlCgformTagService.queryById(id);
|
||||
if(StringUtils.isNotBlank(String.valueOf(onlCgformTag.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(onlCgformTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(onlCgformTag.getIsReadOnly())) {
|
||||
result.error500("固定字段,不可删除");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
result.error500("固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("Fixed field, cannot be deleted.");
|
||||
}
|
||||
} else {
|
||||
onlCgformTagService.updateDictDelFlag(CommonConstant.DEL_FLAG_1,id);
|
||||
//onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");//逻辑删除-->改变状态,数据库不删
|
||||
@@ -287,15 +308,30 @@ public class OnlCgformTagController extends JeroController<OnlCgformTag, IOnlCgf
|
||||
for(String list:idList){
|
||||
OnlCgformTag midTag=onlCgformTagService.getById(list);
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(midTag.getIsReadOnly()) || FixedFieldEnum.CONFIGURABLE_FIELD.getValue().equals(midTag.getIsReadOnly())) {
|
||||
return Result.error("包含固定字段,不可删除");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("It contains fixed fields and cannot be deleted.");
|
||||
}
|
||||
}else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(String.valueOf(midTag.getIsReadOnly()))) {
|
||||
if (FixedFieldEnum.FIXED_FIELD_ENUM.getValue().equals(midTag.getIsReadOnly())) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
result.error500("包含固定字段,不可删除");
|
||||
}else{
|
||||
result.error500("It contains fixed fields and cannot be deleted.");
|
||||
}
|
||||
} else {
|
||||
onlCgformTagService.updateDictDelFlag(CommonConstant.DEL_FLAG_1, midTag.getId());
|
||||
//onlCgformApiController.h(String.valueOf(FileTableIdEnum.FILE_TABLE_ID),"normal");//逻辑删除-->改变状态,数据库不删
|
||||
result.success("批量删除成功!");
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
result.success("批量删除成功!");
|
||||
}else{
|
||||
result.success("Batch deletion succeeded!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -74,4 +74,7 @@ public class OnlCgformArea implements Serializable {
|
||||
|
||||
/**排序号*/
|
||||
private java.lang.Integer sort;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
}
|
||||
|
||||
+3
@@ -149,6 +149,9 @@ public class OnlCgformTag implements Serializable {
|
||||
/**数据库字段类型*/
|
||||
private String dbType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cut;
|
||||
|
||||
public OnlCgformTag() {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user