Commit 17265f1781a5c81108300fe60282c580dcace63d

Authored by 廖磊
1 parent ceb8a823

添加油电日志

src/main/java/com/bsth/controller/oil/YlbController.java
... ... @@ -11,6 +11,8 @@ import java.util.Iterator;
11 11 import java.util.List;
12 12 import java.util.Map;
13 13  
  14 +import javax.servlet.http.HttpServletRequest;
  15 +
14 16 import org.springframework.beans.factory.annotation.Autowired;
15 17 import org.springframework.data.domain.Page;
16 18 import org.springframework.data.domain.PageRequest;
... ... @@ -35,14 +37,19 @@ import com.google.common.base.Splitter;
35 37 @RequestMapping("ylb")
36 38 public class YlbController extends BaseController<Ylb, Integer>{
37 39 @Autowired
38   - YlbService yblService;
  40 + YlbService ylbService;
39 41  
40 42 @RequestMapping(value = "/saveYlb",method = RequestMethod.POST)
41 43 public Map<String, Object> saveYlb(Ylb t){
42 44 // SysUser user = SecurityUtils.getCurrentUser();
43 45 t.setCreatetime(new Date());
44 46 // Ylb t=new Ylb();
45   - return yblService.saveYlb(t);
  47 + return ylbService.saveYlb(t);
  48 + }
  49 +
  50 + @RequestMapping(value = "/updateJsy",method = RequestMethod.GET)
  51 + public Map<String, Object> updateJsy(@RequestParam Map<String, Object> map){
  52 + return ylbService.update(map);
46 53 }
47 54  
48 55  
... ... @@ -55,7 +62,8 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
55 62 public Map<String, Object> obtain(@RequestParam Map<String, Object> map) throws Exception{
56 63 Map<String, Object> list =new HashMap<String, Object>();
57 64 try {
58   - list = yblService.obtain(map);
  65 +
  66 + list = ylbService.obtain(map);
59 67 } catch (Exception e) {
60 68 // TODO Auto-generated catch block
61 69 throw e;
... ... @@ -69,7 +77,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
69 77 public Map<String, Object> saveYlbList(@RequestParam Map<String, Object> map){
70 78 Map<String, Object> list=new HashMap<String, Object>();
71 79 try {
72   - list = yblService.saveYlbList(map);
  80 + list = ylbService.saveYlbList(map);
73 81 } catch (Exception e) {
74 82 // TODO Auto-generated catch block
75 83 e.printStackTrace();
... ... @@ -85,7 +93,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
85 93 public Map<String, Object> sort(@RequestParam Map<String, Object> map){
86 94 Map<String, Object> list=new HashMap<String, Object>();
87 95 try {
88   - list=yblService.sort(map);
  96 + list=ylbService.sort(map);
89 97 } catch (Exception e) {
90 98 // TODO: handle exception
91 99 }
... ... @@ -101,7 +109,8 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
101 109 public Map<String, Object> outAndIn(@RequestParam Map<String, Object> map) throws Exception{
102 110 Map<String, Object> list=new HashMap<String, Object>();
103 111 try {
104   - list=yblService.outAndIn(map);
  112 +
  113 + list=ylbService.outAndIn(map);
105 114 } catch (Exception e) {
106 115 // TODO: handle exception
107 116 }
... ... @@ -118,7 +127,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
118 127 public Map<String, Object> checkYl(@RequestParam Map<String, Object> map){
119 128 Map<String, Object> list=new HashMap<String, Object>();
120 129 try {
121   - list=yblService.checkYl(map);
  130 + list=ylbService.checkYl(map);
122 131 } catch (Exception e) {
123 132 // TODO: handle exception
124 133 }
... ... @@ -146,7 +155,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
146 155 String rq=map.get("rq").toString();
147 156 int lx=Integer.parseInt(map.get("sxtj").toString().trim());
148 157 if(lx>0){
149   - map.put("nbbm_in", yblService.checkNbmmNum(rq, map.get("ssgsdm_like").toString(),
  158 + map.put("nbbm_in", ylbService.checkNbmmNum(rq, map.get("ssgsdm_like").toString(),
150 159 map.get("fgsdm_like").toString(), map.get("xlbm_like").toString(),
151 160 map.get("nbbm_eq").toString(),lx));
152 161 }
... ... @@ -194,7 +203,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
194 203 */
195 204 @RequestMapping(value = "/ylbList",method = RequestMethod.GET)
196 205 public List<Ylb> ylbList(@RequestParam Map<String, Object> map){
197   - List<Ylb> ylbList=yblService.listYlb(map);
  206 + List<Ylb> ylbList=ylbService.listYlb(map);
198 207 return ylbList;
199 208 }
200 209  
... ... @@ -202,7 +211,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
202 211 public Map<String, Object> deleteIds(@RequestParam Map<String, Object> map) {
203 212 Map<String, Object> maps=new HashMap<String, Object>();
204 213 try {
205   - maps= yblService.deleteIds(map);
  214 + maps= ylbService.deleteIds(map);
206 215 } catch (Exception e) {
207 216 // TODO Auto-generated catch block
208 217 e.printStackTrace();
... ... @@ -211,18 +220,18 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
211 220 }
212 221 @RequestMapping(value="/oilListMonth")
213 222 public List<Map<String, Object>> oilListMonth(@RequestParam Map<String, Object> map){
214   - return yblService.oilListMonth(map);
  223 + return ylbService.oilListMonth(map);
215 224 }
216 225  
217 226 @RequestMapping(value = "/checkJsy",method = RequestMethod.GET)
218 227 public String checkJsy(@RequestParam Map<String, Object> map){
219   - String list=yblService.checkJsy(map);
  228 + String list=ylbService.checkJsy(map);
220 229 return list;
221 230 }
222 231  
223 232 @RequestMapping(value = "/sumYlb",method = RequestMethod.GET)
224 233 public Map<String, Object> sumYlb(@RequestParam Map<String, Object> map){
225   - Map<String, Object> list=yblService.sumYlb(map);
  234 + Map<String, Object> list=ylbService.sumYlb(map);
226 235 return list;
227 236 }
228 237  
... ... @@ -232,7 +241,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
232 241 sdfSimple = new SimpleDateFormat("yyyyMMdd");
233 242 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
234 243 ReportUtils ee = new ReportUtils();
235   - List<Ylb> ylb= yblService.listYlb(map);
  244 + List<Ylb> ylb= ylbService.listYlb(map);
236 245 // (new CustomerSpecs<Ylb>(map)).iterator();
237 246 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
238 247 for (Ylb y : ylb) {
... ... @@ -299,7 +308,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
299 308 public Map<String, Object> updateHistory(@RequestParam Map<String, Object> map) throws Exception{
300 309 Map<String, Object> list =new HashMap<String, Object>();
301 310 try {
302   - list = yblService.updateHistory(map);
  311 + list = ylbService.updateHistory(map);
303 312 } catch (Exception e) {
304 313 // TODO Auto-generated catch block
305 314 throw e;
... ...
src/main/java/com/bsth/entity/oil/Nylog.java 0 → 100644
  1 +package com.bsth.entity.oil;
  2 +
  3 +import java.util.Date;
  4 +
  5 +import javax.persistence.Entity;
  6 +import javax.persistence.GeneratedValue;
  7 +import javax.persistence.Id;
  8 +import javax.persistence.Table;
  9 +
  10 +@Entity
  11 +@Table(name = "bsth_c_nylog")
  12 +public class Nylog {
  13 + @Id
  14 + @GeneratedValue
  15 + private Integer id;
  16 +
  17 + private String nylx;
  18 +
  19 + private String czmc;
  20 +
  21 + private String userid;
  22 +
  23 + private String username;
  24 +
  25 + private Date createdate;
  26 +
  27 + private String cxtj;
  28 +
  29 + private String fwdz;
  30 +
  31 + public Integer getId() {
  32 + return id;
  33 + }
  34 +
  35 + public void setId(Integer id) {
  36 + this.id = id;
  37 + }
  38 +
  39 + public String getNylx() {
  40 + return nylx;
  41 + }
  42 +
  43 + public void setNylx(String nylx) {
  44 + this.nylx = nylx;
  45 + }
  46 +
  47 + public String getCzmc() {
  48 + return czmc;
  49 + }
  50 +
  51 + public void setCzmc(String czmc) {
  52 + this.czmc = czmc;
  53 + }
  54 +
  55 + public String getUserid() {
  56 + return userid;
  57 + }
  58 +
  59 + public void setUserid(String userid) {
  60 + this.userid = userid;
  61 + }
  62 +
  63 + public String getUsername() {
  64 + return username;
  65 + }
  66 +
  67 + public void setUsername(String username) {
  68 + this.username = username;
  69 + }
  70 +
  71 + public Date getCreatedate() {
  72 + return createdate;
  73 + }
  74 +
  75 + public void setCreatedate(Date createdate) {
  76 + this.createdate = createdate;
  77 + }
  78 +
  79 + public String getCxtj() {
  80 + return cxtj;
  81 + }
  82 +
  83 + public void setCxtj(String cxtj) {
  84 + this.cxtj = cxtj;
  85 + }
  86 +
  87 + public String getFwdz() {
  88 + return fwdz;
  89 + }
  90 +
  91 + public void setFwdz(String fwdz) {
  92 + this.fwdz = fwdz;
  93 + }
  94 +
  95 +
  96 +
  97 +}
... ...
src/main/java/com/bsth/repository/oil/NylogRepository.java 0 → 100644
  1 +package com.bsth.repository.oil;
  2 +
  3 +
  4 +
  5 +import org.springframework.stereotype.Repository;
  6 +import com.bsth.entity.oil.Nylog;
  7 +import com.bsth.repository.BaseRepository;
  8 +
  9 +@Repository
  10 +public interface NylogRepository extends BaseRepository<Nylog, Integer>{
  11 +}
... ...
src/main/java/com/bsth/repository/oil/YlbRepository.java
... ... @@ -157,4 +157,6 @@ public interface YlbRepository extends BaseRepository&lt;Ylb, Integer&gt;{
157 157 " yhlx = ?9"+
158 158 " WHERE id = ?1", nativeQuery=true)
159 159 public void ylbUpdate(Integer id,double czyl,double jzyl,double yh, double sh,String shyy,double ns,String rylx,int yhlx);
  160 +
  161 +
160 162 }
... ...
src/main/java/com/bsth/service/oil/YlbService.java
... ... @@ -26,6 +26,9 @@ public interface YlbService extends BaseService&lt;Ylb, Integer&gt;{
26 26 Map<String, Object> deleteIds(Map<String, Object> map) throws Exception;
27 27  
28 28 Map<String, Object> updateHistory(Map<String, Object> map) throws Exception;
  29 +
  30 + Map<String, Object> update(Map<String, Object> map);
  31 +
29 32  
30 33  
31 34 }
... ...
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
... ... @@ -39,16 +39,20 @@ import com.bsth.entity.oil.Cdl;
39 39 import com.bsth.entity.oil.Cyl;
40 40 import com.bsth.entity.oil.Dlb;
41 41 import com.bsth.entity.oil.Jdl;
  42 +import com.bsth.entity.oil.Nylog;
42 43 import com.bsth.entity.oil.Ylb;
43 44 import com.bsth.entity.oil.Ylxxb;
44 45 import com.bsth.entity.search.CustomerSpecs;
  46 +import com.bsth.entity.sys.SysUser;
45 47 import com.bsth.repository.CarsRepository;
46 48 import com.bsth.repository.oil.CdlRepository;
47 49 import com.bsth.repository.oil.CylRepository;
48 50 import com.bsth.repository.oil.DlbRepository;
49 51 import com.bsth.repository.oil.JdlRepository;
  52 +import com.bsth.repository.oil.NylogRepository;
50 53 import com.bsth.repository.oil.YlbRepository;
51 54 import com.bsth.repository.oil.YlxxbRepository;
  55 +import com.bsth.security.util.SecurityUtils;
52 56 import com.bsth.service.impl.BaseServiceImpl;
53 57 import com.bsth.service.oil.DlbService;
54 58 import com.bsth.service.realcontrol.ScheduleRealInfoService;
... ... @@ -59,7 +63,8 @@ import com.bsth.util.BatchSaveUtils;
59 63 public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbService{
60 64 @Autowired
61 65 DlbRepository repository;
62   -
  66 + @Autowired
  67 + NylogRepository nylogRepository;
63 68 @Autowired
64 69 YlxxbRepository ylxxbRepository;
65 70  
... ... @@ -89,13 +94,14 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
89 94 carsMap.put(c.getInsideCode(), c.getSfdc());
90 95 }
91 96 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
92   - Date dNow = new Date(); //当前时间
93   - Date dBefore = new Date();
94   - Calendar calendar = Calendar.getInstance(); //得到日历
95   - calendar.setTime(dNow);//把当前时间赋给日历
96   - calendar.add(Calendar.DAY_OF_MONTH, -1); //设置为前一天
97   - dBefore = calendar.getTime(); //得到前一天的时间
98   - String rq=sdf.format(dBefore);
  97 +// Date dNow = new Date(); //当前时间
  98 +// Date dBefore = new Date();
  99 +// Calendar calendar = Calendar.getInstance(); //得到日历
  100 +// calendar.setTime(dNow);//把当前时间赋给日历
  101 +// calendar.add(Calendar.DAY_OF_MONTH, -1); //设置为前一天
  102 +// dBefore = calendar.getTime(); //得到前一天的时间
  103 +// String rq=sdf.format(dBefore);
  104 + String rq="2017-11-02";
99 105 String line="";
100 106 //保留两位小数
101 107 DecimalFormat df = new DecimalFormat("#.00");
... ... @@ -108,7 +114,7 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
108 114 //当天加电信息表
109 115 List<Jdl> jdlList=jdlRepository.JdlList(rq);
110 116 //前一天所有车辆最后进场班次信息
111   - List<Dlb> dlListBe=repository.obtainYlbefore(rq, "", "", "", "");
  117 +// List<Dlb> dlListBe=repository.obtainYlbefore(rq, "", "", "", "");
112 118 List<Cdl> cdyList=cdlRepository.obtainCdl();
113 119 //从排班表中计算出行驶的总里程
114 120 List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq,"","","","");
... ... @@ -140,14 +146,14 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
140 146 Double jzl=0.0;
141 147 if(map.get("seqNumber").toString().equals("1")){
142 148 boolean fage=true;
143   - for (int i = 0; i < dlListBe.size(); i++) {
144   - Dlb dlb=dlListBe.get(i);
145   - if(map.get("clZbh").toString().equals(dlb.getNbbm())){
146   - t.setCzcd(dlb.getJzcd());
147   - fage=false;
148   - break;
149   - }
150   - }
  149 +// for (int i = 0; i < dlListBe.size(); i++) {
  150 +// Dlb dlb=dlListBe.get(i);
  151 +// if(map.get("clZbh").toString().equals(dlb.getNbbm())){
  152 +// t.setCzcd(dlb.getJzcd());
  153 +// fage=false;
  154 +// break;
  155 +// }
  156 +// }
151 157 if(fage){
152 158 for (int y = 0; y < cdyList.size(); y++) {
153 159 Cdl cdl=cdyList.get(y);
... ... @@ -391,8 +397,6 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
391 397  
392 398 }
393 399 }
394   -
395   -
396 400 }
397 401 Double lc= Double.parseDouble(map.get("totalKilometers").toString());
398 402 if(map.get("seqNumber").toString().equals("1")){
... ... @@ -498,6 +502,15 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
498 502 repository.save(updateList.get(i));
499 503 }
500 504 }
  505 + SysUser user = SecurityUtils.getCurrentUser();
  506 + Nylog nylog=new Nylog();
  507 + nylog.setCreatedate(new Date());
  508 + nylog.setCzmc("获取");
  509 + nylog.setNylx("电");
  510 + nylog.setUserid(user.getUserName());
  511 + nylog.setUsername(user.getName());
  512 + nylog.setCxtj(line+"-"+ date+"-"+gsbm+"-"+fgsbm);
  513 + nylogRepository.save(nylog);
501 514 newMap.put("status", ResponseCode.SUCCESS);
502 515 } catch (Exception e) {
503 516 // TODO Auto-generated catch block
... ... @@ -616,6 +629,16 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
616 629 repository.save(t);
617 630 }
618 631 }
  632 +
  633 + SysUser user = SecurityUtils.getCurrentUser();
  634 + Nylog nylog=new Nylog();
  635 + nylog.setCreatedate(new Date());
  636 + nylog.setCzmc("核对");
  637 + nylog.setNylx("电");
  638 + nylog.setUserid(user.getUserName());
  639 + nylog.setUsername(user.getName());
  640 + nylog.setCxtj(xlbm+"-"+ rq+"-"+gsbm+"-"+fgsbm);
  641 + nylogRepository.save(nylog);
619 642 newMap.put("status", ResponseCode.SUCCESS);
620 643 }catch(Exception e){
621 644 newMap.put("status", ResponseCode.ERROR);
... ... @@ -829,6 +852,16 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
829 852 repository.dlbUpdate(id, czcd, jzcd, hd, sh, shyy, yhlx);
830 853  
831 854 }
  855 +
  856 + SysUser user = SecurityUtils.getCurrentUser();
  857 + Nylog nylog=new Nylog();
  858 + nylog.setCreatedate(new Date());
  859 + nylog.setCzmc("保存全部");
  860 + nylog.setNylx("电");
  861 + nylog.setUserid(user.getUserName());
  862 + nylog.setUsername(user.getName());
  863 + nylog.setCxtj("");
  864 + nylogRepository.save(nylog);
832 865 newMap.put("status", ResponseCode.SUCCESS);
833 866 }catch(Exception e){
834 867 newMap.put("status", ResponseCode.ERROR);
... ... @@ -929,6 +962,16 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
929 962 }
930 963 t.setJcsx(jcsx);
931 964 repository.save(t);
  965 +
  966 + SysUser user = SecurityUtils.getCurrentUser();
  967 + Nylog nylog=new Nylog();
  968 + nylog.setCreatedate(new Date());
  969 + nylog.setCzmc("手动添加");
  970 + nylog.setNylx("电");
  971 + nylog.setUserid(user.getUserName());
  972 + nylog.setUsername(user.getName());
  973 + nylog.setCxtj("");
  974 + nylogRepository.save(nylog);
932 975 map.put("status", ResponseCode.SUCCESS);
933 976 map.put("t", t);
934 977 return map;
... ... @@ -948,6 +991,16 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
948 991 Integer id =jsonObject.getInteger("id");
949 992 repository.delete(id);
950 993 }
  994 +
  995 + SysUser user = SecurityUtils.getCurrentUser();
  996 + Nylog nylog=new Nylog();
  997 + nylog.setCreatedate(new Date());
  998 + nylog.setCzmc("删除");
  999 + nylog.setNylx("电");
  1000 + nylog.setUserid(user.getUserName());
  1001 + nylog.setUsername(user.getName());
  1002 + nylog.setCxtj("");
  1003 + nylogRepository.save(nylog);
951 1004 maps.put("status", ResponseCode.SUCCESS);
952 1005 } catch (Exception e) {
953 1006 maps.put("status", ResponseCode.ERROR);
... ...
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
... ... @@ -34,15 +34,19 @@ import com.bsth.entity.Line;
34 34 import com.bsth.entity.mcy_forms.Daily;
35 35 import com.bsth.entity.oil.Cyl;
36 36 import com.bsth.entity.oil.Dlb;
  37 +import com.bsth.entity.oil.Nylog;
37 38 import com.bsth.entity.oil.Ylb;
38 39 import com.bsth.entity.oil.Ylxxb;
39 40 import com.bsth.entity.search.CustomerSpecs;
  41 +import com.bsth.entity.sys.SysUser;
40 42 import com.bsth.repository.CarsRepository;
41 43 import com.bsth.repository.LineRepository;
42 44 import com.bsth.repository.oil.CylRepository;
43 45 import com.bsth.repository.oil.DlbRepository;
  46 +import com.bsth.repository.oil.NylogRepository;
44 47 import com.bsth.repository.oil.YlbRepository;
45 48 import com.bsth.repository.oil.YlxxbRepository;
  49 +import com.bsth.security.util.SecurityUtils;
46 50 import com.bsth.service.impl.BaseServiceImpl;
47 51 import com.bsth.service.oil.DlbService;
48 52 import com.bsth.service.oil.YlbService;
... ... @@ -58,7 +62,8 @@ import javassist.bytecode.stackmap.BasicBlock.Catch;
58 62 public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbService{
59 63 @Autowired
60 64 YlbRepository repository;
61   -
  65 + @Autowired
  66 + NylogRepository nylogRepository;
62 67 @Autowired
63 68 YlxxbRepository ylxxbRepository;
64 69  
... ... @@ -203,13 +208,12 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
203 208 }
204 209  
205 210 }
206   -
207   -
208   - }
  211 + }
209 212  
210 213 }
211 214 if(addList.size()>0){
212 215 try {
  216 +
213 217 new BatchSaveUtils<Ylb>().saveList2(addList, Ylb.class);
214 218 } catch (Exception e) {
215 219 // TODO: handle exception
... ... @@ -275,8 +279,6 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
275 279  
276 280 // 前一天所有车辆最后进场班次信息
277 281 List<Ylb> ylListBe = this.listByRqJcsx(rq, gsbm, fgsbm, line, nbbm);
278   -// List<Ylb> ylListBe =repository.listMaxRqJcsx(rq, gsbm, fgsbm, line, nbbm);
279   -
280 282 List<Cyl> clyList = cylRepository.obtainCyl(nbbm,gsbm);
281 283  
282 284 // 从排班表中计算出行驶的总里程
... ... @@ -484,6 +486,15 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
484 486 repository.save(updateList.get(i));
485 487 }
486 488 }
  489 + SysUser user = SecurityUtils.getCurrentUser();
  490 + Nylog nylog=new Nylog();
  491 + nylog.setCreatedate(new Date());
  492 + nylog.setCzmc("获取加存油");
  493 + nylog.setNylx("油");
  494 + nylog.setUserid(user.getUserName());
  495 + nylog.setUsername(user.getName());
  496 + nylog.setCxtj(rq+"-"+gsbm+"-"+fgsbm+"-"+line+"-"+nbbm+"-"+sxtj);
  497 + nylogRepository.save(nylog);
487 498 newMap.put("status", ResponseCode.SUCCESS);
488 499 } catch (Exception e) {
489 500 // TODO Auto-generated catch block
... ... @@ -674,6 +685,17 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
674 685 }
675 686 }
676 687 }
  688 +
  689 + SysUser user = SecurityUtils.getCurrentUser();
  690 + Nylog nylog=new Nylog();
  691 + nylog.setCreatedate(new Date());
  692 + nylog.setCzmc("进场等于出场");
  693 + nylog.setNylx("油");
  694 + nylog.setUserid(user.getUserName());
  695 + nylog.setUsername(user.getName());
  696 + nylog.setCxtj(rq+"-"+gsbm+"-"+fgsbm+"-"+xlbm+"-"+nbbm+"-"+sxtj);
  697 +
  698 + nylogRepository.save(nylog);
677 699 } catch (Exception e) {
678 700 map2.put("status", ResponseCode.ERROR);
679 701 logger.error("save erro.", e);
... ... @@ -825,6 +847,16 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
825 847 }
826 848 }
827 849 }
  850 +
  851 + SysUser user = SecurityUtils.getCurrentUser();
  852 + Nylog nylog=new Nylog();
  853 + nylog.setCreatedate(new Date());
  854 + nylog.setCzmc("核对加注量");
  855 + nylog.setNylx("油");
  856 + nylog.setUserid(user.getUserName());
  857 + nylog.setUsername(user.getName());
  858 + nylog.setCxtj(rq+"-"+gsbm+"-"+fgsbm+"-"+xlbm+"-"+nbbm+"-");
  859 + nylogRepository.save(nylog);
828 860 newMap.put("status", ResponseCode.SUCCESS);
829 861 }catch(Exception e){
830 862 newMap.put("status", ResponseCode.ERROR);
... ... @@ -1237,7 +1269,15 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1237 1269 repository.ylbUpdate(id, czyl, jzyl, yh, sh, shyy, ns, rylx,yhlx);
1238 1270 }
1239 1271 // List<Map<String, Object>> list=(List<Map<String, Object>>) map.get("ylbList");
1240   -
  1272 + SysUser user = SecurityUtils.getCurrentUser();
  1273 + Nylog nylog=new Nylog();
  1274 + nylog.setCreatedate(new Date());
  1275 + nylog.setCzmc("保存全部");
  1276 + nylog.setNylx("油");
  1277 + nylog.setUserid(user.getUserName());
  1278 + nylog.setUsername(user.getName());
  1279 + nylog.setCxtj("");
  1280 + nylogRepository.save(nylog);
1241 1281 newMap.put("status", ResponseCode.SUCCESS);
1242 1282 }catch(Exception e){
1243 1283 newMap.put("status", ResponseCode.ERROR);
... ... @@ -1368,6 +1408,16 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1368 1408 }
1369 1409 newMap.put("status", ResponseCode.SUCCESS);
1370 1410 }
  1411 +
  1412 + SysUser user = SecurityUtils.getCurrentUser();
  1413 + Nylog nylog=new Nylog();
  1414 + nylog.setCreatedate(new Date());
  1415 + nylog.setCzmc("拆分");
  1416 + nylog.setNylx("油");
  1417 + nylog.setUserid(user.getUserName());
  1418 + nylog.setUsername(user.getName());
  1419 + nylog.setCxtj("");
  1420 + nylogRepository.save(nylog);
1371 1421 } catch (Exception e) {
1372 1422 newMap.put("status", ResponseCode.ERROR);
1373 1423 logger.error("save erro.", e);
... ... @@ -1426,6 +1476,16 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1426 1476 }
1427 1477 t.setJcsx(jcsx);
1428 1478 repository.save(t);
  1479 +
  1480 + SysUser user = SecurityUtils.getCurrentUser();
  1481 + Nylog nylog=new Nylog();
  1482 + nylog.setCreatedate(new Date());
  1483 + nylog.setCzmc("手动添加");
  1484 + nylog.setNylx("油");
  1485 + nylog.setUserid(user.getUserName());
  1486 + nylog.setUsername(user.getName());
  1487 + nylog.setCxtj("");
  1488 + nylogRepository.save(nylog);
1429 1489 map.put("status", ResponseCode.SUCCESS);
1430 1490 map.put("t", t);
1431 1491 return map;
... ... @@ -1444,6 +1504,16 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1444 1504 Integer id =jsonObject.getInteger("id");
1445 1505 repository.delete(id);
1446 1506 }
  1507 +
  1508 + SysUser user = SecurityUtils.getCurrentUser();
  1509 + Nylog nylog=new Nylog();
  1510 + nylog.setCreatedate(new Date());
  1511 + nylog.setCzmc("删除");
  1512 + nylog.setNylx("油");
  1513 + nylog.setUserid(user.getUserName());
  1514 + nylog.setUsername(user.getName());
  1515 + nylog.setCxtj("");
  1516 + nylogRepository.save(nylog);
1447 1517 maps.put("status", ResponseCode.SUCCESS);
1448 1518 } catch (Exception e) {
1449 1519 maps.put("status", ResponseCode.ERROR);
... ... @@ -1555,9 +1625,6 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1555 1625 &&t.getXlbm().equals(m.get("xlBm").toString())
1556 1626 &&t.getLp().equals(m.get("lpName").toString())){
1557 1627 //该条记录不用删除
1558   -
1559   -
1560   -
1561 1628 fage =false;
1562 1629 ylbList_upd.add(t);
1563 1630 }
... ... @@ -1640,7 +1707,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1640 1707 Ylxxb ylxxb = ylxxList.get(i);
1641 1708 if (maps.get("clZbh").toString().equals(ylxxb.getNbbm())
1642 1709 && maps.get("jGh").toString().equals(ylxxb.getJsy())
1643   - && ylxxb.getJylx()>0) {
  1710 + && ylxxb.getJylx()==1) {
1644 1711 if(ylxxb.getJzl()>0){
1645 1712 fage2=true;
1646 1713 }
... ... @@ -1653,7 +1720,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1653 1720 Ylxxb ylxxb = ylxxList.get(j);
1654 1721 if (maps.get("clZbh").toString().equals(ylxxb.getNbbm())
1655 1722 && maps.get("jGh").toString().equals(ylxxb.getJsy())
1656   - && ylxxb.getJylx()>0) {
  1723 + && ylxxb.getJylx()==1) {
1657 1724 jzl =Arith.add(jzl, ylxxb.getJzl());
1658 1725 }
1659 1726 }
... ... @@ -1815,6 +1882,16 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1815 1882 }
1816 1883 }
1817 1884 //重新获取电耗数据结束
  1885 +
  1886 + SysUser user = SecurityUtils.getCurrentUser();
  1887 + Nylog nylog=new Nylog();
  1888 + nylog.setCreatedate(new Date());
  1889 + nylog.setCzmc("重新统计");
  1890 + nylog.setNylx("油");
  1891 + nylog.setUserid(user.getUserName());
  1892 + nylog.setUsername(user.getName());
  1893 + nylog.setCxtj(line+"-"+ date+"-"+gsdm+"-"+fgsdm);
  1894 + nylogRepository.save(nylog);
1818 1895 newMap.put("status", ResponseCode.SUCCESS);
1819 1896 }catch(Exception e){
1820 1897 // TODO Auto-generated catch block
... ... @@ -1839,4 +1916,19 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1839 1916 }
1840 1917 return list_;
1841 1918 }
  1919 +
  1920 + @Override
  1921 + public Map<String, Object> update(Map<String, Object> map) {
  1922 + if(map.get("id")!=null){
  1923 + if(map.get("id").toString().length()>0){
  1924 + Integer id=Integer.parseInt(map.get("id").toString());
  1925 + String jsy=map.get("jsy").toString();
  1926 + Ylb t=repository.findOne(id);
  1927 + t.setJsy(jsy);
  1928 + repository.save(t);
  1929 + map.put("status", ResponseCode.SUCCESS);
  1930 + }
  1931 + }
  1932 + return map;
  1933 + }
1842 1934 }
... ...
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
... ... @@ -41,7 +41,7 @@
41 41 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="6" checked="true"/>缺车
42 42 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="7" checked="true"/>客稀
43 43 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="8" checked="true"/>气候
44   - <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="9" checked="true"/>外援
  44 + <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="9" checked="true"/>援外
45 45 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="10" checked="true"/>其他
46 46 </div>
47 47 <div style="margin-top: 5px"></div>
... ... @@ -518,7 +518,7 @@
518 518 {{if reason[6].checked == true}}<th colspan="3">缺车</th>{{/if}}
519 519 {{if reason[7].checked == true}}<th colspan="3">客稀</th>{{/if}}
520 520 {{if reason[8].checked == true}}<th colspan="3">气候</th>{{/if}}
521   - {{if reason[9].checked == true}}<th colspan="3">外援</th>{{/if}}
  521 + {{if reason[9].checked == true}}<th colspan="3">援外</th>{{/if}}
522 522 {{if reason[10].checked == true}}<th colspan="3">其他</th>{{/if}}
523 523 </tr>
524 524 <tr>
... ...
src/main/resources/static/pages/oil/list_ph.html
... ... @@ -6,231 +6,228 @@
6 6 }
7 7  
8 8 </style>
9   -<div class="page-head">
10   - <div class="page-title">
11   - <h1>进出场存油量</h1>
12   - </div>
13   -</div>
14   -
15   -<ul class="page-breadcrumb breadcrumb">
16   - <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
17   - <li><span class="active">用油管理</span> <i class="fa fa-circle"></i></li>
18   - <li><span class="active">进出场存油量</span></li>
19   -</ul>
20   -<div id="ll_oil_list"
21   - class=" row col-md-12 portlet light porttlet-fit portlet-datatable bordered" style="height: calc(100% - 100px);background-color: #fff">
22   - <!-- Begin: life time stats -->
23   - <div class="portlet-title" >
24   - <div class="caption">
25   - <i class="fa fa-fire-extinguisher"></i> <span
26   - class="caption-subject font-dark sbold uppercase">进出场存油量表</span>
27   - </div>
28   - <div class="actions">
29   - <a class="btn btn-circle blue" href="add.html" data-pjax><i
30   - class="fa fa-plus"></i> 添加</a>
31   - <button type="button" class="btn btn-circle blue removeButton" id="removeButton">
32   - <i class="fa fa-trash-o"></i> 删除
33   - </button>
34   - <button type="button" class="btn btn-circle blue sortButton" id="sortButton">
35   - <i class="fa fa-minus-square"></i> 拆分
36   - </button>
37   - <button type="button" class="btn btn-circle blue saveButton" id="saveButton">
38   - <i class="fa fa-check-circle"></i> 保存
39   - </button>
40   - <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> -->
41   - <div class="btn-group">
42   - <a class="btn red btn-outline btn-circle" href="javascript:;"
43   - data-toggle="dropdown"> <i class="fa fa-share"></i> <span
44   - class="hidden-xs"> 系统工具 </span> <i class="fa fa-angle-down"></i>
45   - </a>
46   - <ul class="dropdown-menu pull-right" id="datatable_ajax_tools">
47   - <li><a href="javascript:;" data-action="0" class="tool-action"
48   - id="obtain"> <i class="fa fa-hourglass-half"></i> 获取加/存油信息
49   - </a></li>
50   - <li><a href="javascript:;" data-action="1" class="tool-action"
51   - id="outAndIn"> <i class="fa fa-pencil"></i> 油耗计算(进场=出场)
52   - </a></li>
53   - <li><a href="javascript:;" id="checkYl" data-action="3"
54   - class="tool-action"> <i class="fa fa-gg-circle"></i>
55   - 核对加注量(有加油无里程)
56   - </a></li>
57   - <li class="divider"></li>
58   - <li><a href="javascript:;" data-action="3" class="tool-action"
59   - id="export"> <i class="fa fa-file-excel-o"></i> 导出Excel
60   - </a></li>
  9 + <div class="page-head">
  10 + <div class="page-title">
  11 + <h1>进出场存油量</h1>
  12 + </div>
  13 + </div>
  14 +
  15 + <ul class="page-breadcrumb breadcrumb">
  16 + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
  17 + <li><span class="active">用油管理</span> <i class="fa fa-circle"></i></li>
  18 + <li><span class="active">进出场存油量</span></li>
  19 + </ul>
  20 + <div id="ll_oil_list"
  21 + class=" row col-md-12 portlet light porttlet-fit portlet-datatable bordered" style="height: calc(100% - 100px);background-color: #fff">
  22 + <!-- Begin: life time stats -->
  23 + <div class="portlet-title" >
  24 + <div class="caption">
  25 + <i class="fa fa-fire-extinguisher"></i> <span
  26 + class="caption-subject font-dark sbold uppercase">进出场存油量表</span>
  27 + </div>
  28 + <div class="actions">
  29 + <a class="btn btn-circle blue" href="add.html" data-pjax><i
  30 + class="fa fa-plus"></i> 添加</a>
  31 + <button type="button" class="btn btn-circle blue removeButton" id="removeButton">
  32 + <i class="fa fa-trash-o"></i> 删除
  33 + </button>
  34 + <button type="button" class="btn btn-circle blue sortButton" id="sortButton">
  35 + <i class="fa fa-minus-square"></i> 拆分
  36 + </button>
  37 + <button type="button" class="btn btn-circle blue saveButton" id="saveButton">
  38 + <i class="fa fa-check-circle"></i> 保存
  39 + </button>
  40 + <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> -->
  41 + <div class="btn-group">
  42 + <a class="btn red btn-outline btn-circle" href="javascript:;"
  43 + data-toggle="dropdown"> <i class="fa fa-share"></i> <span
  44 + class="hidden-xs"> 系统工具 </span> <i class="fa fa-angle-down"></i>
  45 + </a>
  46 + <ul class="dropdown-menu pull-right" id="datatable_ajax_tools">
  47 + <li><a href="javascript:;" data-action="0" class="tool-action"
  48 + id="obtain"> <i class="fa fa-hourglass-half"></i> 获取加/存油信息
  49 + </a></li>
  50 + <li><a href="javascript:;" data-action="1" class="tool-action"
  51 + id="outAndIn"> <i class="fa fa-pencil"></i> 油耗计算(进场=出场)
  52 + </a></li>
  53 + <li><a href="javascript:;" id="checkYl" data-action="3"
  54 + class="tool-action"> <i class="fa fa-gg-circle"></i>
  55 + 核对加注量(有加油无里程)
  56 + </a></li>
  57 + <li class="divider"></li>
  58 + <li><a href="javascript:;" data-action="3" class="tool-action"
  59 + id="export"> <i class="fa fa-file-excel-o"></i> 导出Excel
  60 + </a></li>
  61 +
  62 +<!-- <li class="divider"></li> -->
  63 +<!-- <li><a href="javascript:;" data-action="3" class="tool-action" -->
  64 +<!-- id="cxtj"> <i class="fa fa-file-excel-o"></i> 重新统计 -->
  65 +<!-- </a></li> -->
  66 + </ul>
  67 + </div>
  68 + </div>
  69 + <div>
  70 + <table
  71 + class="table table-striped table-bordered table-hover table-checkable"
  72 + id="datatable_ylb" style="table-layout: fixed;margin-bottom: 0px">
  73 + <thead>
  74 + <tr role="row" class="filter">
  75 + <td colspan="2">
  76 + <div style="float: right;">&nbsp;公司&nbsp;</div>
  77 + </td>
  78 + <td colspan="3">
  79 + <div style="float: left; width: 150px">
  80 + <select class="form-control" name="ssgsdm_like"
  81 + id="ylbListGsdmId"></select>
  82 + </div>
  83 + </td>
  84 + <td colspan="2">
  85 + <div style="float: right;">&nbsp;分公司&nbsp;</div>
  86 + </td>
  87 + <td colspan="4">
  88 + <div style="float: left;">
  89 + <select class="form-control" name="fgsdm_like"
  90 + id="ylbListFgsdmId" style="width: 150px"></select>
  91 + </div>
  92 + </td>
  93 + <td>
  94 + <div style="float: right;">日期</div>
  95 + </td>
  96 + <td colspan="3">
  97 + <div style="float: left;">
  98 + <input type="text" style="width: 120px" name="rq" id="rq" />
  99 + </div>
  100 + </td>
  101 + <td rowspan="2" colspan="2">
  102 + <div style="float: left;">
  103 + &nbsp;
  104 + <button
  105 + class="btn btn-sm green btn-outline filter-submit margin-bottom"
  106 + style="margin-right: 0px">
  107 + <i class="fa fa-search"></i> 搜索
  108 + </button>
  109 + <!-- <button class="btn btn-sm red btn-outline filter-cancel" style="margin-right:0px"> -->
  110 + <!-- <i class="fa fa-times"></i> 重置 -->
  111 + <!-- </button> -->
  112 +
  113 + </div>
  114 + </td>
  115 + </tr>
  116 + <tr class="filter2">
  117 + <td colspan="2">
  118 + <div style="float: right;">&nbsp;线路</div>
  119 + </td>
  120 + <td colspan="3">
  121 + <div style="float: left;">
  122 + <select class="form-control" name="xlbm_like" id="xlbm"
  123 + style="width: 150px;"></select>
  124 + </div>
  125 + </td>
  126 + <td colspan="2">
  127 + <div style="float: right;">&nbsp;内部编码</div>
  128 + </td>
  129 + <td colspan="4">
  130 + <div style="float: left;">
  131 + <select class="form-control" name="nbbm_eq" id="nbbm"
  132 + style="width: 120px;"></select>
  133 + </div>
  134 + <div style="float: left;">
  135 + <button class="btn btn-sm #000 btn-outline filter-cancel"
  136 + style="margin-right: 0px">
  137 + <i class="fa fa-times"></i>
  138 + </button>
  139 + </div>
  140 + </td>
  141 + <td>
  142 + <div style="float: right;">类型</div>
  143 + </td>
  144 + <td colspan="3">
  145 + <div style="float: left;">
  146 + <select class="form-control" name="sxtj">
  147 + <option value="0">全部</option>
  148 + <option value="1">一车一单</option>
  149 + <option value="2">一车多单</option>
  150 + <option value="3">有加油没里程</option>
  151 + <option value="4">有里程没加油</option>
  152 + </select>
  153 + </div>
  154 +
  155 + </td>
  156 + </tr>
  157 + <tr>
  158 + <td colspan="17">
  159 + <div style="float: left;">
  160 + 总计 &nbsp;&nbsp; 加注量:&nbsp;<label id="sumJzl"></label>
  161 + &nbsp;&nbsp; 耗油量:&nbsp;<label id="sumYh"></label> &nbsp;&nbsp;
  162 + 损耗量:&nbsp;<label id="sumSh"></label>
  163 + </div>
  164 + </td>
  165 + </tr>
61 166  
62   - <li class="divider"></li>
63   - <li><a href="javascript:;" data-action="3" class="tool-action"
64   - id="cxtj"> <i class="fa fa-file-excel-o"></i> 重新统计
65   - </a></li>
66   - </ul>
  167 + </thead>
  168 +
  169 + </table>
67 170 </div>
68 171 </div>
69   - <div>
70   - <table
71   - class="table table-striped table-bordered table-hover table-checkable"
72   - id="datatable_ylb" style="table-layout: fixed;margin-bottom: 0px">
73   - <thead>
74   - <tr role="row" class="filter">
75   - <td colspan="2">
76   - <div style="float: right;">&nbsp;公司&nbsp;</div>
77   - </td>
78   - <td colspan="3">
79   - <div style="float: left; width: 150px">
80   - <select class="form-control" name="ssgsdm_like"
81   - id="ylbListGsdmId"></select>
82   - </div>
83   - </td>
84   - <td colspan="2">
85   - <div style="float: right;">&nbsp;分公司&nbsp;</div>
86   - </td>
87   - <td colspan="4">
88   - <div style="float: left;">
89   - <select class="form-control" name="fgsdm_like"
90   - id="ylbListFgsdmId" style="width: 150px"></select>
91   - </div>
92   - </td>
93   - <td>
94   - <div style="float: right;">日期</div>
95   - </td>
96   - <td colspan="3">
97   - <div style="float: left;">
98   - <input type="text" style="width: 120px" name="rq" id="rq" />
99   - </div>
100   - </td>
101   - <td rowspan="2" colspan="2">
102   - <div style="float: left;">
103   - &nbsp;
104   - <button
105   - class="btn btn-sm green btn-outline filter-submit margin-bottom"
106   - style="margin-right: 0px">
107   - <i class="fa fa-search"></i> 搜索
108   - </button>
109   - <!-- <button class="btn btn-sm red btn-outline filter-cancel" style="margin-right:0px"> -->
110   - <!-- <i class="fa fa-times"></i> 重置 -->
111   - <!-- </button> -->
112   -
113   - </div>
114   - </td>
115   - </tr>
116   - <tr class="filter2">
117   - <td colspan="2">
118   - <div style="float: right;">&nbsp;线路</div>
119   - </td>
120   - <td colspan="3">
121   - <div style="float: left;">
122   - <select class="form-control" name="xlbm_like" id="xlbm"
123   - style="width: 150px;"></select>
124   - </div>
125   - </td>
126   - <td colspan="2">
127   - <div style="float: right;">&nbsp;内部编码</div>
128   - </td>
129   - <td colspan="4">
130   - <div style="float: left;">
131   - <select class="form-control" name="nbbm_eq" id="nbbm"
132   - style="width: 120px;"></select>
133   - </div>
134   - <div style="float: left;">
135   - <button class="btn btn-sm #000 btn-outline filter-cancel"
136   - style="margin-right: 0px">
137   - <i class="fa fa-times"></i>
138   - </button>
139   - </div>
140   - </td>
141   - <td>
142   - <div style="float: right;">类型</div>
143   - </td>
144   - <td colspan="3">
145   - <div style="float: left;">
146   - <select class="form-control" name="sxtj">
147   - <option value="0">全部</option>
148   - <option value="1">一车一单</option>
149   - <option value="2">一车多单</option>
150   - <option value="3">有加油没里程</option>
151   - <option value="4">有里程没加油</option>
152   - </select>
153   - </div>
154   -
155   - </td>
156   - </tr>
157   - <tr>
158   - <td colspan="17">
159   - <div style="float: left;">
160   - 总计 &nbsp;&nbsp; 加注量:&nbsp;<label id="sumJzl"></label>
161   - &nbsp;&nbsp; 耗油量:&nbsp;<label id="sumYh"></label> &nbsp;&nbsp;
162   - 损耗量:&nbsp;<label id="sumSh"></label>
163   - </div>
164   - </td>
165   - </tr>
166   -
167   - </thead>
168   -
169   - </table>
170   - </div>
171   - </div>
172   -
173   - <div id="ylbtable" class="portlet-body table-container " style="height: calc(100% + 100px);overflow: hidden;position: absolute;background: #fff;">
174   -
175   - <table
176   - class="table table-striped table-bordered table-hover table-checkable"
177   - style="table-layout: fixed;margin-bottom: 0px;">
178   - <thead>
179   - <tr role="row" class="heading">
180   - <td width="40px">
181   - <input type="checkbox" id="selectAll" class="group-checkable" >
182   - </td>
183   - <td width="40px">序号</td>
184   - <td width="8%">日期</td>
185   - <td width="5%">公司</td>
186   - <td width="8%">线路</td>
187   - <td width="5%">自编号</td>
188   - <td width="7%">驾驶员</td>
189   - <td width="4%">加油量</td>
190   - <td width="5%">出场存油</td>
191   - <td width="5%">进场存油</td>
192   - <td width="5%">油耗</td>
193   - <td width="8%">燃油类型</td>
194   - <td width="4%">尿素</td>
195   - <td width="8%">耗损原因</td>
196   - <td width="5%">耗损油量</td>
197   - <td width="5%">当日总里程</td>
198   - <td width="5%">数据类型</td>
199   - <td >百公里油耗</td>
200   - </tr>
201   - </thead>
202   - </table>
203   - <div id="datatable_ylb_body_div" style="display: block;position:absolute;overflow: auto;height: calc(100% - 80px);">
  172 +
  173 + <div id="ylbtable" class="portlet-body table-container " style="height: calc(100% + 100px);overflow: hidden;position: absolute;background: #fff;">
  174 +
204 175 <table
205   - class="table table-striped table-bordered table-hover table-checkable"
206   - id="datatable_ylb_body"
207   - style="table-layout: fixed; overflow: auto; ">
208   - <tbody></tbody>
209   - </table>
210   - <div style="text-align: right;margin-right: 50px">
211   - <a class="btn btn-circle " href="add.html" data-pjax><i
212   - class="fa fa-plus"></i> 添加</a>
213   - <button type="button" class="btn btn-circle removeButton" >
214   - <i class="fa fa-trash-o"></i> 删除
215   - </button>
216   - <button type="button" class="btn btn-circle sortButton">
217   - <i class="fa fa-minus-square"></i> 拆分
218   - </button>
219   - <button type="button" class="btn btn-circle saveButton" >
220   - <i class="fa fa-check-circle"></i> 保存
221   - </button>
222   - <button type="button" class="btn btn-circle saveButton" >
223   - <i class="fa fa-check-circle"></i> 保存
224   - </button>
225   - </div>
226   - </div>
227   -
228   -
229   - <div style="text-align: right;">
230   - <ul id="pagination" class="pagination"></ul>
  176 + class="table table-striped table-bordered table-hover table-checkable"
  177 + style="table-layout: fixed;margin-bottom: 0px;">
  178 + <thead>
  179 + <tr role="row" class="heading">
  180 + <td width="40px">
  181 + <input type="checkbox" id="selectAll" class="group-checkable" >
  182 + </td>
  183 + <td width="40px">序号</td>
  184 + <td width="8%">日期</td>
  185 + <td width="5%">公司</td>
  186 + <td width="8%">线路</td>
  187 + <td width="5%">自编号</td>
  188 + <td width="7%">驾驶员</td>
  189 + <td width="4%">加油量</td>
  190 + <td width="5%">出场存油</td>
  191 + <td width="5%">进场存油</td>
  192 + <td width="5%">油耗</td>
  193 + <td width="8%">燃油类型</td>
  194 + <td width="4%">尿素</td>
  195 + <td width="8%">耗损原因</td>
  196 + <td width="5%">耗损油量</td>
  197 + <td width="5%">当日总里程</td>
  198 + <td width="5%">数据类型</td>
  199 + <td >百公里油耗</td>
  200 + </tr>
  201 + </thead>
  202 + </table>
  203 + <div id="datatable_ylb_body_div" style="display: block;position:absolute;overflow: auto;height: calc(100% - 80px);">
  204 + <table
  205 + class="table table-striped table-bordered table-hover table-checkable"
  206 + id="datatable_ylb_body"
  207 + style="table-layout: fixed; overflow: auto; ">
  208 + <tbody></tbody>
  209 + </table>
  210 + <div style="text-align: right;margin-right: 50px">
  211 + <a class="btn btn-circle " href="add.html" data-pjax><i
  212 + class="fa fa-plus"></i> 添加</a>
  213 + <button type="button" class="btn btn-circle removeButton" >
  214 + <i class="fa fa-trash-o"></i> 删除
  215 + </button>
  216 + <button type="button" class="btn btn-circle sortButton">
  217 + <i class="fa fa-minus-square"></i> 拆分
  218 + </button>
  219 + <button type="button" class="btn btn-circle saveButton" >
  220 + <i class="fa fa-check-circle"></i> 保存
  221 + </button>
  222 + </div>
  223 + </div>
  224 +
  225 +
  226 + <div style="text-align: right;">
  227 + <ul id="pagination" class="pagination"></ul>
  228 + </div>
231 229 </div>
232 230 </div>
233   -</div>
234 231 <script id="ylb_list_temp" type="text/html">
235 232 {{each list as obj i}}
236 233 <tr>
... ... @@ -252,10 +249,15 @@
252 249  
253 250 </td>
254 251 <td width="7%">
255   - {{obj.jsy}}/{{obj.name}}
  252 + {{if obj.jsy=='' || obj.jsy==null }}
  253 + <input data-id="{{obj.id}}" style=" width:100%" type="text" class="in_carpark_jsy" ></input>
  254 + <button class="btn btn-sm blue btn-jsyUpdate" style=" width:100%" data-id="{{obj.id}}">填写</button>
  255 + {{else}}
  256 + {{obj.jsy}}/{{obj.name}}
  257 + {{/if}}
  258 +
256 259 </td>
257 260 <td width="4%">
258   -
259 261 <lable data-id="{{obj.id}}" class="in_carpark_jzl"> {{obj.jzl}}</lable>
260 262 </td>
261 263 <td width="5%">
... ... @@ -707,6 +709,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
707 709 var bodyHtm = template('ylb_list_temp', {list:data});
708 710  
709 711 $('#datatable_ylb_body tbody').html(bodyHtm);
  712 + $('.btn-jsyUpdate').on('click', jsyUpdate);
710 713 $('.yl_sxzy').on('mouseup', yhSxzy);
711 714 layer.close(l);
712 715 $get('/ylb/sumYlb',params,function(returns){
... ... @@ -746,6 +749,18 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
746 749 });
747 750 }
748 751  
  752 +
  753 + function jsyUpdate(){
  754 + var id = $(this).data('id');
  755 + var jsy=$('.in_carpark_jsy[data-id='+id+']', '#ll_oil_list').val();
  756 + $get('/ylb/updateJsy',{id:id,jsy:jsy}, function(result){
  757 + layer.msg('修改成功.');
  758 + var params = getParamsList();
  759 + page = 0;
  760 + jsDoQuery(params, true);
  761 + });
  762 +
  763 + }
749 764 //页面计算防止精度丢失
750 765 var accAdd = function (a, b) {
751 766 var c, d, e;
... ...