|
@@ -4,8 +4,12 @@ import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Calendar;
|
|
import java.util.Calendar;
|
|
|
|
+import java.util.Collections;
|
|
|
|
+import java.util.Comparator;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
import javax.jws.HandlerChain;
|
|
import javax.jws.HandlerChain;
|
|
import javax.jws.WebService;
|
|
import javax.jws.WebService;
|
|
@@ -28,12 +32,17 @@ import com.jtgh.yjpt.controller.BaseController;
|
|
import com.jtgh.yjpt.controller.zysqbp.ZysqbpController;
|
|
import com.jtgh.yjpt.controller.zysqbp.ZysqbpController;
|
|
import com.jtgh.yjpt.entity.BaseEntity;
|
|
import com.jtgh.yjpt.entity.BaseEntity;
|
|
import com.jtgh.yjpt.entity.auth.UserEntity;
|
|
import com.jtgh.yjpt.entity.auth.UserEntity;
|
|
|
|
+import com.jtgh.yjpt.entity.hs.CbEntity;
|
|
|
|
+import com.jtgh.yjpt.entity.hs.ZysqbphsdbEntity;
|
|
|
|
+import com.jtgh.yjpt.entity.jyr.BwEntity;
|
|
import com.jtgh.yjpt.entity.jyr.JyrEntity;
|
|
import com.jtgh.yjpt.entity.jyr.JyrEntity;
|
|
import com.jtgh.yjpt.entity.jyr.JyrNsEntity;
|
|
import com.jtgh.yjpt.entity.jyr.JyrNsEntity;
|
|
import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
|
|
import com.jtgh.yjpt.entity.jyr.WxhwpmEntity;
|
|
import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
|
|
import com.jtgh.yjpt.entity.zyfzndjy.GkwxhwzyfzblFzEntity;
|
|
import com.jtgh.yjpt.entity.zysqbp.ZysqbpBgEntity;
|
|
import com.jtgh.yjpt.entity.zysqbp.ZysqbpBgEntity;
|
|
import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
|
|
import com.jtgh.yjpt.entity.zysqbp.ZysqbpEntity;
|
|
|
|
+import com.jtgh.yjpt.service.hs.CbService;
|
|
|
|
+import com.jtgh.yjpt.service.hs.HsCompareService;
|
|
import com.jtgh.yjpt.service.jyr.BwService;
|
|
import com.jtgh.yjpt.service.jyr.BwService;
|
|
import com.jtgh.yjpt.service.jyr.CkService;
|
|
import com.jtgh.yjpt.service.jyr.CkService;
|
|
import com.jtgh.yjpt.service.jyr.DcService;
|
|
import com.jtgh.yjpt.service.jyr.DcService;
|
|
@@ -79,8 +88,11 @@ public class WhsqbpWebService extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private DcService dcService;
|
|
private DcService dcService;
|
|
@Autowired
|
|
@Autowired
|
|
- private CkService ckService;
|
|
|
|
-
|
|
|
|
|
|
+ private CkService ckService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private CbService cbService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private HsCompareService compareService;
|
|
// @Autowired
|
|
// @Autowired
|
|
// private WorkflowMangerService workService;
|
|
// private WorkflowMangerService workService;
|
|
// @Autowired
|
|
// @Autowired
|
|
@@ -186,7 +198,7 @@ public class WhsqbpWebService extends BaseController {
|
|
addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE);
|
|
addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE);
|
|
// 根据港区过滤
|
|
// 根据港区过滤
|
|
addNotEmptyModel(filterList, "szgq.id", szgq, Operator.EQ);
|
|
addNotEmptyModel(filterList, "szgq.id", szgq, Operator.EQ);
|
|
- // 根据危货品编号
|
|
|
|
|
|
+ // 根据船名
|
|
addNotEmptyModel(filterList, "cm", cm, Operator.LIKE);
|
|
addNotEmptyModel(filterList, "cm", cm, Operator.LIKE);
|
|
// 根据危货品编号
|
|
// 根据危货品编号
|
|
addNotEmptyModel(filterList, "wxwpmc", wxhwbh, Operator.LIKE);
|
|
addNotEmptyModel(filterList, "wxwpmc", wxhwbh, Operator.LIKE);
|
|
@@ -498,6 +510,7 @@ public class WhsqbpWebService extends BaseController {
|
|
|
|
|
|
public ZysqbpEntity qxAudit(String shyj, boolean auditflag,
|
|
public ZysqbpEntity qxAudit(String shyj, boolean auditflag,
|
|
ZysqbpEntity entity) throws CloneNotSupportedException {
|
|
ZysqbpEntity entity) throws CloneNotSupportedException {
|
|
|
|
+ entity = zysqbpService.findOne(entity.getId());
|
|
zysqbpController.qxAduit(shyj, new Date(), auditflag, entity);
|
|
zysqbpController.qxAduit(shyj, new Date(), auditflag, entity);
|
|
entity = zysqbpService.findOne(entity.getId());
|
|
entity = zysqbpService.findOne(entity.getId());
|
|
return entity;
|
|
return entity;
|
|
@@ -506,6 +519,8 @@ public class WhsqbpWebService extends BaseController {
|
|
public ZysqbpBgEntity bgAudit(String shyj, boolean auditflag,
|
|
public ZysqbpBgEntity bgAudit(String shyj, boolean auditflag,
|
|
ZysqbpEntity entity, ZysqbpBgEntity bgVo)
|
|
ZysqbpEntity entity, ZysqbpBgEntity bgVo)
|
|
throws CloneNotSupportedException {
|
|
throws CloneNotSupportedException {
|
|
|
|
+ entity = zysqbpService.findOne(entity.getId());
|
|
|
|
+ bgVo = zysqbgService.findBgzyByZysqbp(entity);
|
|
zysqbpController.bgAduit(shyj, new Date(), auditflag, entity, bgVo);
|
|
zysqbpController.bgAduit(shyj, new Date(), auditflag, entity, bgVo);
|
|
bgVo = zysqbgService.findBgzyByZysqbp(entity);
|
|
bgVo = zysqbgService.findBgzyByZysqbp(entity);
|
|
return bgVo;
|
|
return bgVo;
|
|
@@ -513,6 +528,7 @@ public class WhsqbpWebService extends BaseController {
|
|
|
|
|
|
public ZysqbpEntity aduit(String shyj, String shsj, boolean auditflag,
|
|
public ZysqbpEntity aduit(String shyj, String shsj, boolean auditflag,
|
|
ZysqbpEntity entity) throws CloneNotSupportedException {
|
|
ZysqbpEntity entity) throws CloneNotSupportedException {
|
|
|
|
+ entity =zysqbpService.findOne(entity.getId());
|
|
// 确保entity有重新查一下
|
|
// 确保entity有重新查一下
|
|
zysqbpController.aduit(shyj, new Date(), auditflag, entity);
|
|
zysqbpController.aduit(shyj, new Date(), auditflag, entity);
|
|
entity = zysqbpService.findOne(entity.getId());
|
|
entity = zysqbpService.findOne(entity.getId());
|
|
@@ -625,8 +641,11 @@ public class WhsqbpWebService extends BaseController {
|
|
* 取消作业
|
|
* 取消作业
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
- public ZysqbpEntity doQxzy(ZysqbpEntity entity) {
|
|
|
|
|
|
+ public ZysqbpEntity doQxzy(ZysqbpEntity vo) {
|
|
|
|
+ ZysqbpEntity entity = zysqbpService.findOne(vo.getId());
|
|
try {
|
|
try {
|
|
|
|
+ //存取取消原因
|
|
|
|
+ entity.setByzd1(vo.getByzd1());
|
|
zysqqxService.submitQxWebService(entity);
|
|
zysqqxService.submitQxWebService(entity);
|
|
entity.setRecordStatus(BaseEntity.RECORD_STATE_QXSUBMIT);// 提交过后,状态改为取消审核中
|
|
entity.setRecordStatus(BaseEntity.RECORD_STATE_QXSUBMIT);// 提交过后,状态改为取消审核中
|
|
entity.setUpdateDate(new Date());
|
|
entity.setUpdateDate(new Date());
|
|
@@ -711,10 +730,10 @@ public class WhsqbpWebService extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 判断当前用户是否有审批权限 之判断 提交(不判断取消变更)
|
|
|
|
|
|
+ * 判断当前用户是否有审批权限 之判断
|
|
*
|
|
*
|
|
* @param id
|
|
* @param id
|
|
- * @return
|
|
|
|
|
|
+ * @return 0 表示未签收,代办理,1表示已签收待办理 ,""表示 无流程
|
|
*/
|
|
*/
|
|
public String getTaskStateByid(Long id) {
|
|
public String getTaskStateByid(Long id) {
|
|
ZysqbpEntity ba = zysqbpService.findOne(id);
|
|
ZysqbpEntity ba = zysqbpService.findOne(id);
|
|
@@ -748,5 +767,81 @@ public class WhsqbpWebService extends BaseController {
|
|
}
|
|
}
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取泊位信息
|
|
|
|
+ * @param zycs 作业场所类型
|
|
|
|
+ * @param id 场所id
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public BwEntity findByZycsAndId(String zycs,Long id) {
|
|
|
|
+ //只查询泊位的信息
|
|
|
|
+ if(Constants.GGDM_ID_ZYDD_BW.equals(Long.parseLong(zycs))) {
|
|
|
|
+ return bwService.findOne(id);
|
|
|
|
+ }
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据中文 船名和英文船名分页获取船舶信息
|
|
|
|
+ * @param zwcm
|
|
|
|
+ * @param ywcm
|
|
|
|
+ * @param n
|
|
|
|
+ * @param pageCount
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ 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);
|
|
|
|
+ Specification<CbEntity> spec = SpecificationCreater
|
|
|
|
+ .searchByPredicateModels(filterList);
|
|
|
|
+ SinglePageRequest page = new SinglePageRequest(pageCount, n,
|
|
|
|
+ "asc", "cbbh");
|
|
|
|
+ Page<CbEntity> list =cbService.findAll(spec,
|
|
|
|
+ page);
|
|
|
|
+ return list.getContent();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询对比结果详细
|
|
|
|
+ *
|
|
|
|
+ * @param id 作业申报id
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<ZysqbphsdbEntity> queryDb(Long id) {
|
|
|
|
+ List<ZysqbphsdbEntity> list = new ArrayList<ZysqbphsdbEntity>();
|
|
|
|
+ Map<String, Map<String, String>> map = compareService.mergeInfo(id);
|
|
|
|
+ if (map == null) {
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+ Set<String> set = map.keySet();
|
|
|
|
+ if (set != null && set.size() > 0) {
|
|
|
|
+ for (String str : set) {
|
|
|
|
+ ZysqbphsdbEntity temp = new ZysqbphsdbEntity();
|
|
|
|
+ temp.setName(str);
|
|
|
|
+ temp.setGkj(map.get(str).get("GK"));
|
|
|
|
+ temp.setHs(map.get(str).get("HS"));
|
|
|
|
+ temp.setZt(map.get(str).get("ZT"));
|
|
|
|
+ String xh = map.get(str).get("XH");
|
|
|
|
+ if (org.springframework.util.StringUtils.hasText(xh)) {
|
|
|
|
+ temp.setXh(new Integer(xh));
|
|
|
|
+ } else {
|
|
|
|
+ temp.setXh(Integer.MAX_VALUE);
|
|
|
|
+ }
|
|
|
|
+ list.add(temp);
|
|
|
|
+ }
|
|
|
|
+ Collections.sort(list, new Comparator<ZysqbphsdbEntity>() {
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public int compare(ZysqbphsdbEntity o1, ZysqbphsdbEntity o2) {
|
|
|
|
+ return o1.getXh().compareTo(o2.getXh());
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|