|
@@ -11,10 +11,7 @@ import com.huimv.admin.utils.ResultCode;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@DS("thired")
|
|
@DS("thired")
|
|
@@ -37,10 +34,18 @@ public class DaZsdaServiceImpl implements DaZsdaService {
|
|
entity.setMcid(11);
|
|
entity.setMcid(11);
|
|
Integer id = rep.findMax().get(0);
|
|
Integer id = rep.findMax().get(0);
|
|
entity.setXgsj(new Date());
|
|
entity.setXgsj(new Date());
|
|
|
|
+ rep.save(entity);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ String JQID = jqdaRepo.findMax().get(0);
|
|
|
|
+
|
|
|
|
+ String jqid = "000"+(Integer.parseInt(JQID)+1);
|
|
DaJqda daJqda =new DaJqda() ;
|
|
DaJqda daJqda =new DaJqda() ;
|
|
daJqda.setZSID(id);
|
|
daJqda.setZSID(id);
|
|
|
|
+ daJqda.setJQID(jqid);
|
|
|
|
+
|
|
jqdaRepo.save(daJqda);
|
|
jqdaRepo.save(daJqda);
|
|
- rep.save(entity);
|
|
|
|
|
|
+
|
|
|
|
|
|
return new Result(ResultCode.SUCCESS);
|
|
return new Result(ResultCode.SUCCESS);
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
@@ -84,12 +89,39 @@ public class DaZsdaServiceImpl implements DaZsdaService {
|
|
public Result findAll(String name , Integer pageNum , Integer pageSize) {
|
|
public Result findAll(String name , Integer pageNum , Integer pageSize) {
|
|
try {
|
|
try {
|
|
Map map = new HashMap();
|
|
Map map = new HashMap();
|
|
- int size = rep.findAll().size() ;
|
|
|
|
Integer startPage = (pageNum-1) * pageSize;
|
|
Integer startPage = (pageNum-1) * pageSize;
|
|
List<DaZsda> all = rep.findAll(name,startPage,pageSize);
|
|
List<DaZsda> all = rep.findAll(name,startPage,pageSize);
|
|
|
|
+ int size = all.size() ;
|
|
map.put("total",size);
|
|
map.put("total",size);
|
|
map.put("totalPageNum",(size + pageSize - 1) / pageSize);
|
|
map.put("totalPageNum",(size + pageSize - 1) / pageSize);
|
|
- map.put("data",all);
|
|
|
|
|
|
+ Map map1 = new HashMap();
|
|
|
|
+ List list = new ArrayList();
|
|
|
|
+ for (DaZsda daZsda : all) {
|
|
|
|
+ Integer id = daZsda.getId();
|
|
|
|
+ map1.put("id",id);
|
|
|
|
+ map1.put("csq1",daZsda.getCsq1());
|
|
|
|
+ map1.put("csq2",daZsda.getCsq2());
|
|
|
|
+ map1.put("dqlq",daZsda.getDqlq());
|
|
|
|
+ map1.put("flq",daZsda.getFlq());
|
|
|
|
+ map1.put("gly",daZsda.getGly());
|
|
|
|
+ map1.put("glyxm",daZsda.getGlyxm());
|
|
|
|
+ map1.put("hkbz",daZsda.getHkbz());
|
|
|
|
+ map1.put("lcbz",daZsda.getLcbz());
|
|
|
|
+ map1.put("mcid",daZsda.getMcid());
|
|
|
|
+ map1.put("spjk",daZsda.getSpjk());
|
|
|
|
+ map1.put("xgr",daZsda.getXgr());
|
|
|
|
+ map1.put("xgsj",(daZsda.getXgsj()+"").substring(0,10));
|
|
|
|
+ map1.put("yzjd",daZsda.getYzjd());
|
|
|
|
+ map1.put("zdbz",daZsda.getZdbz());
|
|
|
|
+ map1.put("zfbz",daZsda.getZfbz());
|
|
|
|
+ map1.put("zsbz",daZsda.getZsbz());
|
|
|
|
+ map1.put("zsmc",daZsda.getZsmc());
|
|
|
|
+ map1.put("zsqy",daZsda.getZsqy());
|
|
|
|
+ map1.put("ssqy",daZsda.getSsqy());
|
|
|
|
+ map1.put("jqid",jqdaRepo.findAllByZSID(id).get(0).getJQID());
|
|
|
|
+ list.add(map1);
|
|
|
|
+ }
|
|
|
|
+ map.put("data",list);
|
|
|
|
|
|
return new Result(ResultCode.SUCCESS,map);
|
|
return new Result(ResultCode.SUCCESS,map);
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|