|
|
@@ -250,17 +250,24 @@ public class WorkOrderManageController {
|
|
|
} catch (UnsupportedEncodingException ignored) {
|
|
|
}
|
|
|
|
|
|
- // 保存卸车点
|
|
|
+ // 保存/更新卸车点
|
|
|
WorkSpot workSpot = new WorkSpot();
|
|
|
- workSpot.setOrgId(orgId);
|
|
|
- workSpot.setType(2);
|
|
|
+ if (orderVO.getSpotId() != null) {
|
|
|
+ workSpot.setSpotId(orderVO.getSpotId());
|
|
|
+ workSpot.setUpdater(userId);
|
|
|
+ workSpot.setUpdaterName(userName);
|
|
|
+ workSpot.setUpdateDate(LocalDateTime.now());
|
|
|
+ } else {
|
|
|
+ workSpot.setType(2);
|
|
|
+ workSpot.setOrgId(orgId);
|
|
|
+ workSpot.setCreater(userId);
|
|
|
+ workSpot.setCreaterName(userName);
|
|
|
+ workSpot.setCreateDate(LocalDateTime.now());
|
|
|
+ }
|
|
|
workSpot.setSpotName(orderVO.getSpotName());
|
|
|
workSpot.setContactName(orderVO.getContactName());
|
|
|
workSpot.setContactPhone(orderVO.getContactPhone());
|
|
|
- workSpot.setCreater(userId);
|
|
|
- workSpot.setCreaterName(userName);
|
|
|
- workSpot.setCreateDate(LocalDateTime.now());
|
|
|
- workSpotService.save(workSpot);
|
|
|
+ workSpotService.saveOrUpdate(workSpot);
|
|
|
|
|
|
String ids = orderVO.getTruckIds();
|
|
|
String[] truckIds = ids.split(",");
|