Browse Source

git-svn-id: https://192.168.57.71/svn/lyggkj@139 1a6f6e3a-4066-fe46-b609-79c204482ece

xt_xuhao 8 years ago
parent
commit
692ad8df8e

+ 5 - 6
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/yjgl/zdwxyfb/CgController.java

@@ -110,17 +110,16 @@ public class CgController extends BaseController {
 	public BusinessContext list(SinglePageRequest pageRequest, Long functionId,
 			CgEntity entity) {
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
 		addRecordCodeFilter(functionId, filterList, null, "dwmc");
 		if (entity.getSzd() != null)
-			addNotEmptyModel(filterList, "szd.id", entity.getSzd().getId(),
-					Operator.LIKE_R);
+			addNotEmptyModel(filterList, "szd.id", entity.getSzd().getId(),Operator.LIKE_R);
 		addNotEmptyModel(filterList, "gq", entity.getGq(), Operator.EQ);
 		addNotEmptyModel(filterList, "dwmc", entity.getDwmc(), Operator.EQ);
 		addNotEmptyModel(filterList, "cgqmc", entity.getCgqmc(), Operator.LIKE);
-		addNotEmptyModel(filterList, "recordStatus",
-				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
-		Specification<CgEntity> spec = SpecificationCreater
-				.searchByPredicateModels(filterList);
+		
+		Specification<CgEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
+		
 		if (null == pageRequest) {
 			List<CgEntity> dataset = cgService.findAll(spec);
 			for (CgEntity vo : dataset) {

+ 1 - 1
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/jyrxxgl/RyjbxxServiceImpl.java

@@ -137,7 +137,7 @@ public class RyjbxxServiceImpl extends BaseService<RyjbxxEntity, Long>
 			zsEntity.setByzd5(ryjbxxEntity.getXm());
 			zsEntity.setAddUser(Utils.getCurrentUser());
 			if (null != zsEntity.getAccessory()) {
-				file = accessoryDao.findOne(zsEntity.getAccessory().getId());
+				file = accessoryDao.save(zsEntity.getAccessory());
 			}
 			fileList.add(file);
 		}

+ 4 - 7
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/jyr/JyrxxglWebService.java

@@ -383,15 +383,12 @@ public class JyrxxglWebService extends BaseController {
 		RyjbxxEntity ryjbxx = new RyjbxxEntity();
 		AccessoryEntity acc = ryjbxxEntity.getZp();
 		ryjbxx = ryjbxxService.save(ryjbxxEntity);
-		if(acc!=null && (acc.getId()==null || acc.getId().equals(0l))){
+		if(acc!=null && (acc.getId()==null || acc.getId().equals(0L))){
 			List<PredicateModel> filterList2 = new ArrayList<PredicateModel>();
-			addNotEmptyModel(filterList2, "entityType.id", Constants.FJSSLX_RYJBXX,
-					Operator.EQ);
-			addNotEmptyModel(filterList2, "recordStatus",
-					BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+			addNotEmptyModel(filterList2, "entityType.id", Constants.FJSSLX_RYJBXX,Operator.EQ);
+			addNotEmptyModel(filterList2, "recordStatus",BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
 			addNotEmptyModel(filterList2, "entityId",ryjbxxEntity.getId(), PredicateModel.Operator.EQ);
-			Specification<AccessoryEntity> accSpec = SpecificationCreater
-					.searchByPredicateModels(filterList2);
+			Specification<AccessoryEntity> accSpec = SpecificationCreater.searchByPredicateModels(filterList2);
 			Sort s = new Sort(Direction.DESC, "id");
 			List<AccessoryEntity> accList = accessoryService.findAll(accSpec,s);
 			accessoryService.logicDelete(accList);

+ 8 - 12
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/webService/yjgl/cg/CgxxglWebService.java

@@ -186,29 +186,25 @@ public class CgxxglWebService extends BaseController {
 			final Long szgq, final Long gkjyr, final String cgmc, int n,
 			int pageCount) {
 		List<PredicateModel> filterList = new ArrayList<PredicateModel>();
+		addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+		
 		addNotEmptyModel(filterList, "szd.id", szd, Operator.LIKE_R);
 		addNotEmptyModel(filterList, "gq", szgq, Operator.EQ);
 		addNotEmptyModel(filterList, "dwmc", gkjyr, Operator.EQ);
 		addNotEmptyModel(filterList, "cgmc", cgmc, Operator.LIKE);
-		addNotEmptyModel(filterList, "zdwxycggs", new Integer(1), Operator.EQ);
-		addNotEmptyModel(filterList, "recordStatus",
-				BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
+//		addNotEmptyModel(filterList, "zdwxycggs", new Integer(1), Operator.EQ);
 		if (Utils.getWebServiceUser() != null) {
 			UserEntity user = Utils.getWebServiceUser();
 			// 经营人只能查自己的
-			if (Constants.YES.equals(user.getSfjyr())
-					&& user.getJyrjcxx() != null) {
-				addNotEmptyModel(filterList, "dwmc", user.getJyrjcxx(),
-						Operator.EQ);
+			if (Constants.YES.equals(user.getSfjyr()) && user.getJyrjcxx() != null) {
+				addNotEmptyModel(filterList, "dwmc", user.getJyrjcxx(),Operator.EQ);
 			} else {
 				// 行政人员根据权限过滤(储罐列表菜单ID=19)
-				addRecordCodeFilter(19l, filterList);
+				addRecordCodeFilter(19L, filterList);
 			}
 		}
-		Specification<CgEntity> spec = SpecificationCreater
-				.searchByPredicateModels(filterList);
-		SinglePageRequest page = new SinglePageRequest(pageCount, n, "desc",
-				"id");
+		Specification<CgEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
+		SinglePageRequest page = new SinglePageRequest(pageCount, n, "desc","id");
 		Page<CgEntity> list = cgService.findAll(spec, page);
 		if (list == null || list.getTotalPages() <= pageCount) {
 			return new ArrayList<CgEntity>();