基础信息设备

highway
A0010407 1 year ago
parent e38a563f81
commit 25b701bf0d

@ -93,6 +93,17 @@ public class BaseEquipment extends BaseEntity {
@Excel(name = "工时单价")
private String hourlyUnitPrice;
/** 删除标志 */
@Excel(name = "删除标志")
private String delFlag;
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
@ -262,6 +273,7 @@ public class BaseEquipment extends BaseEntity {
.append("workshopSection", getWorkshopSection())
.append("equipmentLocation", getEquipmentLocation())
.append("hourlyUnitPrice", getHourlyUnitPrice())
.append("delFlag", getDelFlag())
.toString();
}
}

@ -30,10 +30,11 @@
<result property="workshopSection" column="workshop_section" />
<result property="equipmentLocation" column="equipment_location" />
<result property="hourlyUnitPrice" column="hourly_unit_price" />
<result property="delFlag" column="del_flag" />
</resultMap>
<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,unit_working_hours 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,del_flag from base_equipment
</sql>
<select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult">
@ -58,12 +59,14 @@
<if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if>
<if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''"> and hourly_unit_price = #{hourlyUnitPrice}</if>
and del_flag ='0'
</where>
</select>
<select id="selectBaseEquipmentByEquipmentId" parameterType="Long" resultMap="BaseEquipmentResult">
<include refid="selectBaseEquipmentVo"/>
where equipment_id = #{equipmentId}
and del_flag ='0'
</select>
<insert id="insertBaseEquipment" parameterType="BaseEquipment" useGeneratedKeys="true" keyProperty="equipmentId">
@ -153,16 +156,20 @@
where equipment_id = #{equipmentId}
</update>
<delete id="deleteBaseEquipmentByEquipmentId" parameterType="Long">
delete from base_equipment where equipment_id = #{equipmentId}
</delete>
<update id="deleteBaseEquipmentByEquipmentId" parameterType="Long">
update base_equipment
set del_flag = '1'
where equipment_id = #{equipmentId}
</update>
<delete id="deleteBaseEquipmentByEquipmentIds" parameterType="String">
delete from base_equipment where equipment_id in
<update id="deleteBaseEquipmentByEquipmentIds" parameterType="String">
update base_equipment
set del_flag = '1'
where equipment_id in
<foreach item="equipmentId" collection="array" open="(" separator="," close=")">
#{equipmentId}
</foreach>
</delete>
</update>
<select id="getEquipmentTypeName" parameterType="BaseEquipment" resultType="java.lang.String">
select dict_label
@ -174,18 +181,21 @@
select equipment_name
from base_equipment
where equipment_name = #{equipmentName}
and del_flag = '0'
</select>
<select id="checkEquipmentCodeUnique" parameterType="BaseEquipment" resultType ="java.lang.String">
select equipment_code
from base_equipment
where equipment_code = #{equipmentCode}
and del_flag = '0'
</select>
<select id="getWorkCenterName" parameterType="BaseEquipment" resultType="java.lang.String">
select factory_name
from sys_factory
where factory_code = #{workshopCode}
and del_flag = '0'
</select>
</mapper>
Loading…
Cancel
Save