新增hh项目进度汇报 #8

Merged
ming merged 1 commits from zhoumingxiu into main 2023-12-14 15:43:59 +08:00
7 changed files with 689 additions and 1 deletions

View File

@ -0,0 +1,104 @@
package com.god.web.controller.hydraulicImplement.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.god.common.annotation.Log;
import com.god.common.core.controller.BaseController;
import com.god.common.core.domain.AjaxResult;
import com.god.common.enums.BusinessType;
import com.god.hydraulicImplement.domain.HhHydraulicProgressReport;
import com.god.hydraulicImplement.service.IHhHydraulicProgressReportService;
import com.god.common.utils.poi.ExcelUtil;
import com.god.common.core.page.TableDataInfo;
/**
* 项目进度汇报Controller
*
* @author god
* @date 2023-12-14
*/
@RestController
@RequestMapping("/hydraulicImplement/implement")
public class HhHydraulicProgressReportController extends BaseController
{
@Autowired
private IHhHydraulicProgressReportService hhHydraulicProgressReportService;
/**
* 查询项目进度汇报列表
*/
@PreAuthorize("@ss.hasPermi('hydraulicImplement:implement:list')")
@GetMapping("/list")
public TableDataInfo list(HhHydraulicProgressReport hhHydraulicProgressReport)
{
startPage();
List<HhHydraulicProgressReport> list = hhHydraulicProgressReportService.selectHhHydraulicProgressReportList(hhHydraulicProgressReport);
return getDataTable(list);
}
/**
* 导出项目进度汇报列表
*/
@PreAuthorize("@ss.hasPermi('hydraulicImplement:implement:export')")
@Log(title = "项目进度汇报", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, HhHydraulicProgressReport hhHydraulicProgressReport)
{
List<HhHydraulicProgressReport> list = hhHydraulicProgressReportService.selectHhHydraulicProgressReportList(hhHydraulicProgressReport);
ExcelUtil<HhHydraulicProgressReport> util = new ExcelUtil<HhHydraulicProgressReport>(HhHydraulicProgressReport.class);
util.exportExcel(response, list, "项目进度汇报数据");
}
/**
* 获取项目进度汇报详细信息
*/
@PreAuthorize("@ss.hasPermi('hydraulicImplement:implement:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(hhHydraulicProgressReportService.selectHhHydraulicProgressReportById(id));
}
/**
* 新增项目进度汇报
*/
@PreAuthorize("@ss.hasPermi('hydraulicImplement:implement:add')")
@Log(title = "项目进度汇报", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody HhHydraulicProgressReport hhHydraulicProgressReport)
{
return toAjax(hhHydraulicProgressReportService.insertHhHydraulicProgressReport(hhHydraulicProgressReport));
}
/**
* 修改项目进度汇报
*/
@PreAuthorize("@ss.hasPermi('hydraulicImplement:implement:edit')")
@Log(title = "项目进度汇报", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody HhHydraulicProgressReport hhHydraulicProgressReport)
{
return toAjax(hhHydraulicProgressReportService.updateHhHydraulicProgressReport(hhHydraulicProgressReport));
}
/**
* 删除项目进度汇报
*/
@PreAuthorize("@ss.hasPermi('hydraulicImplement:implement:remove')")
@Log(title = "项目进度汇报", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(hhHydraulicProgressReportService.deleteHhHydraulicProgressReportByIds(ids));
}
}

View File

@ -0,0 +1,233 @@
package com.god.hydraulicImplement.domain;
import com.god.common.core.domain.GodEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.god.common.annotation.Excel;
import com.god.common.core.domain.BaseEntity;
/**
* 项目进度汇报对象 hh_hydraulic_progress_report
*
* @author god
* @date 2023-12-14
*/
public class HhHydraulicProgressReport extends GodEntity
{
private static final long serialVersionUID = 1L;
/** 主键id */
private String id;
/** 项目名称 */
@Excel(name = "项目名称")
private String projectName;
/** 项目编码 */
@Excel(name = "项目编码")
private String projectCode;
/** 汇报日期 */
@Excel(name = "汇报日期")
private String reportDate;
/** 任务名称 */
@Excel(name = "任务名称")
private String taskName;
/** 汇报类型 */
@Excel(name = "汇报类型")
private String reportType;
/** 实际开始日期 */
@Excel(name = "实际开始日期")
private String startDate;
/** 实际结束日期 */
@Excel(name = "实际结束日期")
private String endDate;
/** 实际工期 */
@Excel(name = "实际工期")
private String duration;
/** 工程进度 */
@Excel(name = "工程进度")
private String projectProgress;
/** 本次完成工程量 */
@Excel(name = "本次完成工程量")
private String engineerQuantity;
/** 已完成工程进度 */
@Excel(name = "已完成工程进度")
private String finishProgress;
/** 汇报人 */
@Excel(name = "汇报人")
private String reportPersonnel;
/** 所属系统 */
@Excel(name = "所属系统")
private String sourceSys;
/** 接口类型 */
@Excel(name = "接口类型")
private String interfaceType;
public String getReportPersonnel() {
return reportPersonnel;
}
public void setReportPersonnel(String reportPersonnel) {
this.reportPersonnel = reportPersonnel;
}
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setProjectName(String projectName)
{
this.projectName = projectName;
}
public String getProjectName()
{
return projectName;
}
public void setProjectCode(String projectCode)
{
this.projectCode = projectCode;
}
public String getProjectCode()
{
return projectCode;
}
public void setReportDate(String reportDate)
{
this.reportDate = reportDate;
}
public String getReportDate()
{
return reportDate;
}
public void setTaskName(String taskName)
{
this.taskName = taskName;
}
public String getTaskName()
{
return taskName;
}
public void setReportType(String reportType)
{
this.reportType = reportType;
}
public String getReportType()
{
return reportType;
}
public void setStartDate(String startDate)
{
this.startDate = startDate;
}
public String getStartDate()
{
return startDate;
}
public void setEndDate(String endDate)
{
this.endDate = endDate;
}
public String getEndDate()
{
return endDate;
}
public void setDuration(String duration)
{
this.duration = duration;
}
public String getDuration()
{
return duration;
}
public void setProjectProgress(String projectProgress)
{
this.projectProgress = projectProgress;
}
public String getProjectProgress()
{
return projectProgress;
}
public void setEngineerQuantity(String engineerQuantity)
{
this.engineerQuantity = engineerQuantity;
}
public String getEngineerQuantity()
{
return engineerQuantity;
}
public void setFinishProgress(String finishProgress)
{
this.finishProgress = finishProgress;
}
public String getFinishProgress()
{
return finishProgress;
}
public void setSourceSys(String sourceSys)
{
this.sourceSys = sourceSys;
}
public String getSourceSys()
{
return sourceSys;
}
public void setInterfaceType(String interfaceType)
{
this.interfaceType = interfaceType;
}
public String getInterfaceType()
{
return interfaceType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("projectName", getProjectName())
.append("projectCode", getProjectCode())
.append("reportDate", getReportDate())
.append("taskName", getTaskName())
.append("reportType", getReportType())
.append("startDate", getStartDate())
.append("endDate", getEndDate())
.append("duration", getDuration())
.append("projectProgress", getProjectProgress())
.append("engineerQuantity", getEngineerQuantity())
.append("finishProgress", getFinishProgress())
.append("sourceSys", getSourceSys())
.append("interfaceType", getInterfaceType())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.god.hydraulicImplement.mapper;
import java.util.List;
import com.god.hydraulicImplement.domain.HhHydraulicProgressReport;
/**
* 项目进度汇报Mapper接口
*
* @author god
* @date 2023-12-14
*/
public interface HhHydraulicProgressReportMapper
{
/**
* 查询项目进度汇报
*
* @param id 项目进度汇报主键
* @return 项目进度汇报
*/
public HhHydraulicProgressReport selectHhHydraulicProgressReportById(String id);
/**
* 查询项目进度汇报列表
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 项目进度汇报集合
*/
public List<HhHydraulicProgressReport> selectHhHydraulicProgressReportList(HhHydraulicProgressReport hhHydraulicProgressReport);
/**
* 新增项目进度汇报
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 结果
*/
public int insertHhHydraulicProgressReport(HhHydraulicProgressReport hhHydraulicProgressReport);
/**
* 修改项目进度汇报
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 结果
*/
public int updateHhHydraulicProgressReport(HhHydraulicProgressReport hhHydraulicProgressReport);
/**
* 删除项目进度汇报
*
* @param id 项目进度汇报主键
* @return 结果
*/
public int deleteHhHydraulicProgressReportById(String id);
/**
* 批量删除项目进度汇报
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteHhHydraulicProgressReportByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.god.hydraulicImplement.service;
import java.util.List;
import com.god.hydraulicImplement.domain.HhHydraulicProgressReport;
/**
* 项目进度汇报Service接口
*
* @author god
* @date 2023-12-14
*/
public interface IHhHydraulicProgressReportService
{
/**
* 查询项目进度汇报
*
* @param id 项目进度汇报主键
* @return 项目进度汇报
*/
public HhHydraulicProgressReport selectHhHydraulicProgressReportById(String id);
/**
* 查询项目进度汇报列表
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 项目进度汇报集合
*/
public List<HhHydraulicProgressReport> selectHhHydraulicProgressReportList(HhHydraulicProgressReport hhHydraulicProgressReport);
/**
* 新增项目进度汇报
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 结果
*/
public int insertHhHydraulicProgressReport(HhHydraulicProgressReport hhHydraulicProgressReport);
/**
* 修改项目进度汇报
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 结果
*/
public int updateHhHydraulicProgressReport(HhHydraulicProgressReport hhHydraulicProgressReport);
/**
* 批量删除项目进度汇报
*
* @param ids 需要删除的项目进度汇报主键集合
* @return 结果
*/
public int deleteHhHydraulicProgressReportByIds(String[] ids);
/**
* 删除项目进度汇报信息
*
* @param id 项目进度汇报主键
* @return 结果
*/
public int deleteHhHydraulicProgressReportById(String id);
}

View File

@ -0,0 +1,97 @@
package com.god.hydraulicImplement.service.impl;
import java.util.List;
import com.god.common.utils.DateUtils;
import com.god.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.god.hydraulicImplement.mapper.HhHydraulicProgressReportMapper;
import com.god.hydraulicImplement.domain.HhHydraulicProgressReport;
import com.god.hydraulicImplement.service.IHhHydraulicProgressReportService;
/**
* 项目进度汇报Service业务层处理
*
* @author god
* @date 2023-12-14
*/
@Service
public class HhHydraulicProgressReportServiceImpl implements IHhHydraulicProgressReportService
{
@Autowired
private HhHydraulicProgressReportMapper hhHydraulicProgressReportMapper;
/**
* 查询项目进度汇报
*
* @param id 项目进度汇报主键
* @return 项目进度汇报
*/
@Override
public HhHydraulicProgressReport selectHhHydraulicProgressReportById(String id)
{
return hhHydraulicProgressReportMapper.selectHhHydraulicProgressReportById(id);
}
/**
* 查询项目进度汇报列表
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 项目进度汇报
*/
@Override
public List<HhHydraulicProgressReport> selectHhHydraulicProgressReportList(HhHydraulicProgressReport hhHydraulicProgressReport)
{
return hhHydraulicProgressReportMapper.selectHhHydraulicProgressReportList(hhHydraulicProgressReport);
}
/**
* 新增项目进度汇报
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 结果
*/
@Override
public int insertHhHydraulicProgressReport(HhHydraulicProgressReport hhHydraulicProgressReport)
{
hhHydraulicProgressReport.setId(IdUtils.fastSimpleUUID());
hhHydraulicProgressReport.setCreateTime(DateUtils.getTime());
return hhHydraulicProgressReportMapper.insertHhHydraulicProgressReport(hhHydraulicProgressReport);
}
/**
* 修改项目进度汇报
*
* @param hhHydraulicProgressReport 项目进度汇报
* @return 结果
*/
@Override
public int updateHhHydraulicProgressReport(HhHydraulicProgressReport hhHydraulicProgressReport)
{
return hhHydraulicProgressReportMapper.updateHhHydraulicProgressReport(hhHydraulicProgressReport);
}
/**
* 批量删除项目进度汇报
*
* @param ids 需要删除的项目进度汇报主键
* @return 结果
*/
@Override
public int deleteHhHydraulicProgressReportByIds(String[] ids)
{
return hhHydraulicProgressReportMapper.deleteHhHydraulicProgressReportByIds(ids);
}
/**
* 删除项目进度汇报信息
*
* @param id 项目进度汇报主键
* @return 结果
*/
@Override
public int deleteHhHydraulicProgressReportById(String id)
{
return hhHydraulicProgressReportMapper.deleteHhHydraulicProgressReportById(id);
}
}

View File

@ -0,0 +1,132 @@
<?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.god.hydraulicImplement.mapper.HhHydraulicProgressReportMapper">
<resultMap type="HhHydraulicProgressReport" id="HhHydraulicProgressReportResult">
<result property="id" column="id"/>
<result property="projectName" column="project_name"/>
<result property="projectCode" column="project_code"/>
<result property="reportDate" column="report_date"/>
<result property="taskName" column="task_name"/>
<result property="reportType" column="report_type"/>
<result property="startDate" column="start_date"/>
<result property="endDate" column="end_date"/>
<result property="duration" column="duration"/>
<result property="projectProgress" column="project_progress"/>
<result property="engineerQuantity" column="engineer_quantity"/>
<result property="finishProgress" column="finish_progress"/>
<result property="reportPersonnel" column="report_personnel"/>
<result property="sourceSys" column="source_sys"/>
<result property="interfaceType" column="interface_type"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectHhHydraulicProgressReportVo">
select id, project_name, project_code, report_date, task_name, report_type, start_date, end_date, duration, project_progress, engineer_quantity, finish_progress, report_personnel, source_sys, interface_type, create_time from hh_hydraulic_progress_report
</sql>
<select id="selectHhHydraulicProgressReportList" parameterType="HhHydraulicProgressReport"
resultMap="HhHydraulicProgressReportResult">
<include refid="selectHhHydraulicProgressReportVo"/>
<where>
<if test="projectName != null and projectName != ''">and project_name like concat('%', #{projectName},
'%')
</if>
<if test="projectCode != null and projectCode != ''">and project_code = #{projectCode}</if>
<if test="reportDate != null and reportDate != ''">and report_date = #{reportDate}</if>
<if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if>
<if test="reportType != null and reportType != ''">and report_type = #{reportType}</if>
<if test="startDate != null and startDate != ''">and start_date = #{startDate}</if>
<if test="endDate != null and endDate != ''">and end_date = #{endDate}</if>
<if test="duration != null and duration != ''">and duration = #{duration}</if>
<if test="projectProgress != null and projectProgress != ''">and project_progress = #{projectProgress}</if>
<if test="engineerQuantity != null and engineerQuantity != ''">and engineer_quantity =
#{engineerQuantity}
</if>
<if test="finishProgress != null and finishProgress != ''">and finish_progress = #{finishProgress}</if>
<if test="reportPersonnel != null and reportPersonnel != ''">and report_personnel = #{reportPersonnel}</if>
<if test="sourceSys != null and sourceSys != ''">and source_sys = #{sourceSys}</if>
<if test="interfaceType != null and interfaceType != ''">and interface_type = #{interfaceType}</if>
</where>
</select>
<select id="selectHhHydraulicProgressReportById" parameterType="String" resultMap="HhHydraulicProgressReportResult">
<include refid="selectHhHydraulicProgressReportVo"/>
where id = #{id}
</select>
<insert id="insertHhHydraulicProgressReport" parameterType="HhHydraulicProgressReport">
insert into hh_hydraulic_progress_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="projectName != null">project_name,</if>
<if test="projectCode != null">project_code,</if>
<if test="reportDate != null">report_date,</if>
<if test="taskName != null">task_name,</if>
<if test="reportType != null">report_type,</if>
<if test="startDate != null">start_date,</if>
<if test="endDate != null">end_date,</if>
<if test="duration != null">duration,</if>
<if test="projectProgress != null">project_progress,</if>
<if test="engineerQuantity != null">engineer_quantity,</if>
<if test="finishProgress != null">finish_progress,</if>
<if test="reportPersonnel != null">report_personnel,</if>
<if test="sourceSys != null">source_sys,</if>
<if test="interfaceType != null">interface_type,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="projectName != null">#{projectName},</if>
<if test="projectCode != null">#{projectCode},</if>
<if test="reportDate != null">#{reportDate},</if>
<if test="taskName != null">#{taskName},</if>
<if test="reportType != null">#{reportType},</if>
<if test="startDate != null">#{startDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="duration != null">#{duration},</if>
<if test="projectProgress != null">#{projectProgress},</if>
<if test="engineerQuantity != null">#{engineerQuantity},</if>
<if test="finishProgress != null">#{finishProgress},</if>
<if test="reportPersonnel != null">#{reportPersonnel},</if>
<if test="sourceSys != null">#{sourceSys},</if>
<if test="interfaceType != null">#{interfaceType},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateHhHydraulicProgressReport" parameterType="HhHydraulicProgressReport">
update hh_hydraulic_progress_report
<trim prefix="SET" suffixOverrides=",">
<if test="projectName != null">project_name = #{projectName},</if>
<if test="projectCode != null">project_code = #{projectCode},</if>
<if test="reportDate != null">report_date = #{reportDate},</if>
<if test="taskName != null">task_name = #{taskName},</if>
<if test="reportType != null">report_type = #{reportType},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="duration != null">duration = #{duration},</if>
<if test="projectProgress != null">project_progress = #{projectProgress},</if>
<if test="engineerQuantity != null">engineer_quantity = #{engineerQuantity},</if>
<if test="finishProgress != null">finish_progress = #{finishProgress},</if>
<if test="reportPersonnel != null">report_personnel = #{reportPersonnel},</if>
<if test="sourceSys != null">source_sys = #{sourceSys},</if>
<if test="interfaceType != null">interface_type = #{interfaceType},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHhHydraulicProgressReportById" parameterType="String">
delete from hh_hydraulic_progress_report where id = #{id}
</delete>
<delete id="deleteHhHydraulicProgressReportByIds" parameterType="String">
delete from hh_hydraulic_progress_report where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsSaleOrderInfoById" parameterType="String" resultMap="WmsSaleOrderInfoWmsSaleOrderDetailResult"> <select id="selectWmsSaleOrderInfoById" parameterType="String" resultMap="WmsSaleOrderInfoWmsSaleOrderDetailResult">
select a.id, a.order_code, a.order_date, a.product_type, a.handled_org, a.handled_by, a.order_status, a.customer_num, a.customer_name, a.credit_code, a.regist_addr, a.contact_person, a.contact_phone, a.account_name, a.account_bank, a.account_number, a.tax_price_val, a.total_price_val, a.tax_val, a.remark, a.create_time, a.source_sys, a.interface_type, select a.id, a.order_code, a.order_date, a.product_type, a.handled_org, a.handled_by, a.order_status, a.customer_num, a.customer_name, a.credit_code, a.regist_addr, a.contact_person, a.contact_phone, a.account_name, a.account_bank, a.account_number, a.tax_price_val, a.total_price_val, a.tax_val, a.remark, a.create_time, a.source_sys, a.interface_type,
b.id as sub_id, b.sale_order_id as sub_sale_order_id, b.product_num as sub_product_num, b.product_name as sub_product_name, b.product_format as sub_product_format, b.product_unit as sub_product_unit, b.goods_num as sub_goods_num, b.unit_price as sub_unit_price, b.total_price_val as sub_total_price_val, b.tax_rate as sub_tax_rate, b.tax_unit_price as sub_tax_unit_price, b.tax_price_val as sub_tax_price_val, b.tax_paid as sub_tax_paid, b.remark as sub_remark, b.isdeleted as sub_isdeleted, b.source_sys as sub_source_sys, b.interface_type as sub_interface_type b.id as sub_id, b.sale_order_id as sub_sale_order_id, b.product_num as suhydraulic/bidPlanb_product_num, b.product_name as sub_product_name, b.product_format as sub_product_format, b.product_unit as sub_product_unit, b.goods_num as sub_goods_num, b.unit_price as sub_unit_price, b.total_price_val as sub_total_price_val, b.tax_rate as sub_tax_rate, b.tax_unit_price as sub_tax_unit_price, b.tax_price_val as sub_tax_price_val, b.tax_paid as sub_tax_paid, b.remark as sub_remark, b.isdeleted as sub_isdeleted, b.source_sys as sub_source_sys, b.interface_type as sub_interface_type
from wms_sale_order_info a from wms_sale_order_info a
left join wms_sale_order_detail b on b.sale_order_id = a.id left join wms_sale_order_detail b on b.sale_order_id = a.id
where a.id = #{id} where a.id = #{id}