Forráskód Böngészése

区分正反面已拍照

wangxichen 2 hete
szülő
commit
6589f64f02

+ 20 - 0
src/main/java/com/jeesite/modules/mes/entity/MesProductGp12.java

@@ -25,6 +25,8 @@ import java.util.List;
 		@Column(name="oprno", attrName="oprno", label="工位号"),
 		@Column(name="line_sn", attrName="lineSn", label="产线编号"),
 		@Column(name="remark", attrName="remark", label="备注"),
+		@Column(name="photo_f", attrName="photoF", label="反面已拍照"),
+		@Column(name="photo_z", attrName="photoZ", label="正面已拍照"),
 		@Column(name="create_by", attrName="createBy", label="创建人"),
 		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdateForce=true),
 		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
@@ -38,6 +40,8 @@ public class MesProductGp12 extends DataEntity<MesProductGp12> {
 	private String oprno;		// 工位号
 	private String lineSn;		// 产线编号
 	private String remark;		// 备注
+	private Integer photoF;	// 反面已拍照 0否1是
+	private Integer photoZ;	// 正面已拍照 0否1是
 	private List img = ListUtils.newArrayList();//图片
 	@ExcelFields({
 //		@ExcelField(title="id", attrName="id", align=Align.CENTER, sort=10),
@@ -93,6 +97,22 @@ public class MesProductGp12 extends DataEntity<MesProductGp12> {
 	public void setRemark(String remark) {
 		this.remark = remark;
 	}
+
+	public Integer getPhotoF() {
+		return photoF;
+	}
+
+	public void setPhotoF(Integer photoF) {
+		this.photoF = photoF;
+	}
+
+	public Integer getPhotoZ() {
+		return photoZ;
+	}
+
+	public void setPhotoZ(Integer photoZ) {
+		this.photoZ = photoZ;
+	}
 	
 	public Date getCreateDate_gte() {
 		return sqlMap.getWhere().getValue("create_date", QueryType.GTE);

+ 9 - 1
src/main/java/com/jeesite/modules/mes/service/MesProductGp12Service.java

@@ -236,7 +236,13 @@ public class MesProductGp12Service extends CrudService<MesProductGp12Dao, MesPro
 		}
 
 		if (existing != null) {
-			// 已有记录,更新时间
+			// 已有记录,更新拍照状态
+			if (mesProductGp12.getPhotoF() != null && mesProductGp12.getPhotoF() == 1) {
+				existing.setPhotoF(1);
+			}
+			if (mesProductGp12.getPhotoZ() != null && mesProductGp12.getPhotoZ() == 1) {
+				existing.setPhotoZ(1);
+			}
 			existing.setUpdateDate(new java.util.Date());
 			super.save(existing);
 		} else {
@@ -246,6 +252,8 @@ public class MesProductGp12Service extends CrudService<MesProductGp12Dao, MesPro
 			entry.setLineSn(mesProductGp12.getLineSn());
 			entry.setOprno(oprno);
 			entry.setRemark(folderName);
+			entry.setPhotoF(mesProductGp12.getPhotoF() != null ? mesProductGp12.getPhotoF() : 0);
+			entry.setPhotoZ(mesProductGp12.getPhotoZ() != null ? mesProductGp12.getPhotoZ() : 0);
 			super.save(entry);
 		}