Commit a1d92952 authored by frank.xa.zhang's avatar frank.xa.zhang

modify

parent 2a3e6623
package pwc.taxtech.atms.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.entitiy.Industry;
import pwc.taxtech.atms.service.ProjectIndustryService;
@RestController
@RequestMapping(value = "api/v1/industry")
public class IndustryController {
@Autowired
ProjectIndustryService projectIndustryService;
@RequestMapping(value = "getAllAvailableIndustry", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody List<Industry> GetAllAvailableIndustry() {
return projectIndustryService.GetAllAvailableIndustry();
}
}
package pwc.taxtech.atms.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ModelProfileDto;
import pwc.taxtech.atms.service.ModelConfigurationService;
@RestController
@RequestMapping(value = "api/v1/modelConfiguration")
public class ModelConfigurationController {
@Autowired
ModelConfigurationService modelConfigurationService;
@RequestMapping(value = "model/byIndustry", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody List<ModelProfileDto> GetModelListByIndustry(@RequestParam String industryID,
@RequestParam String serviceTypeID) {
return modelConfigurationService.GetModelListByIndustry(serviceTypeID, industryID);
}
}
......@@ -105,4 +105,6 @@ public interface IndustryMapper extends MyMapper {
* @mbg.generated
*/
int updateByPrimaryKey(Industry record);
List<Industry> GetAllAvailableIndustry();
}
\ No newline at end of file
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dto.ModelProfileDto;
public interface ModelConfigurationService {
List<ModelProfileDto> GetModelListByIndustry(String serviceTypeID, String industryID);
}
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.entitiy.Industry;
public interface ProjectIndustryService {
List<Industry> GetAllAvailableIndustry();
}
......@@ -24,6 +24,7 @@ import pwc.taxtech.atms.dao.KeyValueConfigMapper;
import pwc.taxtech.atms.dao.KeyValueReferenceMapper;
import pwc.taxtech.atms.dao.MailQueueMapper;
import pwc.taxtech.atms.dao.MenuMapper;
import pwc.taxtech.atms.dao.ModelConfigMapper;
import pwc.taxtech.atms.dao.MyStatisticAttributeMapper;
import pwc.taxtech.atms.dao.MyUserMapper;
import pwc.taxtech.atms.dao.OperationLogBasicDataMapper;
......@@ -156,4 +157,6 @@ public class AbstractService {
protected KeyValueConfigMapper keyValueConfigMapper;
@Autowired
protected KeyValueReferenceMapper keyValueReferenceMapper;
@Autowired
protected ModelConfigMapper modelConfigMapper;
}
package pwc.taxtech.atms.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dto.ModelProfileDto;
import pwc.taxtech.atms.service.ModelConfigurationService;
@Service
public class ModelConfigurationServiceImpl extends AbstractService implements ModelConfigurationService {
@Override
public List<ModelProfileDto> GetModelListByIndustry(String serviceTypeID, String industryID) {
return modelConfigMapper.GetModelListByIndustry(serviceTypeID, industryID);
}
}
package pwc.taxtech.atms.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.entitiy.Industry;
import pwc.taxtech.atms.service.ProjectIndustryService;
@Service
public class ProjectIndustryServiceImpl extends AbstractService implements ProjectIndustryService {
@Override
public List<Industry> GetAllAvailableIndustry() {
return industryMapper.GetAllAvailableIndustry();
}
}
......@@ -293,7 +293,7 @@
<result column="ServiceTypeID" jdbcType="VARCHAR" property="ServiceTypeID" />
<result column="ServiceTypeName" jdbcType="VARCHAR" property="ServiceTypeName" />
</resultMap>
<sql id="GetModelListByIndustry" parameterType="map" resultMap="GetModelListByIndustryResult">
<select id="GetModelListByIndustry" parameterType="map" resultMap="GetModelListByIndustryResult">
SELECT
m.ID,
m.Name,
......@@ -326,7 +326,7 @@
ServiceType st ON msc.ServiceTypeID = st.ID
JOIN
Industry i ON org.IndustryID = i.ID
WHERE org.IndustryID=#{industryID} and st.ID = #{serviceTypeID}
WHERE org.IndustryID=#{industryID,jdbcType=VARCHAR} and st.ID = #{serviceTypeID,jdbcType=VARCHAR}
ORDER BY m.code
</sql>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment