报工-自动添加项目编码

master
zhaoxiaolin 7 months ago
parent a4d46f6c84
commit 0e973d74c1

@ -627,6 +627,10 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
lthw.setMaterial(consume.getMaterialCode());//物料编码 lthw.setMaterial(consume.getMaterialCode());//物料编码
if(StringUtils.isNotBlank(consume.getRspos())){//自主加的物料 if(StringUtils.isNotBlank(consume.getRspos())){//自主加的物料
lthw.setRspos(consume.getRspos());//sap物料项目凭证 lthw.setRspos(consume.getRspos());//sap物料项目凭证
}else{
int xhnumber = Integer.parseInt(consumes.get(0).getRspos())+1;
String paddedNumber = String.format("%04d", xhnumber);
lthw.setRspos(paddedNumber);//sap物料项目凭证(手动添加的,系统进行累加)
} }
lt_hwList.add(lthw); lt_hwList.add(lthw);
} }
@ -933,4 +937,9 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
return R.fail("班次交接最后一车数据修正:完成"); return R.fail("班次交接最后一车数据修正:完成");
} }
public static void main(String args[]){
int xhnumber = Integer.parseInt("005")+1;
String paddedNumber = String.format("%04d", xhnumber);
System.out.println(paddedNumber);
}
} }

@ -187,6 +187,7 @@
and mrwc.workorder_code = #{workorderCode} and mrwc.workorder_code = #{workorderCode}
and mrw.machine_code = #{machineCode} and mrwc.recoil = #{recoil} and mrw.machine_code = #{machineCode} and mrwc.recoil = #{recoil}
) t group by t.materialCode,t.rspos ) t group by t.materialCode,t.rspos
order by t.rspos desc
</select> </select>
<insert id="insertMesReportWorkConsume" parameterType="MesReportWorkConsume"> <insert id="insertMesReportWorkConsume" parameterType="MesReportWorkConsume">

Loading…
Cancel
Save