mes报工

highway
A0010407 1 year ago
parent 53744c074f
commit d0dd51a777

@ -97,4 +97,15 @@ public class MesReportWorkConsumeController extends BaseController {
public AjaxResult remove(@PathVariable String[] recordIds) {
return toAjax(mesReportWorkConsumeService.deleteMesReportWorkConsumeByRecordIds(recordIds));
}
/**
*
*/
@RequiresPermissions("mes:reportWorkConsume:list")
@GetMapping("/consumeList")
public TableDataInfo consumeList(MesReportWorkConsume mesReportWorkConsume) {
startPage();
List<MesReportWorkConsume> list = mesReportWorkConsumeService.selectMesReportWorkConsumeList(mesReportWorkConsume);
return getDataTable(list);
}
}

@ -61,6 +61,13 @@ public class MesReportWorkConsume extends BaseEntity {
@Excel(name = "工厂编码")
private String factoryCode;
/** 工厂编码 */
@Excel(name = "报工编码")
private String reportCode;
//虚拟字段
private String id;
public void setRecordId(String recordId) {
this.recordId = recordId;
}
@ -68,13 +75,21 @@ public class MesReportWorkConsume extends BaseEntity {
public String getRecordId() {
return recordId;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public String getWorkorderCode() {
return workorderCode;
}
public void setReportCode(String reportCode) {
this.reportCode = reportCode;
}
public String getReportCode() {
return reportCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
@ -146,10 +161,21 @@ public class MesReportWorkConsume extends BaseEntity {
return factoryCode;
}
//虚拟字段
public void setId(String factoryCode) {
this.id = id;
}
public String getId() {
return id;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("recordId", getRecordId())
.append("id", getId())
.append("reportCode", getReportCode())
.append("workorderCode", getWorkorderCode())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())

@ -58,4 +58,6 @@ public interface MesReportWorkConsumeMapper {
* @return
*/
public int deleteMesReportWorkConsumeByRecordIds(String[] recordIds);
List<MesReportWorkConsume> selectMesReportWorkConsumeListById(MesReportWorkConsume mesReportWorkConsume);
}

@ -18,6 +18,14 @@ public interface IMesReportWorkConsumeService {
*/
public MesReportWorkConsume selectMesReportWorkConsumeByRecordId(String recordId);
/**
*
*
* @param mesReportWorkConsume
* @return
*/
public List<MesReportWorkConsume> selectMesReportWorkConsumeListById(MesReportWorkConsume mesReportWorkConsume);
/**
*
*

@ -45,6 +45,18 @@ public class MesReportWorkConsumeServiceImpl implements IMesReportWorkConsumeSer
return mesReportWorkConsumeMapper.selectMesReportWorkConsumeList(mesReportWorkConsume);
}
/**
*
*
* @param mesReportWorkConsume
* @return
*/
@Override
@DS("#header.poolName")
public List<MesReportWorkConsume> selectMesReportWorkConsumeListById(MesReportWorkConsume mesReportWorkConsume) {
return mesReportWorkConsumeMapper.selectMesReportWorkConsumeListById(mesReportWorkConsume);
}
/**
*
*

@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="MesReportWorkConsume" id="MesReportWorkConsumeResult">
<result property="recordId" column="record_id" />
<result property="reportCode" column="report_code" />
<result property="workorderCode" column="workorder_code" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
@ -25,12 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectMesReportWorkConsumeVo">
select record_id, workorder_code, material_code, material_name, material_spc, quantity, unit, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code from mes_report_work_consume
select record_id, workorder_code, material_code, material_name, material_spc, quantity, unit, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code,report_code from mes_report_work_consume
</sql>
<select id="selectMesReportWorkConsumeList" parameterType="MesReportWorkConsume" resultMap="MesReportWorkConsumeResult">
<include refid="selectMesReportWorkConsumeVo"/>
<where>
<if test="reportCode != null and reportCode != ''"> and report_code = #{reportCode}</if>
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
@ -45,6 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectMesReportWorkConsumeListById" parameterType="MesReportWorkConsume" resultMap="MesReportWorkConsumeResult">
<include refid="selectMesReportWorkConsumeVo"/>
where report_code = #{recordCode}
</select>
<select id="selectMesReportWorkConsumeByRecordId" parameterType="String" resultMap="MesReportWorkConsumeResult">
<include refid="selectMesReportWorkConsumeVo"/>
where record_id = #{recordId}
@ -54,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into mes_report_work_consume
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id,</if>
<if test="reportCode != null and reportCode != ''">report_code,</if>
<if test="workorderCode != null and workorderCode != ''">workorder_code,</if>
<if test="materialCode != null and materialCode != ''">material_code,</if>
<if test="materialName != null and materialName != ''">material_name,</if>
@ -73,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId},</if>
<if test="reportCode != null and reportCode != ''">#{reportCode},</if>
<if test="workorderCode != null and workorderCode != ''">#{workorderCode},</if>
<if test="materialCode != null and materialCode != ''">#{materialCode},</if>
<if test="materialName != null and materialName != ''">#{materialName},</if>
@ -95,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateMesReportWorkConsume" parameterType="MesReportWorkConsume">
update mes_report_work_consume
<trim prefix="SET" suffixOverrides=",">
<if test="reportCode != null and reportCode != ''">report_code = #{reportCode},</if>
<if test="workorderCode != null and workorderCode != ''">workorder_code = #{workorderCode},</if>
<if test="materialCode != null and materialCode != ''">material_code = #{materialCode},</if>
<if test="materialName != null and materialName != ''">material_name = #{materialName},</if>

Loading…
Cancel
Save