Commit 22d6151f authored by Mccoy Z Xia's avatar Mccoy Z Xia

calendar display

parent f40e14dc
package pwc.taxtech.atms.constant.enums;
public enum CalendarEnum {
CALENDAR_EVENT_COMPLETED("已完成", "1", ""),
CALENDAR_EVENT_NOT_COMPLETED("未完成", "0", ""),
CALENDAR_CONFIG_ABLE("启用", "1", ""),
CALENDAR_CONFIG_DISABLE("未启用", "0", ""),
EVENT_TYPE_USER_DEFINE("自定义类型,", "1", "从event表中直接读取出来的数据"),
EVENT_TYPE_SYSTEM_CONFIG("系统配置类型", "2", "从config表中读取信息构造的数据");
CalendarEnum(String name, String code, String description) {
this.name = name;
this.code = code;
this.description = description;
}
private String name;
private String code;
private String description;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
......@@ -31,9 +31,6 @@ public class CalendarController {
@Autowired
private ICalendarService calendarServiceImpl;
@Resource
CalendarExtMapper calendarExtMapper;
@PostMapping("saveTaskType")
public OperationResultDto saveTaskType(@RequestBody CalendarTaskType calendarTaskType){
return calendarServiceImpl.saveTaskType(calendarTaskType);
......
......@@ -51,6 +51,7 @@ public class CalendarEventServiceImpl extends BaseService implements ICalendarEv
@Override
public OperationResultDto updateEvent(CalendarEvent event) {
int count = 0;
event.setCreateTime(null);
event.setUpdateTime(new Date());
try {
count = calendarEventMapper.updateByPrimaryKeySelective(event);
......
......@@ -9,6 +9,7 @@ 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.*;
import pwc.taxtech.atms.constant.enums.CalendarEnum;
import pwc.taxtech.atms.dpo.PagingDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
......@@ -354,18 +355,12 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
@Override
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);
}
List<CalendarEventDto> eventDtoList = getCalendarEventData(queryParamDto);
return new OperationResultDto(CollectionUtils.isNotEmpty(eventDtoList), "", eventDtoList);
}
public List getCalendarEventData(CalendarDisplayQueryParamDto queryParamDto) {
public List<CalendarEventDto> getCalendarEventData(CalendarDisplayQueryParamDto queryParamDto) {
Date start = formatQueryDateTime(queryParamDto.getQueryStartTime(), false);
Date end = formatQueryDateTime(queryParamDto.getQueryEndTime(), true);
String startYearStr = String.format("%tY", start);
......@@ -378,8 +373,8 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
try {
CalendarConfigurationExample configExample = new CalendarConfigurationExample();
configExample.createCriteria()
.andValidDateStartLessThanOrEqualTo(end)
.andValidDateEndGreaterThan(end)
.andValidDateStartLessThan(end)
.andValidDateEndGreaterThanOrEqualTo(start)
.andStatusEqualTo(Byte.parseByte("1"));
configList = calendarConfigurationMapper.selectByExample(configExample);
} catch (Exception e) {
......@@ -406,33 +401,66 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
log.error("eventList error", e);
}
if (CollectionUtils.isEmpty(eventList)) {
return config2EventList;
}
// if (CollectionUtils.isEmpty(eventList)) {
// return config2EventList;
// }
//
// if (CollectionUtils.isEmpty(config2EventList)) {
// return eventList;
// }
if (CollectionUtils.isEmpty(config2EventList)) {
return eventList;
}
//todo 去除config中重复的
//去除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;
if(CollectionUtils.isNotEmpty(eventList)) {
config2EventList = 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());
}
List<CalendarEventDto> eventDtoList = new ArrayList<>();
add2CalendarEventDtoList(eventDtoList, eventList, CalendarEnum.EVENT_TYPE_USER_DEFINE.getCode());
add2CalendarEventDtoList(eventDtoList, config2EventList, CalendarEnum.EVENT_TYPE_SYSTEM_CONFIG.getCode());
return eventDtoList;
}
/**
* 将结果转换为CalendarEventDto List,并为EntityName,TaskTypeName,Type赋值
* @param sourceList
* @param type
* @return
*/
private List<CalendarEventDto> add2CalendarEventDtoList(List<CalendarEventDto> eventDtoList, List<CalendarEvent> sourceList, String type) {
Map<Long, EntityDto> activeEntityMap = null;
Map<Long, CalendarTaskTypeDto> taskTypeMap = null;
if (CollectionUtils.isNotEmpty(sourceList)) {
activeEntityMap = calendarExtMapper.getActiveEntityMapList();
taskTypeMap = calendarExtMapper.getAllTaskTypeMapList();
}
for (CalendarEvent p : sourceList) {
CalendarEventDto dto = new CalendarEventDto();
beanUtil.copyProperties(p, dto);
dto.setEntityName(activeEntityMap.get(p.getEntityId()).getName());
dto.setTaskTypeName(taskTypeMap.get(p.getTaskTypeId()).getName());
dto.setType(Integer.parseInt(type));
eventDtoList.add(dto);
}
return eventDtoList;
}
private List<CalendarEvent> config2EventList(List<CalendarConfiguration> configList, String startYearStr, String endYearStr, Date start, Date end, Map<Long, EntityDto> activeEntityMap) {
......@@ -452,18 +480,33 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
.forEach(month -> Arrays.stream(p.getProjectDays().split(","))
.forEach(day -> {
//TODO 跨年未处理 特殊日期未处理
//查询30天内的数据不会出现不同年份同一个月日的情况
Date dueDate = str2Date(startYearStr + "-" + month + "-" + day);
if (dueDate != null && dueDate.compareTo(start) >= 0 && dueDate.compareTo(end) < 0) {
boolean isEffective = dueDate != null
&& dueDate.compareTo(start) >= 0
&& dueDate.compareTo(p.getValidDateStart()) >= 0
&& dueDate.compareTo(formatQueryDateTime(p.getValidDateEnd(), true)) < 0
&& dueDate.compareTo(end) < 0;
//
if (!endYearStr.equals(startYearStr)) {
dueDate = str2Date(endYearStr + "-" + month + "-" + day);
isEffective = dueDate != null
&& dueDate.compareTo(start) >= 0
&& dueDate.compareTo(p.getValidDateStart()) >= 0
&& dueDate.compareTo(formatQueryDateTime(p.getValidDateEnd(), true)) < 0
&& dueDate.compareTo(end) < 0;
}
if (isEffective) {
CalendarEvent event = new CalendarEvent();
event.setId(p.getId());
event.setId(idService.nextId());
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.setStatus(Byte.parseByte(CalendarEnum.CALENDAR_EVENT_NOT_COMPLETED.getCode()));
event.setCreateTime(p.getCreateTime());
event.setDueDate(dueDate);
event.setEffectiveDate(p.getCreateTime());
......
......@@ -56,11 +56,13 @@
<table tableName="calendar_configuration" domainObjectName="CalendarConfiguration">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="notes" javaType="java.lang.String" jdbcType="VARCHAR"/>
</table>
<table tableName="calendar_event" domainObjectName="CalendarEvent">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="notes" javaType="java.lang.String" jdbcType="VARCHAR"/>
</table>
<table tableName="calendar_jurisdiction" domainObjectName="CalendarJurisdiction">
......
......@@ -49,14 +49,6 @@ public interface CalendarConfigurationMapper extends MyMapper {
*/
int insertSelective(CalendarConfiguration record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_configuration
*
* @mbg.generated
*/
List<CalendarConfiguration> selectByExampleWithBLOBs(CalendarConfigurationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_configuration
......@@ -81,14 +73,6 @@ public interface CalendarConfigurationMapper extends MyMapper {
*/
int updateByExampleSelective(@Param("record") CalendarConfiguration record, @Param("example") CalendarConfigurationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_configuration
*
* @mbg.generated
*/
int updateByExampleWithBLOBs(@Param("record") CalendarConfiguration record, @Param("example") CalendarConfigurationExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_configuration
......@@ -105,14 +89,6 @@ public interface CalendarConfigurationMapper extends MyMapper {
*/
int updateByPrimaryKeySelective(CalendarConfiguration record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_configuration
*
* @mbg.generated
*/
int updateByPrimaryKeyWithBLOBs(CalendarConfiguration record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_configuration
......
......@@ -49,14 +49,6 @@ public interface CalendarEventMapper extends MyMapper {
*/
int insertSelective(CalendarEvent record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_event
*
* @mbg.generated
*/
List<CalendarEvent> selectByExampleWithBLOBs(CalendarEventExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_event
......@@ -81,14 +73,6 @@ public interface CalendarEventMapper extends MyMapper {
*/
int updateByExampleSelective(@Param("record") CalendarEvent record, @Param("example") CalendarEventExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_event
*
* @mbg.generated
*/
int updateByExampleWithBLOBs(@Param("record") CalendarEvent record, @Param("example") CalendarEventExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_event
......@@ -105,14 +89,6 @@ public interface CalendarEventMapper extends MyMapper {
*/
int updateByPrimaryKeySelective(CalendarEvent record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_event
*
* @mbg.generated
*/
int updateByPrimaryKeyWithBLOBs(CalendarEvent record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_event
......
......@@ -44,6 +44,13 @@ public class CalendarEventDto implements Serializable {
private String notes;
private Date createTime;
/**
* 构建的event类型
*/
private Integer type;
public Long getId() {
return id;
}
......@@ -139,4 +146,20 @@ public class CalendarEventDto implements Serializable {
public void setNotes(String notes) {
this.notes = notes;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
......@@ -93,6 +93,15 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
*/
private String staff;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_configuration.notes
*
* @mbg.generated
*/
private String notes;
/**
*
* This field was generated by MyBatis Generator.
......@@ -129,15 +138,6 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
*/
private Date updateTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_configuration.notes
*
* @mbg.generated
*/
private String notes;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table calendar_configuration
......@@ -362,6 +362,30 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
this.staff = staff == null ? null : staff.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_configuration.notes
*
* @return the value of calendar_configuration.notes
*
* @mbg.generated
*/
public String getNotes() {
return notes;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_configuration.notes
*
* @param notes the value for calendar_configuration.notes
*
* @mbg.generated
*/
public void setNotes(String notes) {
this.notes = notes == null ? null : notes.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_configuration.order_index
......@@ -458,30 +482,6 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_configuration.notes
*
* @return the value of calendar_configuration.notes
*
* @mbg.generated
*/
public String getNotes() {
return notes;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_configuration.notes
*
* @param notes the value for calendar_configuration.notes
*
* @mbg.generated
*/
public void setNotes(String notes) {
this.notes = notes == null ? null : notes.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_configuration
......@@ -503,11 +503,11 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
sb.append(", validDateStart=").append(validDateStart);
sb.append(", validDateEnd=").append(validDateEnd);
sb.append(", staff=").append(staff);
sb.append(", notes=").append(notes);
sb.append(", orderIndex=").append(orderIndex);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", notes=").append(notes);
sb.append("]");
return sb.toString();
}
......
......@@ -795,6 +795,76 @@ public class CalendarConfigurationExample {
return (Criteria) this;
}
public Criteria andNotesIsNull() {
addCriterion("notes is null");
return (Criteria) this;
}
public Criteria andNotesIsNotNull() {
addCriterion("notes is not null");
return (Criteria) this;
}
public Criteria andNotesEqualTo(String value) {
addCriterion("notes =", value, "notes");
return (Criteria) this;
}
public Criteria andNotesNotEqualTo(String value) {
addCriterion("notes <>", value, "notes");
return (Criteria) this;
}
public Criteria andNotesGreaterThan(String value) {
addCriterion("notes >", value, "notes");
return (Criteria) this;
}
public Criteria andNotesGreaterThanOrEqualTo(String value) {
addCriterion("notes >=", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLessThan(String value) {
addCriterion("notes <", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLessThanOrEqualTo(String value) {
addCriterion("notes <=", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLike(String value) {
addCriterion("notes like", value, "notes");
return (Criteria) this;
}
public Criteria andNotesNotLike(String value) {
addCriterion("notes not like", value, "notes");
return (Criteria) this;
}
public Criteria andNotesIn(List<String> values) {
addCriterion("notes in", values, "notes");
return (Criteria) this;
}
public Criteria andNotesNotIn(List<String> values) {
addCriterion("notes not in", values, "notes");
return (Criteria) this;
}
public Criteria andNotesBetween(String value1, String value2) {
addCriterion("notes between", value1, value2, "notes");
return (Criteria) this;
}
public Criteria andNotesNotBetween(String value1, String value2) {
addCriterion("notes not between", value1, value2, "notes");
return (Criteria) this;
}
public Criteria andOrderIndexIsNull() {
addCriterion("order_index is null");
return (Criteria) this;
......
......@@ -48,6 +48,15 @@ public class CalendarEvent extends BaseEntity implements Serializable {
*/
private Long taskTypeId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.notes
*
* @mbg.generated
*/
private String notes;
/**
*
* This field was generated by MyBatis Generator.
......@@ -117,15 +126,6 @@ public class CalendarEvent extends BaseEntity implements Serializable {
*/
private Date updateTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.notes
*
* @mbg.generated
*/
private String notes;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table calendar_event
......@@ -230,6 +230,30 @@ public class CalendarEvent extends BaseEntity implements Serializable {
this.taskTypeId = taskTypeId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.notes
*
* @return the value of calendar_event.notes
*
* @mbg.generated
*/
public String getNotes() {
return notes;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.notes
*
* @param notes the value for calendar_event.notes
*
* @mbg.generated
*/
public void setNotes(String notes) {
this.notes = notes == null ? null : notes.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.staff
......@@ -398,30 +422,6 @@ public class CalendarEvent extends BaseEntity implements Serializable {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.notes
*
* @return the value of calendar_event.notes
*
* @mbg.generated
*/
public String getNotes() {
return notes;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.notes
*
* @param notes the value for calendar_event.notes
*
* @mbg.generated
*/
public void setNotes(String notes) {
this.notes = notes == null ? null : notes.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table calendar_event
......@@ -438,6 +438,7 @@ public class CalendarEvent extends BaseEntity implements Serializable {
sb.append(", taskName=").append(taskName);
sb.append(", entityId=").append(entityId);
sb.append(", taskTypeId=").append(taskTypeId);
sb.append(", notes=").append(notes);
sb.append(", staff=").append(staff);
sb.append(", effectiveDate=").append(effectiveDate);
sb.append(", dueDate=").append(dueDate);
......@@ -445,7 +446,6 @@ public class CalendarEvent extends BaseEntity implements Serializable {
sb.append(", orderIndex=").append(orderIndex);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", notes=").append(notes);
sb.append("]");
return sb.toString();
}
......
......@@ -445,6 +445,76 @@ public class CalendarEventExample {
return (Criteria) this;
}
public Criteria andNotesIsNull() {
addCriterion("notes is null");
return (Criteria) this;
}
public Criteria andNotesIsNotNull() {
addCriterion("notes is not null");
return (Criteria) this;
}
public Criteria andNotesEqualTo(String value) {
addCriterion("notes =", value, "notes");
return (Criteria) this;
}
public Criteria andNotesNotEqualTo(String value) {
addCriterion("notes <>", value, "notes");
return (Criteria) this;
}
public Criteria andNotesGreaterThan(String value) {
addCriterion("notes >", value, "notes");
return (Criteria) this;
}
public Criteria andNotesGreaterThanOrEqualTo(String value) {
addCriterion("notes >=", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLessThan(String value) {
addCriterion("notes <", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLessThanOrEqualTo(String value) {
addCriterion("notes <=", value, "notes");
return (Criteria) this;
}
public Criteria andNotesLike(String value) {
addCriterion("notes like", value, "notes");
return (Criteria) this;
}
public Criteria andNotesNotLike(String value) {
addCriterion("notes not like", value, "notes");
return (Criteria) this;
}
public Criteria andNotesIn(List<String> values) {
addCriterion("notes in", values, "notes");
return (Criteria) this;
}
public Criteria andNotesNotIn(List<String> values) {
addCriterion("notes not in", values, "notes");
return (Criteria) this;
}
public Criteria andNotesBetween(String value1, String value2) {
addCriterion("notes between", value1, value2, "notes");
return (Criteria) this;
}
public Criteria andNotesNotBetween(String value1, String value2) {
addCriterion("notes not between", value1, value2, "notes");
return (Criteria) this;
}
public Criteria andStaffIsNull() {
addCriterion("staff is null");
return (Criteria) this;
......
......@@ -15,18 +15,12 @@
<result column="valid_date_start" jdbcType="TIMESTAMP" property="validDateStart" />
<result column="valid_date_end" jdbcType="TIMESTAMP" property="validDateEnd" />
<result column="staff" jdbcType="VARCHAR" property="staff" />
<result column="notes" jdbcType="VARCHAR" property="notes" />
<result column="order_index" jdbcType="INTEGER" property="orderIndex" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="pwc.taxtech.atms.calendar.entity.CalendarConfiguration">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="notes" jdbcType="LONGVARCHAR" property="notes" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
......@@ -99,35 +93,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, task_name, entity_ids, task_type_ids, project_months, project_days, valid_date_start,
valid_date_end, staff, order_index, `status`, create_time, update_time
valid_date_end, staff, notes, order_index, `status`, create_time, update_time
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
notes
</sql>
<select id="selectByExampleWithBLOBs" parameterType="pwc.taxtech.atms.calendar.entity.CalendarConfigurationExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from calendar_configuration
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="pwc.taxtech.atms.calendar.entity.CalendarConfigurationExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
......@@ -146,15 +113,13 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from calendar_configuration
where id = #{id,jdbcType=BIGINT}
</select>
......@@ -184,13 +149,13 @@
insert into calendar_configuration (id, task_name, entity_ids,
task_type_ids, project_months, project_days,
valid_date_start, valid_date_end, staff,
order_index, `status`, create_time,
update_time, notes)
notes, order_index, `status`,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR}, #{entityIds,jdbcType=VARCHAR},
#{taskTypeIds,jdbcType=VARCHAR}, #{projectMonths,jdbcType=VARCHAR}, #{projectDays,jdbcType=VARCHAR},
#{validDateStart,jdbcType=TIMESTAMP}, #{validDateEnd,jdbcType=TIMESTAMP}, #{staff,jdbcType=VARCHAR},
#{orderIndex,jdbcType=INTEGER}, #{status,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{notes,jdbcType=LONGVARCHAR})
#{notes,jdbcType=VARCHAR}, #{orderIndex,jdbcType=INTEGER}, #{status,jdbcType=TINYINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.calendar.entity.CalendarConfiguration">
<!--
......@@ -226,6 +191,9 @@
<if test="staff != null">
staff,
</if>
<if test="notes != null">
notes,
</if>
<if test="orderIndex != null">
order_index,
</if>
......@@ -238,9 +206,6 @@
<if test="updateTime != null">
update_time,
</if>
<if test="notes != null">
notes,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -270,6 +235,9 @@
<if test="staff != null">
#{staff,jdbcType=VARCHAR},
</if>
<if test="notes != null">
#{notes,jdbcType=VARCHAR},
</if>
<if test="orderIndex != null">
#{orderIndex,jdbcType=INTEGER},
</if>
......@@ -282,9 +250,6 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="notes != null">
#{notes,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.calendar.entity.CalendarConfigurationExample" resultType="java.lang.Long">
......@@ -331,6 +296,9 @@
<if test="record.staff != null">
staff = #{record.staff,jdbcType=VARCHAR},
</if>
<if test="record.notes != null">
notes = #{record.notes,jdbcType=VARCHAR},
</if>
<if test="record.orderIndex != null">
order_index = #{record.orderIndex,jdbcType=INTEGER},
</if>
......@@ -343,38 +311,11 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.notes != null">
notes = #{record.notes,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update calendar_configuration
set id = #{record.id,jdbcType=BIGINT},
task_name = #{record.taskName,jdbcType=VARCHAR},
entity_ids = #{record.entityIds,jdbcType=VARCHAR},
task_type_ids = #{record.taskTypeIds,jdbcType=VARCHAR},
project_months = #{record.projectMonths,jdbcType=VARCHAR},
project_days = #{record.projectDays,jdbcType=VARCHAR},
valid_date_start = #{record.validDateStart,jdbcType=TIMESTAMP},
valid_date_end = #{record.validDateEnd,jdbcType=TIMESTAMP},
staff = #{record.staff,jdbcType=VARCHAR},
order_index = #{record.orderIndex,jdbcType=INTEGER},
`status` = #{record.status,jdbcType=TINYINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
notes = #{record.notes,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
......@@ -390,6 +331,7 @@
valid_date_start = #{record.validDateStart,jdbcType=TIMESTAMP},
valid_date_end = #{record.validDateEnd,jdbcType=TIMESTAMP},
staff = #{record.staff,jdbcType=VARCHAR},
notes = #{record.notes,jdbcType=VARCHAR},
order_index = #{record.orderIndex,jdbcType=INTEGER},
`status` = #{record.status,jdbcType=TINYINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
......@@ -429,6 +371,9 @@
<if test="staff != null">
staff = #{staff,jdbcType=VARCHAR},
</if>
<if test="notes != null">
notes = #{notes,jdbcType=VARCHAR},
</if>
<if test="orderIndex != null">
order_index = #{orderIndex,jdbcType=INTEGER},
</if>
......@@ -441,33 +386,9 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="notes != null">
notes = #{notes,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="pwc.taxtech.atms.calendar.entity.CalendarConfiguration">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update calendar_configuration
set task_name = #{taskName,jdbcType=VARCHAR},
entity_ids = #{entityIds,jdbcType=VARCHAR},
task_type_ids = #{taskTypeIds,jdbcType=VARCHAR},
project_months = #{projectMonths,jdbcType=VARCHAR},
project_days = #{projectDays,jdbcType=VARCHAR},
valid_date_start = #{validDateStart,jdbcType=TIMESTAMP},
valid_date_end = #{validDateEnd,jdbcType=TIMESTAMP},
staff = #{staff,jdbcType=VARCHAR},
order_index = #{orderIndex,jdbcType=INTEGER},
`status` = #{status,jdbcType=TINYINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
notes = #{notes,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.calendar.entity.CalendarConfiguration">
<!--
WARNING - @mbg.generated
......@@ -482,6 +403,7 @@
valid_date_start = #{validDateStart,jdbcType=TIMESTAMP},
valid_date_end = #{validDateEnd,jdbcType=TIMESTAMP},
staff = #{staff,jdbcType=VARCHAR},
notes = #{notes,jdbcType=VARCHAR},
order_index = #{orderIndex,jdbcType=INTEGER},
`status` = #{status,jdbcType=TINYINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
......
......@@ -10,6 +10,7 @@
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
<result column="entity_id" jdbcType="BIGINT" property="entityId" />
<result column="task_type_id" jdbcType="BIGINT" property="taskTypeId" />
<result column="notes" jdbcType="VARCHAR" property="notes" />
<result column="staff" jdbcType="VARCHAR" property="staff" />
<result column="effective_date" jdbcType="TIMESTAMP" property="effectiveDate" />
<result column="due_date" jdbcType="TIMESTAMP" property="dueDate" />
......@@ -18,13 +19,6 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="pwc.taxtech.atms.calendar.entity.CalendarEvent">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="notes" jdbcType="LONGVARCHAR" property="notes" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
......@@ -96,36 +90,9 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, task_name, entity_id, task_type_id, staff, effective_date, due_date, `status`,
id, task_name, entity_id, task_type_id, notes, staff, effective_date, due_date, `status`,
order_index, create_time, update_time
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
notes
</sql>
<select id="selectByExampleWithBLOBs" parameterType="pwc.taxtech.atms.calendar.entity.CalendarEventExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from calendar_event
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="pwc.taxtech.atms.calendar.entity.CalendarEventExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
......@@ -144,15 +111,13 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from calendar_event
where id = #{id,jdbcType=BIGINT}
</select>
......@@ -180,14 +145,14 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into calendar_event (id, task_name, entity_id,
task_type_id, staff, effective_date,
due_date, `status`, order_index,
create_time, update_time, notes
task_type_id, notes, staff,
effective_date, due_date, `status`,
order_index, create_time, update_time
)
values (#{id,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR}, #{entityId,jdbcType=BIGINT},
#{taskTypeId,jdbcType=BIGINT}, #{staff,jdbcType=VARCHAR}, #{effectiveDate,jdbcType=TIMESTAMP},
#{dueDate,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT}, #{orderIndex,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{notes,jdbcType=LONGVARCHAR}
#{taskTypeId,jdbcType=BIGINT}, #{notes,jdbcType=VARCHAR}, #{staff,jdbcType=VARCHAR},
#{effectiveDate,jdbcType=TIMESTAMP}, #{dueDate,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT},
#{orderIndex,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.calendar.entity.CalendarEvent">
......@@ -209,6 +174,9 @@
<if test="taskTypeId != null">
task_type_id,
</if>
<if test="notes != null">
notes,
</if>
<if test="staff != null">
staff,
</if>
......@@ -230,9 +198,6 @@
<if test="updateTime != null">
update_time,
</if>
<if test="notes != null">
notes,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -247,6 +212,9 @@
<if test="taskTypeId != null">
#{taskTypeId,jdbcType=BIGINT},
</if>
<if test="notes != null">
#{notes,jdbcType=VARCHAR},
</if>
<if test="staff != null">
#{staff,jdbcType=VARCHAR},
</if>
......@@ -268,9 +236,6 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="notes != null">
#{notes,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.calendar.entity.CalendarEventExample" resultType="java.lang.Long">
......@@ -302,6 +267,9 @@
<if test="record.taskTypeId != null">
task_type_id = #{record.taskTypeId,jdbcType=BIGINT},
</if>
<if test="record.notes != null">
notes = #{record.notes,jdbcType=VARCHAR},
</if>
<if test="record.staff != null">
staff = #{record.staff,jdbcType=VARCHAR},
</if>
......@@ -323,36 +291,11 @@
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.notes != null">
notes = #{record.notes,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update calendar_event
set id = #{record.id,jdbcType=BIGINT},
task_name = #{record.taskName,jdbcType=VARCHAR},
entity_id = #{record.entityId,jdbcType=BIGINT},
task_type_id = #{record.taskTypeId,jdbcType=BIGINT},
staff = #{record.staff,jdbcType=VARCHAR},
effective_date = #{record.effectiveDate,jdbcType=TIMESTAMP},
due_date = #{record.dueDate,jdbcType=TIMESTAMP},
`status` = #{record.status,jdbcType=TINYINT},
order_index = #{record.orderIndex,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
notes = #{record.notes,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
......@@ -363,6 +306,7 @@
task_name = #{record.taskName,jdbcType=VARCHAR},
entity_id = #{record.entityId,jdbcType=BIGINT},
task_type_id = #{record.taskTypeId,jdbcType=BIGINT},
notes = #{record.notes,jdbcType=VARCHAR},
staff = #{record.staff,jdbcType=VARCHAR},
effective_date = #{record.effectiveDate,jdbcType=TIMESTAMP},
due_date = #{record.dueDate,jdbcType=TIMESTAMP},
......@@ -390,6 +334,9 @@
<if test="taskTypeId != null">
task_type_id = #{taskTypeId,jdbcType=BIGINT},
</if>
<if test="notes != null">
notes = #{notes,jdbcType=VARCHAR},
</if>
<if test="staff != null">
staff = #{staff,jdbcType=VARCHAR},
</if>
......@@ -411,31 +358,9 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="notes != null">
notes = #{notes,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="pwc.taxtech.atms.calendar.entity.CalendarEvent">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update calendar_event
set task_name = #{taskName,jdbcType=VARCHAR},
entity_id = #{entityId,jdbcType=BIGINT},
task_type_id = #{taskTypeId,jdbcType=BIGINT},
staff = #{staff,jdbcType=VARCHAR},
effective_date = #{effectiveDate,jdbcType=TIMESTAMP},
due_date = #{dueDate,jdbcType=TIMESTAMP},
`status` = #{status,jdbcType=TINYINT},
order_index = #{orderIndex,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
notes = #{notes,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.calendar.entity.CalendarEvent">
<!--
WARNING - @mbg.generated
......@@ -445,6 +370,7 @@
set task_name = #{taskName,jdbcType=VARCHAR},
entity_id = #{entityId,jdbcType=BIGINT},
task_type_id = #{taskTypeId,jdbcType=BIGINT},
notes = #{notes,jdbcType=VARCHAR},
staff = #{staff,jdbcType=VARCHAR},
effective_date = #{effectiveDate,jdbcType=TIMESTAMP},
due_date = #{dueDate,jdbcType=TIMESTAMP},
......
......@@ -824,6 +824,8 @@
"RelatedTaxMoneyColon": "涉及税款:",
"OperatorNamesColon": "办事人:",
"TaxEventDateColon": "日期:",
"CalendarEventEffectiveDate": "生效日期:",
"CalendarEventDueDate": "截止日期:",
"StatusColon": "状态:",
"UploadAddiction": "上传附件",
"AttachmentRemarkColon": "附言:",
......
......@@ -576,11 +576,11 @@
model.id = null;
}
//暂时写死,以后修改完善
//TODO 暂时写死,以后修改完善
if (model.id == null){
model.taskName = "default";
model.staff = "admin";
}
model.staff = loginContext.userName;
taxCalendarService.saveCalendarConfig(model).success(function (result) {
if (result.result) {
......
......@@ -619,7 +619,7 @@
entityId: '',
entityName: '',
operatorIDs: loginContext.userId,
eventDate: start,
dueDate: start,
status: 0,
btnCreate: true,
taskTypeId: userDefine.id,
......@@ -632,7 +632,7 @@
function saveNewSchedule(scheduleData) {
var calendar = scheduleData.calendar || findCalendar(scheduleData.calendarId);
var schedule = {
id: String(chance.guid()),
// id: String(chance.guid()),
title: scheduleData.title,
isAllDay: scheduleData.isAllDay,
start: scheduleData.start,
......@@ -834,7 +834,11 @@
html.push(moment(cal.getDate().getTime()).format('YYYY.MM.DD'));
} else if (viewName === 'month' &&
(!options.month.visibleWeeksCount || options.month.visibleWeeksCount > 4)) {
html.push(moment(cal.getDate().getTime()).format('YYYY.MM'));
// html.push(moment(cal.getDate().getTime()).format('YYYY.MM'));
html.push(moment(cal.getDateRangeStart().getTime()).format('YYYY.MM.DD'));
html.push(' ~ ');
html.push(moment(cal.getDateRangeEnd().getTime()).format('YYYY.MM.DD'));
} else {
html.push(moment(cal.getDateRangeStart().getTime()).format('YYYY.MM.DD'));
html.push(' ~ ');
......@@ -865,7 +869,7 @@
var schedule = new ScheduleInfo();
schedule.id = dto.id;
schedule.calendarId = dto.taskTypeId;
schedule.title = dto.taskName + (dto.status == "0" ? "-未完成" : "-已完成");
schedule.title = dto.taskName + (dto.status == "0" ? " - 未完成" : " - 已完成");
schedule.isAllday = true;
schedule.notes = dto.notes;
schedule.start = new Date(dto.dueDate);
......@@ -922,19 +926,14 @@
// })
// }
// });
// 自定义事件,只能显示自己自定义的
//没有id的是从config表中生成数据,存在id的是从event表中查询出的数据
var scheduleDtoList = {};
if(result.result) {
// result = _.filter(result.data, function (r) {
// if (r.type === constant.EnumTaxEventType.UserDefine) {
// return false;
// }
// return true;
// });
result = result.data;
scheduleDtoList = result.data;
}
refreshAll(result);
refreshAll(scheduleDtoList);
}).error(function (ex) {
$log.error(ex);
......@@ -1184,32 +1183,37 @@
// 直接重新取数据
var data = {
id: param.data.id,
taskName : param.data.taskName,
type: param.data.type,
taskTypeId: param.data.taskTypeId,
taskTypeName: param.data.taskTypeName,
entityId: param.data.entityId,
entityName: param.data.entityName,
staff: param.data.staff,
notes: param.data.notes,
status: param.data.status,
// workPlaceID: param.data.workPlaceID,
// workPlaceName: param.data.workPlaceName,
isRelatedTaxMoney: param.data.isRelatedTaxMoney,
operatorIDs: param.data.operatorIDs,
operatorNames: param.data.operatorNames,
notifierIDs: param.data.notifierIDs,
notifierNames: param.data.notifierNames,
operationDate: param.data.operationDate,
remark: param.data.remark,
status: param.data.status,
postscript: param.data.postscript,
// isRelatedTaxMoney: param.data.isRelatedTaxMoney,
// operatorIDs: param.data.operatorIDs,
// operatorNames: param.data.operatorNames,
// notifierIDs: param.data.notifierIDs,
// notifierNames: param.data.notifierNames,
// operationDate: param.data.operationDate,
// remark: param.data.remark,
// postscript: param.data.postscript,
createTime: param.data.createTime,
updateTime: param.data.updateTime,
eventDate: param.data.eventDate,
// dueDate: param.data.dueDate,
attachRemark: param.data.attachRemark,
start: param.data.eventDate,
end: param.data.eventDate,
eventName: param.data.eventName,
calendarNumber: param.data.calendarNumber,
completeUserID: param.data.completeUserID,
completeUserName:param.data.completeUserName,
start: param.data.dueDate,
end: param.data.dueDate,
// eventName: param.data.eventName,
// calendarNumber: param.data.calendarNumber,
// completeUserID: param.data.completeUserID,
// completeUserName:param.data.completeUserName,
fileList: param.data.fileList
};
......@@ -1259,16 +1263,17 @@
};
$scope.popupOptions.operateModel = {
operatorNames: loginContext.userName,
staff: loginContext.userName,
type: 1,
entityId: '',
entityName: '',
operatorIDs: loginContext.userId,
eventDate: e.start,
// operatorIDs: loginContext.userId,
effectiveDate: new Date(),
dueDate: e.start,
status: 0,
guideBound: guideBound,
taskTypeId: userDefine.id,
taskTypeName: userDefine.taskTypeName,
taskTypeName: userDefine.name,
colorGroup: userDefine.colorGroup
};
......@@ -1294,9 +1299,9 @@
//修改日历设置事项的事项类别
var userDefine = getUserDefineTaxProject();
if ($scope.popupOptions.operateModel.taskTypeName != userDefine.taskTypeName) {
$scope.popupOptions.operateModel.taxProjectName = $translate.instant('CalendarSetEvent');
}
// if ($scope.popupOptions.operateModel.taskTypeName != userDefine.name) {
// $scope.popupOptions.operateModel.taskTypeName = $translate.instant('CalendarSetEvent');
// }
}
}
};
......
......@@ -86,6 +86,7 @@
<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">
......
......@@ -35,7 +35,7 @@
operateType: null,
init: function () {
// body...
$scope.workPlaceList = [{ id: '234234', name: 'test' }];
$scope.entityList = [{ id: '234234', name: 'test' }];
$scope.isRead = false;
......@@ -47,19 +47,19 @@
$scope.editModel = {};
taxCalendarService.getActiveEntityList().success(function (result) {
if (result.result) {
$scope.workPlaceList = result.data;
$scope.entityList = result.data;
}
});
userService.getUserOwnOrganization(loginContext.userName).success(function (data) {
if (data && data.result) {
cacheDataService.userOwnOrg = data.data;
} else {
SweetAlert.warning($translate.instant('SystemException'));
}
}).error(function (data) {
SweetAlert.warning($translate.instant('SystemException'));
});
// userService.getUserOwnOrganization(loginContext.userName).success(function (data) {
// // if (data && data.result) {
// // cacheDataService.userOwnOrg = data.data;
// // } else {
// // SweetAlert.warning($translate.instant('SystemException'));
// // }
// // }).error(function (data) {
// // SweetAlert.warning($translate.instant('SystemException'));
// // });
popupService.initOptions();
......@@ -114,10 +114,10 @@
},
initOptions: function () {
// body...
$scope.addressOptions = {
$scope.entityOptions = {
bindingOptions: {
dataSource: 'workPlaceList',
value: 'editModel.workPlaceID',
dataSource: 'entityList',
value: 'editModel.entityId',
disabled: 'isReadOnly'
},
displayExpr: 'name',
......@@ -128,7 +128,7 @@
if (e && e.component) {
var data = e.component.option('selectedItem');
if (data) {
$scope.editModel.workPlaceName = data.name;
$scope.editModel.entityName = data.name;
}
}
},
......@@ -175,9 +175,10 @@
$scope.isReadOnly = false;
if ($scope.operateModel) {
$scope.editModel = $scope.operateModel;
$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.taskTypeNameShow = $scope.editModel.taskTypeName;
// $scope.editModel.id = window.PWC.newGuid();
$scope.editModel.effectiveDate = new Date($scope.operateModel.effectiveDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.dueDate = new Date($scope.operateModel.dueDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.statusText = $translate.instant(taxEventFinishStatus[$scope.editModel.status]);
$scope.styleOptions = {
......@@ -186,13 +187,13 @@
};
} else {
$scope.editModel = {};
$scope.editModel.id = window.PWC.newGuid();
// $scope.editModel.id = window.PWC.newGuid();
$scope.editModel.typeText = $translate.instant(taxEventType[1]);
}
$scope.isRead = true;
$scope.editModel.entityName = cacheDataService.userOwnOrg.name;
$scope.editModel.entityId = cacheDataService.userOwnOrg.id;
// $scope.editModel.entityName = cacheDataService.userOwnOrg.name;
// $scope.editModel.entityId = cacheDataService.userOwnOrg.id;
popupService.locationHander = dateLocationService;
popupService.show();
......@@ -203,14 +204,16 @@
if ($scope.operateModel) {
$scope.editModel = $scope.operateModel;
var showText = $scope.operateModel.taskTypeName;
// var showText = $scope.operateModel.taskTypeName;
if ($scope.operateModel.calendarNumber) {
showText += ' ' + $scope.operateModel.calendarNumber;
}
// if ($scope.operateModel.calendarNumber) {
// showText += ' ' + $scope.operateModel.calendarNumber;
// }
// $scope.editModel.taskTypeNameShow = showText;
$scope.editModel.taskTypeNameShow = showText;
$scope.editModel.eventDate = new Date($scope.operateModel.eventDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.effectiveDate = new Date($scope.operateModel.effectiveDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.dueDate = new Date($scope.operateModel.dueDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.statusText = $translate.instant(taxEventFinishStatus[$scope.editModel.status]);
$scope.editModel.typeText = $translate.instant(taxEventType[$scope.editModel.type]);
$scope.isReadOnly = true;
......@@ -327,6 +330,7 @@
if (model.status === constant.EnumTaxEventFinishStatus.Finished) {
model.completeUserID = loginContext.userId;
model.completeUserName = loginContext.userName;
model.staff = loginContext.userName;
}
//添加事项关联的附件
//if ($scope.editModel.fileList && $scope.editModel.fileList.length > 0) {
......@@ -363,6 +367,7 @@
model.operationDate = new Date();
model.completeUserID = loginContext.userId;
model.completeUserName = loginContext.userName;
model.staff = loginContext.userName;
}
taxCalendarEventService.update(model).success(function (data) {
......
......@@ -6,7 +6,7 @@
<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 class="inline-width20 edit-box" dx-text-box="{bindingOptions:{value:'editModel.taskName',disabled:'isReadOnly'}}" dx-validator="taxProjectNameValidateOpt"></div>
</div>
<div class="row-block" style="padding-bottom: 9px;">
......@@ -14,7 +14,7 @@
<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.taskTypeNameShow}}</span>
<span ng-style="styleOptions"></span><span>{{editModel.taskTypeName}}</span>
</label>
</div>
</div>
......@@ -25,8 +25,8 @@
<!-- </div>-->
<div class="row-block">
<div class="inline-width5" translate="WorkPlaceNameColon"></div>
<div dx-select-box="addressOptions" class="inline-width20 edit-box"></div>
<div class="inline-width5" translate="CompanyNameColon"></div>
<div dx-select-box="entityOptions" 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>-->
......@@ -35,14 +35,14 @@
</div>
<div class="row-block">
<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 class="inline-width5" translate="CalendarEventEffectiveDate"></div>
<div class="inline-width9 edit-box" dx-date-box="{type: 'date',bindingOptions:{value:'editModel.effectiveDate',disabled:'isReadOnly'}}"></div>
<div class="inline-width5" translate="CalendarEventDueDate"></div>
<div class="inline-width9 edit-box" dx-date-box="{type: 'date',bindingOptions:{value:'editModel.dueDate',disabled:'isReadOnly'}}"></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-width9 edit-box" dx-text-box="{disabled:true,bindingOptions:{value:'editModel.staff'}}"></div>
</div>
<!-- <div class="row-block">-->
<!-- <div class="inline-width5" translate="RelatedPerson"></div>-->
......@@ -50,7 +50,7 @@
<!-- </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>
<div class="remark" dx-text-area="{bindingOptions:{value:'editModel.notes',disabled:'isReadOnly'}}"></div>
</div>
<div class="row-split"></div>
......@@ -74,9 +74,9 @@
<div class="row-block" ng-show="editModel.status===1 && saveType === 'query'">
<div class="inline-width5" translate="CompleteUserColon"></div>
<div class="inline-width9-text">{{editModel.completeUserName}}</div>
<div class="inline-width9-text">{{editModel.staff}}</div>
<div class="inline-width5" translate="CompleteDateColon"></div>
<div class="inline-width9-text">{{editModel.operationDate | date:'yyyy-MM-dd HH:mm:ss'}}</div>
<div class="inline-width9-text">{{editModel.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</div>
</div>
</form>
<button class="tui-full-calendar-button tui-full-calendar-popup-close"><span class="tui-full-calendar-icon tui-full-calendar-ic-close" ng-click="popupEvent.close()"></span></button>
......
......@@ -6,15 +6,15 @@ function ($http, apiConfig, httpCacheService) {
return {
add: function (model) {
return $http.post('api/v1/calendarEvent/add', model, apiConfig.create());
return $http.post('/calendarEvent/add', model, apiConfig.create());
},
update: function (model) {
return $http.post('api/v1/calendarEvent/update', model, apiConfig.create());
return $http.post('/calendarEvent/update', model, apiConfig.create());
}
,
deleteEvent: function (model) {
return $http.post('api/v1/calendarEvent/delete', model, apiConfig.create());
return $http.post('/calendarEvent/delete', model, apiConfig.create());
}
};
}]);
\ No newline at end of file
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