验收修改
This commit is contained in:
parent
3feb109bb6
commit
c9eaf3722a
@ -125,6 +125,7 @@ public class SystemUserOpController {
|
||||
systemUserVo.setRoleId(systemUserOpVo.getRole());
|
||||
systemUserVo.setState(systemUserOpVo.getEnable());
|
||||
systemUserVo.setUserTel(systemUserOpVo.getNumPhone());
|
||||
systemUserVo.setRealName(systemUserOpVo.getRealName());
|
||||
SystemUser systemUser1 = systemUserService.getOne(Wrappers.<SystemUser>lambdaQuery().eq(SystemUser::getAccount, systemUserOpVo.getName())
|
||||
.ne(SystemUser::getUserId, systemUserOpVo.getId()));
|
||||
if (systemUser1 != null) {
|
||||
|
||||
@ -28,11 +28,15 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
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 org.springframework.web.servlet.ModelAndView;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -119,6 +123,50 @@ public class GovInspectRecordController {
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
*/
|
||||
@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 = "engineeringName", value = "工程名称", paramType = "body", dataType = "String"),
|
||||
@ApiImplicitParam(name = "type", value = "监督执法类型(1:安全监督;2:质量监督;3:专项检查)", paramType = "body", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||
})
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(@RequestBody Map<String, Object> map) {
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
IPage<InspectRecordDto> pageList = inspectRecordsService.pageList(new Page(-1, -1), map);
|
||||
List<String> state = Arrays.asList("正常", "临期", "超期");
|
||||
for (InspectRecordDto record : pageList.getRecords()) {
|
||||
record.setLevelName(record.getLevel() == 1 ? "初审" : "复审");
|
||||
record.setSlippageStateName(state.get(record.getSlippageState() - 1));
|
||||
if (record.getState() == 1) {
|
||||
record.setStateName("执法中");
|
||||
} else if (record.getState() == 2) {
|
||||
record.setStateName("待整改");
|
||||
} else if (record.getState() == 3 && record.getLevel() == 1) {
|
||||
record.setStateName("待初审");
|
||||
} else if (record.getState() == 4 && record.getLevel() == 1) {
|
||||
record.setStateName("待终审");
|
||||
} else if (record.getState() == 4 && record.getLevel() == 2) {
|
||||
record.setStateName("已闭合");
|
||||
} else if (record.getState() == 5 && record.getLevel() == 1) {
|
||||
record.setStateName("初审驳回");
|
||||
} else if (record.getState() == 5 && record.getLevel() == 2) {
|
||||
record.setStateName("终审驳回");
|
||||
}
|
||||
}
|
||||
//导出文件名称
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "项目检查数据");
|
||||
mv.addObject(NormalExcelConstants.CLASS, InspectRecordDto.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("项目检查数据", "导出人:" + SecurityUtil.getUser().getRealName(), "导出信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList.getRecords());
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 联合执法分页查询
|
||||
|
||||
@ -41,6 +41,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -117,7 +118,17 @@ public class GovInvestmentContractController {
|
||||
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.pageList(page, queryWrapper);
|
||||
IPage<InvestmentContract> pageList = investmentContractService.page(page, queryWrapper);
|
||||
if (pageList.getRecords().size() > 0) {
|
||||
List<Long> contractId = pageList.getRecords().stream().map(p -> p.getId()).collect(Collectors.toList());
|
||||
List<InvestmentPayment> payList = investmentPaymentService.list(Wrappers.<InvestmentPayment>lambdaQuery()
|
||||
.in(InvestmentPayment::getContractId, contractId).orderByDesc(InvestmentPayment::getId));
|
||||
for (InvestmentContract record : pageList.getRecords()) {
|
||||
List<InvestmentPayment> collect = payList.stream().filter(p -> p.getContractId().toString().equals(record.getId().toString())).collect(Collectors.toList());
|
||||
record.setPayAmount(collect.stream().map(c -> c.getPayAmount()).reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
record.setPayRatio(record.getPayAmount().divide(record.getContractAmount(), 2 ,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).toString());
|
||||
}
|
||||
}
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ -82,6 +82,26 @@ public class ProjectQuantityController {
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "项目工程量管理", operType = "分页查询", operDesc = "分页列表查询项目工程量信息")
|
||||
@ApiOperation(value = " 分页列表查询项目工程量信息", notes = "分页列表查询项目工程量信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@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 = "/pageHistory")
|
||||
public Result<IPage<ProjectQuantity>> pageHistory(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<ProjectQuantity> queryWrapper = QueryGenerator.initPageQueryWrapper(ProjectQuantity.class, map);
|
||||
queryWrapper.lambda().eq(ProjectQuantity::getDelFlag, 1);
|
||||
Page<ProjectQuantity> page = PageUtil.getPage(map);
|
||||
IPage<ProjectQuantity> pageList = projectQuantityService.pageList(page, queryWrapper);
|
||||
return Result.success(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
@ -259,13 +279,18 @@ public class ProjectQuantityController {
|
||||
List<ProjectQuantity> listProjectQuantitys = ExcelImportUtil.importExcel(file.getInputStream(), ProjectQuantity.class, params);
|
||||
String engineeringSn = request.getParameter("engineeringSn");
|
||||
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, engineeringSn)).getProjectSn();
|
||||
projectQuantityService.remove(Wrappers.<ProjectQuantity>lambdaQuery()
|
||||
projectQuantityService.update(Wrappers.<ProjectQuantity>lambdaUpdate()
|
||||
.set(ProjectQuantity::getUpdateBy, SecurityUtil.getUser().getUserId())
|
||||
.set(ProjectQuantity::getUpdateTime, new Date())
|
||||
.set(ProjectQuantity::getDelFlag, 1)
|
||||
.eq(ProjectQuantity::getProjectSn, projectSn)
|
||||
.eq(ProjectQuantity::getEngineeringSn, engineeringSn));
|
||||
for (ProjectQuantity projectQuantityExcel : listProjectQuantitys) {
|
||||
projectQuantityExcel.setEngineeringSn(engineeringSn);
|
||||
projectQuantityExcel.setProjectSn(projectSn);
|
||||
projectQuantityExcel.setCreateTime(new Date());
|
||||
projectQuantityExcel.setCreateBy(SecurityUtil.getUser().getUserId());
|
||||
projectQuantityExcel.setDelFlag(0);
|
||||
if (projectQuantityExcel.getTotalPrice() != null) {
|
||||
BigDecimal total = new BigDecimal(projectQuantityExcel.getTotalPrice()).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
projectQuantityExcel.setTotalPrice(total.toString());
|
||||
|
||||
@ -53,35 +53,41 @@ public class EngineeringSingleServiceImpl extends ServiceImpl<EngineeringSingleM
|
||||
|
||||
@Override
|
||||
public boolean saveDetail(EngineeringVo engineeringVo) {
|
||||
for (EngineeringSingle engineeringSingle : engineeringVo.getEngineeringSingles()) {
|
||||
engineeringSingle.setEngineeringSn(engineeringVo.getEngineeringSn());
|
||||
if (engineeringVo.getEngineeringSingles() != null) {
|
||||
for (EngineeringSingle engineeringSingle : engineeringVo.getEngineeringSingles()) {
|
||||
engineeringSingle.setEngineeringSn(engineeringVo.getEngineeringSn());
|
||||
}
|
||||
this.saveBatch(engineeringVo.getEngineeringSingles());
|
||||
}
|
||||
this.saveBatch(engineeringVo.getEngineeringSingles());
|
||||
for (AnnexFile annexFile : engineeringVo.getAnnexFiles()) {
|
||||
annexFile.setRelevanceId(engineeringVo.getEngineeringSn());
|
||||
annexFile.setFileType(ParamEnum.AnnexFileType.ENGINEERING.getValue());
|
||||
}
|
||||
annexFileService.saveBatch(engineeringVo.getAnnexFiles());
|
||||
List<EnterpriseScore> scoreList = new ArrayList<>();
|
||||
for (EngineeringMain engineeringMain : engineeringVo.getEngineeringMains()) {
|
||||
engineeringMain.setEngineeringSn(engineeringVo.getEngineeringSn());
|
||||
engineeringMainService.save(engineeringMain);
|
||||
for (EngineeringMainPerson engineeringMainPerson : engineeringMain.getEngineeringMainPersonList()) {
|
||||
engineeringMainPerson.setMainId(engineeringMain.getId());
|
||||
engineeringMainPerson.setEngineeringSn(engineeringVo.getEngineeringSn());
|
||||
}
|
||||
engineeringMainPersonService.saveBatch(engineeringMain.getEngineeringMainPersonList());
|
||||
EnterpriseScore scoreServiceOne = enterpriseScoreService.getOne(Wrappers.<EnterpriseScore>lambdaQuery()
|
||||
.eq(EnterpriseScore::getEnterpriseSn, engineeringMain.getEnterpriseSn())
|
||||
.eq(EnterpriseScore::getEngineeringSn, engineeringVo.getEngineeringSn()));
|
||||
if (scoreServiceOne == null) {
|
||||
EnterpriseScore enterpriseScore = new EnterpriseScore();
|
||||
enterpriseScore.setEnterpriseSn(engineeringMain.getEnterpriseSn());
|
||||
enterpriseScore.setEngineeringSn(engineeringVo.getEngineeringSn());
|
||||
enterpriseScore.setEnterpriseType(engineeringMain.getType());
|
||||
enterpriseScore.setCreateBy(projectService.list().get(0).getGovernmentSn());
|
||||
enterpriseScore.setCreateTime(new Date());
|
||||
scoreList.add(enterpriseScore);
|
||||
if (engineeringVo.getEngineeringMains() != null) {
|
||||
for (EngineeringMain engineeringMain : engineeringVo.getEngineeringMains()) {
|
||||
engineeringMain.setEngineeringSn(engineeringVo.getEngineeringSn());
|
||||
engineeringMainService.save(engineeringMain);
|
||||
if (engineeringMain.getEngineeringMainPersonList() != null) {
|
||||
for (EngineeringMainPerson engineeringMainPerson : engineeringMain.getEngineeringMainPersonList()) {
|
||||
engineeringMainPerson.setMainId(engineeringMain.getId());
|
||||
engineeringMainPerson.setEngineeringSn(engineeringVo.getEngineeringSn());
|
||||
}
|
||||
engineeringMainPersonService.saveBatch(engineeringMain.getEngineeringMainPersonList());
|
||||
}
|
||||
EnterpriseScore scoreServiceOne = enterpriseScoreService.getOne(Wrappers.<EnterpriseScore>lambdaQuery()
|
||||
.eq(EnterpriseScore::getEnterpriseSn, engineeringMain.getEnterpriseSn())
|
||||
.eq(EnterpriseScore::getEngineeringSn, engineeringVo.getEngineeringSn()));
|
||||
if (scoreServiceOne == null) {
|
||||
EnterpriseScore enterpriseScore = new EnterpriseScore();
|
||||
enterpriseScore.setEnterpriseSn(engineeringMain.getEnterpriseSn());
|
||||
enterpriseScore.setEngineeringSn(engineeringVo.getEngineeringSn());
|
||||
enterpriseScore.setEnterpriseType(engineeringMain.getType());
|
||||
enterpriseScore.setCreateBy(projectService.list().get(0).getGovernmentSn());
|
||||
enterpriseScore.setCreateTime(new Date());
|
||||
scoreList.add(enterpriseScore);
|
||||
}
|
||||
}
|
||||
}
|
||||
enterpriseScoreService.saveBatch(scoreList);
|
||||
|
||||
@ -5,39 +5,62 @@ import com.zhgd.xmgl.modules.safety.entity.InspectRecord;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "监督执法信息(DTO)", description = "InspectRecordsDto")
|
||||
public class InspectRecordDto extends InspectRecord {
|
||||
|
||||
// @Excel(name = "省", width = 15)
|
||||
@ApiModelProperty(value = "省")
|
||||
private String province;
|
||||
|
||||
// @Excel(name = "市", width = 15)
|
||||
@ApiModelProperty(value = "市")
|
||||
private String city;
|
||||
|
||||
// @Excel(name = "区", width = 15)
|
||||
@ApiModelProperty(value = "区")
|
||||
private String district;
|
||||
|
||||
// @Excel(name = "建设地址", width = 15)
|
||||
@ApiModelProperty(value = "建设地址")
|
||||
private String address;
|
||||
|
||||
@Excel(name = "建设单位", width = 15)
|
||||
@ApiModelProperty(value = "建设单位")
|
||||
private String buildEnt;
|
||||
|
||||
@Excel(name = "监理单位", width = 15)
|
||||
@ApiModelProperty(value = "监理单位")
|
||||
private String supervisorEnt;
|
||||
|
||||
@Excel(name = "施工单位", width = 15)
|
||||
@ApiModelProperty(value = "施工单位")
|
||||
private String opEnt;
|
||||
|
||||
@Excel(name = "勘察单位", width = 15)
|
||||
@ApiModelProperty(value = "勘察单位")
|
||||
private String surveyEnt;
|
||||
|
||||
@Excel(name = "设计单位", width = 15)
|
||||
@ApiModelProperty(value = "设计单位")
|
||||
private String designEnt;
|
||||
|
||||
@Excel(name = "审核级别", width = 15)
|
||||
@ApiModelProperty(value = "审核级别")
|
||||
private String levelName;
|
||||
|
||||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String stateName;
|
||||
|
||||
@Excel(name = "逾期情况", width = 15)
|
||||
@ApiModelProperty(value = "逾期情况")
|
||||
private String slippageStateName;
|
||||
|
||||
@ApiModelProperty(value="问题列表")
|
||||
private List<InspectQuestion> inspectQuestionList;
|
||||
|
||||
|
||||
@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ -13,4 +15,19 @@ public class InvestmentPaymentDto extends InvestmentPayment {
|
||||
|
||||
@ApiModelProperty(value="申报列表")
|
||||
private List<Long> applyIdList;
|
||||
|
||||
@ApiModelProperty(value = "合同金额(元)")
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
@ApiModelProperty(value = "结算金额(元)")
|
||||
private BigDecimal settlementAmount;
|
||||
|
||||
@ApiModelProperty(value = "结算定案日期")
|
||||
private Date settlementTime;
|
||||
|
||||
@ApiModelProperty(value = "合同未支付")
|
||||
private BigDecimal unPayAmount;
|
||||
|
||||
@ApiModelProperty(value = "结算未支付金额")
|
||||
private BigDecimal unPaySettlementAmount;
|
||||
}
|
||||
|
||||
@ -82,4 +82,10 @@ public class EnterpriseScoreDetail implements Serializable {
|
||||
@Excel(name = "得分", width = 15)
|
||||
@ApiModelProperty(value = "得分")
|
||||
private Integer score;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ public class InspectRecord implements Serializable {
|
||||
/**
|
||||
* 整改要求(1:限期整改;2:停工整改;)
|
||||
*/
|
||||
@Excel(name = "整改要求(1:限期整改;2:停工整改;)", width = 15)
|
||||
// @Excel(name = "整改要求(1:限期整改;2:停工整改;)", width = 15)
|
||||
@ApiModelProperty(value = "整改要求(1:限期整改;2:停工整改;)")
|
||||
private Integer requireType;
|
||||
/**
|
||||
@ -49,55 +49,50 @@ public class InspectRecord implements Serializable {
|
||||
/**
|
||||
* 检查人员(多个用逗号隔开)
|
||||
*/
|
||||
@Excel(name = "检查人员(多个用逗号隔开)", width = 15)
|
||||
// @Excel(name = "检查人员(多个用逗号隔开)", width = 15)
|
||||
@ApiModelProperty(value = "检查人员(多个用逗号隔开)")
|
||||
private String inspectUser;
|
||||
/**
|
||||
* 施工单位签名
|
||||
*/
|
||||
@Excel(name = "施工单位签名", width = 15)
|
||||
@ApiModelProperty(value = "施工单位签名")
|
||||
private String opSignature;
|
||||
/**
|
||||
* 监理单位签名
|
||||
*/
|
||||
@Excel(name = "监理单位签名", width = 15)
|
||||
@ApiModelProperty(value = "监理单位签名")
|
||||
private String supervisorSignature;
|
||||
/**
|
||||
* 检查人员签名
|
||||
*/
|
||||
@Excel(name = "检查人员签名", width = 15)
|
||||
@ApiModelProperty(value = "检查人员签名")
|
||||
private String inspectSignature;
|
||||
/**
|
||||
* 其他单位签名
|
||||
*/
|
||||
@Excel(name = "其他单位签名", width = 15)
|
||||
@ApiModelProperty(value = "其他单位签名")
|
||||
private String otherSignature;
|
||||
/**
|
||||
* 工程SN
|
||||
*/
|
||||
@Excel(name = "工程SN", width = 15)
|
||||
@ApiModelProperty(value = "工程SN")
|
||||
private String engineeringSn;
|
||||
/**
|
||||
* 项目SN
|
||||
*/
|
||||
@Excel(name = "项目SN", width = 15)
|
||||
@ApiModelProperty(value = "项目SN")
|
||||
private String projectSn;
|
||||
/**
|
||||
* 执法状态(1:执法中;2:待整改(整改中);3:待审核;4:已闭合(整改完成);5:已驳回)
|
||||
*/
|
||||
@Excel(name = "执法状态(1:执法中;2:待整改(整改中);3:待审核;4:已闭合(整改完成);5:已驳回)", width = 15)
|
||||
// @Excel(name = "执法状态(1:执法中;2:待整改(整改中);3:待审核;4:已闭合(整改完成);5:已驳回)", width = 15)
|
||||
@ApiModelProperty(value = "执法状态(1:执法中;2:待整改(整改中);3:待审核;4:已闭合(整改完成);5:已驳回)")
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 执法进度延误状态(1:正常;2:临期;3:超期)
|
||||
*/
|
||||
@Excel(name = "执法进度延误状态(1:正常;2:临期;3:超期)", width = 15)
|
||||
// @Excel(name = "执法进度延误状态(1:正常;2:临期;3:超期)", width = 15)
|
||||
@ApiModelProperty(value = "执法进度延误状态(1:正常;2:临期;3:超期)")
|
||||
private Integer slippageState;
|
||||
/**
|
||||
@ -109,27 +104,26 @@ public class InspectRecord implements Serializable {
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人", width = 20)
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 整改问题数
|
||||
*/
|
||||
@Excel(name = "整改问题数", width = 15)
|
||||
// @Excel(name = "整改问题数", width = 15)
|
||||
@ApiModelProperty(value = "整改问题数")
|
||||
private Integer questionNum;
|
||||
|
||||
/**
|
||||
* 监督执法类型(1:安全监督执法;2:质量监督执法;3:专项检查)
|
||||
*/
|
||||
@Excel(name = "监督执法类型(1:安全监督执法;2:质量监督执法;3:专项检查)", width = 15)
|
||||
// @Excel(name = "监督执法类型(1:安全监督执法;2:质量监督执法;3:专项检查)", width = 15)
|
||||
@ApiModelProperty(value = "监督执法类型(1:安全监督执法;2:质量监督执法;3:专项检查)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 审核级别(1:初审;2:复审)
|
||||
*/
|
||||
@Excel(name = "审核级别(1:初审;2:复审)", width = 15)
|
||||
// @Excel(name = "审核级别(1:初审;2:复审)", width = 15)
|
||||
@ApiModelProperty(value = "审核级别(1:初审;2:复审)")
|
||||
private Integer level;
|
||||
|
||||
@ -142,10 +136,12 @@ public class InspectRecord implements Serializable {
|
||||
private String projectName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "工程名称", width = 15)
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String engineeringName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "逾期天数", width = 15)
|
||||
@ApiModelProperty(value = "逾期天数")
|
||||
private Long slippage;
|
||||
}
|
||||
|
||||
@ -54,7 +54,6 @@ public class InvestmentContract implements Serializable {
|
||||
/**
|
||||
* 结算定案日期
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "结算定案日期")
|
||||
@ -99,4 +98,14 @@ public class InvestmentContract implements Serializable {
|
||||
@Excel(name = "工程sn", width = 15)
|
||||
@ApiModelProperty(value = "工程sn")
|
||||
private String engineeringSn;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "累计支付金额")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "支付比例")
|
||||
private String payRatio;
|
||||
}
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.safety.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -71,6 +69,12 @@ public class ProjectQuantity implements Serializable {
|
||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@ -83,4 +87,29 @@ public class ProjectQuantity implements Serializable {
|
||||
// @Excel(name = "工程sn", width = 15)
|
||||
@ApiModelProperty(value = "工程sn")
|
||||
private String engineeringSn;
|
||||
|
||||
@TableLogic(value = "0", delval = "1")
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createByName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private String updateByName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
package com.zhgd.xmgl.modules.safety.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.safety.entity.ProjectQuantity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 项目工程量
|
||||
@ -13,4 +17,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface ProjectQuantityMapper extends BaseMapper<ProjectQuantity> {
|
||||
|
||||
Page<ProjectQuantity> pageList(Page page, @Param(Constants.WRAPPER) Wrapper<ProjectQuantity> wrapper);
|
||||
}
|
||||
|
||||
@ -2,4 +2,8 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.safety.mapper.ProjectQuantityMapper">
|
||||
|
||||
<select id="pageList" resultType="com.zhgd.xmgl.modules.safety.entity.ProjectQuantity">
|
||||
select p.*, u.real_name updateByName from project_quantity p left join system_user u on p.update_by = u.user_id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,5 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.safety.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.safety.entity.ProjectQuantity;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IProjectQuantityService extends IService<ProjectQuantity> {
|
||||
|
||||
Page<ProjectQuantity> pageList(Page page, Wrapper<ProjectQuantity> wrapper);
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@ -53,12 +54,30 @@ public class InvestmentPaymentServiceImpl extends ServiceImpl<InvestmentPaymentM
|
||||
investmentApply.setApplyIdList(investmentApplyList.stream().filter(i -> i.getInvestmentPaymentId().equals(investmentApply.getId()))
|
||||
.map(i -> i.getId()).collect(Collectors.toList()));
|
||||
}
|
||||
Long contractId = investmentPaymentVoPage.getRecords().get(0).getContractId();
|
||||
InvestmentContract contract = investmentContractService.getById(contractId);
|
||||
for (InvestmentPaymentDto record : investmentPaymentVoPage.getRecords()) {
|
||||
record.setContractAmount(contract.getContractAmount());
|
||||
record.setSettlementAmount(contract.getSettlementAmount());
|
||||
record.setSettlementTime(contract.getSettlementTime());
|
||||
record.setUnPayAmount(contract.getContractAmount().subtract(record.getTotalAmount()));
|
||||
if (contract.getSettlementAmount() != null) {
|
||||
record.setUnPaySettlementAmount(contract.getSettlementAmount().subtract(record.getTotalAmount()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return investmentPaymentVoPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long saveInfo(InvestmentPaymentVo investmentPaymentVo) {
|
||||
InvestmentContract investmentContract = investmentContractService.getById(investmentPaymentVo.getContractId());
|
||||
BigDecimal reduce = this.list(Wrappers.<InvestmentPayment>lambdaQuery().eq(InvestmentPayment::getContractId, investmentPaymentVo.getContractId()))
|
||||
.stream().map(InvestmentPayment::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
investmentPaymentVo.setTotalAmount(reduce.add(investmentPaymentVo.getPayAmount()));
|
||||
investmentPaymentVo.setUnPayAmount(investmentContract.getContractAmount().subtract(investmentPaymentVo.getTotalAmount()));
|
||||
BigDecimal radio = investmentPaymentVo.getTotalAmount().divide(investmentContract.getContractAmount(), 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
|
||||
investmentPaymentVo.setPayRatio(radio.toString());
|
||||
if (StringUtils.isNotBlank(investmentPaymentVo.getEngineeringSn())) {
|
||||
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentVo.getEngineeringSn())).getProjectSn();
|
||||
investmentPaymentVo.setProjectSn(projectSn);
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.safety.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.safety.entity.ProjectQuantity;
|
||||
import com.zhgd.xmgl.modules.safety.mapper.ProjectQuantityMapper;
|
||||
import com.zhgd.xmgl.modules.safety.service.IProjectQuantityService;
|
||||
@ -16,4 +18,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@Service
|
||||
public class ProjectQuantityServiceImpl extends ServiceImpl<ProjectQuantityMapper, ProjectQuantity> implements IProjectQuantityService {
|
||||
|
||||
@Override
|
||||
public Page<ProjectQuantity> pageList(Page page, Wrapper<ProjectQuantity> wrapper) {
|
||||
return baseMapper.pageList(page, wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,7 +117,9 @@ public class MonitorDevServiceImpl extends ServiceImpl<MonitorDevMapper, Monitor
|
||||
monitorTreeDto.setSn(e.getEngineeringSn());
|
||||
monitorTreeDto.setChildren(buildMonitorTree(2, e.getEngineeringSn(), monitorDevs));
|
||||
monitorTreeDto.setTitle(e.getEngineeringName());
|
||||
monitorTreeDtos.add(monitorTreeDto);
|
||||
if (monitorTreeDto.getChildren().size() > 0) {
|
||||
monitorTreeDtos.add(monitorTreeDto);
|
||||
}
|
||||
});
|
||||
return monitorTreeDtos;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "1f3d3e5b9fe340bab84de67b0de08f44",
|
||||
"name" : "在建项目指标",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1706864647618,
|
||||
"updateTime" : 1716110822712,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -34,4 +34,8 @@
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.selectOne("SELECT COUNT( id ) num,SUM( engineering_cost ) cost,IFNULL( SUM( IF ( is_important = 1 AND examine_state = 3, 1, 0 )), 0 ) importance,IFNULL( SUM( IF ( engineering_type = 2, 1, 0 )), 0 ) bridge,IFNULL( SUM( IF ( engineering_type = 3, 1, 0 )), 0 ) tunnel,IFNULL( SUM( IF ( engineering_type = 4, 1, 0 )), 0 ) station,IFNULL( SUM( IF ( nature = 1, 1, 0 )), 0 ) newBuild, IFNULL( SUM( IF ( nature = 2, 1, 0 )), 0 ) reBuild,IFNULL( SUM( IF ( nature = 3, 1, 0 )), 0 ) extension,IFNULL( SUM( IF ( state = 4, 1, 0 )), 0 ) finished,IFNULL( SUM( IF ( state = 2, 1, 0 )), 0 ) building,IFNULL( SUM( IF ( state = 3, 1, 0 )), 0 ) shutdown FROM engineering WHERE #project ")
|
||||
import java.math.BigDecimal
|
||||
Map map = db.selectOne("SELECT COUNT( id ) num,SUM( engineering_cost ) cost,IFNULL( SUM( IF ( is_important = 1 AND examine_state = 3, 1, 0 )), 0 ) importance,IFNULL( SUM( IF ( engineering_type = 2, 1, 0 )), 0 ) bridge,IFNULL( SUM( IF ( engineering_type = 3, 1, 0 )), 0 ) tunnel,IFNULL( SUM( IF ( engineering_type = 4, 1, 0 )), 0 ) station,IFNULL( SUM( IF ( nature = 1, 1, 0 )), 0 ) newBuild, IFNULL( SUM( IF ( nature = 2, 1, 0 )), 0 ) reBuild,IFNULL( SUM( IF ( nature = 3, 1, 0 )), 0 ) extension,IFNULL( SUM( IF ( state = 4, 1, 0 )), 0 ) finished,IFNULL( SUM( IF ( state = 2, 1, 0 )), 0 ) building,IFNULL( SUM( IF ( state = 3, 1, 0 )), 0 ) shutdown FROM engineering WHERE #project ")
|
||||
var cost = map.get("cost");
|
||||
map.put("cost", new BigDecimal(cost).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP))
|
||||
return map;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "企业资质统计",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1691553575758,
|
||||
"updateTime" : 1712567948590,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -34,7 +34,7 @@
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
List list = db.select("SELECT REPLACE(d.dict_value, '单位', '') dict_value, COUNT(m.id) num FROM enterprise a LEFT JOIN enterprise_main m ON m.enterprise_sn = a.enterprise_sn LEFT JOIN system_dict_data d ON m.main_type = d.dict_label AND d.dict_type = 'enterprise_main' WHERE a.state = 1 AND #govalias GROUP BY d.dict_value")
|
||||
List list = db.select("SELECT REPLACE(d.dict_value, '单位', '') dict_value, COUNT(m.id) num FROM wisdomsitezw.enterprise a LEFT JOIN wisdomsitezw.enterprise_main m ON m.enterprise_sn = a.enterprise_sn LEFT JOIN wisdomsitezw.system_dict_data d ON m.main_type = d.dict_label AND d.dict_type = 'enterprise_main' WHERE a.state = 1 AND #govalias GROUP BY d.dict_value")
|
||||
|
||||
List dict = Arrays.asList("勘察", "建设", "施工", "监理", "设计");
|
||||
Integer other = 0;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "实名制信息统计",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1684201864834,
|
||||
"updateTime" : 1712567953141,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -35,7 +35,7 @@
|
||||
}
|
||||
================================
|
||||
import java.math.BigDecimal
|
||||
Map map = db.selectOne("SELECT COUNT(id) total,IFNULL(SUM(IF(person_type = 1, 1, 0)),0) manager,IFNULL(SUM(IF(person_type = 2, 1, 0)),0) worker FROM worker_info WHERE #project")
|
||||
Map map = db.selectOne("SELECT COUNT(id) total,IFNULL(SUM(IF(person_type = 1, 1, 0)),0) manager,IFNULL(SUM(IF(person_type = 2, 1, 0)),0) worker FROM wisdomsitezw.worker_info WHERE #project")
|
||||
var total = map.get("total")::int
|
||||
var manager = map.get("manager")::int
|
||||
var worker = map.get("worker")::int
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "扬尘报警类型统计",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1684405471022,
|
||||
"updateTime" : 1712567966222,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -83,9 +83,9 @@
|
||||
}
|
||||
================================
|
||||
import java.math.BigDecimal
|
||||
List list = db.select("SELECT d.dict_value as type, COUNT(a.id) num FROM system_dict_data d LEFT JOIN environment_alarm a ON d.dict_value = a.type AND TO_DAYS(a.create_time) = TO_DAYS(NOW()) AND #project WHERE d.dict_type = 'environment_alarm_type' GROUP BY d.dict_value")
|
||||
List list = db.select("SELECT d.dict_value as type, COUNT(a.id) num FROM wisdomsitezw.system_dict_data d LEFT JOIN wisdomsitezw.environment_alarm a ON d.dict_value = a.type AND TO_DAYS(a.create_time) = TO_DAYS(NOW()) AND #project WHERE d.dict_type = 'environment_alarm_type' GROUP BY d.dict_value")
|
||||
|
||||
Map totalMap = db.selectOne("SELECT COUNT( id ) num FROM environment_alarm WHERE TO_DAYS( create_time ) = TO_DAYS(NOW()) AND #project")
|
||||
Map totalMap = db.selectOne("SELECT COUNT( id ) num FROM wisdomsitezw.environment_alarm WHERE TO_DAYS( create_time ) = TO_DAYS(NOW()) AND #project")
|
||||
String total = totalMap.get("num")::int
|
||||
for (item in list) {
|
||||
Map map = item;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "查询工程分类统计",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1699250036244,
|
||||
"updateTime" : 1712567831373,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -83,11 +83,11 @@
|
||||
}
|
||||
================================
|
||||
import java.math.BigDecimal
|
||||
List list = db.select("SELECT d.dict_value, COUNT( a.id ) num FROM engineering a RIGHT JOIN system_dict_data d ON a.engineering_type = d.dict_label AND #projectalias WHERE a.examine_state = 3 AND d.dict_type = 'engineering_type' GROUP BY d.dict_value ORDER BY d.dict_sort")
|
||||
List list = db.select("SELECT d.dict_value, COUNT( a.id ) num FROM wisdomsitezw.engineering a RIGHT JOIN wisdomsitezw.system_dict_data d ON a.engineering_type = d.dict_label AND #projectalias WHERE a.examine_state = 3 AND d.dict_type = 'engineering_type' GROUP BY d.dict_value ORDER BY d.dict_sort")
|
||||
|
||||
List dictList = db.select("SELECT dict_value, dict_label num FROM system_dict_data where dict_type = 'engineering_type' ORDER BY dict_sort")
|
||||
List dictList = db.select("SELECT dict_value, dict_label num FROM wisdomsitezw.system_dict_data where dict_type = 'engineering_type' ORDER BY dict_sort")
|
||||
|
||||
Map totalMap = db.selectOne("SELECT COUNT(id) num FROM engineering WHERE examine_state = 3 AND #project")
|
||||
Map totalMap = db.selectOne("SELECT COUNT(id) num FROM wisdomsitezw.engineering WHERE examine_state = 3 AND #project")
|
||||
String total = totalMap.get("num")
|
||||
List result = new ArrayList();
|
||||
Integer other = 0;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "查询工程详细信息",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1684476794685,
|
||||
"updateTime" : 1712567922984,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -34,4 +34,4 @@
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.select("SELECT e.*, ent.enterprise_name FROM engineering e LEFT JOIN engineering_main m ON e.engineering_sn = m.engineering_sn LEFT JOIN enterprise ent ON m.enterprise_sn = ent.enterprise_sn WHERE examine_state = 3 AND m.type = 1 AND #project")
|
||||
return db.select("SELECT e.*, ent.enterprise_name FROM wisdomsitezw.engineering e LEFT JOIN wisdomsitezw.engineering_main m ON e.engineering_sn = m.engineering_sn LEFT JOIN wisdomsitezw.enterprise ent ON m.enterprise_sn = ent.enterprise_sn WHERE examine_state = 3 AND m.type = 1 AND #project")
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "查询所有项目数",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1684201839337,
|
||||
"updateTime" : 1712567927180,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -34,6 +34,6 @@
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
Map map = db.selectOne("SELECT COUNT(project_id) as total FROM project WHERE state = 1 AND #gov")
|
||||
Map map = db.selectOne("SELECT COUNT(project_id) as total FROM wisdomsitezw.project WHERE state = 1 AND #gov")
|
||||
map.put("total", map.get("total")::int)
|
||||
return map
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "查询项目详细信息",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1689755920273,
|
||||
"updateTime" : 1712567931221,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -22,4 +22,4 @@
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.select("SELECT * FROM project WHERE state = 1 AND #gov")
|
||||
return db.select("SELECT * FROM wisdomsitezw.project WHERE state = 1 AND #gov")
|
||||
@ -5,7 +5,7 @@
|
||||
"groupId" : "485e36d471af4f809398babc4abadafe",
|
||||
"name" : "顶部查询工程统计信息",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1706855342407,
|
||||
"updateTime" : 1712567936389,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : "admin",
|
||||
@ -34,4 +34,4 @@
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.selectOne("SELECT IFNULL(SUM(IF(examine_state = 3, 1, 0)),0) total,IFNULL(SUM(IF(YEAR(start_time) = YEAR(NOW()) AND state > 1, 1, 0)),0) newBuild,IFNULL(SUM(IF(YEAR(start_time) = YEAR(NOW()) AND state = 7, 1, 0)),0) finish,IFNULL(SUM(IF(is_important = 1 AND state > 1, 1, 0)),0) important,IFNULL( SUM( IF ( examine_state = 3 AND state = 1, 1, 0 )), 0 ) unStart,IFNULL( SUM( IF ( examine_state = 3 AND state = 2, 1, 0 )), 0 ) building,IFNULL( SUM( IF ( examine_state = 3 AND state = 4, 1, 0 )), 0 ) complete FROM engineering WHERE #project")
|
||||
return db.selectOne("SELECT IFNULL(SUM(IF(examine_state = 3, 1, 0)),0) total,IFNULL(SUM(IF(YEAR(start_time) = YEAR(NOW()) AND state > 1, 1, 0)),0) newBuild,IFNULL(SUM(IF(YEAR(start_time) = YEAR(NOW()) AND state = 7, 1, 0)),0) finish,IFNULL(SUM(IF(is_important = 1 AND state > 1, 1, 0)),0) important,IFNULL( SUM( IF ( examine_state = 3 AND state = 1, 1, 0 )), 0 ) unStart,IFNULL( SUM( IF ( examine_state = 3 AND state = 2, 1, 0 )), 0 ) building,IFNULL( SUM( IF ( examine_state = 3 AND state = 4, 1, 0 )), 0 ) complete FROM wisdomsitezw.engineering WHERE #project")
|
||||
Loading…
x
Reference in New Issue
Block a user