machineCode新增

This commit is contained in:
wcy 2024-09-10 11:12:02 +08:00
parent 5d4c26e516
commit 5fe548e1c8
4 changed files with 23 additions and 6 deletions

View File

@ -209,7 +209,19 @@ public class MaType extends BaseEntity {
@ApiModelProperty(value = "厂家规格型号")
private String facModel;
public String getMachineCode() {
return machineCode;
}
public void setMachineCode(String machineCode) {
this.machineCode = machineCode;
}
/*
* 机具编码
* */
@ApiModelProperty(value = "机具编码")
private String machineCode;
public Long getTypeId() {
return typeId;

View File

@ -64,6 +64,7 @@ public class MaTypeServiceImpl implements ITypeService {
String level = maType1.getLevel();
maType.setLevel(String.valueOf(Integer.parseInt(level) + 1));
maType.setCreateTime(DateUtils.getNowDate());
System.out.println(maType);
int i = maTypeMapper.insertType(maType);
Long typeId = maType.getTypeId();
// 图片路径保存

View File

@ -1,8 +1,8 @@
# Spring
spring:
spring:
application:
# 应用名称
name: sgzb-material
profiles:
# 环境配置
active: sgzb_cq_local
active: sgzb_nw_local

View File

@ -33,10 +33,11 @@
<result property="isAncuo" column="is_ancuo" />
<result property="remark" column="remark" />
<result property="childPhoto" column="childPhoto" />
<result property="machineCode" column="machine_code" />
</resultMap>
<sql id="selectMaTypeVo">
select type_id, type_name, parent_id, status, num, company_id, code, unit_id, unit_name, manage_type, lease_price, eff_time, rent_price, buy_price, pay_price, level, rated_load, test_load, holding_time, warn_num, del_flag, create_by, create_time, update_by, update_time, is_plan, is_ancuo, remark from ma_type
select type_id, type_name, parent_id, status, num, company_id, code, unit_id, unit_name, manage_type, lease_price, eff_time, rent_price, buy_price, pay_price, level, rated_load, test_load, holding_time, warn_num, del_flag, create_by, create_time, update_by, update_time, is_plan, is_ancuo, remark,machine_code ,fac_model, child_photo from ma_type
</sql>
<insert id="insertType" parameterType="com.bonus.sgzb.base.api.domain.MaType" useGeneratedKeys="true" keyProperty="typeId">
@ -70,6 +71,7 @@
<if test="isAncuo != null">is_ancuo,</if>
<if test="remark != null">remark,</if>
<if test="facModel != null">fac_model,</if>
<if test="machineCode != null">machine_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeName != null and typeName != ''">#{typeName},</if>
@ -100,6 +102,7 @@
<if test="isAncuo != null">#{isAncuo},</if>
<if test="remark != null">#{remark},</if>
<if test="facModel != null">#{facModel},</if>
<if test="machineCode != null">#{machineCode},</if>
</trim>
</insert>
@ -157,6 +160,7 @@
<if test="remark != null">remark = #{remark},</if>
<if test="companyId != null">company_id = #{companyId},</if>
<if test="facModel != null">fac_model = #{facModel},</if>
<if test="machineCode != null">machine_code = #{machineCode},</if>
</trim>
where type_id = #{typeId}
</update>
@ -283,7 +287,7 @@
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
su.nick_name keeperUserName, mtr.user_id repairUserId, su1.nick_name repairUserName,mpi.prop_id as propId, mpi.prop_name as propName,
m.del_flag, m.create_by, m.create_time,
m.remark, m.company_id,m.fac_model as facModel
m.remark, m.company_id,m.fac_model as facModel,m.machine_code
from ma_type m
left join ma_prop_set mps on m.type_id = mps.type_id
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id
@ -338,7 +342,7 @@
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
su.nick_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
m.remark, m.company_id,m.fac_model as facModel
m.remark, m.company_id,m.fac_model as facModel,m.machine_code
from ma_type m
left join ma_prop_set mps on m.type_id = mps.type_id
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id