租赁协议
This commit is contained in:
		
							parent
							
								
									6db52fe17d
								
							
						
					
					
						commit
						7403872145
					
				| 
						 | 
					@ -45,10 +45,8 @@ import java.net.MalformedURLException;
 | 
				
			||||||
import java.net.URL;
 | 
					import java.net.URL;
 | 
				
			||||||
import java.text.ParseException;
 | 
					import java.text.ParseException;
 | 
				
			||||||
import java.text.SimpleDateFormat;
 | 
					import java.text.SimpleDateFormat;
 | 
				
			||||||
import java.util.Date;
 | 
					import java.util.*;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import java.util.Locale;
 | 
					 | 
				
			||||||
import java.util.Map;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @Author:liang.chao
 | 
					 * @Author:liang.chao
 | 
				
			||||||
| 
						 | 
					@ -352,11 +350,12 @@ public class OrderController extends BaseController {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @ApiOperation(value = "购物车协议(查看)")
 | 
					    @ApiOperation(value = "购物车协议(查看)")
 | 
				
			||||||
    @GetMapping("/bookCarAgreement")
 | 
					    @PostMapping("/bookCarAgreement")
 | 
				
			||||||
    public AjaxResult getbookCarAgreement(OrderInfoDto orderInfoDto, Map<String, Object> replacements) throws ParseException, IOException {
 | 
					    public AjaxResult getbookCarAgreement(@RequestBody OrderInfoDto orderInfoDto) throws ParseException {
 | 
				
			||||||
        if (orderInfoDto != null) {
 | 
					        if (orderInfoDto != null) {
 | 
				
			||||||
            SimpleDateFormat inputFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);
 | 
					            SimpleDateFormat inputFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);
 | 
				
			||||||
            SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 | 
					            SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 | 
				
			||||||
 | 
					            Map<String, String> replacements = new HashMap<>();
 | 
				
			||||||
            //装备所属公司
 | 
					            //装备所属公司
 | 
				
			||||||
            replacements.put("czCompanyName", orderInfoDto.getCzcompanyName());
 | 
					            replacements.put("czCompanyName", orderInfoDto.getCzcompanyName());
 | 
				
			||||||
            //承租方所属公司
 | 
					            //承租方所属公司
 | 
				
			||||||
| 
						 | 
					@ -374,7 +373,7 @@ public class OrderController extends BaseController {
 | 
				
			||||||
                orderDetail += "<p><br>机具名称:" + orderDetailDto.getDeviceName() + "<br>租期:" + beginTime + "至" + endTime + "<br>天数:" + orderDetailDto.getDays() + "天 <br>租金:" + orderDetailDto.getDayLeasePrice() + "元/天<br>数量:" + orderDetailDto.getNum() + "</p>";
 | 
					                orderDetail += "<p><br>机具名称:" + orderDetailDto.getDeviceName() + "<br>租期:" + beginTime + "至" + endTime + "<br>天数:" + orderDetailDto.getDays() + "天 <br>租金:" + orderDetailDto.getDayLeasePrice() + "元/天<br>数量:" + orderDetailDto.getNum() + "</p>";
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            replacements.put("orderTable", orderDetail);
 | 
					            replacements.put("orderTable", orderDetail);
 | 
				
			||||||
        }
 | 
					
 | 
				
			||||||
            BmContract bmContract = new BmContract();
 | 
					            BmContract bmContract = new BmContract();
 | 
				
			||||||
            bmContract.setStatus(1);
 | 
					            bmContract.setStatus(1);
 | 
				
			||||||
            List<BmContract> list = bmContractService.list(bmContract);
 | 
					            List<BmContract> list = bmContractService.list(bmContract);
 | 
				
			||||||
| 
						 | 
					@ -385,5 +384,8 @@ public class OrderController extends BaseController {
 | 
				
			||||||
            StrSubstitutor sub = new StrSubstitutor(replacements);
 | 
					            StrSubstitutor sub = new StrSubstitutor(replacements);
 | 
				
			||||||
            String result = sub.replace(content);
 | 
					            String result = sub.replace(content);
 | 
				
			||||||
            return AjaxResult.success(result);
 | 
					            return AjaxResult.success(result);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            return AjaxResult.error("参数错误");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue