hfy 1 bulan lalu
induk
melakukan
c7d764a6ba

+ 13 - 0
src/main/java/com/jeesite/modules/mes/dao/MesProductCheckOneDao.java

@@ -0,0 +1,13 @@
+package com.jeesite.modules.mes.dao;
+
+import com.jeesite.common.dao.CrudDao;
+import com.jeesite.common.mybatis.annotation.MyBatisDao;
+import com.jeesite.modules.mes.entity.MesProductCheckOne;
+
+/**
+ * 首件检记录DAO接口
+ */
+@MyBatisDao
+public interface MesProductCheckOneDao extends CrudDao<MesProductCheckOne> {
+
+}

+ 124 - 0
src/main/java/com/jeesite/modules/mes/entity/MesProductCheckOne.java

@@ -0,0 +1,124 @@
+package com.jeesite.modules.mes.entity;
+
+import com.jeesite.common.collect.ListUtils;
+import com.jeesite.common.entity.DataEntity;
+import com.jeesite.common.mybatis.annotation.Column;
+import com.jeesite.common.mybatis.annotation.Table;
+import com.jeesite.common.mybatis.mapper.query.QueryType;
+
+import javax.validation.constraints.Size;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 首件检记录Entity
+ */
+@Table(name="mes_product_check_one", alias="a", label="首件检记录信息", columns={
+		@Column(name="id", attrName="id", label="id", isPK=true),
+		@Column(name="sn", attrName="sn", label="工件码"),
+		@Column(name="oprno", attrName="oprno", label="工位号"),
+		@Column(name="line_sn", attrName="lineSn", label="产线编号"),
+		@Column(name="result", attrName="result", label="结果"),
+		@Column(name="confirm_check", attrName="confirmCheck", label="确认检查", comment="确认检查(0待确认,1已确认)"),
+		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
+		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isUpdateForce=true),
+		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
+		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false, isUpdateForce=true),
+	}, orderBy="a.update_date DESC"
+)
+public class MesProductCheckOne extends DataEntity<MesProductCheckOne> {
+
+	private static final long serialVersionUID = 1L;
+	private String sn;
+	private String oprno;
+	private String lineSn;
+	private String result;
+	private String confirmCheck;
+	private String urlString;
+	private List img = ListUtils.newArrayList();
+
+	public MesProductCheckOne() {
+		this(null);
+	}
+
+	public MesProductCheckOne(String id) {
+		super(id);
+	}
+
+	@Size(min=0, max=50, message="工件码长度不能超过 50 个字符")
+	public String getSn() {
+		return sn;
+	}
+
+	public void setSn(String sn) {
+		this.sn = sn;
+	}
+
+	@Size(min=0, max=20, message="工位号长度不能超过 20 个字符")
+	public String getOprno() {
+		return oprno;
+	}
+
+	public void setOprno(String oprno) {
+		this.oprno = oprno;
+	}
+
+	@Size(min=0, max=5, message="产线编号长度不能超过 5 个字符")
+	public String getLineSn() {
+		return lineSn;
+	}
+
+	public void setLineSn(String lineSn) {
+		this.lineSn = lineSn;
+	}
+
+	@Size(min=0, max=10, message="结果长度不能超过 10 个字符")
+	public String getResult() {
+		return result;
+	}
+
+	public void setResult(String result) {
+		this.result = result;
+	}
+
+	@Size(min=0, max=1, message="确认检查长度不能超过 1 个字符")
+	public String getConfirmCheck() {
+		return confirmCheck;
+	}
+
+	public void setConfirmCheck(String confirmCheck) {
+		this.confirmCheck = confirmCheck;
+	}
+
+	public String getUrlString() {
+		return urlString;
+	}
+
+	public void setUrlString(String urlString) {
+		this.urlString = urlString;
+	}
+
+	public List getImg() {
+		return img;
+	}
+
+	public void setImg(List img) {
+		this.img = img;
+	}
+
+	public Date getCreateDate_gte() {
+		return sqlMap.getWhere().getValue("create_date", QueryType.GTE);
+	}
+
+	public void setCreateDate_gte(Date createDate) {
+		sqlMap.getWhere().and("create_date", QueryType.GTE, createDate);
+	}
+
+	public Date getCreateDate_lte() {
+		return sqlMap.getWhere().getValue("create_date", QueryType.LTE);
+	}
+
+	public void setCreateDate_lte(Date createDate) {
+		sqlMap.getWhere().and("create_date", QueryType.LTE, createDate);
+	}
+}

+ 53 - 0
src/main/java/com/jeesite/modules/mes/service/MesProductCheckOneService.java

@@ -0,0 +1,53 @@
+package com.jeesite.modules.mes.service;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.jeesite.common.entity.Page;
+import com.jeesite.common.service.CrudService;
+import com.jeesite.modules.file.utils.FileUploadUtils;
+import com.jeesite.modules.mes.dao.MesProductCheckOneDao;
+import com.jeesite.modules.mes.entity.MesProductCheckOne;
+
+/**
+ * 首件检记录Service
+ */
+@Service
+public class MesProductCheckOneService extends CrudService<MesProductCheckOneDao, MesProductCheckOne> {
+
+	@Override
+	public MesProductCheckOne get(MesProductCheckOne mesProductCheckOne) {
+		return super.get(mesProductCheckOne);
+	}
+
+	@Override
+	public Page<MesProductCheckOne> findPage(MesProductCheckOne mesProductCheckOne) {
+		return super.findPage(mesProductCheckOne);
+	}
+
+	@Override
+	public List<MesProductCheckOne> findList(MesProductCheckOne mesProductCheckOne) {
+		return super.findList(mesProductCheckOne);
+	}
+
+	@Override
+	@Transactional
+	public void save(MesProductCheckOne mesProductCheckOne) {
+		super.save(mesProductCheckOne);
+		FileUploadUtils.saveFileUpload(mesProductCheckOne, mesProductCheckOne.getId(), "mesProductCheckOne_image");
+	}
+
+	@Override
+	@Transactional
+	public void updateStatus(MesProductCheckOne mesProductCheckOne) {
+		super.updateStatus(mesProductCheckOne);
+	}
+
+	@Override
+	@Transactional
+	public void delete(MesProductCheckOne mesProductCheckOne) {
+		super.delete(mesProductCheckOne);
+	}
+}

+ 385 - 12
src/main/java/com/jeesite/modules/mes/web/MesProductRecordController.java

@@ -12,6 +12,7 @@ import com.jeesite.common.service.ServiceException;
 import com.jeesite.common.utils.excel.ExcelExport;
 import com.jeesite.common.web.BaseController;
 import com.jeesite.modules.file.entity.FileUpload;
+import com.jeesite.modules.file.entity.FileUploadParams;
 import com.jeesite.modules.file.service.FileUploadService;
 import com.jeesite.modules.mes.dingtalk.MesDingTalkAlertService;
 import com.jeesite.modules.mes.entity.*;
@@ -48,6 +49,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.io.IOException;
 import java.net.URLDecoder;
+import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
@@ -64,6 +66,8 @@ import java.util.*;
 @RequestMapping(value = "${adminPath}/mes/mesProductRecord")
 public class MesProductRecordController extends BaseController {
 
+	private static final String CHECK_ONE_IMAGE_BIZ_TYPE = "mesProductCheckOne_image";
+
 	@Autowired
 	private MesProductRecordService mesProductRecordService;
 
@@ -121,6 +125,9 @@ public class MesProductRecordController extends BaseController {
 	private MesProcessCheckRecordService mesProcessCheckRecordService;
 
 	@Autowired
+	private MesProductCheckOneService mesProductCheckOneService;
+
+	@Autowired
 	private MesProductQmService mesProductQmService;
 
 	@Autowired
@@ -4490,6 +4497,7 @@ public class MesProductRecordController extends BaseController {
 		// 保存日志
 		mesLogService.apisave(request);
 		CommonResp<String> resp = new CommonResp<>();
+
 		// 获取参数
 		String sn = request.getParameter("sn");
 		String oprno = request.getParameter("oprno");
@@ -4503,6 +4511,13 @@ public class MesProductRecordController extends BaseController {
 			return resp;
 		}
 
+		//查询首件检记录是否为OK或是确认状态
+		if ("1".equals(Global.getConfig("mes.check.one"))){
+			boolean checkOne=checkOne(sn,oprno,lineSn,userCode,resp);
+			if (checkOne==false){
+				return resp;
+			}
+		}
 		// 格式化工件码(带子工位)
 		String oldOprno = oprno;
 		if(oldOprno.length()==5){
@@ -4557,6 +4572,96 @@ public class MesProductRecordController extends BaseController {
 
 	}
 
+	private boolean checkOne(String sn, String oprno, String lineSn, String userCode,CommonResp<String> resp) {
+		//查询当前班次
+		MesShiftDataResp mesShiftDataResp = mesShiftService.getCurShift();
+		if(com.jeesite.common.lang.ObjectUtils.isEmpty(mesShiftDataResp)){
+			resp.setMessage("未查询到班次");
+			resp.setResult(Global.FALSE);
+			return false; // 没有设置班次,返回false
+		}
+		try {
+			DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+			Date stdate = dateFormat.parse(mesShiftDataResp.getStart());
+			Date etdate = dateFormat.parse(mesShiftDataResp.getEnd());
+			String checkOprno = oprno;
+			if(checkOprno.length() == 5){
+				checkOprno += "A";
+			}
+			String formattedOprno = CommonUitl.formatOprno(checkOprno);
+			List<String> oprnos = new ArrayList<>();
+			oprnos.add(checkOprno);
+			if(!StringUtils.equals(checkOprno, formattedOprno)){
+				oprnos.add(formattedOprno);
+			}
+
+			//查询当前班次的是否有加工记录
+			MesProductRecord mesProductRecord = new MesProductRecord();
+			mesProductRecord.setLineSn(lineSn);
+			mesProductRecord.setCraft("100000");
+			mesProductRecord.setCreateDate_gte(stdate);
+			mesProductRecord.setCreateDate_lte(etdate);
+			mesProductRecord.getSqlMap().getWhere().and("a.oprno", QueryType.IN, oprnos);
+			mesProductRecord.getSqlMap().getOrder().setOrderBy("a.update_date DESC, a.id DESC");
+			List<MesProductRecord> productRecords = mesProductRecordService.findList(mesProductRecord);
+			if(ListUtils.isEmpty(productRecords)){
+				//生成首件检记录
+				MesProductCheckOne mesProductCheckOne1 = new MesProductCheckOne();
+				mesProductCheckOne1.setSn(sn);
+				mesProductCheckOne1.setOprno(checkOprno);
+				mesProductCheckOne1.setLineSn(lineSn);
+				mesProductCheckOne1.setResult("NG");
+				mesProductCheckOne1.setConfirmCheck("0");
+				mesProductCheckOne1.setCreateBy(userCode);
+				mesProductCheckOne1.setUpdateBy(userCode);
+				mesProductCheckOneService.save(mesProductCheckOne1);
+				return true;
+			}
+
+
+			//有,判断首件检记录
+			MesProductCheckOne mesProductCheckOne = new MesProductCheckOne();
+			mesProductCheckOne.setLineSn(lineSn);
+			mesProductCheckOne.setCreateDate_gte(stdate);
+			mesProductCheckOne.setCreateDate_lte(etdate);
+			mesProductCheckOne.getSqlMap().getWhere().and("a.oprno", QueryType.IN, oprnos);
+			mesProductCheckOne.getSqlMap().getOrder().setOrderBy("a.update_date DESC, a.id DESC");
+			List<MesProductCheckOne> firstCheckRecords = mesProductCheckOneService.findList(mesProductCheckOne);
+			if(ListUtils.isEmpty(firstCheckRecords)){
+				resp.setResult(Global.FALSE);
+				resp.setMessage("当前班次首件检查未完成");
+				return false;
+			}
+
+			//NG,查看最新生产记录与最新首件检记录是否相同
+			MesProductCheckOne lastFirstCheck = firstCheckRecords.get(0);
+
+			//相同,确认检查
+			MesProductRecord lastProductRecord = productRecords.get(0);
+			//OK直接走
+			if("OK".equals(lastFirstCheck.getResult())){
+				return true;
+			}
+			//NG,查看最新生产记录与最新首件检记录是否相同
+			if(!StringUtils.equals(lastFirstCheck.getSn(), lastProductRecord.getSn())){
+				resp.setMessage("确认最新首件检状态");
+				resp.setResult(Global.FALSE);
+				return false;
+			}
+
+			if("1".equals(lastFirstCheck.getConfirmCheck())){
+				return true;
+			}
+
+			resp.setResult(Global.FALSE);
+			resp.setMessage("当前班次首件检未完成");
+			return false;
+
+		} catch (ParseException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
 	// 客户端上传结果接口
 	@PostMapping(value = "pcresult")
 	@ResponseBody
@@ -5054,18 +5159,6 @@ public class MesProductRecordController extends BaseController {
 
 		CommonResp resp = new CommonResp<>();
 
-		//抽检首件检是否合格
-		resp = checkShiftFirstQualityNg(request);
-		if ("false".equals(resp.getResult())){
-			return resp;
-		}
-
-		// 查询工位是否有数据
-		resp =pdaQueryIsSn(request);
-		if ("false".equals(resp.getResult())){
-			return resp;
-		}
-
 		resp = pccheck(request);
 		String sn = request.getParameter("sn");
 		String oprno = request.getParameter("oprno");
@@ -5180,6 +5273,286 @@ public class MesProductRecordController extends BaseController {
 		resp.setResult(Global.TRUE);
 		return resp;
 	}
+
+	// PDA查询当前班次首件检记录列表
+	@PostMapping(value = "pdaCheckOneList")
+	@ResponseBody
+	public CommonResp<List<MesProductCheckOne>> pdaCheckOneList(MesProductCheckOne mesProductCheckOne,
+																HttpServletRequest request) {
+		CommonResp<List<MesProductCheckOne>> resp = new CommonResp<>();
+		try {
+			Date[] shiftRange = getCurrentShiftRange();
+			if (shiftRange == null) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("未查询到班次");
+				return resp;
+			}
+
+			String oprno = firstNotBlank(mesProductCheckOne.getOprno(), request.getParameter("oprno"));
+			if (StringUtils.isNotBlank(oprno)) {
+				mesProductCheckOne.setOprno(null);
+				mesProductCheckOne.getSqlMap().getWhere().and("a.oprno", QueryType.IN, buildCheckOneOprnos(oprno));
+			}
+			mesProductCheckOne.setCreateDate_gte(shiftRange[0]);
+			mesProductCheckOne.setCreateDate_lte(shiftRange[1]);
+			mesProductCheckOne.getSqlMap().getOrder().setOrderBy("a.update_date DESC, a.id DESC");
+			List<MesProductCheckOne> list = mesProductCheckOneService.findList(mesProductCheckOne);
+			fillCheckOneImages(list, request);
+
+			resp.setData(list);
+			resp.setResult(Global.TRUE);
+			resp.setMessage("成功");
+			return resp;
+		} catch (Exception e) {
+			resp.setResult(Global.FALSE);
+			resp.setMessage("查询失败:" + e.getMessage());
+			logger.error("PDA查询当前班次首件检记录列表失败", e);
+			return resp;
+		}
+	}
+
+	// PDA根据工件码和工位号查询当前班次最近的首件检记录详情
+	@PostMapping(value = "pdaCheckOneInfo")
+	@ResponseBody
+	public CommonResp<MesProductCheckOne> pdaCheckOneInfo(HttpServletRequest request) {
+		CommonResp<MesProductCheckOne> resp = new CommonResp<>();
+		try {
+			String sn = firstNotBlank(request.getParameter("sn"));
+			String oprno = firstNotBlank(request.getParameter("oprno"));
+			String lineSn = firstNotBlank(request.getParameter("lineSn"));
+			if (StringUtils.isEmpty(sn) || StringUtils.isEmpty(oprno)) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("参数错误");
+				return resp;
+			}
+
+			Date[] shiftRange = getCurrentShiftRange();
+			if (shiftRange == null) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("未查询到班次");
+				return resp;
+			}
+
+			MesProductCheckOne record = findLatestCheckOne(sn, oprno, lineSn, shiftRange[0], shiftRange[1]);
+			if (record == null) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("未找到当前班次首件检记录");
+				return resp;
+			}
+			fillCheckOneImages(record, request);
+
+			resp.setData(record);
+			resp.setResult(Global.TRUE);
+			resp.setMessage("成功");
+			return resp;
+		} catch (Exception e) {
+			resp.setResult(Global.FALSE);
+			resp.setMessage("查询失败:" + e.getMessage());
+			logger.error("PDA查询首件检记录详情失败", e);
+			return resp;
+		}
+	}
+
+	// PDA根据工件码和工位号修改当前班次首件检记录,支持图片上传
+	@PostMapping(value = "pdaCheckOneSubmit")
+	@ResponseBody
+	public CommonResp<MesProductCheckOne> pdaCheckOneSubmit(MesProductCheckOne mesProductCheckOne,
+															HttpServletRequest request) {
+		CommonResp<MesProductCheckOne> resp = new CommonResp<>();
+		try {
+			String sn = firstNotBlank(mesProductCheckOne.getSn(), request.getParameter("sn"));
+			String oprno = firstNotBlank(mesProductCheckOne.getOprno(), request.getParameter("oprno"));
+			String lineSn = firstNotBlank(mesProductCheckOne.getLineSn(), request.getParameter("lineSn"));
+			String result = normalizeCheckOneResult(firstNotBlank(mesProductCheckOne.getResult(), request.getParameter("result")));
+			String confirmCheck = firstNotBlank(mesProductCheckOne.getConfirmCheck(), request.getParameter("confirmCheck"));
+			String userCode = firstNotBlank(request.getParameter("ucode"), request.getParameter("userCode"),
+					request.getParameter("updateBy"), mesProductCheckOne.getUpdateBy());
+
+			if (StringUtils.isEmpty(sn) || StringUtils.isEmpty(oprno)) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("参数错误");
+				return resp;
+			}
+			if (StringUtils.isNotBlank(result) && !"OK".equals(result) && !"NG".equals(result)) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("结果只能为OK或NG");
+				return resp;
+			}
+			if (StringUtils.isNotBlank(confirmCheck) && !"0".equals(confirmCheck) && !"1".equals(confirmCheck)) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("确认检查只能为0或1");
+				return resp;
+			}
+
+			Date[] shiftRange = getCurrentShiftRange();
+			if (shiftRange == null) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("未查询到班次");
+				return resp;
+			}
+
+			MesProductCheckOne record = findLatestCheckOne(sn, oprno, lineSn, shiftRange[0], shiftRange[1]);
+			if (record == null) {
+				resp.setResult(Global.FALSE);
+				resp.setMessage("未找到当前班次首件检记录");
+				return resp;
+			}
+
+			if (StringUtils.isNotBlank(lineSn)) {
+				record.setLineSn(lineSn);
+			}
+			if (StringUtils.isNotBlank(result)) {
+				record.setResult(result);
+			}
+			if (StringUtils.isNotBlank(confirmCheck)) {
+				record.setConfirmCheck(confirmCheck);
+			}
+			if (StringUtils.isNotBlank(userCode)) {
+				record.setUpdateBy(userCode);
+			}
+			mesProductCheckOneService.save(record);
+			uploadCheckOneImages(record, request);
+			fillCheckOneImages(record, request);
+
+			resp.setData(record);
+			resp.setResult(Global.TRUE);
+			resp.setMessage("提交成功");
+			return resp;
+		} catch (Exception e) {
+			resp.setResult(Global.FALSE);
+			resp.setMessage("提交失败:" + e.getMessage());
+			logger.error("PDA提交首件检记录失败", e);
+			return resp;
+		}
+	}
+
+	private MesProductCheckOne findLatestCheckOne(String sn, String oprno, String lineSn, Date startDate, Date endDate) {
+		List<String> oprnos = buildCheckOneOprnos(oprno);
+		if (StringUtils.isBlank(sn) || ListUtils.isEmpty(oprnos)) {
+			return null;
+		}
+		MesProductCheckOne query = new MesProductCheckOne();
+		query.setSn(sn);
+		if (StringUtils.isNotBlank(lineSn)) {
+			query.setLineSn(lineSn);
+		}
+		query.setCreateDate_gte(startDate);
+		query.setCreateDate_lte(endDate);
+		query.getSqlMap().getWhere().and("a.oprno", QueryType.IN, oprnos);
+		query.getSqlMap().getOrder().setOrderBy("a.update_date DESC, a.id DESC");
+		List<MesProductCheckOne> list = mesProductCheckOneService.findList(query);
+		if (ListUtils.isEmpty(list)) {
+			return null;
+		}
+		return list.get(0);
+	}
+
+	private Date[] getCurrentShiftRange() throws ParseException {
+		MesShiftDataResp shift = mesShiftService.getCurShift();
+		if (shift == null || StringUtils.isBlank(shift.getStart()) || StringUtils.isBlank(shift.getEnd())) {
+			return null;
+		}
+		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+		return new Date[]{dateFormat.parse(shift.getStart()), dateFormat.parse(shift.getEnd())};
+	}
+
+	private List<String> buildCheckOneOprnos(String oprno) {
+		List<String> oprnos = new ArrayList<>();
+		String checkOprno = normalizePdaOprno(oprno);
+		if (StringUtils.isBlank(checkOprno)) {
+			return oprnos;
+		}
+		if (checkOprno.length() == 5) {
+			checkOprno += "A";
+		}
+		String formattedOprno = CommonUitl.formatOprno(checkOprno);
+		oprnos.add(checkOprno);
+		if (!StringUtils.equals(checkOprno, formattedOprno)) {
+			oprnos.add(formattedOprno);
+		}
+		return oprnos;
+	}
+
+	private String normalizePdaOprno(String oprno) {
+		if (StringUtils.isBlank(oprno)) {
+			return "";
+		}
+		String value = oprno.trim();
+		if (value.length() > 6 && value.startsWith("OP")) {
+			return value.substring(0, 5);
+		}
+		return value;
+	}
+
+	private String normalizeCheckOneResult(String result) {
+		if (StringUtils.isBlank(result)) {
+			return "";
+		}
+		return result.trim().toUpperCase();
+	}
+
+	private void fillCheckOneImages(List<MesProductCheckOne> list, HttpServletRequest request) {
+		if (ListUtils.isEmpty(list)) {
+			return;
+		}
+		for (MesProductCheckOne record : list) {
+			fillCheckOneImages(record, request);
+		}
+	}
+
+	private void uploadCheckOneImages(MesProductCheckOne record, HttpServletRequest request) {
+		if (record == null || StringUtils.isBlank(record.getId()) || !(request instanceof MultipartHttpServletRequest)) {
+			return;
+		}
+		MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+		Iterator<String> fileNames = multipartRequest.getFileNames();
+		while (fileNames.hasNext()) {
+			String fileName = fileNames.next();
+			List<MultipartFile> files = multipartRequest.getFiles(fileName);
+			for (MultipartFile file : files) {
+				if (file == null || file.isEmpty()) {
+					continue;
+				}
+				FileUploadParams params = new FileUploadParams();
+				params.setFile(file);
+				params.setFileName(file.getOriginalFilename());
+				params.setBizKey(record.getId());
+				params.setBizType(CHECK_ONE_IMAGE_BIZ_TYPE);
+				params.setUploadType(FileUpload.TYPE_IMAGE);
+				fileUploadService.uploadFile(params);
+			}
+		}
+	}
+
+	private void fillCheckOneImages(MesProductCheckOne record, HttpServletRequest request) {
+		if (record == null || StringUtils.isBlank(record.getId())) {
+			return;
+		}
+		String host = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + "/js";
+		FileUpload fu = new FileUpload();
+		fu.setBizKey(record.getId());
+		fu.setBizType(CHECK_ONE_IMAGE_BIZ_TYPE);
+		List<FileUpload> finfo = fileUploadService.findList(fu);
+		List imgList = ListUtils.newArrayList();
+		StringBuilder urlStringBuilder = new StringBuilder();
+		for (FileUpload fi : finfo) {
+			Map<String, Object> map = MapUtils.newHashMap();
+			map.put("id", fi.getFileEntity() == null ? fi.getId() : fi.getFileEntity().getFileId());
+			map.put("url", host + fi.getFileUrl());
+			map.put("name", fi.getFileName());
+			map.put("size", fi.getFileEntity() == null ? null : fi.getFileEntity().getFileSize());
+			if (StringUtils.isNotBlank(fi.getFileUrl())) {
+				if (urlStringBuilder.length() > 0) {
+					urlStringBuilder.append("|");
+				}
+				urlStringBuilder.append(fi.getFileUrl());
+			}
+			imgList.add(map);
+		}
+		record.setUrlString(urlStringBuilder.toString());
+		record.setImg(imgList);
+	}
+
 	//pda根据工件码查询信息
 	@PostMapping(value = "pdaQueryBySn")
 	@ResponseBody