|
@@ -47,7 +47,7 @@ import net.sf.json.JSONArray;
|
|
@Service
|
|
@Service
|
|
@WebService(targetNamespace = "http://service.web.jsjty.com/", portName = "xkzfzWebServicePort", serviceName = "xkzfzWebService")
|
|
@WebService(targetNamespace = "http://service.web.jsjty.com/", portName = "xkzfzWebServicePort", serviceName = "xkzfzWebService")
|
|
public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
-
|
|
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private QueryService query;
|
|
private QueryService query;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -62,11 +62,12 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
private AccessoryService accessoryService;
|
|
private AccessoryService accessoryService;
|
|
@Autowired
|
|
@Autowired
|
|
private XkzfzService xkzfzService;
|
|
private XkzfzService xkzfzService;
|
|
- //列表
|
|
|
|
|
|
+
|
|
|
|
+ // 列表
|
|
@Override
|
|
@Override
|
|
- public String findXkzfz(int pages, int rows,final String ssjyr, final String szdid, final String szgkid, final String szgqid, final String fzsqh, final String fzsfyx, final String wxhwpm, final String fzsfdq){
|
|
|
|
-
|
|
|
|
- if (!this.checkUser()){
|
|
|
|
|
|
+ public String findXkzfz(int pages, int rows, final String ssjyr, final String szdid, final String szgkid, final String szgqid, final String fzsqh, final String fzsfyx, final String wxhwpm, final String fzsfdq) {
|
|
|
|
+
|
|
|
|
+ if (!this.checkUser()) {
|
|
return BaseWebCtl.NOLOGIN;
|
|
return BaseWebCtl.NOLOGIN;
|
|
}
|
|
}
|
|
SimplePageRequest page = new SimplePageRequest(pages, rows);
|
|
SimplePageRequest page = new SimplePageRequest(pages, rows);
|
|
@@ -74,13 +75,13 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
|
|
|
|
// 查询条件
|
|
// 查询条件
|
|
Specification<XkzfzEntity> spec = new Specification<XkzfzEntity>() {
|
|
Specification<XkzfzEntity> spec = new Specification<XkzfzEntity>() {
|
|
-
|
|
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public Predicate toPredicate(Root<XkzfzEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
|
|
public Predicate toPredicate(Root<XkzfzEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
|
|
List<Predicate> list = new ArrayList<Predicate>();
|
|
List<Predicate> list = new ArrayList<Predicate>();
|
|
if (StringUtils.isNotEmpty(szdid)) {
|
|
if (StringUtils.isNotEmpty(szdid)) {
|
|
list.add(cb.like(root.get("szd").get("id").as(String.class), "%" + szdid + "%"));
|
|
list.add(cb.like(root.get("szd").get("id").as(String.class), "%" + szdid + "%"));
|
|
- }
|
|
|
|
|
|
+ }
|
|
// else if (StringUtils.isNotEmpty(SearchCondition.xkzszdid) &&
|
|
// else if (StringUtils.isNotEmpty(SearchCondition.xkzszdid) &&
|
|
// isGET(request)) {
|
|
// isGET(request)) {
|
|
// list.add(cb.like(root.get("szd").get("id").as(String.class),
|
|
// list.add(cb.like(root.get("szd").get("id").as(String.class),
|
|
@@ -88,7 +89,7 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
// }
|
|
// }
|
|
if (StringUtils.isNotEmpty(szgkid)) {
|
|
if (StringUtils.isNotEmpty(szgkid)) {
|
|
list.add(cb.like(root.get("szgk").as(String.class), "%" + szgkid + "%"));
|
|
list.add(cb.like(root.get("szgk").as(String.class), "%" + szgkid + "%"));
|
|
- }
|
|
|
|
|
|
+ }
|
|
// else if (StringUtils.isNotEmpty(SearchCondition.xkzszgkid) &&
|
|
// else if (StringUtils.isNotEmpty(SearchCondition.xkzszgkid) &&
|
|
// isGET(request)) {
|
|
// isGET(request)) {
|
|
// list.add(cb.like(root.get("szgk").as(String.class), "%" +
|
|
// list.add(cb.like(root.get("szgk").as(String.class), "%" +
|
|
@@ -96,7 +97,7 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
// }
|
|
// }
|
|
if (StringUtils.isNotEmpty(szgqid)) {
|
|
if (StringUtils.isNotEmpty(szgqid)) {
|
|
list.add(cb.like(root.get("ssgq").as(String.class), "%" + szgqid + "%"));
|
|
list.add(cb.like(root.get("ssgq").as(String.class), "%" + szgqid + "%"));
|
|
- }
|
|
|
|
|
|
+ }
|
|
// else if (StringUtils.isNotEmpty(SearchCondition.xkzszgqid) &&
|
|
// else if (StringUtils.isNotEmpty(SearchCondition.xkzszgqid) &&
|
|
// isGET(request)) {
|
|
// isGET(request)) {
|
|
// list.add(cb.like(root.get("ssgq").as(String.class), "%" +
|
|
// list.add(cb.like(root.get("ssgq").as(String.class), "%" +
|
|
@@ -112,7 +113,7 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
// }
|
|
// }
|
|
if (StringUtils.isNotEmpty(fzsqh)) {
|
|
if (StringUtils.isNotEmpty(fzsqh)) {
|
|
list.add(cb.like(root.get("fzsqh").as(String.class), "%" + fzsqh + "%"));
|
|
list.add(cb.like(root.get("fzsqh").as(String.class), "%" + fzsqh + "%"));
|
|
- }
|
|
|
|
|
|
+ }
|
|
if (StringUtils.isNotEmpty(wxhwpm)) {
|
|
if (StringUtils.isNotEmpty(wxhwpm)) {
|
|
list.add(cb.like(root.get("wxhwpm").as(String.class), wxhwpm));
|
|
list.add(cb.like(root.get("wxhwpm").as(String.class), wxhwpm));
|
|
}
|
|
}
|
|
@@ -123,7 +124,7 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
list.add(cb.notEqual(root.get("recordStatus").as(String.class), "1"));
|
|
list.add(cb.notEqual(root.get("recordStatus").as(String.class), "1"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
if (StringUtils.isNotEmpty(fzsfdq)) {
|
|
if (StringUtils.isNotEmpty(fzsfdq)) {
|
|
if ((fzsfdq).equals("6103")) {
|
|
if ((fzsfdq).equals("6103")) {
|
|
@@ -149,34 +150,37 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
list.add(in);
|
|
list.add(in);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
|
|
|
|
- list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
|
|
|
|
- return cb.and(list.toArray(new Predicate[] {}));
|
|
|
|
|
|
+ list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
|
|
|
|
+ list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORE_STATE_COPY));
|
|
|
|
+ return cb.and(list.toArray(new Predicate[] {}));
|
|
}
|
|
}
|
|
};
|
|
};
|
|
if (page.getPage() < 1) {
|
|
if (page.getPage() < 1) {
|
|
-// Object xmxxpage = CacheSearchCondition.cacheSCmapVal(cacheSCmap, "xmxxpage");
|
|
|
|
-// if (StringUtils.isEmpty(xmxxpage) || !org.apache.commons.lang.StringUtils.isNumeric(String.valueOf(xmxxpage))) {
|
|
|
|
-// xmxxpage = "1";
|
|
|
|
-// }
|
|
|
|
|
|
+ // Object xmxxpage = CacheSearchCondition.cacheSCmapVal(cacheSCmap,
|
|
|
|
+ // "xmxxpage");
|
|
|
|
+ // if (StringUtils.isEmpty(xmxxpage) ||
|
|
|
|
+ // !org.apache.commons.lang.StringUtils.isNumeric(String.valueOf(xmxxpage)))
|
|
|
|
+ // {
|
|
|
|
+ // xmxxpage = "1";
|
|
|
|
+ // }
|
|
page.setPage(1);
|
|
page.setPage(1);
|
|
}
|
|
}
|
|
page.setSort("yxqjssj");
|
|
page.setSort("yxqjssj");
|
|
page.setOrder("desc");
|
|
page.setOrder("desc");
|
|
- Page<XkzfzEntity> list = query.findAll(spec, toPageRequest(page),XkzfzEntity.class);
|
|
|
|
|
|
+ Page<XkzfzEntity> list = query.findAll(spec, toPageRequest(page), XkzfzEntity.class);
|
|
List<XkzfzVo> voList = new ArrayList<XkzfzVo>();
|
|
List<XkzfzVo> voList = new ArrayList<XkzfzVo>();
|
|
for (XkzfzEntity entity : list) {
|
|
for (XkzfzEntity entity : list) {
|
|
XkzfzVo vo = new XkzfzVo();
|
|
XkzfzVo vo = new XkzfzVo();
|
|
if (entity != null) {
|
|
if (entity != null) {
|
|
BeanUtils.copyProperties(entity, vo);
|
|
BeanUtils.copyProperties(entity, vo);
|
|
if (null != entity.getFzsj()) {
|
|
if (null != entity.getFzsj()) {
|
|
- vo.setFzsjfmt(DateTime.toString(DateTime.toDate(entity.getFzsj())));
|
|
|
|
|
|
+ vo.setFzsjfmt(DateTime.toString(entity.getFzsj()));
|
|
}
|
|
}
|
|
if (null != entity.getYxqkssj()) {
|
|
if (null != entity.getYxqkssj()) {
|
|
- vo.setYxqkssjfmt(DateTime.toString(DateTime.toDate(entity.getYxqkssj())));
|
|
|
|
|
|
+ vo.setYxqkssjfmt(DateTime.toString(entity.getYxqkssj()));
|
|
}
|
|
}
|
|
if (null != entity.getYxqjssj()) {
|
|
if (null != entity.getYxqjssj()) {
|
|
- vo.setYxqjssjfmt(DateTime.toString(DateTime.toDate(entity.getYxqjssj())));
|
|
|
|
|
|
+ vo.setYxqjssjfmt(DateTime.toString(entity.getYxqjssj()));
|
|
}
|
|
}
|
|
vo.setSzdzw(entity.getSzd() != null ? entity.getSzd().getText() : "");
|
|
vo.setSzdzw(entity.getSzd() != null ? entity.getSzd().getText() : "");
|
|
vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
|
|
vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
|
|
@@ -191,7 +195,7 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
time.set(Calendar.HOUR_OF_DAY, 0);
|
|
time.set(Calendar.HOUR_OF_DAY, 0);
|
|
time.set(Calendar.MINUTE, 0);
|
|
time.set(Calendar.MINUTE, 0);
|
|
time.set(Calendar.SECOND, 0);
|
|
time.set(Calendar.SECOND, 0);
|
|
- if (vo.getYxqjssjfmt() != null && DateTime.toDate(entity.getYxqjssj()).getTime() > time.getTimeInMillis()) {
|
|
|
|
|
|
+ if (vo.getYxqjssjfmt() != null && entity.getYxqjssj().getTime() > time.getTimeInMillis()) {
|
|
vo.setRecordStatus(1);
|
|
vo.setRecordStatus(1);
|
|
} else {
|
|
} else {
|
|
vo.setRecordStatus(9);
|
|
vo.setRecordStatus(9);
|
|
@@ -201,13 +205,13 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
}
|
|
}
|
|
return JSONArray.fromObject(voList).toString();
|
|
return JSONArray.fromObject(voList).toString();
|
|
}
|
|
}
|
|
-
|
|
|
|
- //详情查询
|
|
|
|
|
|
+
|
|
|
|
+ // 详情查询
|
|
public String findOne(String id) {
|
|
public String findOne(String id) {
|
|
- if (!this.checkUser()){
|
|
|
|
|
|
+ if (!this.checkUser()) {
|
|
return BaseWebCtl.NOLOGIN;
|
|
return BaseWebCtl.NOLOGIN;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
XkzfzEntity entity = xkzfzService.findOne(id);
|
|
XkzfzEntity entity = xkzfzService.findOne(id);
|
|
XkzfzVo vo = new XkzfzVo();
|
|
XkzfzVo vo = new XkzfzVo();
|
|
BeanUtils.copyProperties(entity, vo);
|
|
BeanUtils.copyProperties(entity, vo);
|
|
@@ -221,13 +225,13 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
vo.setSzgq(entity.getSzgq() != null ? entity.getSzgq().getId() : "");
|
|
vo.setSzgq(entity.getSzgq() != null ? entity.getSzgq().getId() : "");
|
|
vo.setSsjyr(entity.getSsjyr() != null ? entity.getSsjyr().getId() : "");
|
|
vo.setSsjyr(entity.getSsjyr() != null ? entity.getSsjyr().getId() : "");
|
|
if (null != entity.getFzsj()) {
|
|
if (null != entity.getFzsj()) {
|
|
- vo.setFzsjfmt(DateTime.toString(DateTime.toDate(entity.getFzsj())));
|
|
|
|
|
|
+ vo.setFzsjfmt(DateTime.toString(entity.getFzsj()));
|
|
}
|
|
}
|
|
if (null != entity.getYxqkssj()) {
|
|
if (null != entity.getYxqkssj()) {
|
|
- vo.setYxqkssjfmt(DateTime.toString(DateTime.toDate(entity.getYxqkssj())));
|
|
|
|
|
|
+ vo.setYxqkssjfmt(DateTime.toString(entity.getYxqkssj()));
|
|
}
|
|
}
|
|
if (null != entity.getYxqjssj()) {
|
|
if (null != entity.getYxqjssj()) {
|
|
- vo.setYxqjssjfmt(DateTime.toString(DateTime.toDate(entity.getYxqjssj())));
|
|
|
|
|
|
+ vo.setYxqjssjfmt(DateTime.toString(entity.getYxqjssj()));
|
|
}
|
|
}
|
|
|
|
|
|
// zycs cq whdj
|
|
// zycs cq whdj
|
|
@@ -254,5 +258,5 @@ public class XkzfzWebService extends BaseWebCtl implements IXkzfzWebService {
|
|
List<GqEntity> listgq = gqService.findGq();
|
|
List<GqEntity> listgq = gqService.findGq();
|
|
List<GkEntity> listgk = gkService.findGk();
|
|
List<GkEntity> listgk = gkService.findGk();
|
|
return JSONArray.fromObject(vo).toString();
|
|
return JSONArray.fromObject(vo).toString();
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|