Commit 6a0dcd49 authored by wujiang's avatar wujiang

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into fb_jxiop_V1.1.0_230316

parents d2a5d936 3c60a3f0
......@@ -4,47 +4,37 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.ugp.api.Enum.NoticeStatusEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum;
import com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant;
import com.yeejoin.amos.boot.module.ugp.api.dto.*;
import com.yeejoin.amos.boot.module.ugp.api.entity.*;
import com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper;
import com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeService;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.biz.fegin.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.*;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import springfox.documentation.spring.web.json.Json;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 安装告知表
......@@ -382,8 +372,11 @@ public class InstallNoticeController extends BaseController {
@PostMapping(value = "/saveOrUpdate")
@ApiOperation(value = "新增/修改安装告知表信息", notes = "新增/修改安装告知表信息")
public ResponseModel<InstallNoticeDto> saveOrUpdate(@RequestBody JSONObject jsonObject) {
InstallNoticeDto model = JSON.parseObject(JSON.toJSONString(jsonObject.get("installNoticeInfo")), InstallNoticeDto.class);
Project project = projectServiceImpl.getById(model.getProjectId());
InstallNoticeDto model = JSON.parseObject(JSON.toJSONString(jsonObject.get("noticeInfo")), InstallNoticeDto.class);
Long projectId = Long.valueOf(String.valueOf(jsonObject.get("projectId")));
Project project = projectServiceImpl.getById(projectId);
model.setProjectId(projectId);
model.setNoticeStatus(String.valueOf(jsonObject.get("noticeStatus")));
LambdaQueryWrapper<InstallNotice> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(InstallNotice::getProjectId, model.getProjectId());
lambdaQueryWrapper.eq(InstallNotice::getIsDelete, Boolean.FALSE);
......@@ -396,8 +389,8 @@ public class InstallNoticeController extends BaseController {
installNotice.setNoticeDate(new Date());
installNotice.setOrganizationCode(orgServiceImpl.getOrgUsr().getBizOrgCode());
iInstallNoticeService.saveOrUpdate(installNotice);
if (NoticeStatusEnum.已提交.getName().equals(model.getNoticeStatus())) {
projectInitiationServiceImpl.execute(project.getInstanceId(), model, WhetherItPassEnum.PASS.getCode(), null);
if (!WhetherItPassEnum.SAVE.getCode().equals(model.getNoticeStatus())) {
projectInitiationServiceImpl.execute(project.getInstanceId(), model, model.getNoticeStatus(), null);
}
return ResponseHelper.buildResponse(model);
}
......@@ -415,7 +408,7 @@ public class InstallNoticeController extends BaseController {
return null;
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("installNoticeInfo",iInstallNoticeService.getInfoByProjectId(projectId));
jsonObject.put("noticeInfo",iInstallNoticeService.getInfoByProjectId(projectId));
jsonObject.put("projectInfo",projectServiceImpl.selectById(projectId));
return ResponseHelper.buildResponse(jsonObject);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment