|
@@ -71,26 +71,68 @@ public class GkwxhwzyfzhzController extends BaseController {
|
|
|
* 企业界面的查询
|
|
|
*/
|
|
|
@Log(Type.QUERY)
|
|
|
- public BusinessContext listByQy(Long functionId, Pageable pageable,
|
|
|
- String jyr, CodeEntity szd, GqEntity gq, String lcStatus,
|
|
|
- String fddbr, String aqgljgfzr) {
|
|
|
+ public BusinessContext listByQy(final Long functionId, Pageable pageable,
|
|
|
+ final String jyr,final CodeEntity szd,final GqEntity gq,final String lcStatus,
|
|
|
+ final String fddbr,final String aqgljgfzr) {
|
|
|
try {
|
|
|
- List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
- // 只检索非删除状态记录
|
|
|
- addNotEmptyModel(filterList, "recordStatus",
|
|
|
- BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
- // 根据所在地过滤
|
|
|
- if (szd != null)
|
|
|
- addNotEmptyModel(filterList, "szd.id", szd.getId(),
|
|
|
- Operator.LIKE_R);
|
|
|
- // 根据港区过滤
|
|
|
- addNotEmptyModel(filterList, "ssgq", gq, Operator.EQ);
|
|
|
- addNotEmptyModel(filterList, "jyrVo.gkjyr", jyr, Operator.LIKE);
|
|
|
- addNotEmptyModel(filterList, "fddbr", fddbr, Operator.LIKE);
|
|
|
- addNotEmptyModel(filterList, "aqgljg", aqgljgfzr, Operator.LIKE);
|
|
|
- addRecordCodeFilter(functionId, filterList, null, "jyrVo");
|
|
|
- Specification<GkwxhwzyfzhzEntity> spec = SpecificationCreater
|
|
|
- .searchByPredicateModels(filterList);
|
|
|
+
|
|
|
+
|
|
|
+// List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
+// // 只检索非删除状态记录
|
|
|
+// addNotEmptyModel(filterList, "recordStatus",
|
|
|
+// BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
+// // 根据所在地过滤
|
|
|
+// if (szd != null)
|
|
|
+// addNotEmptyModel(filterList, "szd.id", szd.getId(),
|
|
|
+// Operator.LIKE_R);
|
|
|
+// // 根据港区过滤
|
|
|
+// addNotEmptyModel(filterList, "ssgq", gq, Operator.EQ);
|
|
|
+// addNotEmptyModel(filterList, "jyrVo.gkjyr", jyr, Operator.LIKE);
|
|
|
+// addNotEmptyModel(filterList, "fddbr", fddbr, Operator.LIKE);
|
|
|
+// addNotEmptyModel(filterList, "aqgljg", aqgljgfzr, Operator.LIKE);
|
|
|
+// addRecordCodeFilter(functionId, filterList, null, "jyrVo");
|
|
|
+// Specification<GkwxhwzyfzhzEntity> spec = SpecificationCreater
|
|
|
+// .searchByPredicateModels(filterList);
|
|
|
+
|
|
|
+ Specification<GkwxhwzyfzhzEntity> spec = new Specification<GkwxhwzyfzhzEntity>() {
|
|
|
+ @Override
|
|
|
+ public Predicate toPredicate(Root<GkwxhwzyfzhzEntity> root,
|
|
|
+ CriteriaQuery<?> query, CriteriaBuilder cb) {
|
|
|
+ List<Predicate> list = new ArrayList<Predicate>();
|
|
|
+ addRecordCodeFilter(functionId, cb, root, list);
|
|
|
+ // 只检索非删除状态记录
|
|
|
+ list.add(cb.notEqual(
|
|
|
+ root.get("recordStatus").as(String.class),
|
|
|
+ BaseEntity.RECORD_STATE_DELETE));
|
|
|
+
|
|
|
+ //经营人
|
|
|
+ if (null != jyr && !"".equals(jyr)) {
|
|
|
+ list.add(cb
|
|
|
+ .like(root.get("jyrVo").get("gkjyr")
|
|
|
+ .as(String.class), "%" + jyr + "%"));
|
|
|
+ }
|
|
|
+
|
|
|
+ // 安全管理机构负责人
|
|
|
+ if (null != aqgljgfzr && !"".equals(aqgljgfzr)) {
|
|
|
+ list.add(cb.like(root.get("aqgljg").as(String.class), "%"+aqgljgfzr+"%"));
|
|
|
+ }
|
|
|
+ // 法定代表人
|
|
|
+ if (null != fddbr && !"".equals(fddbr)) {
|
|
|
+ list.add(cb.like(root.get("fddbr").as(String.class), "%" + fddbr + "%"));
|
|
|
+ }
|
|
|
+
|
|
|
+ //“默认”状态,此状态企业查看全部
|
|
|
+ if(!lcStatus.equals("default")){
|
|
|
+ list = Utils.setWorkflowSpec(list, cb, query, root,
|
|
|
+ lcStatus);
|
|
|
+ }
|
|
|
+ return cb.and(list.toArray(new Predicate[] {}));
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
BusinessContext bc = createBusinessContext(gkwxhwzyfzhzService
|
|
|
.findAll(spec, pageable));
|
|
|
return bc;
|
|
@@ -417,13 +459,28 @@ public class GkwxhwzyfzhzController extends BaseController {
|
|
|
* 审核 flag true 为通过 false不通过
|
|
|
*/
|
|
|
public BusinessContext audit(String shyj, Date shsj,
|
|
|
- GkwxhwzyfzhzEntity entity, boolean flag) {
|
|
|
+ GkwxhwzyfzhzEntity entity, boolean flag,String step) {
|
|
|
|
|
|
+ //flag为true批准通过,如果勾选了延续发证日期、有效期起止时间会显示,要更新其值
|
|
|
if(flag){
|
|
|
//save GkwxhwzyfzhzEntity 页面上只有:发证日期、有效期起止时间可以编辑
|
|
|
gkwxhwzyfzhzService.save(entity);
|
|
|
+
|
|
|
+ //第四布批准通过,如果是延续,更新附证申请中的发证日期、有效日期起止时间
|
|
|
+ if(step.equals("4") && entity.getByzd2().equals("Y")){
|
|
|
+ //通过办理编号找到“附证”申请的信息
|
|
|
+ List<GkwxhwzyfzblhhzEntity> list_fz = gkwxhwzyfzblhhzService.findByByzd1(entity.getByzd1());
|
|
|
+ if(list_fz!=null && list_fz.size()>0){
|
|
|
+ GkwxhwzyfzblhhzEntity fzEntity = list_fz.get(0);//附证申请办理编号应该是唯一的
|
|
|
+ fzEntity.setFzsj(entity.getFzsj());
|
|
|
+ fzEntity.setYxqkssj(entity.getYxqkssj());
|
|
|
+ fzEntity.setYxqjssj(entity.getYxqjssj());
|
|
|
+ gkwxhwzyfzblhhzService.save(fzEntity);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// 先签收
|
|
|
if (gkwxhwzyfzhzService
|
|
|
.getCandidateTaskByUserAndBusKey(Utils.getCurrentUser().getId()
|