|
|
|
@ -119,7 +119,7 @@ public class TradeuploadController {
|
|
|
|
|
@NoDataSourceBind()
|
|
|
|
|
@ApiOperation("上传文件/图片")
|
|
|
|
|
@PostMapping(value = "/UploaderPondList/{type}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
|
|
|
|
public ActionResult uploader(@RequestPart("file") MultipartFile file, @PathVariable("type") String type) throws IOException {
|
|
|
|
|
public ActionResult uploader(@RequestPart("file") MultipartFile file, @PathVariable("type") String type) throws IOException, ParseException {
|
|
|
|
|
String fileType = UpUtil.getFileType(file);
|
|
|
|
|
//验证类型
|
|
|
|
|
if (!OptimizeUtil.fileType(configValueUtil.getAllowUploadFileType(), fileType)) {
|
|
|
|
@ -153,9 +153,13 @@ public class TradeuploadController {
|
|
|
|
|
}else if (i == 7){
|
|
|
|
|
array = object.getJSONArray("NetWeight");
|
|
|
|
|
}
|
|
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
|
|
if(array != null && array.size() > 0){
|
|
|
|
|
JSONObject object1 = array.getJSONObject(0);
|
|
|
|
|
Map<String, String> params = JSONObject.parseObject(object1.toJSONString(), new TypeReference<Map<String, String>>() {
|
|
|
|
|
params = JSONObject.parseObject(object1.toJSONString(), new TypeReference<Map<String, String>>() {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
map1.put("TareWeight", params.get("word"));
|
|
|
|
|
}else if (i == 1){
|
|
|
|
@ -216,18 +220,15 @@ public class TradeuploadController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (map1.get("PrintTime") == null) {
|
|
|
|
|
tradeuploadCrForm.setPoundDate(new Date().getTime());
|
|
|
|
|
tradeuploadCrForm.setPoundDate(new Date());
|
|
|
|
|
}
|
|
|
|
|
String printTime = String.valueOf(map1.get("PrintTime"));
|
|
|
|
|
String sdf = "yyyy-MM-dd" ;
|
|
|
|
|
//String sdf = "yyyy-MM-dd" ;
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
if(printTime != null && printTime.length() == 10){
|
|
|
|
|
if (dateStrIsValid(printTime, sdf)) {
|
|
|
|
|
tradeuploadCrForm.setPoundDate(Long.valueOf(String.valueOf(map1.get("PrintTime"))));
|
|
|
|
|
}else {
|
|
|
|
|
tradeuploadCrForm.setPoundDate(new Date().getTime());
|
|
|
|
|
}
|
|
|
|
|
tradeuploadCrForm.setPoundDate(sdf.parse(printTime));
|
|
|
|
|
}else{
|
|
|
|
|
tradeuploadCrForm.setPoundDate(new Date().getTime());
|
|
|
|
|
tradeuploadCrForm.setPoundDate(new Date());
|
|
|
|
|
}
|
|
|
|
|
if (map1.get("DeliveryNumber") == null) {
|
|
|
|
|
tradeuploadCrForm.setPoundlistNo(String.valueOf(new Date()));
|
|
|
|
@ -354,9 +355,9 @@ public class TradeuploadController {
|
|
|
|
|
tradeuploadCrForm.setVehiclePictures(vehicleEntity.getVehiclephotos());
|
|
|
|
|
}
|
|
|
|
|
if (map.get("PrintTime") == null){
|
|
|
|
|
tradeuploadCrForm.setPoundDate(new Date().getTime());
|
|
|
|
|
tradeuploadCrForm.setPoundDate(new Date());
|
|
|
|
|
}
|
|
|
|
|
tradeuploadCrForm.setPoundDate((Long) map.get("PrintTime"));
|
|
|
|
|
//tradeuploadCrForm.setPoundDate(map.get("PrintTime"));
|
|
|
|
|
if (map.get("DeliveryNumber") == null){
|
|
|
|
|
tradeuploadCrForm.setPoundlistNo(String.valueOf(new Date()));
|
|
|
|
|
}
|
|
|
|
|