package cn.com.goldenwater.dcproj.service.impl.audit; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * @author lhc * @date 2019/11/14 14:42 */ @Service public class PersonWaterFactory { @Autowired VillUpdateState villUpdateState; @Autowired SourceProtectUpdateState sourceProtectUpdate; @Autowired CwsUpdateState cwsUpdateState; @Autowired WaterUserUpdateState waterUserUpdateState; @Autowired ManPersonUpdateState manPersonUpdateState; @Autowired VillCwsUpdateState villCwsUpdateState; /** * @param villType * @return */ public ObjUpdateState CreateObj(String villType) { switch (villType) { case "1": //村 return villUpdateState; case "2"://水源地 return sourceProtectUpdate; case "3"://饮水工程 return cwsUpdateState; case "4"://用水户 return waterUserUpdateState; case "5"://责任落实 return manPersonUpdateState; case "6"://农村饮水工程运行维护 return villCwsUpdateState; default: return null; } } }