工程进度管理

This commit is contained in:
cwchen 2024-03-13 19:26:31 +08:00
parent 10286f7f9f
commit ff362c3876
10 changed files with 254 additions and 2 deletions

View File

@ -0,0 +1,15 @@
package com.securitycontrol.entity.system.base.dto;
import io.swagger.annotations.ApiModelProperty;
/**
* @authorcwchen
* @date2024-03-13-19:13
* @version1.0
* @description工程进度-dto
*/
public class ProScheduleDto {
@ApiModelProperty(value = "关键字")
private String keyWord;
}

View File

@ -0,0 +1,76 @@
package com.securitycontrol.entity.system.base.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @authorcwchen
* @date2024-03-13-19:13
* @version1.0
* @description工程进度-vo
*/
@Data
public class ProScheduleVo {
@ApiModelProperty(value = "工程ID")
private String proId;
@ApiModelProperty(value = "建管单位")
private String org;
@ApiModelProperty(value = "标段工程编码")
private String bidCode;
@ApiModelProperty(value = "单项工程编码")
private String signCode;
@ApiModelProperty(value = "工程编码")
private String proCode;
@ApiModelProperty(value = "工程名称")
private String proName;
@ApiModelProperty(value = "工程成本")
private String proCost;
@ApiModelProperty(value = "施工单位")
private String sgUnit;
@ApiModelProperty(value = "监理单位")
private String jlUnit;
@ApiModelProperty(value = "工程类型")
private String proType;
@ApiModelProperty(value = "工程规模")
private String proScale;
@ApiModelProperty(value = "项目经理")
private String manager;
@ApiModelProperty(value = "工程简介")
private String proBrief;
@ApiModelProperty(value = "当前工序")
private String nowGx;
@ApiModelProperty(value = "工程状态")
private String status;
@ApiModelProperty(value = "计划开始时间")
private String planStartTime;
@ApiModelProperty(value = "计划结束时间")
private String planEndTime;
@ApiModelProperty(value = "实际开始时间")
private String startTime;
@ApiModelProperty(value = "实际竣工时间")
private String endTime;
@ApiModelProperty(value = "当前进度")
private String nowProSchedule;
}

View File

@ -0,0 +1,39 @@
package com.securitycontrol.system.base.controller;
import com.securitycontrol.common.core.web.controller.BaseController;
import com.securitycontrol.common.core.web.page.TableDataInfo;
import com.securitycontrol.common.log.annotation.Log;
import com.securitycontrol.common.log.enums.OperationType;
import com.securitycontrol.entity.system.base.dto.ProScheduleDto;
import com.securitycontrol.entity.system.base.vo.ProScheduleVo;
import com.securitycontrol.system.base.service.IProScheduleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @authorcwchen
* @date2024-03-13-19:07
* @version1.0
* @description工程进度-web
*/
@RestController
@RequestMapping("/base/proSchedule/")
public class ProScheduleController extends BaseController {
@Resource(name = "IProScheduleService")
private IProScheduleService service;
@ApiOperation(value = "获取工程进度列表")
@GetMapping("getProScheduleLists")
@Log(title = "基础管理", menu = "基础管理->工程管理管理", grade = OperationType.QUERY_BUSINESS, details = "查询工程进度", type = "业务日志")
public TableDataInfo getProScheduleLists(ProScheduleDto dto) {
startPage();
List<ProScheduleVo> list = service.getProScheduleLists(dto);
return getDataTable(list);
}
}

View File

@ -0,0 +1,26 @@
package com.securitycontrol.system.base.mapper;
import com.securitycontrol.entity.system.base.dto.ProScheduleDto;
import com.securitycontrol.entity.system.base.vo.ProScheduleVo;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @authorcwchen
* @date2024-03-13-19:08
* @version1.0
* @description工程进度-业务逻辑层
*/
@Repository(value = "IProScheduleMapper")
public interface IProScheduleMapper {
/**
* 获取工程进度列表
* @param dto
* @return List<ProScheduleVo>
* @description
* @author cwchen
* @date 2024/3/13 19:20
*/
List<ProScheduleVo> getProScheduleLists(ProScheduleDto dto);
}

View File

@ -0,0 +1,24 @@
package com.securitycontrol.system.base.service;
import com.securitycontrol.entity.system.base.dto.ProScheduleDto;
import com.securitycontrol.entity.system.base.vo.ProScheduleVo;
import java.util.List;
/**
* @authorcwchen
* @date2024-03-13-19:07
* @version1.0
* @description工程进度-业务层
*/
public interface IProScheduleService {
/**
* 获取工程进度列表
* @param dto
* @return List<ProScheduleVo>
* @description
* @author cwchen
* @date 2024/3/13 19:19
*/
List<ProScheduleVo> getProScheduleLists(ProScheduleDto dto);
}

View File

@ -0,0 +1,33 @@
package com.securitycontrol.system.base.service.impl;
import com.securitycontrol.entity.system.base.dto.ProScheduleDto;
import com.securitycontrol.entity.system.base.vo.ProScheduleVo;
import com.securitycontrol.system.base.mapper.IProScheduleMapper;
import com.securitycontrol.system.base.service.IProScheduleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @authorcwchen
* @date2024-03-13-19:08
* @version1.0
* @description工程进度-业务逻辑层
*/
@Slf4j
@Service(value = "IProScheduleService")
public class ProScheduleServiceImpl implements IProScheduleService {
@Resource(name = "IProScheduleMapper")
private IProScheduleMapper mapper;
@Override
public List<ProScheduleVo> getProScheduleLists(ProScheduleDto dto) {
List<ProScheduleVo> list = new ArrayList<>();
list = mapper.getProScheduleLists(dto);
return list;
}
}

View File

@ -54,7 +54,7 @@ public class ProServiceImpl implements IProService {
private FileUploadService mongoService; private FileUploadService mongoService;
@Value("${file.temp_file_path}") @Value("${file.temp_file_path}")
private String temp_file_path; private String tempFilePath;
@Override @Override
@ -227,7 +227,7 @@ public class ProServiceImpl implements IProService {
public AjaxResult importProData(MultipartFile file, HttpServletRequest request, HttpServletResponse response) { public AjaxResult importProData(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {
List<String> errorList = new ArrayList<>(); List<String> errorList = new ArrayList<>();
try { try {
List<JSONObject> lstObj = (List<JSONObject>) ImportExcelUtils.readExcel(file, ProImportVo.class, temp_file_path); List<JSONObject> lstObj = (List<JSONObject>) ImportExcelUtils.readExcel(file, ProImportVo.class, tempFilePath);
List<JSONObject> lstError = new ArrayList<>(); List<JSONObject> lstError = new ArrayList<>();
List<ProImportVo> list = new ArrayList<>(); List<ProImportVo> list = new ArrayList<>();
if (lstObj != null && lstObj.size() > 0) { if (lstObj != null && lstObj.size() > 0) {

View File

@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.export.styler.IExcelExportStyler;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
/** /**
* @author 10488
* @Auther: ccw * @Auther: ccw
* @Date: 2022/05/12/16:22 * @Date: 2022/05/12/16:22
* @description: easypoi 导出表格样式 * @description: easypoi 导出表格样式

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.securitycontrol.system.base.mapper.IProScheduleMapper">
<!--获取工程进度列表-->
<select id="getProScheduleLists" resultType="com.securitycontrol.entity.system.base.vo.ProScheduleVo">
SELECT tp.pro_id AS proId,
sb.city_name AS org,
tp.pro_name AS proName,
tp.pro_type AS proType,
tp.pro_scale AS proScale,
tp.jl_unit AS jlUnit,
tp.sg_unit AS sgUnit,
tp.manager AS manager,
tp.plan_start_time AS planStartTime,
tp.plan_end_time AS planEndTime,
tp.start_time AS startTime,
tp.end_time AS endTime,
tp.pro_cost AS proCost,
tp.pro_brief AS proBrief,
tp.status,
tp.bid_code AS bidCode,
tp.sign_code AS signCode,
tp.pro_code AS proCode
FROM tb_project tp
LEFT JOIN sys_build sb ON tp.org = sb.org_id
<where>
<if test="keyWord !=null and keyWord!=''">
AND (
INSTR(tp.pro_name,#{keyWord}) > 0 OR
INSTR(tp.jl_unit,#{keyWord}) > 0 OR
INSTR(tp.sg_unit,#{keyWord}) > 0 OR
INSTR(tp.manager,#{keyWord}) > 0 OR
)
</if>
</where>
</select>
</mapper>