change - 铝内胆成型线生产计划统计

master
wenjy 2 years ago
parent 75cf160ab4
commit 83d96dab3c

@ -23,17 +23,18 @@ public class PlanInfo implements Serializable {
@TableField("SPE")
private String spe;
/** 内胆库库存 */
/** 计划数量 */
@TableField("OQ")
private String oq;
/** 箱壳库库存 */
/** 实际数量 */
@TableField("AQ")
private String aq;
/** 工位编号 */
@TableField("ROUND")
private String round;
@TableField("CHA")
private String cha;

@ -2,10 +2,15 @@ package com.productionboard.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.productionboard.entity.MesProduction.DeviceFault;
import com.productionboard.entity.MesProduction.MesTeamStatistics;
import com.productionboard.entity.MesProduction.PlanInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* MES
* @author WenJY
@ -14,4 +19,15 @@ import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface PlanInfoMapper extends BaseMapper<PlanInfo>{
/**
* 线
* @author WenJY
* @date 2022-10-01 17:27
* @param in_id
* @return java.util.List<com.productionboard.entity.MesProduction.MesTeamStatistics>
*/
@Select("select * from table ( scada_mesPlan_aluminumLiner(#{in_id}) )")
List<PlanInfo> getAluminumLinerMesPlan(@Param("in_id") Integer in_id);
}

@ -168,6 +168,18 @@ public class MesProductionDataServiceImpl implements IMesProductionDataService {
@Override
public List<PlanInfo> getProductionPlan() {
QueryWrapper<PlanInfo> wrapper = new QueryWrapper<>();
return planInfoMapper.selectList(wrapper);
List<PlanInfo> aluminumLinerMesPlan = planInfoMapper.getAluminumLinerMesPlan(this.in_id);
for (PlanInfo planInfo :aluminumLinerMesPlan){
planInfo.setOq(planInfo.getOq() == null ? "0" : planInfo.getOq());
planInfo.setAq(planInfo.getAq() == null ? "0" : planInfo.getAq());
int oq = Integer.parseInt(planInfo.getOq());
int aq = Integer.parseInt(planInfo.getAq());
planInfo.setCha((oq -aq)+"");
//map.put("17",String.format("%.1f%%", ((double)actualQtuitem / (double)planQtyItem * 100)));
planInfo.setRound(String.format("%.1f%%", ((double)aq / (double)oq * 100)));
}
return aluminumLinerMesPlan;
}
}

@ -42,7 +42,7 @@ $(() => {
console.log(res)
Res.data=res.map(val => {
return [val.spe,val.aq,val.oq,val.cha,val.round,]
return [val.spe,val.oq,val.aq,val.cha,val.round,]
})
Res.header = ['型号', '计划数', '完成数', '差异数', '执行进度']
console.log(Res)

Loading…
Cancel
Save