成本核算、成本简报
This commit is contained in:
parent
f2086bc147
commit
3f18765190
@ -169,8 +169,7 @@ public class BaseDataController {
|
|||||||
organizationJob.setJobName(dept.getString("jobtitlename"));
|
organizationJob.setJobName(dept.getString("jobtitlename"));
|
||||||
jobList.add(organizationJob);
|
jobList.add(organizationJob);
|
||||||
}
|
}
|
||||||
organizationJobService.remove(null);
|
organizationJobService.saveOrUpdateBatch(jobList);
|
||||||
organizationJobService.saveBatch(jobList);
|
|
||||||
}
|
}
|
||||||
return Result.success(null);
|
return Result.success(null);
|
||||||
}
|
}
|
||||||
@ -213,9 +212,7 @@ public class BaseDataController {
|
|||||||
userList.add(systemUser);
|
userList.add(systemUser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
systemUserService.remove(Wrappers.<SystemUser>lambdaQuery()
|
systemUserService.saveOrUpdateBatch(userList);
|
||||||
.eq(SystemUser::getAccountType, 7));
|
|
||||||
systemUserService.saveBatch(userList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Result.success(null);
|
return Result.success(null);
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.basicdata.controller;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||||
@ -65,6 +66,15 @@ public class CompanyController {
|
|||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "企业列表查询", notes = "企业列表查询")
|
||||||
|
@ApiImplicitParam(name = "companySn", value = "企业SN", paramType = "body", dataType = "String")
|
||||||
|
@PostMapping("/getChildrenBySn")
|
||||||
|
public Result<List<Company>> getChildrenBySn(@RequestBody Company company) {
|
||||||
|
Company company1 = companyService.getOne(Wrappers.<Company>lambdaQuery().eq(Company::getCompanySn, company.getCompanySn()));
|
||||||
|
List<Company> list = companyService.list(Wrappers.<Company>lambdaQuery().eq(Company::getParentId, company1.getCompanyId()));
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.file.FileUtil;
|
|||||||
import com.zhgd.xmgl.modules.basicdata.entity.Company;
|
import com.zhgd.xmgl.modules.basicdata.entity.Company;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
||||||
import com.zhgd.xmgl.modules.cost.dto.CostBudgetDto;
|
import com.zhgd.xmgl.modules.cost.dto.CostBudgetDto;
|
||||||
|
import com.zhgd.xmgl.modules.cost.dto.CostBulletinDto;
|
||||||
import com.zhgd.xmgl.modules.cost.entity.CostSubject;
|
import com.zhgd.xmgl.modules.cost.entity.CostSubject;
|
||||||
import com.zhgd.xmgl.modules.cost.service.ICostSubjectService;
|
import com.zhgd.xmgl.modules.cost.service.ICostSubjectService;
|
||||||
import com.zhgd.xmgl.modules.exam.entity.ExamQuestionBank;
|
import com.zhgd.xmgl.modules.exam.entity.ExamQuestionBank;
|
||||||
@ -263,6 +264,16 @@ public class CostBudgetController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperLog(operModul = "成本科目预算管理", operType = "查询", operDesc = "查询成本科目预算信息")
|
||||||
|
@ApiOperation(value = "查询成本科目预算信息", notes = "查询成本科目预算信息", httpMethod = "POST")
|
||||||
|
@PostMapping(value = "/queryByProjectSnAndSubjectId")
|
||||||
|
public Result<CostBudget> queryById(@ApiIgnore @RequestBody CostBudget costBudget) {
|
||||||
|
return Result.success(costBudgetService.getOne(Wrappers.<CostBudget>lambdaQuery()
|
||||||
|
.eq(CostBudget::getProjectSn, costBudget.getProjectSn())
|
||||||
|
.eq(CostBudget::getSubjectId, costBudget.getSubjectId())));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 导出excel
|
||||||
*
|
*
|
||||||
@ -470,4 +481,19 @@ public class CostBudgetController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成本简报
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@OperLog(operModul = "成本科目预算管理", operType = "列表查询", operDesc = "成本简报信息")
|
||||||
|
@ApiOperation(value = " 成本简报信息", notes = "成本简报信息", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "month", value = "月份时间", paramType = "body", dataType = "String")
|
||||||
|
})
|
||||||
|
@PostMapping(value = "costBulletin")
|
||||||
|
public Result<List<CostBulletinDto>> costBulletin(@RequestBody Map<String, Object> map) {
|
||||||
|
return Result.success(costSubjectService.getCostBulletin(map));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,7 +73,7 @@ public class CostContractController {
|
|||||||
public Result<IPage<CostContract>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
public Result<IPage<CostContract>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||||
QueryWrapper<CostContract> queryWrapper = QueryGenerator.initPageQueryWrapper(CostContract.class, map);
|
QueryWrapper<CostContract> queryWrapper = QueryGenerator.initPageQueryWrapper(CostContract.class, map);
|
||||||
Page<CostContract> page = PageUtil.getPage(map);
|
Page<CostContract> page = PageUtil.getPage(map);
|
||||||
IPage<CostContract> pageList = costContractService.page(page, queryWrapper);
|
IPage<CostContract> pageList = costContractService.pageList(page, queryWrapper);
|
||||||
return Result.success(pageList);
|
return Result.success(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -123,7 +123,7 @@ public class CostContractSettlementController {
|
|||||||
log.info("开始添加合同结算信息===" + object);
|
log.info("开始添加合同结算信息===" + object);
|
||||||
String [] type = {"分部结算", "中止结算", "最终结算"};
|
String [] type = {"分部结算", "中止结算", "最终结算"};
|
||||||
CostContractSettlement costContractSettlement = new CostContractSettlement();
|
CostContractSettlement costContractSettlement = new CostContractSettlement();
|
||||||
costContractSettlement.setContractId(Long.valueOf(object.getJSONArray("contractId").getString(0)));
|
costContractSettlement.setContractId(Integer.valueOf(object.getJSONArray("contractId").getString(0)));
|
||||||
costContractSettlement.setName(object.getString("name"));
|
costContractSettlement.setName(object.getString("name"));
|
||||||
String typeName = object.getString("type");
|
String typeName = object.getString("type");
|
||||||
for (int i = 0; i < type.length; i++) {
|
for (int i = 0; i < type.length; i++) {
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package com.zhgd.xmgl.modules.cost.controller;
|
package com.zhgd.xmgl.modules.cost.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||||
import com.zhgd.xmgl.util.PageUtil;
|
import com.zhgd.xmgl.util.PageUtil;
|
||||||
@ -93,9 +95,26 @@ public class CostQuantityController {
|
|||||||
@PostMapping(value = "/list")
|
@PostMapping(value = "/list")
|
||||||
public Result<List<CostQuantity>> queryList(@RequestBody CostQuantity costQuantity) {
|
public Result<List<CostQuantity>> queryList(@RequestBody CostQuantity costQuantity) {
|
||||||
QueryWrapper<CostQuantity> queryWrapper = QueryGenerator.initQueryWrapper(costQuantity);
|
QueryWrapper<CostQuantity> queryWrapper = QueryGenerator.initQueryWrapper(costQuantity);
|
||||||
if (costQuantity.getPayPlanId() == null) {
|
List<CostQuantity> list = costQuantityService.list(queryWrapper);
|
||||||
queryWrapper.lambda().isNull(CostQuantity::getPayPlanId);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*
|
||||||
|
* @param costQuantity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@OperLog(operModul = "合同产值管理", operType = "列表查询", operDesc = "列表查询合同产值信息")
|
||||||
|
@ApiOperation(value = " 列表查询合同产值信息", notes = "列表查询合同产值信息", httpMethod = "POST")
|
||||||
|
@PostMapping(value = "/filterList")
|
||||||
|
public Result<List<CostQuantity>> filterList(@RequestBody CostQuantity costQuantity) {
|
||||||
|
LambdaQueryWrapper<CostQuantity> queryWrapper = Wrappers.<CostQuantity>lambdaQuery();
|
||||||
|
if (costQuantity.getPayPlanId() == null) {
|
||||||
|
queryWrapper.isNull(CostQuantity::getPayPlanId);
|
||||||
|
}
|
||||||
|
queryWrapper.eq(CostQuantity::getContractId, costQuantity.getContractId());
|
||||||
|
queryWrapper.eq(CostQuantity::getProjectSn, costQuantity.getProjectSn());
|
||||||
List<CostQuantity> list = costQuantityService.list(queryWrapper);
|
List<CostQuantity> list = costQuantityService.list(queryWrapper);
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,15 +109,23 @@ public class CostSubjectController {
|
|||||||
/**
|
/**
|
||||||
* 获取最下级节点
|
* 获取最下级节点
|
||||||
*
|
*
|
||||||
* @param costSubject
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@OperLog(operModul = "成本科目管理", operType = "列表查询", operDesc = "获取最下级节点")
|
@OperLog(operModul = "成本科目管理", operType = "列表查询", operDesc = "获取最下级节点")
|
||||||
@ApiOperation(value = " 获取最下级节点", notes = "获取最下级节点", httpMethod = "POST")
|
@ApiOperation(value = " 获取最下级节点", notes = "获取最下级节点", httpMethod = "POST")
|
||||||
@PostMapping(value = "/lastNodeList")
|
@PostMapping(value = "/lastNodeList")
|
||||||
public Result<List<CostSubject>> lastNodeList(@RequestBody CostSubject costSubject) {
|
public Result<List<CostSubject>> lastNodeList(@RequestBody Map<String, Object> map) {
|
||||||
List<CostSubject> list = costSubjectService.list();
|
|
||||||
List<CostSubject> lastNodeList = new ArrayList<>();
|
List<CostSubject> lastNodeList = new ArrayList<>();
|
||||||
|
String projectSn = MapUtils.getString(map, "projectSn");
|
||||||
|
if (StringUtils.isBlank(projectSn)) {
|
||||||
|
return Result.success(lastNodeList);
|
||||||
|
}
|
||||||
|
ProjectInfoExtVo projectInfoBySn = projectService.getProjectInfoBySn(projectSn);
|
||||||
|
Company company = companyService.getOne(Wrappers.<Company>lambdaQuery().eq(Company::getCompanySn, projectInfoBySn.getCompanySn()));
|
||||||
|
List<CostSubject> list = costSubjectService.list(Wrappers.<CostSubject>lambdaQuery()
|
||||||
|
.eq(CostSubject::getCompanySn, company.getHeadquartersSn())
|
||||||
|
.eq(CostSubject::getType, projectInfoBySn.getProjectLx()));
|
||||||
for (CostSubject subject : list) {
|
for (CostSubject subject : list) {
|
||||||
long count = list.stream().filter(l -> l.getParentId().toString().equals(subject.getId().toString())).count();
|
long count = list.stream().filter(l -> l.getParentId().toString().equals(subject.getId().toString())).count();
|
||||||
if (count == 0 && StringUtils.isNotBlank(subject.getName())) {
|
if (count == 0 && StringUtils.isNotBlank(subject.getName())) {
|
||||||
|
|||||||
@ -1,27 +1,36 @@
|
|||||||
package com.zhgd.xmgl.modules.cost.controller;
|
package com.zhgd.xmgl.modules.cost.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import com.zhgd.xmgl.modules.cost.dto.CostBulletinDto;
|
||||||
import com.zhgd.xmgl.modules.cost.entity.CostBudget;
|
import com.zhgd.xmgl.modules.cost.entity.CostBudget;
|
||||||
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
||||||
import com.zhgd.xmgl.modules.cost.entity.CostSubject;
|
import com.zhgd.xmgl.modules.cost.entity.CostSubject;
|
||||||
import com.zhgd.xmgl.modules.cost.service.ICostBudgetService;
|
import com.zhgd.xmgl.modules.cost.service.ICostBudgetService;
|
||||||
import com.zhgd.xmgl.modules.cost.service.ICostContractService;
|
import com.zhgd.xmgl.modules.cost.service.ICostContractService;
|
||||||
import com.zhgd.xmgl.modules.cost.service.ICostSubjectService;
|
import com.zhgd.xmgl.modules.cost.service.ICostSubjectService;
|
||||||
|
import com.zhgd.xmgl.modules.project.entity.ProgressPanoramaNodePlan;
|
||||||
import com.zhgd.xmgl.modules.project.entity.Project;
|
import com.zhgd.xmgl.modules.project.entity.Project;
|
||||||
|
import com.zhgd.xmgl.modules.project.service.IProgressPanoramaNodePlanService;
|
||||||
import com.zhgd.xmgl.modules.project.service.IProjectService;
|
import com.zhgd.xmgl.modules.project.service.IProjectService;
|
||||||
import com.zhgd.xmgl.modules.quality.mapper.QualityInspectionRecordMapper;
|
import com.zhgd.xmgl.modules.quality.mapper.QualityInspectionRecordMapper;
|
||||||
import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo;
|
import com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordTotalVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -55,6 +64,9 @@ public class IndexController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private QualityInspectionRecordMapper qualityInspectionRecordMapper;
|
private QualityInspectionRecordMapper qualityInspectionRecordMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProgressPanoramaNodePlanService progressPanoramaNodePlanService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 成本统计信息
|
* 成本统计信息
|
||||||
* @return
|
* @return
|
||||||
@ -91,4 +103,35 @@ public class IndexController {
|
|||||||
public Result<XzSecurityQualityInspectionRecordTotalVo> quality() {
|
public Result<XzSecurityQualityInspectionRecordTotalVo> quality() {
|
||||||
return Result.success(qualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(new HashMap<>()));
|
return Result.success(qualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(new HashMap<>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月度计划完成情况
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@OperLog(operModul = "门户信息管理", operType = "列表查询", operDesc = "月度计划完成情况")
|
||||||
|
@ApiOperation(value = " 月度计划完成情况", notes = "月度计划完成情况", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
// @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "month", value = "月份时间", paramType = "body", dataType = "String")
|
||||||
|
})
|
||||||
|
@PostMapping(value = "planComplete")
|
||||||
|
public Result<Map<String, Object>> planComplete(@RequestBody Map<String, Object> map) {
|
||||||
|
String month = MapUtils.getString(map, "month");
|
||||||
|
DateTime time = DateUtil.parse(month + "-01", "yyyy-MM-dd");
|
||||||
|
List<ProgressPanoramaNodePlan> list = progressPanoramaNodePlanService.list(Wrappers.<ProgressPanoramaNodePlan>lambdaQuery()
|
||||||
|
.eq(ProgressPanoramaNodePlan::getApprovalStatue, 2)
|
||||||
|
.ge(ProgressPanoramaNodePlan::getPlanFinishDate, DateUtil.beginOfMonth(time))
|
||||||
|
.le(ProgressPanoramaNodePlan::getPlanFinishDate, DateUtil.endOfMonth(time))
|
||||||
|
.orderByAsc(ProgressPanoramaNodePlan::getPlanFinishDate));
|
||||||
|
Map<String, Object> resultMap = new HashMap();
|
||||||
|
Map<String, Object> stateMap = new HashMap();
|
||||||
|
stateMap.put("total", list.size());
|
||||||
|
stateMap.put("unStart", list.stream().filter(l -> l.getStatus() == 1).count());
|
||||||
|
stateMap.put("inProgress", list.stream().filter(l -> l.getStatus() == 2 && DateUtil.parseDate(l.getFinishDate()).compareTo(new Date()) >= 0).count());
|
||||||
|
stateMap.put("delay", list.stream().filter(l -> l.getStatus() == 2 && DateUtil.parseDate(l.getFinishDate()).compareTo(new Date()) < 0).count());
|
||||||
|
stateMap.put("delayCompletion", list.stream().filter(l -> l.getStatus() == 4).count());
|
||||||
|
stateMap.put("completion", list.stream().filter(l -> l.getStatus() == 3).count());
|
||||||
|
resultMap.put("stateMap", stateMap);
|
||||||
|
return Result.success(resultMap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,6 +35,9 @@ public class CompanyProjectDto {
|
|||||||
@ApiModelProperty(value = "项目计划状态")
|
@ApiModelProperty(value = "项目计划状态")
|
||||||
private Integer progressState;
|
private Integer progressState;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业SN")
|
||||||
|
private String companySn;
|
||||||
|
|
||||||
@Excel(name = "父级ID", width = 15)
|
@Excel(name = "父级ID", width = 15)
|
||||||
@ApiModelProperty(value = "父级ID")
|
@ApiModelProperty(value = "父级ID")
|
||||||
private List<CompanyProjectDto> childrenList;
|
private List<CompanyProjectDto> childrenList;
|
||||||
|
|||||||
@ -12,24 +12,27 @@ import java.util.List;
|
|||||||
@ApiModel(value = "成本简报信息(DTO)", description = "CostBulletinDto")
|
@ApiModel(value = "成本简报信息(DTO)", description = "CostBulletinDto")
|
||||||
public class CostBulletinDto {
|
public class CostBulletinDto {
|
||||||
|
|
||||||
@Excel(name = "科目名称", width = 15)
|
@ApiModelProperty(value = "项目名称")
|
||||||
@ApiModelProperty(value = "科目名称")
|
private String projectName;
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Excel(name = "科目编码", width = 15)
|
@ApiModelProperty(value = "项目SN")
|
||||||
@ApiModelProperty(value = "科目编码")
|
private String projectNSn;
|
||||||
private String code;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "父级科目ID")
|
@ApiModelProperty(value = "竣工日期")
|
||||||
private Long parentId;
|
private String completeWorkDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "祖级关系")
|
@ApiModelProperty(value = "项目面积")
|
||||||
private String ancestors;
|
private String projectAcreage;
|
||||||
|
|
||||||
@ApiModelProperty(value = "级别层次")
|
@ApiModelProperty(value = "可售面积")
|
||||||
private Integer level;
|
private String saleAcreage;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@ApiModelProperty(value = "总价")
|
||||||
@ApiModelProperty(value = "子级预算信息")
|
private String totalCost;
|
||||||
private List<CostBudgetDto> children;
|
|
||||||
|
@ApiModelProperty(value = "建筑单方造价")
|
||||||
|
private String projectCostAvg;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "可售单方造价")
|
||||||
|
private String saleCostAvg;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,9 @@ public class CostCalculateDto extends CostCalculate {
|
|||||||
@ApiModelProperty(value = "级别层次")
|
@ApiModelProperty(value = "级别层次")
|
||||||
private Integer level;
|
private Integer level;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否为最下级")
|
||||||
|
private Boolean lastLevel;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "子级预算信息")
|
@ApiModelProperty(value = "子级预算信息")
|
||||||
private List<CostCalculateDto> children;
|
private List<CostCalculateDto> children;
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -415,4 +416,9 @@ public class CostContract implements Serializable {
|
|||||||
@Excel(name = "项目SN", width = 15)
|
@Excel(name = "项目SN", width = 15)
|
||||||
@ApiModelProperty(value = "项目SN")
|
@ApiModelProperty(value = "项目SN")
|
||||||
private String projectSn;
|
private String projectSn;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "是否已结算(0:未结算;1:已结算;)")
|
||||||
|
private Integer settlementState;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ public class CostContractSettlement implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "合同ID", width = 15)
|
@Excel(name = "合同ID", width = 15)
|
||||||
@ApiModelProperty(value = "合同ID")
|
@ApiModelProperty(value = "合同ID")
|
||||||
private Long contractId;
|
private Integer contractId;
|
||||||
/**
|
/**
|
||||||
* 结算名称
|
* 结算名称
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.zhgd.xmgl.modules.cost.service;
|
package com.zhgd.xmgl.modules.cost.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
*/
|
*/
|
||||||
public interface ICostContractService extends IService<CostContract> {
|
public interface ICostContractService extends IService<CostContract> {
|
||||||
|
|
||||||
|
Page<CostContract> pageList(Page page, Wrapper<CostContract> wrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,12 @@ package com.zhgd.xmgl.modules.cost.service;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.zhgd.xmgl.modules.cost.dto.CostBulletinDto;
|
||||||
import com.zhgd.xmgl.modules.cost.entity.CostSubject;
|
import com.zhgd.xmgl.modules.cost.entity.CostSubject;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 成本科目
|
* @Description: 成本科目
|
||||||
@ -23,4 +25,6 @@ public interface ICostSubjectService extends IService<CostSubject> {
|
|||||||
boolean updateInfo(CostSubject costSubject);
|
boolean updateInfo(CostSubject costSubject);
|
||||||
|
|
||||||
boolean delInfo(CostSubject costSubject);
|
boolean delInfo(CostSubject costSubject);
|
||||||
|
|
||||||
|
List<CostBulletinDto> getCostBulletin(Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,6 +99,11 @@ public class CostCalculateServiceImpl extends ServiceImpl<CostCalculateMapper, C
|
|||||||
costCalculateDto.setTotalPrice(costCalculates.get(0).getTotalPrice());
|
costCalculateDto.setTotalPrice(costCalculates.get(0).getTotalPrice());
|
||||||
}
|
}
|
||||||
List<CostCalculateDto> childrenList = allList.stream().filter(a -> a.getParentId().toString().equals(costCalculateDto.getSubjectId().toString())).collect(Collectors.toList());
|
List<CostCalculateDto> childrenList = allList.stream().filter(a -> a.getParentId().toString().equals(costCalculateDto.getSubjectId().toString())).collect(Collectors.toList());
|
||||||
|
if (childrenList.size() > 0) {
|
||||||
|
costCalculateDto.setLastLevel(false);
|
||||||
|
} else {
|
||||||
|
costCalculateDto.setLastLevel(true);
|
||||||
|
}
|
||||||
getChildren(childrenList, allList, budgetList, flag);
|
getChildren(childrenList, allList, budgetList, flag);
|
||||||
costCalculateDto.setChildren(childrenList);
|
costCalculateDto.setChildren(childrenList);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,21 @@
|
|||||||
package com.zhgd.xmgl.modules.cost.service.impl;
|
package com.zhgd.xmgl.modules.cost.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
||||||
|
import com.zhgd.xmgl.modules.cost.entity.CostContractSettlement;
|
||||||
import com.zhgd.xmgl.modules.cost.mapper.CostContractMapper;
|
import com.zhgd.xmgl.modules.cost.mapper.CostContractMapper;
|
||||||
import com.zhgd.xmgl.modules.cost.service.ICostContractService;
|
import com.zhgd.xmgl.modules.cost.service.ICostContractService;
|
||||||
|
import com.zhgd.xmgl.modules.cost.service.ICostContractSettlementService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 合同信息
|
* @Description: 合同信息
|
||||||
* @author: pengj
|
* @author: pengj
|
||||||
@ -16,4 +25,19 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
@Service
|
@Service
|
||||||
public class CostContractServiceImpl extends ServiceImpl<CostContractMapper, CostContract> implements ICostContractService {
|
public class CostContractServiceImpl extends ServiceImpl<CostContractMapper, CostContract> implements ICostContractService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICostContractSettlementService costContractSettlementService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<CostContract> pageList(Page page, Wrapper<CostContract> wrapper) {
|
||||||
|
Page<CostContract> result = this.page(page, wrapper);
|
||||||
|
List<Integer> list = result.getRecords().stream().map(r -> r.getId()).collect(Collectors.toList());
|
||||||
|
List<CostContractSettlement> settlements = costContractSettlementService.list(Wrappers.<CostContractSettlement>lambdaQuery()
|
||||||
|
.in(CostContractSettlement::getContractId, list));
|
||||||
|
for (CostContract record : result.getRecords()) {
|
||||||
|
List<Integer> typeList = settlements.stream().filter(s -> s.getContractId() == record.getId()).map(s -> s.getType()).collect(Collectors.toList());
|
||||||
|
record.setSettlementState(typeList.contains(3) ? 1 : 0);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,17 +4,27 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.zhgd.xmgl.modules.cost.dto.CostBulletinDto;
|
||||||
|
import com.zhgd.xmgl.modules.cost.entity.CostContract;
|
||||||
import com.zhgd.xmgl.modules.cost.entity.CostSubject;
|
import com.zhgd.xmgl.modules.cost.entity.CostSubject;
|
||||||
import com.zhgd.xmgl.modules.cost.mapper.CostSubjectMapper;
|
import com.zhgd.xmgl.modules.cost.mapper.CostSubjectMapper;
|
||||||
|
import com.zhgd.xmgl.modules.cost.service.ICostContractService;
|
||||||
import com.zhgd.xmgl.modules.cost.service.ICostSubjectService;
|
import com.zhgd.xmgl.modules.cost.service.ICostSubjectService;
|
||||||
|
import com.zhgd.xmgl.modules.project.entity.Project;
|
||||||
|
import com.zhgd.xmgl.modules.project.service.IProjectService;
|
||||||
import com.zhgd.xmgl.security.entity.UserInfo;
|
import com.zhgd.xmgl.security.entity.UserInfo;
|
||||||
import com.zhgd.xmgl.security.util.SecurityUtils;
|
import com.zhgd.xmgl.security.util.SecurityUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,6 +36,12 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class CostSubjectServiceImpl extends ServiceImpl<CostSubjectMapper, CostSubject> implements ICostSubjectService {
|
public class CostSubjectServiceImpl extends ServiceImpl<CostSubjectMapper, CostSubject> implements ICostSubjectService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProjectService projectService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICostContractService costContractService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<CostSubject> tree(Page page, QueryWrapper<CostSubject> wrapper) {
|
public Page<CostSubject> tree(Page page, QueryWrapper<CostSubject> wrapper) {
|
||||||
wrapper.lambda().eq(CostSubject::getParentId, 0);
|
wrapper.lambda().eq(CostSubject::getParentId, 0);
|
||||||
@ -65,6 +81,25 @@ public class CostSubjectServiceImpl extends ServiceImpl<CostSubjectMapper, CostS
|
|||||||
return this.removeById(costSubject);
|
return this.removeById(costSubject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CostBulletinDto> getCostBulletin(Map<String, Object> map) {
|
||||||
|
List<CostContract> contractList = costContractService.list(Wrappers.<CostContract>lambdaQuery());
|
||||||
|
List<Project> projects = projectService.list(Wrappers.<Project>lambdaQuery()
|
||||||
|
.eq(Project::getNature, 1));
|
||||||
|
List<CostBulletinDto> costBulletinDtoList = new ArrayList<>();
|
||||||
|
for (Project project : projects) {
|
||||||
|
List<CostContract> projectContract = contractList.stream().filter(c -> c.getProjectSn().equals(project.getProjectSn())).collect(Collectors.toList());
|
||||||
|
BigDecimal total = projectContract.stream().map(p -> p.getHthszj()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
CostBulletinDto costBulletinDto = new CostBulletinDto();
|
||||||
|
BeanUtils.copyProperties(project, costBulletinDto);
|
||||||
|
costBulletinDto.setTotalCost(total.toString());
|
||||||
|
costBulletinDto.setProjectCostAvg(total.divide(new BigDecimal(costBulletinDto.getProjectAcreage()), 2, BigDecimal.ROUND_HALF_UP).toString());
|
||||||
|
costBulletinDto.setSaleCostAvg(total.divide(new BigDecimal(costBulletinDto.getSaleAcreage()), 2, BigDecimal.ROUND_HALF_UP).toString());
|
||||||
|
costBulletinDtoList.add(costBulletinDto);
|
||||||
|
}
|
||||||
|
return costBulletinDtoList;
|
||||||
|
}
|
||||||
|
|
||||||
private void getChildren(List<CostSubject> list, List<CostSubject> allList) {
|
private void getChildren(List<CostSubject> list, List<CostSubject> allList) {
|
||||||
for (CostSubject costSubject : list) {
|
for (CostSubject costSubject : list) {
|
||||||
List<CostSubject> childrenList = allList.stream().filter(a -> a.getParentId().toString().equals(costSubject.getId().toString())).collect(Collectors.toList());
|
List<CostSubject> childrenList = allList.stream().filter(a -> a.getParentId().toString().equals(costSubject.getId().toString())).collect(Collectors.toList());
|
||||||
|
|||||||
@ -72,6 +72,7 @@ public class ProgressPanoramaNodePlanAlarmController {
|
|||||||
@PostMapping(value = "/page")
|
@PostMapping(value = "/page")
|
||||||
public Result<IPage<ProgressPanoramaNodePlanAlarm>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
public Result<IPage<ProgressPanoramaNodePlanAlarm>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||||
QueryWrapper<ProgressPanoramaNodePlanAlarm> queryWrapper = QueryGenerator.initPageQueryWrapper(ProgressPanoramaNodePlanAlarm.class, map);
|
QueryWrapper<ProgressPanoramaNodePlanAlarm> queryWrapper = QueryGenerator.initPageQueryWrapper(ProgressPanoramaNodePlanAlarm.class, map);
|
||||||
|
queryWrapper.lambda().orderByDesc(ProgressPanoramaNodePlanAlarm::getCreateDate);
|
||||||
Page<ProgressPanoramaNodePlanAlarm> page = PageUtil.getPage(map);
|
Page<ProgressPanoramaNodePlanAlarm> page = PageUtil.getPage(map);
|
||||||
IPage<ProgressPanoramaNodePlanAlarm> pageList = progressPanoramaNodePlanAlarmService.page(page, queryWrapper);
|
IPage<ProgressPanoramaNodePlanAlarm> pageList = progressPanoramaNodePlanAlarmService.page(page, queryWrapper);
|
||||||
return Result.success(pageList);
|
return Result.success(pageList);
|
||||||
|
|||||||
@ -113,18 +113,30 @@ public class ProgressPanoramaNodePlanController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "项目关键节点监控", notes = "项目关键节点监控", httpMethod = "POST")
|
@ApiOperation(value = "项目关键节点监控", notes = "项目关键节点监控", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "type", value = "1:里程碑;2:关键节点", paramType = "body", required = true, dataType = "Integer"),
|
||||||
|
})
|
||||||
@PostMapping(value = "/keyNodeList")
|
@PostMapping(value = "/keyNodeList")
|
||||||
public Result<List<ProjectKeyNode>> keyNodeList(/*@RequestBody Project project*/) {
|
public Result<List<ProjectKeyNode>> keyNodeList(@RequestBody Map<String, Object> map) {
|
||||||
|
String projectSn = MapUtils.getString(map, "projectSn");
|
||||||
|
Integer type = MapUtils.getInteger(map, "type");
|
||||||
LambdaQueryWrapper<Project> wrapper = Wrappers.<Project>lambdaQuery().eq(Project::getNature, 1);
|
LambdaQueryWrapper<Project> wrapper = Wrappers.<Project>lambdaQuery().eq(Project::getNature, 1);
|
||||||
/* if (StringUtil.isNotBlank(project.getCompanySn())) {
|
if (StringUtil.isNotBlank(projectSn)) {
|
||||||
wrapper.eq(Project::getCompanySn, project.getCompanySn());
|
wrapper.eq(Project::getProjectSn, projectSn);
|
||||||
}*/
|
}
|
||||||
List<Project> list = projectService.list(wrapper);
|
List<Project> list = projectService.list(wrapper);
|
||||||
List<ProjectKeyNode> keyNodes = new ArrayList<>();
|
List<ProjectKeyNode> keyNodes = new ArrayList<>();
|
||||||
List<ProgressPanoramaNodePlan> planList = progressPanoramaNodePlanService.list(Wrappers.<ProgressPanoramaNodePlan>lambdaQuery()
|
List<ProgressPanoramaNodePlan> planList = progressPanoramaNodePlanService.list(Wrappers.<ProgressPanoramaNodePlan>lambdaQuery()
|
||||||
|
.eq(ProgressPanoramaNodePlan::getApprovalStatue, 2)
|
||||||
.orderByAsc(ProgressPanoramaNodePlan::getPlanFinishDate));
|
.orderByAsc(ProgressPanoramaNodePlan::getPlanFinishDate));
|
||||||
for (Project project1 : list) {
|
for (Project project1 : list) {
|
||||||
List<ProgressPanoramaNodePlan> panoramaNodePlans = planList.stream().filter(p -> p.getKeyNode() == true && p.getProjectSn().equals(project1.getProjectSn())).collect(Collectors.toList());
|
List<ProgressPanoramaNodePlan> panoramaNodePlans = new ArrayList<>();
|
||||||
|
if (type == 1) {
|
||||||
|
panoramaNodePlans = planList.stream().filter(p -> p.getMilepostNode() == true && p.getProjectSn().equals(project1.getProjectSn())).collect(Collectors.toList());
|
||||||
|
} else {
|
||||||
|
panoramaNodePlans = planList.stream().filter(p -> p.getKeyNode() == true && p.getProjectSn().equals(project1.getProjectSn())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
if (panoramaNodePlans.size() == 0) {
|
if (panoramaNodePlans.size() == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -257,15 +269,23 @@ public class ProgressPanoramaNodePlanController {
|
|||||||
Result<ProgressPanoramaNodePlan> result = new Result<ProgressPanoramaNodePlan>();
|
Result<ProgressPanoramaNodePlan> result = new Result<ProgressPanoramaNodePlan>();
|
||||||
List<ProgressPanoramaNodePlan> list = progressPanoramaNodePlanService.list(Wrappers.<ProgressPanoramaNodePlan>lambdaQuery()
|
List<ProgressPanoramaNodePlan> list = progressPanoramaNodePlanService.list(Wrappers.<ProgressPanoramaNodePlan>lambdaQuery()
|
||||||
.eq(ProgressPanoramaNodePlan::getProjectSn, progressPanoramaNodePlan.getProjectSn()));
|
.eq(ProgressPanoramaNodePlan::getProjectSn, progressPanoramaNodePlan.getProjectSn()));
|
||||||
|
if (list.size() == 0) {
|
||||||
|
result.error500("当前无任务信息,请先创建任务项!");
|
||||||
|
} else {
|
||||||
long count = list.stream().filter(l -> StringUtil.isBlank(l.getPlanFinishDate())).count();
|
long count = list.stream().filter(l -> StringUtil.isBlank(l.getPlanFinishDate())).count();
|
||||||
long count1 = list.stream().filter(l -> StringUtil.isBlank(l.getChargerId())).count();
|
long count1 = list.stream().filter(l -> l.getLevelName().equals("主项名称") && StringUtil.isBlank(l.getChargerDeptName())).count();
|
||||||
|
long count2 = list.stream().filter(l -> l.getLevelName().equals("专项名称") && StringUtil.isBlank(l.getChargerId())).count();
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
result.error500("当前存在计划完成日期为空的工作项,请设置后再进行此操作。");
|
result.error500("当前存在计划完成日期为空的工作项,请设置后再进行此操作。");
|
||||||
} else if (count1 > 0) {
|
} else if (count1 > 0) {
|
||||||
result.error500("当前存在责任人为空的工作项,请设置后再进行此操作。");
|
result.error500("当前存在责任部门为空的主项任务,请设置后再进行此操作。");
|
||||||
|
} else if (count2 > 0) {
|
||||||
|
result.error500("当前存在主责人为空的专项任务,请设置后再进行此操作。");
|
||||||
} else {
|
} else {
|
||||||
progressPanoramaNodePlanService.check(progressPanoramaNodePlan);
|
progressPanoramaNodePlanService.check(progressPanoramaNodePlan);
|
||||||
}
|
}
|
||||||
|
result.ok("数据校验通过!");
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,8 +316,10 @@ public class ProgressPanoramaNodePlanController {
|
|||||||
})
|
})
|
||||||
@PostMapping(value = "/statByMonth")
|
@PostMapping(value = "/statByMonth")
|
||||||
public Result<Map<String, Object>> statByMonth(@RequestBody Map<String,Object> map) {
|
public Result<Map<String, Object>> statByMonth(@RequestBody Map<String,Object> map) {
|
||||||
|
Map<String, Object> resultMap = new HashMap();
|
||||||
String projectSn = MapUtils.getString(map, "projectSn");
|
String projectSn = MapUtils.getString(map, "projectSn");
|
||||||
String month = MapUtils.getString(map, "month");
|
String month = MapUtils.getString(map, "month");
|
||||||
|
if (StringUtils.isNotBlank(projectSn) || StringUtils.isNotBlank(month)) {
|
||||||
DateTime time = DateUtil.parse(month + "-01", "yyyy-MM-dd");
|
DateTime time = DateUtil.parse(month + "-01", "yyyy-MM-dd");
|
||||||
List<ProgressPanoramaNodePlan> list = progressPanoramaNodePlanService.list(Wrappers.<ProgressPanoramaNodePlan>lambdaQuery()
|
List<ProgressPanoramaNodePlan> list = progressPanoramaNodePlanService.list(Wrappers.<ProgressPanoramaNodePlan>lambdaQuery()
|
||||||
.eq(ProgressPanoramaNodePlan::getProjectSn, projectSn)
|
.eq(ProgressPanoramaNodePlan::getProjectSn, projectSn)
|
||||||
@ -305,7 +327,6 @@ public class ProgressPanoramaNodePlanController {
|
|||||||
.ge(ProgressPanoramaNodePlan::getPlanFinishDate, DateUtil.beginOfMonth(time))
|
.ge(ProgressPanoramaNodePlan::getPlanFinishDate, DateUtil.beginOfMonth(time))
|
||||||
.le(ProgressPanoramaNodePlan::getPlanFinishDate, DateUtil.endOfMonth(time))
|
.le(ProgressPanoramaNodePlan::getPlanFinishDate, DateUtil.endOfMonth(time))
|
||||||
.orderByAsc(ProgressPanoramaNodePlan::getPlanFinishDate));
|
.orderByAsc(ProgressPanoramaNodePlan::getPlanFinishDate));
|
||||||
Map<String, Object> resultMap = new HashMap();
|
|
||||||
Map<String, Object> stateMap = new HashMap();
|
Map<String, Object> stateMap = new HashMap();
|
||||||
stateMap.put("total", list.size());
|
stateMap.put("total", list.size());
|
||||||
stateMap.put("unStart", list.stream().filter(l -> l.getStatus() == 1).count());
|
stateMap.put("unStart", list.stream().filter(l -> l.getStatus() == 1).count());
|
||||||
@ -315,6 +336,7 @@ public class ProgressPanoramaNodePlanController {
|
|||||||
stateMap.put("completion", list.stream().filter(l -> l.getStatus() == 3).count());
|
stateMap.put("completion", list.stream().filter(l -> l.getStatus() == 3).count());
|
||||||
resultMap.put("stateMap", stateMap);
|
resultMap.put("stateMap", stateMap);
|
||||||
resultMap.put("planList", list);
|
resultMap.put("planList", list);
|
||||||
|
}
|
||||||
return Result.success(resultMap);
|
return Result.success(resultMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -173,4 +173,10 @@ public class ProgressPanoramaNodePlan implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "是否已审批(0:未审批;1:数据已校验;2:审批通过)")
|
@ApiModelProperty(value = "是否已审批(0:未审批;1:数据已校验;2:审批通过)")
|
||||||
private Integer approvalStatue;
|
private Integer approvalStatue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务业务类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "任务业务类型")
|
||||||
|
private String businessType;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import lombok.Data;
|
|||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目
|
* 项目
|
||||||
@ -133,6 +134,12 @@ public class Project implements Serializable {
|
|||||||
@Excel(name = "开工日期", width = 15)
|
@Excel(name = "开工日期", width = 15)
|
||||||
@ApiModelProperty(value = "开工日期")
|
@ApiModelProperty(value = "开工日期")
|
||||||
private java.lang.String startWorkDate;
|
private java.lang.String startWorkDate;
|
||||||
|
/**
|
||||||
|
* 竣工日期
|
||||||
|
*/
|
||||||
|
@Excel(name = "竣工日期", width = 15)
|
||||||
|
@ApiModelProperty(value = "竣工日期")
|
||||||
|
private String completeWorkDate;
|
||||||
/**
|
/**
|
||||||
* 施工阶段,1施工证获取,2土方开挖,3桩基,4支护开始,5垫层完成,6正负零,7工程达到预售条件,8主体施工,9主体封顶,10装饰装修,11景观园林,12主体交付,13预售证获取,14规划验收,15竣工备案完成
|
* 施工阶段,1施工证获取,2土方开挖,3桩基,4支护开始,5垫层完成,6正负零,7工程达到预售条件,8主体施工,9主体封顶,10装饰装修,11景观园林,12主体交付,13预售证获取,14规划验收,15竣工备案完成
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -216,7 +216,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|||||||
second.setSn(project.getProjectSn());
|
second.setSn(project.getProjectSn());
|
||||||
second.setType(2);
|
second.setType(2);
|
||||||
second.setName(project.getProjectName());
|
second.setName(project.getProjectName());
|
||||||
second.setProgressState(project.getProgressState());
|
second.setCompanySn(project.getCompanySn());
|
||||||
secondList.add(second);
|
secondList.add(second);
|
||||||
}
|
}
|
||||||
first.setChildrenList(secondList);
|
first.setChildrenList(secondList);
|
||||||
@ -251,9 +251,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ProjectInfoExtVo info = redisRepository.getOrSetEx(PROJECT_PREFIX_KEY + projectSn, (() -> projectMapper.getProjectInfoBySn(map)));
|
ProjectInfoExtVo info = redisRepository.getOrSetEx(PROJECT_PREFIX_KEY + projectSn, (() -> projectMapper.getProjectInfoBySn(map)));
|
||||||
if (info == null) {
|
|
||||||
throw new NullPointerException(" 当前查询条件结果不存在!");
|
|
||||||
}
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,6 +57,7 @@ public class ProgressPanoramaNodePlanAlarmTask {
|
|||||||
String today = DateUtil.today();
|
String today = DateUtil.today();
|
||||||
// 预计开始时间已过未开始、预计结束时间已过进行中任务
|
// 预计开始时间已过未开始、预计结束时间已过进行中任务
|
||||||
List<ProgressPanoramaNodePlan> planList = progressPanoramaNodePlanService.list(Wrappers.lambdaQuery(ProgressPanoramaNodePlan.class)
|
List<ProgressPanoramaNodePlan> planList = progressPanoramaNodePlanService.list(Wrappers.lambdaQuery(ProgressPanoramaNodePlan.class)
|
||||||
|
.eq(ProgressPanoramaNodePlan::getApprovalStatue, 2)
|
||||||
.eq(ProgressPanoramaNodePlan::getStatus, 1).lt(ProgressPanoramaNodePlan::getPlanStartDate, today)
|
.eq(ProgressPanoramaNodePlan::getStatus, 1).lt(ProgressPanoramaNodePlan::getPlanStartDate, today)
|
||||||
.or(wrapper -> wrapper.eq(ProgressPanoramaNodePlan::getStatus, 2).lt(ProgressPanoramaNodePlan::getFinishDate, today)));
|
.or(wrapper -> wrapper.eq(ProgressPanoramaNodePlan::getStatus, 2).lt(ProgressPanoramaNodePlan::getFinishDate, today)));
|
||||||
// 判断是否有逾期任务
|
// 判断是否有逾期任务
|
||||||
@ -67,9 +68,9 @@ public class ProgressPanoramaNodePlanAlarmTask {
|
|||||||
ProgressPanoramaNodePlanAlarm progressPanoramaNodePlanAlarm = new ProgressPanoramaNodePlanAlarm();
|
ProgressPanoramaNodePlanAlarm progressPanoramaNodePlanAlarm = new ProgressPanoramaNodePlanAlarm();
|
||||||
progressPanoramaNodePlanAlarm.setNodeId(p.getId());
|
progressPanoramaNodePlanAlarm.setNodeId(p.getId());
|
||||||
if (p.getStatus() == 1) {
|
if (p.getStatus() == 1) {
|
||||||
progressPanoramaNodePlanAlarm.setAlarmDetails("当前任务预计开始时间为:" + p.getPlanStartDate() + "," + "实际任务开始时间为:" + (p.getStartDate() == null ? "" : p.getStartDate()));
|
progressPanoramaNodePlanAlarm.setAlarmDetails("当前任务预计开始时间为:" + p.getPlanStartDate() + "," + "目前任务未开始");
|
||||||
} else {
|
} else {
|
||||||
progressPanoramaNodePlanAlarm.setAlarmDetails("当前任务预计完成时间为:" + p.getPlanFinishDate() + "," + "实际任务完成时间为:" + (p.getFinishDate() == null ? "" : p.getFinishDate()));
|
progressPanoramaNodePlanAlarm.setAlarmDetails("当前任务预计完成时间为:" + p.getPlanFinishDate() + "," + "目前任务未完成");
|
||||||
}
|
}
|
||||||
progressPanoramaNodePlanAlarm.setCreateDate(new Date());
|
progressPanoramaNodePlanAlarm.setCreateDate(new Date());
|
||||||
progressPanoramaNodePlanAlarm.setAlarmType(p.getStatus());
|
progressPanoramaNodePlanAlarm.setAlarmType(p.getStatus());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user