优化
This commit is contained in:
parent
b00a543d16
commit
e5f9895385
@ -79,21 +79,21 @@ public class FileController {
|
||||
/**
|
||||
* 下载文件
|
||||
*/
|
||||
@OperLog(operModul = "文件管理", operType = "文件下载", operDesc = "文件下载")
|
||||
@ApiOperation(value = "文件下载", notes = "文件下载", httpMethod="POST")
|
||||
@ApiImplicitParam(name = "fileUrl", value = "文件路径", paramType = "body", dataType = "String")
|
||||
@PostMapping("/download")
|
||||
public void download(@ApiIgnore @RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
|
||||
// 获取文件信息
|
||||
String fileUrl = MapUtils.getString(map, "fileUrl");
|
||||
FileInfo fileInfo = fileStorageService.getFileInfoByUrl(fileUrl);
|
||||
if (null == fileInfo) {
|
||||
throw new Exception("缩略图文件下载失败,文件不存在!fileInfo:" + fileInfo);
|
||||
}
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + fileUrl.substring(fileUrl.lastIndexOf("/") + 1));
|
||||
response.setContentType("application/octet-stream");// 定义输出类型
|
||||
fileStorageService.download(fileInfo).outputStream(response.getOutputStream());
|
||||
}
|
||||
// @OperLog(operModul = "文件管理", operType = "文件下载", operDesc = "文件下载")
|
||||
// @ApiOperation(value = "文件下载", notes = "文件下载", httpMethod="POST")
|
||||
// @ApiImplicitParam(name = "fileUrl", value = "文件路径", paramType = "body", dataType = "String")
|
||||
// @PostMapping("/download")
|
||||
// public void download(@ApiIgnore @RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
|
||||
// // 获取文件信息
|
||||
// String fileUrl = MapUtils.getString(map, "fileUrl");
|
||||
// FileInfo fileInfo = fileStorageService.getFileInfoByUrl(fileUrl);
|
||||
// if (null == fileInfo) {
|
||||
// throw new Exception("缩略图文件下载失败,文件不存在!fileInfo:" + fileInfo);
|
||||
// }
|
||||
// response.setHeader("Content-disposition", "attachment; filename=" + fileUrl.substring(fileUrl.lastIndexOf("/") + 1));
|
||||
// response.setContentType("application/octet-stream");// 定义输出类型
|
||||
// fileStorageService.download(fileInfo).outputStream(response.getOutputStream());
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取预览文件流
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.admin;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.qiwenshare.common.result.RestResult;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
@ -8,13 +9,11 @@ import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.constant.CommonConstant;
|
||||
import com.zhgd.mybatis.Aes;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.SystemUserAuthDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.EnterpriseMain;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Government;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUserDataScope;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IGovernmentService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemRoleService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserDataScopeService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.*;
|
||||
import com.zhgd.xmgl.modules.basicdata.vo.UserLoginVo;
|
||||
import com.zhgd.xmgl.security.JwtTokenProvider;
|
||||
import com.zhgd.xmgl.security.SecurityUser;
|
||||
@ -27,6 +26,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -35,6 +35,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -55,6 +56,9 @@ public class SystemUserAuthController {
|
||||
@Autowired
|
||||
private IGovernmentService governmentService;
|
||||
|
||||
@Autowired
|
||||
private IEnterpriseMainService enterpriseMainService;
|
||||
|
||||
@Autowired
|
||||
private JwtTokenProvider jwtTokenProvider;
|
||||
|
||||
@ -191,6 +195,10 @@ public class SystemUserAuthController {
|
||||
}
|
||||
}
|
||||
userInfo.setProjectDateAuth(government.getProjectDateAuth());
|
||||
if (userInfo.getAccountType() == 3) {
|
||||
userInfo.setEnterpriseType(enterpriseMainService.list(Wrappers.<EnterpriseMain>lambdaQuery().eq(EnterpriseMain::getEnterpriseSn, user.getSn()))
|
||||
.stream().map(e -> e.getMainType()).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -218,28 +226,28 @@ public class SystemUserAuthController {
|
||||
public Result<SystemUserAuthDto> analysis(@RequestBody Map<String, Object> map) {
|
||||
Result<SystemUserAuthDto> result = new Result<SystemUserAuthDto>();
|
||||
try {
|
||||
// String ssoToken = MapUtils.getString(map, "ssoToken");
|
||||
// ssoToken = ssoToken.replace("-", "+").replace("_", "/");
|
||||
// JSONObject decrypt = JSONObject.parseObject(Aes.decrypt(ssoToken, "ssologin66!@#$%^"));
|
||||
// if (decrypt.getLong("exp") < System.currentTimeMillis()) {
|
||||
// log.error("单点登录token已过期");
|
||||
// result.error500("token已过期");
|
||||
// return result;
|
||||
// }
|
||||
// String userId = decrypt.getString("uid");
|
||||
// String account = "";
|
||||
// if (userId.equals("myy")) {
|
||||
// account = "hzxmgl";
|
||||
// }
|
||||
// if (userId.equals("test")) {
|
||||
// account = "hzxm";
|
||||
// }
|
||||
// if (StringUtils.isBlank(account)) {
|
||||
// result.error500("用户不存在");
|
||||
// return result;
|
||||
// }
|
||||
String ssoToken = MapUtils.getString(map, "ssoToken");
|
||||
ssoToken = ssoToken.replace("-", "+").replace("_", "/");
|
||||
JSONObject decrypt = JSONObject.parseObject(Aes.decrypt(ssoToken, "ssologin66!@#$%^"));
|
||||
if (decrypt.getLong("exp") < System.currentTimeMillis()) {
|
||||
log.error("单点登录token已过期");
|
||||
result.error500("token已过期");
|
||||
return result;
|
||||
}
|
||||
String userId = decrypt.getString("uid");
|
||||
String account = "";
|
||||
if (userId.equals("myy")) {
|
||||
account = "hzxmgl";
|
||||
}
|
||||
if (userId.equals("test")) {
|
||||
account = "hzxm";
|
||||
}
|
||||
if (StringUtils.isBlank(account)) {
|
||||
result.error500("用户不存在");
|
||||
return result;
|
||||
}
|
||||
SystemUser user = systemUserService.getOne(Wrappers.<SystemUser>lambdaQuery()
|
||||
.eq(SystemUser::getAccount, "pjadmin"));
|
||||
.eq(SystemUser::getAccount, account));
|
||||
SystemUserAuthDto userInfo = new SystemUserAuthDto();
|
||||
checkLogin(user, userInfo, result);
|
||||
if (result.getCode() != CommonConstant.SC_INTERNAL_SERVER_ERROR_500) {
|
||||
|
||||
@ -95,7 +95,7 @@ public class VideoOpController {
|
||||
Map<String, Object> apply = new HashMap<>();
|
||||
apply.put("cameraIndexCode", codes[i]);
|
||||
apply.put("protocol", MapUtils.getString(map, "protocol"));
|
||||
String url = monitorApi.previewURL(apply);
|
||||
String url = monitorApi.previewURLV1(apply);
|
||||
resultUrl.add(url);
|
||||
}
|
||||
result.setSuccess(true);
|
||||
|
||||
@ -74,4 +74,29 @@ public class EntInspectQuestionExamineController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个问题审批
|
||||
* @param inspectQuestionExamine
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "监督执法问题审批管理", operType = "修改", operDesc = "单个问题审批")
|
||||
@ApiOperation(value = "单个问题审批", notes = "单个问题审批", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<InspectQuestionExamine> edit(@RequestBody InspectQuestionExamine inspectQuestionExamine) {
|
||||
Result<InspectQuestionExamine> result = new Result<InspectQuestionExamine>();
|
||||
InspectQuestionExamine inspectQuestionExamineEntity = inspectQuestionExamineService.getById(inspectQuestionExamine.getId());
|
||||
if (inspectQuestionExamineEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
inspectQuestionExamine.setInspectQuestionId(inspectQuestionExamineEntity.getInspectQuestionId());
|
||||
boolean ok = inspectQuestionExamineService.examine(inspectQuestionExamine);
|
||||
if (ok) {
|
||||
result.success("审批成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import com.zhgd.xmgl.modules.safety.dto.InspectRecordDto;
|
||||
import com.zhgd.xmgl.modules.safety.dto.InspectRecordStatDto;
|
||||
import com.zhgd.xmgl.modules.safety.entity.InspectRecord;
|
||||
import com.zhgd.xmgl.modules.safety.service.IInspectRecordService;
|
||||
import com.zhgd.xmgl.modules.safety.vo.InspectRecordVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -90,6 +91,18 @@ public class EntInspectRecordController {
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加(PC)
|
||||
* @param inspectRecordVo
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "监督执法记录管理", operType = "新增", operDesc = "PC添加监督执法记录信息")
|
||||
@ApiOperation(value = "PC添加监督执法记录信息", notes = "PC添加监督执法记录信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/save")
|
||||
public Result<Boolean> save(@RequestBody InspectRecordVo inspectRecordVo) {
|
||||
return Result.success(inspectRecordsService.saveInfo(inspectRecordVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交审核
|
||||
*
|
||||
@ -104,6 +117,30 @@ public class EntInspectRecordController {
|
||||
return Result.success("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 对整改执法单审批
|
||||
* @param inspectRecord
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "监督执法问题审批管理", operType = "修改", operDesc = "对整改执法单审批")
|
||||
@ApiOperation(value = "对整改执法单审批", notes = "对整改执法单审批", httpMethod = "POST")
|
||||
@PostMapping(value = "/examine")
|
||||
public Result<InspectRecord> examine(@RequestBody InspectRecord inspectRecord) {
|
||||
Result<InspectRecord> result = new Result<InspectRecord>();
|
||||
InspectRecord inspectRecordEntity = inspectRecordsService.getById(inspectRecord.getId());
|
||||
if (inspectRecordEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = inspectRecordsService.examine(inspectRecord);
|
||||
if (ok) {
|
||||
result.success("审批成功!");
|
||||
} else {
|
||||
result.error500("暂无可审批问题!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
|
||||
@ -0,0 +1,190 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentApply;
|
||||
import com.zhgd.xmgl.modules.safety.service.IInvestmentApplyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 投资支付申报
|
||||
* @author: pengj
|
||||
* @date: 2023-07-05
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ent/investmentApply")
|
||||
@Slf4j
|
||||
@Api(tags = "投资支付申报管理")
|
||||
public class EntInvestmentApplyController {
|
||||
@Autowired
|
||||
private IInvestmentApplyService investmentApplyService;
|
||||
|
||||
@Autowired
|
||||
private IEngineeringService engineeringService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付申报管理", operType = "分页查询", operDesc = "分页列表查询投资支付申报信息")
|
||||
@ApiOperation(value = " 分页列表查询投资支付申报信息", notes = "分页列表查询投资支付申报信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name", value = "申报时段名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
public Result<IPage<InvestmentApply>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
IPage<InvestmentApply> pageList = investmentApplyService.pageList(map);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param investmentApply
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付申报管理", operType = "列表查询", operDesc = "列表查询已支付投资申报信息")
|
||||
@ApiOperation(value = " 列表查询已支付投资申报信息", notes = "列表查询已支付投资申报信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "investmentPaymentId", value = "投资支付记录ID", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/payList")
|
||||
public Result<List<InvestmentApply>> payList(@RequestBody InvestmentApply investmentApply) {
|
||||
QueryWrapper<InvestmentApply> queryWrapper = QueryGenerator.initQueryWrapper(investmentApply);
|
||||
queryWrapper.lambda().isNotNull(InvestmentApply::getInvestmentPaymentId);
|
||||
List<InvestmentApply> list = investmentApplyService.list(queryWrapper);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param investmentApply
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付申报管理", operType = "新增", operDesc = "添加投资支付申报信息")
|
||||
@ApiOperation(value = " 添加投资支付申报信息", notes = "添加投资支付申报信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<Object> add(@RequestBody InvestmentApply investmentApply) {
|
||||
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, investmentApply.getEngineeringSn())).getProjectSn();
|
||||
investmentApply.setProjectSn(projectSn);
|
||||
investmentApplyService.saveInfo(investmentApply);
|
||||
return Result.success("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param investmentApply
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付申报管理", operType = "修改", operDesc = "编辑投资支付申报信息")
|
||||
@ApiOperation(value = "编辑投资支付申报信息", notes = "编辑投资支付申报信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<InvestmentApply> edit(@RequestBody InvestmentApply investmentApply) {
|
||||
Result<InvestmentApply> result = new Result<InvestmentApply>();
|
||||
InvestmentApply investmentApplyEntity = investmentApplyService.getById(investmentApply.getId());
|
||||
if (investmentApplyEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = investmentApplyService.updateById(investmentApply);
|
||||
if (ok) {
|
||||
result.success("修改成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付申报管理", operType = "删除", operDesc = "删除投资支付申报信息")
|
||||
@ApiOperation(value = "删除投资支付申报信息", notes = "删除投资支付申报信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付申报ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<InvestmentApply> delete(@RequestBody InvestmentApply investmentApply) {
|
||||
Result<InvestmentApply> result = new Result<InvestmentApply>();
|
||||
InvestmentApply investmentApplyEntity = investmentApplyService.getById(investmentApply.getId());
|
||||
if (investmentApplyEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = investmentApplyService.removeById(investmentApply.getId());
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付申报管理", operType = "批量删除", operDesc = "批量删除投资支付申报信息")
|
||||
@ApiOperation(value = "批量删除投资支付申报信息", notes = "批量删除投资支付申报信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "ids", value = "投资支付申报ID字符串", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<InvestmentApply> deleteBatch(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<InvestmentApply> result = new Result<InvestmentApply>();
|
||||
String ids = MapUtils.getString(map, "ids");
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
result.error500("参数不识别!");
|
||||
} else {
|
||||
this.investmentApplyService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付申报管理", operType = "查询", operDesc = "通过id查询投资支付申报信息")
|
||||
@ApiOperation(value = "通过id查询投资支付申报信息", notes = "通过id查询投资支付申报信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付申报ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/queryById")
|
||||
public Result<InvestmentApply> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<InvestmentApply> result = new Result<InvestmentApply>();
|
||||
InvestmentApply investmentApply = investmentApplyService.getById(MapUtils.getString(map, "id"));
|
||||
if (investmentApply == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(investmentApply);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentContract;
|
||||
import com.zhgd.xmgl.modules.safety.service.IInvestmentContractService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 投资支付合同
|
||||
* @author: pengj
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ent/investmentContract")
|
||||
@Slf4j
|
||||
@Api(tags = "投资支付合同管理")
|
||||
public class EntInvestmentContractController {
|
||||
@Autowired
|
||||
private IInvestmentContractService investmentContractService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付合同管理", operType = "分页查询", operDesc = "分页列表查询投资支付合同信息")
|
||||
@ApiOperation(value = " 分页列表查询投资支付合同信息", notes = "分页列表查询投资支付合同信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "contractTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "contractTime_end", value = "截止时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
public Result<IPage<InvestmentContract>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<InvestmentContract> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentContract.class, map);
|
||||
Page<InvestmentContract> page = PageUtil.getPage(map);
|
||||
IPage<InvestmentContract> pageList = investmentContractService.page(page, queryWrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param investmentContract
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付合同管理", operType = "列表查询", operDesc = "列表查询投资支付合同信息")
|
||||
@ApiOperation(value = " 列表查询投资支付合同信息", notes = "列表查询投资支付合同信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<InvestmentContract>> queryList(@RequestBody InvestmentContract investmentContract) {
|
||||
QueryWrapper<InvestmentContract> queryWrapper = QueryGenerator.initQueryWrapper(investmentContract);
|
||||
List<InvestmentContract> list = investmentContractService.list(queryWrapper);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付合同管理", operType = "查询", operDesc = "通过id查询投资支付合同信息")
|
||||
@ApiOperation(value = "通过id查询投资支付合同信息", notes = "通过id查询投资支付合同信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付合同ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/queryById")
|
||||
public Result<InvestmentContract> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<InvestmentContract> result = new Result<InvestmentContract>();
|
||||
InvestmentContract investmentContract = investmentContractService.getById(MapUtils.getString(map, "id"));
|
||||
if (investmentContract == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(investmentContract);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
|
||||
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 投资支付
|
||||
* @author: pengj
|
||||
* @date: 2023-07-01
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ent/investmentPayment")
|
||||
@Slf4j
|
||||
@Api(tags = "投资支付管理")
|
||||
public class EntInvestmentPaymentController {
|
||||
@Autowired
|
||||
private IInvestmentPaymentService investmentPaymentService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付管理", operType = "分页查询", operDesc = "分页列表查询投资支付信息")
|
||||
@ApiOperation(value = " 分页列表查询投资支付信息", notes = "分页列表查询投资支付信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "contractId", value = "合同ID", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "payTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "payTime_end", value = "截止时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
public Result<IPage<InvestmentPayment>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<InvestmentPayment> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPayment.class, map);
|
||||
Page<InvestmentPayment> page = PageUtil.getPage(map);
|
||||
IPage<InvestmentPayment> pageList = investmentPaymentService.page(page, queryWrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param investmentPayment
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付管理", operType = "列表查询", operDesc = "列表查询投资支付信息")
|
||||
@ApiOperation(value = " 列表查询投资支付信息", notes = "列表查询投资支付信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<InvestmentPayment>> queryList(@RequestBody InvestmentPayment investmentPayment) {
|
||||
QueryWrapper<InvestmentPayment> queryWrapper = QueryGenerator.initQueryWrapper(investmentPayment);
|
||||
List<InvestmentPayment> list = investmentPaymentService.list(queryWrapper);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付管理", operType = "查询", operDesc = "通过id查询投资支付信息")
|
||||
@ApiOperation(value = "通过id查询投资支付信息", notes = "通过id查询投资支付信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/queryById")
|
||||
public Result<InvestmentPayment> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<InvestmentPayment> result = new Result<InvestmentPayment>();
|
||||
InvestmentPayment investmentPayment = investmentPaymentService.getById(MapUtils.getString(map, "id"));
|
||||
if (investmentPayment == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(investmentPayment);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,185 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.safety.dto.InvestmentPaymentDetailDto;
|
||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentDetail;
|
||||
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentDetailService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 投资支付子项详细
|
||||
* @author: pengj
|
||||
* @date: 2023-07-01
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ent/investmentPaymentDetail")
|
||||
@Slf4j
|
||||
@Api(tags = "投资支付子项详细管理")
|
||||
public class EntInvestmentPaymentDetailController {
|
||||
@Autowired
|
||||
private IInvestmentPaymentDetailService investmentPaymentDetailService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项详细管理", operType = "分页查询", operDesc = "分页列表查询投资支付子项详细信息")
|
||||
@ApiOperation(value = " 分页列表查询投资支付子项详细信息", notes = "分页列表查询投资支付子项详细信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "itemId", value = "投资支付子项id", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
public Result<IPage<InvestmentPaymentDetailDto>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<InvestmentPaymentDetail> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentDetail.class, map);
|
||||
Page<InvestmentPaymentDetail> page = PageUtil.getPage(map);
|
||||
IPage<InvestmentPaymentDetailDto> pageList = investmentPaymentDetailService.pageList(page, queryWrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param investmentPaymentDetail
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项详细管理", operType = "列表查询", operDesc = "列表查询投资支付子项详细信息")
|
||||
@ApiOperation(value = " 列表查询投资支付子项详细信息", notes = "列表查询投资支付子项详细信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<InvestmentPaymentDetail>> queryList(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) {
|
||||
QueryWrapper<InvestmentPaymentDetail> queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentDetail);
|
||||
List<InvestmentPaymentDetail> list = investmentPaymentDetailService.list(queryWrapper);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param investmentPaymentDetail
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项详细管理", operType = "新增", operDesc = "添加投资支付子项详细信息")
|
||||
@ApiOperation(value = " 添加投资支付子项详细信息", notes = "添加投资支付子项详细信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<Object> add(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) {
|
||||
investmentPaymentDetailService.save(investmentPaymentDetail);
|
||||
return Result.success("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param investmentPaymentDetail
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项详细管理", operType = "修改", operDesc = "编辑投资支付子项详细信息")
|
||||
@ApiOperation(value = "编辑投资支付子项详细信息", notes = "编辑投资支付子项详细信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<InvestmentPaymentDetail> edit(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) {
|
||||
Result<InvestmentPaymentDetail> result = new Result<InvestmentPaymentDetail>();
|
||||
InvestmentPaymentDetail investmentPaymentDetailEntity = investmentPaymentDetailService.getById(investmentPaymentDetail.getId());
|
||||
if (investmentPaymentDetailEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = investmentPaymentDetailService.updateById(investmentPaymentDetail);
|
||||
if (ok) {
|
||||
result.success("修改成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项详细管理", operType = "删除", operDesc = "删除投资支付子项详细信息")
|
||||
@ApiOperation(value = "删除投资支付子项详细信息", notes = "删除投资支付子项详细信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付子项详细ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<InvestmentPaymentDetail> delete(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) {
|
||||
Result<InvestmentPaymentDetail> result = new Result<InvestmentPaymentDetail>();
|
||||
InvestmentPaymentDetail investmentPaymentDetailEntity = investmentPaymentDetailService.getById(investmentPaymentDetail.getId());
|
||||
if (investmentPaymentDetailEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = investmentPaymentDetailService.removeById(investmentPaymentDetail.getId());
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项详细管理", operType = "批量删除", operDesc = "批量删除投资支付子项详细信息")
|
||||
@ApiOperation(value = "批量删除投资支付子项详细信息", notes = "批量删除投资支付子项详细信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "ids", value = "投资支付子项详细ID字符串", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<InvestmentPaymentDetail> deleteBatch(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<InvestmentPaymentDetail> result = new Result<InvestmentPaymentDetail>();
|
||||
String ids = MapUtils.getString(map, "ids");
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
result.error500("参数不识别!");
|
||||
} else {
|
||||
this.investmentPaymentDetailService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项详细管理", operType = "查询", operDesc = "通过id查询投资支付子项详细信息")
|
||||
@ApiOperation(value = "通过id查询投资支付子项详细信息", notes = "通过id查询投资支付子项详细信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付子项详细ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/queryById")
|
||||
public Result<InvestmentPaymentDetail> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<InvestmentPaymentDetail> result = new Result<InvestmentPaymentDetail>();
|
||||
InvestmentPaymentDetail investmentPaymentDetail = investmentPaymentDetailService.getById(MapUtils.getString(map, "id"));
|
||||
if (investmentPaymentDetail == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(investmentPaymentDetail);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,172 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentItem;
|
||||
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentItemService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 投资支付子项
|
||||
* @author: pengj
|
||||
* @date: 2023-07-01
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ent/investmentPaymentItem")
|
||||
@Slf4j
|
||||
@Api(tags = "投资支付子项管理")
|
||||
public class EntInvestmentPaymentItemController {
|
||||
@Autowired
|
||||
private IInvestmentPaymentItemService investmentPaymentItemService;
|
||||
|
||||
@Autowired
|
||||
private IEngineeringService engineeringService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项管理", operType = "分页查询", operDesc = "分页列表查询投资支付子项信息")
|
||||
@ApiOperation(value = " 分页列表查询投资支付子项信息", notes = "分页列表查询投资支付子项信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "reportContent", value = "汇报内容", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "investmentApplyId", value = "投资支付申报ID", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@PostMapping(value = "/page")
|
||||
public Result<IPage<InvestmentPaymentItem>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
IPage<InvestmentPaymentItem> pageList = investmentPaymentItemService.pageList(map);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param investmentPaymentItem
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项管理", operType = "列表查询", operDesc = "列表查询投资支付子项信息")
|
||||
@ApiOperation(value = " 列表查询投资支付子项信息", notes = "列表查询投资支付子项信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<InvestmentPaymentItem>> queryList(@RequestBody InvestmentPaymentItem investmentPaymentItem) {
|
||||
if (null == investmentPaymentItem.getInvestmentApplyId()) {
|
||||
return Result.success(null);
|
||||
}
|
||||
QueryWrapper<InvestmentPaymentItem> queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentItem);
|
||||
List<InvestmentPaymentItem> list = investmentPaymentItemService.list(queryWrapper);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param investmentPaymentItem
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项管理", operType = "新增", operDesc = "添加投资支付子项信息")
|
||||
@ApiOperation(value = " 添加投资支付子项信息", notes = "添加投资支付子项信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<Object> add(@RequestBody InvestmentPaymentItem investmentPaymentItem) {
|
||||
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentItem.getEngineeringSn())).getProjectSn();
|
||||
investmentPaymentItem.setProjectSn(projectSn);
|
||||
investmentPaymentItemService.saveInfo(investmentPaymentItem);
|
||||
return Result.success("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param investmentPaymentItem
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项管理", operType = "修改", operDesc = "编辑投资支付子项信息")
|
||||
@ApiOperation(value = "编辑投资支付子项信息", notes = "编辑投资支付子项信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<InvestmentPaymentItem> edit(@RequestBody InvestmentPaymentItem investmentPaymentItem) {
|
||||
Result<InvestmentPaymentItem> result = new Result<InvestmentPaymentItem>();
|
||||
InvestmentPaymentItem investmentPaymentItemEntity = investmentPaymentItemService.getById(investmentPaymentItem.getId());
|
||||
if (investmentPaymentItemEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = investmentPaymentItemService.updateById(investmentPaymentItem);
|
||||
if (ok) {
|
||||
result.success("修改成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项管理", operType = "删除", operDesc = "删除投资支付子项信息")
|
||||
@ApiOperation(value = "删除投资支付子项信息", notes = "删除投资支付子项信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付子项ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<InvestmentPaymentItem> delete(@RequestBody InvestmentPaymentItem investmentPaymentItem) {
|
||||
Result<InvestmentPaymentItem> result = new Result<InvestmentPaymentItem>();
|
||||
InvestmentPaymentItem investmentPaymentItemEntity = investmentPaymentItemService.getById(investmentPaymentItem.getId());
|
||||
if (investmentPaymentItemEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = investmentPaymentItemService.removeById(investmentPaymentItem.getId());
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付子项管理", operType = "查询", operDesc = "通过id查询投资支付子项信息")
|
||||
@ApiOperation(value = "通过id查询投资支付子项信息", notes = "通过id查询投资支付子项信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付子项ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/queryById")
|
||||
public Result<InvestmentPaymentItem> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<InvestmentPaymentItem> result = new Result<InvestmentPaymentItem>();
|
||||
InvestmentPaymentItem investmentPaymentItem = investmentPaymentItemService.getById(MapUtils.getString(map, "id"));
|
||||
if (investmentPaymentItem == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(investmentPaymentItem);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,151 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentStat;
|
||||
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentStatService;
|
||||
import com.zhgd.xmgl.security.SecurityUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 投资支付统计
|
||||
* @author: pengj
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ent/investmentPaymentStat")
|
||||
@Slf4j
|
||||
@Api(tags = "投资支付统计管理")
|
||||
public class EntInvestmentPaymentStatController {
|
||||
@Autowired
|
||||
private IInvestmentPaymentStatService investmentPaymentStatService;
|
||||
|
||||
@Autowired
|
||||
private IEngineeringService engineeringService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付统计管理", operType = "分页查询", operDesc = "查询对应申报时段的投资支付统计信息")
|
||||
@ApiOperation(value = " 查询对应申报时段的投资支付统计信息", notes = "查询对应申报时段的投资支付统计信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "investmentApplyId", value = "投资支付申报ID", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/queryByApplyId")
|
||||
public Result<InvestmentPaymentStat> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
String investmentApplyId = MapUtils.getString(map, "investmentApplyId");
|
||||
if (StringUtils.isBlank(investmentApplyId)) {
|
||||
return Result.success(null);
|
||||
}
|
||||
QueryWrapper<InvestmentPaymentStat> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentStat.class, map);
|
||||
return Result.success(investmentPaymentStatService.getOne(queryWrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param investmentPaymentStat
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付统计管理", operType = "新增", operDesc = "添加投资支付统计信息")
|
||||
@ApiOperation(value = " 添加投资支付统计信息", notes = "添加投资支付统计信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<Object> add(@RequestBody InvestmentPaymentStat investmentPaymentStat) {
|
||||
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentStat.getEngineeringSn())).getProjectSn();
|
||||
investmentPaymentStat.setProjectSn(projectSn);
|
||||
investmentPaymentStatService.save(investmentPaymentStat);
|
||||
return Result.success("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param investmentPaymentStat
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付统计管理", operType = "修改", operDesc = "编辑投资支付统计信息")
|
||||
@ApiOperation(value = "编辑投资支付统计信息", notes = "编辑投资支付统计信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<InvestmentPaymentStat> edit(@RequestBody InvestmentPaymentStat investmentPaymentStat) {
|
||||
Result<InvestmentPaymentStat> result = new Result<InvestmentPaymentStat>();
|
||||
InvestmentPaymentStat investmentPaymentStatEntity = investmentPaymentStatService.getById(investmentPaymentStat.getId());
|
||||
if (investmentPaymentStatEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = investmentPaymentStatService.updateById(investmentPaymentStat);
|
||||
if (ok) {
|
||||
result.success("修改成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付统计管理", operType = "删除", operDesc = "删除投资支付统计信息")
|
||||
@ApiOperation(value = "删除投资支付统计信息", notes = "删除投资支付统计信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付统计ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<InvestmentPaymentStat> delete(@RequestBody InvestmentPaymentStat investmentPaymentStat) {
|
||||
Result<InvestmentPaymentStat> result = new Result<InvestmentPaymentStat>();
|
||||
InvestmentPaymentStat investmentPaymentStatEntity = investmentPaymentStatService.getById(investmentPaymentStat.getId());
|
||||
if (investmentPaymentStatEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = investmentPaymentStatService.removeById(investmentPaymentStat.getId());
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
} else {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "投资支付统计管理", operType = "查询", operDesc = "通过id查询投资支付统计信息")
|
||||
@ApiOperation(value = "通过id查询投资支付统计信息", notes = "通过id查询投资支付统计信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "投资支付统计ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/queryById")
|
||||
public Result<InvestmentPaymentStat> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<InvestmentPaymentStat> result = new Result<InvestmentPaymentStat>();
|
||||
InvestmentPaymentStat investmentPaymentStat = investmentPaymentStatService.getById(MapUtils.getString(map, "id"));
|
||||
if (investmentPaymentStat == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(investmentPaymentStat);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -2,17 +2,14 @@ package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
||||
import com.zhgd.xmgl.modules.safety.entity.ProjectNodePlan;
|
||||
import com.zhgd.xmgl.modules.safety.service.IProjectNodePlanService;
|
||||
import com.zhgd.xmgl.security.SecurityUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -46,8 +43,23 @@ public class EntProjectNodePlanController {
|
||||
@Autowired
|
||||
private IProjectNodePlanService projectNodePlanService;
|
||||
|
||||
@Autowired
|
||||
private IEngineeringService engineeringService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询全景计划工程信息")
|
||||
@ApiOperation(value = " 分页列表查询全景计划工程信息", notes = "分页列表查询全景计划工程信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "engineeringName", value = "工程名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@PostMapping(value = "/engineeringPage")
|
||||
public Result<IPage<EngineeringPageDto>> engineeringPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
return Result.success(projectNodePlanService.pageListForSuperior(map));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@ -57,9 +69,10 @@ public class EntProjectNodePlanController {
|
||||
@OperLog(operModul = "项目全景计划管理", operType = "分页查询", operDesc = "分页列表查询项目全景计划信息")
|
||||
@ApiOperation(value = " 分页列表查询项目全景计划信息", notes = "分页列表查询项目全景计划信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "nodeName", value = "节点名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realCompleteTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realCompleteTime_end", value = "截止时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@ -86,23 +99,6 @@ public class EntProjectNodePlanController {
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectNodePlan
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "项目全景计划管理", operType = "新增", operDesc = "添加项目全景计划信息")
|
||||
@ApiOperation(value = " 添加项目全景计划信息", notes = "添加项目全景计划信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<Object> add(@RequestBody ProjectNodePlan projectNodePlan) {
|
||||
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, projectNodePlan.getEngineeringSn())).getProjectSn();
|
||||
projectNodePlan.setProjectSn(projectSn);
|
||||
projectNodePlanService.save(projectNodePlan);
|
||||
return Result.success("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
@ -118,7 +114,6 @@ public class EntProjectNodePlanController {
|
||||
if (projectNodePlanEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
projectNodePlan.setProjectSn(SecurityUtil.getUser().getSn());
|
||||
boolean ok = projectNodePlanService.updateById(projectNodePlan);
|
||||
if (ok) {
|
||||
result.success("修改成功!");
|
||||
@ -126,7 +121,6 @@ public class EntProjectNodePlanController {
|
||||
result.success("操作失败!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -8,12 +8,12 @@ import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.PageUtil;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.EngineeringPageDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||
import com.zhgd.xmgl.modules.safety.dto.ProjectSubItemDto;
|
||||
import com.zhgd.xmgl.modules.safety.entity.ProjectSubItem;
|
||||
import com.zhgd.xmgl.modules.safety.service.IProjectSubItemService;
|
||||
import com.zhgd.xmgl.security.SecurityUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
@ -48,6 +49,24 @@ public class EntProjectSubItemController {
|
||||
|
||||
@Autowired
|
||||
private IEngineeringService engineeringService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "扬尘管理", operType = "分页查询", operDesc = "分页列表查询分部分项工程信息")
|
||||
@ApiOperation(value = " 分页列表查询分部分项工程信息", notes = "分页列表查询分部分项工程信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "engineeringName", value = "工程名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@PostMapping(value = "/engineeringPage")
|
||||
public Result<IPage<EngineeringPageDto>> engineeringPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
return Result.success(projectSubItemService.pageListForSuperior(map));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@ -56,8 +75,10 @@ public class EntProjectSubItemController {
|
||||
@OperLog(operModul = "分部分项管理", operType = "分页查询", operDesc = "分页列表查询分部分项信息")
|
||||
@ApiOperation(value = " 分页列表查询分部分项信息", notes = "分页列表查询分部分项信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "name", value = "分部分项名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:已逾期)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:逾期未开始;5:逾期进行中;6:逾期已完成)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "approvalStatus", value = "审核状态(0:未审核通过;1:已审核通过)", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ -79,10 +100,10 @@ public class EntProjectSubItemController {
|
||||
@OperLog(operModul = "分部分项管理", operType = "分页查询", operDesc = "分页列表查询分部分项信息")
|
||||
@ApiOperation(value = " 分页列表查询分部分项信息", notes = "分页列表查询分部分项信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "name", value = "分部分项名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:已逾期)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "approvalStatus", value = "审核状态(0:未审核通过;1:已审核通过)", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ -105,9 +126,9 @@ public class EntProjectSubItemController {
|
||||
@OperLog(operModul = "分部分项管理", operType = "列表查询", operDesc = "列表查询分部分项信息")
|
||||
@ApiOperation(value = " 列表查询分部分项信息", notes = "列表查询分部分项信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<ProjectSubItem>> queryList(@RequestBody ProjectSubItem projectSubItem) {
|
||||
public Result<List<ProjectSubItemDto>> queryList(@RequestBody ProjectSubItem projectSubItem) {
|
||||
QueryWrapper<ProjectSubItem> queryWrapper = QueryGenerator.initQueryWrapper(projectSubItem);
|
||||
List<ProjectSubItem> list = projectSubItemService.list(queryWrapper);
|
||||
List<ProjectSubItemDto> list = projectSubItemService.getList(queryWrapper);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@ -143,7 +164,6 @@ public class EntProjectSubItemController {
|
||||
if (projectSubItemEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
projectSubItem.setProjectSn(SecurityUtil.getUser().getSn());
|
||||
boolean ok = projectSubItemService.updateInfo(projectSubItem);
|
||||
if (ok) {
|
||||
result.success("修改成功!");
|
||||
@ -200,4 +220,14 @@ public class EntProjectSubItemController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 甘特图mpp文件导入(导入分部分项数据)
|
||||
*/
|
||||
@OperLog(operModul = "分部分项管理", operType = "导入", operDesc = "甘特图mpp文件导入")
|
||||
@ApiOperation(value = "甘特图mpp文件导入", notes = "甘特图mpp文件导入", httpMethod="POST")
|
||||
@PostMapping("/importMpp")
|
||||
public Result<Object> importMpp(MultipartFile file) {
|
||||
return Result.success(projectSubItemService.importMpp(file));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,14 +3,14 @@ package com.zhgd.xmgl.modules.basicdata.controller.government;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.wisdom.dto.MapEnvironAlarmDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.ProjectDto;
|
||||
import com.zhgd.xmgl.modules.wisdom.dto.MapAiAlarmDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Enterprise;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Project;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IProjectService;
|
||||
import com.zhgd.xmgl.modules.wisdom.dto.MapAiAlarmDto;
|
||||
import com.zhgd.xmgl.modules.wisdom.dto.MapEnvironAlarmDto;
|
||||
import com.zhgd.xmgl.modules.wisdom.service.IAiMonitorAlarmService;
|
||||
import com.zhgd.xmgl.modules.wisdom.service.IEnvironmentAlarmService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IProjectService;
|
||||
import com.zhgd.xmgl.security.SecurityUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -172,4 +173,38 @@ public class GovProjectController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public final static double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
|
||||
public static void main(String[] args) {
|
||||
System.out.println(bd2gd(121.70240924447587, 36.85019248472488));
|
||||
}
|
||||
|
||||
public static double[] gcj02_To_Bd09(double lat, double lon) {
|
||||
double x = lon, y = lat;
|
||||
double z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
|
||||
double theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
|
||||
double tempLon = z * Math.cos(theta) + 0.0065;
|
||||
double tempLat = z * Math.sin(theta) + 0.006;
|
||||
double[] gps = {tempLat, tempLon};
|
||||
return gps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 百度坐标转换高德坐标
|
||||
*
|
||||
* @param bd_lon 经度
|
||||
* @param bd_lat 纬度
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Double> bd2gd(double bd_lon, double bd_lat) {
|
||||
double x = bd_lon - 0.0065, y = bd_lat - 0.006;
|
||||
double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
|
||||
double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
|
||||
double gd_lon = z * Math.cos(theta);
|
||||
double gd_lat = z * Math.sin(theta);
|
||||
Map<String, Double> data = new HashMap<>();
|
||||
data.put("lon", gd_lon);
|
||||
data.put("lat", gd_lat);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@ package com.zhgd.xmgl.modules.basicdata.controller.government;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
@ -90,7 +89,7 @@ public class GovProjectSubItemController {
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程SN", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "name", value = "分部分项名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:已逾期)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:逾期未开始;5:逾期进行中;6:逾期已完成)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller.government;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.basicdata.dto.SystemUserDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.EngineeringMain;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringMainService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
import com.zhgd.xmgl.modules.basicdata.vo.SystemUserVo;
|
||||
import com.zhgd.xmgl.valid.AddGroup;
|
||||
@ -25,6 +28,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -42,6 +46,9 @@ public class GovSystemUserController {
|
||||
@Autowired
|
||||
private ISystemUserService systemUserService;
|
||||
|
||||
@Autowired
|
||||
private IEngineeringMainService engineeringMainService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @return
|
||||
@ -162,25 +169,28 @@ public class GovSystemUserController {
|
||||
return result;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 通过政务id查询系统用户表信息
|
||||
// * @return
|
||||
// */
|
||||
// @OperLog(operModul = "用户管理", operType = "查询", operDesc = "通过政务id查询系统用户表信息")
|
||||
// @ApiOperation(value = "通过政务id查询系统用户表信息", notes = "通过政务id查询系统用户表信息" , httpMethod="POST")
|
||||
// @ApiImplicitParam(name = "governmentId", value = "政务id", paramType = "body", required = true, dataType = "Integer")
|
||||
// @PostMapping(value = "/queryByGovernmentId")
|
||||
// public Result<SystemUser> queryByGovernmentId(@ApiIgnore @RequestBody Map<String,Object> map) {
|
||||
// Result<SystemUser> result = new Result<SystemUser>();
|
||||
// SystemUser systemUser = systemUserService.getOne(Wrappers.<SystemUser>lambdaQuery()
|
||||
// .eq(SystemUser::getSn, MapUtils.getString(map,"governmentId"))
|
||||
// .eq(SystemUser::getIsManager, true));
|
||||
// if(systemUser==null) {
|
||||
// result.error500("未找到对应实体");
|
||||
// }else {
|
||||
// result.setResult(systemUser);
|
||||
// result.setSuccess(true);
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
/**
|
||||
* 通过工程SN查询对应企业用户信息
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "用户管理", operType = "查询", operDesc = "通过工程SN查询对应企业用户信息")
|
||||
@ApiOperation(value = "通过工程SN查询对应企业用户信息", notes = "通过工程SN查询对应企业用户信息" , httpMethod="POST")
|
||||
@ApiImplicitParam(name = "engineeringSn", value = "工程sn", paramType = "body", required = true, dataType = "String")
|
||||
@PostMapping(value = "/queryByEngineering")
|
||||
public Result<SystemUser> queryByEngineering(@ApiIgnore @RequestBody Map<String,Object> map) {
|
||||
Result<SystemUser> result = new Result<SystemUser>();
|
||||
String engineeringSn = MapUtils.getString(map, "engineeringSn");
|
||||
List<String> enterpriseSnList = engineeringMainService.list(Wrappers.<EngineeringMain>lambdaQuery().eq(EngineeringMain::getEngineeringSn, engineeringSn))
|
||||
.stream().map(e -> e.getEnterpriseSn()).collect(Collectors.toList());
|
||||
SystemUser systemUser = systemUserService.getOne(Wrappers.<SystemUser>lambdaQuery()
|
||||
.in(SystemUser::getSn, enterpriseSnList)
|
||||
.eq(SystemUser::getIsManager, true));
|
||||
if(systemUser==null) {
|
||||
result.error500("未找到对应实体");
|
||||
}else {
|
||||
result.setResult(systemUser);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,22 +80,6 @@ public class ProjectNodePlanController {
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 添加
|
||||
// *
|
||||
// * @param projectNodePlan
|
||||
// * @return
|
||||
// */
|
||||
// @OperLog(operModul = "项目全景计划管理", operType = "新增", operDesc = "添加项目全景计划信息")
|
||||
// @ApiOperation(value = " 添加项目全景计划信息", notes = "添加项目全景计划信息", httpMethod = "POST")
|
||||
// @PostMapping(value = "/add")
|
||||
// public Result<Object> add(@RequestBody ProjectNodePlan projectNodePlan) {
|
||||
// projectNodePlan.setProjectSn(SecurityUtil.getUser().getSn());
|
||||
// projectNodePlanService.save(projectNodePlan);
|
||||
// return Result.success("添加成功!");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
|
||||
@ -53,7 +53,7 @@ public class ProjectSubItemController {
|
||||
@ApiOperation(value = " 分页列表查询分部分项信息", notes = "分页列表查询分部分项信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name", value = "分部分项名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:已逾期)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "state", value = "状态(1:未开始;2:进行中;3:已完成;4:逾期未开始;5:逾期进行中;6:逾期已完成)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "realEndTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "realEndTime_end", value = "截止时间", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
|
||||
@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author pengj
|
||||
@ -68,4 +69,7 @@ public class SystemUserAuthDto {
|
||||
|
||||
@ApiModelProperty(value = "是否为工程账号")
|
||||
private Boolean isEngineering;
|
||||
|
||||
@ApiModelProperty(value = "企业类型")
|
||||
private List<Integer> enterpriseType;
|
||||
}
|
||||
|
||||
@ -110,6 +110,7 @@ public class FileDetailServiceImpl extends ServiceImpl<FileDetailMapper, FileDet
|
||||
result.put("url", imagePath + rName);
|
||||
result.put("originalFilename", orgName);
|
||||
result.put("filename", rName);
|
||||
result.put("contentType", file.getContentType());
|
||||
} catch (Exception ex) {
|
||||
log.error(ex.getMessage());
|
||||
}
|
||||
|
||||
@ -75,11 +75,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
QueryWrapper<SystemUser> wrapper = Wrappers.<SystemUser>query();
|
||||
SecurityUser user = SecurityUtil.getUser();
|
||||
wrapper.eq("u.account_type", user.getAccountType());
|
||||
if (systemUser.getSn() == null) {
|
||||
wrapper.eq("u.sn", user.getSn());
|
||||
} else {
|
||||
wrapper.eq("u.sn", systemUser.getSn());
|
||||
}
|
||||
wrapper.eq("u.sn", systemUser.getSn());
|
||||
wrapper.ne("u.user_id", user.getUserId());
|
||||
return baseMapper.getPageList(wrapper);
|
||||
}
|
||||
|
||||
@ -94,18 +94,18 @@ public class ProjectNodePlan implements Serializable {
|
||||
@Excel(name = "职能条线", width = 15)
|
||||
@ApiModelProperty(value = "职能条线")
|
||||
private String phaseName;
|
||||
/**
|
||||
* 节点责任人编号
|
||||
*/
|
||||
@Excel(name = "节点责任人编号", width = 15)
|
||||
@ApiModelProperty(value = "节点责任人编号")
|
||||
private String chargerNumber;
|
||||
/**
|
||||
* 节点责任人
|
||||
*/
|
||||
@Excel(name = "节点责任人", width = 15)
|
||||
@ApiModelProperty(value = "节点责任人")
|
||||
private String chargerName;
|
||||
/**
|
||||
* 节点责任人联系方式
|
||||
*/
|
||||
@Excel(name = "节点责任人联系方式", width = 15)
|
||||
@ApiModelProperty(value = "节点责任人联系方式")
|
||||
private String chargerPhone;
|
||||
/**
|
||||
* 节点失效标记:0-有效、1-失效
|
||||
*/
|
||||
|
||||
@ -161,4 +161,11 @@ public class ProjectSubItem implements Serializable {
|
||||
@Excel(name = "工程sn", width = 15)
|
||||
@ApiModelProperty(value = "工程sn")
|
||||
private String engineeringSn;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核通过;1:已审核通过)
|
||||
*/
|
||||
@Excel(name = "审核状态(0:未审核通过;1:已审核通过)", width = 15)
|
||||
@ApiModelProperty(value = "审核状态(0:未审核通过;1:已审核通过)")
|
||||
private Integer approvalStatus;
|
||||
}
|
||||
|
||||
@ -77,11 +77,13 @@ public class EnterpriseScoreServiceImpl extends ServiceImpl<EnterpriseScoreMappe
|
||||
if (one != null) {
|
||||
throw new CustomException("已存在绑定关系");
|
||||
}
|
||||
EngineeringMain engineeringMain = new EngineeringMain();
|
||||
engineeringMain.setEnterpriseSn(enterpriseScore.getEnterpriseSn());
|
||||
engineeringMain.setEngineeringSn(enterpriseScore.getEngineeringSn());
|
||||
engineeringMain.setType(enterpriseScore.getEnterpriseType());
|
||||
engineeringMainService.save(engineeringMain);
|
||||
if (StringUtils.isNotBlank(enterpriseScore.getEnterpriseSn())) {
|
||||
EngineeringMain engineeringMain = new EngineeringMain();
|
||||
engineeringMain.setEnterpriseSn(enterpriseScore.getEnterpriseSn());
|
||||
engineeringMain.setEngineeringSn(enterpriseScore.getEngineeringSn());
|
||||
engineeringMain.setType(enterpriseScore.getEnterpriseType());
|
||||
engineeringMainService.save(engineeringMain);
|
||||
}
|
||||
return this.save(enterpriseScore);
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,8 @@ public class ProjectSubItemServiceImpl extends ServiceImpl<ProjectSubItemMapper,
|
||||
|
||||
@Override
|
||||
public Page<ProjectSubItemDto> pageList(Page page, QueryWrapper<ProjectSubItem> wrapper) {
|
||||
wrapper.eq("parent_id", 0);
|
||||
wrapper.lambda().eq(ProjectSubItem::getParentId, 0);
|
||||
wrapper.lambda().orderByAsc(ProjectSubItem::getPlanStartTime);
|
||||
Page<ProjectSubItemDto> pageList = PageUtil.copyProperties(baseMapper.selectPage(page, wrapper), ProjectSubItemDto.class);
|
||||
List<ProjectSubItemDto> records = pageList.getRecords();
|
||||
build(records);
|
||||
@ -78,7 +79,8 @@ public class ProjectSubItemServiceImpl extends ServiceImpl<ProjectSubItemMapper,
|
||||
|
||||
@Override
|
||||
public Page<ProjectSubItem> pageParentList(Page page, QueryWrapper<ProjectSubItem> wrapper) {
|
||||
wrapper.eq("parent_id", 0);
|
||||
wrapper.lambda().eq(ProjectSubItem::getParentId, 0);
|
||||
wrapper.lambda().orderByAsc(ProjectSubItem::getPlanStartTime);
|
||||
Page<ProjectSubItem> pageList = baseMapper.selectPage(page, wrapper);
|
||||
build1(pageList.getRecords());
|
||||
return pageList;
|
||||
@ -86,7 +88,9 @@ public class ProjectSubItemServiceImpl extends ServiceImpl<ProjectSubItemMapper,
|
||||
|
||||
@Override
|
||||
public List<ProjectSubItemDto> getList(QueryWrapper<ProjectSubItem> wrapper) {
|
||||
wrapper.eq("parent_id", 0);
|
||||
wrapper.lambda().eq(ProjectSubItem::getApprovalStatus, 1);
|
||||
wrapper.lambda().eq(ProjectSubItem::getParentId, 0);
|
||||
wrapper.lambda().orderByAsc(ProjectSubItem::getPlanStartTime);
|
||||
List<ProjectSubItemDto> records = PageUtil.copyProperties(baseMapper.selectList(wrapper), ProjectSubItemDto.class);
|
||||
build(records);
|
||||
return records;
|
||||
@ -283,13 +287,13 @@ public class ProjectSubItemServiceImpl extends ServiceImpl<ProjectSubItemMapper,
|
||||
endTime = projectSubItem.getRealEndTime();
|
||||
}
|
||||
if (DateUtil.between(projectSubItem.getPlanEndTime(), endTime, DateUnit.DAY, false) > 0){
|
||||
if (task.getPercentageComplete().intValue() == 100 || (actualFinishDate != null && actualFinishDate.getTime() <= System.currentTimeMillis())) {
|
||||
projectSubItem.setState(6);
|
||||
} else if (task.getPercentageComplete().intValue() == 0 || actualStartDate == null || actualStartDate.getTime() > System.currentTimeMillis()) {
|
||||
// if (task.getPercentageComplete().intValue() == 100 || (actualFinishDate != null && actualFinishDate.getTime() <= System.currentTimeMillis())) {
|
||||
// projectSubItem.setState(6);
|
||||
// } else if (task.getPercentageComplete().intValue() == 0 || actualStartDate == null || actualStartDate.getTime() > System.currentTimeMillis()) {
|
||||
// projectSubItem.setState(4);
|
||||
// } else {
|
||||
projectSubItem.setState(4);
|
||||
} else {
|
||||
projectSubItem.setState(5);
|
||||
}
|
||||
// }
|
||||
} else if (task.getPercentageComplete().intValue() == 100 || (actualFinishDate != null && actualFinishDate.getTime() <= System.currentTimeMillis())) {
|
||||
projectSubItem.setState(3);
|
||||
} else if (task.getPercentageComplete().intValue() == 0 || actualStartDate == null || actualStartDate.getTime() > System.currentTimeMillis()) {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "1f3d3e5b9fe340bab84de67b0de08f44",
|
||||
"name" : "在建项目指标",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1688352901714,
|
||||
"updateTime" : 1689678565388,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -34,4 +34,4 @@
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.selectOne("SELECT IFNULL(SUM(IF(major_project_type = 1, 1, 0)), 0) importance, IFNULL(SUM(IF(project_type = 1 AND state = 1, 1, 0)), 0) bridge, IFNULL(SUM(IF(project_type = 2 AND state = 1, 1, 0)), 0) tunnel, IFNULL(SUM(IF(project_type = 3 AND state = 1, 1, 0)), 0) station, IFNULL(SUM(IF(build_status in (0,1), 1, 0)), 0) newBuild, IFNULL(SUM(IF(build_status = 5, 1, 0)), 0) reBuild, IFNULL(SUM(IF(build_status = 6, 1, 0)), 0) extension, IFNULL(SUM(IF(build_status in (1, 5, 6), 1, 0)), 0) total, IFNULL(SUM(IF(build_status = 4, 1, 0)), 0) finished, IFNULL(SUM(IF(build_status = 2, 1, 0)), 0) shutdown, IFNULL(SUM(IF(build_status in (1, 2, 4), 1, 0)), 0) total1 FROM project WHERE #project ")
|
||||
return db.selectOne("SELECT IFNULL(SUM(IF(major_project_type = 1 AND state = 1, 1, 0)), 0) importance, IFNULL(SUM(IF(project_type = 1 AND state = 1, 1, 0)), 0) bridge, IFNULL(SUM(IF(project_type = 2 AND state = 1, 1, 0)), 0) tunnel, IFNULL(SUM(IF(project_type = 3 AND state = 1, 1, 0)), 0) station, IFNULL(SUM(IF(build_status in (0,1) AND state = 1, 1, 0)), 0) newBuild, IFNULL(SUM(IF(build_status = 5, 1, 0)), 0) reBuild, IFNULL(SUM(IF(build_status = 6, 1, 0)), 0) extension, IFNULL(SUM(IF(build_status in (0, 1, 5, 6) AND state = 1, 1, 0)), 0) total, IFNULL(SUM(IF(build_status = 4, 1, 0)), 0) finished, IFNULL(SUM(IF(build_status = 2, 1, 0)), 0) shutdown, IFNULL(SUM(IF(build_status in (1, 2, 4), 1, 0)), 0) total1 FROM project WHERE #project ")
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "1f3d3e5b9fe340bab84de67b0de08f44",
|
||||
"name" : "投资管理",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1688970096225,
|
||||
"updateTime" : 1689561440845,
|
||||
"lock" : null,
|
||||
"createBy" : "admin",
|
||||
"updateBy" : "admin",
|
||||
@ -39,7 +39,8 @@ BigDecimal big = new BigDecimal(10000);
|
||||
result.put("paymentByMonth", paymentByMonth.divide(big))
|
||||
result.put("applyAmountByMonth", applyAmountByMonth.divide(big))
|
||||
result.put("realPayAmountByMonth", realPayAmountByMonth.divide(big))
|
||||
result.put("unPayAmountByMonth", applyAmountByMonth.subtract(realPayAmountByMonth).divide(big))
|
||||
var unPayAmountByMonth = applyAmountByMonth.subtract(realPayAmountByMonth);
|
||||
result.put("unPayAmountByMonth", unPayAmountByMonth > 0 ? unPayAmountByMonth.divide(big) : 0)
|
||||
|
||||
result.put("totalAmount", totalAmount.divide(big))
|
||||
result.put("payRatio", realPayAmountTotal == 0 ? 0 : realPayAmountTotal.divide(totalAmount, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")).doubleValue())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user