新增潜次列表(列出所有已经上传了轨迹的潜次),访问路径 sample/diving/list.htm
This commit is contained in:
parent
608098e40f
commit
bab37f89e9
|
|
@ -1,5 +1,5 @@
|
||||||
AppDebug=true
|
AppDebug=true
|
||||||
AppTrace=true
|
AppTrace=true
|
||||||
AppParamHelper=cn.tsy.cas.idsse.dsds.helper.DsdsParamHelper
|
AppParamHelper=cn.tsy.cas.idsse.dsds.helper.DSDSParamHelper
|
||||||
AppListener=cn.tsy.cas.idsse.dsds.control.DSDSInitializeListener
|
AppListener=cn.tsy.cas.idsse.dsds.control.DSDSInitializeListener
|
||||||
AppName=DSDSServer
|
AppName=DSDSServer
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
AppDebug=true
|
AppDebug=true
|
||||||
AppTrace=true
|
AppTrace=true
|
||||||
AppParamHelper=cn.tsy.cas.idsse.dsds.helper.DsdsParamHelper
|
AppParamHelper=cn.tsy.cas.idsse.dsds.helper.DSDSParamHelper
|
||||||
AppListener=cn.tsy.cas.idsse.dsds.control.DSDSInitializeListener
|
AppListener=cn.tsy.cas.idsse.dsds.control.DSDSInitializeListener
|
||||||
AppName=DSDSServer
|
AppName=DSDSServer
|
||||||
|
|
@ -49,4 +49,14 @@ public class SampleDivingControl extends HmeAjaxControl {
|
||||||
return new HmeAjax(file.getOriginalFilename());
|
return new HmeAjax(file.getOriginalFilename());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@CrossOrigin
|
||||||
|
@RequestMapping("list.htm")
|
||||||
|
public HmeAjax list() {
|
||||||
|
String sql = "select max(tsy_id) tsy_id,diving_sn from ("
|
||||||
|
+ "select r.*,d.dataset_id,d.track_total from sample_dataset r,(select dataset_id,count(1) track_total from sample_dataset_track group by dataset_id) d where r.tsy_id=d.dataset_id "
|
||||||
|
+ ") t group by diving_sn order by diving_sn";
|
||||||
|
|
||||||
|
return new HmeAjax(this.mDataset.listBySql(sql));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package cn.tsy.cas.idsse.dsds.control.sample;
|
package cn.tsy.cas.idsse.dsds.control.sample;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
@ -11,10 +9,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import cn.hme.framework.frame.control.HmeAjax;
|
import cn.hme.framework.frame.control.HmeAjax;
|
||||||
import cn.hme.framework.frame.control.HmeAjaxControl;
|
import cn.hme.framework.frame.control.HmeAjaxControl;
|
||||||
import cn.hme.framework.helper.io.HmeFileHelper;
|
|
||||||
import cn.hme.framework.helper.io.HmeMultipartFileHelper;
|
import cn.hme.framework.helper.io.HmeMultipartFileHelper;
|
||||||
import cn.tsy.cas.idsse.dsds.service.sample.SampleLineTrackService;
|
|
||||||
import cn.tsy.data.cas.idsse.dsds.model.sample.SampleLineTrack;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("sample/line/track")
|
@RequestMapping("sample/line/track")
|
||||||
|
|
@ -22,19 +17,15 @@ import cn.tsy.data.cas.idsse.dsds.model.sample.SampleLineTrack;
|
||||||
public class SampleLineTrackControl extends HmeAjaxControl {
|
public class SampleLineTrackControl extends HmeAjaxControl {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SampleLineTrackService sTrack;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@CrossOrigin
|
@CrossOrigin
|
||||||
@RequestMapping("upload.htm")
|
@RequestMapping("upload.htm")
|
||||||
public HmeAjax upload(int dataset_id, MultipartFile file) {
|
public HmeAjax upload(int dataset_id, MultipartFile file) {
|
||||||
// DSDSWebHelper.getFrameOptr(true);
|
// DSDSWebHelper.getFrameOptr(true);
|
||||||
File f = HmeMultipartFileHelper.fromUpload(file);
|
File f = HmeMultipartFileHelper.fromUpload(file);
|
||||||
List<String> array = HmeFileHelper.readAsArray(f.getPath());
|
//List<String> array = HmeFileHelper.readAsArray(f.getPath());
|
||||||
f.delete();
|
f.delete();
|
||||||
List<SampleLineTrack> list = this.sTrack.uploadTrack(dataset_id, array,file.getOriginalFilename());
|
//List<SampleLineTrack> list = this.sTrack.uploadTrack(dataset_id, array,file.getOriginalFilename());
|
||||||
// if (list.size() == 0)
|
// if (list.size() == 0)
|
||||||
// throw new BusinessException("未找到有效的轨迹文件(已忽略相同的记录)!");
|
// throw new BusinessException("未找到有效的轨迹文件(已忽略相同的记录)!");
|
||||||
return new HmeAjax(file.getOriginalFilename());
|
return new HmeAjax(file.getOriginalFilename());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue