|
|
@@ -348,6 +348,8 @@ public class MesProductRecordController extends BaseController {
|
|
|
Page<MesProductRecord> page = new Page<>(request, response);
|
|
|
List<MesProductRecord> list = mesProductRecordService.findOprnoGroupList(sn);
|
|
|
if (!ListUtils.isEmpty(list)) {
|
|
|
+ // 生产明细不展示 OP050 工位
|
|
|
+ list.removeIf(row -> "OP050".equals(CommonUitl.formatOprno(row.getOprno())));
|
|
|
Map<String, String> oprnoTitleMap = new HashMap<>();
|
|
|
for (MesProductRecord row : list) {
|
|
|
if (StringUtils.isBlank(row.getLineSn()) || StringUtils.isBlank(row.getOprno())) {
|
|
|
@@ -1493,6 +1495,7 @@ public class MesProductRecordController extends BaseController {
|
|
|
mesProductRecord.setContent(retokng);
|
|
|
mesProductRecord.setCreateBy(user);
|
|
|
mesProductRecord.setCateSn(cateSn);
|
|
|
+ mesProductRecord.setUpdateBy(user);
|
|
|
|
|
|
// 质量上传,解析参数
|
|
|
List<ParamsResp> params = new ArrayList<ParamsResp>();
|
|
|
@@ -1502,9 +1505,11 @@ public class MesProductRecordController extends BaseController {
|
|
|
paramsResp2.setResult("OK");
|
|
|
params.add(paramsResp2);
|
|
|
|
|
|
+ // 400001 绑定人员:结果为 OK,人员信息写入绑定内容(materiel_sn)
|
|
|
ParamsResp paramsResp3 = new ParamsResp();
|
|
|
paramsResp3.setCraft("400001");
|
|
|
- paramsResp3.setResult(user);
|
|
|
+ paramsResp3.setResult("OK");
|
|
|
+ paramsResp3.setVal(user);
|
|
|
params.add(paramsResp3);
|
|
|
|
|
|
try{
|
|
|
@@ -3823,6 +3828,8 @@ public class MesProductRecordController extends BaseController {
|
|
|
.and("craft", QueryType.EQ,"100000")
|
|
|
.and("sn", QueryType.EQ,sn);
|
|
|
List<MesProductRecord> lists = mesProductRecordService.findList(mesProductRecord);
|
|
|
+ // 填充工位名称(oprnoTitle)
|
|
|
+ fillProductRecordListFields(lists);
|
|
|
map.put("lists", lists);
|
|
|
resp.setData(map);
|
|
|
resp.setResult(Global.TRUE);
|
|
|
@@ -4414,8 +4421,13 @@ public class MesProductRecordController extends BaseController {
|
|
|
String sn = request.getParameter("sn");
|
|
|
String oprno = request.getParameter("oprno");
|
|
|
String lineSn = request.getParameter("lineSn");
|
|
|
- String userCode = request.getParameter("ucode");
|
|
|
+ // 兼容 ucode / userCode / user,避免客户端参数名不一致导致写成 system
|
|
|
+ String userCode = firstNotBlank(
|
|
|
+ request.getParameter("ucode"),
|
|
|
+ request.getParameter("userCode"),
|
|
|
+ request.getParameter("user"));
|
|
|
String result = request.getParameter("result");
|
|
|
+ logger.info("pccreate sn={}, oprno={}, lineSn={}, ucode={}, result={}", sn, oprno, lineSn, userCode, result);
|
|
|
String oldOprno = oprno;
|
|
|
if(oldOprno.length()==5){
|
|
|
oldOprno += "A";
|
|
|
@@ -4718,5 +4730,17 @@ public class MesProductRecordController extends BaseController {
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+ /** 取第一个非空字符串(去首尾空格) */
|
|
|
+ private String firstNotBlank(String... values) {
|
|
|
+ if (values == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ for (String value : values) {
|
|
|
+ if (StringUtils.isNotBlank(value)) {
|
|
|
+ return value.trim();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
|
|
|
}
|