package cn.com.goldenwater.dcproj.service.impl.audit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by lhc on 2019/11/1 9:29
*/
@Service
public class ObjUpdateStateObjFactory {
@Autowired
RsvrUpdateState rsvrUpdateState;
@Autowired
TrackUpdateState trackUpdateState;
@Autowired
KeyRegUpdateState keyRegUpdateState;
@Autowired
GrwUpdateState grwUpdateState;
@Autowired
WagaUpdateState wagaUpdateState;
@Autowired
FscRegUpdateState fscRegUpdateState;
@Autowired
SdUpdateState sdUpdateState;
@Autowired
WiuRegUpdateState wiuRegUpdateState;
@Autowired
SwhsUpdateState swhsUpdateState;
@Autowired
WintUpdateState wintUpdateState;
@Autowired
SvwtAreaUpdateState svwtAreaUpdateState;
@Autowired
SvwtWuntUpdateState svwtWuntUpdateState;
@Autowired
PersonWaterUpdateState personWaterUpdateState;
@Autowired
OtherUpdateState otherUpdateState;//9 其他类型督查
///
/// 简单工厂中必须要有一个方法来根据指定的逻辑创建实例
///
///
///
public ObjUpdateState CreateObj(String ptype) {
switch (ptype) {
case "1": //小水库
return rsvrUpdateState;
case "2":
return personWaterUpdateState;
case "3": //水毁修复
return trackUpdateState;
case "4":
case "7":
//重点水利工程建设及运行
return keyRegUpdateState;
case "5":
//地下水
return grwUpdateState;
case "6":
//水闸
return wagaUpdateState;
case "9":
//特定飞检
return fscRegUpdateState;
case "10":
//其他填报
return otherUpdateState;
case "11":
//淤地坝督查登记表
return sdUpdateState;
case "12":
//取水口
return wiuRegUpdateState;
case "13":
//重要水源地
return swhsUpdateState;
case "14":
//分水及管控
return wintUpdateState;
case "15":
//节水管理与评价
return svwtAreaUpdateState;
case "16":
//用水单位抽查
return svwtWuntUpdateState;
default:
return null;
}
}
}