|
@@ -1094,18 +1094,25 @@ public class GkwxhwzyfzblhhzController extends BaseController {
|
|
|
return createBusinessContext("save.success", true);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据所属entity的id和附件的类型获得附件
|
|
|
+ * @param entityid ssid(所属id)
|
|
|
+ * @param sslx 所属类型
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public BusinessContext findFj(long entityid, long sslx) {
|
|
|
BusinessContext bc = new BusinessContext();
|
|
|
List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
// 只检索非删除状态记录
|
|
|
- addNotEmptyModel(filterList, "recordStatus",
|
|
|
- BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
+ addNotEmptyModel(filterList, "recordStatus",BaseEntity.RECORD_STATE_DELETE, Operator.NEQ);
|
|
|
// 根据ID检索
|
|
|
addNotEmptyModel(filterList, "entityId", entityid, Operator.EQ);
|
|
|
addNotEmptyModel(filterList, "entityType", sslx, Operator.EQ);
|
|
|
- Specification<AccessoryEntity> spec = SpecificationCreater
|
|
|
- .searchByPredicateModels(filterList);
|
|
|
+
|
|
|
+ Specification<AccessoryEntity> spec = SpecificationCreater.searchByPredicateModels(filterList);
|
|
|
+
|
|
|
List<AccessoryEntity> fjlist = accessoryService.findAll(spec);
|
|
|
+ //attachment content bytes
|
|
|
ArrayList<byte[]> list = new ArrayList<byte[]>();
|
|
|
for (AccessoryEntity entity : fjlist) {
|
|
|
list.add(entity.getContent().getValue());
|