zhoulisky il y a 9 mois
Parent
commit
d9b28c9093

+ 22 - 1
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/AssetDTO.java

@@ -1,10 +1,16 @@
 
 
 package org.sky.scientific.pojo.dto;
 package org.sky.scientific.pojo.dto;
 
 
-import org.sky.scientific.pojo.entity.AssetEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
+import org.sky.core.tool.utils.DateUtil;
+import org.sky.scientific.pojo.entity.AssetEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
 import java.io.Serial;
 import java.io.Serial;
+import java.util.Date;
 
 
 /**
 /**
  * 资产表 数据传输对象实体类
  * 资产表 数据传输对象实体类
@@ -18,4 +24,19 @@ public class AssetDTO extends AssetEntity {
 	@Serial
 	@Serial
 	private static final long serialVersionUID = 1L;
 	private static final long serialVersionUID = 1L;
 
 
+	@Schema(description = "开始时间-min")
+	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
+	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
+	private Date kssjMin;
+
+	@Schema(description = "开始时间-max")
+	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
+	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
+	private Date kssjMax;
+
+	@Schema(description = "使用寿命-min")
+	private Integer sysmMin;
+	@Schema(description = "使用寿命-max")
+	private Integer sysmMax;
+
 }
 }

+ 2 - 4
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/TechnicianDTO.java

@@ -27,12 +27,10 @@ public class TechnicianDTO extends TechnicianEntity {
 	@Schema(description = "入职时间-开始")
 	@Schema(description = "入职时间-开始")
 	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
 	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
 	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
 	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
-	private Date hireStartDate;
+	private Date hireDateMin;
 
 
 	@Schema(description = "入职时间-结束")
 	@Schema(description = "入职时间-结束")
 	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
 	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
 	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
 	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
-	private Date hireEndDate;
-
-
+	private Date hireDateMax;
 }
 }

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/AssetController.java

@@ -91,7 +91,7 @@ public class AssetController extends KdController {
 	@PostMapping("/update-status")
 	@PostMapping("/update-status")
 	@ApiOperationSupport(order = 6)
 	@ApiOperationSupport(order = 6)
 	@Operation(summary = "修改状态", description = "传入zc")
 	@Operation(summary = "修改状态", description = "传入zc")
-	public R updateStatus(@Valid @RequestBody AssetEntity asset) {
+	public R updateStatus(@RequestBody AssetEntity asset) {
 		return R.status(service.updateStatus(asset));
 		return R.status(service.updateStatus(asset));
 	}
 	}
 
 

+ 2 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/e/AssetStatusEnum.java

@@ -11,8 +11,8 @@ public enum AssetStatusEnum {
 
 
 
 
 	正常("正常", 0),
 	正常("正常", 0),
-	停用("停用", 2),
-	已足额折旧("已足额折旧", 1),
+	停用("停用", 1),
+	已足额折旧("已足额折旧", 2),
 	改造("改造", 3),
 	改造("改造", 3),
 	资产处置("处置", 4);
 	资产处置("处置", 4);
 
 

+ 7 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/AssetMapper.java

@@ -29,7 +29,7 @@ public interface AssetMapper extends BaseMapper<AssetEntity> {
 	 * @param asset
 	 * @param asset
 	 * @return
 	 * @return
 	 */
 	 */
-	List<AssetVO> selectAssetPage(IPage page, @Param("asset") AssetDTO asset);
+	List<AssetVO> selectAssetPage(IPage page, @Param("ew") AssetDTO asset);
 
 
 	AssetEntity selectLastOneByZcbm(@Param("zcbm") String zcbm);
 	AssetEntity selectLastOneByZcbm(@Param("zcbm") String zcbm);
 
 
@@ -74,4 +74,10 @@ public interface AssetMapper extends BaseMapper<AssetEntity> {
 	 * @param asset
 	 * @param asset
 	 */
 	 */
 	int updateStatus(@Param("assetId") Long assetId, @Param("status") Integer status);
 	int updateStatus(@Param("assetId") Long assetId, @Param("status") Integer status);
+
+	/**
+	 * 查询资产在项目中的使用情况
+	 * @param asset
+	 */
+	List<Long> checkAssetUsage(List<Long> ids);
 }
 }

+ 36 - 5
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/AssetMapper.xml

@@ -28,7 +28,9 @@
         <result column="is_deleted" property="isDeleted"/>
         <result column="is_deleted" property="isDeleted"/>
     </resultMap>
     </resultMap>
 
 
-    <resultMap id="ResultVoMap" type="org.sky.scientific.pojo.vo.AssetVO" extends="ResultMap"/>
+    <resultMap id="ResultVoMap" type="org.sky.scientific.pojo.vo.AssetVO" extends="ResultMap">
+
+    </resultMap>
 
 
     <sql id="basicColumns">
     <sql id="basicColumns">
         asset.id as 'asset.id',
         asset.id as 'asset.id',
@@ -44,15 +46,25 @@
     </update>
     </update>
 
 
     <select id="selectAssetPage" resultMap="ResultVoMap">
     <select id="selectAssetPage" resultMap="ResultVoMap">
-        SELECT t.*
+        SELECT
+            t.*
         FROM kd_asset t
         FROM kd_asset t
         INNER JOIN (
         INNER JOIN (
             SELECT ZCBM, MAX(year_and_month) as max_month FROM kd_asset
             SELECT ZCBM, MAX(year_and_month) as max_month FROM kd_asset
-            WHERE  is_deleted = 0
-            <if test="asset.yearAndMonth.length()==4">AND left(year_and_month, 4) = #{asset.yearAndMonth}</if>
-            <if test="asset.yearAndMonth.length()==6">AND year_and_month = #{asset.yearAndMonth}</if>
+            WHERE is_deleted = 0
+            <if test="ew.yearAndMonth.length()==4">AND left(year_and_month, 4) = #{ew.yearAndMonth}</if>
+            <if test="ew.yearAndMonth.length()==6">AND year_and_month = #{ew.yearAndMonth}</if>
             GROUP BY ZCBM
             GROUP BY ZCBM
         ) tm ON t.ZCBM = tm.ZCBM AND t.year_and_month = tm.max_month
         ) tm ON t.ZCBM = tm.ZCBM AND t.year_and_month = tm.max_month
+        <where>
+            <if test="ew.zcbm != null and ew.zcbm != ''">and t.zcbm like concat('%',#{ew.zcbm},'%')</if>
+            <if test="ew.zcmc != null and ew.zcmc != ''">and t.zcmc like concat('%',#{ew.zcmc},'%')</if>
+            <if test="ew.zclb != null and ew.zclb != ''">and t.zclb = #{ew.zclb}</if>
+            <if test="ew.yt != null and ew.yt != ''">and t.yt = #{ew.yt}</if>
+            <if test="ew.kssjMin != null and ew.kssjMax != null">and t.kssj between #{ew.kssjMin} and #{ew.kssjMax}</if>
+            <if test="ew.sysmMin != null and ew.sysmMax!=null">and t.SYSM between #{ew.sysmMin} and #{ew.sysmMax}</if>
+            <if test="ew.status != null">and t.status = #{ew.status}</if>
+        </where>
         ORDER BY t.ZCBM, t.year_and_month DESC
         ORDER BY t.ZCBM, t.year_and_month DESC
     </select>
     </select>
 
 
@@ -173,4 +185,23 @@
         GROUP BY m.month
         GROUP BY m.month
 
 
     </select>
     </select>
+
+    <select id="checkAssetUsage" resultType="java.lang.Long">
+        SELECT
+            asset_id
+        FROM
+            (
+                SELECT asset_id FROM kd_ys_zjfyycqdtfy
+                UNION
+                SELECT asset_id FROM kd_ys_wxzctxfy
+                UNION
+                SELECT asset_id FROM kd_xm_fixed_asset
+                UNION
+                SELECT asset_id FROM kd_xm_intangible_asset
+            ) tmp
+        WHERE tmp.asset_id 	in
+              <foreach collection="ids" item="id" open="(" separator="," close=")">
+                  #{id}
+              </foreach>
+    </select>
 </mapper>
 </mapper>

+ 2 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/TechnicianMapper.xml

@@ -73,7 +73,7 @@
         <if test="technician.personnelType!=null and technician.personnelType!=''">and personnel_type = #{technician.personnelType}</if>
         <if test="technician.personnelType!=null and technician.personnelType!=''">and personnel_type = #{technician.personnelType}</if>
         <if test="technician.situation !=null and technician.situation!=''">and situation = #{technician.situation}</if>
         <if test="technician.situation !=null and technician.situation!=''">and situation = #{technician.situation}</if>
         <if test="technician.practicingRequirement !=null and technician.practicingRequirement!=''">and practicing_requirement like concat(concat('%', #{technician.practicingRequirement}), '%')</if>
         <if test="technician.practicingRequirement !=null and technician.practicingRequirement!=''">and practicing_requirement like concat(concat('%', #{technician.practicingRequirement}), '%')</if>
-        <if test="technician.hireStartDate!=null and technician.hireEndDate!=''">and hire_Date between #{technician.hireStartDate} and #{technician.hireEndDate}</if>
+        <if test="technician.hireDateMin!=null and technician.hireDateMax!=''">and hire_Date between #{technician.hireDateMin} and #{technician.hireDateMax}</if>
         order by year_and_month asc, id asc
         order by year_and_month asc, id asc
     </select>
     </select>
 
 
@@ -101,7 +101,7 @@
         <if test="technician.personnelType!=null and technician.personnelType!=''">and personnel_type = #{technician.personnelType}</if>
         <if test="technician.personnelType!=null and technician.personnelType!=''">and personnel_type = #{technician.personnelType}</if>
         <if test="technician.situation !=null and technician.situation!=''">and situation = #{technician.situation}</if>
         <if test="technician.situation !=null and technician.situation!=''">and situation = #{technician.situation}</if>
         <if test="technician.practicingRequirement !=null and technician.practicingRequirement!=''">and practicing_requirement like concat(concat('%', #{technician.practicingRequirement}), '%')</if>
         <if test="technician.practicingRequirement !=null and technician.practicingRequirement!=''">and practicing_requirement like concat(concat('%', #{technician.practicingRequirement}), '%')</if>
-        <if test="technician.hireStartDate!=null and technician.hireEndDate!=''">and hire_Date between #{technician.hireStartDate} and #{technician.hireEndDate}</if>
+        <if test="technician.hireDateMin!=null and technician.hireDateMax!=''">and hire_Date between #{technician.hireDateMin} and #{technician.hireDateMax}</if>
     </select>
     </select>
 
 
     <select id="selectByDateInterval" resultMap="ResultMap" parameterType="java.util.Map">
     <select id="selectByDateInterval" resultMap="ResultMap" parameterType="java.util.Map">

+ 43 - 23
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/AssetServiceImpl.java

@@ -38,7 +38,6 @@ import java.io.InputStream;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.math.RoundingMode;
 import java.net.URLEncoder;
 import java.net.URLEncoder;
-import java.util.Arrays;
 import java.util.List;
 import java.util.List;
 import java.util.Objects;
 import java.util.Objects;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -68,13 +67,17 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 			throw new ServiceException("资产【" + asset.getZcbm() + "】已存在");
 			throw new ServiceException("资产【" + asset.getZcbm() + "】已存在");
 		}
 		}
 
 
+		if(!isFixedAsset(asset.getZclb())){
+			asset.setGl("/");
+		}
+
 		//使用寿命-已使用月份数=0时,即已足额折旧
 		//使用寿命-已使用月份数=0时,即已足额折旧
 //			仪器设置的算法:当前时间为2025年01月-2024年5月,差额为9个月,因为折旧从次月开始,所以已使用月数为8个月(即9-1=8),再将使用寿命-已使用月份数=0时,即已足额折旧。
 //			仪器设置的算法:当前时间为2025年01月-2024年5月,差额为9个月,因为折旧从次月开始,所以已使用月数为8个月(即9-1=8),再将使用寿命-已使用月份数=0时,即已足额折旧。
 //			无形资产:当月即摊销,不需要-1
 //			无形资产:当月即摊销,不需要-1
 
 
 		long ysysm = cn.hutool.core.date.DateUtil.betweenMonth(cn.hutool.core.date.DateUtil.date(), asset.getKssj(), false);
 		long ysysm = cn.hutool.core.date.DateUtil.betweenMonth(cn.hutool.core.date.DateUtil.date(), asset.getKssj(), false);
 //			这里
 //			这里
-		if (!Func.equals("仪器设备", asset.getZclb())) {
+		if (!isFixedAsset(asset.getZclb())) {
 			ysysm++;
 			ysysm++;
 		}
 		}
 		asset.setYsysm((int) ysysm);
 		asset.setYsysm((int) ysysm);
@@ -106,6 +109,9 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 				throw new ServiceException("资产编号【" + excel.getZcbm() + "】已存在");
 				throw new ServiceException("资产编号【" + excel.getZcbm() + "】已存在");
 			}
 			}
 
 
+			if(Func.notNull(zc.getJcz())){
+				zc.setJcz(Math.min(zc.getJcz() / 100.0, 1.0));
+			}
 			int status = AssetStatusEnum.valueOf(excel.getStatusName()).getCode();
 			int status = AssetStatusEnum.valueOf(excel.getStatusName()).getCode();
 			zc.setStatus(status);
 			zc.setStatus(status);
 			this.save(zc);
 			this.save(zc);
@@ -150,6 +156,14 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 
 
 	@Override
 	@Override
 	public boolean physicalDeleteByIds(List<Long> ids) {
 	public boolean physicalDeleteByIds(List<Long> ids) {
+		//删除说明
+		//① 删除:如果此资产,在研发项目中,已使用情况下,不可以删除。系统提示:资产已被使用,无法删除!
+		//② 如果此资产,无任何研发项目使用,可以在资产清单管理中,将此资产进行删除。
+		//③ 如果此资产,曾经被研发项目使用(可能研发项目后续不再使用此资产),这一类情况也不可以进行删除。
+		List<Long> list = baseMapper.checkAssetUsage(ids);
+		if(Func.isNotEmpty(list)){
+			throw new ServiceException("资产已被使用,无法删除!");
+		}
 		return baseMapper.physicalDeleteByIds(ids);
 		return baseMapper.physicalDeleteByIds(ids);
 	}
 	}
 
 
@@ -242,6 +256,9 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 			throw new ServiceException("资产【" + asset.getZcbm() + "】已存在");
 			throw new ServiceException("资产【" + asset.getZcbm() + "】已存在");
 		}
 		}
 
 
+		if(!isFixedAsset(asset.getZclb())){
+			asset.setGl("/");
+		}
 //		正常状态、停用状态,可修改资产数据。其他情况不能修改。假设在修改资产时,正好出现使用寿命-已使用月份数=0时,即已足额折旧状态时,就显示为已足额折旧状态了,不可以再次修改了。
 //		正常状态、停用状态,可修改资产数据。其他情况不能修改。假设在修改资产时,正好出现使用寿命-已使用月份数=0时,即已足额折旧状态时,就显示为已足额折旧状态了,不可以再次修改了。
 //		修改资产时,系统需要二次确认。
 //		修改资产时,系统需要二次确认。
 
 
@@ -278,7 +295,7 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 			throw new ServiceException("资产不存在");
 			throw new ServiceException("资产不存在");
 		}
 		}
 
 
-		if (List.of("仪器设备", "房屋建筑物").contains(dbAsset.getZclb())) {
+		if (asset.getStatus() == AssetStatusEnum.改造.getCode() && !isFixedAsset(dbAsset.getZclb())) {
 			throw new ServiceException("只有固定资产才能改造");
 			throw new ServiceException("只有固定资产才能改造");
 		}
 		}
 //		String name = AssetStatusEnum.改造.name();
 //		String name = AssetStatusEnum.改造.name();
@@ -295,22 +312,22 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 		if (Func.equals(dbAsset.getStatus(), AssetStatusEnum.资产处置.getCode())) {
 		if (Func.equals(dbAsset.getStatus(), AssetStatusEnum.资产处置.getCode())) {
 			throw new ServiceException("该资产已处置");
 			throw new ServiceException("该资产已处置");
 		}
 		}
-		if (Func.equals(AssetStatusEnum.正常.getCode(), dbAsset.getStatus())) {
-			//① 正常状态:表示正常使用中;正常折旧,已使用寿命/月数累加。可进行“改造”、“停用”、“资产处置”。
-			if (!Arrays.asList(AssetStatusEnum.改造.getCode(), AssetStatusEnum.停用.getCode(), AssetStatusEnum.资产处置.getCode()).contains(asset.getStatus())) {
-				throw new ServiceException("状态为正常的资产,可进行改造、停用、资产处置操作");
-			}
-		} else if (Func.equals(AssetStatusEnum.停用.getCode(), dbAsset.getStatus())) {
-			//② 停用状态:表示停止使用状态;虽然停用,但是正常折旧,已使用寿命/月数继续累加。停用后,可点击“恢复”恢复为正常状态。可进行“改造”、“资产处置”。
-			if (!Arrays.asList(AssetStatusEnum.改造.getCode(), AssetStatusEnum.资产处置.getCode(), AssetStatusEnum.正常.getCode()).contains(asset.getStatus())) {
-				throw new ServiceException("状态为停用的资产,可进行改造、恢复、资产处置操作");
-			}
-		} else if (Func.equals(AssetStatusEnum.改造.getCode(), dbAsset.getStatus())) {
-			//改造状态:表示改造中,改造期已使用寿命/月数/折旧为“全部暂停”状态。改造完成,需点击“恢复按钮”,恢复时需对资产内容进行修改完成。恢复为正常状态。
-			if (!List.of(AssetStatusEnum.正常.getCode()).contains(asset.getStatus())) {
-				throw new ServiceException("状态为改造的资产,可进行恢复操作");
-			}
-		}
+//		if (Func.equals(AssetStatusEnum.正常.getCode(), dbAsset.getStatus())) {
+//			//① 正常状态:表示正常使用中;正常折旧,已使用寿命/月数累加。可进行“改造”、“停用”、“资产处置”。
+//			if (!Arrays.asList(AssetStatusEnum.改造.getCode(), AssetStatusEnum.停用.getCode(), AssetStatusEnum.资产处置.getCode()).contains(asset.getStatus())) {
+//				throw new ServiceException("状态为正常的资产,可进行改造、停用、资产处置操作");
+//			}
+//		} else if (Func.equals(AssetStatusEnum.停用.getCode(), dbAsset.getStatus())) {
+//			//② 停用状态:表示停止使用状态;虽然停用,但是正常折旧,已使用寿命/月数继续累加。停用后,可点击“恢复”恢复为正常状态。可进行“改造”、“资产处置”。
+//			if (!Arrays.asList(AssetStatusEnum.改造.getCode(), AssetStatusEnum.资产处置.getCode(), AssetStatusEnum.正常.getCode()).contains(asset.getStatus())) {
+//				throw new ServiceException("状态为停用的资产,可进行改造、恢复、资产处置操作");
+//			}
+//		} else if (Func.equals(AssetStatusEnum.改造.getCode(), dbAsset.getStatus())) {
+//			//改造状态:表示改造中,改造期已使用寿命/月数/折旧为“全部暂停”状态。改造完成,需点击“恢复按钮”,恢复时需对资产内容进行修改完成。恢复为正常状态。
+//			if (!List.of(AssetStatusEnum.正常.getCode()).contains(asset.getStatus())) {
+//				throw new ServiceException("状态为改造的资产,可进行恢复操作");
+//			}
+//		}
 
 
 		return baseMapper.updateStatus(asset.getId(), asset.getStatus()) == 1;
 		return baseMapper.updateStatus(asset.getId(), asset.getStatus()) == 1;
 	}
 	}
@@ -321,9 +338,9 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 		if(Func.isNull(asset.getId())){
 		if(Func.isNull(asset.getId())){
 			throw new ServiceException("参数id不能为空");
 			throw new ServiceException("参数id不能为空");
 		}
 		}
-		if (!List.of(AssetStatusEnum.改造.getCode(), AssetStatusEnum.停用.getCode()).contains(asset.getStatus())) {
-			throw new ServiceException("状态为改造/停用的资产,可进行恢复操作");
-		}
+//		if (!List.of(AssetStatusEnum.改造.getCode(), AssetStatusEnum.停用.getCode()).contains(asset.getStatus())) {
+//			throw new ServiceException("状态为改造/停用的资产,可进行恢复操作");
+//		}
 
 
 		asset.setStatus(AssetStatusEnum.正常.getCode());
 		asset.setStatus(AssetStatusEnum.正常.getCode());
 		if (Func.isNull(asset.getYsysm())) {
 		if (Func.isNull(asset.getYsysm())) {
@@ -332,7 +349,7 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 //			无形资产:当月即摊销,不需要-1
 //			无形资产:当月即摊销,不需要-1
 			long ysysm = cn.hutool.core.date.DateUtil.betweenMonth(cn.hutool.core.date.DateUtil.date(), asset.getKssj(), false);
 			long ysysm = cn.hutool.core.date.DateUtil.betweenMonth(cn.hutool.core.date.DateUtil.date(), asset.getKssj(), false);
 //			这里
 //			这里
-			if (!Func.equals("仪器设备", asset.getZclb())) {
+			if (!isFixedAsset(asset.getZclb())) {
 				ysysm++;
 				ysysm++;
 			}
 			}
 			asset.setYsysm((int) ysysm);
 			asset.setYsysm((int) ysysm);
@@ -343,4 +360,7 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 		return this.updateById(asset);
 		return this.updateById(asset);
 	}
 	}
 
 
+	public static boolean isFixedAsset(String zclb) {
+		return List.of("仪器设备", "房屋建筑物").contains(zclb);
+	}
 }
 }

+ 1 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/SubjectServiceImpl.java

@@ -66,6 +66,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
 
 
 	@Override
 	@Override
 	public boolean submitSubject(Subject subject) {
 	public boolean submitSubject(Subject subject) {
+//		subject.setAccSubject();
 		if (Func.isEmpty(subject.getId())) {
 		if (Func.isEmpty(subject.getId())) {
 			//新增
 			//新增
 			return save(subject);
 			return save(subject);