|
|
@@ -67,28 +67,29 @@ public class DispatchServiceImpl implements DispatchService {
|
|
|
Dispatch dispatch1 = dispatchMapper.getDispatch(dispatch);
|
|
|
if (dispatch1 != null){
|
|
|
dispatchMapper.updDispatch(dispatch);
|
|
|
- SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Date star = dft.parse(dispatch1.getScrq());//开始时间
|
|
|
- Date endDay = dft.parse(dispatch1.getFinalTime());//结束时间
|
|
|
- Long starTime=star.getTime();
|
|
|
- Long endTime=endDay.getTime();
|
|
|
- Long num=endTime-starTime;//时间戳相差的毫秒数
|
|
|
- String nums = String.valueOf(num/24/60/60/1000);
|
|
|
- System.out.println("相差天数为:"+nums);//除以一天的毫秒数
|
|
|
|
|
|
- //改变时间
|
|
|
- Client client = new Client();
|
|
|
- client.setCode(dispatch1.getCustomer());
|
|
|
- client.setDays(nums);
|
|
|
- Client client1 = clientMapper.getClient(client);
|
|
|
-
|
|
|
- if (client1 == null){
|
|
|
- //添加
|
|
|
- clientMapper.addClient(client);
|
|
|
- }else {
|
|
|
- //修改
|
|
|
- clientMapper.updClient(client);
|
|
|
- }
|
|
|
+// SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+// Date star = dft.parse(dispatch1.getScrq());//开始时间
|
|
|
+// Date endDay = dft.parse(dispatch1.getFinalTime());//结束时间
|
|
|
+// Long starTime=star.getTime();
|
|
|
+// Long endTime=endDay.getTime();
|
|
|
+// Long num=endTime-starTime;//时间戳相差的毫秒数
|
|
|
+// String nums = String.valueOf(num/24/60/60/1000);
|
|
|
+// System.out.println("相差天数为:"+nums);//除以一天的毫秒数
|
|
|
+//
|
|
|
+// //改变时间
|
|
|
+// Client client = new Client();
|
|
|
+// client.setCode(dispatch1.getCustomer());
|
|
|
+// client.setDays(nums);
|
|
|
+// Client client1 = clientMapper.getClient(client);
|
|
|
+//
|
|
|
+// if (client1 == null){
|
|
|
+// //添加
|
|
|
+// clientMapper.addClient(client);
|
|
|
+// }else {
|
|
|
+// //修改
|
|
|
+// clientMapper.updClient(client);
|
|
|
+// }
|
|
|
return CommRes.success(null);
|
|
|
}else {
|
|
|
return CommRes.fail("未查询到发货单信息");
|