| | |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.service.support.AbstractBaseService; |
| | | import com.product.face.entity.FaceListEntity; |
| | | import com.product.face.service.FaceApplyService; |
| | | import com.product.face.util.FaceUtil; |
| | | import com.product.mobile.core.config.MobileCoreCode; |
| | | import com.product.mobile.core.entity.FaceFieldEntity; |
| | |
| | | |
| | | @Autowired |
| | | public BaseDao baseDao; |
| | | @Autowired |
| | | private FaceApplyService faceApplyService; |
| | | |
| | | ///获取表单总入口 |
| | | /** |
| | |
| | | * @param fse传入表名,或 表UUID |
| | | * @return |
| | | */ |
| | | public List<FaceFieldEntity> getFaceConfig(FieldSetEntity fse) { |
| | | public Object getFaceConfig(FieldSetEntity fse) { |
| | | |
| | | String tableUuid = fse.getString("table_uuid"); |
| | | if (tableUuid == null && StringUtils.isNotEmpty(fse.getString("uuid")) |
| | |
| | | } |
| | | } |
| | | |
| | | List<FaceFieldEntity> ls = getFaceFieldByTable(fse); |
| | | Object o = getFaceFieldByTable(fse); |
| | | if (o instanceof FaceListEntity) { |
| | | return o; |
| | | } |
| | | List<FaceFieldEntity> ls = (List<FaceFieldEntity>) o; |
| | | if (ls == null) ls = new ArrayList<FaceFieldEntity>(); |
| | | addproperty(tableUuid, fse.getString("table_name"), ls); |
| | | //所有表单uuid自动添加,并为hidden |
| | |
| | | } |
| | | } |
| | | |
| | | public List<FaceFieldEntity> getFaceFieldByTable(FieldSetEntity fse) { |
| | | public Object getFaceFieldByTable(FieldSetEntity fse) { |
| | | String tableUuid = fse.getString("table_uuid"); |
| | | String tableName = fse.getString("table_name"); |
| | | if (StringUtils.isEmpty(tableUuid) && !StringUtils.isEmpty(tableName)) { |
| | |
| | | String faceType = BaseUtil.ifNull(fse.getString("face_type"), "2"); |
| | | FieldSetEntity faceFse = getBaseDao().getFieldSetByFilter("product_sys_face", "table_uuid=? and face_type=?", new Object[]{tableUuid,faceType}, true); |
| | | faceFse.setTableName(tableName); |
| | | if ("1".equals(faceType)) { |
| | | //列表 |
| | | return faceApplyService.getFaceListConf(faceFse); |
| | | } |
| | | return getFaceField(faceFse); |
| | | } |
| | | |