|
@@ -109,8 +109,7 @@ public class WhsqbpWebService extends BaseController {
|
|
|
public List<ZysqbpEntity> queryZysqbpByParams(final String szd,
|
|
|
final String sbsjq, final String sbsjz, final String gkjyrmc,
|
|
|
final String wxwpbh, final String wxwpmc, final String cm) {
|
|
|
- List<ZysqbpEntity> list = zysqbpService.queryByParams(szd, sbsjq,
|
|
|
- sbsjz, gkjyrmc, wxwpbh, wxwpmc, cm);
|
|
|
+ List<ZysqbpEntity> list = zysqbpService.queryByParams(szd, sbsjq,sbsjz, gkjyrmc, wxwpbh, wxwpmc, cm);
|
|
|
return list;
|
|
|
}
|
|
|
|
|
@@ -196,6 +195,25 @@ public class WhsqbpWebService extends BaseController {
|
|
|
bgsj1, bgsj2, kgsj1, kgsj2, wgsj1, wgsj2, n, 0);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页查询危货作业申请列表
|
|
|
+ * @param szd
|
|
|
+ * @param gkjyr
|
|
|
+ * @param szgq
|
|
|
+ * @param cm
|
|
|
+ * @param wxhwbh
|
|
|
+ * @param wxhwpm
|
|
|
+ * @param bgsj1
|
|
|
+ * @param bgsj2
|
|
|
+ * @param kgsj1
|
|
|
+ * @param kgsj2
|
|
|
+ * @param wgsj1
|
|
|
+ * @param wgsj2
|
|
|
+ * @param n
|
|
|
+ * @param pageCount
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public List<ZysqbpEntity> getZysqbpPageListByParam(Long szd, String gkjyr,
|
|
|
Long szgq, String cm, String wxhwbh, String wxhwpm, String bgsj1,
|
|
|
String bgsj2, String kgsj1, String kgsj2, String wgsj1,
|
|
@@ -256,10 +274,9 @@ public class WhsqbpWebService extends BaseController {
|
|
|
BaseEntity.RECORD_STATE_VALID, Operator.NEQ);
|
|
|
}
|
|
|
}
|
|
|
- Specification<ZysqbpEntity> spec = SpecificationCreater
|
|
|
- .searchByPredicateModels(filterList);
|
|
|
- SinglePageRequest page = new SinglePageRequest(pageCount, n, "desc",
|
|
|
- "bgsj");
|
|
|
+ Specification<ZysqbpEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
|
|
|
+ SinglePageRequest page = new SinglePageRequest(pageCount, n, "desc","bgsj");
|
|
|
+
|
|
|
Page<ZysqbpEntity> list = zysqbpService.findAll(spec, page);
|
|
|
if (list == null || list.getTotalPages() < pageCount) {
|
|
|
return new ArrayList<ZysqbpEntity>();
|
|
@@ -871,8 +888,7 @@ public class WhsqbpWebService extends BaseController {
|
|
|
* @param pageCount
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<CbEntity> getCbPageListByCm(String zwcm, String ywcm, int n,
|
|
|
- int pageCount) {
|
|
|
+ public List<CbEntity> getCbPageListByCm(String zwcm, String ywcm, int n,int pageCount) {
|
|
|
List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
addNotEmptyModel(filterList, "zwcm", zwcm, PredicateModel.Operator.LIKE);
|
|
|
addNotEmptyModel(filterList, "ywcm", ywcm, PredicateModel.Operator.LIKE);
|
|
@@ -1055,52 +1071,52 @@ public class WhsqbpWebService extends BaseController {
|
|
|
}
|
|
|
// 一季度
|
|
|
if (bc.getAttribute("countList1") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setCountList1((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("countList1"));
|
|
|
}
|
|
|
// 二季度
|
|
|
if (bc.getAttribute("countList2") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setCountList2((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("countList2"));
|
|
|
}
|
|
|
// 三季度
|
|
|
if (bc.getAttribute("countList3") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setCountList3((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("countList3"));
|
|
|
}
|
|
|
// 四季度
|
|
|
if (bc.getAttribute("countList4") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setCountList4((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("countList4"));
|
|
|
}
|
|
|
// 季度
|
|
|
if (bc.getAttribute("jdcountList") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setJdcountList((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("jdcountList"));
|
|
|
}
|
|
|
// 第一个月
|
|
|
if (bc.getAttribute("countList5") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setCountList5((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("countList5"));
|
|
|
}
|
|
|
// 第二个月
|
|
|
if (bc.getAttribute("countList6") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setCountList6((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("countList6"));
|
|
|
}
|
|
|
// 第三个月
|
|
|
if (bc.getAttribute("countList7") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setCountList7((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("countList7"));
|
|
|
}
|
|
|
// 总
|
|
|
if (bc.getAttribute("ydcountList") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setYdcountList((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("ydcountList"));
|
|
|
}
|
|
|
// 企业
|
|
|
if (bc.getAttribute("countList8") != null) {
|
|
|
- statisticsEntity.setNdcountList((List<ZysqbpCountEntity>) bc
|
|
|
+ statisticsEntity.setCountList8((List<ZysqbpCountEntity>) bc
|
|
|
.getAttribute("countList8"));
|
|
|
}
|
|
|
return statisticsEntity;
|
|
@@ -1132,5 +1148,192 @@ public class WhsqbpWebService extends BaseController {
|
|
|
Page<ZysqbpEntity> pageContent = zysqbpService.findAll(spec, page);
|
|
|
return pageContent.getContent();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 计算未删除、不通过和被退回的数量
|
|
|
+ * @param szd
|
|
|
+ * @param gkjyr
|
|
|
+ * @param szgq
|
|
|
+ * @param cm
|
|
|
+ * @param wxhwbh
|
|
|
+ * @param wxhwpm
|
|
|
+ * @param bgsj1
|
|
|
+ * @param bgsj2
|
|
|
+ * @param kgsj1
|
|
|
+ * @param kgsj2
|
|
|
+ * @param wgsj1
|
|
|
+ * @param wgsj2
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public long[] countStatus(Long szd, String gkjyr,
|
|
|
+ Long szgq, String cm, String wxhwbh, String wxhwpm, String bgsj1,
|
|
|
+ String bgsj2, String kgsj1, String kgsj2, String wgsj1,
|
|
|
+ String wgsj2) {
|
|
|
+ long[] rtnLong = new long[3];
|
|
|
+ /* ------------------total----------------- */
|
|
|
+ List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
+ // 只检索非删除状态记录
|
|
|
+ addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
+ // 根据 申请单位 过滤
|
|
|
+ addNotEmptyModel(filterList, "zydw.gkjyr", gkjyr, Operator.LIKE);
|
|
|
+ // 根据所在地过滤
|
|
|
+ addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE);
|
|
|
+ // 根据港区过滤
|
|
|
+ addNotEmptyModel(filterList, "szgq.id", szgq, Operator.EQ);
|
|
|
+ // 根据船名
|
|
|
+ addNotEmptyModel(filterList, "cm", cm, Operator.LIKE);
|
|
|
+ // 根据危货品编号
|
|
|
+ addNotEmptyModel(filterList, "wxwpmc", wxhwbh, Operator.LIKE);
|
|
|
+ // 根据危货品名称
|
|
|
+ addNotEmptyModel(filterList, "wxhwmcbh", wxhwpm, Operator.LIKE);
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-M-d");
|
|
|
+ // 报告时间
|
|
|
+ try {
|
|
|
+ if (!StringUtils.isEmpty(bgsj1))
|
|
|
+ addNotEmptyModel(filterList, "bgsj",
|
|
|
+ Utils.getDateFirstTime(sdf.parse(bgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(bgsj2))
|
|
|
+ addNotEmptyModel(filterList, "bgsj",
|
|
|
+ Utils.getDateLastTime(sdf.parse(bgsj2)), Operator.LTE);
|
|
|
+ // 开工时间
|
|
|
+ if (!StringUtils.isEmpty(kgsj1))
|
|
|
+ addNotEmptyModel(filterList, "kgsj",
|
|
|
+ Utils.getDateFirstTime(sdf.parse(kgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(kgsj2))
|
|
|
+ addNotEmptyModel(filterList, "kgsj",
|
|
|
+ Utils.getDateLastTime(sdf.parse(kgsj2)), Operator.LTE);
|
|
|
+ // 完工时间
|
|
|
+ if (!StringUtils.isEmpty(wgsj1))
|
|
|
+ addNotEmptyModel(filterList, "wgsj",
|
|
|
+ Utils.getDateFirstTime(sdf.parse(wgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(wgsj2))
|
|
|
+ addNotEmptyModel(filterList, "wgsj",
|
|
|
+ Utils.getDateLastTime(sdf.parse(wgsj2)), Operator.LTE);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (Utils.getWebServiceUser() != null) {
|
|
|
+ UserEntity user = Utils.getWebServiceUser();
|
|
|
+ // 经营人只能查自己的
|
|
|
+ if (Constants.YES.equals(user.getSfjyr())
|
|
|
+ && user.getJyrjcxx() != null) {
|
|
|
+ addNotEmptyModel(filterList, "zydw", user.getJyrjcxx(),
|
|
|
+ Operator.EQ);
|
|
|
+ } else {
|
|
|
+ // 行政人员根据权限过滤(危货列表菜单ID=26)
|
|
|
+ addRecordCodeFilter(26L, filterList);
|
|
|
+ addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_VALID, Operator.NEQ);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Specification<ZysqbpEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
|
|
|
+ //total
|
|
|
+ rtnLong[0] = zysqbpService.count(spec);
|
|
|
+
|
|
|
+ /* ------------------不通过----------------- */
|
|
|
+ List<PredicateModel> filterList1 = new ArrayList<PredicateModel>();
|
|
|
+ // 只检索非删除状态记录
|
|
|
+ addNotEmptyModel(filterList1, "recordStatus",BaseEntity.RECORD_STATE_CALEL, Operator.EQ);
|
|
|
+ // 根据 申请单位 过滤
|
|
|
+ addNotEmptyModel(filterList1, "zydw.gkjyr", gkjyr, Operator.LIKE);
|
|
|
+ // 根据所在地过滤
|
|
|
+ addNotEmptyModel(filterList1, "szd.id", szd, Operator.LIKE);
|
|
|
+ // 根据港区过滤
|
|
|
+ addNotEmptyModel(filterList1, "szgq.id", szgq, Operator.EQ);
|
|
|
+ // 根据船名
|
|
|
+ addNotEmptyModel(filterList1, "cm", cm, Operator.LIKE);
|
|
|
+ // 根据危货品编号
|
|
|
+ addNotEmptyModel(filterList1, "wxwpmc", wxhwbh, Operator.LIKE);
|
|
|
+ // 根据危货品名称
|
|
|
+ addNotEmptyModel(filterList1, "wxhwmcbh", wxhwpm, Operator.LIKE);
|
|
|
+ SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-M-d");
|
|
|
+ // 报告时间
|
|
|
+ try {
|
|
|
+ if (!StringUtils.isEmpty(bgsj1))
|
|
|
+ addNotEmptyModel(filterList1, "bgsj",Utils.getDateFirstTime(sdf1.parse(bgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(bgsj2))
|
|
|
+ addNotEmptyModel(filterList1, "bgsj",Utils.getDateLastTime(sdf1.parse(bgsj2)), Operator.LTE);
|
|
|
+ // 开工时间
|
|
|
+ if (!StringUtils.isEmpty(kgsj1))
|
|
|
+ addNotEmptyModel(filterList1, "kgsj",Utils.getDateFirstTime(sdf1.parse(kgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(kgsj2))
|
|
|
+ addNotEmptyModel(filterList1, "kgsj",Utils.getDateLastTime(sdf1.parse(kgsj2)), Operator.LTE);
|
|
|
+ // 完工时间
|
|
|
+ if (!StringUtils.isEmpty(wgsj1))
|
|
|
+ addNotEmptyModel(filterList1, "wgsj",Utils.getDateFirstTime(sdf1.parse(wgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(wgsj2))
|
|
|
+ addNotEmptyModel(filterList1, "wgsj",Utils.getDateLastTime(sdf1.parse(wgsj2)), Operator.LTE);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (Utils.getWebServiceUser() != null) {
|
|
|
+ UserEntity user = Utils.getWebServiceUser();
|
|
|
+ // 经营人只能查自己的
|
|
|
+ if (Constants.YES.equals(user.getSfjyr()) && user.getJyrjcxx() != null) {
|
|
|
+ addNotEmptyModel(filterList1, "zydw", user.getJyrjcxx(), Operator.EQ);
|
|
|
+ } else {
|
|
|
+ // 行政人员根据权限过滤(危货列表菜单ID=26)
|
|
|
+ addRecordCodeFilter(26L, filterList1);
|
|
|
+ addNotEmptyModel(filterList1, "recordStatus",BaseEntity.RECORD_STATE_VALID, Operator.NEQ);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Specification<ZysqbpEntity> spec1 = SpecificationCreater.searchByPredicateModels(filterList1);
|
|
|
+ //不通过
|
|
|
+ rtnLong[1] = zysqbpService.count(spec1);
|
|
|
+
|
|
|
+ /* ------------------被退回----------------- */
|
|
|
+ List<PredicateModel> filterList2 = new ArrayList<PredicateModel>();
|
|
|
+ // 只检索非删除状态记录
|
|
|
+ addNotEmptyModel(filterList2, "recordStatus",BaseEntity.RECORD_STATE_CALEL, Operator.EQ);
|
|
|
+ // 根据 申请单位 过滤
|
|
|
+ addNotEmptyModel(filterList2, "zydw.gkjyr", gkjyr, Operator.LIKE);
|
|
|
+ // 根据所在地过滤
|
|
|
+ addNotEmptyModel(filterList2, "szd.id", szd, Operator.LIKE);
|
|
|
+ // 根据港区过滤
|
|
|
+ addNotEmptyModel(filterList2, "szgq.id", szgq, Operator.EQ);
|
|
|
+ // 根据船名
|
|
|
+ addNotEmptyModel(filterList2, "cm", cm, Operator.LIKE);
|
|
|
+ // 根据危货品编号
|
|
|
+ addNotEmptyModel(filterList2, "wxwpmc", wxhwbh, Operator.LIKE);
|
|
|
+ // 根据危货品名称
|
|
|
+ addNotEmptyModel(filterList2, "wxhwmcbh", wxhwpm, Operator.LIKE);
|
|
|
+ SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-M-d");
|
|
|
+ // 报告时间
|
|
|
+ try {
|
|
|
+ if (!StringUtils.isEmpty(bgsj1))
|
|
|
+ addNotEmptyModel(filterList2, "bgsj",Utils.getDateFirstTime(sdf2.parse(bgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(bgsj2))
|
|
|
+ addNotEmptyModel(filterList2, "bgsj",Utils.getDateLastTime(sdf2.parse(bgsj2)), Operator.LTE);
|
|
|
+ // 开工时间
|
|
|
+ if (!StringUtils.isEmpty(kgsj1))
|
|
|
+ addNotEmptyModel(filterList2, "kgsj",Utils.getDateFirstTime(sdf2.parse(kgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(kgsj2))
|
|
|
+ addNotEmptyModel(filterList2, "kgsj",Utils.getDateLastTime(sdf2.parse(kgsj2)), Operator.LTE);
|
|
|
+ // 完工时间
|
|
|
+ if (!StringUtils.isEmpty(wgsj1))
|
|
|
+ addNotEmptyModel(filterList2, "wgsj",Utils.getDateFirstTime(sdf2.parse(wgsj1)), Operator.GTE);
|
|
|
+ if (!StringUtils.isEmpty(wgsj2))
|
|
|
+ addNotEmptyModel(filterList2, "wgsj",Utils.getDateLastTime(sdf2.parse(wgsj2)), Operator.LTE);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ if (Utils.getWebServiceUser() != null) {
|
|
|
+ UserEntity user = Utils.getWebServiceUser();
|
|
|
+ // 经营人只能查自己的
|
|
|
+ if (Constants.YES.equals(user.getSfjyr()) && user.getJyrjcxx() != null) {
|
|
|
+ addNotEmptyModel(filterList2, "zydw", user.getJyrjcxx(), Operator.EQ);
|
|
|
+ } else {
|
|
|
+ // 行政人员根据权限过滤(危货列表菜单ID=26)
|
|
|
+ addRecordCodeFilter(26L, filterList2);
|
|
|
+ addNotEmptyModel(filterList2, "recordStatus",BaseEntity.RECORD_STATE_VALID, Operator.NEQ);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Specification<ZysqbpEntity> spec2 = SpecificationCreater.searchByPredicateModels(filterList2);
|
|
|
+ //被退回
|
|
|
+ rtnLong[2] = zysqbpService.count(spec2);
|
|
|
+
|
|
|
+ return rtnLong;
|
|
|
+ }
|
|
|
|
|
|
}
|