|
@@ -5,6 +5,7 @@ import com.jeesite.common.collect.MapUtils;
|
|
|
import com.jeesite.common.config.Global;
|
|
import com.jeesite.common.config.Global;
|
|
|
import com.jeesite.common.entity.Page;
|
|
import com.jeesite.common.entity.Page;
|
|
|
import com.jeesite.common.lang.DateUtils;
|
|
import com.jeesite.common.lang.DateUtils;
|
|
|
|
|
+import com.jeesite.common.mybatis.mapper.query.QueryType;
|
|
|
import com.jeesite.common.utils.excel.ExcelExport;
|
|
import com.jeesite.common.utils.excel.ExcelExport;
|
|
|
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
|
|
import com.jeesite.common.utils.excel.annotation.ExcelField.Type;
|
|
|
import com.jeesite.common.web.BaseController;
|
|
import com.jeesite.common.web.BaseController;
|
|
@@ -180,6 +181,40 @@ public class MesProductGp12Controller extends BaseController {
|
|
|
if (StringUtils.isBlank(lineSn))
|
|
if (StringUtils.isBlank(lineSn))
|
|
|
return renderResult(Global.FALSE, "缺少必要参数");
|
|
return renderResult(Global.FALSE, "缺少必要参数");
|
|
|
|
|
|
|
|
|
|
+ mesProductGp12.getSqlMap().getWhere().and("a.sn", QueryType.EQ, sn);
|
|
|
|
|
+ List<MesProductGp12> list = mesProductGp12Service.findList(mesProductGp12);
|
|
|
|
|
+ if (list.size()>0){
|
|
|
|
|
+ return renderResult(Global.FALSE, "该记录已存在");
|
|
|
|
|
+ }
|
|
|
|
|
+ // 向数据库添加数据
|
|
|
|
|
+ MesProductGp12 entry = new MesProductGp12();
|
|
|
|
|
+ entry.setSn(mesProductGp12.getSn());
|
|
|
|
|
+ entry.setLineSn(mesProductGp12.getLineSn());
|
|
|
|
|
+ entry.setOprno(mesProductGp12.getOprno());
|
|
|
|
|
+ entry.setRemark(mesProductGp12.getRemark());
|
|
|
|
|
+ mesProductGp12Service.save(entry);
|
|
|
|
|
+
|
|
|
|
|
+ FileUploadUtils.saveFileUpload(entry, entry.getId(), "mesProductGp12_image");
|
|
|
|
|
+ return renderResult(Global.TRUE, "操作成功");
|
|
|
|
|
+ }
|
|
|
|
|
+ @PostMapping("/submitGP12")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public String submitGP12(MesProductGp12 mesProductGp12) {
|
|
|
|
|
+ // 检查工位码参数
|
|
|
|
|
+ String sn = mesProductGp12.getSn();
|
|
|
|
|
+ if (StringUtils.isBlank(sn))
|
|
|
|
|
+ return renderResult(Global.FALSE, "缺少必要参数");
|
|
|
|
|
+
|
|
|
|
|
+ // 检查工位号参数
|
|
|
|
|
+ String oprno = mesProductGp12.getOprno();
|
|
|
|
|
+ if (StringUtils.isBlank(oprno))
|
|
|
|
|
+ return renderResult(Global.FALSE, "缺少必要参数");
|
|
|
|
|
+
|
|
|
|
|
+ // 检查产线编号参数
|
|
|
|
|
+ String lineSn = mesProductGp12.getLineSn();
|
|
|
|
|
+ if (StringUtils.isBlank(lineSn))
|
|
|
|
|
+ return renderResult(Global.FALSE, "缺少必要参数");
|
|
|
|
|
+
|
|
|
String result = mesProductGp12.getResult();
|
|
String result = mesProductGp12.getResult();
|
|
|
if (StringUtils.isBlank(result))
|
|
if (StringUtils.isBlank(result))
|
|
|
return renderResult(Global.FALSE, "缺少必要参数");
|
|
return renderResult(Global.FALSE, "缺少必要参数");
|