|
@@ -217,35 +217,30 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
@Override
|
|
|
public <S extends ZysqbpEntity> S submit(String currentRoleCode, S data) {
|
|
|
- String url = Thread.currentThread().getStackTrace()[2].getClassName()
|
|
|
- + "."
|
|
|
- + Thread.currentThread().getStackTrace()[2].getMethodName();
|
|
|
+ String url = Thread.currentThread().getStackTrace()[2].getClassName() + "." + Thread.currentThread().getStackTrace()[2].getMethodName();
|
|
|
String zyddString;
|
|
|
- if (data.getZyddqybh() != null)
|
|
|
- zyddString = data.getZyddqybh().getQynbmc() != null ? data
|
|
|
- .getZyddqybh().getQynbmc() : "";
|
|
|
+ if (data.getZyddqybh() != null){
|
|
|
+ zyddString = data.getZyddqybh().getQynbmc() != null ? data.getZyddqybh().getQynbmc() : "";
|
|
|
+ }
|
|
|
else {
|
|
|
zyddString = data.getZyddqt() != null ? data.getZyddqt() : "";
|
|
|
}
|
|
|
String cmString = data.getCm() != null ? data.getCm() : "";
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat(" yyyy-MM-dd HH:mm:ss ");
|
|
|
- String kasj = data.getZysjq() != null ? sdf.format(data.getZysjq())
|
|
|
- : "";
|
|
|
+ String kasj = data.getZysjq() != null ? sdf.format(data.getZysjq()) : "";
|
|
|
+
|
|
|
if (data.getRecordStatus() == BaseEntity.RECORD_STATE_REJECT) {
|
|
|
+ //被退回的数据重新提交
|
|
|
data.setRecordStatus(BaseEntity.RECORD_STATE_SUBMIT);
|
|
|
- String str = sdf.format(data.getAddDate()).concat(
|
|
|
- data.getId().toString());
|
|
|
+ String str = sdf.format(data.getAddDate()).concat(data.getId().toString());
|
|
|
data.setBh(str);
|
|
|
data = this.save(data);
|
|
|
Map<String, Object> variables = new HashMap<String, Object>();
|
|
|
WorkFlowParam param = new WorkFlowParam();
|
|
|
param.put(WorkFlowParam.BUSINESS_KEY, data.getId());
|
|
|
param.put(WorkFlowParam.IS_AUDIT, "false");
|
|
|
- param.put(WorkFlowParam.DESCRIPTION, "船名为" + cmString + ",在作业地点"
|
|
|
- + zyddString + "于" + kasj + "开始作业的申报");
|
|
|
- Task task = workService.getTaskByUserAndBusKey(Utils
|
|
|
- .getCurrentUser().getId().toString(), data.getId()
|
|
|
- .toString(), ZysqbpEntity.PROCESS_DEFINITION_KEY);
|
|
|
+ param.put(WorkFlowParam.DESCRIPTION, "船名为" + cmString + ",在作业地点" + zyddString + "于" + kasj + "开始作业的申报");
|
|
|
+ Task task = workService.getTaskByUserAndBusKey(Utils.getCurrentUser().getId().toString(), data.getId().toString(), ZysqbpEntity.PROCESS_DEFINITION_KEY);
|
|
|
// if(flag==false){
|
|
|
// Authentication.setAuthenticatedUserId(Utils.getCurrentUser().getId().toString());
|
|
|
// }
|
|
@@ -259,31 +254,32 @@ public class ZysqbpServiceImpl extends
|
|
|
LOGGER.equals(url + "<EORROR> 获取编号 generateNoByNoRule ");
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
+
|
|
|
+ //权力阳光
|
|
|
if (Constants.YES.equals(GlobalData.QLYG_SYNC)) {
|
|
|
// 同步生成办件信息
|
|
|
this.saveApply(data);
|
|
|
}
|
|
|
+
|
|
|
// 自动审批
|
|
|
Date startTime = null;
|
|
|
Date stopTime = null;
|
|
|
Date nowTime = new Date();
|
|
|
- List<UserEntity> userlist = userDao
|
|
|
- .queryByzd(data.getSzd().getId());
|
|
|
+ //获得被设置为自动审批人的人员entity,同一级所在地,应该只设置一个人,此处也只取一人
|
|
|
+ List<UserEntity> userlist = userDao.queryByzd(data.getSzd().getId());
|
|
|
UserEntity auditor = null;
|
|
|
if (userlist != null && userlist.size() > 0) {
|
|
|
auditor = userlist.get(0);
|
|
|
}
|
|
|
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyyMMdd HHmmss");
|
|
|
- List<CodeEntity> codeList = InitServlet.groupcodeMap
|
|
|
- .get(Constants.GROUP_CODE_AUTO_AUDIT);
|
|
|
+ //获得公共代码中设置的自动审批启用时间范围
|
|
|
+ List<CodeEntity> codeList = InitServlet.groupcodeMap.get(Constants.GROUP_CODE_AUTO_AUDIT);
|
|
|
if (codeList != null && codeList.size() > 0) {
|
|
|
try {
|
|
|
for (CodeEntity code : codeList) {
|
|
|
- if (Constants.GGDM_ID_AUTO_AUDIT_START_TIME.equals(code
|
|
|
- .getId())) {
|
|
|
+ if (Constants.GGDM_ID_AUTO_AUDIT_START_TIME.equals(code.getId())) {
|
|
|
startTime = sdf2.parse(code.getCode());
|
|
|
- } else if (Constants.GGDM_ID_AUTO_AUDIT_STOP_TIME
|
|
|
- .equals(code.getId())) {
|
|
|
+ } else if (Constants.GGDM_ID_AUTO_AUDIT_STOP_TIME.equals(code.getId())) {
|
|
|
stopTime = sdf2.parse(code.getCode());
|
|
|
}
|
|
|
}
|
|
@@ -291,6 +287,8 @@ public class ZysqbpServiceImpl extends
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //获得单独给此单位设置的自动审批启用时间范围,有则覆盖公共代码中的全局设置
|
|
|
if(data.getZydw()!=null && data.getZydw().getZdspsjq()!=null) {
|
|
|
startTime = data.getZydw().getZdspsjq();
|
|
|
}
|
|
@@ -299,29 +297,27 @@ public class ZysqbpServiceImpl extends
|
|
|
}
|
|
|
Boolean flag = true;
|
|
|
Boolean sfsb = true;
|
|
|
+ //是否允许作业货种判断
|
|
|
if (data.getZyddqybh().getWxhwm().indexOf("LB") != -1) {
|
|
|
- sfsb = doCheckJyrAndWxp(data.getZydw().getId(),
|
|
|
- data.getWxwpmc());
|
|
|
- }
|
|
|
- if (startTime != null && nowTime.after(startTime)
|
|
|
- && stopTime != null && nowTime.before(stopTime)
|
|
|
- && auditor != null && data.getZydw() != null
|
|
|
- && Constants.YES.equals(data.getZydw().getSfzdsp()) && flag
|
|
|
- && sfsb) {
|
|
|
+ sfsb = doCheckJyrAndWxp(data.getZydw().getId(),data.getWxwpmc());
|
|
|
+ }
|
|
|
+ if (startTime != null
|
|
|
+ && nowTime.after(startTime)
|
|
|
+ && stopTime != null && nowTime.before(stopTime)
|
|
|
+ && auditor != null && data.getZydw() != null
|
|
|
+ && Constants.YES.equals(data.getZydw().getSfzdsp())
|
|
|
+ && flag
|
|
|
+ && sfsb) {
|
|
|
// 自动审批添加判断逻辑--------------------
|
|
|
Map<String, Object> variables = new HashMap<String, Object>();
|
|
|
- variables.put("user_pz", auditor.getId() == null ? "" : auditor
|
|
|
- .getId().toString());
|
|
|
+ variables.put("user_pz", auditor.getId() == null ? "" : auditor.getId().toString());
|
|
|
WorkFlowParam param = new WorkFlowParam();
|
|
|
param.put(WorkFlowParam.BUSINESS_KEY, data.getId());
|
|
|
// 设置流程发起人
|
|
|
- param.put(WorkFlowParam.AUDIT_USER, Utils.getCurrentUser()
|
|
|
- .getId().toString());
|
|
|
+ param.put(WorkFlowParam.AUDIT_USER, Utils.getCurrentUser().getId().toString());
|
|
|
autoAuditService.create(param, variables);
|
|
|
// 自动完成下一步
|
|
|
- param.put(WorkFlowParam.AUDIT_USER,
|
|
|
- auditor.getId() == null ? "" : auditor.getId()
|
|
|
- .toString());
|
|
|
+ param.put(WorkFlowParam.AUDIT_USER,auditor.getId() == null ? "" : auditor.getId().toString());
|
|
|
param.put(WorkFlowParam.IS_AUDIT, "true");
|
|
|
param.put(WorkFlowParam.AUDIT_DATE, new Date());
|
|
|
param.put(WorkFlowParam.AUDIT_TEXT, "同意作业");
|
|
@@ -335,16 +331,12 @@ public class ZysqbpServiceImpl extends
|
|
|
variables.put("role_xssc", Constants.ROLE_TYPE_CITY_XSSC);
|
|
|
WorkFlowParam param = new WorkFlowParam();
|
|
|
// 设置流程发起人
|
|
|
- if (StringUtils.isEmpty(param
|
|
|
- .getString(WorkFlowParam.AUDIT_USER))) {
|
|
|
- param.put(WorkFlowParam.AUDIT_USER, Utils.getCurrentUser()
|
|
|
- .getId().toString());
|
|
|
+ if (StringUtils.isEmpty(param.getString(WorkFlowParam.AUDIT_USER))) {
|
|
|
+ param.put(WorkFlowParam.AUDIT_USER, Utils.getCurrentUser().getId().toString());
|
|
|
}
|
|
|
param.put(WorkFlowParam.BUSINESS_KEY, data.getId());
|
|
|
param.put(WorkFlowParam.QLYG_INTERNAL_NO, data.getBh());
|
|
|
- param.put(WorkFlowParam.DESCRIPTION, "编号为:" + data.getBh()
|
|
|
- + ",船名为" + cmString + ",在作业地点" + zyddString + "于"
|
|
|
- + kasj + "开始作业的申报");
|
|
|
+ param.put(WorkFlowParam.DESCRIPTION, "编号为:" + data.getBh() + ",船名为" + cmString + ",在作业地点" + zyddString + "于" + kasj + "开始作业的申报");
|
|
|
// 提交流程
|
|
|
create(param, variables);
|
|
|
}
|
|
@@ -1913,27 +1905,52 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByJyr(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
- return parseZysqbpCountEntity1List(zysqbpDao.countByJyr(recordStatus,
|
|
|
- inorout, mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh,
|
|
|
- startTime, stopTime), false);
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
+ return parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByJyr(recordStatus,inorout, mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh,startTime, stopTime,zycs),
|
|
|
+ false);
|
|
|
}
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByJyrBw(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
List<ZysqbpCountEntity1> result = new ArrayList<ZysqbpCountEntity1>();
|
|
|
List<ZysqbpCountEntity1> jyrList = parseZysqbpCountEntity1List(
|
|
|
- zysqbpDao.countByJyr(recordStatus, inorout, mao, szdId + "%",
|
|
|
- gqId, xzqh, jyrId, bwId, whbh, startTime, stopTime),
|
|
|
+ zysqbpDao.countByJyr(recordStatus, inorout, mao, szdId + "%",gqId, xzqh, jyrId, bwId, whbh, startTime, stopTime,zycs),
|
|
|
true);
|
|
|
if (jyrList != null && jyrList.size() > 0) {
|
|
|
for (ZysqbpCountEntity1 jyr : jyrList) {
|
|
|
result.add(jyr);
|
|
|
- result.addAll(parseZysqbpCountEntity1List(
|
|
|
- zysqbpDao.countByBw(recordStatus, inorout, mao, szdId
|
|
|
- + "%", gqId, xzqh, new Long(jyr.getId()), bwId,
|
|
|
- whbh, startTime, stopTime), false));
|
|
|
+ if(zycs.equals(Constants.GGDM_ID_ZYDD_BW)){
|
|
|
+ //泊位
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByBw(recordStatus, inorout, mao, szdId+ "%", gqId, xzqh, new Long(jyr.getId()), bwId,whbh, startTime, stopTime),
|
|
|
+ false));
|
|
|
+ }
|
|
|
+ else if(zycs.equals(Constants.GGDM_ID_ZYDD_CG)){
|
|
|
+ //储罐
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByCg(recordStatus, inorout, mao, szdId+ "%", gqId, xzqh, new Long(jyr.getId()), bwId,whbh, startTime, stopTime),
|
|
|
+ false));
|
|
|
+ }
|
|
|
+ else if(zycs.equals(zycs== Constants.GGDM_ID_ZYDD_DC)){
|
|
|
+ //堆场
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByDc(recordStatus, inorout, mao, szdId+ "%", gqId, xzqh, new Long(jyr.getId()), bwId,whbh, startTime, stopTime),
|
|
|
+ false));
|
|
|
+ }
|
|
|
+ else if(zycs.equals(zycs== Constants.GGDM_ID_ZYDD_CK)){
|
|
|
+ //仓库
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByCk(recordStatus, inorout, mao, szdId+ "%", gqId, xzqh, new Long(jyr.getId()), bwId,whbh, startTime, stopTime),
|
|
|
+ false));
|
|
|
+ }
|
|
|
+ else if(zycs.equals(zycs==Constants.GGDM_ID_ZYDD_GBQ)){
|
|
|
+ //过驳区
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByGbq(recordStatus, inorout, mao, szdId+ "%", gqId, xzqh, new Long(jyr.getId()), bwId,whbh, startTime, stopTime),
|
|
|
+ false));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
@@ -1941,19 +1958,17 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByJyrBwExist(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
List<ZysqbpCountEntity1> result = new ArrayList<ZysqbpCountEntity1>();
|
|
|
List<ZysqbpCountEntity1> jyrList = parseZysqbpCountEntity1List(
|
|
|
- zysqbpDao.countByJyrExist(recordStatus, inorout, mao, szdId
|
|
|
- + "%", gqId, xzqh, jyrId, bwId, whbh, startTime,
|
|
|
- stopTime), true);
|
|
|
+ zysqbpDao.countByJyrExist(recordStatus, inorout, mao, szdId+ "%", gqId, xzqh, jyrId, bwId, whbh, startTime,stopTime,zycs),
|
|
|
+ true);
|
|
|
if (jyrList != null && jyrList.size() > 0) {
|
|
|
for (ZysqbpCountEntity1 jyr : jyrList) {
|
|
|
result.add(jyr);
|
|
|
- result.addAll(parseZysqbpCountEntity1List(zysqbpDao
|
|
|
- .countByBwExist(recordStatus, inorout, mao,
|
|
|
- szdId + "%", gqId, xzqh, new Long(jyr.getId()),
|
|
|
- bwId, whbh, startTime, stopTime), false));
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByBwExist(recordStatus, inorout, mao,szdId + "%", gqId, xzqh, new Long(jyr.getId()),bwId, whbh, startTime, stopTime,zycs),
|
|
|
+ false));
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
@@ -1961,19 +1976,17 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByGqJyr(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
List<ZysqbpCountEntity1> result = new ArrayList<ZysqbpCountEntity1>();
|
|
|
List<ZysqbpCountEntity1> gqList = parseZysqbpCountEntity1List(
|
|
|
- zysqbpDao.countByGq(recordStatus, inorout, mao, szdId + "%",
|
|
|
- gqId, xzqh, jyrId, bwId, whbh, startTime, stopTime),
|
|
|
+ zysqbpDao.countByGq(recordStatus, inorout, mao, szdId + "%",gqId, xzqh, jyrId, bwId, whbh, startTime, stopTime,zycs),
|
|
|
true);
|
|
|
if (gqList != null && gqList.size() > 0) {
|
|
|
for (ZysqbpCountEntity1 gq : gqList) {
|
|
|
result.add(gq);
|
|
|
- result.addAll(parseZysqbpCountEntity1List(zysqbpDao.countByJyr(
|
|
|
- recordStatus, inorout, mao, szdId + "%",
|
|
|
- new Long(gq.getId()), xzqh, jyrId, bwId, whbh,
|
|
|
- startTime, stopTime), false));
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByJyr(recordStatus, inorout, mao, szdId + "%",new Long(gq.getId()), xzqh, jyrId, bwId, whbh,startTime, stopTime,zycs),
|
|
|
+ false));
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
@@ -1981,19 +1994,17 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByGqJyrExist(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
List<ZysqbpCountEntity1> result = new ArrayList<ZysqbpCountEntity1>();
|
|
|
List<ZysqbpCountEntity1> gqList = parseZysqbpCountEntity1List(
|
|
|
- zysqbpDao.countByGqExist(recordStatus, inorout, mao, szdId
|
|
|
- + "%", gqId, xzqh, jyrId, bwId, whbh, startTime,
|
|
|
- stopTime), true);
|
|
|
+ zysqbpDao.countByGqExist(recordStatus, inorout, mao, szdId+ "%", gqId, xzqh, jyrId, bwId, whbh, startTime,stopTime,zycs),
|
|
|
+ true);
|
|
|
if (gqList != null && gqList.size() > 0) {
|
|
|
for (ZysqbpCountEntity1 gq : gqList) {
|
|
|
result.add(gq);
|
|
|
- result.addAll(parseZysqbpCountEntity1List(zysqbpDao
|
|
|
- .countByJyrExist(recordStatus, inorout, mao, szdId
|
|
|
- + "%", new Long(gq.getId()), xzqh, jyrId, bwId,
|
|
|
- whbh, startTime, stopTime), false));
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByJyrExist(recordStatus, inorout, mao, szdId+ "%", new Long(gq.getId()), xzqh, jyrId, bwId,whbh, startTime, stopTime,zycs),
|
|
|
+ false));
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
@@ -2001,19 +2012,17 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByXzqhJyr(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
List<ZysqbpCountEntity1> result = new ArrayList<ZysqbpCountEntity1>();
|
|
|
List<ZysqbpCountEntity1> xzqhList = parseZysqbpCountEntity1List(
|
|
|
- zysqbpDao.countByXzqh(recordStatus, inorout, mao, szdId + "%",
|
|
|
- gqId, xzqh, jyrId, bwId, whbh, startTime, stopTime,
|
|
|
- szdId), true);
|
|
|
+ zysqbpDao.countByXzqh(recordStatus, inorout, mao, szdId + "%",gqId, xzqh, jyrId, bwId, whbh, startTime, stopTime,szdId,zycs),
|
|
|
+ true);
|
|
|
if (xzqhList != null && xzqhList.size() > 0) {
|
|
|
for (ZysqbpCountEntity1 qh : xzqhList) {
|
|
|
result.add(qh);
|
|
|
- result.addAll(parseZysqbpCountEntity1List(zysqbpDao.countByJyr(
|
|
|
- recordStatus, inorout, mao, szdId + "%", gqId,
|
|
|
- new Long(qh.getId()), jyrId, bwId, whbh, startTime,
|
|
|
- stopTime), false));
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByJyr(recordStatus, inorout, mao, szdId + "%", gqId,new Long(qh.getId()), jyrId, bwId, whbh, startTime,stopTime,zycs),
|
|
|
+ false));
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
@@ -2021,10 +2030,10 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByXzqh(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
- return parseZysqbpCountEntity1List(zysqbpDao.countByXzqh(recordStatus,
|
|
|
- inorout, mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh,
|
|
|
- startTime, stopTime, szdId), false);
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
+ return parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByXzqh(recordStatus,inorout, mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh,startTime, stopTime, szdId,zycs),
|
|
|
+ false);
|
|
|
// return
|
|
|
// parseZysqbpCountEntityxzList(zysqbpDao.countByXzqh(recordStatus,
|
|
|
// inorout, mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh,
|
|
@@ -2070,27 +2079,26 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByXzqhExist(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
- return parseZysqbpCountEntity1List(zysqbpDao.countByXzqhExist(
|
|
|
- recordStatus, inorout, mao, szdId + "%", gqId, xzqh, jyrId,
|
|
|
- bwId, whbh, startTime, stopTime), false);
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
+ return parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByXzqhExist(recordStatus, inorout, mao, szdId + "%", gqId, xzqh, jyrId,bwId, whbh, startTime, stopTime,zycs),
|
|
|
+ false);
|
|
|
}
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByWhpm(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
- return parseZysqbpCountEntity1List(zysqbpDao.countByWhpm(recordStatus,
|
|
|
- inorout, mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh,
|
|
|
- startTime, stopTime), false);
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
+ return parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByWhpm(recordStatus,inorout, mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh,startTime, stopTime,zycs),
|
|
|
+ false);
|
|
|
}
|
|
|
|
|
|
public List<ZysqbpCountEntity1> countByJyrWhpm(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
- Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime) {
|
|
|
+ Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
List<ZysqbpCountEntity1> result = new ArrayList<ZysqbpCountEntity1>();
|
|
|
List<ZysqbpCountEntity1> jyrList = parseZysqbpCountEntity1List(
|
|
|
- zysqbpDao.countByJyr(recordStatus, inorout, mao, szdId + "%",
|
|
|
- gqId, xzqh, jyrId, bwId, whbh, startTime, stopTime),
|
|
|
+ zysqbpDao.countByJyr(recordStatus, inorout, mao, szdId + "%",gqId, xzqh, jyrId, bwId, whbh, startTime, stopTime,zycs),
|
|
|
true);
|
|
|
if (jyrList != null && jyrList.size() > 0) {
|
|
|
int i = 0;
|
|
@@ -2100,10 +2108,9 @@ public class ZysqbpServiceImpl extends
|
|
|
if (i > 3)
|
|
|
break;
|
|
|
result.add(jyr);
|
|
|
- result.addAll(parseZysqbpCountEntity1List(zysqbpDao
|
|
|
- .countByWhpm(recordStatus, inorout, mao, szdId + "%",
|
|
|
- gqId, xzqh, new Long(jyr.getId()), bwId, whbh,
|
|
|
- startTime, stopTime), false));
|
|
|
+ result.addAll(parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByWhpm(recordStatus, inorout, mao, szdId + "%",gqId, xzqh, new Long(jyr.getId()), bwId, whbh,startTime, stopTime,zycs),
|
|
|
+ false));
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
@@ -2112,18 +2119,16 @@ public class ZysqbpServiceImpl extends
|
|
|
public List<ZysqbpCountEntity1> countByWhpmTop(int recordStatus,
|
|
|
String inorout, String mao, Long szdId, Long gqId, Long xzqh,
|
|
|
Long jyrId, Long bwId, String whbh, Date startTime, Date stopTime,
|
|
|
- int n) {
|
|
|
- return parseZysqbpCountEntity1List(zysqbpDao.countByWhpmTop(
|
|
|
- recordStatus, inorout, mao, szdId + "%", gqId, xzqh,
|
|
|
- (Long) jyrId, bwId, whbh, startTime, stopTime, n), false);
|
|
|
+ int n,Long zycs) {
|
|
|
+ return parseZysqbpCountEntity1List(
|
|
|
+ zysqbpDao.countByWhpmTop(recordStatus, inorout, mao, szdId + "%", gqId, xzqh,(Long) jyrId, bwId, whbh, startTime, stopTime, n,zycs),
|
|
|
+ false);
|
|
|
}
|
|
|
|
|
|
public int countTotalByAll(int recordStatus, String inorout, String mao,
|
|
|
Long szdId, Long gqId, Long xzqh, Long jyrId, Long bwId,
|
|
|
- String whbh, Date startTime, Date stopTime) {
|
|
|
- List<Object> result = zysqbpDao.countTotalByAll(recordStatus, inorout,
|
|
|
- mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh, startTime,
|
|
|
- stopTime);
|
|
|
+ String whbh, Date startTime, Date stopTime,Long zycs) {
|
|
|
+ List<Object> result = zysqbpDao.countTotalByAll(recordStatus, inorout,mao, szdId + "%", gqId, xzqh, jyrId, bwId, whbh, startTime,stopTime,zycs);
|
|
|
if (result != null && result.size() > 0) {
|
|
|
return ((BigDecimal) result.get(0)).intValue();
|
|
|
}
|
|
@@ -2289,47 +2294,83 @@ public class ZysqbpServiceImpl extends
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public ZysqbpGatherEntity gatherImformattion(Long szd) {
|
|
|
+ public ZysqbpGatherEntity gatherImformattion(Long szd,int nd) {
|
|
|
ZysqbpGatherEntity entity = new ZysqbpGatherEntity();
|
|
|
- // 经营人中危货企业和已发港口认证和已发危货认证 ,企业总数
|
|
|
+ // 1 经营人中危货企业和已发港口认证和已发危货认证 ,企业总数
|
|
|
List<Object[]> jyrList = jyrDao.getherJyr(szd + "%");
|
|
|
+ //港口危货企业个数
|
|
|
entity.setGkwhqys(prase(jyrList.get(0)));
|
|
|
+ //发给危货企业的经营许可证个数
|
|
|
entity.setYfxkz(prase(jyrList.get(1)));
|
|
|
- entity.setYfwhzyz(prase(jyrList.get(2)));
|
|
|
+ //已发经营许可证的危货企业占比
|
|
|
entity.setXkzzb(getbl(entity.getGkwhqys(), entity.getYfxkz()));
|
|
|
- entity.setYfwhzb(getbl(entity.getGkwhqys(), entity.getYfwhzyz()));
|
|
|
+
|
|
|
+ //已发危货作业许可证个数
|
|
|
+ entity.setYfwhzyz(prase(jyrList.get(2)));
|
|
|
+ //已发危货作业许可证企业数
|
|
|
+ entity.setYfwhzyzqys(prase(jyrList.get(5)));
|
|
|
+ //已发危货作业许可证企业占比
|
|
|
+ entity.setYfwhzb(getbl(entity.getGkwhqys(), entity.getYfwhzyzqys()));
|
|
|
+
|
|
|
+ //危货企业填报人数合计
|
|
|
entity.setQyzrs(prase(jyrList.get(3)));
|
|
|
- // 安全管理人员
|
|
|
+ // 人员类型:管理人员 数据条数
|
|
|
entity.setAqglrs(prase(jyrList.get(4)));
|
|
|
- // 码头泊位
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // 2 码头泊位
|
|
|
jyrList = jyrDao.gatherMtbw(szd + "%");
|
|
|
+ //码头泊位总个数
|
|
|
entity.setMtbwzs(prase(jyrList.get(0)));
|
|
|
+ //万吨级以上泊位个数
|
|
|
entity.setWdysbw(prase(jyrList.get(1)));
|
|
|
+ //五千至一万吨级个数
|
|
|
entity.setWqdwabw(prase(jyrList.get(2)));
|
|
|
+ //五千吨级一下泊位个数
|
|
|
entity.setWqyxbw(prase(jyrList.get(3)));
|
|
|
- jyrList = zysqbpDao.gatherNttl(szd + "%");
|
|
|
- // 规模以上的年货物吞吐量
|
|
|
+
|
|
|
+
|
|
|
+ // 3 “泊位作业” 年货物吞吐量企业数
|
|
|
+ jyrList = zysqbpDao.gatherNttl(szd + "%",String.valueOf(nd));
|
|
|
+ //大于100万吨年货物吞吐量企业数
|
|
|
entity.setNwhttlbwd(prase(jyrList.get(0)));
|
|
|
+ //50~100万吨年货物吞吐量企业数
|
|
|
entity.setNwhttlwsd(prase(jyrList.get(1)));
|
|
|
+ //10~50万吨年货物吞吐量企业数
|
|
|
entity.setNwhttlwqx(prase(jyrList.get(2)));
|
|
|
- // Double ttl = Double.parseDouble(prase(jyrList.get(3)));
|
|
|
- entity.setWxzyzttl((Math.round(Double.parseDouble(prase(jyrList.get(3))) / 100) / 100.0)
|
|
|
- + "");
|
|
|
- // 储罐及重大危险源内容
|
|
|
+ // 辖区内企业年泊位危险货物总吞吐量(万吨)
|
|
|
+ entity.setWxzyzttl((Math.round(Double.parseDouble(prase(jyrList.get(3))) / 100) / 100.0)+ "");
|
|
|
+
|
|
|
+
|
|
|
+ // 4 储罐及重大危险源内容
|
|
|
jyrList = zysqbpDao.gatherCgxx(szd + "%");
|
|
|
+ //危货企业拥有储罐总个数
|
|
|
entity.setCgzs(prase(jyrList.get(0)));
|
|
|
+ //危货企业拥有储罐总容量
|
|
|
entity.setCgrl(prase(jyrList.get(1)));
|
|
|
+ //危货企业拥有生产性储罐个数
|
|
|
entity.setQzccxcg(prase(jyrList.get(2)));
|
|
|
+ //危货企业拥有存储性储罐个数
|
|
|
entity.setQzscxcg(prase(jyrList.get(3)));
|
|
|
+ //拥有有效危货作业附证的储罐个数
|
|
|
entity.setYfcgwhzs(prase(jyrList.get(4)));
|
|
|
+ //重大危险源个数
|
|
|
entity.setZdwxys(prase(jyrList.get(5)));
|
|
|
+ //重大危险源存储总容量
|
|
|
entity.setZdwxycczrl(prase(jyrList.get(6)));
|
|
|
+ //拥有有效危货作业附证的储罐占比
|
|
|
entity.setCgwhzb(getbl(entity.getCgzs(), entity.getYfcgwhzs()));
|
|
|
- // 开展安全评价报告的企业
|
|
|
+
|
|
|
+
|
|
|
+ // 5 开展安全评价报告的企业
|
|
|
jyrList = zysqbpDao.gatherAqpjjg(szd);
|
|
|
+ //开展安全评价企业个数
|
|
|
entity.setKzaqpjqy(prase(jyrList.get(0)));
|
|
|
+ //开展安全评价企业占比
|
|
|
entity.setKaappjqyzb(getbl(entity.getGkwhqys(), entity.getKzaqpjqy()));
|
|
|
- // 排行前十的货物和吞吐量
|
|
|
+
|
|
|
+ // 6 泊位作业 排行前十的货物和作业量
|
|
|
jyrList = zysqbpDao.gatherTopTenHzttl(szd + "%");
|
|
|
StringBuffer hzttl = new StringBuffer();
|
|
|
for (int i = 0; i < jyrList.size(); i++) {
|
|
@@ -2338,11 +2379,9 @@ public class ZysqbpServiceImpl extends
|
|
|
if (object[2] != null)
|
|
|
bhhmc = bhhmc + object[2].toString();
|
|
|
if (i != jyrList.size() - 1) {
|
|
|
- hzttl.append(bhhmc).append(":").append(prase(object[1]))
|
|
|
- .append("吨、");
|
|
|
+ hzttl.append(bhhmc).append(":").append(prase(object[1])).append("吨、");
|
|
|
} else
|
|
|
- hzttl.append(bhhmc).append(":").append(prase(object[1]))
|
|
|
- .append("吨");
|
|
|
+ hzttl.append(bhhmc).append(":").append(prase(object[1])).append("吨");
|
|
|
}
|
|
|
entity.setQszyhz(hzttl.toString());
|
|
|
return entity;
|
|
@@ -2357,9 +2396,7 @@ public class ZysqbpServiceImpl extends
|
|
|
double c;
|
|
|
c = (Math.round(yzgs / yhs) / 100.0);
|
|
|
return c + "%";
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@Override
|