报工增加bom参考tab

master
zhaoxiaolin 1 year ago
parent 7a603de1e2
commit ef93c6869d

@ -153,4 +153,11 @@ public class MesReportWorkConsumeController extends BaseController {
public AjaxResult submitReportInfo(@RequestBody MesReportWork mesReportWork) {
return toAjax(mesReportWorkConsumeService.submitReportInfo(mesReportWork));
}
/**获取母子BOM**/
@GetMapping("/getBomList")
public List getBomList(MesReportWorkConsume mesReportWorkConsume) {
List<MesReportWorkConsume> rlist = mesReportWorkConsumeService.getBomList(mesReportWorkConsume);
return rlist;
}
}

@ -72,6 +72,79 @@ public class MesReportWorkConsume extends BaseEntity {
private String parentOrder;
private String batch;
private String recoil;
private String standardDosage;
private String lossRate;
private String lossAmount;
private String cilosses;
private String sanka;
private String productGroup;
private String productGroupName;
//上级物料
private String pMaterialCode;
public String getpMaterialCode() {
return pMaterialCode;
}
public void setpMaterialCode(String pMaterialCode) {
this.pMaterialCode = pMaterialCode;
}
public String getProductGroup() {
return productGroup;
}
public void setProductGroup(String productGroup) {
this.productGroup = productGroup;
}
public String getProductGroupName() {
return productGroupName;
}
public void setProductGroupName(String productGroupName) {
this.productGroupName = productGroupName;
}
public String getStandardDosage() {
return standardDosage;
}
public void setStandardDosage(String standardDosage) {
this.standardDosage = standardDosage;
}
public String getLossRate() {
return lossRate;
}
public void setLossRate(String lossRate) {
this.lossRate = lossRate;
}
public String getLossAmount() {
return lossAmount;
}
public void setLossAmount(String lossAmount) {
this.lossAmount = lossAmount;
}
public String getCilosses() {
return cilosses;
}
public void setCilosses(String cilosses) {
this.cilosses = cilosses;
}
public String getSanka() {
return sanka;
}
public void setSanka(String sanka) {
this.sanka = sanka;
}
public String getRecoil() {
return recoil;

@ -77,4 +77,6 @@ public interface MesReportWorkConsumeMapper {
int addConsumePS(@Param("list")List<MesReportWorkConsume> rconsumes);
List<MesReportWorkConsume> getSonConsumeList(MesReportWorkConsume mesReportWorkConsume);
List<MesReportWorkConsume> getBomList(MesReportWorkConsume mesReportWorkConsume);
}

@ -82,4 +82,6 @@ public interface IMesReportWorkConsumeService {
int submitConsumePS(List<MesReportWorkConsume> mesReportWorkConsume);
int submitReportInfo(MesReportWork mesReportWork);
List<MesReportWorkConsume> getBomList(MesReportWorkConsume mesReportWorkConsume);
}

@ -252,4 +252,11 @@ public class MesReportWorkConsumeServiceImpl implements IMesReportWorkConsumeSer
}
return rconsumes;
}
@Override
@DS("#header.poolName")
public List<MesReportWorkConsume> getBomList(MesReportWorkConsume mesReportWorkConsume) {
List<MesReportWorkConsume> dtos = mesReportWorkConsumeMapper.getBomList(mesReportWorkConsume);
return dtos;
}
}

@ -110,6 +110,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where mrwc.del_flag = '0' and pow.del_flag = '0'
and pow.parent_order = #{workorderCode}
</select>
<select id="getBomList" resultType="com.op.mes.domain.MesReportWorkConsume">
select bbc.component materialCode,
bbc.standard_dosage standardDosage,
bbc.loss_rate lossRate,
bbc.loss_amount lossAmount,
bbc.cilosses,
bbc.component_unit,
bbc.sanka,
bbc.cumc pMaterialCode,
bp.product_desc_zh materialName,
bp.product_group productGroup,
bp.product_group_name productGroupName
from base_bom_component bbc
left join base_product bp on SUBSTRING(bp.product_code, 8, 12) = bbc.component
left join mes_report_work mrw on SUBSTRING(mrw.product_code, 8, 12) = bbc.product_code
where <if test= 'parentOrder=="0"'>mrw.workorder_code = #{workorderCode}</if>
<if test= 'parentOrder!="0"'>mrw.parent_order = #{workorderCode}</if>
</select>
<insert id="insertMesReportWorkConsume" parameterType="MesReportWorkConsume">
insert into mes_report_work_consume

@ -124,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="checkType != null "> and qct.check_type = #{checkType} </if>
<if test="typeCode != null "> and q.type_code = #{typeCode} </if>
</where>
order by qct.create_time desc
</select>
<select id="selectQcCheckTaskProduceByRecordId" parameterType="String" resultMap="QcCheckTaskProduceResult">

Loading…
Cancel
Save