zm
2025-03-17 2b8e522ec7c38570463a08e04bc1cc264a038e5b
src/main/java/com/product/contract/service/ProjectBusinessService.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.product.common.lang.StringUtils;
import com.product.contract.config.CmnConst;
import com.product.contract.service.ide.IProjectBusinessService;
import com.product.core.dao.BaseDao;
@@ -62,10 +63,13 @@
   public JSONObject findTranslate(FieldSetEntity fse) {
      FieldSetEntity fsData = baseDao.getFieldSetBySQL("SELECT project_type,date FROM product_project_business_translate where project_type=?", new String[]{fse.getString("project_type")}, false);
      JSONObject rejson=BaseUtil.fieldSetEntityToJson(fsData);
      DataTableEntity projectType = baseDao.listTable(CmnConst.PRODUCT_PROJECT_BUSINESS_TRANSLATE, "project_type=? ORDER BY project_task", new String[]{fse.getString("project_type")});
      DataTableEntity projectType = baseDao.listTable(CmnConst.PRODUCT_PROJECT_BUSINESS_TRANSLATE, "project_type=? ORDER BY project_task,id", new String[]{fse.getString("project_type")});
      JSONObject json = new JSONObject();
      for (int i = 0; i < projectType.getRows(); i++) {
         FieldSetEntity fs = projectType.getFieldSetEntity(i);
         if (!StringUtils.isEmpty(fse.getString("type")) &&fse.getString("type").equals("view")){
            fs.remove("uuid");
         }
         if (json.getJSONArray(fs.getString("project_task"))==null){
            JSONArray objects = new JSONArray();
            objects.add(BaseUtil.fieldSetEntityToJson(fs));
@@ -107,6 +111,9 @@
   @Transactional
   @Override
   public boolean saveProject(FieldSetEntity fse) {
      if (!StringUtils.isEmpty(fse.getString("del")) &&fse.getString("del").equals("2")){
         baseDao.delete(CmnConst.PRODUCT_PROJECT_BUSINESS_PLAN,"project_uuid=?",new String[]{fse.getUUID()});
      }
      return baseDao.saveFieldSetEntity(BaseUtil.createCreatorAndCreationTime(fse));
   }
}