Commit b6852629 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

basicData module test and correct

See merge request root/atms!118
parents 6952e4a9 1d21d394
......@@ -122,7 +122,7 @@ public class OrganizationController {
@ApiOperation(value = "获取机构上层维度")
@RequestMapping(value = "getOrgBuAreaIndustryUser", method = RequestMethod.GET)
public @ResponseBody
List<DimensionRoleDto> getOrgBuAreaIndustryUser(@RequestParam("userId") String userId) {
List<DimensionRoleDto> getOrgBuAreaIndustryUser(@RequestParam("userID") String userId) {
logger.info("POST /api/v1/org/getOrgBuAreaIndustryUser");
return userRoleService.getOrgBuAreaIndustryUser(userId);
}
......
......@@ -63,9 +63,9 @@ public class RoleController {
}
@ApiOperation(value = "通过传入的用户Id获取该用户的所有角色")
@RequestMapping(value = "getAllRoleListByUserId", method = RequestMethod.GET)
public @ResponseBody List<UserRoleDto> getAllRoleListByUserId(@RequestParam("userId") String userId,
@RequestParam("serviceTypeId") String serviceTypeId) {
@RequestMapping(value = "getAllRoleListByUserID", method = RequestMethod.GET)
public @ResponseBody List<UserRoleDto> getAllRoleListByUserId(@RequestParam("userID") String userId,
@RequestParam("serviceTypeID") String serviceTypeId) {
logger.debug("RoleController getAllRoleListByUserId");
return roleService.getAllRoleListByUserId(userId, serviceTypeId);
}
......@@ -91,7 +91,7 @@ public class RoleController {
@ApiOperation(value = "删除角色下用户")
@RequestMapping(value = "removeUserRole", method = RequestMethod.POST)
public @ResponseBody Boolean removeUserRole(@RequestParam("userId") String userId,
public @ResponseBody Boolean removeUserRole(@RequestParam("userID") String userId,
@RequestBody List<String> roleIdList, @RequestParam("serviceTypeId") String serviceTypeId) {
roleService.removeUserRole(userId, roleIdList, serviceTypeId);
return true;
......@@ -106,7 +106,7 @@ public class RoleController {
@ApiOperation(value = "增加角色分类")
@RequestMapping(value = "addRoleCategory", method = RequestMethod.GET)
public @ResponseBody Boolean addRoleCategory(@RequestParam("name") String roleCategoryName,
@RequestParam("roleCategoryId") String roleCategoryId) {
@RequestParam("roleCategoryID") String roleCategoryId) {
roleService.addRoleCategory(roleCategoryName, roleCategoryId);
return true;
}
......@@ -209,7 +209,7 @@ public class RoleController {
@ApiOperation(value = "用户详情页面,增加机构")
@RequestMapping(value = "updateUserOrg", method = RequestMethod.POST)
public Boolean updateUserOrg(@RequestBody List<String> orgIdList, @RequestParam("userId") String userId) {
public Boolean updateUserOrg(@RequestBody List<String> orgIdList, @RequestParam("userID") String userId) {
roleService.updateUserOrg(orgIdList, userId);
return true;
......
......@@ -87,8 +87,8 @@ public class UserController {
}
@ApiOperation(value = "通过传入的用户Id获取该用户所有的角色", notes = "通过用户获取可访问不可访问的所有机构,包括维度上继承下来的")
@RequestMapping(value = "getUserRoleByUserId", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OrgRoleDtoList getUserRoleByUserId(@RequestParam("userId") String userId) {
@RequestMapping(value = "getUserRoleByUserID", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OrgRoleDtoList getUserRoleByUserId(@RequestParam("userID") String userId) {
return userRoleService.getUserRoleByUserId(userId);
}
......
......@@ -22,7 +22,7 @@ public class CustomerDto {
}
public void setId(String id) {
id = id;
this.id = id;
}
public String getCode() {
......
......@@ -18,17 +18,12 @@ import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.constant.EnterpriseAccountConstant;
import pwc.taxtech.atms.constant.IndustryConstant;
import pwc.taxtech.atms.constant.enums.AccountRuleEnum;
import pwc.taxtech.atms.dao.AccountMappingManualMapper;
import pwc.taxtech.atms.dao.AccountMappingManualDao;
import pwc.taxtech.atms.dao.EnterpriseAccountDao;
import pwc.taxtech.atms.dao.EnterpriseAccountSetOrgDao;
import pwc.taxtech.atms.dao.StandardAccountDao;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dpo.EnterpriseAccountDto;
import pwc.taxtech.atms.dto.OperationLogDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.UpdateLogParams;
import pwc.taxtech.atms.dto.ValidateInfoDto;
import pwc.taxtech.atms.dao.AccountMappingDao;
import pwc.taxtech.atms.dto.accountmapping.AccountMappingManualDto;
import pwc.taxtech.atms.dto.epaccount.AccountMapDto;
import pwc.taxtech.atms.dto.epaccount.AccountMappingDto;
......@@ -65,7 +60,9 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
private AccountMappingDao accountMappingDao;
@Autowired
private AccountMappingManualMapper mappingManualMapper;
@Autowired
private OrganizationMapper organizationMapper;
private Map<String, List<String>> mapParentAccountResult;
......@@ -225,7 +222,8 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
this.mapParentAccountResult = new HashMap<>();
for(EnterpriseAccountSetOrg accountSetOrg : accountSetOrgList) {
mapAccountUpdateParent(epAccountCodeList, accountSetOrg.getEnterpriseAccountSetId(), getConvertedIndustryId(accountSetOrg.getOrganization().getIndustryId()), accountSetOrg.getOrganizationId(), true);
String industryId = organizationMapper.selectByPrimaryKey(accountSetOrg.getOrganizationId()).getIndustryId();
mapAccountUpdateParent(epAccountCodeList, accountSetOrg.getEnterpriseAccountSetId(), getConvertedIndustryId(industryId), accountSetOrg.getOrganizationId(), true);
}
//get enterprise set name
......
......@@ -152,7 +152,7 @@ public class UserRoleServiceImpl extends AbstractService implements UserRoleServ
}
}
orgRoleInfoList.add(generateOrganizationRoleInfo(userOrg.get("organizationId").toString(),
orgRoleInfoList.add(generateOrganizationRoleInfo(userOrg.get("organizationID").toString(),
userOrg.get("organizationName").toString(), DimensionConstant.OriginalRoleDimensionValueId,
DimensionConstant.OriginalRole, hasOriginalRole, isAccessible, roleInfoList, userId));
List<RoleInfo> roleInfoList1 = new ArrayList<>();
......
......@@ -18,8 +18,8 @@ import pwc.taxtech.atms.entity.UserOrganization;
public interface MyUserMapper extends MyMapper {
@Select("select ur.id as id, ur.Is_Accessible as IsAccessible, ur.Has_Original_Role as HasOriginalRole, "
+ "org.id as OrganizationID, org.Name as OrganizationName from User_Organization ur "
+ "join \"Organization\" org on ur.Organization_ID = org.id "
+ "org.id as OrganizationID, org.Name as OrganizationName from USER_ORGANIZATION ur "
+ "join \"ORGANIZATION\" org on ur.Organization_ID = org.id "
+ "where ur.User_ID = #{userId} and org.Is_Active = 1")
@Results({ @Result(id = true, column = "id", property = "id"),
@Result(column = "IsAccessible", property = "isAccessible", javaType = Boolean.class),
......@@ -29,7 +29,7 @@ public interface MyUserMapper extends MyMapper {
List<Map<String, Object>> selectUserOrganizationMapByUserId(@Param(value = "userId") String userId);
@Select("select urd.id, urd.Dimension_Value_ID, urd.Dimension_ID, urd.User_ID, urd.Is_Accessible, urd.Has_Original_Role, u.User_Name "
+ "from User_Dimension_Value urd " + "join \"User\" u on urd.UserID = u.id " + "where u.Status = 1")
+ "from USER_DIMENSION_VALUE urd " + "join \"USER\" u on urd.USER_ID = u.id " + "where u.Status = 1")
@Results({ @Result(id = true, column = "id", property = "id"),
@Result(column = "Dimension_Value_ID", property = "dimensionValueID", javaType = String.class),
@Result(column = "Dimension_ID", property = "dimensionId", javaType = String.class),
......@@ -39,13 +39,13 @@ public interface MyUserMapper extends MyMapper {
@Result(column = "User_Name", property = "userName", javaType = String.class) })
List<Map<String, Object>> selectUserDimensionValueMap();
@Select("select x.Role_ID, y.Name as RoleName from User_Role x " + "join Role y on x.Role_ID = y.id "
@Select("select x.Role_ID, y.Name as RoleName from USER_ROLE x " + "join ROLE y on x.Role_ID = y.id "
+ "where x.User_ID = #{userId} and x.Project_ID is NULL")
@Results({ @Result(column = "Role_ID", property = "roleID", javaType = String.class),
@Result(column = "RoleName", property = "roleName", javaType = String.class) })
List<Map<String, String>> selectUserRoleListByUserId(@Param(value = "userId") String userId);
@Select("select q.id, q.Organization_ID, q.User_ID, q.Is_Accessible, q.Has_Original_Role from User_Organization q join \"User\" u on q.User_ID = u.id "
@Select("select q.id, q.Organization_ID, q.User_ID, q.Is_Accessible, q.Has_Original_Role from USER_ORGANIZATION q join \"USER\" u on q.User_ID = u.id "
+ "where u.Status = 1")
@Results({ @Result(id = true, column = "id", property = "id"),
@Result(column = "Organization_ID", property = "organizationID"),
......@@ -56,9 +56,9 @@ public interface MyUserMapper extends MyMapper {
@Select("select p.Dimension_Value_ID, p.Dimension_ID, d.Name as DimensionName, p.Dimension_Value_Name as Dimension_Value "
+ "from (select id as Dimension_Value_ID, Name as Dimension_Value_Name, Is_Active, #{dimensionId} as Dimension_ID, "
+ "Create_Time, Update_Time from Business_Unit where Is_Active = 1 " + "union "
+ "Create_Time, Update_Time from BUSINESS_UNIT where Is_Active = 1 " + "union "
+ "select id as DimensionValueID, Name as DimensionValueName, Is_Active, Dimension_ID, Create_Time, Update_Time "
+ "from Dimension_Value) p " + "join Dimension d on p.Dimension_ID = d.id " + "where d.Is_Active = 1")
+ "from DIMENSION_VALUE) p " + "join DIMENSION d on p.Dimension_ID = d.id " + "where d.Is_Active = 1")
@Results({ @Result(column = "DimensionValueID", property = "dimensionValueID"),
@Result(column = "DimensionID", property = "dimensionId"),
@Result(column = "DimensionName", property = "dimensionName"),
......@@ -67,7 +67,7 @@ public interface MyUserMapper extends MyMapper {
@Param(value = "dimensionId") String dimensionId);
@Select("select urd.id, urd.Organization_ID as OrgID, urd.User_ID, urd.Is_Accessible, urd.Has_Original_Role, u.User_Name as UserName "
+ "from User_Organization urd join \"User\" u on urd.User_ID = u.id where u.Status = 1")
+ "from USER_ORGANIZATION urd join \"USER\" u on urd.User_ID = u.id where u.Status = 1")
@Results({ @Result(id = true, column = "id", property = "id"),
@Result(column = "OrgID", property = "orgID", javaType = String.class),
@Result(column = "User_ID", property = "userID", javaType = String.class),
......
......@@ -144,8 +144,8 @@ public interface UserMapper extends MyMapper {
@Select("select u.USER_NAME as UserName, o.id as Organization_ID, o.Name as OrganizationName, "
+ "u.EMAIL as Email, u.STATUS as Status, u.ATTEMPT_TIMES as AttemptTimes, u.CREATE_TIME as CreateTime, "
+ "u.EXPIRATION_DATE as ExpirationDate, u.IS_ADMIN as IsAdmin, u.ID as id, u.LOCKED_TIME as LockedTime, "
+ "u.LOGIN_TYPE as LoginType, u.PASSWORD as Password, u.PASSWORD_UPDATE_TIME as Password_UpdateTime, u.UPDATE_TIME as UpdateTime from \"USER\" "
+ "left join ORGANIZATION o on u.ORGANIZATIONID = o.id "
+ "u.LOGIN_TYPE as LoginType, u.PASSWORD as Password, u.PASSWORD_UPDATE_TIME as Password_UpdateTime, u.UPDATE_TIME as UpdateTime from \"USER\" u "
+ "left join ORGANIZATION o on u.ORGANIZATION_ID = o.id "
+ "where u.ID = #{userId}")
List<UserDto> selectUserWithOrgInfoById(@Param(value = "userId") String userId);
......
......@@ -113,6 +113,6 @@ public interface UserOrganizationRoleMapper extends MyMapper {
@Select("SELECT USER_ORGANIZATION.USER_ID FROM USER_ORGANIZATION_ROLE "
+ "JOIN USER_ORGANIZATION ON USER_ORGANIZATION_ROLE.USER_ORGANIZATION_ID = USER_ORGANIZATION.ID "
+ "WHERE USER_ORGANIZATION_ROLE.ROLEID=#{roleId}")
+ "WHERE USER_ORGANIZATION_ROLE.ROLE_ID=#{roleId}")
List<String> getUserIdByUserOrganizationRole(@Param("roleId") String roleId);
}
\ No newline at end of file
......@@ -43,7 +43,7 @@ public class RoleInfo {
}
public void setId(String id) {
id = id;
this.id = id;
}
public String getName() {
......
......@@ -8,7 +8,7 @@ public class UserRoleInfo {
/// 用户Id
/// The identifier.
@JsonProperty("ID")
// @JsonProperty("ID")
private String id;
/// 用户名
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.dao.AreaMapper">
<select id="selectTopAreas" resultMap="BaseResultMap">
select distinct
<include refid="Base_Column_List" />
from AREA
where PARENT_ID is null
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.dao.OperationLogBasicDataMapper">
<!-- TODO Remove below codes about selectByLimit -->
<select id="selectByLimit" resultMap="BaseResultMap">
SELECT top ${pagesize} *
from OPERATION_LOG_BASIC_DATA
where ID not in (
select top (${pagesize} * (${pageindex} -1)) ID from OPERATION_LOG_BASIC_DATA
)
order by ID
</select>
<insert id="insertSmart" parameterType="pwc.taxtech.atms.entity.OperationLogSmart">
insert into ${tableName}
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="operationContent != null">
OPERATION_CONTENT,
</if>
<if test="moduleName != null">
MODULE_NAME,
</if>
<if test="operationObject != null">
OPERATION_OBJECT,
</if>
<if test="operationAction != null">
OPERATION_ACTION,
</if>
<if test="originalState != null">
ORIGINAL_STATE,
</if>
<if test="updateState != null">
UPDATE_STATE,
</if>
<if test="operationUser != null">
OPERATION_USER,
</if>
<if test="ip != null">
IP,
</if>
<if test="comment != null">
"COMMENT",
</if>
<if test="createTime != null">
CREATE_TIME
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="operationContent != null">
#{operationContent,jdbcType=VARCHAR},
</if>
<if test="moduleName != null">
#{moduleName,jdbcType=VARCHAR},
</if>
<if test="operationObject != null">
#{operationObject,jdbcType=VARCHAR},
</if>
<if test="operationAction != null">
#{operationAction,jdbcType=VARCHAR},
</if>
<if test="originalState != null">
#{originalState,jdbcType=VARCHAR},
</if>
<if test="updateState != null">
#{updateState,jdbcType=VARCHAR},
</if>
<if test="operationUser != null">
#{operationUser,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="comment != null">
#{comment,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}
</if>
</trim>
</insert>
<select id="countByExampleSmart" parameterType="pwc.taxtech.atms.entity.OperationLogSmartExample" resultType="java.lang.Long">
select count(*) from ${tableName}
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<select id="selectByExampleWithRowboundsSmart" parameterType="pwc.taxtech.atms.entity.OperationLogSmartExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from ${tableName}
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -108,7 +108,7 @@
on
p.ID = rp.PERMISSION_ID
where
r.SERVICE_TYPE_ID= #{serviceTypeID,jdbcType=VARCHAR}
r.SERVICE_TYPE_ID= #{serviceTypeId,jdbcType=VARCHAR}
AND RP.ROLE_ID in
<foreach close=")" collection="roleList" index="index" item="roleID" open="(" separator=",">
#{roleID}
......
......@@ -3519,7 +3519,7 @@ basicDataModule
$scope.editFocusedRow = function(data) {
$scope.isEdit = true;
$scope.editingObject = { ID: data.id, Name: data.name, IsActive: data.isActive };
$scope.editingObject = { ID: data.ID, Name: data.name, IsActive: data.isActive };
$(editModalSelector).modal('show');
};
......@@ -4094,7 +4094,7 @@ basicDataModule
$scope.editFocusedRow = function(data) {
$scope.isEdit = true;
$scope.editingObject = { ID: data.id, name: data.name, IsActive: data.isActive };
$scope.editingObject = { ID: data.ID, name: data.name, IsActive: data.isActive };
$(editModalSelector).modal('show');
};
......
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