Commit 9ce17d43 authored by frank.xa.zhang's avatar frank.xa.zhang

Merge branch 'dev_oracle' of http://code.tech.tax.asia.pwcinternal.com/root/atms…

Merge branch 'dev_oracle' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_oracle_frank
parents 4895f6c9 b6852629
...@@ -3,39 +3,42 @@ package pwc.taxtech.atms.common; ...@@ -3,39 +3,42 @@ package pwc.taxtech.atms.common;
public enum OperateLogType { public enum OperateLogType {
/***/ /***/
UnKnown(-1), UnKnown(null, -1),
/***/ /***/
OperationLogOrganization(0), OperationLogOrganization("OPERATION_LOG_ORGANIZATION", 0),
/***/ /***/
OperationLogUser(1), OperationLogUser("OPERATION_LOG_USER", 1),
/***/ /***/
OperationLogProject(2), OperationLogProject("OPERATION_LOG_PROJECT", 2),
/***/ /***/
OperationLogBasicData(3), OperationLogBasicData("OPERATION_LOG_BASIC_DATA", 3),
/***/ /***/
OperationLogReport(4), OperationLogReport("OPERATION_LOG_REPORT", 4),
/***/ /***/
OperationLogEnterPrise(5), OperationLogEnterPrise("OPERATION_LOG_ENTER_PRISE", 5),
/***/ /***/
OperationLogSubject(6), OperationLogSubject("OPERATION_LOG_SUBJECT", 6),
/***/ /***/
OperationLogRole(7), OperationLogRole("OPERATION_LOG_ROLE", 7),
/***/ /***/
OperationLogModelConfiguration(8), OperationLogModelConfiguration("OPERATION_LOG_MODEL_CONFIGURATION", 8),
/***/ /***/
OperationLogRuleEngine(9), OperationLogRuleEngine("OPERATION_LOG_RULE_ENGINE", 9),
/***/ /***/
OperationLogKeyvalue(10), OperationLogKeyvalue("OPERATION_LOG_KEYVALUE", 10),
/***/ /***/
OperationLogWorkflow(11), OperationLogWorkflow("OPERATION_LOG_WORK_FLOW", 11),
/***/ /***/
OperationLogStock(12), OperationLogStock("OPERATION_LOG_STOCK", 12),
/***/ /***/
; ;
/***/ /***/
private Integer value; private Integer value;
OperateLogType(Integer value) { private String name;
OperateLogType(String name, Integer value) {
this.name = name;
this.value = value; this.value = value;
} }
...@@ -43,6 +46,17 @@ public enum OperateLogType { ...@@ -43,6 +46,17 @@ public enum OperateLogType {
return value; return value;
} }
public String tableName(){return name;}
public static String getTableName(Integer value) {
for (OperateLogType type : OperateLogType.values()) {
if (type.value().intValue() == value.intValue()) {
return type.tableName();
}
}
return null;
}
public static String getName(Integer value) { public static String getName(Integer value) {
for (OperateLogType type : OperateLogType.values()) { for (OperateLogType type : OperateLogType.values()) {
if (type.value().intValue() == value.intValue()) { if (type.value().intValue() == value.intValue()) {
......
...@@ -122,7 +122,7 @@ public class OrganizationController { ...@@ -122,7 +122,7 @@ public class OrganizationController {
@ApiOperation(value = "获取机构上层维度") @ApiOperation(value = "获取机构上层维度")
@RequestMapping(value = "getOrgBuAreaIndustryUser", method = RequestMethod.GET) @RequestMapping(value = "getOrgBuAreaIndustryUser", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<DimensionRoleDto> getOrgBuAreaIndustryUser(@RequestParam("userId") String userId) { List<DimensionRoleDto> getOrgBuAreaIndustryUser(@RequestParam("userID") String userId) {
logger.info("POST /api/v1/org/getOrgBuAreaIndustryUser"); logger.info("POST /api/v1/org/getOrgBuAreaIndustryUser");
return userRoleService.getOrgBuAreaIndustryUser(userId); return userRoleService.getOrgBuAreaIndustryUser(userId);
} }
......
...@@ -63,9 +63,9 @@ public class RoleController { ...@@ -63,9 +63,9 @@ public class RoleController {
} }
@ApiOperation(value = "通过传入的用户Id获取该用户的所有角色") @ApiOperation(value = "通过传入的用户Id获取该用户的所有角色")
@RequestMapping(value = "getAllRoleListByUserId", method = RequestMethod.GET) @RequestMapping(value = "getAllRoleListByUserID", method = RequestMethod.GET)
public @ResponseBody List<UserRoleDto> getAllRoleListByUserId(@RequestParam("userId") String userId, public @ResponseBody List<UserRoleDto> getAllRoleListByUserId(@RequestParam("userID") String userId,
@RequestParam("serviceTypeId") String serviceTypeId) { @RequestParam("serviceTypeID") String serviceTypeId) {
logger.debug("RoleController getAllRoleListByUserId"); logger.debug("RoleController getAllRoleListByUserId");
return roleService.getAllRoleListByUserId(userId, serviceTypeId); return roleService.getAllRoleListByUserId(userId, serviceTypeId);
} }
...@@ -91,7 +91,7 @@ public class RoleController { ...@@ -91,7 +91,7 @@ public class RoleController {
@ApiOperation(value = "删除角色下用户") @ApiOperation(value = "删除角色下用户")
@RequestMapping(value = "removeUserRole", method = RequestMethod.POST) @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) { @RequestBody List<String> roleIdList, @RequestParam("serviceTypeId") String serviceTypeId) {
roleService.removeUserRole(userId, roleIdList, serviceTypeId); roleService.removeUserRole(userId, roleIdList, serviceTypeId);
return true; return true;
...@@ -106,7 +106,7 @@ public class RoleController { ...@@ -106,7 +106,7 @@ public class RoleController {
@ApiOperation(value = "增加角色分类") @ApiOperation(value = "增加角色分类")
@RequestMapping(value = "addRoleCategory", method = RequestMethod.GET) @RequestMapping(value = "addRoleCategory", method = RequestMethod.GET)
public @ResponseBody Boolean addRoleCategory(@RequestParam("name") String roleCategoryName, public @ResponseBody Boolean addRoleCategory(@RequestParam("name") String roleCategoryName,
@RequestParam("roleCategoryId") String roleCategoryId) { @RequestParam("roleCategoryID") String roleCategoryId) {
roleService.addRoleCategory(roleCategoryName, roleCategoryId); roleService.addRoleCategory(roleCategoryName, roleCategoryId);
return true; return true;
} }
...@@ -209,7 +209,7 @@ public class RoleController { ...@@ -209,7 +209,7 @@ public class RoleController {
@ApiOperation(value = "用户详情页面,增加机构") @ApiOperation(value = "用户详情页面,增加机构")
@RequestMapping(value = "updateUserOrg", method = RequestMethod.POST) @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); roleService.updateUserOrg(orgIdList, userId);
return true; return true;
......
...@@ -87,8 +87,8 @@ public class UserController { ...@@ -87,8 +87,8 @@ public class UserController {
} }
@ApiOperation(value = "通过传入的用户Id获取该用户所有的角色", notes = "通过用户获取可访问不可访问的所有机构,包括维度上继承下来的") @ApiOperation(value = "通过传入的用户Id获取该用户所有的角色", notes = "通过用户获取可访问不可访问的所有机构,包括维度上继承下来的")
@RequestMapping(value = "getUserRoleByUserId", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "getUserRoleByUserID", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OrgRoleDtoList getUserRoleByUserId(@RequestParam("userId") String userId) { public OrgRoleDtoList getUserRoleByUserId(@RequestParam("userID") String userId) {
return userRoleService.getUserRoleByUserId(userId); return userRoleService.getUserRoleByUserId(userId);
} }
......
...@@ -22,7 +22,7 @@ public class CustomerDto { ...@@ -22,7 +22,7 @@ public class CustomerDto {
} }
public void setId(String id) { public void setId(String id) {
id = id; this.id = id;
} }
public String getCode() { public String getCode() {
......
...@@ -56,12 +56,12 @@ public class AreaServiceImpl implements AreaService { ...@@ -56,12 +56,12 @@ public class AreaServiceImpl implements AreaService {
@Override @Override
public List<Area> findTopAreas() { public List<Area> findTopAreas() {
AreaExample areaExample = new AreaExample(); // AreaExample areaExample = new AreaExample();
Criteria criteria = areaExample.createCriteria(); // Criteria criteria = areaExample.createCriteria();
// criteria.andParentIdIsNull(); //// criteria.andParentIdIsNull();
criteria.andParentIdEqualTo(StringUtils.EMPTY); // criteria.andParentIdEqualTo(StringUtils.EMPTY);
return areaMapper.selectByExample(areaExample); return areaMapper.selectTopAreas();
} }
......
...@@ -18,17 +18,12 @@ import pwc.taxtech.atms.common.message.LogMessage; ...@@ -18,17 +18,12 @@ import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.constant.EnterpriseAccountConstant; import pwc.taxtech.atms.constant.EnterpriseAccountConstant;
import pwc.taxtech.atms.constant.IndustryConstant; import pwc.taxtech.atms.constant.IndustryConstant;
import pwc.taxtech.atms.constant.enums.AccountRuleEnum; import pwc.taxtech.atms.constant.enums.AccountRuleEnum;
import pwc.taxtech.atms.dao.AccountMappingManualMapper; import pwc.taxtech.atms.dao.*;
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.dpo.EnterpriseAccountDto; import pwc.taxtech.atms.dpo.EnterpriseAccountDto;
import pwc.taxtech.atms.dto.OperationLogDto; import pwc.taxtech.atms.dto.OperationLogDto;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.UpdateLogParams; import pwc.taxtech.atms.dto.UpdateLogParams;
import pwc.taxtech.atms.dto.ValidateInfoDto; import pwc.taxtech.atms.dto.ValidateInfoDto;
import pwc.taxtech.atms.dao.AccountMappingDao;
import pwc.taxtech.atms.dto.accountmapping.AccountMappingManualDto; import pwc.taxtech.atms.dto.accountmapping.AccountMappingManualDto;
import pwc.taxtech.atms.dto.epaccount.AccountMapDto; import pwc.taxtech.atms.dto.epaccount.AccountMapDto;
import pwc.taxtech.atms.dto.epaccount.AccountMappingDto; import pwc.taxtech.atms.dto.epaccount.AccountMappingDto;
...@@ -65,7 +60,9 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -65,7 +60,9 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
private AccountMappingDao accountMappingDao; private AccountMappingDao accountMappingDao;
@Autowired @Autowired
private AccountMappingManualMapper mappingManualMapper; private AccountMappingManualMapper mappingManualMapper;
@Autowired
private OrganizationMapper organizationMapper;
private Map<String, List<String>> mapParentAccountResult; private Map<String, List<String>> mapParentAccountResult;
...@@ -225,7 +222,8 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent ...@@ -225,7 +222,8 @@ public class EnterpriseAccountServiceImpl extends AbstractService implements Ent
this.mapParentAccountResult = new HashMap<>(); this.mapParentAccountResult = new HashMap<>();
for(EnterpriseAccountSetOrg accountSetOrg : accountSetOrgList) { 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 //get enterprise set name
......
...@@ -51,7 +51,7 @@ public class OperationLogServiceImpl extends AbstractService implements Operatio ...@@ -51,7 +51,7 @@ public class OperationLogServiceImpl extends AbstractService implements Operatio
OperationLogSmart record = new OperationLogSmart(); OperationLogSmart record = new OperationLogSmart();
Integer logtype = operationLogDto.getLogType(); Integer logtype = operationLogDto.getLogType();
Assert.notNull(logtype, "Null logType"); Assert.notNull(logtype, "Null logType");
String table = OperateLogType.getName(logtype); String table = OperateLogType.getTableName(logtype);
Assert.hasText(table, "Empty tableName"); Assert.hasText(table, "Empty tableName");
record.setTableName(table); record.setTableName(table);
......
...@@ -136,7 +136,7 @@ public class ProjectServiceImpl implements ProjectService { ...@@ -136,7 +136,7 @@ public class ProjectServiceImpl implements ProjectService {
List<ProjectDisplayDto> data = projectMapper.getProjectList(orgId, serviceId, projectYear); List<ProjectDisplayDto> data = projectMapper.getProjectList(orgId, serviceId, projectYear);
//获取每个项目的项目状态 //获取每个项目的项目状态
data.forEach(p -> { data.forEach(p -> {
List<ProjectStatusManage> manageStatus = projectMapper.getProjectSatusListByDbName(p.getDbName()); List<ProjectStatusManage> manageStatus = projectMapper.getProjectSatusListByDbName(p.getId());
Map<Integer, Integer> dic = new HashMap<>(); Map<Integer, Integer> dic = new HashMap<>();
manageStatus.forEach(m -> { manageStatus.forEach(m -> {
dic.put(m.getPeriodId(), m.getStatus()); dic.put(m.getPeriodId(), m.getStatus());
......
...@@ -152,7 +152,7 @@ public class UserRoleServiceImpl extends AbstractService implements UserRoleServ ...@@ -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, userOrg.get("organizationName").toString(), DimensionConstant.OriginalRoleDimensionValueId,
DimensionConstant.OriginalRole, hasOriginalRole, isAccessible, roleInfoList, userId)); DimensionConstant.OriginalRole, hasOriginalRole, isAccessible, roleInfoList, userId));
List<RoleInfo> roleInfoList1 = new ArrayList<>(); List<RoleInfo> roleInfoList1 = new ArrayList<>();
......
...@@ -105,4 +105,11 @@ public interface AreaMapper extends MyMapper { ...@@ -105,4 +105,11 @@ public interface AreaMapper extends MyMapper {
* @mbg.generated * @mbg.generated
*/ */
int updateByPrimaryKey(Area record); int updateByPrimaryKey(Area record);
/**
* This method corresponds to the database table TAX_ADMIN.AREA
*
* @Sherlock
*/
List<Area> selectTopAreas();
} }
\ No newline at end of file
...@@ -18,8 +18,8 @@ import pwc.taxtech.atms.entity.UserOrganization; ...@@ -18,8 +18,8 @@ import pwc.taxtech.atms.entity.UserOrganization;
public interface MyUserMapper extends MyMapper { public interface MyUserMapper extends MyMapper {
@Select("select ur.id as id, ur.Is_Accessible as IsAccessible, ur.Has_Original_Role as HasOriginalRole, " @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 " + "org.id as OrganizationID, org.Name as OrganizationName from USER_ORGANIZATION ur "
+ "join \"Organization\" org on ur.Organization_ID = org.id " + "join \"ORGANIZATION\" org on ur.Organization_ID = org.id "
+ "where ur.User_ID = #{userId} and org.Is_Active = 1") + "where ur.User_ID = #{userId} and org.Is_Active = 1")
@Results({ @Result(id = true, column = "id", property = "id"), @Results({ @Result(id = true, column = "id", property = "id"),
@Result(column = "IsAccessible", property = "isAccessible", javaType = Boolean.class), @Result(column = "IsAccessible", property = "isAccessible", javaType = Boolean.class),
...@@ -29,7 +29,7 @@ public interface MyUserMapper extends MyMapper { ...@@ -29,7 +29,7 @@ public interface MyUserMapper extends MyMapper {
List<Map<String, Object>> selectUserOrganizationMapByUserId(@Param(value = "userId") String userId); 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 " @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"), @Results({ @Result(id = true, column = "id", property = "id"),
@Result(column = "Dimension_Value_ID", property = "dimensionValueID", javaType = String.class), @Result(column = "Dimension_Value_ID", property = "dimensionValueID", javaType = String.class),
@Result(column = "Dimension_ID", property = "dimensionId", javaType = String.class), @Result(column = "Dimension_ID", property = "dimensionId", javaType = String.class),
...@@ -39,13 +39,13 @@ public interface MyUserMapper extends MyMapper { ...@@ -39,13 +39,13 @@ public interface MyUserMapper extends MyMapper {
@Result(column = "User_Name", property = "userName", javaType = String.class) }) @Result(column = "User_Name", property = "userName", javaType = String.class) })
List<Map<String, Object>> selectUserDimensionValueMap(); 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") + "where x.User_ID = #{userId} and x.Project_ID is NULL")
@Results({ @Result(column = "Role_ID", property = "roleID", javaType = String.class), @Results({ @Result(column = "Role_ID", property = "roleID", javaType = String.class),
@Result(column = "RoleName", property = "roleName", javaType = String.class) }) @Result(column = "RoleName", property = "roleName", javaType = String.class) })
List<Map<String, String>> selectUserRoleListByUserId(@Param(value = "userId") String userId); 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") + "where u.Status = 1")
@Results({ @Result(id = true, column = "id", property = "id"), @Results({ @Result(id = true, column = "id", property = "id"),
@Result(column = "Organization_ID", property = "organizationID"), @Result(column = "Organization_ID", property = "organizationID"),
...@@ -56,9 +56,9 @@ public interface MyUserMapper extends MyMapper { ...@@ -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 " @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, " + "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 " + "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"), @Results({ @Result(column = "DimensionValueID", property = "dimensionValueID"),
@Result(column = "DimensionID", property = "dimensionId"), @Result(column = "DimensionID", property = "dimensionId"),
@Result(column = "DimensionName", property = "dimensionName"), @Result(column = "DimensionName", property = "dimensionName"),
...@@ -67,7 +67,7 @@ public interface MyUserMapper extends MyMapper { ...@@ -67,7 +67,7 @@ public interface MyUserMapper extends MyMapper {
@Param(value = "dimensionId") String dimensionId); @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 " @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"), @Results({ @Result(id = true, column = "id", property = "id"),
@Result(column = "OrgID", property = "orgID", javaType = String.class), @Result(column = "OrgID", property = "orgID", javaType = String.class),
@Result(column = "User_ID", property = "userID", javaType = String.class), @Result(column = "User_ID", property = "userID", javaType = String.class),
......
...@@ -224,11 +224,11 @@ public interface ProjectMapper extends MyMapper { ...@@ -224,11 +224,11 @@ public interface ProjectMapper extends MyMapper {
List<ProjectDisplayDto> getProjectFromEnterpriseAccountSetOrg(@Param("orgId") String orgId, @Param("serviceId") String serviceId); List<ProjectDisplayDto> getProjectFromEnterpriseAccountSetOrg(@Param("orgId") String orgId, @Param("serviceId") String serviceId);
@Select("SELECT " + @Select("SELECT " +
" PERIOD_ID,Status " + " PERIOD_ID AS periodId, STATUS AS status " +
"FROM " + "FROM " +
" PROJECT_STATUS_MANAGE p " + " PROJECT_STATUS_MANAGE p " +
"WHERE " + "WHERE " +
" p.PROJECT_ID = #{projectID} " + " p.PROJECT_ID = #{projectId} " +
"ORDER BY PERIOD_ID , STATUS") "ORDER BY PERIOD_ID , STATUS")
List<ProjectStatusManage> selectProjectAllStatus(String projectId); List<ProjectStatusManage> selectProjectAllStatus(String projectId);
......
...@@ -144,8 +144,8 @@ public interface UserMapper extends MyMapper { ...@@ -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, " @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.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.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\" " + "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.ORGANIZATIONID = o.id " + "left join ORGANIZATION o on u.ORGANIZATION_ID = o.id "
+ "where u.ID = #{userId}") + "where u.ID = #{userId}")
List<UserDto> selectUserWithOrgInfoById(@Param(value = "userId") String userId); List<UserDto> selectUserWithOrgInfoById(@Param(value = "userId") String userId);
......
...@@ -113,6 +113,6 @@ public interface UserOrganizationRoleMapper extends MyMapper { ...@@ -113,6 +113,6 @@ public interface UserOrganizationRoleMapper extends MyMapper {
@Select("SELECT USER_ORGANIZATION.USER_ID FROM USER_ORGANIZATION_ROLE " @Select("SELECT USER_ORGANIZATION.USER_ID FROM USER_ORGANIZATION_ROLE "
+ "JOIN USER_ORGANIZATION ON USER_ORGANIZATION_ROLE.USER_ORGANIZATION_ID = USER_ORGANIZATION.ID " + "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); List<String> getUserIdByUserOrganizationRole(@Param("roleId") String roleId);
} }
\ No newline at end of file
...@@ -43,7 +43,7 @@ public class RoleInfo { ...@@ -43,7 +43,7 @@ public class RoleInfo {
} }
public void setId(String id) { public void setId(String id) {
id = id; this.id = id;
} }
public String getName() { public String getName() {
......
...@@ -8,7 +8,7 @@ public class UserRoleInfo { ...@@ -8,7 +8,7 @@ public class UserRoleInfo {
/// 用户Id /// 用户Id
/// The identifier. /// The identifier.
@JsonProperty("ID") // @JsonProperty("ID")
private String id; private String id;
/// 用户名 /// 用户名
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
--> -->
insert into BUSINESS_UNIT (ID, "NAME", IS_ACTIVE, insert into BUSINESS_UNIT (ID, "NAME", IS_ACTIVE,
CREATE_TIME, UPDATE_TIME) CREATE_TIME, UPDATE_TIME)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{isActive,jdbcType=DECIMAL}, values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{isActive,jdbcType=DECIMAL},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.BusinessUnit"> <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.BusinessUnit">
......
<?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 @@ ...@@ -108,7 +108,7 @@
on on
p.ID = rp.PERMISSION_ID p.ID = rp.PERMISSION_ID
where where
r.SERVICE_TYPE_ID= #{serviceTypeID,jdbcType=VARCHAR} r.SERVICE_TYPE_ID= #{serviceTypeId,jdbcType=VARCHAR}
AND RP.ROLE_ID in AND RP.ROLE_ID in
<foreach close=")" collection="roleList" index="index" item="roleID" open="(" separator=","> <foreach close=")" collection="roleList" index="index" item="roleID" open="(" separator=",">
#{roleID} #{roleID}
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
$scope.editFocusedRow = function(data) { $scope.editFocusedRow = function(data) {
$scope.isEdit = true; $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'); $(editModalSelector).modal('show');
}; };
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
} }
if ($scope.isEdit) { if ($scope.isEdit) {
businessUnitService.updateBusinessUnit(businessUnitArray).success(successedFun); businessUnitService.updateBusinessUnit(businessUnitArray).success(successedFun);
} else { } else {
......
...@@ -3519,7 +3519,7 @@ basicDataModule ...@@ -3519,7 +3519,7 @@ basicDataModule
$scope.editFocusedRow = function(data) { $scope.editFocusedRow = function(data) {
$scope.isEdit = true; $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'); $(editModalSelector).modal('show');
}; };
...@@ -4094,7 +4094,7 @@ basicDataModule ...@@ -4094,7 +4094,7 @@ basicDataModule
$scope.editFocusedRow = function(data) { $scope.editFocusedRow = function(data) {
$scope.isEdit = true; $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'); $(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