Commit 61e550a8 authored by Mccoy Z Xia's avatar Mccoy Z Xia

calendar display

parent 486c2277
......@@ -10,11 +10,10 @@ import pwc.taxtech.atms.calendar.entity.CalendarConfiguration;
import pwc.taxtech.atms.calendar.entity.CalendarTaskType;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.calendar.CalendarConfigQueryParamDto;
import pwc.taxtech.atms.dto.calendar.CalendarDisplayQueryParamDto;
import pwc.taxtech.atms.service.ICalendarService;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
/**
* <p> @Description </p>
......@@ -56,8 +55,8 @@ public class CalendarController {
}
@PostMapping("getCalendarDataForDisplay")
public OperationResultDto getTaxCalendarDataForDisplay(@Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime){
return calendarServiceImpl.getTaxCalendarDataForDisplay(queryStartTime, queryEndTime);
public OperationResultDto getCalendarDataForDisplay(@RequestBody CalendarDisplayQueryParamDto queryParamDto){
return calendarServiceImpl.getCalendarDataForDisplay(queryParamDto);
}
@PostMapping("saveCalendarConfig")
......
package pwc.taxtech.atms.dto.calendar;
import java.util.Date;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-14 22:20
* @Version: 1.0
**/
public class CalendarDisplayQueryParamDto {
private Date queryStartTime;
private Date queryEndTime;
private Integer type;
public Date getQueryStartTime() {
return queryStartTime;
}
public void setQueryStartTime(Date queryStartTime) {
this.queryStartTime = queryStartTime;
}
public Date getQueryEndTime() {
return queryEndTime;
}
public void setQueryEndTime(Date queryEndTime) {
this.queryEndTime = queryEndTime;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
......@@ -7,6 +7,7 @@ import pwc.taxtech.atms.calendar.entity.CalendarConfiguration;
import pwc.taxtech.atms.calendar.entity.CalendarTaskType;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.calendar.CalendarConfigQueryParamDto;
import pwc.taxtech.atms.dto.calendar.CalendarDisplayQueryParamDto;
import java.util.Date;
import java.util.List;
......@@ -39,5 +40,5 @@ public interface ICalendarService {
OperationResultDto getMaxConfigOrder();
OperationResultDto getTaxCalendarDataForDisplay(Date queryStartTime, Date queryEndTime);
OperationResultDto getCalendarDataForDisplay(CalendarDisplayQueryParamDto queryParamDto);
}
......@@ -45,6 +45,10 @@ public interface CalendarExtMapper extends MyMapper {
@MapKey("id")
Map<Long, EntityDto> getAllEntityMapList();
@Select("SELECT id, name FROM organization WHERE is_active = 1")
@MapKey("id")
Map<Long, EntityDto> getActiveEntityMapList();
@Select("SELECT name FROM calendar_task_type WHERE id IN (${ids})")
List<String> getAllTaskTypes(@Param("ids") String ids);
......
......@@ -202,7 +202,7 @@
columns: [
{ dataField: 'entityName', caption: $translate.instant('Company'), allowHeaderFiltering: false },
{ dataField: 'calendarCount', caption: $translate.instant('TaxCalendarCount'), allowHeaderFiltering: false },
{ dataField: 'taskTypeCount', caption: $translate.instant('TaxProjectCount'), allowHeaderFiltering: false },
// { dataField: 'taskTypeCount', caption: $translate.instant('TaxProjectCount'), allowHeaderFiltering: false },
],
masterDetail: {
enabled: true,
......
......@@ -19,14 +19,14 @@
<div id="calendarList" class="lnb-calendars-d1">
</div>
<div id="companyList" class="lnb-calendars-d1">
<div id="entityList" class="lnb-calendars-d1">
</div>
<div id="statusList" class="lnb-calendars-d1">
</div>
<div id="calendarTypeList" class="lnb-calendars-d1">
</div>
<!-- <div id="calendarTypeList" class="lnb-calendars-d1">-->
<!-- </div>-->
</div>
......@@ -75,30 +75,30 @@
<span id="menu-navi">
<button ng-show="agendaFlag" type="button" class="btn btn-default btn-sm move-today" style="font-size: 18px" data-action="move-today" ng-click="changeAgendaFlag(false)">Agenda</button>
<button ng-show="!agendaFlag" type="button" class="btn btn-default btn-sm move-today" style="font-size: 18px" ng-click="changeAgendaFlag(true)">Month</button>
<button type="button" class="btn btn-default btn-sm move-today" style="font-size: 18px" data-action="move-today">Today</button>
<button ng-show="!agendaFlag" type="button" class="btn btn-default btn-sm move-day" style="float: right" data-action="move-next">
<button ng-show="!agendaFlag" type="button" class="btn btn-default btn-sm move-today" style="font-size: 18px" data-action="move-today">Today</button>
<button type="button" class="btn btn-default btn-sm move-day" style="float: right" data-action="move-next">
<i class="calendar-icon ic-arrow-line-right" data-action="move-next"></i>
</button>
<button ng-show="!agendaFlag" type="button" class="btn btn-default btn-sm move-day" style="float: right" data-action="move-prev">
<button type="button" class="btn btn-default btn-sm move-day" style="float: right" data-action="move-prev">
<i class="calendar-icon ic-arrow-line-left" data-action="move-prev"></i>
</button>
</span>
<span ng-show="!agendaFlag" id="renderRange" class="render-range" style="font-weight: bolder;"></span>
<span ng-show="agendaFlag" class="render-range" style="font-weight: bolder;margin: 0 15px;font-size: 20px;">Total task: 11</span>
<span id="renderRange" class="render-range" style="font-weight: bolder;"></span>
<span ng-show="agendaFlag" class="render-range" style="font-weight: bolder;margin: 0 30px;font-size: 20px;vertical-align: middle;">Total task: {{agendasLen}}</span>
</div>
<div id="calendar" style="height: 85%;" ng-show="!agendaFlag"></div>
<div id="agenda-list" class="agenda-list-container" ng-show="agendaFlag">
<div class="agenda-info" ng-click="editAgenda(id)" ng-repeat="agenda in agendas track by $index">
<div class="agenda-color" style="background: {{agenda.color}}"></div>
<div class="agenda-color" style="background: {{agenda.borderColor}}"></div>
<div class="agenda-detail">
<div>
<span style="float: left;font-weight: bolder;">{{agenda.week}}</span>
<span style="float: right;">{{agenda.date}}</span>
<span style="float: left;font-weight: bolder;">{{agenda.end | date:'EEEE' }}</span>
<span style="float: right;">{{agenda.end | date:'yyyy-MM-dd'}}</span>
</div>
<div>
<span style="float: left;">{{agenda.desc}}</span>
<span style="float: right;width: 20%;text-align: right;">{{agenda.name}}</span>
<span style="float: left;">{{agenda.title}}</span>
<span style="float: right;width: 20%;text-align: right;">{{agenda.entityName}}</span>
<span style="float: right;padding: 0px 50px;font-weight: bolder;color: red;" ng-if="agenda.isUrgent">!Urgent</span>
</div>
</div>
......
......@@ -175,7 +175,7 @@
$scope.isReadOnly = false;
if ($scope.operateModel) {
$scope.editModel = $scope.operateModel;
$scope.editModel.taxProjectNameShow = $scope.editModel.taskTypeName;
$scope.editModel.taskTypeNameShow = $scope.editModel.taskTypeName;
$scope.editModel.id = window.PWC.newGuid();
$scope.editModel.eventDate = new Date($scope.operateModel.eventDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.statusText = $translate.instant(taxEventFinishStatus[$scope.editModel.status]);
......@@ -191,8 +191,8 @@
}
$scope.isRead = true;
$scope.editModel.companyName = cacheDataService.userOwnOrg.name;
$scope.editModel.companyID = cacheDataService.userOwnOrg.id;
$scope.editModel.entityName = cacheDataService.userOwnOrg.name;
$scope.editModel.entityId = cacheDataService.userOwnOrg.id;
popupService.locationHander = dateLocationService;
popupService.show();
......@@ -209,7 +209,7 @@
showText += ' ' + $scope.operateModel.calendarNumber;
}
$scope.editModel.taxProjectNameShow = showText;
$scope.editModel.taskTypeNameShow = showText;
$scope.editModel.eventDate = new Date($scope.operateModel.eventDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.statusText = $translate.instant(taxEventFinishStatus[$scope.editModel.status]);
$scope.editModel.typeText = $translate.instant(taxEventType[$scope.editModel.type]);
......
......@@ -3,46 +3,51 @@
<div class="tui-full-calendar-close">
</div>
<form id="editCalendarEventForm" dx-validation-group="{}">
<div class="row-block">
<div class="inline-width5" translate="TaxEventNameColon"></div>
<div class="inline-width20 edit-box" dx-text-box="{bindingOptions:{value:'editModel.eventName',disabled:'isReadOnly'}}" dx-validator="taxProjectNameValidateOpt"></div>
</div>
<div class="row-block" style="padding-bottom: 9px;">
<div class="inline-width5" translate="TaxProjectNameColon"></div>
<div class="inline-width20 text-definition">
<label class="taskType">
<input type="checkbox" class="tui-full-calendar-checkbox-round" value="1" checked="">
<span ng-style="styleOptions"></span><span>{{editModel.taxProjectNameShow}}</span>
<span ng-style="styleOptions"></span><span>{{editModel.taskTypeNameShow}}</span>
</label>
</div>
</div>
<div class="row-block">
<div class="inline-width5" translate="TaxEventNameColon"></div>
<div class="inline-width20 edit-box" dx-text-box="{bindingOptions:{value:'editModel.eventName',disabled:'isReadOnly'}}" dx-validator="taxProjectNameValidateOpt"></div>
</div>
<div class="row-block">
<div class="inline-width5" translate="CompanyNameColon"></div>
<div ng-model="editModel.companyName" class="inline-width20 edit-box" dx-text-box="{disabled:true}"></div>
</div>
<!-- <div class="row-block">-->
<!-- <div class="inline-width5" translate="CompanyNameColon"></div>-->
<!-- <div ng-model="editModel.companyName" class="inline-width20 edit-box" dx-text-box="{disabled:true}"></div>-->
<!-- </div>-->
<div class="row-block">
<div class="inline-width5" translate="WorkPlaceNameColon"></div>
<div dx-select-box="addressOptions" class="inline-width9 edit-box"></div>
<div class="inline-width5" translate="RelatedTaxMoneyColon"></div>
<div class="inline-width9 radio-wrapper">
<input type="radio" name="isRelatedTaxMoney" ng-disabled="isReadOnly" value="1" ng-model="editModel.isRelatedTaxMoney"><span></span>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="isRelatedTaxMoney" ng-disabled="isReadOnly" value="0" ng-model="editModel.isRelatedTaxMoney"><span></span>
</div>
<div dx-select-box="addressOptions" class="inline-width20 edit-box"></div>
<!-- <div class="inline-width5" translate="RelatedTaxMoneyColon"></div>-->
<!-- <div class="inline-width9 radio-wrapper">-->
<!-- <input type="radio" name="isRelatedTaxMoney" ng-disabled="isReadOnly" value="1" ng-model="editModel.isRelatedTaxMoney"><span>是</span>-->
<!-- &nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="isRelatedTaxMoney" ng-disabled="isReadOnly" value="0" ng-model="editModel.isRelatedTaxMoney"><span>否</span>-->
<!-- </div>-->
</div>
<div class="row-block">
<div class="inline-width5" translate="OperatorNamesColon"></div>
<div class="inline-width9 edit-box" dx-text-box="{disabled:true,bindingOptions:{value:'editModel.operatorNames'}}"></div>
<div class="inline-width5" translate="TaxEventDateColon"></div>
<div class="inline-width9 edit-box" dx-date-box="{type: 'date',bindingOptions:{value:'editModel.eventDate',disabled:'isReadOnly'}}"></div>
<div class="inline-width5" translate="TaxEventDateColon"></div>
<div class="inline-width9 edit-box" dx-date-box="{type: 'date',bindingOptions:{value:'editModel.eventDate',disabled:'isReadOnly'}}"></div>
</div>
<div class="row-block">
<div class="inline-width5" translate="RelatedPerson"></div>
<div class="inline-width20 edit-box" dx-text-box="{disabled: true, bindingOptions:{value:'editModel.notifierNames'}}"></div>
<div class="inline-width5" translate="OperatorNamesColon"></div>
<div class="inline-width9 edit-box" dx-text-box="{disabled:true,bindingOptions:{value:'editModel.operatorNames'}}"></div>
</div>
<!-- <div class="row-block">-->
<!-- <div class="inline-width5" translate="RelatedPerson"></div>-->
<!-- <div class="inline-width20 edit-box" dx-text-box="{disabled: true, bindingOptions:{value:'editModel.notifierNames'}}"></div>-->
<!-- </div>-->
<div class="row-block">
<div class="inline-width5" translate="RemarkColon"></div>
<div class="remark" dx-text-area="{bindingOptions:{value:'editModel.remark',disabled:'isReadOnly'}}"></div>
......
......@@ -25,7 +25,7 @@ webservices.factory('taxCalendarService', ['$http', 'apiConfig', function ($http
return $http.post('/calendar/saveCalendarConfig', data, apiConfig.create());
},
getCalendarDataForDisplay: function (startData, endDate) {
return $http.post('/calendar/getCalendarDataForDisplay', { queryStartTime: (new Date(startData)).dateTimeToString('yyyyMMdd'), queryEndTime: (new Date(endDate)).dateTimeToString('yyyyMMdd') + " 23:59:59", userID: '', userName: '' }, apiConfig.create());
return $http.post('/calendar/getCalendarDataForDisplay', { queryStartTime: new Date(startData), queryEndTime: new Date(endDate), userID: '', userName: '' }, apiConfig.create());
},
getMaxNumber: function () {
return $http.get('/calendar/getMaxConfigOrder', 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