| | |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.service.support.AbstractBaseService; |
| | | import com.product.face.util.FaceUtil; |
| | | import com.product.mobile.core.config.MobileCoreCode; |
| | | import com.product.mobile.core.entity.FaceFieldEntity; |
| | | import com.product.tool.flow.config.CmnConst; |
| | | import com.product.tool.flow.config.FlowCode; |
| | | import com.product.tool.flow.service.FlowDetailService; |
| | | import com.product.util.BaseUtil; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Resource |
| | | FlowDetailService flowDetailService; |
| | | |
| | | public List<FaceFieldEntity> getFaceField(FieldSetEntity fse) throws BaseException { |
| | | public List<FaceFieldEntity> getFaceFieldByTable(FieldSetEntity fse) { |
| | | String tableUuid = fse.getString("table_uuid"); |
| | | if (StringUtils.isEmpty(tableUuid)) { |
| | | FieldSetEntity tableInfo = BaseUtil.getSingleInfoByCache("所有表信息", new String[]{fse.getString("table_name")}); |
| | | if (!FieldSetEntity.isEmpty(tableInfo)) { |
| | | tableUuid = tableInfo.getString("uuid"); |
| | | } |
| | | } |
| | | if (StringUtils.isEmpty(tableUuid)) { |
| | | throw new BaseException(MobileCoreCode.SYSTEM_FORM_COUNT); |
| | | } |
| | | FieldSetEntity faceFse = getBaseDao().getFieldSetByFilter("product_sys_face", "table_uuid=?", new Object[]{tableUuid}, true); |
| | | return getFaceField(faceFse); |
| | | } |
| | | |
| | | |
| | | public List<FaceFieldEntity> getFlowFaceField(FieldSetEntity fse) throws BaseException { |
| | | String flowBusinessForm = flowDetailService.getFlowBusinessForm(fse); |
| | | JSONObject jsonObject = JSON.parseObject(flowBusinessForm); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | |
| | | } while (false); |
| | | |
| | | } |
| | | return getFaceField(faceFse); |
| | | } |
| | | |
| | | private List<FaceFieldEntity> getFaceField(FieldSetEntity faceFse) { |
| | | if (FieldSetEntity.isEmpty(faceFse) || DataTableEntity.isEmpty(faceFse.getSubDataTable("product_sys_face_control_property"))) { |
| | | throw new BaseException(MobileCoreCode.GET_FACE_CONFIG_FAIL); |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |