Commit 0bd7d9fa authored by Mccoy Z Xia's avatar Mccoy Z Xia

calendar action 相关页面和接口

parent 5b83e87f
......@@ -20,17 +20,17 @@ public class CalendarActionController {
@Autowired
private ICalendarActionService actionServiceImpl;
@PostMapping("saveCalendarAction")
@PostMapping("saveAction")
public OperationResultDto saveCalendarAction(@RequestBody CalendarActionDto dto){
return actionServiceImpl.saveCalendarAction(dto);
}
@GetMapping("getCalendarActionList")
@GetMapping("getActionList")
public OperationResultDto getCalendarActionList(){
return actionServiceImpl.getCalendarActionList();
}
@PostMapping("deleteCalendarAction/{id}")
@GetMapping("deleteAction/{id}")
public OperationResultDto getCalendarDataForDisplay(@PathVariable("id") Long id){
return actionServiceImpl.deleteCalendarAction(id);
}
......
......@@ -27,8 +27,7 @@ public class CalendarActionDto {
private String name;
@JsonSerialize(using = ToStringSerializer.class)
private Long triggerId;
private Integer triggerId;
@JsonSerialize(using = ToStringSerializer.class)
private Long taskTypeId;
......
......@@ -37,7 +37,7 @@ public class CalendarAction extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private Long triggerId;
private Integer triggerId;
/**
*
......@@ -139,7 +139,7 @@ public class CalendarAction extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public Long getTriggerId() {
public Integer getTriggerId() {
return triggerId;
}
......@@ -151,7 +151,7 @@ public class CalendarAction extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public void setTriggerId(Long triggerId) {
public void setTriggerId(Integer triggerId) {
this.triggerId = triggerId;
}
......
......@@ -335,52 +335,52 @@ public class CalendarActionExample {
return (Criteria) this;
}
public Criteria andTriggerIdEqualTo(Long value) {
public Criteria andTriggerIdEqualTo(Integer value) {
addCriterion("trigger_id =", value, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdNotEqualTo(Long value) {
public Criteria andTriggerIdNotEqualTo(Integer value) {
addCriterion("trigger_id <>", value, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdGreaterThan(Long value) {
public Criteria andTriggerIdGreaterThan(Integer value) {
addCriterion("trigger_id >", value, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdGreaterThanOrEqualTo(Long value) {
public Criteria andTriggerIdGreaterThanOrEqualTo(Integer value) {
addCriterion("trigger_id >=", value, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdLessThan(Long value) {
public Criteria andTriggerIdLessThan(Integer value) {
addCriterion("trigger_id <", value, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdLessThanOrEqualTo(Long value) {
public Criteria andTriggerIdLessThanOrEqualTo(Integer value) {
addCriterion("trigger_id <=", value, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdIn(List<Long> values) {
public Criteria andTriggerIdIn(List<Integer> values) {
addCriterion("trigger_id in", values, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdNotIn(List<Long> values) {
public Criteria andTriggerIdNotIn(List<Integer> values) {
addCriterion("trigger_id not in", values, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdBetween(Long value1, Long value2) {
public Criteria andTriggerIdBetween(Integer value1, Integer value2) {
addCriterion("trigger_id between", value1, value2, "triggerId");
return (Criteria) this;
}
public Criteria andTriggerIdNotBetween(Long value1, Long value2) {
public Criteria andTriggerIdNotBetween(Integer value1, Integer value2) {
addCriterion("trigger_id not between", value1, value2, "triggerId");
return (Criteria) this;
}
......
......@@ -8,7 +8,7 @@
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="trigger_id" jdbcType="BIGINT" property="triggerId" />
<result column="trigger_id" jdbcType="INTEGER" property="triggerId" />
<result column="task_type_id" jdbcType="BIGINT" property="taskTypeId" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
......@@ -141,7 +141,7 @@
insert into calendar_action (id, `name`, trigger_id,
task_type_id, `status`, create_time,
update_time)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{triggerId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{triggerId,jdbcType=INTEGER},
#{taskTypeId,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
......@@ -182,7 +182,7 @@
#{name,jdbcType=VARCHAR},
</if>
<if test="triggerId != null">
#{triggerId,jdbcType=BIGINT},
#{triggerId,jdbcType=INTEGER},
</if>
<if test="taskTypeId != null">
#{taskTypeId,jdbcType=BIGINT},
......@@ -222,7 +222,7 @@
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.triggerId != null">
trigger_id = #{record.triggerId,jdbcType=BIGINT},
trigger_id = #{record.triggerId,jdbcType=INTEGER},
</if>
<if test="record.taskTypeId != null">
task_type_id = #{record.taskTypeId,jdbcType=BIGINT},
......@@ -249,7 +249,7 @@
update calendar_action
set id = #{record.id,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
trigger_id = #{record.triggerId,jdbcType=BIGINT},
trigger_id = #{record.triggerId,jdbcType=INTEGER},
task_type_id = #{record.taskTypeId,jdbcType=BIGINT},
`status` = #{record.status,jdbcType=TINYINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
......@@ -269,7 +269,7 @@
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="triggerId != null">
trigger_id = #{triggerId,jdbcType=BIGINT},
trigger_id = #{triggerId,jdbcType=INTEGER},
</if>
<if test="taskTypeId != null">
task_type_id = #{taskTypeId,jdbcType=BIGINT},
......@@ -293,7 +293,7 @@
-->
update calendar_action
set `name` = #{name,jdbcType=VARCHAR},
trigger_id = #{triggerId,jdbcType=BIGINT},
trigger_id = #{triggerId,jdbcType=INTEGER},
task_type_id = #{taskTypeId,jdbcType=BIGINT},
`status` = #{status,jdbcType=TINYINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
......
......@@ -173,7 +173,7 @@
$scope.deleteAction = function (action) {
calendarActionService.deleteCalendarAction(action).success(function (result) {
calendarActionService.deleteCalendarAction(action.id).success(function (result) {
if (result.result) {
SweetAlert.success($translate.instant('CommonSuccess'));
$scope.editActionInstance.dismiss('cancel');
......@@ -208,8 +208,6 @@
var taskTypeList = $scope.taskTypeList;
var jurisdictionList = actionModel.jurisdictionDtoList;
var logicUnitList = constant.trigger.logicUnit;
$scope.formOptions = {
......@@ -272,27 +270,23 @@
title: "Hong Kong",
items: [
{
dataField: "status",
dataField: "jurisdictionDtoList[0].status",
caption: "Valid",
editorType: "dxCheckBox"
}, {
dataField: "logicNum",
dataField: "jurisdictionDtoList[0].logicNum",
caption: "LogicNum"
}, {
dataField: "logicUnit",
dataField: "jurisdictionDtoList[0].logicUnit",
caption: "LogicUnit",
editorType: "dxSelectBox",
editorOptions: {
items: logicUnitList,
displayExpr: "name",
valueExpr: "id"
},
validationRules: [{
type: "required",
message: "LogicUnit is required"
}]
}
}, {
dataField: "description",
dataField: "jurisdictionDtoList[0].description",
caption: "Description",
editorType: "dxTextArea",
colSpan: 3,
......@@ -305,27 +299,23 @@
title: "BVI",
items: [
{
dataField: "status",
dataField: "jurisdictionDtoList[1].status",
caption: "Valid",
editorType: "dxCheckBox"
}, {
dataField: "logicNum",
dataField: "jurisdictionDtoList[1].logicNum",
caption: "LogicNum"
}, {
dataField: "logicUnit",
dataField: "jurisdictionDtoList[1].logicUnit",
caption: "LogicUnit",
editorType: "dxSelectBox",
editorOptions: {
items: logicUnitList,
displayExpr: "name",
valueExpr: "id"
},
validationRules: [{
type: "required",
message: "LogicUnit is required"
}]
}
}, {
dataField: "description",
dataField: "jurisdictionDtoList[1].description",
caption: "Description",
editorType: "dxTextArea",
colSpan: 3,
......@@ -338,27 +328,23 @@
title: "Cayman Islands",
items: [
{
dataField: "status",
dataField: "jurisdictionDtoList[2].status",
caption: "Valid",
editorType: "dxCheckBox"
}, {
dataField: "logicNum",
dataField: "jurisdictionDtoList[2].logicNum",
caption: "LogicNum"
}, {
dataField: "logicUnit",
dataField: "jurisdictionDtoList[2].logicUnit",
caption: "LogicUnit",
editorType: "dxSelectBox",
editorOptions: {
items: logicUnitList,
displayExpr: "name",
valueExpr: "id"
},
validationRules: [{
type: "required",
message: "LogicUnit is required"
}]
}
}, {
dataField: "description",
dataField: "jurisdictionDtoList[2].description",
caption: "Description",
editorType: "dxTextArea",
colSpan: 3,
......
......@@ -3,13 +3,13 @@ webservices.factory('calendarActionService', ['$http', 'apiConfig', function ($h
return {
getCalendarActionList: function () {
return $http.get('/calendarAction/getCalendarActionList', apiConfig.create());
return $http.get('/calendarAction/getActionList', apiConfig.create());
},
saveCalendarAction: function (data) {
return $http.post('/calendarAction/saveCalendarAction', data, apiConfig.create());
return $http.post('/calendarAction/saveAction', data, apiConfig.create());
},
deleteCalendarAction: function (id) {
return $http.get('/calendarAction/deleteCalendarAction/' + id, apiConfig.create());
return $http.get('/calendarAction/deleteAction/' + id, apiConfig.create());
}
};
......
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