Java tutorial
package com.kysoft.cpsi.audit.service; import com.google.common.collect.Maps; import com.kysoft.cpsi.audit.mapper.*; import com.kysoft.cpsi.repo.entity.Hcsx; import com.kysoft.cpsi.repo.mapper.HcsxMapper; import org.apache.commons.collections.map.HashedMap; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.Map; @Service("jsAuditService") public class JsAuditServiceImpl implements JsAuditService { @Resource HcsxMapper hcsxMapper; @Resource JsLicenseMapper jsLicenseMapper; @Resource JsGqbgMapper jsGqbgMapper; @Resource JsZscqMapper jsZscqMapper; @Resource JsXzcfMapper jsXzcfMapper; @Resource JsStockholderContributionMapper jsStockholderContributionMapper; Integer JS_GS_INFO_FLAG = 4;//? Integer JS_GS_INFO_REAL = 5;//? @Override public Map<String, Object> getCompareInfo(String hcrwId, String hcsxId) { Map<String, Object> result = Maps.newHashMap(); Hcsx hcsx = hcsxMapper.selectByPrimaryKey(hcsxId); String hcsxMc = hcsx.getName(); Map<String, Object> param = new HashedMap(); param.put("hcrwId", hcrwId); switch (hcsxMc) { case "?????": result.put("a", jsGqbgMapper.query(param));//?? param.put("sjly", JS_GS_INFO_FLAG); result.put("b", jsGqbgMapper.queryBD(param));//? param.put("sjly", JS_GS_INFO_REAL); result.put("c", jsGqbgMapper.queryBD(param));//? break; case "??????": result.put("a", jsLicenseMapper.query(param));//?? param.put("sjly", JS_GS_INFO_FLAG); result.put("b", jsLicenseMapper.queryBD(param));//? param.put("sjly", JS_GS_INFO_REAL); result.put("c", jsLicenseMapper.queryBD(param));//? break; case "??": result.put("a", jsZscqMapper.query(param));//?? param.put("sjly", JS_GS_INFO_FLAG); result.put("b", jsZscqMapper.queryBD(param));//? param.put("sjly", JS_GS_INFO_REAL); result.put("c", jsZscqMapper.queryBD(param));//? break; case "?": result.put("a", jsXzcfMapper.query(param));//?? param.put("sjly", JS_GS_INFO_FLAG); result.put("b", jsXzcfMapper.queryBD(param));//? param.put("sjly", JS_GS_INFO_REAL); result.put("c", jsXzcfMapper.queryBD(param));//? break; case "??": result.put("a", jsStockholderContributionMapper.query(param));//?? param.put("sjly", JS_GS_INFO_FLAG); result.put("b", jsStockholderContributionMapper.queryBD(param));//? param.put("sjly", JS_GS_INFO_REAL); result.put("c", jsStockholderContributionMapper.queryBD(param));//? break; default: } return result; } }