Commit 3f5e029b0ce84802f961ac623c6672e43f8e49af
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
22 changed files
with
387 additions
and
248 deletions
src/main/java/com/bsth/controller/schedule/BController.java
| 1 | package com.bsth.controller.schedule; | 1 | package com.bsth.controller.schedule; |
| 2 | 2 | ||
| 3 | +import com.bsth.common.Constants; | ||
| 3 | import com.bsth.common.ResponseCode; | 4 | import com.bsth.common.ResponseCode; |
| 5 | +import com.bsth.entity.schedule.BEntity; | ||
| 6 | +import com.bsth.entity.sys.SysUser; | ||
| 4 | import com.bsth.service.schedule.BService; | 7 | import com.bsth.service.schedule.BService; |
| 5 | import com.bsth.service.schedule.ScheduleException; | 8 | import com.bsth.service.schedule.ScheduleException; |
| 9 | +import com.bsth.service.sys.SysUserService; | ||
| 6 | import com.google.common.base.Splitter; | 10 | import com.google.common.base.Splitter; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.data.domain.PageRequest; | 12 | import org.springframework.data.domain.PageRequest; |
| 9 | import org.springframework.data.domain.Sort; | 13 | import org.springframework.data.domain.Sort; |
| 10 | import org.springframework.web.bind.annotation.*; | 14 | import org.springframework.web.bind.annotation.*; |
| 11 | 15 | ||
| 16 | +import javax.servlet.http.HttpSession; | ||
| 12 | import java.io.Serializable; | 17 | import java.io.Serializable; |
| 13 | -import java.util.ArrayList; | ||
| 14 | -import java.util.HashMap; | ||
| 15 | -import java.util.List; | ||
| 16 | -import java.util.Map; | 18 | +import java.util.*; |
| 17 | 19 | ||
| 18 | /** | 20 | /** |
| 19 | * 基础控制器。 | 21 | * 基础控制器。 |
| @@ -21,12 +23,24 @@ import java.util.Map; | @@ -21,12 +23,24 @@ import java.util.Map; | ||
| 21 | public class BController<T, ID extends Serializable> { | 23 | public class BController<T, ID extends Serializable> { |
| 22 | @Autowired | 24 | @Autowired |
| 23 | protected BService<T, ID> bService; | 25 | protected BService<T, ID> bService; |
| 26 | + @Autowired | ||
| 27 | + private SysUserService sysUserService; | ||
| 24 | 28 | ||
| 25 | // CRUD 操作 | 29 | // CRUD 操作 |
| 26 | // Create操作 | 30 | // Create操作 |
| 27 | @RequestMapping(method = RequestMethod.POST) | 31 | @RequestMapping(method = RequestMethod.POST) |
| 28 | - public Map<String, Object> save(@RequestBody T t) { | ||
| 29 | - T t_saved = bService.save(t); | 32 | + public Map<String, Object> save(@RequestBody T t, HttpSession httpSession) { |
| 33 | + // 判定T是否是BEntity的子类,增加新的字段 | ||
| 34 | + String userName = String.valueOf(httpSession.getAttribute(Constants.SESSION_USERNAME)); | ||
| 35 | + SysUser sysUser = sysUserService.findByUserName(userName); | ||
| 36 | + BEntity t_b = null; | ||
| 37 | + if (t instanceof BEntity) { | ||
| 38 | + t_b = (BEntity) t; | ||
| 39 | + t_b.setCreateBy(sysUser); | ||
| 40 | + t_b.setCreateDate(new Date()); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + T t_saved = bService.save((T) t_b); | ||
| 30 | Map<String, Object> rtn = new HashMap<>(); | 44 | Map<String, Object> rtn = new HashMap<>(); |
| 31 | rtn.put("status", ResponseCode.SUCCESS); | 45 | rtn.put("status", ResponseCode.SUCCESS); |
| 32 | rtn.put("data", t_saved); | 46 | rtn.put("data", t_saved); |
| @@ -34,8 +48,21 @@ public class BController<T, ID extends Serializable> { | @@ -34,8 +48,21 @@ public class BController<T, ID extends Serializable> { | ||
| 34 | } | 48 | } |
| 35 | // Update操作 | 49 | // Update操作 |
| 36 | @RequestMapping(value="/{id}", method = RequestMethod.POST) | 50 | @RequestMapping(value="/{id}", method = RequestMethod.POST) |
| 37 | - public Map<String, Object> update(@RequestBody T t) { | ||
| 38 | - return save(t); | 51 | + public Map<String, Object> update(@RequestBody T t, HttpSession httpSession) { |
| 52 | + String userName = String.valueOf(httpSession.getAttribute(Constants.SESSION_USERNAME)); | ||
| 53 | + SysUser sysUser = sysUserService.findByUserName(userName); | ||
| 54 | + BEntity t_b = null; | ||
| 55 | + if (t instanceof BEntity) { | ||
| 56 | + t_b = (BEntity) t; | ||
| 57 | + t_b.setUpdateBy(sysUser); | ||
| 58 | + t_b.setUpdateDate(new Date()); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + T t_updated = bService.save((T) t_b); | ||
| 62 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 63 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 64 | + rtn.put("data", t_updated); | ||
| 65 | + return rtn; | ||
| 39 | } | 66 | } |
| 40 | // Research操作 | 67 | // Research操作 |
| 41 | @RequestMapping(value = "/{id}", method = RequestMethod.GET) | 68 | @RequestMapping(value = "/{id}", method = RequestMethod.GET) |
| @@ -97,9 +124,10 @@ public class BController<T, ID extends Serializable> { | @@ -97,9 +124,10 @@ public class BController<T, ID extends Serializable> { | ||
| 97 | 124 | ||
| 98 | // Delete操作 | 125 | // Delete操作 |
| 99 | @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) | 126 | @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) |
| 100 | - public Map<String, Object> delete(@PathVariable("id") ID id) { | 127 | + public Map<String, Object> delete(@PathVariable("id") ID id, HttpSession httpSession) { |
| 101 | Map<String, Object> rtn = new HashMap<>(); | 128 | Map<String, Object> rtn = new HashMap<>(); |
| 102 | try { | 129 | try { |
| 130 | + // 由于种种原因,这里不保存用户和操作时间了 | ||
| 103 | bService.delete(id); | 131 | bService.delete(id); |
| 104 | rtn.put("status", ResponseCode.SUCCESS); | 132 | rtn.put("status", ResponseCode.SUCCESS); |
| 105 | } catch (ScheduleException exp) { | 133 | } catch (ScheduleException exp) { |
src/main/java/com/bsth/entity/mcy_forms/Shifday.java
| @@ -34,7 +34,36 @@ public class Shifday { | @@ -34,7 +34,36 @@ public class Shifday { | ||
| 34 | 34 | ||
| 35 | private String sjbc;//实际班次 | 35 | private String sjbc;//实际班次 |
| 36 | 36 | ||
| 37 | + private String jgh; | ||
| 37 | 38 | ||
| 39 | + private String zbh; | ||
| 40 | + | ||
| 41 | + private String rq; | ||
| 42 | + | ||
| 43 | + public String getRq() { | ||
| 44 | + return rq; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public void setRq(String rq) { | ||
| 48 | + this.rq = rq; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public String getJgh() { | ||
| 52 | + return jgh; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public void setJgh(String jgh) { | ||
| 56 | + this.jgh = jgh; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public String getZbh() { | ||
| 60 | + return zbh; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public void setZbh(String zbh) { | ||
| 64 | + this.zbh = zbh; | ||
| 65 | + } | ||
| 66 | + | ||
| 38 | public String getJhlc() { | 67 | public String getJhlc() { |
| 39 | return jhlc; | 68 | return jhlc; |
| 40 | } | 69 | } |
src/main/java/com/bsth/entity/mcy_forms/Shiftuehiclemanth.java
| @@ -20,7 +20,24 @@ public class Shiftuehiclemanth { | @@ -20,7 +20,24 @@ public class Shiftuehiclemanth { | ||
| 20 | 20 | ||
| 21 | private String sjbc;//实际班次 | 21 | private String sjbc;//实际班次 |
| 22 | 22 | ||
| 23 | - | 23 | + private String jgh; |
| 24 | + private String zbh; | ||
| 25 | + public String getJgh() { | ||
| 26 | + return jgh; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public void setJgh(String jgh) { | ||
| 30 | + this.jgh = jgh; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + public String getZbh() { | ||
| 34 | + return zbh; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public void setZbh(String zbh) { | ||
| 38 | + this.zbh = zbh; | ||
| 39 | + } | ||
| 40 | + | ||
| 24 | public String getCjbc() { | 41 | public String getCjbc() { |
| 25 | return cjbc; | 42 | return cjbc; |
| 26 | } | 43 | } |
src/main/java/com/bsth/entity/mcy_forms/Vehicleloading.java
| @@ -24,6 +24,26 @@ public class Vehicleloading { | @@ -24,6 +24,26 @@ public class Vehicleloading { | ||
| 24 | 24 | ||
| 25 | private String sjbc;//实际班次 | 25 | private String sjbc;//实际班次 |
| 26 | 26 | ||
| 27 | + private String jgh;//驾驶员工号 | ||
| 28 | + | ||
| 29 | + private String zbh;//车辆自编号 | ||
| 30 | + | ||
| 31 | + public String getJgh() { | ||
| 32 | + return jgh; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setJgh(String jgh) { | ||
| 36 | + this.jgh = jgh; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + public String getZbh() { | ||
| 40 | + return zbh; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + public void setZbh(String zbh) { | ||
| 44 | + this.zbh = zbh; | ||
| 45 | + } | ||
| 46 | + | ||
| 27 | public String getLs() { | 47 | public String getLs() { |
| 28 | return ls; | 48 | return ls; |
| 29 | } | 49 | } |
src/main/java/com/bsth/entity/mcy_forms/Waybillday.java
| @@ -20,9 +20,29 @@ public class Waybillday { | @@ -20,9 +20,29 @@ public class Waybillday { | ||
| 20 | 20 | ||
| 21 | private String zlc;//里程 | 21 | private String zlc;//里程 |
| 22 | 22 | ||
| 23 | + public String getJgh() { | ||
| 24 | + return jgh; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public void setJgh(String jgh) { | ||
| 28 | + this.jgh = jgh; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public String getRq() { | ||
| 32 | + return rq; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setRq(String rq) { | ||
| 36 | + this.rq = rq; | ||
| 37 | + } | ||
| 38 | + | ||
| 23 | private String yl;//用油 | 39 | private String yl;//用油 |
| 24 | 40 | ||
| 25 | private String nbbm;//机油 | 41 | private String nbbm;//机油 |
| 42 | + | ||
| 43 | + private String jgh;//员工号 | ||
| 44 | + | ||
| 45 | + private String rq;//日期 | ||
| 26 | 46 | ||
| 27 | public String getCarPlate() { | 47 | public String getCarPlate() { |
| 28 | return carPlate; | 48 | return carPlate; |
src/main/java/com/bsth/entity/schedule/BEntity.java
0 → 100644
| 1 | +package com.bsth.entity.schedule; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.sys.SysUser; | ||
| 4 | + | ||
| 5 | +import javax.persistence.*; | ||
| 6 | +import java.util.Date; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * Created by xu on 16/12/14. | ||
| 10 | + */ | ||
| 11 | +@MappedSuperclass | ||
| 12 | +public class BEntity { | ||
| 13 | + | ||
| 14 | + /** 创建人 */ | ||
| 15 | + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 16 | + private SysUser createBy; | ||
| 17 | + /** 修改人 */ | ||
| 18 | + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 19 | + private SysUser updateBy; | ||
| 20 | + | ||
| 21 | + /** 创建日期 */ | ||
| 22 | + @Column(updatable = false, name = "create_date") | ||
| 23 | + private Date createDate; | ||
| 24 | + /** 修改日期 */ | ||
| 25 | + @Column(name = "update_date") | ||
| 26 | + private Date updateDate; | ||
| 27 | + | ||
| 28 | + public SysUser getCreateBy() { | ||
| 29 | + return createBy; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public void setCreateBy(SysUser createBy) { | ||
| 33 | + this.createBy = createBy; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + public SysUser getUpdateBy() { | ||
| 37 | + return updateBy; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public void setUpdateBy(SysUser updateBy) { | ||
| 41 | + this.updateBy = updateBy; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public Date getCreateDate() { | ||
| 45 | + return createDate; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public void setCreateDate(Date createDate) { | ||
| 49 | + this.createDate = createDate; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public Date getUpdateDate() { | ||
| 53 | + return updateDate; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public void setUpdateDate(Date updateDate) { | ||
| 57 | + this.updateDate = updateDate; | ||
| 58 | + } | ||
| 59 | +} |
src/main/java/com/bsth/entity/schedule/CarConfigInfo.java
| @@ -2,7 +2,6 @@ package com.bsth.entity.schedule; | @@ -2,7 +2,6 @@ package com.bsth.entity.schedule; | ||
| 2 | 2 | ||
| 3 | import com.bsth.entity.Cars; | 3 | import com.bsth.entity.Cars; |
| 4 | import com.bsth.entity.Line; | 4 | import com.bsth.entity.Line; |
| 5 | -import com.bsth.entity.sys.SysUser; | ||
| 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 5 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 7 | 6 | ||
| 8 | import javax.persistence.*; | 7 | import javax.persistence.*; |
| @@ -21,7 +20,7 @@ import java.util.Date; | @@ -21,7 +20,7 @@ import java.util.Date; | ||
| 21 | }) | 20 | }) |
| 22 | }) | 21 | }) |
| 23 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | 22 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) |
| 24 | -public class CarConfigInfo implements Serializable { | 23 | +public class CarConfigInfo extends BEntity implements Serializable { |
| 25 | 24 | ||
| 26 | /** 主健Id */ | 25 | /** 主健Id */ |
| 27 | @Id | 26 | @Id |
| @@ -59,20 +58,6 @@ public class CarConfigInfo implements Serializable { | @@ -59,20 +58,6 @@ public class CarConfigInfo implements Serializable { | ||
| 59 | @Column(nullable = false) | 58 | @Column(nullable = false) |
| 60 | private Boolean isCancel = false; | 59 | private Boolean isCancel = false; |
| 61 | 60 | ||
| 62 | - /** 创建人 */ | ||
| 63 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 64 | - private SysUser createBy; | ||
| 65 | - /** 修改人 */ | ||
| 66 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 67 | - private SysUser updateBy; | ||
| 68 | - | ||
| 69 | - /** 创建日期 */ | ||
| 70 | - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 71 | - private Date createDate; | ||
| 72 | - /** 修改日期 */ | ||
| 73 | - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | ||
| 74 | - private Date updateDate; | ||
| 75 | - | ||
| 76 | public CarConfigInfo() {} | 61 | public CarConfigInfo() {} |
| 77 | public CarConfigInfo(Object id, Object xlid, Object xlname, Object clid) { | 62 | public CarConfigInfo(Object id, Object xlid, Object xlname, Object clid) { |
| 78 | if (id != null) { | 63 | if (id != null) { |
| @@ -164,38 +149,6 @@ public class CarConfigInfo implements Serializable { | @@ -164,38 +149,6 @@ public class CarConfigInfo implements Serializable { | ||
| 164 | this.isSwitch = isSwitch; | 149 | this.isSwitch = isSwitch; |
| 165 | } | 150 | } |
| 166 | 151 | ||
| 167 | - public SysUser getCreateBy() { | ||
| 168 | - return createBy; | ||
| 169 | - } | ||
| 170 | - | ||
| 171 | - public void setCreateBy(SysUser createBy) { | ||
| 172 | - this.createBy = createBy; | ||
| 173 | - } | ||
| 174 | - | ||
| 175 | - public SysUser getUpdateBy() { | ||
| 176 | - return updateBy; | ||
| 177 | - } | ||
| 178 | - | ||
| 179 | - public void setUpdateBy(SysUser updateBy) { | ||
| 180 | - this.updateBy = updateBy; | ||
| 181 | - } | ||
| 182 | - | ||
| 183 | - public Date getCreateDate() { | ||
| 184 | - return createDate; | ||
| 185 | - } | ||
| 186 | - | ||
| 187 | - public void setCreateDate(Date createDate) { | ||
| 188 | - this.createDate = createDate; | ||
| 189 | - } | ||
| 190 | - | ||
| 191 | - public Date getUpdateDate() { | ||
| 192 | - return updateDate; | ||
| 193 | - } | ||
| 194 | - | ||
| 195 | - public void setUpdateDate(Date updateDate) { | ||
| 196 | - this.updateDate = updateDate; | ||
| 197 | - } | ||
| 198 | - | ||
| 199 | public Boolean getIsCancel() { | 152 | public Boolean getIsCancel() { |
| 200 | return isCancel; | 153 | return isCancel; |
| 201 | } | 154 | } |
src/main/java/com/bsth/entity/schedule/EmployeeConfigInfo.java
| @@ -3,13 +3,12 @@ package com.bsth.entity.schedule; | @@ -3,13 +3,12 @@ package com.bsth.entity.schedule; | ||
| 3 | import com.bsth.entity.Cars; | 3 | import com.bsth.entity.Cars; |
| 4 | import com.bsth.entity.Line; | 4 | import com.bsth.entity.Line; |
| 5 | import com.bsth.entity.Personnel; | 5 | import com.bsth.entity.Personnel; |
| 6 | -import com.bsth.entity.sys.SysUser; | ||
| 7 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 6 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 8 | import org.hibernate.annotations.Formula; | 7 | import org.hibernate.annotations.Formula; |
| 9 | 8 | ||
| 10 | import javax.persistence.*; | 9 | import javax.persistence.*; |
| 11 | import javax.validation.constraints.NotNull; | 10 | import javax.validation.constraints.NotNull; |
| 12 | -import java.util.Date; | 11 | +import java.io.Serializable; |
| 13 | 12 | ||
| 14 | /** | 13 | /** |
| 15 | * 人员配置信息。 | 14 | * 人员配置信息。 |
| @@ -24,7 +23,7 @@ import java.util.Date; | @@ -24,7 +23,7 @@ import java.util.Date; | ||
| 24 | }) | 23 | }) |
| 25 | }) | 24 | }) |
| 26 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | 25 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) |
| 27 | -public class EmployeeConfigInfo { | 26 | +public class EmployeeConfigInfo extends BEntity implements Serializable { |
| 28 | 27 | ||
| 29 | /** 主键Id */ | 28 | /** 主键Id */ |
| 30 | @Id | 29 | @Id |
| @@ -55,20 +54,6 @@ public class EmployeeConfigInfo { | @@ -55,20 +54,6 @@ public class EmployeeConfigInfo { | ||
| 55 | @Column(nullable = false) | 54 | @Column(nullable = false) |
| 56 | private Boolean isCancel = false; | 55 | private Boolean isCancel = false; |
| 57 | 56 | ||
| 58 | - /** 创建人 */ | ||
| 59 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 60 | - private SysUser createBy; | ||
| 61 | - /** 修改人 */ | ||
| 62 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) | ||
| 63 | - private SysUser updateBy; | ||
| 64 | - | ||
| 65 | - /** 创建日期 */ | ||
| 66 | - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 67 | - private Date createDate; | ||
| 68 | - /** 修改日期 */ | ||
| 69 | - @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | ||
| 70 | - private Date updateDate; | ||
| 71 | - | ||
| 72 | public EmployeeConfigInfo() {} | 57 | public EmployeeConfigInfo() {} |
| 73 | 58 | ||
| 74 | public EmployeeConfigInfo(Object id, Object xlid, Object xlname, Object jsyid, Object spyid) { | 59 | public EmployeeConfigInfo(Object id, Object xlid, Object xlname, Object jsyid, Object spyid) { |
| @@ -156,36 +141,4 @@ public class EmployeeConfigInfo { | @@ -156,36 +141,4 @@ public class EmployeeConfigInfo { | ||
| 156 | public void setIsCancel(Boolean isCancel) { | 141 | public void setIsCancel(Boolean isCancel) { |
| 157 | this.isCancel = isCancel; | 142 | this.isCancel = isCancel; |
| 158 | } | 143 | } |
| 159 | - | ||
| 160 | - public SysUser getCreateBy() { | ||
| 161 | - return createBy; | ||
| 162 | - } | ||
| 163 | - | ||
| 164 | - public void setCreateBy(SysUser createBy) { | ||
| 165 | - this.createBy = createBy; | ||
| 166 | - } | ||
| 167 | - | ||
| 168 | - public SysUser getUpdateBy() { | ||
| 169 | - return updateBy; | ||
| 170 | - } | ||
| 171 | - | ||
| 172 | - public void setUpdateBy(SysUser updateBy) { | ||
| 173 | - this.updateBy = updateBy; | ||
| 174 | - } | ||
| 175 | - | ||
| 176 | - public Date getCreateDate() { | ||
| 177 | - return createDate; | ||
| 178 | - } | ||
| 179 | - | ||
| 180 | - public void setCreateDate(Date createDate) { | ||
| 181 | - this.createDate = createDate; | ||
| 182 | - } | ||
| 183 | - | ||
| 184 | - public Date getUpdateDate() { | ||
| 185 | - return updateDate; | ||
| 186 | - } | ||
| 187 | - | ||
| 188 | - public void setUpdateDate(Date updateDate) { | ||
| 189 | - this.updateDate = updateDate; | ||
| 190 | - } | ||
| 191 | } | 144 | } |
src/main/java/com/bsth/entity/sys/SysUser.java
| 1 | package com.bsth.entity.sys; | 1 | package com.bsth.entity.sys; |
| 2 | 2 | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
| 4 | + | ||
| 5 | +import javax.persistence.*; | ||
| 3 | import java.util.Date; | 6 | import java.util.Date; |
| 4 | import java.util.LinkedHashSet; | 7 | import java.util.LinkedHashSet; |
| 5 | import java.util.Set; | 8 | import java.util.Set; |
| 6 | 9 | ||
| 7 | -import javax.persistence.Column; | ||
| 8 | -import javax.persistence.Entity; | ||
| 9 | -import javax.persistence.FetchType; | ||
| 10 | -import javax.persistence.GeneratedValue; | ||
| 11 | -import javax.persistence.GenerationType; | ||
| 12 | -import javax.persistence.Id; | ||
| 13 | -import javax.persistence.ManyToMany; | ||
| 14 | -import javax.persistence.Table; | ||
| 15 | - | ||
| 16 | @Entity | 10 | @Entity |
| 17 | @Table(name = "bsth_c_sys_user") | 11 | @Table(name = "bsth_c_sys_user") |
| 12 | +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | ||
| 18 | public class SysUser { | 13 | public class SysUser { |
| 19 | 14 | ||
| 20 | @Id | 15 | @Id |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -64,16 +64,22 @@ public class FormsServiceImpl implements FormsService { | @@ -64,16 +64,22 @@ public class FormsServiceImpl implements FormsService { | ||
| 64 | // System.out.println(arg0.getObject("yl")); | 64 | // System.out.println(arg0.getObject("yl")); |
| 65 | // wbd.setYl(arg0.getString("yl")); | 65 | // wbd.setYl(arg0.getString("yl")); |
| 66 | // wbd.setNbbm(arg0.getString("nbbm")); | 66 | // wbd.setNbbm(arg0.getString("nbbm")); |
| 67 | - Map<String, Object> maps = new HashMap<>(); | ||
| 68 | - maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 69 | - arg0.getString("schedule_date")); | ||
| 70 | - wbd.setJzl1(maps.get("ksgl").toString()); | ||
| 71 | - wbd.setZlc(maps.get("realMileage").toString()); | ||
| 72 | - | 67 | + wbd.setRq(arg0.getString("schedule_date")); |
| 68 | + wbd.setJgh(arg0.getString("j_gh")); | ||
| 73 | return wbd; | 69 | return wbd; |
| 74 | 70 | ||
| 75 | } | 71 | } |
| 76 | }); | 72 | }); |
| 73 | + | ||
| 74 | + for(int i=0;i<list.size();i++){ | ||
| 75 | + Waybillday w=list.get(i); | ||
| 76 | + Map<String, Object> maps = new HashMap<>(); | ||
| 77 | + maps = scheduleRealInfoService.findKMBC2(w.getJgh(), w.getCarPlate(), | ||
| 78 | + w.getRq()); | ||
| 79 | + w.setJzl1(maps.get("ksgl").toString()); | ||
| 80 | + w.setZlc(maps.get("realMileage").toString()); | ||
| 81 | + | ||
| 82 | + } | ||
| 77 | return list; | 83 | return list; |
| 78 | } | 84 | } |
| 79 | 85 | ||
| @@ -102,6 +108,9 @@ public class FormsServiceImpl implements FormsService { | @@ -102,6 +108,9 @@ public class FormsServiceImpl implements FormsService { | ||
| 102 | return lin; | 108 | return lin; |
| 103 | } | 109 | } |
| 104 | }); | 110 | }); |
| 111 | + | ||
| 112 | + | ||
| 113 | + | ||
| 105 | return list; | 114 | return list; |
| 106 | } | 115 | } |
| 107 | 116 | ||
| @@ -111,12 +120,13 @@ public class FormsServiceImpl implements FormsService { | @@ -111,12 +120,13 @@ public class FormsServiceImpl implements FormsService { | ||
| 111 | 120 | ||
| 112 | @Override | 121 | @Override |
| 113 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { | 122 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { |
| 114 | - String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 123 | + String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " |
| 115 | + " from bsth_c_s_sp_info_real r " | 124 | + " from bsth_c_s_sp_info_real r " |
| 116 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " | 125 | + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " |
| 117 | + " and to_days('" + map.get("endDate").toString() + "') " | 126 | + " and to_days('" + map.get("endDate").toString() + "') " |
| 118 | + " and r.xl_bm='"+ map.get("line").toString() + "'" | 127 | + " and r.xl_bm='"+ map.get("line").toString() + "'" |
| 119 | + " AND r.gs_bm is not null" | 128 | + " AND r.gs_bm is not null" |
| 129 | + + " and r.bc_type not in('in','out')" | ||
| 120 | /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'" | 130 | /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'" |
| 121 | + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/ | 131 | + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/ |
| 122 | + " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name" | 132 | + " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name" |
| @@ -130,26 +140,29 @@ public class FormsServiceImpl implements FormsService { | @@ -130,26 +140,29 @@ public class FormsServiceImpl implements FormsService { | ||
| 130 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { | 140 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 131 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); | 141 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); |
| 132 | shif.setjName(arg0.getString("j_name")); | 142 | shif.setjName(arg0.getString("j_name")); |
| 133 | - | ||
| 134 | - Map<String, Object> maps = new HashMap<>(); | ||
| 135 | - | ||
| 136 | - maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | ||
| 137 | - endDate); | ||
| 138 | - | ||
| 139 | - shif.setJhlc(maps.get("jhlc").toString()); | ||
| 140 | - shif.setEmptMileage(maps.get("ksgl").toString()); | ||
| 141 | - shif.setRemMileage(maps.get("remMileage").toString()); | ||
| 142 | - shif.setAddMileage(maps.get("addMileage").toString()); | ||
| 143 | - shif.setTotalm(maps.get("realMileage").toString()); | ||
| 144 | - shif.setCjbc(maps.get("cjbc").toString()); | ||
| 145 | - shif.setLjbc(maps.get("ljbc").toString()); | ||
| 146 | - shif.setSjbc(maps.get("sjbc").toString()); | ||
| 147 | - | 143 | + shif.setJgh(arg0.getString("j_gh")); |
| 144 | + shif.setZbh(arg0.getString("cl_zbh")); | ||
| 148 | return shif; | 145 | return shif; |
| 149 | - | ||
| 150 | } | 146 | } |
| 151 | }); | 147 | }); |
| 148 | + | ||
| 149 | + for(int i=0;i<list.size();i++){ | ||
| 150 | + Shiftuehiclemanth s=list.get(i); | ||
| 151 | + Map<String, Object> maps = new HashMap<>(); | ||
| 152 | + | ||
| 153 | + maps = scheduleRealInfoService.findKMBC1(s.getjName(),s.getZbh(), startDate, | ||
| 154 | + endDate); | ||
| 155 | + | ||
| 156 | + s.setJhlc(maps.get("jhlc").toString()); | ||
| 157 | + s.setEmptMileage(maps.get("ksgl").toString()); | ||
| 158 | + s.setRemMileage(maps.get("remMileage").toString()); | ||
| 159 | + s.setAddMileage(maps.get("addMileage").toString()); | ||
| 160 | + s.setTotalm(maps.get("realMileage").toString()); | ||
| 161 | + s.setCjbc(maps.get("cjbc").toString()); | ||
| 162 | + s.setLjbc(maps.get("ljbc").toString()); | ||
| 163 | + s.setSjbc(maps.get("sjbc").toString()); | ||
| 152 | 164 | ||
| 165 | + } | ||
| 153 | return list; | 166 | return list; |
| 154 | } | 167 | } |
| 155 | 168 | ||
| @@ -157,10 +170,11 @@ public class FormsServiceImpl implements FormsService { | @@ -157,10 +170,11 @@ public class FormsServiceImpl implements FormsService { | ||
| 157 | @Override | 170 | @Override |
| 158 | public List<Shifday> shifday(Map<String, Object> map) { | 171 | public List<Shifday> shifday(Map<String, Object> map) { |
| 159 | String sql = " select r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm," | 172 | String sql = " select r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm," |
| 160 | - + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 173 | + + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " |
| 161 | + " FROM bsth_c_s_sp_info_real r " | 174 | + " FROM bsth_c_s_sp_info_real r " |
| 162 | + " where to_days(r.schedule_date)=to_days('" | 175 | + " where to_days(r.schedule_date)=to_days('" |
| 163 | + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() | 176 | + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() |
| 177 | + + " and r.bc_type not in('in','out')" | ||
| 164 | /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'" | 178 | /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'" |
| 165 | + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/ | 179 | + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/ |
| 166 | + " GROUP BY r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 180 | + " GROUP BY r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| @@ -175,25 +189,34 @@ public class FormsServiceImpl implements FormsService { | @@ -175,25 +189,34 @@ public class FormsServiceImpl implements FormsService { | ||
| 175 | shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); | 189 | shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); |
| 176 | shifday.setLpName(arg0.getString("r.lp_name").toString()); | 190 | shifday.setLpName(arg0.getString("r.lp_name").toString()); |
| 177 | shifday.setCarPlate(arg0.getString("cl_zbh").toString()); | 191 | shifday.setCarPlate(arg0.getString("cl_zbh").toString()); |
| 178 | - | ||
| 179 | - Map<String, Object> map = new HashMap<>(); | ||
| 180 | - map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 181 | - arg0.getString("schedule_date")); | ||
| 182 | - shifday.setJhlc(map.get("jhlc").toString());// 计划里程 | ||
| 183 | - //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | ||
| 184 | - shifday.setYygl(map.get("yygl").toString());// 营运里程 | ||
| 185 | - shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程 | ||
| 186 | - shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程 | ||
| 187 | - shifday.setAddMileage(map.get("addMileage").toString());// 增加里程 | ||
| 188 | - shifday.setTotalm(map.get("realMileage").toString());// 总里程 | ||
| 189 | - shifday.setJhbc(map.get("jhbc").toString());// 计划班次 | ||
| 190 | - //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | ||
| 191 | - shifday.setCjbc(map.get("cjbc").toString());// 抽减班次 | ||
| 192 | - shifday.setLjbc(map.get("ljbc").toString());// 增加班次 | ||
| 193 | - shifday.setSjbc(map.get("sjbc").toString());// 实际班次 | 192 | + shifday.setJgh(arg0.getString("j_gh")); |
| 193 | + shifday.setZbh(arg0.getString("cl_zbh")); | ||
| 194 | + shifday.setRq(arg0.getString("schedule_date")); | ||
| 194 | return shifday; | 195 | return shifday; |
| 195 | } | 196 | } |
| 197 | + | ||
| 196 | }); | 198 | }); |
| 199 | + | ||
| 200 | + for(int i=0;i<list.size();i++){ | ||
| 201 | + Shifday shi=list.get(i); | ||
| 202 | + Map<String, Object> maps = new HashMap<>(); | ||
| 203 | + maps = scheduleRealInfoService.findKMBC2(shi.getJgh(), shi.getCarPlate(), | ||
| 204 | + shi.getRq()); | ||
| 205 | + shi.setJhlc(maps.get("jhlc").toString());// 计划里程 | ||
| 206 | + //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | ||
| 207 | + shi.setYygl(maps.get("yygl").toString());// 营运里程 | ||
| 208 | + shi.setEmptMileage(maps.get("ksgl").toString());// 空驶里程 | ||
| 209 | + shi.setRemMileage(maps.get("remMileage").toString());// 抽减里程 | ||
| 210 | + shi.setAddMileage(maps.get("addMileage").toString());// 增加里程 | ||
| 211 | + shi.setTotalm(maps.get("realMileage").toString());// 总里程 | ||
| 212 | + shi.setJhbc(maps.get("jhbc").toString());// 计划班次 | ||
| 213 | + //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | ||
| 214 | + shi.setCjbc(maps.get("cjbc").toString());// 抽减班次 | ||
| 215 | + shi.setLjbc(maps.get("ljbc").toString());// 增加班次 | ||
| 216 | + shi.setSjbc(maps.get("sjbc").toString());// 实际班次 | ||
| 217 | + | ||
| 218 | + } | ||
| 219 | + | ||
| 197 | return list; | 220 | return list; |
| 198 | } | 221 | } |
| 199 | 222 | ||
| @@ -240,20 +263,20 @@ public class FormsServiceImpl implements FormsService { | @@ -240,20 +263,20 @@ public class FormsServiceImpl implements FormsService { | ||
| 240 | Changetochange chan = new Changetochange(); | 263 | Changetochange chan = new Changetochange(); |
| 241 | 264 | ||
| 242 | chan.setRq(rq); | 265 | chan.setRq(rq); |
| 243 | - chan.setGs(arg0.getString("gs").toString()); | ||
| 244 | - chan.setFgs(arg0.getString("fgs").toString()); | ||
| 245 | - chan.setXl(arg0.getString("xl").toString()); | ||
| 246 | - chan.setLp(arg0.getString("lp").toString()); | ||
| 247 | - chan.setFssj(arg0.getString("fssj").toString()); | ||
| 248 | - chan.setXgsj(arg0.getString("xgsj").toString()); | ||
| 249 | - chan.setPcch(arg0.getString("pcch").toString()); | ||
| 250 | - chan.setPcry(arg0.getString("pcry").toString()); | ||
| 251 | - chan.setJhch(arg0.getString("jhch").toString()); | ||
| 252 | - chan.setJhgh(arg0.getString("jhgh").toString()); | ||
| 253 | - chan.setSjch(arg0.getString("sjch").toString()); | ||
| 254 | - chan.setSjgh(arg0.getString("sjgh").toString()); | ||
| 255 | - chan.setYy(arg0.getString("yy").toString()); | ||
| 256 | - chan.setXgr(arg0.getString("xgr").toString()); | 266 | + chan.setGs(arg0.getString("gs")); |
| 267 | + chan.setFgs(arg0.getString("fgs")); | ||
| 268 | + chan.setXl(arg0.getString("xl")); | ||
| 269 | + chan.setLp(arg0.getString("lp")); | ||
| 270 | + chan.setFssj(arg0.getString("fssj")); | ||
| 271 | + chan.setXgsj(arg0.getString("xgsj")); | ||
| 272 | + chan.setPcch(arg0.getString("pcch")); | ||
| 273 | + chan.setPcry(arg0.getString("pcry")); | ||
| 274 | + chan.setJhch(arg0.getString("jhch")); | ||
| 275 | + chan.setJhgh(arg0.getString("jhgh")); | ||
| 276 | + chan.setSjch(arg0.getString("sjch")); | ||
| 277 | + chan.setSjgh(arg0.getString("sjgh")); | ||
| 278 | + chan.setYy(arg0.getString("yy")); | ||
| 279 | + chan.setXgr(arg0.getString("xgr")); | ||
| 257 | return chan; | 280 | return chan; |
| 258 | } | 281 | } |
| 259 | }); | 282 | }); |
| @@ -279,7 +302,7 @@ public class FormsServiceImpl implements FormsService { | @@ -279,7 +302,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 279 | 302 | ||
| 280 | rq = rq2 + "-" + rq3; | 303 | rq = rq2 + "-" + rq3; |
| 281 | 304 | ||
| 282 | - String sql = " SELECT r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 305 | + String sql = " SELECT r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " |
| 283 | + " FROM bsth_c_s_sp_info_real r " | 306 | + " FROM bsth_c_s_sp_info_real r " |
| 284 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | 307 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " |
| 285 | + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'" | 308 | + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'" |
| @@ -309,19 +332,23 @@ public class FormsServiceImpl implements FormsService { | @@ -309,19 +332,23 @@ public class FormsServiceImpl implements FormsService { | ||
| 309 | sin.setJzl(arg0.getString("JZL")); | 332 | sin.setJzl(arg0.getString("JZL")); |
| 310 | // sin.setJzl(arg0.getString(""));//非营业性用油 | 333 | // sin.setJzl(arg0.getString(""));//非营业性用油 |
| 311 | sin.setJhjl(arg0.getString("JZL")); | 334 | sin.setJhjl(arg0.getString("JZL")); |
| 312 | - Map<String, Object> maps = new HashMap<>(); | ||
| 313 | - maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | ||
| 314 | - endDate); | ||
| 315 | - //sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | ||
| 316 | - sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); | ||
| 317 | - sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); | ||
| 318 | - sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 319 | - sin.setEmptMileage(maps.get("ksgl") == null ? "" : maps.get("ksgl").toString()); | ||
| 320 | - sin.setJhjl(maps.get("jhlc") == null ? "" : maps.get("jhlc").toString()); | ||
| 321 | - | 335 | + |
| 322 | return sin; | 336 | return sin; |
| 323 | } | 337 | } |
| 324 | }); | 338 | }); |
| 339 | + for(int i=0;i<list.size();i++){ | ||
| 340 | + Singledata si=list.get(i); | ||
| 341 | + Map<String, Object> maps = new HashMap<>(); | ||
| 342 | + maps = scheduleRealInfoService.findKMBC1(si.getjName(),si.getClzbh(), startDate, | ||
| 343 | + endDate); | ||
| 344 | + //sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | ||
| 345 | + si.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); | ||
| 346 | + si.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); | ||
| 347 | + si.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 348 | + si.setEmptMileage(maps.get("ksgl") == null ? "" : maps.get("ksgl").toString()); | ||
| 349 | + si.setJhjl(maps.get("jhlc") == null ? "" : maps.get("jhlc").toString()); | ||
| 350 | + | ||
| 351 | + } | ||
| 325 | return list; | 352 | return list; |
| 326 | } | 353 | } |
| 327 | 354 | ||
| @@ -329,7 +356,7 @@ public class FormsServiceImpl implements FormsService { | @@ -329,7 +356,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 329 | @Override | 356 | @Override |
| 330 | public List<Operationservice> operationservice(Map<String, Object> map) { | 357 | public List<Operationservice> operationservice(Map<String, Object> map) { |
| 331 | 358 | ||
| 332 | - String sql = " SELECT r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 359 | + String sql = " SELECT r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " |
| 333 | + " FROM bsth_c_s_sp_info_real r " | 360 | + " FROM bsth_c_s_sp_info_real r " |
| 334 | // + "LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" | 361 | // + "LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM" |
| 335 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | 362 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " |
| @@ -338,6 +365,7 @@ public class FormsServiceImpl implements FormsService { | @@ -338,6 +365,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 338 | + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString() | 365 | + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString() |
| 339 | + "'" + " and '" + map.get("endDate").toString() + "'" | 366 | + "'" + " and '" + map.get("endDate").toString() + "'" |
| 340 | + " and r.xl_bm='" + map.get("line").toString() + "'" | 367 | + " and r.xl_bm='" + map.get("line").toString() + "'" |
| 368 | + + " and r.bc_type not in('in','out')" | ||
| 341 | /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'" | 369 | /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'" |
| 342 | + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/ | 370 | + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/ |
| 343 | + " AND r.gs_bm is not null" | 371 | + " AND r.gs_bm is not null" |
| @@ -373,11 +401,12 @@ public class FormsServiceImpl implements FormsService { | @@ -373,11 +401,12 @@ public class FormsServiceImpl implements FormsService { | ||
| 373 | return list; | 401 | return list; |
| 374 | } | 402 | } |
| 375 | 403 | ||
| 404 | + | ||
| 376 | // 车辆加注 | 405 | // 车辆加注 |
| 377 | @Override | 406 | @Override |
| 378 | public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line, String date) { | 407 | public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line, String date) { |
| 379 | 408 | ||
| 380 | - String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name " | 409 | + String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type " |
| 381 | + " FROM bsth_c_s_sp_info_real r " | 410 | + " FROM bsth_c_s_sp_info_real r " |
| 382 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " | 411 | + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y " |
| 383 | + " where to_days(y.RQ)=to_days('" + date + "') and y.XLBM= '" + line + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y " | 412 | + " where to_days(y.RQ)=to_days('" + date + "') and y.XLBM= '" + line + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y " |
| @@ -385,6 +414,7 @@ public class FormsServiceImpl implements FormsService { | @@ -385,6 +414,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 385 | + " where to_days(r.schedule_date_str)=to_days('" + date + "')" | 414 | + " where to_days(r.schedule_date_str)=to_days('" + date + "')" |
| 386 | + " and r.xl_bm='" + line + "' " | 415 | + " and r.xl_bm='" + line + "' " |
| 387 | + " AND r.gs_bm is not null" | 416 | + " AND r.gs_bm is not null" |
| 417 | + + " and r.bc_type not in('in','out')" | ||
| 388 | /* + " and r.gs_bm='"+gsdmVehic +"'" | 418 | /* + " and r.gs_bm='"+gsdmVehic +"'" |
| 389 | + " and r.fgs_bm='"+fgsdmVehic +"'"*/ | 419 | + " and r.fgs_bm='"+fgsdmVehic +"'"*/ |
| 390 | + " GROUP BY r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; | 420 | + " GROUP BY r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; |
| @@ -402,15 +432,21 @@ public class FormsServiceImpl implements FormsService { | @@ -402,15 +432,21 @@ public class FormsServiceImpl implements FormsService { | ||
| 402 | ve.setHyl(arg0.getString("YH")); | 432 | ve.setHyl(arg0.getString("YH")); |
| 403 | ve.setJzl(arg0.getString("JZL")); | 433 | ve.setJzl(arg0.getString("JZL")); |
| 404 | // ve.setLs(arg0.getString("").toString());//尿素 | 434 | // ve.setLs(arg0.getString("").toString());//尿素 |
| 405 | - Map<String, Object> maps = new HashMap<>(); | ||
| 406 | - maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 407 | - arg0.getString("schedule_date_str")); | ||
| 408 | - ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 409 | - ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 | ||
| 410 | - ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 | 435 | + ve.setJgh(arg0.getString("j_gh").toString()); |
| 411 | return ve; | 436 | return ve; |
| 412 | } | 437 | } |
| 413 | }); | 438 | }); |
| 439 | + | ||
| 440 | + for(int i=0;i<list.size();i++){ | ||
| 441 | + Vehicleloading v=list.get(i); | ||
| 442 | + Map<String, Object> maps = new HashMap<>(); | ||
| 443 | + maps = scheduleRealInfoService.findKMBC2(v.getJgh(), line, | ||
| 444 | + date); | ||
| 445 | + v.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 446 | + v.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 | ||
| 447 | + v.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 | ||
| 448 | + } | ||
| 449 | + | ||
| 414 | return list; | 450 | return list; |
| 415 | } | 451 | } |
| 416 | 452 | ||
| @@ -434,20 +470,22 @@ public class FormsServiceImpl implements FormsService { | @@ -434,20 +470,22 @@ public class FormsServiceImpl implements FormsService { | ||
| 434 | 470 | ||
| 435 | rq = rq2 + "-" + rq3; | 471 | rq = rq2 + "-" + rq3; |
| 436 | 472 | ||
| 437 | - String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car from " | ||
| 438 | - + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | 473 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car,a.bc_type from " |
| 474 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" | ||
| 439 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+ map.get("startDate").toString() + "' " | 475 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+ map.get("startDate").toString() + "' " |
| 440 | + " and '" + map.get("endDate").toString() + "' and xl_bm='"+ map.get("line").toString() + "' " | 476 | + " and '" + map.get("endDate").toString() + "' and xl_bm='"+ map.get("line").toString() + "' " |
| 441 | + " AND gs_bm is not null " | 477 | + " AND gs_bm is not null " |
| 478 | + + " AND bc_type NOT IN ('in', 'out')" | ||
| 442 | /*+ " and gs_bm='"+ map.get("gsdmTurn").toString() + "'" | 479 | /*+ " and gs_bm='"+ map.get("gsdmTurn").toString() + "'" |
| 443 | + " and fgs_bm='"+ map.get("fgsdmTurn").toString() + "'"*/ | 480 | + " and fgs_bm='"+ map.get("fgsdmTurn").toString() + "'"*/ |
| 444 | - + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | 481 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type ) a left JOIN (" |
| 445 | + " SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car " | 482 | + " SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car " |
| 446 | - + " from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | 483 | + + " from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl,bc_type from bsth_c_s_sp_info_real " |
| 447 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | 484 | + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 448 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | 485 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() |
| 449 | + "' AND gs_bm is not null " | 486 | + "' AND gs_bm is not null " |
| 450 | - + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | 487 | + + " AND bc_type NOT IN ('in', 'out')" |
| 488 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type) b ON t.company=b.gs_bm) b on " | ||
| 451 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | 489 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 452 | List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() { | 490 | List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() { |
| 453 | 491 | ||
| @@ -480,6 +518,7 @@ public class FormsServiceImpl implements FormsService { | @@ -480,6 +518,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 480 | 518 | ||
| 481 | }); | 519 | }); |
| 482 | 520 | ||
| 521 | + | ||
| 483 | return list; | 522 | return list; |
| 484 | } | 523 | } |
| 485 | 524 | ||
| @@ -503,20 +542,20 @@ public class FormsServiceImpl implements FormsService { | @@ -503,20 +542,20 @@ public class FormsServiceImpl implements FormsService { | ||
| 503 | 542 | ||
| 504 | rq = rq2 + "-" + rq3; | 543 | rq = rq2 + "-" + rq3; |
| 505 | 544 | ||
| 506 | - String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from " | ||
| 507 | - + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | 545 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from " |
| 546 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" | ||
| 508 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | 547 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" |
| 509 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | 548 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" |
| 510 | - + map.get("line").toString() + "' AND gs_bm is not null" | 549 | + + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')" |
| 511 | /*+ " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'" | 550 | /*+ " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'" |
| 512 | + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'"*/ | 551 | + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'"*/ |
| 513 | - + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 514 | - + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 515 | - + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | 552 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type ) a left JOIN (" |
| 553 | + + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 554 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl,bc_type from bsth_c_s_sp_info_real " | ||
| 516 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | 555 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 517 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | 556 | + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() |
| 518 | - + "' AND gs_bm is not null " | ||
| 519 | - + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | 557 | + + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out') " |
| 558 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type) b ON t.company=b.gs_bm) b on " | ||
| 520 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | 559 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 521 | List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() { | 560 | List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() { |
| 522 | 561 | ||
| @@ -570,22 +609,27 @@ public class FormsServiceImpl implements FormsService { | @@ -570,22 +609,27 @@ public class FormsServiceImpl implements FormsService { | ||
| 570 | String rq2 = sdf1.format(d); | 609 | String rq2 = sdf1.format(d); |
| 571 | String rq3 = sdf1.format(d1); | 610 | String rq3 = sdf1.format(d1); |
| 572 | 611 | ||
| 612 | + | ||
| 613 | + | ||
| 573 | rq = rq2 + "-" + rq3; | 614 | rq = rq2 + "-" + rq3; |
| 574 | 615 | ||
| 575 | - String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from " | ||
| 576 | - + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | 616 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from " |
| 617 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" | ||
| 577 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | 618 | + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" |
| 578 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | 619 | + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" |
| 579 | - + map.get("line").toString() + "' AND gs_bm is not null" | 620 | + + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out') " |
| 580 | /*+ " and gs_bm='"+ map.get("gsdmAllline").toString() + "'" | 621 | /*+ " and gs_bm='"+ map.get("gsdmAllline").toString() + "'" |
| 581 | + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'"*/ | 622 | + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'"*/ |
| 582 | - + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 583 | - + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 584 | - + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | 623 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type ) a left JOIN (" |
| 624 | + + "SELECT COUNT(*" | ||
| 625 | + + ") as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b." | ||
| 626 | + + "xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 627 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl,bc_type from bsth_c_s_sp_info_real " | ||
| 585 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | 628 | + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" |
| 586 | - + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | ||
| 587 | - + "' AND gs_bm is not null " | ||
| 588 | - + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | 629 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get |
| 630 | + ("line").toString() | ||
| 631 | + + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')" | ||
| 632 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type) b ON t.company=b.gs_bm) b on " | ||
| 589 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | 633 | + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; |
| 590 | List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { | 634 | List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { |
| 591 | 635 | ||
| @@ -610,14 +654,19 @@ public class FormsServiceImpl implements FormsService { | @@ -610,14 +654,19 @@ public class FormsServiceImpl implements FormsService { | ||
| 610 | tu.setBcjh(arg0.getString("jbc").toString()); | 654 | tu.setBcjh(arg0.getString("jbc").toString()); |
| 611 | tu.setBcsj(arg0.getString("sbc").toString()); | 655 | tu.setBcsj(arg0.getString("sbc").toString()); |
| 612 | tu.setBbzxl(result2 + "%");// 班次执行率 | 656 | tu.setBbzxl(result2 + "%");// 班次执行率 |
| 657 | + | ||
| 613 | // tu.setSm(arg0.getString("xl_name").toString()); | 658 | // tu.setSm(arg0.getString("xl_name").toString()); |
| 614 | tu.setGsgs(arg0.getString("gslsbm").toString()); | 659 | tu.setGsgs(arg0.getString("gslsbm").toString()); |
| 615 | tu.setFgsgs(arg0.getString("fgsbm").toString()); | 660 | tu.setFgsgs(arg0.getString("fgsbm").toString()); |
| 616 | return tu; | 661 | return tu; |
| 617 | } | 662 | } |
| 618 | 663 | ||
| 664 | + | ||
| 619 | }); | 665 | }); |
| 666 | + | ||
| 620 | 667 | ||
| 668 | + | ||
| 669 | + | ||
| 621 | return list; | 670 | return list; |
| 622 | } | 671 | } |
| 623 | -} | ||
| 624 | \ No newline at end of file | 672 | \ No newline at end of file |
| 673 | +} |
src/main/java/com/bsth/service/schedule/impl/EmployeeConfigInfoServiceImpl.java
| @@ -83,7 +83,9 @@ public class EmployeeConfigInfoServiceImpl extends BServiceImpl<EmployeeConfigIn | @@ -83,7 +83,9 @@ public class EmployeeConfigInfoServiceImpl extends BServiceImpl<EmployeeConfigIn | ||
| 83 | Map<String, Object> param = new HashMap<>(); | 83 | Map<String, Object> param = new HashMap<>(); |
| 84 | if (employeeConfigInfo.getIsCancel()) { | 84 | if (employeeConfigInfo.getIsCancel()) { |
| 85 | validate_jsy(employeeConfigInfo); | 85 | validate_jsy(employeeConfigInfo); |
| 86 | - validate_spy(employeeConfigInfo); | 86 | + if (employeeConfigInfo.getSpy() != null) { |
| 87 | + validate_spy(employeeConfigInfo); | ||
| 88 | + } | ||
| 87 | employeeConfigInfo.setIsCancel(false); | 89 | employeeConfigInfo.setIsCancel(false); |
| 88 | } else { | 90 | } else { |
| 89 | param.clear(); | 91 | param.clear(); |
src/main/resources/static/pages/forms/statement/operationservice.html
src/main/resources/static/pages/forms/statement/shifday.html
| @@ -147,7 +147,6 @@ $(function(){ | @@ -147,7 +147,6 @@ $(function(){ | ||
| 147 | for(var code in result){ | 147 | for(var code in result){ |
| 148 | data.push({id: code, text: result[code]}); | 148 | data.push({id: code, text: result[code]}); |
| 149 | } | 149 | } |
| 150 | - console.log(data); | ||
| 151 | initPinYinSelect2('#line',data,''); | 150 | initPinYinSelect2('#line',data,''); |
| 152 | 151 | ||
| 153 | }) | 152 | }) |
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
| @@ -137,7 +137,6 @@ | @@ -137,7 +137,6 @@ | ||
| 137 | for(var code in result){ | 137 | for(var code in result){ |
| 138 | data.push({id: code, text: result[code]}); | 138 | data.push({id: code, text: result[code]}); |
| 139 | } | 139 | } |
| 140 | - console.log(data); | ||
| 141 | initPinYinSelect2('#line',data,''); | 140 | initPinYinSelect2('#line',data,''); |
| 142 | 141 | ||
| 143 | }) | 142 | }) |
src/main/resources/static/pages/forms/statement/singledata.html
| @@ -142,7 +142,6 @@ | @@ -142,7 +142,6 @@ | ||
| 142 | for(var code in result){ | 142 | for(var code in result){ |
| 143 | data.push({id: code, text: result[code]}); | 143 | data.push({id: code, text: result[code]}); |
| 144 | } | 144 | } |
| 145 | - console.log(data); | ||
| 146 | initPinYinSelect2('#line',data,''); | 145 | initPinYinSelect2('#line',data,''); |
| 147 | 146 | ||
| 148 | }) | 147 | }) |
| @@ -167,7 +166,6 @@ | @@ -167,7 +166,6 @@ | ||
| 167 | } | 166 | } |
| 168 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | 167 | obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); |
| 169 | }); | 168 | }); |
| 170 | - console.log(result); | ||
| 171 | var singledata = template('singledata',{list:result}); | 169 | var singledata = template('singledata',{list:result}); |
| 172 | // 把渲染好的模版html文本追加到表格中 | 170 | // 把渲染好的模版html文本追加到表格中 |
| 173 | $('#forms tbody').html(singledata); | 171 | $('#forms tbody').html(singledata); |
src/main/resources/static/pages/forms/statement/vehicleloading.html
| @@ -130,7 +130,6 @@ | @@ -130,7 +130,6 @@ | ||
| 130 | for(var code in result){ | 130 | for(var code in result){ |
| 131 | data.push({id: code, text: result[code]}); | 131 | data.push({id: code, text: result[code]}); |
| 132 | } | 132 | } |
| 133 | - console.log(data); | ||
| 134 | initPinYinSelect2('#line',data,''); | 133 | initPinYinSelect2('#line',data,''); |
| 135 | 134 | ||
| 136 | }) | 135 | }) |
src/main/resources/static/pages/forms/statement/waybillday.html
| @@ -129,7 +129,6 @@ | @@ -129,7 +129,6 @@ | ||
| 129 | for(var code in result){ | 129 | for(var code in result){ |
| 130 | data.push({id: code, text: result[code]}); | 130 | data.push({id: code, text: result[code]}); |
| 131 | } | 131 | } |
| 132 | - console.log(data); | ||
| 133 | initPinYinSelect2('#line',data,''); | 132 | initPinYinSelect2('#line',data,''); |
| 134 | 133 | ||
| 135 | }) | 134 | }) |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/list.html
| @@ -17,15 +17,18 @@ | @@ -17,15 +17,18 @@ | ||
| 17 | <td></td> | 17 | <td></td> |
| 18 | <td> | 18 | <td> |
| 19 | <div> | 19 | <div> |
| 20 | - <sa-Select3 model="ctrl.searchCondition()" | ||
| 21 | - name="xl" | ||
| 22 | - placeholder="请输拼音..." | ||
| 23 | - dcvalue="{{ctrl.searchCondition()['xl.lineCode_eq']}}" | 20 | + <sa-Select5 name="xl" |
| 21 | + model="ctrl.searchCondition()" | ||
| 22 | + cmaps="{'xl.lineCode_eq' : 'lineCode'}" | ||
| 24 | dcname="xl.lineCode_eq" | 23 | dcname="xl.lineCode_eq" |
| 25 | icname="lineCode" | 24 | icname="lineCode" |
| 26 | - icnames="name" | ||
| 27 | - datatype="xl"> | ||
| 28 | - </sa-Select3> | 25 | + dsparams="{{ {type: 'ajax', param:{type: 'all', 'destroy_eq': 0}, atype:'xl' } | json }}" |
| 26 | + iterobjname="item" | ||
| 27 | + iterobjexp="item.name" | ||
| 28 | + searchph="请输拼音..." | ||
| 29 | + searchexp="this.name" | ||
| 30 | + required > | ||
| 31 | + </sa-Select5> | ||
| 29 | </div> | 32 | </div> |
| 30 | </td> | 33 | </td> |
| 31 | <td> | 34 | <td> |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
| @@ -169,8 +169,8 @@ angular.module('ScheduleApp').controller( | @@ -169,8 +169,8 @@ angular.module('ScheduleApp').controller( | ||
| 169 | }; | 169 | }; |
| 170 | self.toggleBusConfig = function(id) { | 170 | self.toggleBusConfig = function(id) { |
| 171 | BusConfig.delete({id: id}, function(result) { | 171 | BusConfig.delete({id: id}, function(result) { |
| 172 | - if (result.message) { // 暂时这样做,之后全局拦截 | ||
| 173 | - alert("失败:" + result.message); | 172 | + if (result.msg) { // 暂时这样做,之后全局拦截 |
| 173 | + alert("失败:" + result.msg); | ||
| 174 | } else { | 174 | } else { |
| 175 | self.doPage(); | 175 | self.doPage(); |
| 176 | } | 176 | } |
| @@ -222,9 +222,17 @@ angular.module('ScheduleApp').controller( | @@ -222,9 +222,17 @@ angular.module('ScheduleApp').controller( | ||
| 222 | 222 | ||
| 223 | // 提交方法 | 223 | // 提交方法 |
| 224 | self.submit = function() { | 224 | self.submit = function() { |
| 225 | - self.busConfigForSave.$save(function() { | ||
| 226 | - $state.go("busConfig"); | ||
| 227 | - }); | 225 | + if (id) { |
| 226 | + // 更新 | ||
| 227 | + self.busConfigForSave.$save({id: id}, function() { | ||
| 228 | + $state.go("busConfig"); | ||
| 229 | + }); | ||
| 230 | + } else { | ||
| 231 | + // 保存 | ||
| 232 | + self.busConfigForSave.$save(function() { | ||
| 233 | + $state.go("busConfig"); | ||
| 234 | + }); | ||
| 235 | + } | ||
| 228 | }; | 236 | }; |
| 229 | }]); | 237 | }]); |
| 230 | 238 |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/edit.html
| @@ -121,8 +121,8 @@ | @@ -121,8 +121,8 @@ | ||
| 121 | </sa-Select5> | 121 | </sa-Select5> |
| 122 | <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id" | 122 | <input type="hidden" name="spy_h" ng-model="ctrl.employeeConfigForSave.spy.id" |
| 123 | remote-Validation | 123 | remote-Validation |
| 124 | - remotevtype="ec_jsy" | ||
| 125 | - remotevparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'jsy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}" | 124 | + remotevtype="ec_spy" |
| 125 | + remotevparam="{{ {'id_eq': ctrl.employeeConfigForSave.id, 'xl.id_eq': ctrl.employeeConfigForSave.xl.id, 'xl.name_eq': ctrl.employeeConfigForSave.xl.name, 'spy.id_eq': ctrl.employeeConfigForSave.spy.id} | json}}" | ||
| 126 | /> | 126 | /> |
| 127 | </div> | 127 | </div> |
| 128 | <!-- 隐藏块,显示验证信息 --> | 128 | <!-- 隐藏块,显示验证信息 --> |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/list.html
| @@ -18,17 +18,18 @@ | @@ -18,17 +18,18 @@ | ||
| 18 | <td></td> | 18 | <td></td> |
| 19 | <td> | 19 | <td> |
| 20 | <div> | 20 | <div> |
| 21 | - <sa-Select3 model="ctrl.searchCondition()" | ||
| 22 | - name="xl" | ||
| 23 | - placeholder="请输拼音..." | ||
| 24 | - dcvalue="{{ctrl.searchCondition()['xl.lineCode_eq']}}" | 21 | + <sa-Select5 name="xl" |
| 22 | + model="ctrl.searchCondition()" | ||
| 23 | + cmaps="{'xl.lineCode_eq' : 'lineCode'}" | ||
| 25 | dcname="xl.lineCode_eq" | 24 | dcname="xl.lineCode_eq" |
| 26 | icname="lineCode" | 25 | icname="lineCode" |
| 27 | - dcname2="xl.company_eq" | ||
| 28 | - icname2="company" | ||
| 29 | - icnames="name" | ||
| 30 | - datatype="xl"> | ||
| 31 | - </sa-Select3> | 26 | + dsparams="{{ {type: 'ajax', param:{type: 'all', 'destroy_eq': 0}, atype:'xl' } | json }}" |
| 27 | + iterobjname="item" | ||
| 28 | + iterobjexp="item.name" | ||
| 29 | + searchph="请输拼音..." | ||
| 30 | + searchexp="this.name" | ||
| 31 | + required > | ||
| 32 | + </sa-Select5> | ||
| 32 | </div> | 33 | </div> |
| 33 | </td> | 34 | </td> |
| 34 | <td></td> | 35 | <td></td> |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
| @@ -170,8 +170,8 @@ angular.module('ScheduleApp').controller( | @@ -170,8 +170,8 @@ angular.module('ScheduleApp').controller( | ||
| 170 | 170 | ||
| 171 | self.toggleEmpConfig = function(id) { | 171 | self.toggleEmpConfig = function(id) { |
| 172 | EmpConfig.delete({id: id}, function(result) { | 172 | EmpConfig.delete({id: id}, function(result) { |
| 173 | - if (result.message) { // 暂时这样做,之后全局拦截 | ||
| 174 | - alert("失败:" + result.message); | 173 | + if (result.msg) { // 暂时这样做,之后全局拦截 |
| 174 | + alert("失败:" + result.msg); | ||
| 175 | } else { | 175 | } else { |
| 176 | self.doPage(); | 176 | self.doPage(); |
| 177 | } | 177 | } |
| @@ -220,9 +220,17 @@ angular.module('ScheduleApp').controller( | @@ -220,9 +220,17 @@ angular.module('ScheduleApp').controller( | ||
| 220 | self.employeeConfigForSave.spy = null; | 220 | self.employeeConfigForSave.spy = null; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | - self.employeeConfigForSave.$save(function() { | ||
| 224 | - $state.go("employeeConfig"); | ||
| 225 | - }); | 223 | + if (id) { |
| 224 | + // 更新 | ||
| 225 | + self.employeeConfigForSave.$save({id: id}, function() { | ||
| 226 | + $state.go("employeeConfig"); | ||
| 227 | + }); | ||
| 228 | + } else { | ||
| 229 | + // 保存 | ||
| 230 | + self.employeeConfigForSave.$save(function() { | ||
| 231 | + $state.go("employeeConfig"); | ||
| 232 | + }); | ||
| 233 | + } | ||
| 226 | }; | 234 | }; |
| 227 | }]); | 235 | }]); |
| 228 | 236 |