| | |
| | | /** |
| | | * 控管 |
| | | */ |
| | | |
| | | if (Cools.isEmpty(item)) { |
| | | return R.error("参数为空,请联系管理员"); |
| | | } |
| | |
| | | if (Cools.isEmpty(cstmr)) { |
| | | throw new CoolException("找不到该客户,请检查"); |
| | | } |
| | | |
| | | item.setCustMan(cstmr.getName()); |
| | | item.setCustMobile(cstmr.getTel()); |
| | | item.setCustAdress(cstmr.getAddr()); |
| | | item.setHostId(getHostId()); |
| | | if (Cools.isEmpty(item.getHostId()) || item.getHostId() == 0){ |
| | | item.setHostId(1L); |
| | | }else { |
| | | item.setHostId(getHostId()); |
| | | } |
| | | item.setCreateBy(getUserId()); |
| | | item.setCreateTime(new Date()); |
| | | item.setStatus(1); |
| | |
| | | if (Cools.isEmpty(item)) { |
| | | return R.error("参数为空,请联系管理员"); |
| | | } |
| | | |
| | | // item.setType("1"); |
| | | // if (!item.getType().equals("1")) { |
| | | // throw new CoolException("目前仅支持集成项目"); |
| | |
| | | // if (item.getRealMonth() < 0){ |
| | | // throw new CoolException("实施周期不可为负数"); |
| | | // } |
| | | if(!(newitem.getStartTime()==null || newitem.getEndTime()==null || newitem.getRealStartTime()==null || newitem.getRealEndTime()==null)){ |
| | | item.setStartTime(newitem.getStartTime()); |
| | | item.setEndTime(newitem.getEndTime()); |
| | | item.setRealEndTime(newitem.getRealEndTime()); |
| | | item.setRealStartTime(newitem.getRealStartTime()); |
| | | } |
| | | |
| | | |
| | | //↓↓↓写这段代码的真该抽大嘴巴子 |
| | | // if(!(newitem.getStartTime()==null || newitem.getEndTime()==null || newitem.getRealStartTime()==null || newitem.getRealEndTime()==null)){ |
| | | // item.setStartTime(newitem.getStartTime()); |
| | | // item.setEndTime(newitem.getEndTime()); |
| | | // item.setRealEndTime(newitem.getRealEndTime()); |
| | | // item.setRealStartTime(newitem.getRealStartTime()); |
| | | // } |
| | | |
| | | |
| | | //超出运费 |
| | | if(item.getPlandeAmt()!=null && item.getRealdeAmt()!=null){ |
| | | item.setExcessAmount(item.getRealdeAmt()-item.getPlandeAmt()); |