基础信息-设备

highway
A0010407 1 year ago
parent bc416685b0
commit 94f419e47e

@ -7,7 +7,7 @@ import com.op.common.core.web.domain.BaseEntity;
/** /**
* base_equipment * base_equipment
* *
* @author Open Platform * @author Open Platform
* @date 2023-07-20 * @date 2023-07-20
*/ */
@ -78,8 +78,8 @@ public class BaseEquipment extends BaseEntity {
private Long attr4; private Long attr4;
/** 单台能力工时 */ /** 单台能力工时 */
// @Excel(name = "单台能力工时") @Excel(name = "单台能力工时")
// private String unitWorkingHours; private String unitWorkingHours;
/** 工段 */ /** 工段 */
@Excel(name = "工段") @Excel(name = "工段")
@ -205,13 +205,13 @@ public class BaseEquipment extends BaseEntity {
public Long getAttr4() { public Long getAttr4() {
return attr4; return attr4;
} }
// public void setUnitWorkingHours(String unitWorkingHours) { public void setUnitWorkingHours(String unitWorkingHours) {
// this.unitWorkingHours = unitWorkingHours; this.unitWorkingHours = unitWorkingHours;
// } }
//
// public String getUnitWorkingHours() { public String getUnitWorkingHours() {
// return unitWorkingHours; return unitWorkingHours;
// } }
public void setWorkshopSection(String workshopSection) { public void setWorkshopSection(String workshopSection) {
this.workshopSection = workshopSection; this.workshopSection = workshopSection;
} }
@ -237,31 +237,31 @@ public class BaseEquipment extends BaseEntity {
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("equipmentId", getEquipmentId()) .append("equipmentId", getEquipmentId())
.append("equipmentCode", getEquipmentCode()) .append("equipmentCode", getEquipmentCode())
.append("equipmentName", getEquipmentName()) .append("equipmentName", getEquipmentName())
.append("equipmentBrand", getEquipmentBrand()) .append("equipmentBrand", getEquipmentBrand())
.append("equipmentSpec", getEquipmentSpec()) .append("equipmentSpec", getEquipmentSpec())
.append("equipmentTypeId", getEquipmentTypeId()) .append("equipmentTypeId", getEquipmentTypeId())
.append("equipmentTypeCode", getEquipmentTypeCode()) .append("equipmentTypeCode", getEquipmentTypeCode())
.append("equipmentTypeName", getEquipmentTypeName()) .append("equipmentTypeName", getEquipmentTypeName())
.append("workshopId", getWorkshopId()) .append("workshopId", getWorkshopId())
.append("workshopCode", getWorkshopCode()) .append("workshopCode", getWorkshopCode())
.append("workshopName", getWorkshopName()) .append("workshopName", getWorkshopName())
.append("status", getStatus()) .append("status", getStatus())
.append("remark", getRemark()) .append("remark", getRemark())
.append("attr1", getAttr1()) .append("attr1", getAttr1())
.append("attr2", getAttr2()) .append("attr2", getAttr2())
.append("attr3", getAttr3()) .append("attr3", getAttr3())
.append("attr4", getAttr4()) .append("attr4", getAttr4())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
// .append("unitWorkingHours", getUnitWorkingHours()) .append("unitWorkingHours", getUnitWorkingHours())
.append("workshopSection", getWorkshopSection()) .append("workshopSection", getWorkshopSection())
.append("equipmentLocation", getEquipmentLocation()) .append("equipmentLocation", getEquipmentLocation())
.append("hourlyUnitPrice", getHourlyUnitPrice()) .append("hourlyUnitPrice", getHourlyUnitPrice())
.toString(); .toString();
} }
} }

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.wms.mapper.BaseEquipmentMapper"> <mapper namespace="com.op.wms.mapper.BaseEquipmentMapper">
<resultMap type="BaseEquipment" id="BaseEquipmentResult"> <resultMap type="BaseEquipment" id="BaseEquipmentResult">
<result property="equipmentId" column="equipment_id" /> <result property="equipmentId" column="equipment_id" />
<result property="equipmentCode" column="equipment_code" /> <result property="equipmentCode" column="equipment_code" />
@ -26,19 +26,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<!-- <result property="unitWorkingHours" column="unit_working_hours" />--> <result property="unitWorkingHours" column="unit_working_hours" />
<result property="workshopSection" column="workshop_section" /> <result property="workshopSection" column="workshop_section" />
<result property="equipmentLocation" column="equipment_location" /> <result property="equipmentLocation" column="equipment_location" />
<result property="hourlyUnitPrice" column="hourly_unit_price" /> <result property="hourlyUnitPrice" column="hourly_unit_price" />
</resultMap> </resultMap>
<sql id="selectBaseEquipmentVo"> <sql id="selectBaseEquipmentVo">
select equipment_id, equipment_code, equipment_name, equipment_brand, equipment_spec, equipment_type_id, equipment_type_code, equipment_type_name, workshop_id, workshop_code, workshop_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, workshop_section, equipment_location, hourly_unit_price from base_equipment select equipment_id, equipment_code, equipment_name, equipment_brand, equipment_spec, equipment_type_id, equipment_type_code, equipment_type_name, workshop_id, workshop_code, workshop_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, workshop_section, equipment_location, hourly_unit_price,unit_working_hours from base_equipment
</sql> </sql>
<select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult"> <select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult">
<include refid="selectBaseEquipmentVo"/> <include refid="selectBaseEquipmentVo"/>
<where> <where>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if> <if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if> <if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if>
@ -54,18 +54,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if> <if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if> <if test="attr3 != null "> and attr3 = #{attr3}</if>
<if test="attr4 != null "> and attr4 = #{attr4}</if> <if test="attr4 != null "> and attr4 = #{attr4}</if>
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''"> and unit_working_hours = #{unitWorkingHours}</if>--> <if test="unitWorkingHours != null and unitWorkingHours != ''"> and unit_working_hours = #{unitWorkingHours}</if>
<if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if> <if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if>
<if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</if> <if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''"> and hourly_unit_price = #{hourlyUnitPrice}</if> <if test="hourlyUnitPrice != null and hourlyUnitPrice != ''"> and hourly_unit_price = #{hourlyUnitPrice}</if>
</where> </where>
</select> </select>
<select id="selectBaseEquipmentByEquipmentId" parameterType="Long" resultMap="BaseEquipmentResult"> <select id="selectBaseEquipmentByEquipmentId" parameterType="Long" resultMap="BaseEquipmentResult">
<include refid="selectBaseEquipmentVo"/> <include refid="selectBaseEquipmentVo"/>
where equipment_id = #{equipmentId} where equipment_id = #{equipmentId}
</select> </select>
<insert id="insertBaseEquipment" parameterType="BaseEquipment" useGeneratedKeys="true" keyProperty="equipmentId"> <insert id="insertBaseEquipment" parameterType="BaseEquipment" useGeneratedKeys="true" keyProperty="equipmentId">
insert into base_equipment insert into base_equipment
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -89,11 +89,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''">unit_working_hours,</if>--> <if test="unitWorkingHours != null and unitWorkingHours != ''">unit_working_hours,</if>
<if test="workshopSection != null and workshopSection != ''">workshop_section,</if> <if test="workshopSection != null and workshopSection != ''">workshop_section,</if>
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location,</if> <if test="equipmentLocation != null and equipmentLocation != ''">equipment_location,</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price,</if> <if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if> <if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if>
<if test="equipmentName != null">#{equipmentName},</if> <if test="equipmentName != null">#{equipmentName},</if>
@ -115,11 +115,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''">#{unitWorkingHours},</if>--> <if test="unitWorkingHours != null and unitWorkingHours != ''">#{unitWorkingHours},</if>
<if test="workshopSection != null and workshopSection != ''">#{workshopSection},</if> <if test="workshopSection != null and workshopSection != ''">#{workshopSection},</if>
<if test="equipmentLocation != null and equipmentLocation != ''">#{equipmentLocation},</if> <if test="equipmentLocation != null and equipmentLocation != ''">#{equipmentLocation},</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">#{hourlyUnitPrice},</if> <if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">#{hourlyUnitPrice},</if>
</trim> </trim>
</insert> </insert>
<update id="updateBaseEquipment" parameterType="BaseEquipment"> <update id="updateBaseEquipment" parameterType="BaseEquipment">
@ -145,7 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''">unit_working_hours = #{unitWorkingHours},</if>--> <!-- <if test="unitWorkingHours != null and unitWorkingHours != ''">unit_working_hours = #{unitWorkingHours},</if>-->
<if test="workshopSection != null and workshopSection != ''">workshop_section = #{workshopSection},</if> <if test="workshopSection != null and workshopSection != ''">workshop_section = #{workshopSection},</if>
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location = #{equipmentLocation},</if> <if test="equipmentLocation != null and equipmentLocation != ''">equipment_location = #{equipmentLocation},</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price = #{hourlyUnitPrice},</if> <if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price = #{hourlyUnitPrice},</if>
@ -158,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteBaseEquipmentByEquipmentIds" parameterType="String"> <delete id="deleteBaseEquipmentByEquipmentIds" parameterType="String">
delete from base_equipment where equipment_id in delete from base_equipment where equipment_id in
<foreach item="equipmentId" collection="array" open="(" separator="," close=")"> <foreach item="equipmentId" collection="array" open="(" separator="," close=")">
#{equipmentId} #{equipmentId}
</foreach> </foreach>

Loading…
Cancel
Save