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