|
@@ -4423,8 +4423,7 @@ public class MesProductRecordController extends BaseController {
|
|
|
try {
|
|
try {
|
|
|
if (!craft.equals("100000")){
|
|
if (!craft.equals("100000")){
|
|
|
mesProductRecordService.updateRecord(sn,oprno, craft,"",result,userCode,lineSn);
|
|
mesProductRecordService.updateRecord(sn,oprno, craft,"",result,userCode,lineSn);
|
|
|
- //根据上个个工位oprno,sn,lineSn查询时间最近的一条记录,如何不为空且状态等于1修改状态
|
|
|
|
|
- mesPdaScanRecordService.finishPreviousScanRecord(sn, lineSn,oprno);
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
return renderResult(Global.TRUE, text("操作成功!"));
|
|
return renderResult(Global.TRUE, text("操作成功!"));
|
|
|
}else {
|
|
}else {
|
|
@@ -4438,7 +4437,16 @@ public class MesProductRecordController extends BaseController {
|
|
|
}else{
|
|
}else{
|
|
|
// craft=100000 且质量 OK 成功后,按父工位绑定 FIFO 扣库存
|
|
// craft=100000 且质量 OK 成功后,按父工位绑定 FIFO 扣库存
|
|
|
if ("OK".equals(result)) {
|
|
if ("OK".equals(result)) {
|
|
|
|
|
+ //根据上个个工位oprno,sn,lineSn查询时间最近的一条记录,如何不为空且状态等于1修改状态
|
|
|
|
|
+ mesPdaScanRecordService.finishPreviousScanRecord(sn, lineSn,oprno);
|
|
|
|
|
+
|
|
|
mesProcessConsumeStockService.consumeOnOk(sn, oprno, lineSn, userCode);
|
|
mesProcessConsumeStockService.consumeOnOk(sn, oprno, lineSn, userCode);
|
|
|
|
|
+
|
|
|
|
|
+ //结果ok则在产品表中同步更新时间
|
|
|
|
|
+ int updateProductRows = mesProductService.updateUpdateDateBySn(sn, new Date(),userCode,lineSn);
|
|
|
|
|
+ if (updateProductRows == 0) {
|
|
|
|
|
+ logger.warn("mes_product update_date update failed, sn:{}", sn);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return renderResult(Global.TRUE, text("操作成功!"));
|
|
return renderResult(Global.TRUE, text("操作成功!"));
|
|
|
}
|
|
}
|
|
@@ -4895,8 +4903,13 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesPdaScanRecord.setOprno(oprno);
|
|
mesPdaScanRecord.setOprno(oprno);
|
|
|
mesPdaScanRecord.setLineSn(lineSn);
|
|
mesPdaScanRecord.setLineSn(lineSn);
|
|
|
mesPdaScanRecord.setUcode(ucode);
|
|
mesPdaScanRecord.setUcode(ucode);
|
|
|
- mesPdaScanRecord.setStatus("1");
|
|
|
|
|
- mesPdaScanRecordService.save(mesPdaScanRecord);
|
|
|
|
|
|
|
+ mesPdaScanRecord.setStatus("0");
|
|
|
|
|
+ long count = mesPdaScanRecordService.findCount(mesPdaScanRecord);
|
|
|
|
|
+ //防止点完OK再次扫码
|
|
|
|
|
+ if (count==0){
|
|
|
|
|
+ mesPdaScanRecord.setStatus("1");
|
|
|
|
|
+ mesPdaScanRecordService.save(mesPdaScanRecord);
|
|
|
|
|
+ }
|
|
|
//查询oprno的上一个工位
|
|
//查询oprno的上一个工位
|
|
|
MesLineProcess previousProcess = mesLineProcessService.findPreviousByOprnoLineSn(oprno, lineSn);
|
|
MesLineProcess previousProcess = mesLineProcessService.findPreviousByOprnoLineSn(oprno, lineSn);
|
|
|
//根据上个个工位oprno,sn,lineSn查询时间最近的一条记录,如何不为空且状态等于1修改状态
|
|
//根据上个个工位oprno,sn,lineSn查询时间最近的一条记录,如何不为空且状态等于1修改状态
|