|
|
@@ -10,10 +10,12 @@ import com.jeesite.common.collect.ListUtils;
|
|
|
import com.jeesite.common.collect.MapUtils;
|
|
|
import com.jeesite.modules.file.entity.FileUpload;
|
|
|
import com.jeesite.modules.file.service.FileUploadService;
|
|
|
+import com.jeesite.modules.mes.entity.MesLineProcess;
|
|
|
import com.jeesite.modules.mes.entity.MesProduct;
|
|
|
import com.jeesite.modules.mes.entity.MesProductRecord;
|
|
|
import com.jeesite.modules.mes.entity.MesProductRepair;
|
|
|
import com.jeesite.modules.mes.resp.CommonResp;
|
|
|
+import com.jeesite.modules.mes.service.MesLineProcessService;
|
|
|
import com.jeesite.modules.mes.service.MesProductRecordService;
|
|
|
import com.jeesite.modules.mes.service.MesProductRepairService;
|
|
|
import com.jeesite.modules.mes.service.MesProductService;
|
|
|
@@ -62,6 +64,9 @@ public class MesProductRepairQualityController extends BaseController {
|
|
|
@Autowired
|
|
|
private MesProductRecordService mesProductRecordService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private MesLineProcessService mesLineProcessService;
|
|
|
+
|
|
|
/**
|
|
|
* 获取数据
|
|
|
*/
|
|
|
@@ -193,6 +198,32 @@ public class MesProductRepairQualityController extends BaseController {
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+ // 返修审核-返回工位列表(只返父工位)
|
|
|
+ @RequestMapping(value = "backOprnoList")
|
|
|
+ @ResponseBody
|
|
|
+ public CommonResp backOprnoList(HttpServletRequest req) {
|
|
|
+ CommonResp<Map<String, Object>> resp = new CommonResp<>();
|
|
|
+ MesLineProcess query = new MesLineProcess();
|
|
|
+ query.setStatus("0");
|
|
|
+ query.getSqlMap().getWhere().and("a.pid", com.jeesite.common.mybatis.mapper.query.QueryType.IS_NULL, "");
|
|
|
+ List<MesLineProcess> lists = mesLineProcessService.findList(query);
|
|
|
+ List<Map<String, Object>> data = ListUtils.newArrayList();
|
|
|
+ for (MesLineProcess lp : lists) {
|
|
|
+ if (StringUtils.isEmpty(lp.getOprno())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Map<String, Object> item = MapUtils.newHashMap();
|
|
|
+ item.put("oprno", lp.getOprno());
|
|
|
+ item.put("title", lp.getTitle());
|
|
|
+ data.add(item);
|
|
|
+ }
|
|
|
+ Map<String, Object> map = MapUtils.newHashMap();
|
|
|
+ map.put("lists", data);
|
|
|
+ resp.setData(map);
|
|
|
+ resp.setResult(Global.TRUE);
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
// 返修检查
|
|
|
// @RequiresPermissions("mes:mesProductRepairQuality:api")
|
|
|
@RequestMapping(value = "addQuailty")
|
|
|
@@ -203,6 +234,7 @@ public class MesProductRepairQualityController extends BaseController {
|
|
|
String sn = req.getParameter("sn");
|
|
|
String remark = req.getParameter("remark");
|
|
|
String result = req.getParameter("result");
|
|
|
+ String backOprno = req.getParameter("backOprno");
|
|
|
// String repairId = req.getParameter("repairId");
|
|
|
|
|
|
if(StringUtils.isEmpty(sn) || StringUtils.isEmpty(result)){
|
|
|
@@ -210,6 +242,12 @@ public class MesProductRepairQualityController extends BaseController {
|
|
|
resp.setMessage("参数错误");
|
|
|
return resp;
|
|
|
}
|
|
|
+ // OK(合格)时必须选择返回工位
|
|
|
+ if("1".equals(result) && StringUtils.isEmpty(backOprno)){
|
|
|
+ resp.setResult(Global.FALSE);
|
|
|
+ resp.setMessage("请选择返回工位");
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
|
|
|
MesProductRepair mpr2 = new MesProductRepair();
|
|
|
mpr2.setSn(sn);
|
|
|
@@ -234,6 +272,7 @@ public class MesProductRepairQualityController extends BaseController {
|
|
|
mesProductRepairQuality.setRepairId(repairId);
|
|
|
mesProductRepairQuality.setResult(result);
|
|
|
mesProductRepairQuality.setRemark(remark);
|
|
|
+ mesProductRepairQuality.setBackOprno(backOprno);
|
|
|
mesProductRepairQualityService.save(mesProductRepairQuality);
|
|
|
|
|
|
|