liuchaohui преди 2 години
родител
ревизия
6085493d1f

+ 13 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyCarryB.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.oa.entity;
 
 import java.io.Serializable;
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -57,9 +58,21 @@ public class SyCarryB implements Serializable {
 	/**计划员*/
     @Excel(name = "计划员", width = 15)
 	private String jhyByData;
+    public void setJhyByData(String s){
+		this.jhyByData=s;
+		this.jhyDatas=s.split("-");
+	}
+	@TableField(exist = false)
+	private String[] jhyDatas;
 	/**计划员名称*/
     @Excel(name = "计划员名称", width = 15)
 	private String jhyNameData;
+    public void setJhyNameData(String s){
+		this.jhyNameData=s;
+		this.jhyNames=s.split("/");
+	}
+	@TableField(exist = false)
+	private String[] jhyNames;
 	/**日期*/
 	@Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

+ 20 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/service/impl/SyCarryServiceImpl.java

@@ -62,6 +62,26 @@ public class SyCarryServiceImpl extends ServiceImpl<SyCarryMapper, SyCarry> impl
 				}
 				entity.setJhyNameData(sb.toString());
 			}
+			if( entity.getJhyDatas().length>0 && StringUtils.isNotBlank(entity.getJhyByData()) ){
+				StringBuffer sb= new StringBuffer();
+				for (String s:entity.getJhyDatas()) {
+					if(sb==null){
+						sb.append(s);
+					}
+					sb.append("-"+s);
+				}
+				entity.setJhyByData(sb.toString());
+			}
+			if( entity.getJhyNames().length>0 && StringUtils.isNotBlank(entity.getJhyNameData()) ){
+				StringBuffer sb= new StringBuffer();
+				for (String s:entity.getJhyNames()) {
+					if(sb==null){
+						sb.append(s);
+					}
+					sb.append("/"+s);
+				}
+				entity.setJhyByData(sb.toString());
+			}
 			syCarryBMapper.insert(entity);
 		}
 	}