工程管理

This commit is contained in:
sxu 2025-01-09 13:32:45 +08:00
parent ad3ead07a4
commit 2eb5043e9f
4 changed files with 28 additions and 1 deletions

View File

@ -60,6 +60,16 @@ public class BmProject extends BaseEntity {
@Excel(name = "项目状态", readConverterExp = "0=筹建,1=在建,2=部分投运,3=投运,4=停工")
private String projectStatus;
/** 项目规模 */
@Excel(name = "项目规模")
@ApiModelProperty(value = "项目规模")
private String projectScale;
/** 项目负责人 */
@Excel(name = "项目负责人")
@ApiModelProperty(value = "项目负责人")
private String projectManager;
/** 地址 */
@Excel(name = "地址")
@ApiModelProperty(value = "地址")

View File

@ -3,6 +3,7 @@ package com.bonus.smartsite.basic.service.impl;
import java.util.List;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.smartsite.basic.mapper.BmProjectLotMapper;
@ -39,6 +40,7 @@ public class BmProjectLotServiceImpl implements IBmProjectLotService {
*/
@Override
public List<BmProjectLot> selectBmProjectLotList(BmProjectLot bmProjectLot) {
bmProjectLot.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
return bmProjectLotMapper.selectBmProjectLotList(bmProjectLot);
}
@ -51,6 +53,7 @@ public class BmProjectLotServiceImpl implements IBmProjectLotService {
@Override
public int insertBmProjectLot(BmProjectLot bmProjectLot) {
bmProjectLot.setCreateTime(DateUtils.getNowDate());
bmProjectLot.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
try {
return bmProjectLotMapper.insertBmProjectLot(bmProjectLot);
} catch (Exception e) {

View File

@ -1,8 +1,10 @@
package com.bonus.smartsite.basic.service.impl;
import java.security.SecureRandom;
import java.util.List;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.smartsite.basic.mapper.BmProjectMapper;
@ -39,6 +41,7 @@ public class BmProjectServiceImpl implements IBmProjectService {
*/
@Override
public List<BmProject> selectBmProjectList(BmProject bmProject) {
bmProject.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
return bmProjectMapper.selectBmProjectList(bmProject);
}
@ -51,6 +54,7 @@ public class BmProjectServiceImpl implements IBmProjectService {
@Override
public int insertBmProject(BmProject bmProject) {
bmProject.setCreateTime(DateUtils.getNowDate());
bmProject.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
try {
return bmProjectMapper.insertBmProject(bmProject);
} catch (Exception e) {

View File

@ -12,6 +12,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="companyId" column="company_id" />
<result property="ownerUnit" column="owner_unit" />
<result property="projectStatus" column="project_status" />
<result property="projectScale" column="project_scale" />
<result property="projectManager" column="project_manager" />
<result property="address" column="address" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
@ -22,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectBmProjectVo">
select project_id, project_name, plan_start_time, plan_end_time, project_amount, company_id, owner_unit, project_status, address, del_flag, create_by, create_time, update_by, update_time, remark from bm_project
select project_id, project_name, plan_start_time, plan_end_time, project_amount, company_id, owner_unit, project_status, project_scale, project_manager, address, del_flag, create_by, create_time, update_by, update_time, remark from bm_project
</sql>
<select id="selectBmProjectList" parameterType="com.bonus.smartsite.basic.domain.BmProject" resultMap="BmProjectResult">
@ -35,6 +37,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="companyId != null "> and company_id = #{companyId}</if>
<if test="ownerUnit != null and ownerUnit != ''"> and owner_unit = #{ownerUnit}</if>
<if test="projectStatus != null and projectStatus != ''"> and project_status = #{projectStatus}</if>
<if test="projectScale != null and projectScale != ''"> and project_scale = #{projectScale}</if>
<if test="projectManager != null and projectManager != ''"> and project_manager = #{projectManager}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
</where>
</select>
@ -54,6 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="companyId != null">company_id,</if>
<if test="ownerUnit != null and ownerUnit != ''">owner_unit,</if>
<if test="projectStatus != null">project_status,</if>
<if test="projectScale != null">project_scale,</if>
<if test="projectManager != null">project_manager,</if>
<if test="address != null">address,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
@ -70,6 +76,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="companyId != null">#{companyId},</if>
<if test="ownerUnit != null and ownerUnit != ''">#{ownerUnit},</if>
<if test="projectStatus != null">#{projectStatus},</if>
<if test="projectScale != null">#{projectScale},</if>
<if test="projectManager != null">#{projectManager},</if>
<if test="address != null">#{address},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
@ -90,6 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="companyId != null">company_id = #{companyId},</if>
<if test="ownerUnit != null and ownerUnit != ''">owner_unit = #{ownerUnit},</if>
<if test="projectStatus != null">project_status = #{projectStatus},</if>
<if test="projectScale != null">project_scale = #{projectScale},</if>
<if test="projectManager != null">project_manager = #{projectManager},</if>
<if test="address != null">address = #{address},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>