Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
61e550a8
Commit
61e550a8
authored
Jul 15, 2019
by
Mccoy Z Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calendar display
parent
486c2277
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
365 additions
and
146 deletions
+365
-146
CalendarController.java
.../java/pwc/taxtech/atms/controller/CalendarController.java
+3
-4
CalendarDisplayQueryParamDto.java
...xtech/atms/dto/calendar/CalendarDisplayQueryParamDto.java
+43
-0
ICalendarService.java
.../main/java/pwc/taxtech/atms/service/ICalendarService.java
+2
-1
CalendarServiceImpl.java
...va/pwc/taxtech/atms/service/impl/CalendarServiceImpl.java
+175
-17
CalendarExtMapper.java
.../pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
+4
-0
tax-calendar-config.ctrl.js
...ndarSetting/taxCalendarConfig/tax-calendar-config.ctrl.js
+1
-1
calendar-display.ctrl.js
...main/webapp/app/calendar/display/calendar-display.ctrl.js
+94
-85
calendar-display.html
...rc/main/webapp/app/calendar/display/calendar-display.html
+13
-13
edit-calendar-task.ctrl.js
...pp/calendar/edit-calendar-task/edit-calendar-task.ctrl.js
+4
-4
edit-calendar-task.html
...p/app/calendar/edit-calendar-task/edit-calendar-task.html
+25
-20
taxCalendarConfiguration.svc.js
...pp/app/common/webservices/taxCalendarConfiguration.svc.js
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CalendarController.java
View file @
61e550a8
...
...
@@ -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
get
TaxCalendarDataForDisplay
(
@Param
(
"queryStartTime"
)
Date
queryStartTime
,
@Param
(
"queryEndTime"
)
Date
queryEndTime
){
return
calendarServiceImpl
.
get
TaxCalendarDataForDisplay
(
queryStartTime
,
queryEndTime
);
public
OperationResultDto
get
CalendarDataForDisplay
(
@RequestBody
CalendarDisplayQueryParamDto
queryParamDto
){
return
calendarServiceImpl
.
get
CalendarDataForDisplay
(
queryParamDto
);
}
@PostMapping
(
"saveCalendarConfig"
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/calendar/CalendarDisplayQueryParamDto.java
0 → 100644
View file @
61e550a8
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
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/ICalendarService.java
View file @
61e550a8
...
...
@@ -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
get
TaxCalendarDataForDisplay
(
Date
queryStartTime
,
Date
queryEndTime
);
OperationResultDto
get
CalendarDataForDisplay
(
CalendarDisplayQueryParamDto
queryParamDto
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CalendarServiceImpl.java
View file @
61e550a8
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.calendar.dto.CalendarConfigDto
;
import
pwc.taxtech.atms.calendar.dto.CalendarConfigGroupByEntityDto
;
import
pwc.taxtech.atms.calendar.dto.CalendarTaskTypeDto
;
import
pwc.taxtech.atms.calendar.dto.EntityDto
;
import
pwc.taxtech.atms.calendar.dto.*
;
import
pwc.taxtech.atms.calendar.dao.*
;
import
pwc.taxtech.atms.calendar.dao.ext.CalendarExtMapper
;
import
pwc.taxtech.atms.calendar.entity.CalendarConfiguration
;
import
pwc.taxtech.atms.calendar.entity.CalendarConfigurationExample
;
import
pwc.taxtech.atms.calendar.entity.CalendarTaskType
;
import
pwc.taxtech.atms.calendar.entity.*
;
import
pwc.taxtech.atms.dpo.PagingDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
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.text.ParsePosition
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -39,6 +37,9 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
@Resource
private
CalendarConfigurationMapper
calendarConfigurationMapper
;
@Resource
private
CalendarEventMapper
calendarEventMapper
;
@Resource
private
CalendarTaskTypeMapper
calendarTaskTypeMapper
;
...
...
@@ -277,7 +278,7 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
private
String
splice
(
List
<
String
>
list
)
{
StringBuilder
sb
=
new
StringBuilder
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
list
.
forEach
(
p
->
sb
.
append
(
p
).
append
(
", "
));
}
return
sb
.
toString
();
...
...
@@ -304,9 +305,9 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
Map
<
Long
,
List
<
CalendarConfigDto
>>
resultMap
=
new
HashMap
<>();
Map
<
Long
,
EntityDto
>
entityMap
=
calendarExtMapper
.
getAll
EntityMapList
();
Map
<
Long
,
EntityDto
>
activeEntityMap
=
calendarExtMapper
.
getActive
EntityMapList
();
if
(
e
ntityMap
==
null
)
{
if
(
activeE
ntityMap
==
null
)
{
return
null
;
}
...
...
@@ -315,14 +316,19 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
String
[]
entityIdArr
=
p
.
getEntityIds
().
split
(
","
);
Arrays
.
stream
(
entityIdArr
).
forEach
(
idStr
->
{
Long
id
=
Long
.
parseLong
(
idStr
);
if
(!
resultMap
.
containsKey
(
id
))
{
if
(!
activeEntityMap
.
containsKey
(
id
))
{
return
;
}
if
(!
resultMap
.
containsKey
(
id
))
{
resultMap
.
put
(
id
,
new
ArrayList
<>());
}
resultMap
.
get
(
id
).
add
(
p
);
});
});
resultMap
.
forEach
((
k
,
v
)
->
resultList
.
add
(
new
CalendarConfigGroupByEntityDto
(
entityMap
.
get
(
k
).
getName
(),
v
.
size
(),
0
,
v
)));
resultMap
.
forEach
((
k
,
v
)
->
resultList
.
add
(
new
CalendarConfigGroupByEntityDto
(
activeEntityMap
.
get
(
k
).
getName
(),
v
.
size
(),
0
,
v
)));
return
resultList
;
}
...
...
@@ -346,13 +352,165 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
}
@Override
public
OperationResultDto
getTaxCalendarDataForDisplay
(
Date
queryStartTime
,
Date
queryEndTime
)
{
public
OperationResultDto
getCalendarDataForDisplay
(
CalendarDisplayQueryParamDto
queryParamDto
)
{
List
<
CalendarEvent
>
eventList
=
getCalendarEventData
(
queryParamDto
);
List
<
CalendarEventDto
>
eventDtoList
=
new
ArrayList
<>();
for
(
CalendarEvent
p
:
eventList
)
{
CalendarEventDto
dto
=
new
CalendarEventDto
();
beanUtil
.
copyProperties
(
p
,
dto
);
eventDtoList
.
add
(
dto
);
}
return
new
OperationResultDto
(
CollectionUtils
.
isNotEmpty
(
eventDtoList
),
""
,
eventDtoList
);
}
public
List
getCalendarEventData
(
CalendarDisplayQueryParamDto
queryParamDto
)
{
Date
start
=
formatQueryDateTime
(
queryParamDto
.
getQueryStartTime
(),
false
);
Date
end
=
formatQueryDateTime
(
queryParamDto
.
getQueryEndTime
(),
true
);
String
startYearStr
=
String
.
format
(
"%tY"
,
start
);
String
endYearStr
=
String
.
format
(
"%tY"
,
end
);
List
<
CalendarConfiguration
>
configList
=
null
;
List
<
CalendarEvent
>
eventList
=
null
;
//获取有效期内calendar_configuration列表
try
{
CalendarConfigurationExample
configExample
=
new
CalendarConfigurationExample
();
configExample
.
createCriteria
()
.
andValidDateStartLessThanOrEqualTo
(
end
)
.
andValidDateEndGreaterThan
(
end
)
.
andStatusEqualTo
(
Byte
.
parseByte
(
"1"
));
configList
=
calendarConfigurationMapper
.
selectByExample
(
configExample
);
}
catch
(
Exception
e
)
{
log
.
error
(
"configList error"
,
e
);
}
Map
<
Long
,
EntityDto
>
activeEntityMap
=
calendarExtMapper
.
getActiveEntityMapList
();
if
(
activeEntityMap
==
null
)
{
return
null
;
}
CalendarConfigurationExample
configExample
=
new
CalendarConfigurationExample
();
configExample
.
createCriteria
().
andValidDateStartGreaterThanOrEqualTo
(
queryStartTime
).
andValidDateEndLessThanOrEqualTo
(
queryEndTime
);
List
<
CalendarConfiguration
>
configList
=
calendarConfigurationMapper
.
selectByExample
(
configExample
);
//转化
List
<
CalendarEvent
>
config2EventList
=
config2EventList
(
configList
,
startYearStr
,
endYearStr
,
start
,
end
,
activeEntityMap
);
//获取due_date在查询时间内的calendar_event列表
try
{
CalendarEventExample
eventExample
=
new
CalendarEventExample
();
eventExample
.
createCriteria
()
.
andDueDateGreaterThanOrEqualTo
(
start
)
.
andDueDateLessThan
(
end
);
eventList
=
calendarEventMapper
.
selectByExample
(
eventExample
);
}
catch
(
Exception
e
)
{
log
.
error
(
"eventList error"
,
e
);
}
return
null
;
if
(
CollectionUtils
.
isEmpty
(
eventList
))
{
return
config2EventList
;
}
if
(
CollectionUtils
.
isEmpty
(
config2EventList
))
{
return
eventList
;
}
//todo 去除config中重复的
return
mergeEventList
(
config2EventList
,
eventList
);
}
private
List
mergeEventList
(
List
<
CalendarEvent
>
config2EventList
,
List
<
CalendarEvent
>
eventList
)
{
List
resultList
=
new
ArrayList
();
resultList
.
addAll
(
eventList
);
resultList
.
addAll
(
config2EventList
.
stream
()
.
filter
(
l1
->
eventList
.
stream
()
.
anyMatch
(
l2
->
!
l1
.
getEntityId
().
equals
(
l2
.
getEntityId
())
&&
!
l1
.
getTaskTypeId
().
equals
(
l2
.
getTaskTypeId
())
&&
DateUtils
.
isSameDay
(
l1
.
getDueDate
(),
l2
.
getDueDate
())
))
.
collect
(
Collectors
.
toList
()));
return
resultList
;
}
private
List
<
CalendarEvent
>
config2EventList
(
List
<
CalendarConfiguration
>
configList
,
String
startYearStr
,
String
endYearStr
,
Date
start
,
Date
end
,
Map
<
Long
,
EntityDto
>
activeEntityMap
)
{
List
<
CalendarEvent
>
config2EventList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
configList
))
{
try
{
configList
.
forEach
(
p
->
Arrays
.
stream
(
p
.
getEntityIds
().
split
(
","
))
.
forEach
(
entityIdStr
->
{
if
(!
activeEntityMap
.
containsKey
(
Long
.
parseLong
(
entityIdStr
)))
{
return
;
}
Arrays
.
stream
(
p
.
getTaskTypeIds
().
split
(
","
))
.
forEach
(
taskTypeIdStr
->
Arrays
.
stream
(
p
.
getProjectMonths
().
split
(
","
))
.
forEach
(
month
->
Arrays
.
stream
(
p
.
getProjectDays
().
split
(
","
))
.
forEach
(
day
->
{
//TODO 跨年未处理 特殊日期未处理
Date
dueDate
=
str2Date
(
startYearStr
+
"-"
+
month
+
"-"
+
day
);
if
(
dueDate
!=
null
&&
dueDate
.
compareTo
(
start
)
>=
0
&&
dueDate
.
compareTo
(
end
)
<
0
)
{
CalendarEvent
event
=
new
CalendarEvent
();
event
.
setId
(
p
.
getId
());
event
.
setTaskName
(
p
.
getTaskName
());
event
.
setEntityId
(
Long
.
parseLong
(
entityIdStr
));
event
.
setTaskTypeId
(
Long
.
parseLong
(
taskTypeIdStr
));
event
.
setStaff
(
p
.
getStaff
());
event
.
setNotes
(
p
.
getNotes
());
event
.
setOrderIndex
(
p
.
getOrderIndex
());
event
.
setStatus
(
Byte
.
parseByte
(
"0"
));
event
.
setCreateTime
(
p
.
getCreateTime
());
event
.
setDueDate
(
dueDate
);
event
.
setEffectiveDate
(
p
.
getCreateTime
());
config2EventList
.
add
(
event
);
}
})
)
);
}
)
);
}
catch
(
Exception
e
)
{
log
.
error
(
"config2EventList error"
,
e
);
}
}
return
config2EventList
;
}
private
Date
str2Date
(
String
strDate
)
{
Date
str2Date
=
null
;
try
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
ParsePosition
pos
=
new
ParsePosition
(
0
);
str2Date
=
formatter
.
parse
(
strDate
,
pos
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"str2Date error; strDate: {}, e: {}"
,
strDate
,
e
.
getMessage
());
}
return
str2Date
;
}
private
Date
formatQueryDateTime
(
Date
date
,
boolean
addOneDay
)
{
Calendar
calendar
=
new
GregorianCalendar
();
calendar
.
setTime
(
date
);
// 将时分秒,毫秒域清零
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
calendar
.
set
(
Calendar
.
SECOND
,
0
);
calendar
.
set
(
Calendar
.
MILLISECOND
,
0
);
//把日期往后增加一天
if
(
addOneDay
)
{
calendar
.
add
(
Calendar
.
DATE
,
1
);
}
return
calendar
.
getTime
();
}
}
atms-dao/src/main/java/pwc/taxtech/atms/calendar/dao/ext/CalendarExtMapper.java
View file @
61e550a8
...
...
@@ -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
);
...
...
atms-web/src/main/webapp/app/admin/systemConfiguration/calendarSetting/taxCalendarConfig/tax-calendar-config.ctrl.js
View file @
61e550a8
...
...
@@ -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
,
...
...
atms-web/src/main/webapp/app/calendar/display/calendar-display.ctrl.js
View file @
61e550a8
...
...
@@ -12,48 +12,49 @@
$scope
.
agendaFlag
=
false
;
$scope
.
agendas
=
[
{
name
:
"Hong Kong 1 Limited"
,
desc
:
"Renewal of business License/Fee payment"
,
date
:
"01/01/2019"
,
week
:
"Tuesday"
,
isUrgent
:
true
,
color
:
"#d93954"
},
{
name
:
"Hong Kong 1 Limited"
,
desc
:
"Renewal of business License/Fee payment"
,
date
:
"01/01/2019"
,
week
:
"Tuesday"
,
isUrgent
:
false
,
color
:
"#d93954"
},
{
name
:
"Hong Kong 1 Limited"
,
desc
:
"Renewal of business License/Fee payment"
,
date
:
"01/01/2019"
,
week
:
"Tuesday"
,
isUrgent
:
true
,
color
:
"#ffbf1f"
},
{
name
:
"Hong Kong 1 Limited"
,
desc
:
"Renewal of business License/Fee payment"
,
date
:
"01/01/2019"
,
week
:
"Tuesday"
,
isUrgent
:
false
,
color
:
"#fd6412"
},
{
name
:
"Hong Kong 1 Limited"
,
desc
:
"Renewal of business License/Fee payment"
,
date
:
"01/01/2019"
,
week
:
"Tuesday"
,
isUrgent
:
true
,
color
:
"#ffbf1f"
}
];
$scope
.
agendas
=
ScheduleList
;
// $scope.agendas = [
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: true,
// color: "#d93954"
// },
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: false,
// color: "#d93954"
// },
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: true,
// color: "#ffbf1f"
// },
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: false,
// color: "#fd6412"
// },
// {
// name: "Hong Kong 1 Limited",
// desc: "Renewal of business License/Fee payment",
// date: "01/01/2019",
// week: "Tuesday",
// isUrgent: true,
// color: "#ffbf1f"
// }
// ];
//全局变量初始化放顶上
var
entityList
=
[];
...
...
@@ -280,7 +281,7 @@
],
statusList
:
[{
name
:
'未完成'
,
value
:
0
,
checked
:
true
},
{
name
:
'已完成'
,
value
:
1
,
checked
:
true
}],
calendarTypeList
:
[{
name
:
'我的事项'
,
value
:
true
,
checked
:
true
},
{
name
:
'他人事项'
,
value
:
false
,
checked
:
true
}],
//
calendarTypeList: [{ name: '我的事项', value: true, checked: true }, { name: '他人事项', value: false, checked: true }],
allScheduleList
:
[],
recogizeStatus
:
{
...
...
@@ -615,13 +616,13 @@
$scope
.
popupOptions
.
operateModel
=
{
operatorNames
:
loginContext
.
userName
,
type
:
1
,
companyID
:
''
,
compan
yName
:
''
,
entityId
:
''
,
entit
yName
:
''
,
operatorIDs
:
loginContext
.
userId
,
eventDate
:
start
,
status
:
0
,
btnCreate
:
true
,
ta
xProjectID
:
userDefine
.
id
,
ta
skTypeId
:
userDefine
.
id
,
taskTypeName
:
userDefine
.
taskTypeName
,
colorGroup
:
userDefine
.
colorGroup
};
...
...
@@ -695,9 +696,9 @@
//刷新筛选选择
function
refreshFilterChoise
()
{
//链式传递筛选结果
var
cScheduleList
=
filterScheduleProperty
(
entityList
,
'
companyList'
,
'companyID
'
,
dataOptions
.
allScheduleList
);
var
cScheduleList
=
filterScheduleProperty
(
entityList
,
'
entityList'
,
'entityId
'
,
dataOptions
.
allScheduleList
);
var
sScheduleList
=
filterScheduleProperty
(
dataOptions
.
statusList
,
'statusList'
,
'status'
,
cScheduleList
);
ScheduleList
=
filterScheduleProperty
(
dataOptions
.
calendarTypeList
,
'calendarTypeList'
,
'calendarType
'
,
sScheduleList
);
ScheduleList
=
filterScheduleProperty
(
CalendarList
,
'calendarList'
,
'calendarId
'
,
sScheduleList
);
refreshSchedule
();
}
...
...
@@ -705,7 +706,7 @@
var
calendarId
=
e
.
target
.
value
;
var
checked
=
e
.
target
.
checked
;
var
viewAll
=
document
.
querySelector
(
'.lnb-calendars-item input'
);
var
calendarElements
=
Array
.
prototype
.
slice
.
call
(
document
.
querySelectorAll
(
'#calendarList input,#
compan
yList input,#statusList input,#calendarTypeList input'
));
var
calendarElements
=
Array
.
prototype
.
slice
.
call
(
document
.
querySelectorAll
(
'#calendarList input,#
entit
yList input,#statusList input,#calendarTypeList input'
));
var
allCheckedCalendars
=
true
;
var
allSpan
=
e
.
target
.
nextElementSibling
;
...
...
@@ -851,8 +852,8 @@
//提取Compay ID Name 并排重
//entityList = _.uniq(_.map(scheduleDtoList, function (dt) {
// return {
// value: dt.
companyID
,
// name: dt.
compan
yName,
// value: dt.
entityId
,
// name: dt.
entit
yName,
// checked: true
// }
//}), false, function (sch) { return sch.value });
...
...
@@ -863,36 +864,37 @@
_
.
each
(
scheduleDtoList
,
function
(
dto
)
{
var
schedule
=
new
ScheduleInfo
();
schedule
.
id
=
dto
.
id
;
schedule
.
calendarId
=
dto
.
ta
xProjectID
;
schedule
.
title
=
dto
.
event
Name
+
(
dto
.
status
==
"0"
?
"-未完成"
:
"-已完成"
);
schedule
.
calendarId
=
dto
.
ta
skTypeId
;
schedule
.
title
=
dto
.
task
Name
+
(
dto
.
status
==
"0"
?
"-未完成"
:
"-已完成"
);
schedule
.
isAllday
=
true
;
schedule
.
start
=
new
Date
(
dto
.
start
);
schedule
.
end
=
new
Date
(
dto
.
end
);
schedule
.
notes
=
dto
.
notes
;
schedule
.
start
=
new
Date
(
dto
.
dueDate
);
schedule
.
end
=
new
Date
(
dto
.
dueDate
);
schedule
.
category
=
'allday'
;
schedule
.
companyID
=
dto
.
companyID
;
schedule
.
entityId
=
dto
.
entityId
;
schedule
.
status
=
dto
.
status
.
toString
();
schedule
.
calendarType
=
(
!!
dto
.
operatorNames
&&
(
dto
.
operatorNames
.
toLowerCase
()
===
loginContext
.
userName
.
toLowerCase
())).
toString
();
//
schedule.calendarType = (!!dto.operatorNames && (dto.operatorNames.toLowerCase() === loginContext.userName.toLowerCase())).toString();
var
calendar
=
_
.
filter
(
CalendarList
,
function
(
ca
)
{
return
ca
.
id
===
dto
.
ta
xProjectID
})[
0
];
var
calendar
=
_
.
filter
(
CalendarList
,
function
(
ca
)
{
return
ca
.
id
===
dto
.
ta
skTypeId
})[
0
];
schedule
.
color
=
calendar
.
color
;
schedule
.
bgColor
=
calendar
.
bgColor
;
schedule
.
dragBgColor
=
calendar
.
dragBgColor
;
schedule
.
borderColor
=
calendar
.
borderColor
;
schedule
.
location
=
dto
.
workPlaceName
;
//
schedule.location = dto.workPlaceName;
schedule
.
recurrenceRule
=
false
;
schedule
.
raw
=
{
fileList
:
dto
.
fileList
,
hasToOrCc
:
false
,
hasRecurrenceRule
:
false
,
location
:
dto
.
workPlaceName
,
//
location: dto.workPlaceName,
class
:
'public'
,
// or 'private'
creator
:
{
name
:
dto
.
operatorNames
,
company
:
dto
.
compan
yName
name
:
dto
.
staff
,
company
:
dto
.
entit
yName
}
}
...
...
@@ -910,7 +912,7 @@
$scope
.
permissionData
=
{};
function
setSchedules
()
{
taxCalendarService
.
getCalendarDataForDisplay
(
cal
.
getDateRangeStart
(),
cal
.
getDateRangeEnd
()).
success
(
function
(
scheduleDtoLis
t
)
{
taxCalendarService
.
getCalendarDataForDisplay
(
cal
.
getDateRangeStart
(),
cal
.
getDateRangeEnd
()).
success
(
function
(
resul
t
)
{
//如果登录用户没有查看,则不显示相应的税务日历
// userService.getUserPermissionNew(loginContext.userName, function (data) {
// $scope.permissionData = data;
...
...
@@ -921,15 +923,18 @@
// }
// });
// 自定义事件,只能显示自己自定义的
scheduleDtoList
=
_
.
filter
(
scheduleDtoList
,
function
(
r
)
{
if
(
r
.
type
===
constant
.
EnumTaxEventType
.
UserDefine
&&
r
.
operatorIDs
!=
loginContext
.
userId
)
{
return
false
;
}
if
(
result
.
result
)
{
// result = _.filter(result.data, function (r) {
// if (r.type === constant.EnumTaxEventType.UserDefine) {
// return false;
// }
// return true;
// });
result
=
result
.
data
;
}
return
true
;
});
refreshAll
(
scheduleDtoLis
t
);
refreshAll
(
resul
t
);
}).
error
(
function
(
ex
)
{
$log
.
error
(
ex
);
...
...
@@ -945,6 +950,9 @@
//根据ScheduleList更新界面显示
function
refreshSchedule
()
{
$scope
.
agendas
=
ScheduleList
;
$scope
.
agendasLen
=
ScheduleList
.
length
;
cal
.
clear
();
//generateSchedule(cal.getViewName(), cal.getDateRangeStart(), cal.getDateRangeEnd());
cal
.
createSchedules
(
ScheduleList
);
...
...
@@ -964,9 +972,9 @@
});
calendarList
.
innerHTML
=
html
.
join
(
'
\
n'
);
renderList
(
entityList
,
'
compan
yList'
,
'#aaa'
);
renderList
(
entityList
,
'
entit
yList'
,
'#aaa'
);
renderList
(
dataOptions
.
statusList
,
'statusList'
,
'#aaa'
);
renderList
(
dataOptions
.
calendarTypeList
,
'calendarTypeList'
,
'#aaa'
);
//
renderList(dataOptions.calendarTypeList, 'calendarTypeList', '#aaa');
var
viewAll
=
document
.
getElementById
(
'viewAll'
);
viewAll
.
checked
=
true
;
...
...
@@ -1006,7 +1014,7 @@
return
target
.
dataset
?
target
.
dataset
.
action
:
target
.
getAttribute
(
'data-action'
);
}
var
getTa
xProject
List
=
function
()
{
var
getTa
skType
List
=
function
()
{
taskTypeList
=
[];
var
setColor
=
function
(
data
)
{
...
...
@@ -1036,6 +1044,7 @@
var
colorGroup
=
value
.
colorGroup
;
CalendarList
.
push
({
id
:
value
.
id
,
value
:
value
.
id
,
name
:
value
.
name
,
checked
:
true
,
color
:
colorGroup
.
color
,
...
...
@@ -1068,7 +1077,7 @@
setDropdownCalendarType
();
setRenderRangeText
();
getTa
xProject
List
();
getTa
skType
List
();
setEventListener
();
renderFilter
();
...
...
@@ -1176,12 +1185,12 @@
var
data
=
{
id
:
param
.
data
.
id
,
type
:
param
.
data
.
type
,
ta
xProjectID
:
param
.
data
.
taxProjectID
,
ta
skTypeId
:
param
.
data
.
taskTypeId
,
taskTypeName
:
param
.
data
.
taskTypeName
,
companyID
:
param
.
data
.
companyID
,
companyName
:
param
.
data
.
compan
yName
,
workPlaceID
:
param
.
data
.
workPlaceID
,
workPlaceName
:
param
.
data
.
workPlaceName
,
entityId
:
param
.
data
.
entityId
,
entityName
:
param
.
data
.
entit
yName
,
//
workPlaceID: param.data.workPlaceID,
//
workPlaceName: param.data.workPlaceName,
isRelatedTaxMoney
:
param
.
data
.
isRelatedTaxMoney
,
operatorIDs
:
param
.
data
.
operatorIDs
,
operatorNames
:
param
.
data
.
operatorNames
,
...
...
@@ -1252,13 +1261,13 @@
$scope
.
popupOptions
.
operateModel
=
{
operatorNames
:
loginContext
.
userName
,
type
:
1
,
companyID
:
''
,
compan
yName
:
''
,
entityId
:
''
,
entit
yName
:
''
,
operatorIDs
:
loginContext
.
userId
,
eventDate
:
e
.
start
,
status
:
0
,
guideBound
:
guideBound
,
ta
xProjectID
:
userDefine
.
id
,
ta
skTypeId
:
userDefine
.
id
,
taskTypeName
:
userDefine
.
taskTypeName
,
colorGroup
:
userDefine
.
colorGroup
};
...
...
@@ -1273,7 +1282,7 @@
var
model
=
_
.
find
(
scheduleDataSourceList
,
{
id
:
e
.
schedule
.
id
});
var
temp
=
getTaxProject
(
model
.
ta
xProjectID
);
var
temp
=
getTaxProject
(
model
.
ta
skTypeId
);
//var guideBound = e.event.target.getBoundingClientRect();
...
...
@@ -1316,7 +1325,7 @@
};
//获取用户的可访问的公司列表
var
get
Compan
yList
=
function
()
{
var
get
Entit
yList
=
function
()
{
entityList
=
[];
taxCalendarService
.
getActiveEntityList
().
success
(
function
(
result
)
{
if
(
result
.
result
)
{
...
...
@@ -1345,7 +1354,7 @@
initScopeVariable
();
initControls
();
get
Compan
yList
();
get
Entit
yList
();
//getTaskTypeList();
})();
...
...
atms-web/src/main/webapp/app/calendar/display/calendar-display.html
View file @
61e550a8
...
...
@@ -19,14 +19,14 @@
<div
id=
"calendarList"
class=
"lnb-calendars-d1"
>
</div>
<div
id=
"
compan
yList"
class=
"lnb-calendars-d1"
>
<div
id=
"
entit
yList"
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.
c
olor}}"
></div>
<div
class=
"agenda-color"
style=
"background: {{agenda.
borderC
olor}}"
></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.
n
ame}}
</span>
<span
style=
"float: left;"
>
{{agenda.
title
}}
</span>
<span
style=
"float: right;width: 20%;text-align: right;"
>
{{agenda.
entityN
ame}}
</span>
<span
style=
"float: right;padding: 0px 50px;font-weight: bolder;color: red;"
ng-if=
"agenda.isUrgent"
>
!Urgent
</span>
</div>
</div>
...
...
atms-web/src/main/webapp/app/calendar/edit-calendar-task/edit-calendar-task.ctrl.js
View file @
61e550a8
...
...
@@ -175,7 +175,7 @@
$scope
.
isReadOnly
=
false
;
if
(
$scope
.
operateModel
)
{
$scope
.
editModel
=
$scope
.
operateModel
;
$scope
.
editModel
.
ta
xProject
NameShow
=
$scope
.
editModel
.
taskTypeName
;
$scope
.
editModel
.
ta
skType
NameShow
=
$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
.
compan
yName
=
cacheDataService
.
userOwnOrg
.
name
;
$scope
.
editModel
.
companyID
=
cacheDataService
.
userOwnOrg
.
id
;
$scope
.
editModel
.
entit
yName
=
cacheDataService
.
userOwnOrg
.
name
;
$scope
.
editModel
.
entityId
=
cacheDataService
.
userOwnOrg
.
id
;
popupService
.
locationHander
=
dateLocationService
;
popupService
.
show
();
...
...
@@ -209,7 +209,7 @@
showText
+=
' '
+
$scope
.
operateModel
.
calendarNumber
;
}
$scope
.
editModel
.
ta
xProject
NameShow
=
showText
;
$scope
.
editModel
.
ta
skType
NameShow
=
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
]);
...
...
atms-web/src/main/webapp/app/calendar/edit-calendar-task/edit-calendar-task.html
View file @
61e550a8
...
...
@@ -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.ta
xProject
NameShow}}
</span>
<span
ng-style=
"styleOptions"
></span><span>
{{editModel.ta
skType
NameShow}}
</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-width
9
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
>
<input
type=
"radio"
name=
"isRelatedTaxMoney"
ng-disabled=
"isReadOnly"
value=
"0"
ng-model=
"editModel.isRelatedTaxMoney"
><span>
否
</span
>
</div
>
<div
dx-select-box=
"addressOptions"
class=
"inline-width
20
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>--
>
<!-- <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=
"
OperatorNames
Colon"
></div>
<div
class=
"inline-width9 edit-box"
dx-
text-box=
"{disabled:true,bindingOptions:{value:'editModel.operatorNames
'}}"
></div>
<div
class=
"inline-width5"
translate=
"
TaxEventDate
Colon"
></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=
"
RelatedPers
on"
></div>
<div
class=
"inline-width
20 edit-box"
dx-text-box=
"{disabled: true, bindingOptions:{value:'editModel.notifie
rNames'}}"
></div>
<div
class=
"inline-width5"
translate=
"
OperatorNamesCol
on"
></div>
<div
class=
"inline-width
9 edit-box"
dx-text-box=
"{disabled:true,bindingOptions:{value:'editModel.operato
rNames'}}"
></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>
...
...
atms-web/src/main/webapp/app/common/webservices/taxCalendarConfiguration.svc.js
View file @
61e550a8
...
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment