Commit d1ff2b67 authored by Mccoy Z Xia's avatar Mccoy Z Xia

calendar config相关接口和页面

parent c00475eb
......@@ -20,7 +20,7 @@ import java.util.Map;
**/
@RestController
@RequestMapping("api/v1/")
public class CalendarController {
public class TaxCalendarController {
@RequestMapping("taxCalendar/getAllTaxProjectList")
@ResponseBody
......
package pwc.taxtech.atms.controller;
import org.apache.ibatis.annotations.Param;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.calendar.dao.ext.CalendarExtMapper;
import pwc.taxtech.atms.calendar.entity.CalendarConfiguration;
import pwc.taxtech.atms.calendar.entity.CalendarTaskType;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.calendar.CalendarConfigQueryParamDto;
import pwc.taxtech.atms.service.ICalendarService;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-10 13:59
* @Version: 1.0
**/
@RestController
@RequestMapping("api/v1/calendar/")
public class CalendarController {
private static final Logger log = LoggerFactory.getLogger(CalendarController.class);
@Autowired
private ICalendarService calendarServiceImpl;
@Resource
CalendarExtMapper calendarExtMapper;
@PostMapping("saveTaskType")
public OperationResultDto saveTaskType(@RequestBody CalendarTaskType calendarTaskType){
return calendarServiceImpl.saveTaskType(calendarTaskType);
}
@GetMapping("getAllTaskTypeList")
public OperationResultDto getAllTaskTypeList(){
return calendarServiceImpl.getAllTaskTypeList();
}
@GetMapping("getTaskTypeList")
public OperationResultDto getTaskTypeList(){
return calendarServiceImpl.getTaskTypeList();
}
@GetMapping("getMaxConfigOrder")
public OperationResultDto getMaxConfigOrder(){
return calendarServiceImpl.getMaxConfigOrder();
}
@PostMapping("getCalendarDataForDisplay")
public OperationResultDto getTaxCalendarDataForDisplay(@Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime){
return calendarServiceImpl.getTaxCalendarDataForDisplay(queryStartTime, queryEndTime);
}
@PostMapping("saveCalendarConfig")
public OperationResultDto saveCalendarConfig(@RequestBody CalendarConfiguration calendarConfig){
return calendarServiceImpl.saveCalendarConfig(calendarConfig);
}
@GetMapping("getCalendarConfigById/{id}")
public OperationResultDto getCalendarConfigById(@PathVariable("id") Long id){
return calendarServiceImpl.getCalendarConfigById(id);
}
@PostMapping("getCalendarConfigList")
public OperationResultDto getCalendarConfigList(@RequestBody CalendarConfigQueryParamDto queryParam){
return calendarServiceImpl.getCalendarConfigList(queryParam);
}
@GetMapping("getActiveEntityList")
public OperationResultDto getActiveEntityList(){
return calendarServiceImpl.getActiveEntityList();
}
}
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.calendar.entity.CalendarEvent;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.service.ICalendarEventService;
import javax.annotation.Resource;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-10 14:29
* @Version: 1.0
**/
@Resource
@RequestMapping("api/v1/calendarEvent/")
public class CalendarEventController {
@Autowired
private ICalendarEventService calendarEventServiceImpl;
@PostMapping("add")
public OperationResultDto addEvent(@RequestBody CalendarEvent event){
return calendarEventServiceImpl.addEvent(event);
}
@PostMapping("update")
public OperationResultDto updateEvent(@RequestBody CalendarEvent event){
return calendarEventServiceImpl.updateEvent(event);
}
@GetMapping("delete/{id}")
public OperationResultDto deleteEvent(@PathVariable("id") Long id){
return calendarEventServiceImpl.deleteEvent(id);
}
}
package pwc.taxtech.atms.dto.calendar;
import pwc.taxtech.atms.dpo.PagingDto;
import java.util.List;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-12 11:56
* @Version: 1.0
**/
public class CalendarConfigQueryParamDto {
private List<Long> entityIdList;
private List<Long> taskTypeList;
private List<Integer> configMonthList;
private List<Integer> configDayList;
private String staff;
private int queryType;
private Byte status;
private Integer orderIndex;
private PagingDto pagingParam;
public List<Long> getEntityIdList() {
return entityIdList;
}
public void setEntityIdList(List<Long> entityIdList) {
this.entityIdList = entityIdList;
}
public List<Long> getTaskTypeList() {
return taskTypeList;
}
public void setTaskTypeList(List<Long> taskTypeList) {
this.taskTypeList = taskTypeList;
}
public List<Integer> getConfigMonthList() {
return configMonthList;
}
public void setConfigMonthList(List<Integer> configMonthList) {
this.configMonthList = configMonthList;
}
public List<Integer> getConfigDayList() {
return configDayList;
}
public void setConfigDayList(List<Integer> configDayList) {
this.configDayList = configDayList;
}
public String getStaff() {
return staff;
}
public void setStaff(String staff) {
this.staff = staff;
}
public int getQueryType() {
return queryType;
}
public void setQueryType(int queryType) {
this.queryType = queryType;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public PagingDto getPagingParam() {
return pagingParam;
}
public void setPagingParam(PagingDto pagingParam) {
this.pagingParam = pagingParam;
}
public Integer getOrderIndex() {
return orderIndex;
}
public void setOrderIndex(Integer orderIndex) {
this.orderIndex = orderIndex;
}
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.calendar.entity.CalendarAction;
import pwc.taxtech.atms.dto.OperationResultDto;
public interface ICalendarActionService {
OperationResultDto saveEvent(CalendarAction record);
OperationResultDto deleteEvent(Long id);
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.calendar.entity.CalendarEvent;
import pwc.taxtech.atms.dto.OperationResultDto;
public interface ICalendarEventService {
OperationResultDto addEvent(CalendarEvent event);
OperationResultDto updateEvent(CalendarEvent event);
OperationResultDto deleteEvent(Long id);
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.calendar.dto.CalendarConfigDto;
import pwc.taxtech.atms.calendar.dto.CalendarTaskTypeDto;
import pwc.taxtech.atms.calendar.dto.EntityDto;
import pwc.taxtech.atms.calendar.entity.CalendarConfiguration;
import pwc.taxtech.atms.calendar.entity.CalendarTaskType;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.calendar.CalendarConfigQueryParamDto;
import java.util.Date;
import java.util.List;
public interface ICalendarService {
OperationResultDto deleteConfiguration(Long id);
OperationResultDto saveTaskType(CalendarTaskType record);
/**
* 获取除“自定义”的其他taskType
* @return
*/
OperationResultDto<List<CalendarTaskTypeDto>> getTaskTypeList();
/**
* 获取所有taskType
* @return
*/
OperationResultDto<List<CalendarTaskTypeDto>> getAllTaskTypeList();
OperationResultDto saveCalendarConfig(CalendarConfiguration calendarConfig);
OperationResultDto<CalendarConfigDto> getCalendarConfigById(Long id);
OperationResultDto getCalendarConfigList(CalendarConfigQueryParamDto queryParam);
OperationResultDto<List<EntityDto>> getActiveEntityList();
OperationResultDto getMaxConfigOrder();
OperationResultDto getTaxCalendarDataForDisplay(Date queryStartTime, Date queryEndTime);
}
package pwc.taxtech.atms.service.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.calendar.dao.CalendarActionJurisdictionRelationshipMapper;
import pwc.taxtech.atms.calendar.dao.CalendarActionMapper;
import pwc.taxtech.atms.calendar.dao.CalendarJurisdictionMapper;
import pwc.taxtech.atms.calendar.entity.CalendarAction;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.service.ICalendarActionService;
import javax.annotation.Resource;
import java.util.Date;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-10 16:19
* @Version: 1.0
**/
public class CalendarActionServiceImpl extends BaseService implements ICalendarActionService {
private static final Logger log = LoggerFactory.getLogger(CalendarActionServiceImpl.class);
@Resource
private CalendarActionMapper calendarActionMapper;
@Resource
private CalendarJurisdictionMapper calendarJurisdictionMapper;
@Resource
private CalendarActionJurisdictionRelationshipMapper calendarActionJurisdictionRelationshipMapper;
@Override
public OperationResultDto saveEvent(CalendarAction record) {
int count = 0;
try {
record.setUpdateTime(new Date());
// 无ID则新建,有ID则更新
if (record.getId() != null){
count = calendarActionMapper.updateByPrimaryKeySelective(record);
} else {
record.setId(idService.nextId());
record.setCreateTime(record.getUpdateTime());
count = calendarActionMapper.insert(record);
}
} catch (Exception e) {
log.error("save error", e);
}
boolean result = count > 0;
String msg = result ? "1" : "0";
return new OperationResultDto(result, msg);
}
@Override
public OperationResultDto deleteEvent(Long id) {
int count = 0;
try {
count = calendarActionMapper.deleteByPrimaryKey(id);
} catch (Exception e) {
log.error("deleteAction error", e);
}
boolean result = count > 0;
String msg = result ? "删除成功" : "删除失败";
return new OperationResultDto(result, msg);
}
}
package pwc.taxtech.atms.service.impl;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.calendar.dao.*;
import pwc.taxtech.atms.calendar.dao.ext.CalendarExtMapper;
import pwc.taxtech.atms.calendar.entity.CalendarEvent;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.service.ICalendarEventService;
import javax.annotation.Resource;
import java.util.Date;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-10 14:32
* @Version: 1.0
**/
@Service
public class CalendarEventServiceImpl extends BaseService implements ICalendarEventService {
private static final Logger log = LoggerFactory.getLogger(CalendarEventServiceImpl.class);
@Resource
private CalendarEventMapper calendarEventMapper;
@Override
public OperationResultDto addEvent(CalendarEvent event) {
if (event.getId() == null) {
event.setId(idService.nextId());
}
Date nowDate = new Date();
event.setCreateTime(nowDate);
event.setUpdateTime(nowDate);
int count = 0;
try {
count = calendarEventMapper.insert(event);
} catch (Exception e) {
log.error("addConfiguration error", e);
}
boolean result = count > 0;
String msg = result ? "1" : "-1";
return new OperationResultDto(result, msg);
}
@Override
public OperationResultDto updateEvent(CalendarEvent event) {
int count = 0;
event.setUpdateTime(new Date());
try {
count = calendarEventMapper.updateByPrimaryKeySelective(event);
} catch (Exception e) {
log.error("updateConfiguration error", e);
}
boolean result = count > 0;
String msg = result ? "1" : "-1";
return new OperationResultDto(result, msg);
}
@Override
public OperationResultDto deleteEvent(Long id) {
int count = 0;
try {
count = calendarEventMapper.deleteByPrimaryKey(id);
} catch (Exception e) {
log.error("deleteConfiguration error", e);
}
boolean result = count > 0;
String msg = result ? "1" : "-1";
return new OperationResultDto(result, msg);
}
}
package pwc.taxtech.atms.service.impl;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.calendar.dto.CalendarConfigDto;
import pwc.taxtech.atms.calendar.dto.CalendarConfigGroupByEntityDto;
import pwc.taxtech.atms.calendar.dto.CalendarTaskTypeDto;
import pwc.taxtech.atms.calendar.dto.EntityDto;
import pwc.taxtech.atms.calendar.dao.*;
import pwc.taxtech.atms.calendar.dao.ext.CalendarExtMapper;
import pwc.taxtech.atms.calendar.entity.CalendarConfiguration;
import pwc.taxtech.atms.calendar.entity.CalendarConfigurationExample;
import pwc.taxtech.atms.calendar.entity.CalendarTaskType;
import pwc.taxtech.atms.dpo.PagingDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.calendar.CalendarConfigQueryParamDto;
import pwc.taxtech.atms.service.ICalendarService;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-10 14:02
* @Version: 1.0
**/
@Service
public class CalendarServiceImpl extends BaseService implements ICalendarService {
private static final Logger log = LoggerFactory.getLogger(CalendarServiceImpl.class);
@Resource
private CalendarConfigurationMapper calendarConfigurationMapper;
@Resource
private CalendarTaskTypeMapper calendarTaskTypeMapper;
@Resource
private CalendarExtMapper calendarExtMapper;
@Override
public OperationResultDto deleteConfiguration(Long id) {
int count = 0;
try {
count = calendarConfigurationMapper.deleteByPrimaryKey(id);
} catch (Exception e) {
log.error("deleteConfiguration error", e);
}
boolean result = count > 0;
String msg = result ? "1" : "0";
return new OperationResultDto(result, msg);
}
@Override
public OperationResultDto saveTaskType(CalendarTaskType record) {
int count = 0;
try {
//校验名字是否重复
if (calendarExtMapper.checkTaskTypeNameIsExist(record.getName()) != null) {
return new OperationResultDto(false, "-1");
}
record.setUpdateTime(new Date());
// 无ID则新建,有ID则更新
if (record.getId() != null) {
count = calendarTaskTypeMapper.updateByPrimaryKeySelective(record);
} else {
record.setId(idService.nextId());
record.setCreateTime(record.getUpdateTime());
record.setStatus(Byte.parseByte("1"));
count = calendarTaskTypeMapper.insert(record);
}
} catch (Exception e) {
log.error("addTaskType error", e);
}
boolean result = count > 0;
String msg = result ? "1" : "0";
return new OperationResultDto(result, msg);
}
public OperationResultDto deleteTaskType(Long id) {
int count = 0;
try {
count = calendarTaskTypeMapper.deleteByPrimaryKey(id);
} catch (Exception e) {
log.error("deleteTaskType error", e);
}
boolean result = count > 0;
String msg = result ? "1" : "0";
return new OperationResultDto(result, msg);
}
@Override
public OperationResultDto getTaskTypeList() {
List<CalendarTaskTypeDto> list = null;
try {
list = calendarExtMapper.getTaskTypeList();
} catch (Exception e) {
log.error("getTaskTypeList error", e);
}
boolean result = list != null;
String msg = result ? "1" : "0";
return new OperationResultDto(result, msg, list);
}
@Override
public OperationResultDto getAllTaskTypeList() {
List<CalendarTaskTypeDto> list = null;
try {
list = calendarExtMapper.getAllTaskTypeList();
} catch (Exception e) {
log.error("getAllTaskTypeList error", e);
}
boolean result = list != null;
String msg = result ? "1" : "0";
return new OperationResultDto(result, msg, list);
}
@Override
public OperationResultDto saveCalendarConfig(CalendarConfiguration record) {
int count = 0;
try {
record.setUpdateTime(new Date());
// 无ID则新建,有ID则更新
if (record.getId() != null) {
count = calendarConfigurationMapper.updateByPrimaryKeySelective(record);
} else {
record.setId(idService.nextId());
record.setCreateTime(record.getUpdateTime());
count = calendarConfigurationMapper.insert(record);
}
} catch (Exception e) {
log.error("saveCalendarConfig error", e);
}
boolean result = count > 0;
String msg = result ? "1" : "0";
return new OperationResultDto(result, msg);
}
@Override
public OperationResultDto<CalendarConfigDto> getCalendarConfigById(Long id) {
if (id == null) {
return new OperationResultDto(false, "Parameter is null");
}
CalendarConfigDto configDto = new CalendarConfigDto();
try {
CalendarConfiguration calendarConfiguration = calendarConfigurationMapper.selectByPrimaryKey(id);
beanUtil.copyProperties(calendarConfiguration, configDto);
// configDto.setEntityNames(splice(calendarExtMapper.getAllEntities(calendarConfiguration.getEntityIds())));
// configDto.setTaskTypeNames(splice(calendarExtMapper.getAllTaskTypes(calendarConfiguration.getTaskTypeIds())));
} catch (Exception e) {
log.error("getCalendarConfigById error", e);
}
return new OperationResultDto(true, "", configDto);
}
@Override
public OperationResultDto getCalendarConfigList(CalendarConfigQueryParamDto queryParam) {
// Page page = PageHelper.startPage(queryParam.getPagingParam().getPageIndex(), queryParam.getPagingParam().getPageSize());
List resultList = null;
try {
switch (queryParam.getQueryType()) {
case 1:
resultList = getCalendarConfig(queryParam);
break;
case 2:
resultList = getEntityCalendarConfig(queryParam);
break;
default:
break;
}
} catch (Exception e) {
log.error("getCalendarConfigList error", e);
}
PagingResultDto pagingResult = null;
if (resultList != null) {
pagingResult = new PagingResultDto<CalendarConfigDto>();
PagingDto pageInfo = queryParam.getPagingParam();
pageInfo.setTotalCount(resultList.size());
pagingResult.setPageInfo(pageInfo);
pagingResult.setList(resultList);
}
return new OperationResultDto(resultList != null, "", pagingResult);
}
private List<CalendarConfigDto> getCalendarConfig(CalendarConfigQueryParamDto queryParam) {
CalendarConfigurationExample example = new CalendarConfigurationExample();
//status, staff, orderIndex 直接查询
if (queryParam != null) {
if (queryParam.getStatus() != null) {
example.createCriteria().andStatusEqualTo(queryParam.getStatus());
}
if (queryParam.getStaff() != null) {
example.createCriteria().andStaffEqualTo(queryParam.getStaff());
}
if (queryParam.getOrderIndex() != null) {
example.createCriteria().andOrderIndexEqualTo(queryParam.getOrderIndex());
}
example.setOrderByClause("order_index");
}
List<CalendarConfiguration> configList = calendarConfigurationMapper.selectByExample(example);
if (queryParam != null) {
//筛选Entity
if (CollectionUtils.isNotEmpty(queryParam.getEntityIdList())) {
configList = configList.stream()
.filter(l1 -> queryParam.getEntityIdList().stream().anyMatch(l2 -> l1.getEntityIds().contains(l2.toString())))
.collect(Collectors.toList());
}
//筛选TaskType
if (CollectionUtils.isNotEmpty(queryParam.getTaskTypeList())) {
configList = configList.stream()
.filter(l1 -> queryParam.getTaskTypeList().stream().anyMatch(l2 -> l1.getTaskTypeIds().contains(l2.toString())))
.collect(Collectors.toList());
}
//筛选月
if (CollectionUtils.isNotEmpty(queryParam.getConfigMonthList())) {
configList = configList.stream()
.filter(l1 -> queryParam.getConfigMonthList().stream().anyMatch(l2 -> l1.getProjectMonths().contains(l2.toString() + ",")))
.collect(Collectors.toList());
}
//筛选日
if (CollectionUtils.isNotEmpty(queryParam.getConfigDayList())) {
configList = configList.stream()
.filter(l1 -> queryParam.getConfigDayList().stream().anyMatch(l2 -> l1.getProjectDays().contains(l2.toString() + ",")))
.collect(Collectors.toList());
}
}
if (CollectionUtils.isEmpty(configList)) {
return null;
}
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
List<CalendarConfigDto> resultList = configList.stream().map(p -> {
CalendarConfigDto configDto = new CalendarConfigDto();
beanUtil.copyProperties(p, configDto);
configDto.setEntityNames(splice(calendarExtMapper.getAllEntities(p.getEntityIds())));
configDto.setTaskTypeNames(splice(calendarExtMapper.getAllTaskTypes(p.getTaskTypeIds())));
String start = p.getValidDateStart() != null ? dateFormat.format(p.getValidDateStart()) : "";
String end = p.getValidDateEnd() != null ? dateFormat.format(p.getValidDateEnd()) : "";
configDto.setValidDate(start + " ~ " + end);
return configDto;
}).collect(Collectors.toList());
return resultList;
}
private String splice(List<String> list) {
StringBuilder sb = new StringBuilder();
if(CollectionUtils.isNotEmpty(list)) {
list.forEach(p -> sb.append(p).append(", "));
}
return sb.toString();
}
private String splice(Map<Object, String> map, Object[] arr) {
StringBuilder stringBuilder = new StringBuilder();
for (Object o : arr) {
stringBuilder.append(map.get(o));
}
return stringBuilder.toString();
}
private List<CalendarConfigGroupByEntityDto> getEntityCalendarConfig(CalendarConfigQueryParamDto queryParam) {
List<CalendarConfigDto> configList = getCalendarConfig(queryParam);
List<CalendarConfigGroupByEntityDto> resultList = new ArrayList<>();
if (CollectionUtils.isEmpty(configList)) {
return null;
}
Map<Long, List<CalendarConfigDto>> resultMap = new HashMap<>();
Map<Long, EntityDto> entityMap = calendarExtMapper.getAllEntityMapList();
if (entityMap == null) {
return null;
}
//根据entity分组
configList.forEach(p -> {
String[] entityIdArr = p.getEntityIds().split(",");
Arrays.stream(entityIdArr).forEach(idStr -> {
Long id = Long.parseLong(idStr);
if(!resultMap.containsKey(id)) {
resultMap.put(id, new ArrayList<>());
}
resultMap.get(id).add(p);
});
});
resultMap.forEach((k,v) -> resultList.add(new CalendarConfigGroupByEntityDto(entityMap.get(k).getName(), v.size(), 0, v )));
return resultList;
}
@Override
public OperationResultDto<List<EntityDto>> getActiveEntityList() {
List<EntityDto> list = null;
try {
list = calendarExtMapper.getActiveEntityList();
} catch (Exception e) {
log.error("getActiveEntityList error", e);
}
boolean result = list != null;
String msg = result ? "1" : "0";
return new OperationResultDto(result, msg, list);
}
@Override
public OperationResultDto getMaxConfigOrder() {
return new OperationResultDto(true, "", calendarExtMapper.getMaxConfigOrder() + 1);
}
@Override
public OperationResultDto getTaxCalendarDataForDisplay(Date queryStartTime, Date queryEndTime) {
CalendarConfigurationExample configExample = new CalendarConfigurationExample();
configExample.createCriteria().andValidDateStartGreaterThanOrEqualTo(queryStartTime).andValidDateEndLessThanOrEqualTo(queryEndTime);
List<CalendarConfiguration> configList = calendarConfigurationMapper.selectByExample(configExample);
return null;
}
}
package pwc.taxtech.atms.calendar.dao.ext;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.calendar.dto.CalendarTaskTypeDto;
import pwc.taxtech.atms.calendar.dto.EntityDto;
import java.util.List;
import java.util.Map;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-10 18:20
* @Version: 1.0
**/
@Mapper
public interface CalendarExtMapper extends MyMapper {
@Select("SELECT id FROM calendar_task_type WHERE name = #{name} LIMIT 1")
Long checkTaskTypeNameIsExist(String name);
@Select("SELECT id, name FROM calendar_task_type WHERE status = 1 ORDER BY id")
List<CalendarTaskTypeDto> getAllTaskTypeList();
@Select("SELECT id, name FROM calendar_task_type WHERE status = 1 AND id > 1 ORDER BY id")
List<CalendarTaskTypeDto> getTaskTypeList();
@Select("SELECT id, name FROM organization WHERE is_active = 1")
List<EntityDto> getActiveEntityList();
@Select("SELECT id, name FROM organization")
List<EntityDto> getAllEntityList();
@Select("SELECT id, name FROM calendar_task_type")
@MapKey("id")
Map<Long, CalendarTaskTypeDto> getAllTaskTypeMapList();
@Select("SELECT id, name FROM organization")
@MapKey("id")
Map<Long, EntityDto> getAllEntityMapList();
@Select("SELECT name FROM calendar_task_type WHERE id IN (${ids})")
List<String> getAllTaskTypes(@Param("ids") String ids);
@Select("SELECT name FROM organization WHERE id IN (${ids})")
List<String> getAllEntities(@Param("ids") String ids);
@Select("SELECT order_Index FROM calendar_configuration ORDER BY id DESC LIMIT 1")
Integer getMaxConfigOrder();
}
package pwc.taxtech.atms.calendar.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-11 18:04
* @Version: 1.0
**/
public class CalendarConfigDto implements Serializable {
private static final long serialVersionUID = 3866378052812843016L;
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
private String taskName;
// private List<EntityDto> entityList;
//
// private List<CalendarTaskTypeDto> taskTypeList;
private String entityIds;
private String entityNames;
private String taskTypeIds;
private String taskTypeNames;
private String projectMonths;
private String projectDays;
private Date validDateStart;
private Date validDateEnd;
private String validDate;
private String staff;
private Integer orderIndex;
private Byte status;
private String notes;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getEntityIds() {
return entityIds;
}
public void setEntityIds(String entityIds) {
this.entityIds = entityIds;
}
public String getEntityNames() {
return entityNames;
}
public void setEntityNames(String entityNames) {
this.entityNames = entityNames;
}
public String getTaskName() {
return taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public String getTaskTypeIds() {
return taskTypeIds;
}
public void setTaskTypeIds(String taskTypeIds) {
this.taskTypeIds = taskTypeIds;
}
public String getTaskTypeNames() {
return taskTypeNames;
}
public void setTaskTypeNames(String taskTypeNames) {
this.taskTypeNames = taskTypeNames;
}
public String getProjectMonths() {
return projectMonths;
}
public void setProjectMonths(String projectMonths) {
this.projectMonths = projectMonths;
}
public String getProjectDays() {
return projectDays;
}
public void setProjectDays(String projectDays) {
this.projectDays = projectDays;
}
public Date getValidDateStart() {
return validDateStart;
}
public void setValidDateStart(Date validDateStart) {
this.validDateStart = validDateStart;
}
public Date getValidDateEnd() {
return validDateEnd;
}
public void setValidDateEnd(Date validDateEnd) {
this.validDateEnd = validDateEnd;
}
public String getStaff() {
return staff;
}
public void setStaff(String staff) {
this.staff = staff;
}
public Integer getOrderIndex() {
return orderIndex;
}
public void setOrderIndex(Integer orderIndex) {
this.orderIndex = orderIndex;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public String getValidDate() {
return validDate;
}
public void setValidDate(String validDate) {
this.validDate = validDate;
}
}
package pwc.taxtech.atms.calendar.dto;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-13 19:34
* @Version: 1.0
**/
public class CalendarConfigGroupByEntityDto implements Serializable {
private static final long serialVersionUID = 663558017348889443L;
public CalendarConfigGroupByEntityDto() {
}
public CalendarConfigGroupByEntityDto(String entityName, int calendarCount, int taskTypeCount, List<CalendarConfigDto> entityCalendarList) {
this.entityName = entityName;
this.calendarCount = calendarCount;
this.taskTypeCount = taskTypeCount;
this.entityCalendarList = entityCalendarList;
}
private String entityName;
private int calendarCount;
private int taskTypeCount;
private List<CalendarConfigDto> entityCalendarList;
public String getEntityName() {
return entityName;
}
public void setEntityName(String entityName) {
this.entityName = entityName;
}
public int getCalendarCount() {
return calendarCount;
}
public void setCalendarCount(int calendarCount) {
this.calendarCount = calendarCount;
}
public int getTaskTypeCount() {
return taskTypeCount;
}
public void setTaskTypeCount(int taskTypeCount) {
this.taskTypeCount = taskTypeCount;
}
public List<CalendarConfigDto> getEntityCalendarList() {
return entityCalendarList;
}
public void setEntityCalendarList(List<CalendarConfigDto> entityCalendarList) {
this.entityCalendarList = entityCalendarList;
}
}
package pwc.taxtech.atms.calendar.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;
import java.util.Date;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-11 18:04
* @Version: 1.0
**/
public class CalendarEventDto implements Serializable {
private static final long serialVersionUID = -1194801351751686123L;
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@JsonSerialize(using = ToStringSerializer.class)
private Long entityId;
private String entityName;
private String taskName;
@JsonSerialize(using = ToStringSerializer.class)
private Long taskTypeId;
private String taskTypeName;
private String staff;
private Date effectiveDate;
private Date dueDate;
private Byte status;
private Integer orderIndex;
private String notes;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getEntityId() {
return entityId;
}
public void setEntityId(Long entityId) {
this.entityId = entityId;
}
public String getEntityName() {
return entityName;
}
public void setEntityName(String entityName) {
this.entityName = entityName;
}
public String getTaskName() {
return taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public Long getTaskTypeId() {
return taskTypeId;
}
public void setTaskTypeId(Long taskTypeId) {
this.taskTypeId = taskTypeId;
}
public String getTaskTypeName() {
return taskTypeName;
}
public void setTaskTypeName(String taskTypeName) {
this.taskTypeName = taskTypeName;
}
public String getStaff() {
return staff;
}
public void setStaff(String staff) {
this.staff = staff;
}
public Date getEffectiveDate() {
return effectiveDate;
}
public void setEffectiveDate(Date effectiveDate) {
this.effectiveDate = effectiveDate;
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public Integer getOrderIndex() {
return orderIndex;
}
public void setOrderIndex(Integer orderIndex) {
this.orderIndex = orderIndex;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
}
package pwc.taxtech.atms.calendar.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-11 18:05
* @Version: 1.0
**/
public class CalendarTaskTypeDto implements Serializable {
private static final long serialVersionUID = 5942786964744634629L;
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
private String name;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package pwc.taxtech.atms.calendar.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-07-12 09:52
* @Version: 1.0
**/
public class EntityDto implements Serializable {
private static final long serialVersionUID = 1890912867933117745L;
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
private String name;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
......@@ -24,20 +24,20 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_configuration.entity_ids
* This field corresponds to the database column calendar_configuration.task_name
*
* @mbg.generated
*/
private String entityIds;
private String taskName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_configuration.task_name
* This field corresponds to the database column calendar_configuration.entity_ids
*
* @mbg.generated
*/
private String taskName;
private String entityIds;
/**
*
......@@ -114,11 +114,11 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_configuration.created_time
* This field corresponds to the database column calendar_configuration.create_time
*
* @mbg.generated
*/
private Date createdTime;
private Date createTime;
/**
*
......@@ -172,50 +172,50 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_configuration.entity_ids
* This method returns the value of the database column calendar_configuration.task_name
*
* @return the value of calendar_configuration.entity_ids
* @return the value of calendar_configuration.task_name
*
* @mbg.generated
*/
public String getEntityIds() {
return entityIds;
public String getTaskName() {
return taskName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_configuration.entity_ids
* This method sets the value of the database column calendar_configuration.task_name
*
* @param entityIds the value for calendar_configuration.entity_ids
* @param taskName the value for calendar_configuration.task_name
*
* @mbg.generated
*/
public void setEntityIds(String entityIds) {
this.entityIds = entityIds == null ? null : entityIds.trim();
public void setTaskName(String taskName) {
this.taskName = taskName == null ? null : taskName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_configuration.task_name
* This method returns the value of the database column calendar_configuration.entity_ids
*
* @return the value of calendar_configuration.task_name
* @return the value of calendar_configuration.entity_ids
*
* @mbg.generated
*/
public String getTaskName() {
return taskName;
public String getEntityIds() {
return entityIds;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_configuration.task_name
* This method sets the value of the database column calendar_configuration.entity_ids
*
* @param taskName the value for calendar_configuration.task_name
* @param entityIds the value for calendar_configuration.entity_ids
*
* @mbg.generated
*/
public void setTaskName(String taskName) {
this.taskName = taskName == null ? null : taskName.trim();
public void setEntityIds(String entityIds) {
this.entityIds = entityIds == null ? null : entityIds.trim();
}
/**
......@@ -412,26 +412,26 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_configuration.created_time
* This method returns the value of the database column calendar_configuration.create_time
*
* @return the value of calendar_configuration.created_time
* @return the value of calendar_configuration.create_time
*
* @mbg.generated
*/
public Date getCreatedTime() {
return createdTime;
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_configuration.created_time
* This method sets the value of the database column calendar_configuration.create_time
*
* @param createdTime the value for calendar_configuration.created_time
* @param createTime the value for calendar_configuration.create_time
*
* @mbg.generated
*/
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
......@@ -495,8 +495,8 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", entityIds=").append(entityIds);
sb.append(", taskName=").append(taskName);
sb.append(", entityIds=").append(entityIds);
sb.append(", taskTypeIds=").append(taskTypeIds);
sb.append(", projectMonths=").append(projectMonths);
sb.append(", projectDays=").append(projectDays);
......@@ -505,7 +505,7 @@ public class CalendarConfiguration extends BaseEntity implements Serializable {
sb.append(", staff=").append(staff);
sb.append(", orderIndex=").append(orderIndex);
sb.append(", status=").append(status);
sb.append(", createdTime=").append(createdTime);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", notes=").append(notes);
sb.append("]");
......
......@@ -255,143 +255,143 @@ public class CalendarConfigurationExample {
return (Criteria) this;
}
public Criteria andEntityIdsIsNull() {
addCriterion("entity_ids is null");
public Criteria andTaskNameIsNull() {
addCriterion("task_name is null");
return (Criteria) this;
}
public Criteria andEntityIdsIsNotNull() {
addCriterion("entity_ids is not null");
public Criteria andTaskNameIsNotNull() {
addCriterion("task_name is not null");
return (Criteria) this;
}
public Criteria andEntityIdsEqualTo(String value) {
addCriterion("entity_ids =", value, "entityIds");
public Criteria andTaskNameEqualTo(String value) {
addCriterion("task_name =", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsNotEqualTo(String value) {
addCriterion("entity_ids <>", value, "entityIds");
public Criteria andTaskNameNotEqualTo(String value) {
addCriterion("task_name <>", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsGreaterThan(String value) {
addCriterion("entity_ids >", value, "entityIds");
public Criteria andTaskNameGreaterThan(String value) {
addCriterion("task_name >", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsGreaterThanOrEqualTo(String value) {
addCriterion("entity_ids >=", value, "entityIds");
public Criteria andTaskNameGreaterThanOrEqualTo(String value) {
addCriterion("task_name >=", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsLessThan(String value) {
addCriterion("entity_ids <", value, "entityIds");
public Criteria andTaskNameLessThan(String value) {
addCriterion("task_name <", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsLessThanOrEqualTo(String value) {
addCriterion("entity_ids <=", value, "entityIds");
public Criteria andTaskNameLessThanOrEqualTo(String value) {
addCriterion("task_name <=", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsLike(String value) {
addCriterion("entity_ids like", value, "entityIds");
public Criteria andTaskNameLike(String value) {
addCriterion("task_name like", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsNotLike(String value) {
addCriterion("entity_ids not like", value, "entityIds");
public Criteria andTaskNameNotLike(String value) {
addCriterion("task_name not like", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsIn(List<String> values) {
addCriterion("entity_ids in", values, "entityIds");
public Criteria andTaskNameIn(List<String> values) {
addCriterion("task_name in", values, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsNotIn(List<String> values) {
addCriterion("entity_ids not in", values, "entityIds");
public Criteria andTaskNameNotIn(List<String> values) {
addCriterion("task_name not in", values, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsBetween(String value1, String value2) {
addCriterion("entity_ids between", value1, value2, "entityIds");
public Criteria andTaskNameBetween(String value1, String value2) {
addCriterion("task_name between", value1, value2, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdsNotBetween(String value1, String value2) {
addCriterion("entity_ids not between", value1, value2, "entityIds");
public Criteria andTaskNameNotBetween(String value1, String value2) {
addCriterion("task_name not between", value1, value2, "taskName");
return (Criteria) this;
}
public Criteria andTaskNameIsNull() {
addCriterion("task_name is null");
public Criteria andEntityIdsIsNull() {
addCriterion("entity_ids is null");
return (Criteria) this;
}
public Criteria andTaskNameIsNotNull() {
addCriterion("task_name is not null");
public Criteria andEntityIdsIsNotNull() {
addCriterion("entity_ids is not null");
return (Criteria) this;
}
public Criteria andTaskNameEqualTo(String value) {
addCriterion("task_name =", value, "taskName");
public Criteria andEntityIdsEqualTo(String value) {
addCriterion("entity_ids =", value, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameNotEqualTo(String value) {
addCriterion("task_name <>", value, "taskName");
public Criteria andEntityIdsNotEqualTo(String value) {
addCriterion("entity_ids <>", value, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameGreaterThan(String value) {
addCriterion("task_name >", value, "taskName");
public Criteria andEntityIdsGreaterThan(String value) {
addCriterion("entity_ids >", value, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameGreaterThanOrEqualTo(String value) {
addCriterion("task_name >=", value, "taskName");
public Criteria andEntityIdsGreaterThanOrEqualTo(String value) {
addCriterion("entity_ids >=", value, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameLessThan(String value) {
addCriterion("task_name <", value, "taskName");
public Criteria andEntityIdsLessThan(String value) {
addCriterion("entity_ids <", value, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameLessThanOrEqualTo(String value) {
addCriterion("task_name <=", value, "taskName");
public Criteria andEntityIdsLessThanOrEqualTo(String value) {
addCriterion("entity_ids <=", value, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameLike(String value) {
addCriterion("task_name like", value, "taskName");
public Criteria andEntityIdsLike(String value) {
addCriterion("entity_ids like", value, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameNotLike(String value) {
addCriterion("task_name not like", value, "taskName");
public Criteria andEntityIdsNotLike(String value) {
addCriterion("entity_ids not like", value, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameIn(List<String> values) {
addCriterion("task_name in", values, "taskName");
public Criteria andEntityIdsIn(List<String> values) {
addCriterion("entity_ids in", values, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameNotIn(List<String> values) {
addCriterion("task_name not in", values, "taskName");
public Criteria andEntityIdsNotIn(List<String> values) {
addCriterion("entity_ids not in", values, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameBetween(String value1, String value2) {
addCriterion("task_name between", value1, value2, "taskName");
public Criteria andEntityIdsBetween(String value1, String value2) {
addCriterion("entity_ids between", value1, value2, "entityIds");
return (Criteria) this;
}
public Criteria andTaskNameNotBetween(String value1, String value2) {
addCriterion("task_name not between", value1, value2, "taskName");
public Criteria andEntityIdsNotBetween(String value1, String value2) {
addCriterion("entity_ids not between", value1, value2, "entityIds");
return (Criteria) this;
}
......@@ -915,63 +915,63 @@ public class CalendarConfigurationExample {
return (Criteria) this;
}
public Criteria andCreatedTimeIsNull() {
addCriterion("created_time is null");
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreatedTimeIsNotNull() {
addCriterion("created_time is not null");
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreatedTimeEqualTo(Date value) {
addCriterion("created_time =", value, "createdTime");
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeNotEqualTo(Date value) {
addCriterion("created_time <>", value, "createdTime");
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeGreaterThan(Date value) {
addCriterion("created_time >", value, "createdTime");
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeGreaterThanOrEqualTo(Date value) {
addCriterion("created_time >=", value, "createdTime");
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeLessThan(Date value) {
addCriterion("created_time <", value, "createdTime");
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeLessThanOrEqualTo(Date value) {
addCriterion("created_time <=", value, "createdTime");
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeIn(List<Date> values) {
addCriterion("created_time in", values, "createdTime");
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeNotIn(List<Date> values) {
addCriterion("created_time not in", values, "createdTime");
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeBetween(Date value1, Date value2) {
addCriterion("created_time between", value1, value2, "createdTime");
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreatedTimeNotBetween(Date value1, Date value2) {
addCriterion("created_time not between", value1, value2, "createdTime");
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
......
......@@ -24,20 +24,20 @@ public class CalendarEvent extends BaseEntity implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.entity_id
* This field corresponds to the database column calendar_event.task_name
*
* @mbg.generated
*/
private Long entityId;
private String taskName;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.task_name
* This field corresponds to the database column calendar_event.entity_id
*
* @mbg.generated
*/
private String taskName;
private Long entityId;
/**
*
......@@ -111,11 +111,11 @@ public class CalendarEvent extends BaseEntity implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column calendar_event.last_update_time
* This field corresponds to the database column calendar_event.update_time
*
* @mbg.generated
*/
private Date lastUpdateTime;
private Date updateTime;
/**
*
......@@ -160,50 +160,50 @@ public class CalendarEvent extends BaseEntity implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.entity_id
* This method returns the value of the database column calendar_event.task_name
*
* @return the value of calendar_event.entity_id
* @return the value of calendar_event.task_name
*
* @mbg.generated
*/
public Long getEntityId() {
return entityId;
public String getTaskName() {
return taskName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.entity_id
* This method sets the value of the database column calendar_event.task_name
*
* @param entityId the value for calendar_event.entity_id
* @param taskName the value for calendar_event.task_name
*
* @mbg.generated
*/
public void setEntityId(Long entityId) {
this.entityId = entityId;
public void setTaskName(String taskName) {
this.taskName = taskName == null ? null : taskName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.task_name
* This method returns the value of the database column calendar_event.entity_id
*
* @return the value of calendar_event.task_name
* @return the value of calendar_event.entity_id
*
* @mbg.generated
*/
public String getTaskName() {
return taskName;
public Long getEntityId() {
return entityId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.task_name
* This method sets the value of the database column calendar_event.entity_id
*
* @param taskName the value for calendar_event.task_name
* @param entityId the value for calendar_event.entity_id
*
* @mbg.generated
*/
public void setTaskName(String taskName) {
this.taskName = taskName == null ? null : taskName.trim();
public void setEntityId(Long entityId) {
this.entityId = entityId;
}
/**
......@@ -376,26 +376,26 @@ public class CalendarEvent extends BaseEntity implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column calendar_event.last_update_time
* This method returns the value of the database column calendar_event.update_time
*
* @return the value of calendar_event.last_update_time
* @return the value of calendar_event.update_time
*
* @mbg.generated
*/
public Date getLastUpdateTime() {
return lastUpdateTime;
public Date getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column calendar_event.last_update_time
* This method sets the value of the database column calendar_event.update_time
*
* @param lastUpdateTime the value for calendar_event.last_update_time
* @param updateTime the value for calendar_event.update_time
*
* @mbg.generated
*/
public void setLastUpdateTime(Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
......@@ -435,8 +435,8 @@ public class CalendarEvent extends BaseEntity implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", entityId=").append(entityId);
sb.append(", taskName=").append(taskName);
sb.append(", entityId=").append(entityId);
sb.append(", taskTypeId=").append(taskTypeId);
sb.append(", staff=").append(staff);
sb.append(", effectiveDate=").append(effectiveDate);
......@@ -444,7 +444,7 @@ public class CalendarEvent extends BaseEntity implements Serializable {
sb.append(", status=").append(status);
sb.append(", orderIndex=").append(orderIndex);
sb.append(", createTime=").append(createTime);
sb.append(", lastUpdateTime=").append(lastUpdateTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", notes=").append(notes);
sb.append("]");
return sb.toString();
......
......@@ -255,133 +255,133 @@ public class CalendarEventExample {
return (Criteria) this;
}
public Criteria andEntityIdIsNull() {
addCriterion("entity_id is null");
public Criteria andTaskNameIsNull() {
addCriterion("task_name is null");
return (Criteria) this;
}
public Criteria andEntityIdIsNotNull() {
addCriterion("entity_id is not null");
public Criteria andTaskNameIsNotNull() {
addCriterion("task_name is not null");
return (Criteria) this;
}
public Criteria andEntityIdEqualTo(Long value) {
addCriterion("entity_id =", value, "entityId");
public Criteria andTaskNameEqualTo(String value) {
addCriterion("task_name =", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdNotEqualTo(Long value) {
addCriterion("entity_id <>", value, "entityId");
public Criteria andTaskNameNotEqualTo(String value) {
addCriterion("task_name <>", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdGreaterThan(Long value) {
addCriterion("entity_id >", value, "entityId");
public Criteria andTaskNameGreaterThan(String value) {
addCriterion("task_name >", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdGreaterThanOrEqualTo(Long value) {
addCriterion("entity_id >=", value, "entityId");
public Criteria andTaskNameGreaterThanOrEqualTo(String value) {
addCriterion("task_name >=", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdLessThan(Long value) {
addCriterion("entity_id <", value, "entityId");
public Criteria andTaskNameLessThan(String value) {
addCriterion("task_name <", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdLessThanOrEqualTo(Long value) {
addCriterion("entity_id <=", value, "entityId");
public Criteria andTaskNameLessThanOrEqualTo(String value) {
addCriterion("task_name <=", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdIn(List<Long> values) {
addCriterion("entity_id in", values, "entityId");
public Criteria andTaskNameLike(String value) {
addCriterion("task_name like", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdNotIn(List<Long> values) {
addCriterion("entity_id not in", values, "entityId");
public Criteria andTaskNameNotLike(String value) {
addCriterion("task_name not like", value, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdBetween(Long value1, Long value2) {
addCriterion("entity_id between", value1, value2, "entityId");
public Criteria andTaskNameIn(List<String> values) {
addCriterion("task_name in", values, "taskName");
return (Criteria) this;
}
public Criteria andEntityIdNotBetween(Long value1, Long value2) {
addCriterion("entity_id not between", value1, value2, "entityId");
public Criteria andTaskNameNotIn(List<String> values) {
addCriterion("task_name not in", values, "taskName");
return (Criteria) this;
}
public Criteria andTaskNameIsNull() {
addCriterion("task_name is null");
public Criteria andTaskNameBetween(String value1, String value2) {
addCriterion("task_name between", value1, value2, "taskName");
return (Criteria) this;
}
public Criteria andTaskNameIsNotNull() {
addCriterion("task_name is not null");
public Criteria andTaskNameNotBetween(String value1, String value2) {
addCriterion("task_name not between", value1, value2, "taskName");
return (Criteria) this;
}
public Criteria andTaskNameEqualTo(String value) {
addCriterion("task_name =", value, "taskName");
public Criteria andEntityIdIsNull() {
addCriterion("entity_id is null");
return (Criteria) this;
}
public Criteria andTaskNameNotEqualTo(String value) {
addCriterion("task_name <>", value, "taskName");
public Criteria andEntityIdIsNotNull() {
addCriterion("entity_id is not null");
return (Criteria) this;
}
public Criteria andTaskNameGreaterThan(String value) {
addCriterion("task_name >", value, "taskName");
public Criteria andEntityIdEqualTo(Long value) {
addCriterion("entity_id =", value, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameGreaterThanOrEqualTo(String value) {
addCriterion("task_name >=", value, "taskName");
public Criteria andEntityIdNotEqualTo(Long value) {
addCriterion("entity_id <>", value, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameLessThan(String value) {
addCriterion("task_name <", value, "taskName");
public Criteria andEntityIdGreaterThan(Long value) {
addCriterion("entity_id >", value, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameLessThanOrEqualTo(String value) {
addCriterion("task_name <=", value, "taskName");
public Criteria andEntityIdGreaterThanOrEqualTo(Long value) {
addCriterion("entity_id >=", value, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameLike(String value) {
addCriterion("task_name like", value, "taskName");
public Criteria andEntityIdLessThan(Long value) {
addCriterion("entity_id <", value, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameNotLike(String value) {
addCriterion("task_name not like", value, "taskName");
public Criteria andEntityIdLessThanOrEqualTo(Long value) {
addCriterion("entity_id <=", value, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameIn(List<String> values) {
addCriterion("task_name in", values, "taskName");
public Criteria andEntityIdIn(List<Long> values) {
addCriterion("entity_id in", values, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameNotIn(List<String> values) {
addCriterion("task_name not in", values, "taskName");
public Criteria andEntityIdNotIn(List<Long> values) {
addCriterion("entity_id not in", values, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameBetween(String value1, String value2) {
addCriterion("task_name between", value1, value2, "taskName");
public Criteria andEntityIdBetween(Long value1, Long value2) {
addCriterion("entity_id between", value1, value2, "entityId");
return (Criteria) this;
}
public Criteria andTaskNameNotBetween(String value1, String value2) {
addCriterion("task_name not between", value1, value2, "taskName");
public Criteria andEntityIdNotBetween(Long value1, Long value2) {
addCriterion("entity_id not between", value1, value2, "entityId");
return (Criteria) this;
}
......@@ -815,63 +815,63 @@ public class CalendarEventExample {
return (Criteria) this;
}
public Criteria andLastUpdateTimeIsNull() {
addCriterion("last_update_time is null");
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andLastUpdateTimeIsNotNull() {
addCriterion("last_update_time is not null");
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andLastUpdateTimeEqualTo(Date value) {
addCriterion("last_update_time =", value, "lastUpdateTime");
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeNotEqualTo(Date value) {
addCriterion("last_update_time <>", value, "lastUpdateTime");
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeGreaterThan(Date value) {
addCriterion("last_update_time >", value, "lastUpdateTime");
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("last_update_time >=", value, "lastUpdateTime");
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeLessThan(Date value) {
addCriterion("last_update_time <", value, "lastUpdateTime");
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("last_update_time <=", value, "lastUpdateTime");
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeIn(List<Date> values) {
addCriterion("last_update_time in", values, "lastUpdateTime");
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeNotIn(List<Date> values) {
addCriterion("last_update_time not in", values, "lastUpdateTime");
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeBetween(Date value1, Date value2) {
addCriterion("last_update_time between", value1, value2, "lastUpdateTime");
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andLastUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("last_update_time not between", value1, value2, "lastUpdateTime");
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
......
......@@ -7,8 +7,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="entity_ids" jdbcType="VARCHAR" property="entityIds" />
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
<result column="entity_ids" jdbcType="VARCHAR" property="entityIds" />
<result column="task_type_ids" jdbcType="VARCHAR" property="taskTypeIds" />
<result column="project_months" jdbcType="VARCHAR" property="projectMonths" />
<result column="project_days" jdbcType="VARCHAR" property="projectDays" />
......@@ -17,7 +17,7 @@
<result column="staff" jdbcType="VARCHAR" property="staff" />
<result column="order_index" jdbcType="INTEGER" property="orderIndex" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<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">
......@@ -98,8 +98,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, entity_ids, task_name, task_type_ids, project_months, project_days, valid_date_start,
valid_date_end, staff, order_index, `status`, created_time, update_time
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
</sql>
<sql id="Blob_Column_List">
<!--
......@@ -181,15 +181,15 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into calendar_configuration (id, entity_ids, task_name,
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`, created_time,
order_index, `status`, create_time,
update_time, notes)
values (#{id,jdbcType=BIGINT}, #{entityIds,jdbcType=VARCHAR}, #{taskName,jdbcType=VARCHAR},
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}, #{createdTime,jdbcType=TIMESTAMP},
#{orderIndex,jdbcType=INTEGER}, #{status,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{notes,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.calendar.entity.CalendarConfiguration">
......@@ -202,12 +202,12 @@
<if test="id != null">
id,
</if>
<if test="entityIds != null">
entity_ids,
</if>
<if test="taskName != null">
task_name,
</if>
<if test="entityIds != null">
entity_ids,
</if>
<if test="taskTypeIds != null">
task_type_ids,
</if>
......@@ -232,8 +232,8 @@
<if test="status != null">
`status`,
</if>
<if test="createdTime != null">
created_time,
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
......@@ -246,12 +246,12 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="entityIds != null">
#{entityIds,jdbcType=VARCHAR},
</if>
<if test="taskName != null">
#{taskName,jdbcType=VARCHAR},
</if>
<if test="entityIds != null">
#{entityIds,jdbcType=VARCHAR},
</if>
<if test="taskTypeIds != null">
#{taskTypeIds,jdbcType=VARCHAR},
</if>
......@@ -276,8 +276,8 @@
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="createdTime != null">
#{createdTime,jdbcType=TIMESTAMP},
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
......@@ -307,12 +307,12 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.entityIds != null">
entity_ids = #{record.entityIds,jdbcType=VARCHAR},
</if>
<if test="record.taskName != null">
task_name = #{record.taskName,jdbcType=VARCHAR},
</if>
<if test="record.entityIds != null">
entity_ids = #{record.entityIds,jdbcType=VARCHAR},
</if>
<if test="record.taskTypeIds != null">
task_type_ids = #{record.taskTypeIds,jdbcType=VARCHAR},
</if>
......@@ -337,8 +337,8 @@
<if test="record.status != null">
`status` = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.createdTime != null">
created_time = #{record.createdTime,jdbcType=TIMESTAMP},
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
......@@ -358,8 +358,8 @@
-->
update calendar_configuration
set id = #{record.id,jdbcType=BIGINT},
entity_ids = #{record.entityIds,jdbcType=VARCHAR},
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},
......@@ -368,7 +368,7 @@
staff = #{record.staff,jdbcType=VARCHAR},
order_index = #{record.orderIndex,jdbcType=INTEGER},
`status` = #{record.status,jdbcType=TINYINT},
created_time = #{record.createdTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
notes = #{record.notes,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
......@@ -382,8 +382,8 @@
-->
update calendar_configuration
set id = #{record.id,jdbcType=BIGINT},
entity_ids = #{record.entityIds,jdbcType=VARCHAR},
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},
......@@ -392,7 +392,7 @@
staff = #{record.staff,jdbcType=VARCHAR},
order_index = #{record.orderIndex,jdbcType=INTEGER},
`status` = #{record.status,jdbcType=TINYINT},
created_time = #{record.createdTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -405,12 +405,12 @@
-->
update calendar_configuration
<set>
<if test="entityIds != null">
entity_ids = #{entityIds,jdbcType=VARCHAR},
</if>
<if test="taskName != null">
task_name = #{taskName,jdbcType=VARCHAR},
</if>
<if test="entityIds != null">
entity_ids = #{entityIds,jdbcType=VARCHAR},
</if>
<if test="taskTypeIds != null">
task_type_ids = #{taskTypeIds,jdbcType=VARCHAR},
</if>
......@@ -435,8 +435,8 @@
<if test="status != null">
`status` = #{status,jdbcType=TINYINT},
</if>
<if test="createdTime != null">
created_time = #{createdTime,jdbcType=TIMESTAMP},
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
......@@ -453,8 +453,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update calendar_configuration
set entity_ids = #{entityIds,jdbcType=VARCHAR},
task_name = #{taskName,jdbcType=VARCHAR},
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},
......@@ -463,7 +463,7 @@
staff = #{staff,jdbcType=VARCHAR},
order_index = #{orderIndex,jdbcType=INTEGER},
`status` = #{status,jdbcType=TINYINT},
created_time = #{createdTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
notes = #{notes,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
......@@ -474,8 +474,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update calendar_configuration
set entity_ids = #{entityIds,jdbcType=VARCHAR},
task_name = #{taskName,jdbcType=VARCHAR},
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},
......@@ -484,7 +484,7 @@
staff = #{staff,jdbcType=VARCHAR},
order_index = #{orderIndex,jdbcType=INTEGER},
`status` = #{status,jdbcType=TINYINT},
created_time = #{createdTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
......
......@@ -7,8 +7,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="entity_id" jdbcType="BIGINT" property="entityId" />
<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="staff" jdbcType="VARCHAR" property="staff" />
<result column="effective_date" jdbcType="TIMESTAMP" property="effectiveDate" />
......@@ -16,7 +16,7 @@
<result column="status" jdbcType="TINYINT" property="status" />
<result column="order_index" jdbcType="INTEGER" property="orderIndex" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="last_update_time" jdbcType="TIMESTAMP" property="lastUpdateTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="pwc.taxtech.atms.calendar.entity.CalendarEvent">
<!--
......@@ -96,8 +96,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, entity_id, task_name, task_type_id, staff, effective_date, due_date, `status`,
order_index, create_time, last_update_time
id, task_name, entity_id, task_type_id, staff, effective_date, due_date, `status`,
order_index, create_time, update_time
</sql>
<sql id="Blob_Column_List">
<!--
......@@ -179,15 +179,15 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into calendar_event (id, entity_id, task_name,
insert into calendar_event (id, task_name, entity_id,
task_type_id, staff, effective_date,
due_date, `status`, order_index,
create_time, last_update_time, notes
create_time, update_time, notes
)
values (#{id,jdbcType=BIGINT}, #{entityId,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR},
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}, #{lastUpdateTime,jdbcType=TIMESTAMP}, #{notes,jdbcType=LONGVARCHAR}
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{notes,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.calendar.entity.CalendarEvent">
......@@ -200,12 +200,12 @@
<if test="id != null">
id,
</if>
<if test="entityId != null">
entity_id,
</if>
<if test="taskName != null">
task_name,
</if>
<if test="entityId != null">
entity_id,
</if>
<if test="taskTypeId != null">
task_type_id,
</if>
......@@ -227,8 +227,8 @@
<if test="createTime != null">
create_time,
</if>
<if test="lastUpdateTime != null">
last_update_time,
<if test="updateTime != null">
update_time,
</if>
<if test="notes != null">
notes,
......@@ -238,12 +238,12 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="entityId != null">
#{entityId,jdbcType=BIGINT},
</if>
<if test="taskName != null">
#{taskName,jdbcType=VARCHAR},
</if>
<if test="entityId != null">
#{entityId,jdbcType=BIGINT},
</if>
<if test="taskTypeId != null">
#{taskTypeId,jdbcType=BIGINT},
</if>
......@@ -265,8 +265,8 @@
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdateTime != null">
#{lastUpdateTime,jdbcType=TIMESTAMP},
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="notes != null">
#{notes,jdbcType=LONGVARCHAR},
......@@ -293,12 +293,12 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.entityId != null">
entity_id = #{record.entityId,jdbcType=BIGINT},
</if>
<if test="record.taskName != null">
task_name = #{record.taskName,jdbcType=VARCHAR},
</if>
<if test="record.entityId != null">
entity_id = #{record.entityId,jdbcType=BIGINT},
</if>
<if test="record.taskTypeId != null">
task_type_id = #{record.taskTypeId,jdbcType=BIGINT},
</if>
......@@ -320,8 +320,8 @@
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.lastUpdateTime != null">
last_update_time = #{record.lastUpdateTime,jdbcType=TIMESTAMP},
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.notes != null">
notes = #{record.notes,jdbcType=LONGVARCHAR},
......@@ -338,8 +338,8 @@
-->
update calendar_event
set id = #{record.id,jdbcType=BIGINT},
entity_id = #{record.entityId,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},
......@@ -347,7 +347,7 @@
`status` = #{record.status,jdbcType=TINYINT},
order_index = #{record.orderIndex,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
last_update_time = #{record.lastUpdateTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
notes = #{record.notes,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -360,8 +360,8 @@
-->
update calendar_event
set id = #{record.id,jdbcType=BIGINT},
entity_id = #{record.entityId,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},
......@@ -369,7 +369,7 @@
`status` = #{record.status,jdbcType=TINYINT},
order_index = #{record.orderIndex,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
last_update_time = #{record.lastUpdateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -381,12 +381,12 @@
-->
update calendar_event
<set>
<if test="entityId != null">
entity_id = #{entityId,jdbcType=BIGINT},
</if>
<if test="taskName != null">
task_name = #{taskName,jdbcType=VARCHAR},
</if>
<if test="entityId != null">
entity_id = #{entityId,jdbcType=BIGINT},
</if>
<if test="taskTypeId != null">
task_type_id = #{taskTypeId,jdbcType=BIGINT},
</if>
......@@ -408,8 +408,8 @@
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdateTime != null">
last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="notes != null">
notes = #{notes,jdbcType=LONGVARCHAR},
......@@ -423,8 +423,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update calendar_event
set entity_id = #{entityId,jdbcType=BIGINT},
task_name = #{taskName,jdbcType=VARCHAR},
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},
......@@ -432,7 +432,7 @@
`status` = #{status,jdbcType=TINYINT},
order_index = #{orderIndex,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
notes = #{notes,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -442,8 +442,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update calendar_event
set entity_id = #{entityId,jdbcType=BIGINT},
task_name = #{taskName,jdbcType=VARCHAR},
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},
......@@ -451,7 +451,7 @@
`status` = #{status,jdbcType=TINYINT},
order_index = #{orderIndex,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
......@@ -13,7 +13,7 @@
$scope.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 0, //总数据
pageSize: constant.page.pageSizeArrary[1], //每页多少条数据
pageSize: constant.page.pageSizeArrary[1] //每页多少条数据
};
//分页对象初始化-->end
......@@ -21,20 +21,20 @@
//查询对象初始化-->start
$scope.companyOptions = {
bindingOptions: {
dataSource: 'orgList'
dataSource: 'entityList'
},
displayExpr: "companyName",
displayExpr: "name",
valueExpr: "id",
showSelectionControls: true,
applyValueMode: "instantly",
multiline: false,
placeholder: $translate.instant('PleaseSelect')
};
$scope.taxOptions = {
$scope.taskTypeOptions = {
bindingOptions: {
dataSource: 'taxProjectList'
dataSource: 'taskTypeList'
},
displayExpr: "taxProjectName",
displayExpr: "name",
valueExpr: "id",
showSelectionControls: true,
applyValueMode: "instantly",
......@@ -48,7 +48,7 @@
showClearButton: true,
placeholder: $translate.instant('PleaseSelect')
};
$scope.eventMonthOptions = {
$scope.configMonthOptions = {
dataSource: [{ id: 1, month: $translate.instant('January') }, { id: 2, month: $translate.instant('February') }, { id: 3, month: $translate.instant('March') },
{ id: 4, month: $translate.instant('April') }, { id: 5, month: $translate.instant('May') }, { id: 6, month: $translate.instant('June') },
{ id: 7, month: $translate.instant('August') }, { id: 8, month: $translate.instant('July') }, { id: 9, month: $translate.instant('September') },
......@@ -60,7 +60,7 @@
multiline: false,
placeholder: $translate.instant('PleaseSelect')
};
$scope.eventDateOptions = {
$scope.configDateOptions = {
dataSource: [{ id: 1, day: '1'+$translate.instant('Day') }, { id: 2, day: '2'+$translate.instant('Day') }, { id: 3, day: '3'+$translate.instant('Day') }, { id: 4, day: '4'+$translate.instant('Day') }, { id: 5, day: '5'+$translate.instant('Day') }, { id: 6, day: '6'+$translate.instant('Day') },
{ id: 7, day: '7'+$translate.instant('Day') }, { id: 8, day: '8'+$translate.instant('Day') }, { id: 9, day: '9'+$translate.instant('Day') }, { id: 10, day: '10'+$translate.instant('Day') }, { id: 11, day: '11'+$translate.instant('Day') }, { id: 12, day: '12'+$translate.instant('Day') },
{ id: 13, day: '13'+$translate.instant('Day') }, { id: 14, day: '14'+$translate.instant('Day') }, { id: 15, day: '15'+$translate.instant('Day') }, { id: 16, day: '16'+$translate.instant('Day') }, { id: 17, day: '17'+$translate.instant('Day') }, { id: 18, day: '18'+$translate.instant('Day') },
......@@ -74,25 +74,23 @@
multiline: false,
placeholder: $translate.instant('PleaseSelect')
};
$scope.addressOptions = {
bindingOptions: {
dataSource: 'workPlaceList'
},
displayExpr: "name",
valueExpr: "id",
searchEnabled:true,
showClearButton: true,
placeholder: $translate.instant('PleaseSelect')
};
// $scope.addressOptions = {
// bindingOptions: {
// dataSource: 'workPlaceList'
// },
// displayExpr: "name",
// valueExpr: "id",
// searchEnabled:true,
// showClearButton: true,
// placeholder: $translate.instant('PleaseSelect')
// };
$scope.operatorOptions = {
bindingOptions:{
dataSource: 'userList'
},
displayExpr: "userName",
valueExpr: "id",
showSelectionControls: true,
applyValueMode: "instantly",
multiline: false,
valueExpr: "userName",
showClearButton: true,
placeholder: $translate.instant('PleaseSelect')
};
$scope.numberOptions = {
......@@ -111,9 +109,9 @@
$scope.taxCalendarConfigurationList = [];
$scope.taxDataGridOptions = {
columns: [
{ dataField: 'calendarNumber', caption: $translate.instant('CalendarNumber'), fixed: true },
{ dataField: 'orderIndex', caption: $translate.instant('CalendarNumber'), fixed: true },
{
dataField: 'companyNames', caption: $translate.instant('Company'), fixed: true, width: '280px'
dataField: 'entityNames', caption: $translate.instant('Company'), fixed: true, width: '280px'
//, cellTemplate: function (ele, info) {
// if (info.data.companyNames && info.data.companyNames.length > 20) {
// $('<span title="' + info.data.companyNames + '"/>').text(info.data.companyNames.substr(0, 20) + "...").appendTo(ele);
......@@ -123,21 +121,21 @@
//}
},
{ dataField: 'taxProjectNames', caption: $translate.instant('TaxEvent') },
{ dataField: 'taskTypeNames', caption: $translate.instant('TaxEvent') },
{ dataField: 'projectMonths', caption: $translate.instant('EventMonth') },
{
dataField: 'projectDays', caption: $translate.instant('EventDay'), cellTemplate: function (ele, info) {
$('<span/>').text(info.data.projectDays.replace('32', $translate.instant('TheLastDayOfMonth'))).appendTo(ele);
}
},
{
dataField: 'isRelatedTaxMoney', caption: $translate.instant('IsRelatedTaxAmount'), cellTemplate: function (ele,info) {
$('<span/>').text(info.data.isRelatedTaxMoney == 0 ? $translate.instant('Fou') : $translate.instant('Shi')).appendTo(ele);
}
},
{ dataField: 'workPlaceNames', caption: $translate.instant('EventAddress') },
{ dataField: 'operatorNames', caption: $translate.instant('EventPerson') },
{ dataField: 'validDatePeriod', caption: $translate.instant('ValidDate') },
// {
// dataField: 'isRelatedTaxMoney', caption: $translate.instant('IsRelatedTaxAmount'), cellTemplate: function (ele,info) {
// $('<span/>').text(info.data.isRelatedTaxMoney == 0 ? $translate.instant('Fou') : $translate.instant('Shi')).appendTo(ele);
// }
// },
// { dataField: 'workPlaceNames', caption: $translate.instant('EventAddress') },
{ dataField: 'staff', caption: $translate.instant('EventPerson') },
{ dataField: 'validDate', caption: $translate.instant('ValidDate') },
{
dataField: 'status', caption: $translate.instant('CalendarStatus'), cellTemplate: function (ele, info) {
$('<span/>').text(info.data.status == 0 ? $translate.instant('Jinyong') : $translate.instant('Qiyong')).appendTo(ele);
......@@ -145,20 +143,20 @@
},
{
dataField: 'k', caption: $translate.instant('OrderOperation'), cellTemplate: function (ele, info) {
if (window.PWC.isHavePermission(constant.adminPermission.systemConfiguration.taxCalendarConfig.queryCode, $scope.userPermissions)) {
// if (window.PWC.isHavePermission(constant.adminPermission.systemConfiguration.taxCalendarConfig.queryCode, $scope.userPermissions)) {
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('View') + '&nbsp;|&nbsp;').on('dxclick', function () {
goToEditConfig(info.data.id, 1);
}).appendTo(ele);
}
if (window.PWC.isHavePermission(constant.adminPermission.systemConfiguration.taxCalendarConfig.editConfig, $scope.userPermissions)) {
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('Edit') + '&nbsp;|&nbsp;').on('dxclick', function () {
// }
// if (window.PWC.isHavePermission(constant.adminPermission.systemConfiguration.taxCalendarConfig.editConfig, $scope.userPermissions)) {
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('Edit')).on('dxclick', function () {
goToEditConfig(info.data.id);
}).appendTo(ele);
}
// }
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('SetTixing') + '&nbsp;|&nbsp;').on('dxclick', function () { }).appendTo(ele);
// $('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('SetTixing') + '&nbsp;|&nbsp;').on('dxclick', function () { }).appendTo(ele);
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('OtherConfig')).on('dxclick', function () { }).appendTo(ele);
// $('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('OtherConfig')).on('dxclick', function () { }).appendTo(ele);
}
}
],
......@@ -202,9 +200,9 @@
enabled: false
},
columns: [
{ dataField: 'company', caption: $translate.instant('Company'), allowHeaderFiltering: false },
{ dataField: 'taxCalendarCount', caption: $translate.instant('TaxCalendarCount'), allowHeaderFiltering: false },
{ dataField: 'taxProjectCount', caption: $translate.instant('TaxProjectCount'), allowHeaderFiltering: false },
{ dataField: 'entityName', caption: $translate.instant('Company'), allowHeaderFiltering: false },
{ dataField: 'calendarCount', caption: $translate.instant('TaxCalendarCount'), allowHeaderFiltering: false },
{ dataField: 'taskTypeCount', caption: $translate.instant('TaxProjectCount'), allowHeaderFiltering: false },
],
masterDetail: {
enabled: true,
......@@ -218,22 +216,22 @@
columnAutoWidth: true,
showBorders: true,
columns: [
{ dataField: 'calendarNumber', caption: $translate.instant('CalendarNumber'), fixed: true },
{ dataField: 'taxProjectNames', caption: $translate.instant('TaxEvent') },
{ dataField: 'orderIndex', caption: $translate.instant('CalendarNumber'), fixed: true },
{ dataField: 'taskTypeNames', caption: $translate.instant('TaxEvent') },
{ dataField: 'projectMonths', caption: $translate.instant('EventMonth') },
{
dataField: 'projectDays', caption: $translate.instant('EventDay'), cellTemplate: function (ele, info) {
$('<span/>').text(info.data.projectDays.replace('32', $translate.instant('TheLastDayOfMonth'))).appendTo(ele);
}
},
{
dataField: 'isRelatedTaxMoney', caption: $translate.instant('IsRelatedTaxAmount'), cellTemplate: function (ele, info) {
$('<span/>').text(info.data.isRelatedTaxMoney == 0 ? $translate.instant('Fou') : $translate.instant('Shi')).appendTo(ele);
}
},
{ dataField: 'workPlaceNames', caption: $translate.instant('EventAddress') },
{ dataField: 'operatorNames', caption: $translate.instant('EventPerson') },
{ dataField: 'validDatePeriod', caption: $translate.instant('ValidDate') },
// {
// dataField: 'isRelatedTaxMoney', caption: $translate.instant('IsRelatedTaxAmount'), cellTemplate: function (ele, info) {
// $('<span/>').text(info.data.isRelatedTaxMoney == 0 ? $translate.instant('Fou') : $translate.instant('Shi')).appendTo(ele);
// }
// },
// { dataField: 'workPlaceNames', caption: $translate.instant('EventAddress') },
{ dataField: 'staff', caption: $translate.instant('EventPerson') },
{ dataField: 'validDate', caption: $translate.instant('ValidDate') },
{
dataField: 'status', caption: $translate.instant('CalendarStatus'), cellTemplate: function (ele, info) {
$('<span/>').text(info.data.status == 0 ? $translate.instant('Jinyong') : $translate.instant('Qiyong')).appendTo(ele);
......@@ -241,22 +239,22 @@
},
{
dataField: 'k', caption: $translate.instant('OrderOperation'), cellTemplate: function (ele, info) {
if (window.PWC.isHavePermission(constant.adminPermission.systemConfiguration.taxCalendarConfig.queryCode, $scope.userPermissions)) {
// if (window.PWC.isHavePermission(constant.adminPermission.systemConfiguration.taxCalendarConfig.queryCode, $scope.userPermissions)) {
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('View') + '&nbsp;|&nbsp;').on('dxclick', function () {
goToEditConfig(info.data.id, 1);
}).appendTo(ele);
}
// }
if (window.PWC.isHavePermission(constant.adminPermission.systemConfiguration.taxCalendarConfig.editConfig, $scope.userPermissions)) {
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('Edit') + '&nbsp;|&nbsp;').on('dxclick', function () {
// if (window.PWC.isHavePermission(constant.adminPermission.systemConfiguration.taxCalendarConfig.editConfig, $scope.userPermissions)) {
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('Edit')).on('dxclick', function () {
goToEditConfig(info.data.id);
}).appendTo(ele);
}
// }
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('SetTixing') + '&nbsp;|&nbsp;').on('dxclick', function () { }).appendTo(ele);
// $('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('SetTixing') + '&nbsp;|&nbsp;').on('dxclick', function () { }).appendTo(ele);
$('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('OtherConfig')).on('dxclick', function () { }).appendTo(ele);
// $('<a/>').css({ 'color': '#d00', 'cursor': 'pointer' }).html($translate.instant('OtherConfig')).on('dxclick', function () { }).appendTo(ele);
}
}
]
......@@ -300,16 +298,17 @@
var queryList = function () {
$scope.queryEntity.pagingParam = $scope.pagingOptions;
taxCalendarService.getTaxCalendarConfigurationList($scope.queryEntity).success(function (result) {
if (result) {
$scope.queryEntity.pagingParam.totalCount = $scope.queryEntity.pagingParam.totalItems;
taxCalendarService.getCalendarConfigList($scope.queryEntity).success(function (result) {
if (result && result.result) {
if ($scope.queryEntity.queryType == 2) {
$scope.companyCalendarList = result.list;
$scope.companyCalendarList = result.data.list;
$scope.taxCalendarConfigurationList = [];
} else {
$scope.taxCalendarConfigurationList = result.list;
$scope.taxCalendarConfigurationList = result.data.list;
$scope.companyCalendarList = [];
}
$scope.pagingOptions.totalItems = result.pageInfo.totalCount;
$scope.pagingOptions.totalItems = result.data.pageInfo.totalCount;
}
});
};
......@@ -322,8 +321,8 @@
(function () {
$scope.userList = [];
$scope.orgList = [];
$scope.workPlaceList = [];
$scope.entityList = [];
// $scope.workPlaceList = [];
$scope.goToEditConfig = goToEditConfig;
$scope.queryList = queryList;
$timeout(function () {
......@@ -338,22 +337,21 @@
}
});
orgService.getAllActiveOrgList().success(function (result) {
$scope.orgList = _.map(result, function (item) {
var obj = { id: item.id, companyName: item.name };
return obj;
});
});
taxCalendarService.getWorkPlaceList().success(function (result) {
if (result) {
$scope.workPlaceList = result;
taxCalendarService.getActiveEntityList().success(function (result) {
if(result.result) {
$scope.entityList = result.data;
}
});
taxCalendarService.getTaxProjectList().success(function (result) {
if (result) {
$scope.taxProjectList = result;
// taxCalendarService.getWorkPlaceList().success(function (result) {
// if (result) {
// $scope.workPlaceList = result;
// }
// });
taxCalendarService.getTaskTypeList().success(function (result) {
if (result && result.result && result.data) {
$scope.taskTypeList = result.data;
}
});
......
......@@ -6,14 +6,14 @@
<div class="search-title-lable-2">
{{'Company' | translate}}:
</div>
<div class="search-box-100-2" ng-model="queryEntity.companyIdList" dx-tag-box="companyOptions"></div>
<div class="search-box-100-2" ng-model="queryEntity.entityIdList" dx-tag-box="companyOptions"></div>
</div>
<div class="search-part-2">
<div class="search-title-lable-4">
{{'TaxEvent' | translate}}:
</div>
<div class="search-box-100-4" ng-model="queryEntity.taxPorjectIdList" dx-tag-box="taxOptions"></div>
<div class="search-box-100-4" ng-model="queryEntity.taskTypeList" dx-tag-box="taskTypeOptions"></div>
</div>
<div class="search-part-3">
......@@ -34,29 +34,29 @@
<div class="search-title-lable-7">
{{'EventMonth' | translate}}:
</div>
<div class="search-box-50-7" ng-model="queryEntity.eventMonthList" dx-tag-box="eventMonthOptions"></div>
<div class="search-box-50-7" ng-model="queryEntity.configMonthList" dx-tag-box="configMonthOptions"></div>
<div class="search-title-lable-7">
{{'EventDay' | translate}}:
</div>
<div class="search-box-50-7" ng-model="queryEntity.eventDayList" dx-tag-box="eventDateOptions"></div>
<div class="search-box-50-7" ng-model="queryEntity.configDayList" dx-tag-box="configDateOptions"></div>
</div>
<div class="search-part-2">
<div class="search-title-lable-4">
{{'EventAddress' | translate}}:
</div>
<div class="search-box-50-4" ng-model="queryEntity.eventPlaceId" dx-select-box="addressOptions"></div>
<!-- <div class="search-title-lable-4">-->
<!-- {{'EventAddress' | translate}}:-->
<!-- </div>-->
<!-- <div class="search-box-50-4" ng-model="queryEntity.eventPlaceId" dx-select-box="addressOptions"></div>-->
<div class="search-title-lable-3">
{{'EventPerson' | translate}}:
</div>
<div class="search-box-50-3" ng-model="queryEntity.operatorIdList" dx-tag-box="operatorOptions"></div>
<div class="search-box-50-3" ng-model="queryEntity.staff" dx-tag-box="operatorOptions"></div>
</div>
<div class="search-part-3">
<div class="search-title-lable-2">
{{'Number' | translate}}:
</div>
<div class="search-box-100-2" ng-model="queryEntity.number" dx-text-box="numberOptions"></div>
<div class="search-box-100-2" ng-model="queryEntity.orderIndex" dx-text-box="numberOptions"></div>
</div>
<div class="search-part-3">
......@@ -69,14 +69,14 @@
<div class="grid-container">
<div class="grid-head-search-container">
<div class="grid-head-search" ng-model="queryEntity.queryType" dx-radio-group="gridSearchRadioOptions"></div>
<div ng-click="goToEditConfig();" atms-permission permission-control-type="ngIf" permission-code="{{$root.adminPermission.systemConfiguration.taxCalendarConfig.editConfig}}" class="btn btn-default btn-red">{{'NewTaxCalendar' | translate}}</div>
<div ng-click="goToEditConfig();" atms-permission permission-control-type="ngIf" permission-code="{{$root.adminPermission.systemConfiguration.calendarSetting.editCode}}" class="btn btn-default btn-red">{{'NewTaxCalendar' | translate}}</div>
</div>
<div id="dx-tax-calendar-data-grid" ng-if="queryEntity.queryType == 1" dx-data-grid="taxDataGridOptions"></div>
<div dx-data-grid="companyCalendarGridOptions" ng-if="queryEntity.queryType == 2" dx-item-alias="companyGroup">
<div data-options="dxTemplate:{name:'companyCalendarTemplate'}">
<div class="internal-grid-container">
<div class="internal-grid" id="company-{{companyGroup.key}}"
dx-data-grid="companyCalendarGridOptions.companyView(companyGroup.data.companyCalendars)">
dx-data-grid="companyCalendarGridOptions.companyView(companyGroup.data.entityCalendarList)">
</div>
</div>
</div>
......
......@@ -13,47 +13,47 @@
};
$scope.companyOptions = {
bindingOptions: {
dataSource: 'orgList'
dataSource: 'entityList'
},
displayExpr: "companyName",
displayExpr: "name",
valueExpr: "id",
showSelectionControls: true,
applyValueMode: "instantly",
multiline: false,
readOnly: !!$scope.isReadOnly,
onValueChanged: function (e) {
if (e && e.component) {
var datas = e.component.option('selectedItems');
if (datas && datas.length > 0) {
$scope.taxCalendarConfiguration.companyNames = _.pluck(datas, 'companyName').join(',');
}
}
// if (e && e.component) {
// var datas = e.component.option('selectedItems');
// if (datas && datas.length > 0) {
// $scope.taxCalendarConfiguration.entityNames = _.pluck(datas, 'name').join(',');
// }
// }
},
placeholder: $translate.instant('PleaseSelect')
};
$scope.taxOptions = {
$scope.taskTypeOptions = {
bindingOptions: {
dataSource: 'taxProjectList',
readOnly: 'isTaxProjectReadOnly'
dataSource: 'taskTypeList',
readOnly: 'isTaskTypeReadOnly'
},
displayExpr: "taxProjectName",
displayExpr: "name",
valueExpr: "id",
showSelectionControls: true,
applyValueMode: "instantly",
multiline: false,
//readOnly: !!$scope.isReadOnly || !!$scope.calendarConfigId,
onValueChanged: function (e) {
if (e && e.component) {
var datas = e.component.option('selectedItems');
if (datas && datas.length > 0) {
$scope.taxCalendarConfiguration.taxProjectNames = _.pluck(datas, 'taxProjectName').join(',');
}
}
},
// onValueChanged: function (e) {
// if (e && e.component) {
// var datas = e.component.option('selectedItems');
// if (datas && datas.length > 0) {
// $scope.taxCalendarConfiguration.taskTypeNames = _.pluck(datas, 'name').join(',');
// }
// }
// },
placeholder: $translate.instant('PleaseSelect')
};
$scope.eventMonthOptions = {
$scope.configMonthOptions = {
dataSource: [{ id: 1, month: $translate.instant('January') }, { id: 2, month: $translate.instant('February') }, { id: 3, month: $translate.instant('March') },
{ id: 4, month: $translate.instant('April') }, { id: 5, month: $translate.instant('May') }, { id: 6, month: $translate.instant('June') },
{ id: 7, month: $translate.instant('August') }, { id: 8, month: $translate.instant('July') }, { id: 9, month: $translate.instant('September') },
......@@ -66,7 +66,7 @@
readOnly: !!$scope.isReadOnly,
placeholder: $translate.instant('PleaseSelect')
};
$scope.eventDateOptions = {
$scope.configDateOptions = {
dataSource: [{ id: 1, day: '1'+$translate.instant('Day') }, { id: 2, day: '2'+$translate.instant('Day') }, { id: 3, day: '3'+$translate.instant('Day') }, { id: 4, day: '4'+$translate.instant('Day') }, { id: 5, day: '5'+$translate.instant('Day') }, { id: 6, day: '6'+$translate.instant('Day') },
{ id: 7, day: '7'+$translate.instant('Day') }, { id: 8, day: '8'+$translate.instant('Day') }, { id: 9, day: '9'+$translate.instant('Day') }, { id: 10, day: '10'+$translate.instant('Day') }, { id: 11, day: '11'+$translate.instant('Day') }, { id: 12, day: '12'+$translate.instant('Day') },
{ id: 13, day: '13'+$translate.instant('Day') }, { id: 14, day: '14'+$translate.instant('Day') }, { id: 15, day: '15'+$translate.instant('Day') }, { id: 16, day: '16'+$translate.instant('Day') }, { id: 17, day: '17'+$translate.instant('Day') }, { id: 18, day: '18'+$translate.instant('Day') },
......@@ -81,25 +81,25 @@
readOnly: !!$scope.isReadOnly,
placeholder: $translate.instant('PleaseSelect')
};
$scope.addressOptions = {
bindingOptions: {
dataSource: 'workPlaceList'
},
displayExpr: "name",
valueExpr: "id",
searchEnabled:true,
showClearButton: true,
readOnly: !!$scope.isReadOnly,
onValueChanged: function (e) {
if (e && e.component) {
var data = e.component.option('selectedItem');
if (data) {
$scope.taxCalendarConfiguration.workPlaceNames = data.name;
}
}
},
placeholder: $translate.instant('PleaseSelect')
};
// $scope.addressOptions = {
// bindingOptions: {
// dataSource: 'workPlaceList'
// },
// displayExpr: "name",
// valueExpr: "id",
// searchEnabled:true,
// showClearButton: true,
// readOnly: !!$scope.isReadOnly,
// onValueChanged: function (e) {
// if (e && e.component) {
// var data = e.component.option('selectedItem');
// if (data) {
// $scope.taxCalendarConfiguration.workPlaceNames = data.name;
// }
// }
// },
// placeholder: $translate.instant('PleaseSelect')
// };
$scope.validDateStartOption = {
readOnly: !!$scope.isReadOnly,
placeholder: $translate.instant('PleaseSelect')
......@@ -163,14 +163,14 @@
readOnly: !!$scope.isReadOnly
};
$scope.isRelatedTaxMoneyOptions = {
dataSource: [{ value: 1, displayText: $translate.instant('Shi') }, { value: 0, displayText: $translate.instant('Fou') }],
displayExpr: 'displayText',
valueExpr: 'value',
value: 1,
layout: 'horizontal',
readOnly: !!$scope.isReadOnly
};
// $scope.isRelatedTaxMoneyOptions = {
// dataSource: [{ value: 1, displayText: $translate.instant('Shi') }, { value: 0, displayText: $translate.instant('Fou') }],
// displayExpr: 'displayText',
// valueExpr: 'value',
// value: 1,
// layout: 'horizontal',
// readOnly: !!$scope.isReadOnly
// };
$scope.bzOptions = {
readOnly: !!$scope.isReadOnly,
placeholder: $translate.instant('PleaseInput'),
......@@ -188,31 +188,31 @@
message: $translate.instant('ValidDataRequired')
}]
};
$scope.validateOption.operatorOptions = {
validationRules: [{
type: "required",
message: $translate.instant('OperaterRequired')
}]
};
// $scope.validateOption.operatorOptions = {
// validationRules: [{
// type: "required",
// message: $translate.instant('OperaterRequired')
// }]
// };
$scope.validateOption.companyOptions = {
validationRules: [{
type: "required",
message: $translate.instant('CompanyRequired')
}]
};
$scope.validateOption.eventMonthOptions = {
$scope.validateOption.configMonthOptions = {
validationRules: [{
type: "required",
message: $translate.instant('EventMonthRequired')
}]
};
$scope.validateOption.taxOptions = {
$scope.validateOption.taskTypeOptions = {
validationRules: [{
type: "required",
message: $translate.instant('TaxOptionRequired')
}]
};
$scope.validateOption.eventDateOptions = {
$scope.validateOption.configDateOptions = {
validationRules: [{
type: "required",
message: $translate.instant('EventDayRequired')
......@@ -221,12 +221,12 @@
//表单验证对象初始化-->end
$scope.editTaxProjectList = function () {
$scope.editTaskTypeList = function () {
if ($scope.isReadOnly) {
return;
}
$scope.taxProjectGridOptions = {
$scope.taskTypeGridOptions = {
showRowLines: true,
showColumnLines: true,
showBorders: true,
......@@ -234,18 +234,18 @@
hoverStateEnabled: true,
rowAlternationEnabled: true,
bindingOptions: {
dataSource: 'taxProjectList'
dataSource: 'taskTypeList'
},
filterRow: {
visible: true
},
height: 250,
columns: [
{ dataField: 'taxProjectName', caption: $translate.instant('TaxProjectName'), width: '70%' },
{ dataField: 'name', caption: $translate.instant('TaxProjectName'), width: '70%' },
{
dataField: '', caption: $translate.instant('OrderOperation'), width: '30%', cellTemplate: function (ele, info) {
$('<i class="fa fa-pencil-square-o"/>').css({ 'color': '#d00', 'cursor': 'pointer', 'font-size': '16px' }).html('&nbsp;&nbsp;').on('dxclick', function () {
$scope.editTaxProject(info.data);
$scope.editTaskType(info.data);
}).appendTo(ele);
//$('<i class="fa fa-trash"/>').css({ 'color': '#d00', 'cursor': 'pointer', 'font-size': '16px', 'padding-left': '10px' }).on('dxclick', function () {
// SweetAlert.swal({
......@@ -261,9 +261,9 @@
// },
// function (isConfirm) {
// if (isConfirm) {
// taxCalendarService.deleteTaxProject(info.data.id).success(function () {
// taxCalendarService.deleteTaskType(info.data.id).success(function () {
// SweetAlert.success($translate.instant('CommonSuccess'));
// refreshTaxProjectList();
// refreshTaskTypeList();
// getCalendarConfigurationById();
// }).error(function () {
......@@ -277,11 +277,11 @@
};
//关闭弹窗口
$scope.hideEditTaxProjectListPanel = function () {
$scope.editTaxProjectListInstance.dismiss('cancel');
$scope.hideEditTaskTypeListPanel = function () {
$scope.editTaskTypeListInstance.dismiss('cancel');
};
$scope.editTaxProjectListInstance = $uibModal.open({
$scope.editTaskTypeListInstance = $uibModal.open({
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
backdrop: 'static',
......@@ -292,8 +292,8 @@
});
};
$scope.editTaxProject = function (data) {
$scope.validateOption.taxProjectText = {
$scope.editTaskType = function (data) {
$scope.validateOption.taskTypeText = {
validationRules: [{
type: "required",
message: $translate.instant('TaxProjectRequireWrite')
......@@ -304,44 +304,46 @@
}]
};
$scope.editTaxProjectEntity = {
$scope.editTaskTypeEntity = {
id: '',
taxProjectName: ''
name: ''
};
if (!data) {
$scope.editTaxProjectTitle = $translate.instant('NewTaxProject');
$scope.editTaskTypeTitle = $translate.instant('NewTaxProject');
} else {
$scope.editTaxProjectTitle = $translate.instant('EditTaxProject');
$scope.editTaxProjectEntity.taxProjectName = data.taxProjectName;
$scope.editTaxProjectEntity.id = data.id;
$scope.editTaskTypeTitle = $translate.instant('EditTaxProject');
$scope.editTaskTypeEntity.name = data.name;
$scope.editTaskTypeEntity.id = data.id;
}
//保存税务事项
$scope.confirmSubmitTaxProject = function () {
$scope.confirmSubmitTaskType = function () {
//必填验证
var dxResult = DevExpress.validationEngine.validateGroup($('#editTaxProjectForm').dxValidationGroup("instance")).isValid;
var dxResult = DevExpress.validationEngine.validateGroup($('#editTaskTypeForm').dxValidationGroup("instance")).isValid;
if (!dxResult) {
return;
}
var taxProjectModel = $scope.editTaxProjectEntity;
taxCalendarService.saveTaxProject(taxProjectModel).success(function (result) {
if (result == -1) {
SweetAlert.warning($translate.instant('TaxProjectNameRepeat'));
} else {
var taskTypeModel = $scope.editTaskTypeEntity;
taxCalendarService.saveTaskType(taskTypeModel).success(function (result) {
if (result.result) {
SweetAlert.success($translate.instant('CommonSuccess'));
$scope.editTaxProjectInstance.dismiss('cancel');
refreshTaxProjectList();
$scope.editTaskTypeInstance.dismiss('cancel');
refreshTaskTypeList();
getCalendarConfigurationById();
} else if (result.resultMsg == -1){
SweetAlert.warning($translate.instant('TaxProjectNameRepeat'));
} else {
SweetAlert.warning($translate.instant('SystemException'));
}
});
};
//关闭弹窗口
$scope.hideEditTaxProjectPanel = function () {
$scope.editTaxProjectInstance.dismiss('cancel');
$scope.hideEditTaskTypePanel = function () {
$scope.editTaskTypeInstance.dismiss('cancel');
};
$scope.editTaxProjectInstance = $uibModal.open({
$scope.editTaskTypeInstance = $uibModal.open({
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
backdrop: 'static',
......@@ -352,167 +354,167 @@
});
};
$scope.editWorkPlaceList = function () {
if ($scope.isReadOnly) {
return;
}
$scope.workPlaceGridOptions = {
showRowLines: true,
showColumnLines: true,
showBorders: true,
allowColumnResizing: true,
hoverStateEnabled: true,
rowAlternationEnabled: true,
bindingOptions: {
dataSource: 'workPlaceList'
},
filterRow: {
visible: true
},
height: 250,
columns: [
{ dataField: 'name', caption: $translate.instant('WorkPlaceName'), width: '70%' },
{
dataField: '', caption: $translate.instant('OrderOperation'), width: '30%', cellTemplate: function (ele, info) {
$('<i class="fa fa-pencil-square-o"/>').css({ 'color': '#d00', 'cursor': 'pointer', 'font-size': '16px' }).html('&nbsp;&nbsp;').on('dxclick', function () {
$scope.editWorkPlace(info.data);
}).appendTo(ele);
$('<i class="fa fa-trash"/>').css({ 'color': '#d00', 'cursor': 'pointer', 'font-size': '16px', 'padding-left': '10px' }).on('dxclick', function () {
SweetAlert.swal({
title: $translate.instant('DeleteConfirm'),
text: $translate.instant('ComfirmDeleteData'),
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: true,
closeOnCancel: true
},
function (isConfirm) {
if (isConfirm) {
taxCalendarService.deleteWorkPlace(info.data.id).success(function () {
SweetAlert.success($translate.instant('CommonSuccess'));
refreshWorkPlaceList();
getCalendarConfigurationById();
}).error(function () {
});
}
});
}).appendTo(ele);
}
}
]
};
//关闭弹窗口
$scope.hideEditWorkPlaceListPanel = function () {
$scope.editWorkPlaceListInstance.dismiss('cancel');
};
$scope.editWorkPlaceListInstance = $uibModal.open({
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
backdrop: 'static',
templateUrl: 'edit-work-place-pop.html',
windowClass: 'data-table',
appendTo: angular.element($document[0].querySelector('#edit-work-place-pop')),
scope: $scope
});
};
$scope.editWorkPlace = function (data) {
$scope.validateOption.workPlaceText = {
validationRules: [{
type: "required",
message: $translate.instant('WorkPlaceRequireWrite')
}, {
type: "stringLength",
max: 200,
message: $translate.instant('WorkPlaceMaxLength')
}]
};
$scope.editWorkPlaceEntity = {
id: '',
name: ''
};
if (!data) {
$scope.editWorkPlaceTitle = $translate.instant('NewWorkPlace');
} else {
$scope.editWorkPlaceTitle = $translate.instant('EditWorkPlace');
$scope.editWorkPlaceEntity.id = data.id;
$scope.editWorkPlaceEntity.name = data.name;
}
//关闭弹窗口
$scope.hideEditWorkPlacePanel = function () {
$scope.editWorkPlaceInstance.dismiss('cancel');
};
//保存办事地点
$scope.confirmSubmitWorkPlace = function () {
//必填验证
var dxResult = DevExpress.validationEngine.validateGroup($('#editWorkPlaceForm').dxValidationGroup("instance")).isValid;
if (!dxResult) {
return;
}
var workPlaceModel = $scope.editWorkPlaceEntity;
taxCalendarService.saveWorkPlace(workPlaceModel).success(function (result) {
if (result == -1) {
SweetAlert.warning($translate.instant('WorkPlaceNameRepeat'));
} else {
SweetAlert.success($translate.instant('CommonSuccess'));
$scope.editWorkPlaceInstance.dismiss('cancel');
refreshWorkPlaceList();
getCalendarConfigurationById();
}
});
};
$scope.editWorkPlaceInstance = $uibModal.open({
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
backdrop: 'static',
templateUrl: 'edit-work-place.html',
windowClass: 'data-table',
appendTo: angular.element($document[0].querySelector('#edit-work-place')),
scope: $scope
});
};
// $scope.editWorkPlaceList = function () {
// if ($scope.isReadOnly) {
// return;
// }
//
// $scope.workPlaceGridOptions = {
// showRowLines: true,
// showColumnLines: true,
// showBorders: true,
// allowColumnResizing: true,
// hoverStateEnabled: true,
// rowAlternationEnabled: true,
// bindingOptions: {
// dataSource: 'workPlaceList'
// },
// filterRow: {
// visible: true
// },
// height: 250,
// columns: [
// { dataField: 'name', caption: $translate.instant('WorkPlaceName'), width: '70%' },
// {
// dataField: '', caption: $translate.instant('OrderOperation'), width: '30%', cellTemplate: function (ele, info) {
// $('<i class="fa fa-pencil-square-o"/>').css({ 'color': '#d00', 'cursor': 'pointer', 'font-size': '16px' }).html('&nbsp;&nbsp;').on('dxclick', function () {
// $scope.editWorkPlace(info.data);
// }).appendTo(ele);
// $('<i class="fa fa-trash"/>').css({ 'color': '#d00', 'cursor': 'pointer', 'font-size': '16px', 'padding-left': '10px' }).on('dxclick', function () {
// SweetAlert.swal({
// title: $translate.instant('DeleteConfirm'),
// text: $translate.instant('ComfirmDeleteData'),
// type: "warning",
// showCancelButton: true,
// confirmButtonColor: "#DD6B55",
// confirmButtonText: $translate.instant('Confirm'),
// cancelButtonText: $translate.instant('Cancel'),
// closeOnConfirm: true,
// closeOnCancel: true
// },
// function (isConfirm) {
// if (isConfirm) {
// taxCalendarService.deleteWorkPlace(info.data.id).success(function () {
// SweetAlert.success($translate.instant('CommonSuccess'));
// refreshWorkPlaceList();
// getCalendarConfigurationById();
// }).error(function () {
//
// });
// }
// });
// }).appendTo(ele);
// }
// }
// ]
// };
//
// //关闭弹窗口
// $scope.hideEditWorkPlaceListPanel = function () {
// $scope.editWorkPlaceListInstance.dismiss('cancel');
// };
//
// $scope.editWorkPlaceListInstance = $uibModal.open({
// ariaLabelledBy: 'modal-title',
// ariaDescribedBy: 'modal-body',
// backdrop: 'static',
// templateUrl: 'edit-work-place-pop.html',
// windowClass: 'data-table',
// appendTo: angular.element($document[0].querySelector('#edit-work-place-pop')),
// scope: $scope
// });
// };
// $scope.editWorkPlace = function (data) {
// $scope.validateOption.workPlaceText = {
// validationRules: [{
// type: "required",
// message: $translate.instant('WorkPlaceRequireWrite')
// }, {
// type: "stringLength",
// max: 200,
// message: $translate.instant('WorkPlaceMaxLength')
// }]
// };
// $scope.editWorkPlaceEntity = {
// id: '',
// name: ''
// };
//
// if (!data) {
// $scope.editWorkPlaceTitle = $translate.instant('NewWorkPlace');
// } else {
// $scope.editWorkPlaceTitle = $translate.instant('EditWorkPlace');
// $scope.editWorkPlaceEntity.id = data.id;
// $scope.editWorkPlaceEntity.name = data.name;
// }
//
// //关闭弹窗口
// $scope.hideEditWorkPlacePanel = function () {
// $scope.editWorkPlaceInstance.dismiss('cancel');
// };
//
// //保存办事地点
// $scope.confirmSubmitWorkPlace = function () {
// //必填验证
// var dxResult = DevExpress.validationEngine.validateGroup($('#editWorkPlaceForm').dxValidationGroup("instance")).isValid;
// if (!dxResult) {
// return;
// }
// var workPlaceModel = $scope.editWorkPlaceEntity;
// taxCalendarService.saveWorkPlace(workPlaceModel).success(function (result) {
// if (result == -1) {
// SweetAlert.warning($translate.instant('WorkPlaceNameRepeat'));
// } else {
// SweetAlert.success($translate.instant('CommonSuccess'));
// $scope.editWorkPlaceInstance.dismiss('cancel');
// refreshWorkPlaceList();
// getCalendarConfigurationById();
// }
//
// });
// };
//
// $scope.editWorkPlaceInstance = $uibModal.open({
// ariaLabelledBy: 'modal-title',
// ariaDescribedBy: 'modal-body',
// backdrop: 'static',
// templateUrl: 'edit-work-place.html',
// windowClass: 'data-table',
// appendTo: angular.element($document[0].querySelector('#edit-work-place')),
// scope: $scope
// });
// };
var refreshTaxProjectList = function() {
taxCalendarService.getTaxProjectList().success(function (result) {
if (result) {
$scope.taxProjectList = result;
var refreshTaskTypeList = function() {
taxCalendarService.getTaskTypeList().success(function (result) {
if (result && result.result && result.data) {
$scope.taskTypeList = result.data;
}
resetEditBoxTag();
});
};
var refreshWorkPlaceList = function () {
taxCalendarService.getWorkPlaceList().success(function (result) {
if (result) {
$scope.workPlaceList = result;
}
resetEditBoxTag();
});
};
// var refreshWorkPlaceList = function () {
// taxCalendarService.getWorkPlaceList().success(function (result) {
// if (result) {
// $scope.workPlaceList = result;
// }
// resetEditBoxTag();
// });
// };
var getCalendarConfigurationById = function () {
if ($scope.calendarConfigId) {
taxCalendarService.getTaxCalendarConfigurationByID($scope.calendarConfigId).success(function (result) {
if (result) {
$scope.taxCalendarConfiguration = result;
$scope.taxCalendarConfiguration.companyArr = result.companyIDs ? result.companyIDs.split(',') : null;
$scope.taxCalendarConfiguration.monthArr = result.projectMonths ? result.projectMonths.split(',') : null;
$scope.taxCalendarConfiguration.taxProjectIdArr = result.taxProjectIDs ? result.taxProjectIDs.split(',') : null;
$scope.taxCalendarConfiguration.projectDayArr = result.projectDays ? result.projectDays.split(',') : null;
$scope.taxCalendarConfiguration.operatorIdArr = result.operatorIDs ? result.operatorIDs.split(',') : null;
$scope.taxCalendarConfiguration.notifierIdArr = result.notifierIDs ? result.notifierIDs.split(',') : null;
taxCalendarService.getCalendarConfigById($scope.calendarConfigId).success(function (result) {
if (result.result) {
$scope.taxCalendarConfiguration = result.data;
$scope.taxCalendarConfiguration.companyArr = result.data.entityIds ? result.data.entityIds.split(',') : null;
$scope.taxCalendarConfiguration.monthArr = result.data.projectMonths ? result.data.projectMonths.split(',') : null;
$scope.taxCalendarConfiguration.taskTypeIdArr = result.data.taskTypeIds ? result.data.taskTypeIds.split(',') : null;
$scope.taxCalendarConfiguration.projectDayArr = result.data.projectDays ? result.data.projectDays.split(',') : null;
$scope.taxCalendarConfiguration.operatorIdArr = result.data.userIds ? result.userIds.split(',') : null;
// $scope.taxCalendarConfiguration.notifierIdArr = result.notifierIDs ? result.notifierIDs.split(',') : null;
if ($scope.taxCalendarConfiguration.monthArr) {
$scope.taxCalendarConfiguration.monthArr = _.map($scope.taxCalendarConfiguration.monthArr, function (item) { return item * 1; });
......@@ -529,7 +531,8 @@
var getMaxNumber = function () {
if (!$scope.calendarConfigId) {
taxCalendarService.getMaxNumber().success(function (data) {
$scope.taxCalendarConfiguration.calendarNumber = data;
if(data.result)
$scope.taxCalendarConfiguration.orderIndex = data.data;
}).error(function () {
});
......@@ -538,14 +541,14 @@
//保存配置-->start
var startSaveConfig = function (model, flag) {
model.companyIDs = "";
model.entityIds = "";
model.projectMonths = "";
model.taxProjectIDs = "";
model.taskTypeIds = "";
model.projectDays = "";
model.operatorIDs = "";
model.notifierIDs = "";
// model.staff = "";
// model.notifierIDs = "";
if (model.companyArr && model.companyArr.length > 0) {
model.companyIDs = model.companyArr.join(',');
model.entityIds = model.companyArr.join(',');
}
if (model.monthArr && model.monthArr.length > 0) {
......@@ -553,8 +556,8 @@
model.projectMonths = model.monthArr.join(',');
}
if (model.taxProjectIdArr && model.taxProjectIdArr.length > 0) {
model.taxProjectIDs = model.taxProjectIdArr.join(',');
if (model.taskTypeIdArr && model.taskTypeIdArr.length > 0) {
model.taskTypeIds = model.taskTypeIdArr.join(',');
}
if (model.projectDayArr && model.projectDayArr.length > 0) {
......@@ -562,21 +565,32 @@
model.projectDays = model.projectDayArr.join(',');
}
if (model.operatorIdArr && model.operatorIdArr.length > 0) {
model.operatorIDs = model.operatorIdArr.join(',');
}
// if (model.operatorIdArr && model.operatorIdArr.length > 0) {
// model.staff = model.operatorIdArr.join(',');
// }
if (model.notifierIdArr && model.notifierIdArr.length > 0) {
model.notifierIDs = model.notifierIdArr.join(',');
}
// if (model.notifierIdArr && model.notifierIdArr.length > 0) {
// model.notifierIDs = model.notifierIdArr.join(',');
// }
if (flag == 2) {
model.id = null;
}
taxCalendarService.saveTaxCalendarConfig(model).success(function () {
//暂时写死,以后修改完善
if (model.id == null){
model.taskName = "default";
model.staff = "admin";
}
taxCalendarService.saveCalendarConfig(model).success(function (result) {
if (result.result) {
SweetAlert.success($translate.instant('CommonSuccess'));
} else {
SweetAlert.error($translate.instant('CommonFail'));
}
$scope.backToListPage();
}).error(function () {
SweetAlert.error($translate.instant('SystemException'));
});
}
......@@ -613,36 +627,37 @@
//检查选择的公司与员工的可访问权限是否匹配
var checkDto = {};
checkDto.companyList = model.companyArr;
checkDto.userList = _.union(model.operatorIdArr, model.notifierIdArr);
taxCalendarService.checkUserCompanyPromiss(checkDto).success(function (result) {
if (result && result.length > 0) {
$scope.noPromissUserList = result;
//关闭弹窗口
$scope.hideUserPromissCheckPanel = function () {
$scope.userPromissInstance.dismiss('cancel');
};
$scope.userPromissInstance = $uibModal.open({
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
backdrop: 'static',
templateUrl: 'user-promiss-check.html',
windowClass: 'data-table',
appendTo: angular.element($document[0].querySelector('#user-promiss-check-container')),
scope: $scope
});
} else {
// checkDto.userList = _.union(model.operatorIdArr, model.notifierIdArr);
// taxCalendarService.checkUserCompanyPromiss(checkDto).success(function (result) {
// if (result && result.length > 0) {
// $scope.noPromissUserList = result;
// //关闭弹窗口
// $scope.hideUserPromissCheckPanel = function () {
// $scope.userPromissInstance.dismiss('cancel');
// };
//
// $scope.userPromissInstance = $uibModal.open({
// ariaLabelledBy: 'modal-title',
// ariaDescribedBy: 'modal-body',
// backdrop: 'static',
// templateUrl: 'user-promiss-check.html',
// windowClass: 'data-table',
// appendTo: angular.element($document[0].querySelector('#user-promiss-check-container')),
// scope: $scope
// });
// } else {
// startSaveConfig(model, flag);
// });
startSaveConfig(model, flag);
}
});
};
// }
};
//保存配置-->end
//日历设置另存为
$scope.saveAsConfig = function () {
$scope.calendarConfigId = null;
$scope.PageTitle = $translate.instant('NewTaxCalendar') + $translate.instant('TaxCalendarSet');
$scope.isTaxProjectReadOnly = false;
$scope.isTaskTypeReadOnly = false;
$scope.taxCalendarConfiguration.id = null;
getMaxNumber();
};
......@@ -651,10 +666,11 @@
$state.go('taxCalendarConfiguration');
};
//默认启用和涉及税款
//默认启用
$scope.taxCalendarConfiguration = {
status: 1,
isRelatedTaxMoney: 0
companyArr: [],
taskTypeIdArr: []
};
//tagBox控件不可编辑时,隐藏X按钮
......@@ -674,9 +690,9 @@
(function () {
$scope.userList = [];
$scope.orgList = [];
$scope.workPlaceList = [];
$scope.isTaxProjectReadOnly = !!$scope.isReadOnly || !!$scope.calendarConfigId;
$scope.entityList = [];
// $scope.workPlaceList = [];
$scope.isTaskTypeReadOnly = !!$scope.isReadOnly || !!$scope.calendarConfigId;
userService.getAllAvalideUserList().success(function (result) {
if (result) {
$scope.userList = _.map(result, function (item) {
......@@ -686,16 +702,15 @@
}
});
orgService.getAllActiveOrgList().success(function (result) {
$scope.orgList = _.map(result, function (item) {
var obj = { id: item.id, companyName: item.name };
return obj;
});
taxCalendarService.getActiveEntityList().success(function (result) {
if(result.result) {
$scope.entityList = result.data;
}
});
refreshWorkPlaceList();
// refreshWorkPlaceList();
refreshTaxProjectList();
refreshTaskTypeList();
getCalendarConfigurationById();
......
......@@ -7,7 +7,7 @@
<div class="edit-line row">
<div class="col-user-define-left col-padding">
<span class="title-first-n">{{'Number' | translate}}:</span>
<div class="form-box bh-box" ng-model="taxCalendarConfiguration.calendarNumber" dx-text-box="bhOptions"></div>
<div class="form-box bh-box" ng-model="taxCalendarConfiguration.orderIndex" dx-text-box="bhOptions"></div>
&nbsp;&nbsp;&nbsp;&nbsp;
<div class="form-box" ng-model="taxCalendarConfiguration.status" dx-radio-group="statusOptions"></div>
</div>
......@@ -39,7 +39,7 @@
{{'EventMonth' | translate}}:
</span>
<div class="form-box common-box" ng-model="taxCalendarConfiguration.monthArr" dx-validator="validateOption.eventMonthOptions" dx-tag-box="eventMonthOptions"></div>
<div class="form-box common-box" ng-model="taxCalendarConfiguration.monthArr" dx-validator="validateOption.configMonthOptions" dx-tag-box="configMonthOptions"></div>
</div>
</div>
<div class="edit-line row">
......@@ -48,8 +48,8 @@
<span style="color:red;">*</span>
{{'TaxEvent' | translate}}:
</span>
<div id="tax-project" class="form-box common-box" ng-model="taxCalendarConfiguration.taxProjectIdArr" dx-validator="validateOption.taxOptions" dx-tag-box="taxOptions"></div>
&nbsp;&nbsp;<span ng-if="!isReadOnly" atms-permission permission-control-type="ngIf" permission-code="{{$root.adminPermission.systemConfiguration.taxCalendarConfig.editTaxProject}}" ng-click="editTaxProjectList();" class="right-link">{{'EditTaxProject'|translate}}</span>
<div id="tax-project" class="form-box common-box" ng-model="taxCalendarConfiguration.taskTypeIdArr" dx-validator="validateOption.taskTypeOptions" dx-tag-box="taskTypeOptions"></div>
&nbsp;&nbsp;<span ng-if="!isReadOnly" atms-permission permission-control-type="ngIf" permission-code="{{$root.adminPermission.systemConfiguration.calendar.editTaskType}}" ng-click="editTaskTypeList();" class="right-link">{{'EditTaxProject'|translate}}</span>
</div>
<div class="col-user-define-right col-padding">
......@@ -58,18 +58,16 @@
<span style="color:red;">*</span>
{{'EventDay' | translate}}:
</span>
<div class="form-box common-box" ng-model="taxCalendarConfiguration.projectDayArr" dx-validator="validateOption.eventDateOptions" dx-tag-box="eventDateOptions"></div>
<div class="form-box common-box" ng-model="taxCalendarConfiguration.projectDayArr" dx-validator="validateOption.configDateOptions" dx-tag-box="configDateOptions"></div>
</div>
</div>
</div>
<div class="edit-line row">
<div class="col-user-define-left col-padding">
<span class="title-first-n">{{'RelatedTaxAmount' | translate}}:</span>
<div class="form-box sssx-box" ng-model="taxCalendarConfiguration.isRelatedTaxMoney" dx-radio-group="isRelatedTaxMoneyOptions"></div>
<span class="title-first-n">{{'EventAddress' | translate}}:</span>
<div class="form-box common-box" ng-model="taxCalendarConfiguration.workPlaceIDs" dx-select-box="addressOptions"></div>
&nbsp;&nbsp;<span ng-if="!isReadOnly" atms-permission permission-control-type="ngIf" permission-code="{{$root.adminPermission.systemConfiguration.taxCalendarConfig.editWorkPlace}}" ng-click="editWorkPlaceList();" class="right-link">{{'EditWorkPlace'|translate}}</span>
<!-- <span class="title-first-n">{{'EventAddress' | translate}}:</span>-->
<!-- <div class="form-box common-box" ng-model="taxCalendarConfiguration.workPlaceIDs" dx-select-box="addressOptions"></div>-->
<!-- &nbsp;&nbsp;<span ng-if="!isReadOnly" atms-permission permission-control-type="ngIf" permission-code="{{$root.adminPermission.systemConfiguration.taxCalendarConfig.editWorkPlace}}" ng-click="editWorkPlaceList();" class="right-link">{{'EditWorkPlace'|translate}}</span>-->
</div>
......@@ -93,20 +91,20 @@
<div class="form-box common-box" ng-model="taxCalendarConfiguration.operatorIdArr" dx-validator="validateOption.operatorOptions" dx-tag-box="operatorOptions"></div>
<br />
<span class="title-first-n">{{'RelatedPerson' | translate}}:</span>
<div class="form-box common-box" ng-model="taxCalendarConfiguration.notifierIdArr" dx-tag-box="notifierOptions"></div>
<!-- <span class="title-first-n">{{'RelatedPerson' | translate}}:</span>-->
<!-- <div class="form-box common-box" ng-model="taxCalendarConfiguration.notifierIdArr" dx-tag-box="notifierOptions"></div>-->
</div>
<div class="col-remark-right">
<span class="title-second-n">{{'Remark' | translate}}:</span>
<div class="form-box common-box" ng-model="taxCalendarConfiguration.remark" dx-text-area="bzOptions"></div>
<div class="form-box common-box" ng-model="taxCalendarConfiguration.notes" dx-text-area="bzOptions"></div>
</div>
</div>
</div>
<div class="taxCalendarFooter">
<div ng-click="backToListPage();" class="btn btn-default btn-gray">{{'Cancel'|translate}}</div>
<div ng-if="!isReadOnly && calendarConfigId" ng-click="saveAsConfig();" class="btn btn-default btn-red">{{'SaveOther'|translate}}</div>
<!-- <div ng-if="!isReadOnly && calendarConfigId" ng-click="saveAsConfig();" class="btn btn-default btn-red">{{'SaveOther'|translate}}</div>-->
<div ng-if="!isReadOnly" ng-click="saveConfig(1);" class="btn btn-default btn-red">{{'Save'|translate}}</div>
</div>
......@@ -115,7 +113,7 @@
<script type="text/ng-template" class="content" id="edit-tax-project-pop.html">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideEditTaxProjectListPanel()">&times;</span>
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideEditTaskTypeListPanel()">&times;</span>
<h4 class="modal-title">
<i style="color: #b22;font-size: 23px; cursor: pointer;" class="fa fa-pencil"></i>
......@@ -126,14 +124,14 @@
<div class="modal-body">
<div class="row pop-grid-container">
<div class="col-md-12">
<div dx-data-grid="taxProjectGridOptions"></div>
<div dx-data-grid="taskTypeGridOptions"></div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="hideEditTaxProjectListPanel();" class="btn btn-default btn-gray">{{'Cancel' | translate}}</button>
<button ng-click="editTaxProject();" class="btn btn-default btn-red">{{'NewTaxCalendar' | translate}}</button>
<button ng-click="hideEditTaskTypeListPanel();" class="btn btn-default btn-gray">{{'Cancel' | translate}}</button>
<button ng-click="editTaskType();" class="btn btn-default btn-red">{{'NewTaxCalendar' | translate}}</button>
</div>
</script>
......@@ -141,15 +139,15 @@
<div id="edit-tax-project"></div>
<script type="text/ng-template" class="content" id="edit-tax-project.html">
<div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideEditTaxProjectPanel()">&times;</span>
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideEditTaskTypePanel()">&times;</span>
<h4 class="modal-title">
<i style="color: #b22;font-size: 23px; cursor: pointer;" class="fa fa-pencil"></i>
&nbsp;{{editTaxProjectTitle}}
&nbsp;{{editTaskTypeTitle}}
</h4>
</div>
<div class="modal-body" id="editTaxProjectForm" dx-validation-group="{}">
<div class="modal-body" id="editTaskTypeForm" dx-validation-group="{}">
<div class="row">
<div class="col-lg-3">
<span class="form-title">
......@@ -157,14 +155,14 @@
</span>
</div>
<div class="col-lg-9">
<div class="box-font" dx-text-box="{}" dx-validator="validateOption.taxProjectText" ng-model="editTaxProjectEntity.taxProjectName"></div>
<div class="box-font" dx-text-box="{}" dx-validator="validateOption.taskTypeText" ng-model="editTaskTypeEntity.name"></div>
</div>
</div>
</div>
<div class="modal-footer">
<button ng-click="hideEditTaxProjectPanel();" class="btn btn-default btn-gray">{{'Cancel' | translate}}</button>
<button ng-click="confirmSubmitTaxProject();" class="btn btn-default btn-red">{{'Confirm' | translate}}</button>
<button ng-click="hideEditTaskTypePanel();" class="btn btn-default btn-gray">{{'Cancel' | translate}}</button>
<button ng-click="confirmSubmitTaskType();" class="btn btn-default btn-red">{{'Confirm' | translate}}</button>
</div>
</script>
......
......@@ -5,7 +5,7 @@
var scheduleDataSourceList = [];
var taxProjectList = [];
var taskTypeList = [];
$scope.vatPermission = constant.vatPermission;
......@@ -56,7 +56,7 @@
];
//全局变量初始化放顶上
var CompanyList = [];
var entityList = [];
var CalendarList = [];
var dataOptions = {
......@@ -622,7 +622,7 @@
status: 0,
btnCreate: true,
taxProjectID: userDefine.id,
taxProjectName: userDefine.taxProjectName,
taskTypeName: userDefine.taskTypeName,
colorGroup: userDefine.colorGroup
};
......@@ -695,7 +695,7 @@
//刷新筛选选择
function refreshFilterChoise() {
//链式传递筛选结果
var cScheduleList = filterScheduleProperty(CompanyList, 'companyList', 'companyID', dataOptions.allScheduleList);
var cScheduleList = filterScheduleProperty(entityList, 'companyList', 'companyID', dataOptions.allScheduleList);
var sScheduleList = filterScheduleProperty(dataOptions.statusList, 'statusList', 'status', cScheduleList);
ScheduleList = filterScheduleProperty(dataOptions.calendarTypeList, 'calendarTypeList', 'calendarType', sScheduleList);
refreshSchedule();
......@@ -732,7 +732,7 @@
calendar.checked = checked;
});
CompanyList.forEach(function (calendar) {
entityList.forEach(function (calendar) {
calendar.checked = checked;
});
......@@ -746,7 +746,9 @@
}
else {
//设置状态
_.filter(CalendarList, function (ca) { return ca.id === calendarId })[0].checked = checked;
_.filter(CalendarList, function (ca) {
return ca.id === calendarId
})[0].checked = checked;
}
allCheckedCalendars = calendarElements.every(function (input) {
......@@ -842,12 +844,12 @@
var refreshAll = function (scheduleDtoList) {
ScheduleList = [];
//CompanyList = [];
//entityList = [];
scheduleDataSourceList = scheduleDtoList;
//提取Compay ID Name 并排重
//CompanyList = _.uniq(_.map(scheduleDtoList, function (dt) {
//entityList = _.uniq(_.map(scheduleDtoList, function (dt) {
// return {
// value: dt.companyID,
// name: dt.companyName,
......@@ -908,7 +910,7 @@
$scope.permissionData = {};
function setSchedules() {
taxCalendarService.getTaxCalendarDataForDisplay(cal.getDateRangeStart(), cal.getDateRangeEnd()).success(function (scheduleDtoList) {
taxCalendarService.getCalendarDataForDisplay(cal.getDateRangeStart(), cal.getDateRangeEnd()).success(function (scheduleDtoList) {
//如果登录用户没有查看,则不显示相应的税务日历
// userService.getUserPermissionNew(loginContext.userName, function (data) {
// $scope.permissionData = data;
......@@ -954,8 +956,7 @@
var html = [];
CalendarList.forEach(function (calendar) {
html.push('<div class="lnb-calendars-item" style="background: ' + calendar.borderColor + ' ;"><label>' +
'<input type="checkbox" class="tui-full-calendar-checkbox-round" value="' + calendar.id + '" checked>' +
// '<span style="border-color: ' + calendar.borderColor + '; background-color: ' + calendar.borderColor + ';margin-top:3px;display:inline-block;vertical-align:top;"></span>' +
'<input type="checkbox" class="tui-full-calendar-checkbox-round" eleType="calendarList" value="' + calendar.id + '" checked>' +
'<span style="margin-top:5px;display:inline-block;vertical-align:top;"></span>' +
'<span style="display:inline-block;line-height:20px;width:80%;color:white;">' + calendar.name + '</span>' +
'</label></div>'
......@@ -963,7 +964,7 @@
});
calendarList.innerHTML = html.join('\n');
renderList(CompanyList, 'companyList','#aaa');
renderList(entityList, 'companyList','#aaa');
renderList(dataOptions.statusList, 'statusList','#aaa');
renderList(dataOptions.calendarTypeList, 'calendarTypeList', '#aaa');
......@@ -1006,22 +1007,22 @@
}
var getTaxProjectList = function () {
taxProjectList = [];
taskTypeList = [];
var setColor = function (data) {
var colorLenth = dataOptions.colorArray.length;
var colorLength = dataOptions.colorArray.length;
for (var key = 0; key < data.length; key++) {
var value = data[key];
value.colorGroup = {
color: dataOptions.colorArray[key % colorLenth].color,
bgColor: dataOptions.colorArray[key % colorLenth].bgColor,
dragBgColor: dataOptions.colorArray[key % colorLenth].dragBgColor,
borderColor: dataOptions.colorArray[key % colorLenth].borderColor
color: dataOptions.colorArray[key % colorLength].color,
bgColor: dataOptions.colorArray[key % colorLength].bgColor,
dragBgColor: dataOptions.colorArray[key % colorLength].dragBgColor,
borderColor: dataOptions.colorArray[key % colorLength].borderColor
};
}
taxProjectList = data;
taskTypeList = data;
};
var setCalendar = function () {
......@@ -1029,13 +1030,13 @@
CalendarList = [];
//补全颜色 生成 CalendarList
var colorLenth = dataOptions.colorArray.length;
var colorLength = dataOptions.colorArray.length;
taxProjectList.forEach(function (value) {
taskTypeList.forEach(function (value) {
var colorGroup = value.colorGroup;
CalendarList.push({
id: value.id,
name: value.taxProjectName,
name: value.name,
checked: true,
color: colorGroup.color,
bgColor: colorGroup.bgColor,
......@@ -1046,9 +1047,8 @@
});
};
taxCalendarService.getAllTaxProjectList().success(function (data) {
setColor(data);
taxCalendarService.getAllTaskTypeList().success(function (result) {
setColor(result.data);
setCalendar();
setSchedules();
}).error(function (data) {
......@@ -1177,7 +1177,7 @@
id: param.data.id,
type: param.data.type,
taxProjectID: param.data.taxProjectID,
taxProjectName: param.data.taxProjectName,
taskTypeName: param.data.taskTypeName,
companyID: param.data.companyID,
companyName: param.data.companyName,
workPlaceID: param.data.workPlaceID,
......@@ -1259,7 +1259,7 @@
status: 0,
guideBound: guideBound,
taxProjectID: userDefine.id,
taxProjectName: userDefine.taxProjectName,
taskTypeName: userDefine.taskTypeName,
colorGroup: userDefine.colorGroup
};
......@@ -1285,7 +1285,7 @@
//修改日历设置事项的事项类别
var userDefine = getUserDefineTaxProject();
if ($scope.popupOptions.operateModel.taxProjectName != userDefine.taxProjectName) {
if ($scope.popupOptions.operateModel.taskTypeName != userDefine.taskTypeName) {
$scope.popupOptions.operateModel.taxProjectName = $translate.instant('CalendarSetEvent');
}
}
......@@ -1293,34 +1293,34 @@
};
var getUserDefineTaxProject = function () {
if (!taxProjectList || taxProjectList.length === 0) {
if (!taskTypeList || taskTypeList.length === 0) {
return null;
}
return taxProjectList[0];
return taskTypeList[0];
};
var getTaxProject = function (id) {
if (!taxProjectList || taxProjectList.length === 0) {
if (!taskTypeList || taskTypeList.length === 0) {
return dataOptions.colorArray[0];
}
var tax = _.find(taxProjectList, { id: id });
var tax = _.find(taskTypeList, { id: id });
if (tax) {
return tax.colorGroup;
}
// 没有找到数据,默认取第一条的colorGroup
return taxProjectList[0].colorGroup;
return taskTypeList[0].colorGroup;
};
//获取用户的可访问的公司列表
var getCompanyList = function () {
CompanyList = []
taxCalendarService.getTaxCalendarUserCompanys(loginContext.userName).success(function (datas) {
if (datas && datas.length > 0) {
CompanyList = _.map(datas, function (dt) {
entityList = [];
taxCalendarService.getActiveEntityList().success(function (result) {
if (result.result) {
entityList = _.map(result.data, function (dt) {
return {
value: dt.id,
name: dt.name,
......@@ -1346,7 +1346,7 @@
initScopeVariable();
initControls();
getCompanyList();
//getTaxProjectList();
//getTaskTypeList();
})();
}
......
......@@ -45,9 +45,9 @@
];
$scope.editModel = {};
taxCalendarService.getWorkPlaceList().success(function (result) {
if (result) {
$scope.workPlaceList = result;
taxCalendarService.getActiveEntityList().success(function (result) {
if (result.result) {
$scope.workPlaceList = result.data;
}
});
......@@ -175,7 +175,7 @@
$scope.isReadOnly = false;
if ($scope.operateModel) {
$scope.editModel = $scope.operateModel;
$scope.editModel.taxProjectNameShow = $scope.editModel.taxProjectName;
$scope.editModel.taxProjectNameShow = $scope.editModel.taskTypeName;
$scope.editModel.id = window.PWC.newGuid();
$scope.editModel.eventDate = new Date($scope.operateModel.eventDate).formatDateTime('yyyy-MM-dd');
$scope.editModel.statusText = $translate.instant(taxEventFinishStatus[$scope.editModel.status]);
......@@ -203,7 +203,7 @@
if ($scope.operateModel) {
$scope.editModel = $scope.operateModel;
var showText = $scope.operateModel.taxProjectName;
var showText = $scope.operateModel.taskTypeName;
if ($scope.operateModel.calendarNumber) {
showText += ' ' + $scope.operateModel.calendarNumber;
......
......@@ -2,24 +2,42 @@
webservices.factory('taxCalendarService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
test: function () { return $http.get('/taxCalendar/test', apiConfig.create()); },
getWorkPlaceList: function () {
return $http.get('/taxCalendar/getWorkPlaceList', apiConfig.create());
getActiveEntityList: function () {
return $http.get('/calendar/getActiveEntityList', apiConfig.create());
},
getTaskTypeList: function () {
return $http.get('/calendar/getTaskTypeList', apiConfig.create());
},
getTaxProjectList: function () {
return $http.get('/taxCalendar/getTaxProjectList', apiConfig.create());
getAllTaskTypeList: function () {
return $http.get('/calendar/getAllTaskTypeList', apiConfig.create());
},
getAllTaxProjectList: function () {
return $http.get('/taxCalendar/getAllTaxProjectList', apiConfig.create());
saveTaskType: function (data) {
return $http.post('/calendar/saveTaskType', data, apiConfig.create());
},
getTaxCalendarConfigurationList: function (queryParam) {
return $http.post('/taxCalendar/getTaxCalendarConfigurationList', queryParam, apiConfig.create());
getCalendarConfigList: function (queryParam) {
return $http.post('/calendar/getCalendarConfigList', queryParam, apiConfig.create());
},
getTaxCalendarConfigurationByID: function (configID) {
return $http.get('/taxCalendar/getTaxCalendarConfigurationByID/' + configID, apiConfig.create());
getCalendarConfigById: function (configID) {
return $http.get('/calendar/getCalendarConfigById/' + configID, apiConfig.create());
},
saveTaxProject: function (data) {
return $http.post('/taxCalendar/saveTaxProject', data, apiConfig.create());
saveCalendarConfig: function (data) {
return $http.post('/calendar/saveCalendarConfig', data, apiConfig.create());
},
getCalendarDataForDisplay: function (startData, endDate) {
return $http.post('/calendar/getCalendarDataForDisplay', { queryStartTime: (new Date(startData)).dateTimeToString('yyyyMMdd'), queryEndTime: (new Date(endDate)).dateTimeToString('yyyyMMdd') + " 23:59:59", userID: '', userName: '' }, apiConfig.create());
},
getMaxNumber: function () {
return $http.get('/calendar/getMaxConfigOrder', apiConfig.create());
},
test: function () { return $http.get('/taxCalendar/test', apiConfig.create()); },
getWorkPlaceList: function () {
return $http.get('/taxCalendar/getWorkPlaceList', apiConfig.create());
},
deleteTaxProject: function(taxProjectId){
return $http.post('/taxCalendar/deleteTaxProject/' + taxProjectId, {}, apiConfig.create());
......@@ -30,15 +48,8 @@ webservices.factory('taxCalendarService', ['$http', 'apiConfig', function ($http
deleteWorkPlace: function(workPlaceId){
return $http.post('/taxCalendar/deleteWorkPlace/' + workPlaceId, {}, apiConfig.create());
},
saveTaxCalendarConfig: function (data) {
return $http.post('/taxCalendar/saveTaxCalendarConfig', data, apiConfig.create());
},
getMaxNumber: function () {
return $http.get('/taxCalendar/getMaxNumber', apiConfig.create());
},
getTaxCalendarDataForDisplay: function (startData, endDate) {
return $http.post('/taxCalendar/getTaxCalendarDataForDisplay', { queryStartTime: (new Date(startData)).dateTimeToString('yyyyMMdd'), queryEndTime: (new Date(endDate)).dateTimeToString('yyyyMMdd'), userID: '', userName: '' }, apiConfig.create());
},
getTaxCalendarUserCompanys: function (userName) {
return $http.get('/taxCalendar/getTaxCalendarUserCompanys/' + userName, apiConfig.create());
},
......
......@@ -6,15 +6,15 @@ function ($http, apiConfig, httpCacheService) {
return {
add: function (model) {
return $http.post('/taxCalendarEvent/add', model, apiConfig.create());
return $http.post('api/v1/calendarEvent/add', model, apiConfig.create());
},
update: function (model) {
return $http.post('/taxCalendarEvent/update', model, apiConfig.create());
return $http.post('api/v1/calendarEvent/update', model, apiConfig.create());
}
,
deleteEvent: function (model) {
return $http.post('/taxCalendarEvent/delete', model, apiConfig.create());
return $http.post('api/v1/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