123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package com.sooka.base;
- import com.alibaba.fastjson.JSON;
- import com.alibaba.fastjson.JSONObject;
- import com.sooka.model.ResultModel;
- import com.sooka.model.bo.BaseBean_Guiji;
- import com.sooka.model.bo.Guiji_library_baseinfo_Bean;
- public class BaseService {
- public BaseGuijiBean getBaseGuiji(String str) {
- BaseGuijiBean bean = new BaseGuijiBean();
- JSONObject jsonObject = JSON.parseObject(str);
- bean.setId(jsonObject.getString("id"));
- bean.setCd_time(jsonObject.getString("cd_time"));
- bean.setCd_batch(jsonObject.getString("cd_batch"));
- bean.setCd_operation(jsonObject.getString("cd_operation"));
- bean.setCd_source(jsonObject.getString("cd_source"));
- bean.setData(jsonObject.getJSONObject("Data"));
- return bean;
- }
- public ResultModel getResultModel() {
- return new ResultModel();
- }
- public BaseBean_Guiji initBaseGuijiBean(String str, BaseBean_Guiji bean){
- JSONObject jsonObject = JSON.parseObject(str);
- bean.setId(jsonObject.getString("id"));
- bean.setCd_time(jsonObject.getString("cd_time"));
- bean.setCd_batch(jsonObject.getString("cd_batch"));
- bean.setCd_operation(jsonObject.getString("cd_operation"));
- bean.setCd_source(jsonObject.getString("cd_source"));
- JSONObject Data = jsonObject.getJSONObject("Data");
- bean.setData(Data);
- return bean;
- }
- }
|