Commit cbe65f5cc0e197c14c8378741dbca5401a859897
1 parent
2f81d4fa
运管处路单上传BUG修改
Showing
5 changed files
with
141 additions
and
3 deletions
src/main/java/com/bsth/controller/traffic/SKBUploadLoggerController.java
0 → 100644
| 1 | +package com.bsth.controller.traffic; | ||
| 2 | + | ||
| 3 | +import com.bsth.controller.BaseController; | ||
| 4 | +import com.bsth.entity.traffic.SKBUploadLogger; | ||
| 5 | +import com.bsth.service.traffic.SKBUploadLoggerService; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 8 | +import org.springframework.web.bind.annotation.RestController; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * | ||
| 12 | + * @author BSTH | ||
| 13 | + * | ||
| 14 | + */ | ||
| 15 | +@RestController | ||
| 16 | +@RequestMapping("skb_log") | ||
| 17 | +public class SKBUploadLoggerController extends BaseController<SKBUploadLogger,Integer> { | ||
| 18 | + | ||
| 19 | + @Autowired | ||
| 20 | + private SKBUploadLoggerService skbUploadLoggerService; | ||
| 21 | + | ||
| 22 | +} |
src/main/java/com/bsth/entity/traffic/SKBUploadLogger.java
0 → 100644
| 1 | +package com.bsth.entity.traffic; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.schedule.TTInfo; | ||
| 4 | +import com.bsth.entity.sys.SysUser; | ||
| 5 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
| 6 | + | ||
| 7 | +import javax.persistence.*; | ||
| 8 | +import java.util.Date; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * | ||
| 12 | + * @ClassName : SKBUploadLogger(时刻表上传日志实体类) | ||
| 13 | + * | ||
| 14 | + * @Author : bsth@zq | ||
| 15 | + * | ||
| 16 | + * @Description : | ||
| 17 | + * | ||
| 18 | + * @Data : 2016-04-27 | ||
| 19 | + * | ||
| 20 | + * @Version 公交调度系统BS版 0.1 | ||
| 21 | + * | ||
| 22 | + */ | ||
| 23 | + | ||
| 24 | +@Entity | ||
| 25 | +@Table(name = "bsth_t_upload_logger") | ||
| 26 | +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | ||
| 27 | +public class SKBUploadLogger { | ||
| 28 | + | ||
| 29 | + // ID | ||
| 30 | + @Id | ||
| 31 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 32 | + private Integer id; | ||
| 33 | + | ||
| 34 | + /** 时刻表信息 */ | ||
| 35 | + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) | ||
| 36 | + private TTInfo ttInfo; | ||
| 37 | + | ||
| 38 | + /** 用户 关联 */ | ||
| 39 | + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) | ||
| 40 | + private SysUser user; | ||
| 41 | + | ||
| 42 | + // 创建日期 | ||
| 43 | + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 44 | + private Date createDate; | ||
| 45 | + | ||
| 46 | + public Integer getId() { | ||
| 47 | + return id; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setId(Integer id) { | ||
| 51 | + this.id = id; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public TTInfo getTtInfo() { | ||
| 55 | + return ttInfo; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public void setTtInfo(TTInfo ttInfo) { | ||
| 59 | + this.ttInfo = ttInfo; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public SysUser getUser() { | ||
| 63 | + return user; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public void setUser(SysUser user) { | ||
| 67 | + this.user = user; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public Date getCreateDate() { | ||
| 71 | + return createDate; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public void setCreateDate(Date createDate) { | ||
| 75 | + this.createDate = createDate; | ||
| 76 | + } | ||
| 77 | +} |
src/main/java/com/bsth/repository/traffic/SKBUploadLoggerRepository.java
0 → 100644
src/main/java/com/bsth/service/traffic/impl/SKBUploadLoggerServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.traffic.impl; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.traffic.SKBUploadLogger; | ||
| 4 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 5 | +import com.bsth.service.traffic.SKBUploadLoggerService; | ||
| 6 | +import org.slf4j.Logger; | ||
| 7 | +import org.slf4j.LoggerFactory; | ||
| 8 | +import org.springframework.stereotype.Service; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * | ||
| 12 | + * @ClassName: TrafficManageServiceImpl(运管处接口service业务层实现类) | ||
| 13 | + * | ||
| 14 | + * @Extends : BaseService | ||
| 15 | + * | ||
| 16 | + * @Description: | ||
| 17 | + * | ||
| 18 | + * @Author bsth@zq | ||
| 19 | + * | ||
| 20 | + * @Date 2016年10月28日 上午9:21:17 | ||
| 21 | + * | ||
| 22 | + * @Version 公交调度系统BS版 0.1 | ||
| 23 | + * | ||
| 24 | + */ | ||
| 25 | + | ||
| 26 | +@Service | ||
| 27 | +public class SKBUploadLoggerServiceImpl extends BaseServiceImpl<SKBUploadLogger,Integer> implements SKBUploadLoggerService{ | ||
| 28 | + | ||
| 29 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 30 | + | ||
| 31 | +} |
src/main/resources/static/pages/trafficManage/js/timeTempletUpload.js
| @@ -92,16 +92,17 @@ | @@ -92,16 +92,17 @@ | ||
| 92 | $("#right_div table tbody").empty(); | 92 | $("#right_div table tbody").empty(); |
| 93 | var params = {}; | 93 | var params = {}; |
| 94 | // 取得输入框的值 | 94 | // 取得输入框的值 |
| 95 | - var inputs = $(".param input,select");debugger; | 95 | + var inputs = $(".param input,select"); |
| 96 | // 遍历数组 | 96 | // 遍历数组 |
| 97 | $.each(inputs, function(i, element) { | 97 | $.each(inputs, function(i, element) { |
| 98 | params[$(element).attr("name")] = $(element).val(); | 98 | params[$(element).attr("name")] = $(element).val(); |
| 99 | }); | 99 | }); |
| 100 | var i = layer.load(2); | 100 | var i = layer.load(2); |
| 101 | $get('/tic_ec', params, function(data) { | 101 | $get('/tic_ec', params, function(data) { |
| 102 | - _dateFormat(data.content); | 102 | + var content = data.data.content; |
| 103 | + _dateFormat(content); | ||
| 103 | var bodyHtm = template('timeTemplet_list_temp', { | 104 | var bodyHtm = template('timeTemplet_list_temp', { |
| 104 | - list : data.content | 105 | + list : content |
| 105 | }); | 106 | }); |
| 106 | $("#left_div table tbody").empty(); | 107 | $("#left_div table tbody").empty(); |
| 107 | $("#left_div table tbody").append(bodyHtm); | 108 | $("#left_div table tbody").append(bodyHtm); |