|
@@ -92,14 +92,13 @@ public class DcController extends BaseController {
|
|
|
* @throws ParseException
|
|
|
*/
|
|
|
@Log(Type.QUERY)
|
|
|
- public BusinessContext list(SinglePageRequest pageRequest, Long functionId,
|
|
|
- DcEntity entity, Date jcsjK, Date jcsjZ) throws ParseException {
|
|
|
+ public BusinessContext list(SinglePageRequest pageRequest, Long functionId,DcEntity entity, Date jcsjK, Date jcsjZ)
|
|
|
+ throws ParseException {
|
|
|
BusinessContext bc = new BusinessContext();
|
|
|
List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
addRecordCodeFilter(functionId, filterList, null, "bdcdw");
|
|
|
if (null != entity.getSzd()) {
|
|
|
- addNotEmptyModel(filterList, "szd.id", entity.getSzd().getId(),
|
|
|
- Operator.LIKE_R);
|
|
|
+ addNotEmptyModel(filterList, "szd.id", entity.getSzd().getId(),Operator.LIKE_R);
|
|
|
}
|
|
|
if (Constants.SZD_ID_PROVINCE.equals(Utils.getCurrentUserSzd())) {
|
|
|
//addNotEmptyModel(filterList, "pkj", "1", Operator.NEQ);//让省里能看到所有的
|
|
@@ -113,27 +112,25 @@ public class DcController extends BaseController {
|
|
|
addNotEmptyModel(filterList, "mqzt", entity.getMqzt(), Operator.EQ);
|
|
|
addNotEmptyModel(filterList, "original", "original", Operator.NL);
|
|
|
if (jcsjK != null) {
|
|
|
- addNotEmptyModel(filterList, "sj", Utils.getDateFirstTime(jcsjK),
|
|
|
- Operator.GTE);
|
|
|
+ addNotEmptyModel(filterList, "sj", Utils.getDateFirstTime(jcsjK),Operator.GTE);
|
|
|
}
|
|
|
if (jcsjZ != null) {
|
|
|
- addNotEmptyModel(filterList, "sj", Utils.getDateLastTime(jcsjZ),
|
|
|
- Operator.LTE);
|
|
|
+ addNotEmptyModel(filterList, "sj", Utils.getDateLastTime(jcsjZ),Operator.LTE);
|
|
|
}
|
|
|
- addNotEmptyModel(filterList, "bdcdwfzr", entity.getBdcdwfzr(),
|
|
|
- Operator.LIKE);
|
|
|
- addNotEmptyModel(filterList, "recordStatus",
|
|
|
- BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
- Specification<DcEntity> spec = SpecificationCreater
|
|
|
- .searchByPredicateModels(filterList);
|
|
|
+ addNotEmptyModel(filterList, "bdcdwfzr", entity.getBdcdwfzr(),Operator.LIKE);
|
|
|
+ addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
+ //plus by xuhao 20160208
|
|
|
+ //行政人员不要看到未提交的数据
|
|
|
+ if(Utils.getCurrentUser().getSfjyr().equals(Constants.NO)){
|
|
|
+ addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_VALID, Operator.NEQ);
|
|
|
+ }
|
|
|
+ Specification<DcEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
|
|
|
Page<DcEntity> page = dcService.findAll(spec, pageRequest);
|
|
|
for (DcEntity ba : page) {
|
|
|
- if (dcService.getTaskByUserAndBusKey(Utils.getCurrentUser().getId()
|
|
|
- .toString(), ba.getId().toString()) != null) {
|
|
|
+ if (dcService.getTaskByUserAndBusKey(Utils.getCurrentUser().getId().toString(), ba.getId().toString()) != null) {
|
|
|
ba.setTaskState(Constants.TASK_ASSIGN);
|
|
|
} else if (dcService
|
|
|
- .getCandidateTaskByUserAndBusKey(Utils.getCurrentUser()
|
|
|
- .getId().toString(), ba.getId().toString()) != null) {
|
|
|
+ .getCandidateTaskByUserAndBusKey(Utils.getCurrentUser().getId().toString(), ba.getId().toString()) != null) {
|
|
|
ba.setTaskState(Constants.TASK_CANDIDATE);
|
|
|
}
|
|
|
if (ba.getTaskList() != null && ba.getTaskList().size() > 0) {
|