|
|
@@ -335,6 +335,9 @@ public class MesProductController extends BaseController {
|
|
|
|
|
|
MesShiftDataResp mesShiftDataResp = mesShiftService.getCurShift();
|
|
|
|
|
|
+ // 获取当天的生产计划
|
|
|
+ MesScreenPlan mesScreenPlan = mesScreenPlanService.getPlan(formattedToday);
|
|
|
+
|
|
|
MesLineProcess mesLineProcess = new MesLineProcess();
|
|
|
mesLineProcess.setStatus("0");
|
|
|
mesLineProcess.getSqlMap().getWhere().and("pid",QueryType.IS_NULL,"");
|
|
|
@@ -382,6 +385,29 @@ public class MesProductController extends BaseController {
|
|
|
|
|
|
String dayOks = mesProductRecordService.getSjOk(mesLineProcess2.getOprno(),mesLineProcess2.getLineSn(),sdate1,edate1);
|
|
|
mesLineProcess2.setDayCount(Integer.valueOf(dayOks));
|
|
|
+ mesLineProcess2.setDayCountOk(Integer.valueOf(dayOks));
|
|
|
+
|
|
|
+ // 获取当日总产出数(包括不良品)
|
|
|
+ String dayTotal = mesProductRecordService.getSj(mesLineProcess2.getOprno(),mesLineProcess2.getLineSn(),sdate1,edate1);
|
|
|
+ mesLineProcess2.setDayCountTotal(Integer.valueOf(dayTotal));
|
|
|
+
|
|
|
+ // 根据工位设置计划数
|
|
|
+ Integer planCount = 0;
|
|
|
+ if(!ObjectUtils.isEmpty(mesScreenPlan)){
|
|
|
+ String oprno = mesLineProcess2.getOprno();
|
|
|
+ try {
|
|
|
+ int oprnoNum = Integer.parseInt(oprno.replaceAll("[^0-9]", ""));
|
|
|
+ if(oprnoNum < 140){
|
|
|
+ planCount = mesScreenPlan.getP1sx() != null ? mesScreenPlan.getP1sx() : 0;
|
|
|
+ } else {
|
|
|
+ planCount = mesScreenPlan.getP2sx() != null ? mesScreenPlan.getP2sx() : 0;
|
|
|
+ }
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ logger.warn("无法解析工位号: " + mesLineProcess2.getOprno());
|
|
|
+ planCount = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mesLineProcess2.setPlanCount(planCount);
|
|
|
|
|
|
String dayOks5305 = mesProductRecordService.getSjOkType(mesLineProcess2.getOprno(),mesLineProcess2.getLineSn(),sdate1,edate1,"000020015305-");
|
|
|
mesLineProcess2.setDay5305(Integer.valueOf(dayOks5305));
|