Commit 1b4f6905 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

basicData module test and correct

See merge request root/atms!116
parents d3c9c6c5 79e70f8e
......@@ -3,39 +3,42 @@ package pwc.taxtech.atms.common;
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;
OperateLogType(Integer value) {
private String name;
OperateLogType(String name, Integer value) {
this.name = name;
this.value = value;
}
......@@ -43,6 +46,17 @@ public enum OperateLogType {
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) {
for (OperateLogType type : OperateLogType.values()) {
if (type.value().intValue() == value.intValue()) {
......
......@@ -56,12 +56,12 @@ public class AreaServiceImpl implements AreaService {
@Override
public List<Area> findTopAreas() {
AreaExample areaExample = new AreaExample();
Criteria criteria = areaExample.createCriteria();
// criteria.andParentIdIsNull();
criteria.andParentIdEqualTo(StringUtils.EMPTY);
// AreaExample areaExample = new AreaExample();
// Criteria criteria = areaExample.createCriteria();
//// criteria.andParentIdIsNull();
// criteria.andParentIdEqualTo(StringUtils.EMPTY);
return areaMapper.selectByExample(areaExample);
return areaMapper.selectTopAreas();
}
......
......@@ -51,7 +51,7 @@ public class OperationLogServiceImpl extends AbstractService implements Operatio
OperationLogSmart record = new OperationLogSmart();
Integer logtype = operationLogDto.getLogType();
Assert.notNull(logtype, "Null logType");
String table = OperateLogType.getName(logtype);
String table = OperateLogType.getTableName(logtype);
Assert.hasText(table, "Empty tableName");
record.setTableName(table);
......
......@@ -105,4 +105,11 @@ public interface AreaMapper extends MyMapper {
* @mbg.generated
*/
int updateByPrimaryKey(Area record);
/**
* This method corresponds to the database table TAX_ADMIN.AREA
*
* @Sherlock
*/
List<Area> selectTopAreas();
}
\ No newline at end of file
......@@ -138,7 +138,7 @@
-->
insert into BUSINESS_UNIT (ID, "NAME", IS_ACTIVE,
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})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.BusinessUnit">
......
......@@ -41,7 +41,7 @@
$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');
};
......@@ -74,6 +74,7 @@
}
if ($scope.isEdit) {
businessUnitService.updateBusinessUnit(businessUnitArray).success(successedFun);
} else {
......
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